FixedFormatReaderBuilder.java

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 com.ancientprogramming.fixedformat4j.format.FixedFormatManager;
19
import com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl;
20
21
import java.util.ArrayList;
22
import java.util.List;
23
import java.util.Objects;
24
import java.util.function.Predicate;
25
26
/**
27
 * Fluent builder for {@link FixedFormatReader}.
28
 *
29
 * <p>Obtain an instance via {@link FixedFormatReader#builder()}.
30
 * At minimum, one mapping must be added via {@link #addMapping} before calling {@link #build()}.</p>
31
 *
32
 * @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a>
33
 * @since 1.8.0
34
 */
35
public final class FixedFormatReaderBuilder {
36
37 2 1. <init> : Removed assignment to member variable mappings → KILLED
2. <init> : removed call to java/util/ArrayList::<init> → KILLED
  final List<RecordMapping<?>> mappings = new ArrayList<>();
38 2 1. <init> : removed call to com/ancientprogramming/fixedformat4j/io/read/MultiMatchStrategy::firstMatch → KILLED
2. <init> : Removed assignment to member variable multiMatchStrategy → KILLED
  MultiMatchStrategy multiMatchStrategy = MultiMatchStrategy.firstMatch();
39 2 1. <init> : Removed assignment to member variable unmatchStrategy → KILLED
2. <init> : removed call to com/ancientprogramming/fixedformat4j/io/read/UnmatchStrategy::throwException → KILLED
  UnmatchStrategy unmatchStrategy = UnmatchStrategy.throwException();
40 2 1. <init> : removed call to com/ancientprogramming/fixedformat4j/io/read/ParseErrorStrategy::throwException → SURVIVED
2. <init> : Removed assignment to member variable parseErrorStrategy → SURVIVED
  ParseErrorStrategy parseErrorStrategy = ParseErrorStrategy.throwException();
41 3 1. lambda$new$0 : Substituted 0 with 1 → KILLED
2. <init> : Removed assignment to member variable exclusionFilter → KILLED
3. lambda$new$0 : replaced boolean return with true for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::lambda$new$0 → KILLED
  Predicate<String> exclusionFilter = line -> false;
42 2 1. <init> : removed call to com/ancientprogramming/fixedformat4j/format/impl/FixedFormatManagerImpl::create → KILLED
2. <init> : Removed assignment to member variable manager → KILLED
  FixedFormatManager manager = FixedFormatManagerImpl.create();
43
44
  FixedFormatReaderBuilder() {}
45
46
  /**
47
   * Registers a mapping that routes lines matching {@code pattern} to {@code clazz}.
48
   * When more than one mapping matches a line, the resolution order is "most detailed first,
49
   * then registration order" — see {@link MultiMatchStrategy} for details.
50
   *
51
   * @param <R>     the type of record to load when {@code pattern} matches
52
   * @param clazz   the {@code @Record}-annotated class to instantiate when {@code pattern} matches
53
   * @param pattern the {@link LinePattern} that decides which lines are parsed as {@code clazz};
54
   *                construct via {@link LinePattern#prefix(String)},
55
   *                {@link LinePattern#positional(int[], String)}, or
56
   *                {@link LinePattern#matchAll()}
57
   * @return this builder
58
   * @throws NullPointerException     if {@code clazz} or {@code pattern} is {@code null}
59
   * @throws IllegalArgumentException if {@code clazz} is not annotated with {@code @Record}
60
   */
61
  public <R> FixedFormatReaderBuilder addMapping(Class<R> clazz, LinePattern pattern) {
62 2 1. addMapping : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::<init> → KILLED
2. addMapping : removed call to java/util/List::add → KILLED
    mappings.add(new RecordMapping<>(clazz, pattern));
63 1 1. addMapping : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::addMapping → KILLED
    return this;
64
  }
65
66
  /**
67
   * Sets the strategy applied when more than one pattern matches a line.
68
   * Defaults to {@link MultiMatchStrategy#firstMatch()}.
69
   *
70
   * @param strategy the multi-match strategy to use; must not be {@code null}
71
   * @return this builder
72
   */
73
  public FixedFormatReaderBuilder multiMatchStrategy(MultiMatchStrategy strategy) {
74 2 1. multiMatchStrategy : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. multiMatchStrategy : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(strategy, "strategy must not be null");
75 1 1. multiMatchStrategy : Removed assignment to member variable multiMatchStrategy → KILLED
    this.multiMatchStrategy = strategy;
76 1 1. multiMatchStrategy : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::multiMatchStrategy → KILLED
    return this;
77
  }
78
79
  /**
80
   * Sets the strategy applied when no pattern matches a line.
81
   * Defaults to {@link UnmatchStrategy#throwException()}.
82
   *
83
   * @param strategy the unmatched strategy to use; must not be {@code null}
84
   * @return this builder
85
   */
86
  public FixedFormatReaderBuilder unmatchStrategy(UnmatchStrategy strategy) {
87 2 1. unmatchStrategy : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. unmatchStrategy : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(strategy, "strategy must not be null");
88 1 1. unmatchStrategy : Removed assignment to member variable unmatchStrategy → KILLED
    this.unmatchStrategy = strategy;
89 1 1. unmatchStrategy : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::unmatchStrategy → KILLED
    return this;
90
  }
91
92
  /**
93
   * Sets the strategy applied when a matched line fails to parse.
94
   * Defaults to {@link ParseErrorStrategy#throwException()}.
95
   *
96
   * @param strategy the parse-error strategy to use; must not be {@code null}
97
   * @return this builder
98
   */
99
  public FixedFormatReaderBuilder parseErrorStrategy(ParseErrorStrategy strategy) {
100 2 1. parseErrorStrategy : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. parseErrorStrategy : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(strategy, "strategy must not be null");
101 1 1. parseErrorStrategy : Removed assignment to member variable parseErrorStrategy → KILLED
    this.parseErrorStrategy = strategy;
102 1 1. parseErrorStrategy : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::parseErrorStrategy → KILLED
    return this;
103
  }
104
105
  /**
106
   * Registers a pre-match line exclusion predicate. Lines for which the predicate returns
107
   * {@code true} are skipped entirely before pattern matching, bypassing the
108
   * {@link UnmatchStrategy}.
109
   *
110
   * <p>Use this to discard structural lines that should never be parsed — for example,
111
   * comment lines or blank separators:</p>
112
   * <pre>{@code
113
   * .excludeLines(line -> line.startsWith("#") || line.isBlank())
114
   * }</pre>
115
   *
116
   * @param predicate returns {@code true} for lines that should be skipped
117
   * @return this builder
118
   */
119
  public FixedFormatReaderBuilder excludeLines(Predicate<String> predicate) {
120 2 1. excludeLines : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. excludeLines : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(predicate, "predicate must not be null");
121 1 1. excludeLines : Removed assignment to member variable exclusionFilter → KILLED
    this.exclusionFilter = predicate;
122 1 1. excludeLines : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::excludeLines → KILLED
    return this;
123
  }
124
125
  /**
126
   * Overrides the {@link FixedFormatManager} used to parse each line into a record object.
127
   *
128
   * @param manager the manager to use; must not be {@code null}
129
   * @return this builder
130
   */
131
  public FixedFormatReaderBuilder manager(FixedFormatManager manager) {
132 2 1. manager : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. manager : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(manager, "manager must not be null");
133 1 1. manager : Removed assignment to member variable manager → KILLED
    this.manager = manager;
134 1 1. manager : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::manager → KILLED
    return this;
135
  }
136
137
  /**
138
   * Builds and returns a configured {@link FixedFormatReader}.
139
   *
140
   * @return a new reader instance
141
   * @throws IllegalArgumentException if no mappings have been added
142
   */
143
  public FixedFormatReader build() {
144 4 1. build : removed conditional - replaced equality check with false → KILLED
2. build : removed conditional - replaced equality check with true → KILLED
3. build : removed call to java/util/List::isEmpty → KILLED
4. build : negated conditional → KILLED
    if (mappings.isEmpty()) {
145 1 1. build : removed call to java/lang/IllegalArgumentException::<init> → KILLED
      throw new IllegalArgumentException("At least one mapping must be provided");
146
    }
147 2 1. build : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::build → KILLED
2. build : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::<init> → KILLED
    return new FixedFormatReader(this);
148
  }
149
150
  RecordMappingIndex buildIndex() {
151 1 1. buildIndex : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex::builder → KILLED
    RecordMappingIndex.Builder ib = RecordMappingIndex.builder();
152
    for (RecordMapping<?> mapping : mappings) {
153 3 1. buildIndex : replaced call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::add with receiver → KILLED
2. buildIndex : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::add → KILLED
3. buildIndex : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::getPattern → KILLED
      ib.add(mapping.getPattern(), mapping);
154
    }
155 2 1. buildIndex : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::buildIndex → KILLED
2. buildIndex : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::build → KILLED
    return ib.build();
156
  }
157
}

Mutations

37

1.1
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
Removed assignment to member variable mappings → KILLED

2.2
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
removed call to java/util/ArrayList::<init> → KILLED

38

1.1
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.issues.TestIssue97RestOfLine.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestIssue97RestOfLine]/[method:roundTrip_heterogeneousFile_allLinesPreservedVerbatim()]
removed call to com/ancientprogramming/fixedformat4j/io/read/MultiMatchStrategy::firstMatch → KILLED

2.2
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.issues.TestIssue97RestOfLine.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.issues.TestIssue97RestOfLine]/[method:roundTrip_heterogeneousFile_allLinesPreservedVerbatim()]
Removed assignment to member variable multiMatchStrategy → KILLED

39

1.1
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:withoutExcludeLinesBlankLineTriggerUnmatchStrategy()]
Removed assignment to member variable unmatchStrategy → KILLED

2.2
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:withoutExcludeLinesBlankLineTriggerUnmatchStrategy()]
removed call to com/ancientprogramming/fixedformat4j/io/read/UnmatchStrategy::throwException → KILLED

40

1.1
Location : <init>
Killed by : none
removed call to com/ancientprogramming/fixedformat4j/io/read/ParseErrorStrategy::throwException → SURVIVED
Covering tests

2.2
Location : <init>
Killed by : none
Removed assignment to member variable parseErrorStrategy → SURVIVED Covering tests

41

1.1
Location : lambda$new$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
Substituted 0 with 1 → KILLED

2.2
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
Removed assignment to member variable exclusionFilter → KILLED

3.3
Location : lambda$new$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
replaced boolean return with true for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::lambda$new$0 → KILLED

42

1.1
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_explicitCharset()]
removed call to com/ancientprogramming/fixedformat4j/format/impl/FixedFormatManagerImpl::create → KILLED

2.2
Location : <init>
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_explicitCharset()]
Removed assignment to member variable manager → KILLED

62

1.1
Location : addMapping
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenAddMappingClassIsNull()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::<init> → KILLED

2.2
Location : addMapping
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
removed call to java/util/List::add → KILLED

63

1.1
Location : addMapping
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:builderIsFluentReturningItself()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::addMapping → KILLED

74

1.1
Location : multiMatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenMultiMatchStrategyIsNull()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

2.2
Location : multiMatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenMultiMatchStrategyIsNull()]
removed call to java/util/Objects::requireNonNull → KILLED

75

1.1
Location : multiMatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
Removed assignment to member variable multiMatchStrategy → KILLED

76

1.1
Location : multiMatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:builderIsFluentReturningItself()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::multiMatchStrategy → KILLED

87

1.1
Location : unmatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenUnmatchStrategyIsNull()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

2.2
Location : unmatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenUnmatchStrategyIsNull()]
removed call to java/util/Objects::requireNonNull → KILLED

88

1.1
Location : unmatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:unmatchedSkipDoesNotEmitRecordOrThrow()]
Removed assignment to member variable unmatchStrategy → KILLED

89

1.1
Location : unmatchStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:builderIsFluentReturningItself()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::unmatchStrategy → KILLED

100

1.1
Location : parseErrorStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenParseErrorStrategyIsNull()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

2.2
Location : parseErrorStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenParseErrorStrategyIsNull()]
removed call to java/util/Objects::requireNonNull → KILLED

101

1.1
Location : parseErrorStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaInvokesHandlerAndDoesNotEmitRecord()]
Removed assignment to member variable parseErrorStrategy → KILLED

102

1.1
Location : parseErrorStrategy
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:builderIsFluentReturningItself()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::parseErrorStrategy → KILLED

120

1.1
Location : excludeLines
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenExcludeLinesPredicateIsNull()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

2.2
Location : excludeLines
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenExcludeLinesPredicateIsNull()]
removed call to java/util/Objects::requireNonNull → KILLED

121

1.1
Location : excludeLines
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:excludeLinesLogsDebugWithLineNumberAndContent()]
Removed assignment to member variable exclusionFilter → KILLED

122

1.1
Location : excludeLines
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:excludeLinesLogsDebugWithLineNumberAndContent()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::excludeLines → KILLED

132

1.1
Location : manager
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenManagerIsNull()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

2.2
Location : manager
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsNullPointerWhenManagerIsNull()]
removed call to java/util/Objects::requireNonNull → KILLED

133

1.1
Location : manager
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:throwExceptionStrategy_doesNotContinuePastBadLine()]
Removed assignment to member variable manager → KILLED

134

1.1
Location : manager
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:throwExceptionStrategy_doesNotContinuePastBadLine()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::manager → KILLED

144

1.1
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
removed conditional - replaced equality check with false → KILLED

2.2
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
removed conditional - replaced equality check with true → KILLED

3.3
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
removed call to java/util/List::isEmpty → KILLED

4.4
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
negated conditional → KILLED

145

1.1
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
removed call to java/lang/IllegalArgumentException::<init> → KILLED

147

1.1
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::build → KILLED

2.2
Location : build
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::<init> → KILLED

151

1.1
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex::builder → KILLED

153

1.1
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:skipAndLogSkipsBadLineAndContinuesParsing()]
replaced call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::add with receiver → KILLED

2.2
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:skipAndLogSkipsBadLineAndContinuesParsing()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::add → KILLED

3.3
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:buildsSuccessfullyWithOneMapping()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::getPattern → KILLED

155

1.1
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::buildIndex → KILLED

2.2
Location : buildIndex
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMappingIndex$Builder::build → KILLED

Active mutators

Tests examined


Report generated by PIT 1.23.1 support