|
1
|
|
/* |
|
2
|
|
* Copyright 2004 the original author or authors. |
|
3
|
|
* |
|
4
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5
|
|
* you may not use this file except in compliance with the License. |
|
6
|
|
* You may obtain a copy of the License at |
|
7
|
|
* |
|
8
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9
|
|
* |
|
10
|
|
* Unless required by applicable law or agreed to in writing, software |
|
11
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13
|
|
* See the License for the specific language governing permissions and |
|
14
|
|
* limitations under the License. |
|
15
|
|
*/ |
|
16
|
|
package com.ancientprogramming.fixedformat4j.io.read; |
|
17
|
|
|
|
18
|
|
import java.util.Objects; |
|
19
|
|
|
|
20
|
|
import static java.lang.String.format; |
|
21
|
|
|
|
22
|
|
/** |
|
23
|
|
* Declarative line discriminator used to route a line to a {@code @Record}-annotated class. |
|
24
|
|
* |
|
25
|
|
* <p>A {@code LinePattern} matches a line when, for each declared position {@code p[i]}, |
|
26
|
|
* the line's character at offset {@code p[i]} equals {@code literal.charAt(i)}. |
|
27
|
|
* The closed shape (positions + literal) lets the reader index mappings into hash buckets at |
|
28
|
|
* build time, so per-line routing is near O(1) regardless of how many record types are registered.</p> |
|
29
|
|
* |
|
30
|
|
* <p>Obtain instances via {@link #positional(int[], String)}, {@link #prefix(String)}, or |
|
31
|
|
* {@link #matchAll()}.</p> |
|
32
|
|
* |
|
33
|
|
* @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a> |
|
34
|
|
* @since 1.8.0 |
|
35
|
|
*/ |
|
36
|
|
public final class LinePattern { |
|
37
|
|
|
|
38
|
|
private final int[] positions; |
|
39
|
|
private final String literal; |
|
40
|
|
|
|
41
|
|
private LinePattern(int[] positions, String literal) { |
|
42
|
1
1. <init> : Removed assignment to member variable positions → KILLED
|
this.positions = positions; |
|
43
|
1
1. <init> : Removed assignment to member variable literal → KILLED
|
this.literal = literal; |
|
44
|
|
} |
|
45
|
|
|
|
46
|
|
/** |
|
47
|
|
* Returns a pattern that matches a line when each {@code positions[i]} carries |
|
48
|
|
* {@code literal.charAt(i)}. |
|
49
|
|
* |
|
50
|
|
* @param positions strictly ascending, non-negative line offsets; not null; length must equal |
|
51
|
|
* {@code literal.length()} and must be > 0 |
|
52
|
|
* @param literal the characters expected at the corresponding offsets; not null |
|
53
|
|
* @return a positional pattern; never {@code null} |
|
54
|
|
* @throws NullPointerException if {@code positions} or {@code literal} is null |
|
55
|
|
* @throws IllegalArgumentException if positions is empty, contains a negative or duplicate |
|
56
|
|
* offset, is not strictly ascending, or has a different |
|
57
|
|
* length than {@code literal} |
|
58
|
|
*/ |
|
59
|
|
public static LinePattern positional(int[] positions, String literal) { |
|
60
|
2
1. positional : removed call to java/util/Objects::requireNonNull → KILLED
2. positional : replaced call to java/util/Objects::requireNonNull with argument → KILLED
|
Objects.requireNonNull(positions, "positions must not be null"); |
|
61
|
2
1. positional : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. positional : removed call to java/util/Objects::requireNonNull → KILLED
|
Objects.requireNonNull(literal, "literal must not be null"); |
|
62
|
3
1. positional : negated conditional → KILLED
2. positional : removed conditional - replaced equality check with false → KILLED
3. positional : removed conditional - replaced equality check with true → KILLED
|
if (positions.length == 0) { |
|
63
|
1
1. positional : removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
throw new IllegalArgumentException("positions must not be empty; use LinePattern.matchAll() to match every line"); |
|
64
|
|
} |
|
65
|
4
1. positional : removed conditional - replaced equality check with true → KILLED
2. positional : removed conditional - replaced equality check with false → KILLED
3. positional : negated conditional → KILLED
4. positional : removed call to java/lang/String::length → KILLED
|
if (positions.length != literal.length()) { |
|
66
|
5
1. positional : Substituted 2 with 3 → SURVIVED
2. positional : replaced call to java/lang/String::format with argument → KILLED
3. positional : Substituted 0 with 1 → KILLED
4. positional : removed call to java/lang/String::format → KILLED
5. positional : removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
throw new IllegalArgumentException(format( |
|
67
|
4
1. positional : Substituted 1 with 0 → KILLED
2. positional : removed call to java/lang/Integer::valueOf → KILLED
3. positional : removed call to java/lang/String::length → KILLED
4. positional : removed call to java/lang/Integer::valueOf → KILLED
|
"positions length %d does not equal literal length %d", positions.length, literal.length())); |
|
68
|
|
} |
|
69
|
5
1. positional : changed conditional boundary → KILLED
2. positional : Substituted 0 with 1 → KILLED
3. positional : removed conditional - replaced comparison check with false → KILLED
4. positional : negated conditional → KILLED
5. positional : removed conditional - replaced comparison check with true → KILLED
|
if (positions[0] < 0) { |
|
70
|
7
1. positional : removed call to java/lang/IllegalArgumentException::<init> → KILLED
2. positional : Substituted 1 with 0 → KILLED
3. positional : removed call to java/lang/Integer::valueOf → KILLED
4. positional : Substituted 0 with 1 → KILLED
5. positional : replaced call to java/lang/String::format with argument → KILLED
6. positional : removed call to java/lang/String::format → KILLED
7. positional : Substituted 0 with 1 → KILLED
|
throw new IllegalArgumentException(format("positions must be non-negative; got %d", positions[0])); |
|
71
|
|
} |
|
72
|
5
1. positional : changed conditional boundary → KILLED
2. positional : Substituted 1 with 0 → KILLED
3. positional : negated conditional → KILLED
4. positional : removed conditional - replaced comparison check with true → KILLED
5. positional : removed conditional - replaced comparison check with false → KILLED
|
for (int i = 1; i < positions.length; i++) { |
|
73
|
6
1. positional : negated conditional → KILLED
2. positional : removed conditional - replaced comparison check with true → KILLED
3. positional : Replaced integer subtraction with addition → KILLED
4. positional : changed conditional boundary → KILLED
5. positional : removed conditional - replaced comparison check with false → KILLED
6. positional : Substituted 1 with 0 → KILLED
|
if (positions[i] <= positions[i - 1]) { |
|
74
|
5
1. positional : Substituted 3 with 4 → SURVIVED
2. positional : removed call to java/lang/String::format → KILLED
3. positional : removed call to java/lang/IllegalArgumentException::<init> → KILLED
4. positional : replaced call to java/lang/String::format with argument → KILLED
5. positional : Substituted 0 with 1 → KILLED
|
throw new IllegalArgumentException(format( |
|
75
|
|
"positions must be strictly ascending; got %d after %d at index %d", |
|
76
|
7
1. positional : removed call to java/lang/Integer::valueOf → KILLED
2. positional : Substituted 1 with 0 → KILLED
3. positional : removed call to java/lang/Integer::valueOf → KILLED
4. positional : Replaced integer subtraction with addition → KILLED
5. positional : Substituted 2 with 3 → KILLED
6. positional : removed call to java/lang/Integer::valueOf → KILLED
7. positional : Substituted 1 with 0 → KILLED
|
positions[i], positions[i - 1], i)); |
|
77
|
|
} |
|
78
|
|
} |
|
79
|
3
1. positional : removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
2. positional : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::positional → KILLED
3. positional : removed call to [I::clone → KILLED
|
return new LinePattern(positions.clone(), literal); |
|
80
|
|
} |
|
81
|
|
|
|
82
|
|
/** |
|
83
|
|
* Returns a pattern that matches a line whose first {@code literal.length()} characters |
|
84
|
|
* equal {@code literal}. Equivalent to |
|
85
|
|
* {@code positional(new int[]{0, 1, ..., literal.length() - 1}, literal)}. |
|
86
|
|
* |
|
87
|
|
* @param literal the prefix to match; not null and not empty |
|
88
|
|
* @return a prefix pattern; never {@code null} |
|
89
|
|
* @throws NullPointerException if {@code literal} is null |
|
90
|
|
* @throws IllegalArgumentException if {@code literal} is empty (use {@link #matchAll()} instead) |
|
91
|
|
*/ |
|
92
|
|
public static LinePattern prefix(String literal) { |
|
93
|
2
1. prefix : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. prefix : removed call to java/util/Objects::requireNonNull → KILLED
|
Objects.requireNonNull(literal, "literal must not be null"); |
|
94
|
4
1. prefix : removed conditional - replaced equality check with false → KILLED
2. prefix : removed conditional - replaced equality check with true → KILLED
3. prefix : negated conditional → KILLED
4. prefix : removed call to java/lang/String::isEmpty → KILLED
|
if (literal.isEmpty()) { |
|
95
|
1
1. prefix : removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
throw new IllegalArgumentException("literal must not be empty; use LinePattern.matchAll() to match every line"); |
|
96
|
|
} |
|
97
|
1
1. prefix : removed call to java/lang/String::length → KILLED
|
int[] positions = new int[literal.length()]; |
|
98
|
5
1. prefix : Substituted 0 with 1 → SURVIVED
2. prefix : changed conditional boundary → KILLED
3. prefix : removed conditional - replaced comparison check with true → KILLED
4. prefix : negated conditional → KILLED
5. prefix : removed conditional - replaced comparison check with false → KILLED
|
for (int i = 0; i < positions.length; i++) { |
|
99
|
|
positions[i] = i; |
|
100
|
|
} |
|
101
|
2
1. prefix : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::prefix → KILLED
2. prefix : removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
|
return new LinePattern(positions, literal); |
|
102
|
|
} |
|
103
|
|
|
|
104
|
|
/** |
|
105
|
|
* Returns a pattern that matches every line. Use this when registering a single record type |
|
106
|
|
* for a homogeneous file, or as the catch-all in a heterogeneous file. |
|
107
|
|
* |
|
108
|
|
* @return a match-all pattern; never {@code null} |
|
109
|
|
*/ |
|
110
|
|
public static LinePattern matchAll() { |
|
111
|
3
1. matchAll : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::matchAll → KILLED
2. matchAll : Substituted 0 with 1 → KILLED
3. matchAll : removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
|
return new LinePattern(new int[0], null); |
|
112
|
|
} |
|
113
|
|
|
|
114
|
|
int[] positions() { |
|
115
|
1
1. positions : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::positions → KILLED
|
return positions; |
|
116
|
|
} |
|
117
|
|
|
|
118
|
|
String literal() { |
|
119
|
1
1. literal : replaced return value with "" for com/ancientprogramming/fixedformat4j/io/read/LinePattern::literal → KILLED
|
return literal; |
|
120
|
|
} |
|
121
|
|
|
|
122
|
|
int depth() { |
|
123
|
1
1. depth : replaced int return with 0 for com/ancientprogramming/fixedformat4j/io/read/LinePattern::depth → KILLED
|
return positions.length; |
|
124
|
|
} |
|
125
|
|
} |
| | Mutations |
| 42 |
|
1.1 Location : <init> Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] Removed assignment to member variable positions → KILLED
|
| 43 |
|
1.1 Location : <init> Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] Removed assignment to member variable literal → KILLED
|
| 60 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNullPositions_npeContainsParameterName()] removed call to java/util/Objects::requireNonNull → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNullPositions_npeContainsParameterName()] replaced call to java/util/Objects::requireNonNull with argument → KILLED
|
| 61 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNullLiteral_npeContainsParameterName()] replaced call to java/util/Objects::requireNonNull with argument → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNullLiteral_npeContainsParameterName()] removed call to java/util/Objects::requireNonNull → KILLED
|
| 62 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalEmptyPositions_messageSuggestsMatchAll()] negated conditional → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalEmptyPositions_messageSuggestsMatchAll()] removed conditional - replaced equality check with false → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] removed conditional - replaced equality check with true → KILLED
|
| 63 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsEmptyPositions()] removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
| 65 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] removed conditional - replaced equality check with true → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsLengthMismatch()] removed conditional - replaced equality check with false → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsLengthMismatch()] negated conditional → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] removed call to java/lang/String::length → KILLED
|
| 66 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] replaced call to java/lang/String::format with argument → KILLED
2.2 Location : positional Killed by : none Substituted 2 with 3 → SURVIVED
Covering tests
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] Substituted 0 with 1 → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] removed call to java/lang/String::format → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsLengthMismatch()] removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
| 67 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] Substituted 1 with 0 → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] removed call to java/lang/Integer::valueOf → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] removed call to java/lang/String::length → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalLengthMismatch_messageMentionsBothLengths()] removed call to java/lang/Integer::valueOf → KILLED
|
| 69 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] changed conditional boundary → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] Substituted 0 with 1 → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] removed conditional - replaced comparison check with false → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] negated conditional → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] removed conditional - replaced comparison check with true → KILLED
|
| 70 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] removed call to java/lang/IllegalArgumentException::<init> → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] Substituted 1 with 0 → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] removed call to java/lang/Integer::valueOf → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsNegativePosition()] Substituted 0 with 1 → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] replaced call to java/lang/String::format with argument → KILLED
6.6 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] removed call to java/lang/String::format → KILLED
7.7 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalNegativePosition_messageMentionsNegativeValue()] Substituted 0 with 1 → KILLED
|
| 72 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] changed conditional boundary → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsDuplicatePositions()] Substituted 1 with 0 → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsDuplicatePositions()] negated conditional → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] removed conditional - replaced comparison check with true → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsDuplicatePositions()] removed conditional - replaced comparison check with false → KILLED
|
| 73 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsUnsortedPositions()] negated conditional → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] removed conditional - replaced comparison check with true → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsUnsortedPositions()] Replaced integer subtraction with addition → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsDuplicatePositions()] changed conditional boundary → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsUnsortedPositions()] removed conditional - replaced comparison check with false → KILLED
6.6 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] Substituted 1 with 0 → KILLED
|
| 74 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] removed call to java/lang/String::format → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsUnsortedPositions()] removed call to java/lang/IllegalArgumentException::<init> → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] replaced call to java/lang/String::format with argument → KILLED
4.4 Location : positional Killed by : none Substituted 3 with 4 → SURVIVED
Covering tests
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] Substituted 0 with 1 → KILLED
|
| 76 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] removed call to java/lang/Integer::valueOf → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDescendingAtLastIndex_messageContainsViolationDetails()] Substituted 1 with 0 → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] removed call to java/lang/Integer::valueOf → KILLED
4.4 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsDuplicatePositions()] Replaced integer subtraction with addition → KILLED
5.5 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalRejectsUnsortedPositions()] Substituted 2 with 3 → KILLED
6.6 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] removed call to java/lang/Integer::valueOf → KILLED
7.7 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalDuplicateAtIndex1_messageContainsAscendingViolation()] Substituted 1 with 0 → KILLED
|
| 79 |
|
1.1 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
2.2 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::positional → KILLED
3.3 Location : positional Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:positionalArrayIsDefensivelyCopied()] removed call to [I::clone → KILLED
|
| 93 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixNullLiteral_npeContainsParameterName()] replaced call to java/util/Objects::requireNonNull with argument → KILLED
2.2 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixNullLiteral_npeContainsParameterName()] removed call to java/util/Objects::requireNonNull → KILLED
|
| 94 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixEmptyLiteral_messageSuggestsMatchAll()] removed conditional - replaced equality check with false → KILLED
2.2 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] removed conditional - replaced equality check with true → KILLED
3.3 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixEmptyLiteral_messageSuggestsMatchAll()] negated conditional → KILLED
4.4 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixEmptyLiteral_messageSuggestsMatchAll()] removed call to java/lang/String::isEmpty → KILLED
|
| 95 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixEmptyLiteral_messageSuggestsMatchAll()] removed call to java/lang/IllegalArgumentException::<init> → KILLED
|
| 97 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] removed call to java/lang/String::length → KILLED
|
| 98 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] changed conditional boundary → KILLED
2.2 Location : prefix Killed by : none Substituted 0 with 1 → SURVIVED
Covering tests
3.3 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] removed conditional - replaced comparison check with true → KILLED
4.4 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] negated conditional → KILLED
5.5 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] removed conditional - replaced comparison check with false → KILLED
|
| 101 |
|
1.1 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::prefix → KILLED
2.2 Location : prefix Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
|
| 111 |
|
1.1 Location : matchAll Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::matchAll → KILLED
2.2 Location : matchAll Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] Substituted 0 with 1 → KILLED
3.3 Location : matchAll Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] removed call to com/ancientprogramming/fixedformat4j/io/read/LinePattern::<init> → KILLED
|
| 115 |
|
1.1 Location : positions Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/LinePattern::positions → KILLED
|
| 119 |
|
1.1 Location : literal Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:matchAllHasDepthZeroAndNoLiteral()] replaced return value with "" for com/ancientprogramming/fixedformat4j/io/read/LinePattern::literal → KILLED
|
| 123 |
|
1.1 Location : depth Killed by : com.ancientprogramming.fixedformat4j.io.read.TestLinePattern.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.read.TestLinePattern]/[method:prefixCreatesPositionalFromZeroToLengthMinusOne()] replaced int return with 0 for com/ancientprogramming/fixedformat4j/io/read/LinePattern::depth → KILLED
|