FixedFormatReader.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.exception.FixedFormatIOException;
19
20
import java.io.BufferedReader;
21
import java.io.IOException;
22
import java.io.InputStream;
23
import java.io.InputStreamReader;
24
import java.io.Reader;
25
import java.nio.charset.Charset;
26
import java.nio.charset.StandardCharsets;
27
import java.nio.file.Files;
28
import java.nio.file.Path;
29
import java.util.ArrayList;
30
import java.util.LinkedHashMap;
31
import java.util.List;
32
import java.util.Map;
33
import java.util.Objects;
34
import java.util.function.BiConsumer;
35
import java.util.function.Function;
36
import java.util.stream.Stream;
37
import java.util.stream.StreamSupport;
38
39
import static java.lang.String.format;
40
41
/**
42
 * Reads a fixed-format file or stream line by line, routes each line to one or more
43
 * {@link com.ancientprogramming.fixedformat4j.annotation.Record}-annotated classes via
44
 * {@link LinePattern} discriminators, and produces parsed record objects.
45
 *
46
 * <p>Each physical line is treated as exactly one record (or unmatched). If a file contains
47
 * multiple records packed within a single line, split the line before passing it to this reader.</p>
48
 *
49
 * <p>Records are collected eagerly via {@link #read} or dispatched via
50
 * {@link #process(Reader, HandlerRegistry)}. All input-source overloads default to
51
 * {@link java.nio.charset.StandardCharsets#UTF_8}; explicit {@link Charset} overloads are
52
 * provided for every source type.</p>
53
 *
54
 * <p>Quick start — single record type:</p>
55
 * <pre>{@code
56
 * FixedFormatReader reader = FixedFormatReader.builder()
57
 *     .addMapping(MyRecord.class, LinePattern.matchAll())
58
 *     .build();
59
 *
60
 * List<MyRecord> records = reader.read(Path.of("data.txt")).get(MyRecord.class);
61
 * }</pre>
62
 *
63
 * <p>Quick start — heterogeneous file:</p>
64
 * <pre>{@code
65
 * FixedFormatReader reader = FixedFormatReader.builder()
66
 *     .addMapping(HeaderRecord.class, LinePattern.prefix("HDR"))
67
 *     .addMapping(DetailRecord.class, LinePattern.prefix("DTL"))
68
 *     .build();
69
 *
70
 * ReadResult result = reader.read(Path.of("data.txt"));
71
 * List<HeaderRecord> headers = result.get(HeaderRecord.class);
72
 * List<DetailRecord> details = result.get(DetailRecord.class);
73
 * }</pre>
74
 *
75
 * <p>Quick start — typed handlers (no casts anywhere):</p>
76
 * <pre>{@code
77
 * FixedFormatReader reader = FixedFormatReader.builder()
78
 *     .addMapping(HeaderRecord.class, LinePattern.prefix("HDR"))
79
 *     .addMapping(DetailRecord.class, LinePattern.prefix("DTL"))
80
 *     .build();
81
 *
82
 * reader.process(Path.of("data.txt"), new HandlerRegistry()
83
 *     .on(HeaderRecord.class, this::onHeader)
84
 *     .on(DetailRecord.class, this::onDetail));
85
 * }</pre>
86
 *
87
 * @author Jacob von Eyben - <a href="https://eybenconsult.com">https://eybenconsult.com</a>
88
 * @since 1.8.0
89
 */
90
public final class FixedFormatReader {
91
92
  private final List<RecordMapping<?>> mappings;
93
  private final FixedFormatLineProcessor processor;
94
95
  FixedFormatReader(FixedFormatReaderBuilder builder) {
96 2 1. <init> : Removed assignment to member variable mappings → KILLED
2. <init> : removed call to java/util/List::copyOf → KILLED
    this.mappings = List.copyOf(builder.mappings);
97
    this.processor = new FixedFormatLineProcessor(
98 3 1. <init> : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatLineProcessor::<init> → KILLED
2. <init> : Removed assignment to member variable processor → KILLED
3. <init> : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::buildIndex → KILLED
        builder.buildIndex(),
99
        builder.multiMatchStrategy,
100
        builder.unmatchStrategy,
101
        builder.parseErrorStrategy,
102
        builder.exclusionFilter,
103
        builder.manager);
104
  }
105
106
  // --- read ---
107
108
  /**
109
   * Eagerly reads all records from {@code reader} and returns a {@link ReadResult} that
110
   * provides type-safe, class-keyed access without casts.
111
   *
112
   * <p>This method is safe to call concurrently from multiple threads on the same
113
   * {@link FixedFormatReader} instance, provided that all configured strategies and the
114
   * {@link com.ancientprogramming.fixedformat4j.format.FixedFormatManager} are also thread-safe.
115
   * The built-in strategies and
116
   * {@link com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl} are thread-safe
117
   * and satisfy this requirement. Each call builds its own independent local state; the shared
118
   * line processor carries no mutable per-call state.</p>
119
   *
120
   * <pre>{@code
121
   * ReadResult result = reader.read(source);
122
   * List<HeaderRecord> headers = result.get(HeaderRecord.class); // no cast
123
   * }</pre>
124
   *
125
   * @param reader the source of lines; closed when this method returns
126
   * @return a {@link ReadResult} grouping records by their matched class; never {@code null}
127
   * @throws FixedFormatIOException if an IO error occurs while reading
128
   */
129
  public ReadResult read(Reader reader) {
130 2 1. read : removed call to java/util/Objects::requireNonNull → KILLED
2. read : replaced call to java/util/Objects::requireNonNull with argument → KILLED
    Objects.requireNonNull(reader, "reader must not be null");
131
    // Seed in registration order so result.classes() iterates by registration, not encounter,
132
    // order. Empty entries are stripped before returning.
133 1 1. read : removed call to java/util/LinkedHashMap::<init> → KILLED
    Map<Class<?>, List<Object>> data = new LinkedHashMap<>();
134
    for (RecordMapping<?> mapping : mappings) {
135 4 1. read : removed call to java/util/ArrayList::<init> → KILLED
2. read : removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::getRecordClass → KILLED
3. read : replaced call to java/util/Map::put with argument → KILLED
4. read : removed call to java/util/Map::put → KILLED
      data.put(mapping.getRecordClass(), new ArrayList<>());
136
    }
137 1 1. read : removed call to java/util/ArrayList::<init> → KILLED
    List<Object> all = new ArrayList<>();
138 1 1. read : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::readWithMappingCallback → KILLED
    readWithMappingCallback(reader, (clazz, record) -> {
139 3 1. lambda$read$0 : removed call to java/util/Map::get → KILLED
2. lambda$read$0 : replaced call to java/util/Map::get with argument → KILLED
3. lambda$read$0 : removed call to java/util/List::add → KILLED
      data.get(clazz).add(record);
140 1 1. lambda$read$0 : removed call to java/util/List::add → KILLED
      all.add(record);
141
    });
142 6 1. lambda$read$1 : replaced boolean return with false for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$read$1 → KILLED
2. lambda$read$1 : removed call to java/util/List::isEmpty → KILLED
3. read : removed call to java/util/Set::removeIf → KILLED
4. lambda$read$1 : replaced boolean return with true for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$read$1 → KILLED
5. read : removed call to java/util/Map::entrySet → KILLED
6. lambda$read$1 : removed call to java/util/Map$Entry::getValue → KILLED
    data.entrySet().removeIf(e -> e.getValue().isEmpty());
143 2 1. read : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
2. read : removed call to com/ancientprogramming/fixedformat4j/io/read/ReadResult::<init> → KILLED
    return new ReadResult(data, all);
144
  }
145
146
  /**
147
   * Eagerly reads all records from {@code inputStream} using UTF-8 encoding and returns
148
   * a {@link ReadResult}.
149
   *
150
   * @param inputStream the source stream; closed when this method returns
151
   * @return a {@link ReadResult} grouping records by their matched class; never {@code null}
152
   * @throws FixedFormatIOException if an IO error occurs while reading
153
   */
154
  public ReadResult read(InputStream inputStream) {
155 2 1. read : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
2. read : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
    return read(inputStream, StandardCharsets.UTF_8);
156
  }
157
158
  /**
159
   * Eagerly reads all records from {@code inputStream} using the given charset and returns
160
   * a {@link ReadResult}.
161
   *
162
   * @param inputStream the source stream; closed when this method returns
163
   * @param charset     the character encoding to apply
164
   * @return a {@link ReadResult} grouping records by their matched class; never {@code null}
165
   * @throws FixedFormatIOException if an IO error occurs while reading
166
   */
167
  public ReadResult read(InputStream inputStream, Charset charset) {
168 2 1. read : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
2. read : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
    return withReader(inputStream, charset, this::read);
169
  }
170
171
  /**
172
   * Eagerly reads all records from {@code path} using UTF-8 encoding and returns
173
   * a {@link ReadResult}.
174
   *
175
   * @param path the path to read
176
   * @return a {@link ReadResult} grouping records by their matched class; never {@code null}
177
   * @throws FixedFormatIOException if the path cannot be opened or an IO error occurs
178
   */
179
  public ReadResult read(Path path) {
180 2 1. read : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
2. read : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
    return read(path, StandardCharsets.UTF_8);
181
  }
182
183
  /**
184
   * Eagerly reads all records from {@code path} using the given charset and returns
185
   * a {@link ReadResult}.
186
   *
187
   * @param path    the path to read
188
   * @param charset the character encoding to apply
189
   * @return a {@link ReadResult} grouping records by their matched class; never {@code null}
190
   * @throws FixedFormatIOException if the path cannot be opened or an IO error occurs
191
   */
192
  public ReadResult read(Path path, Charset charset) {
193 2 1. read : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
2. read : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED
    return withReader(path, charset, this::read);
194
  }
195
196
  private void readWithMappingCallback(Reader reader,
197
                                       BiConsumer<Class<?>, Object> callback) {
198 1 1. readWithMappingCallback : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::toBuffered → KILLED
    BufferedReader buffered = toBuffered(reader);
199 3 1. readWithMappingCallback : Substituted 0 with 1 → KILLED
2. readWithMappingCallback : Substituted 0 with 1 → KILLED
3. readWithMappingCallback : Substituted 1 with 0 → KILLED
    long[] lineCounter = {0L};
200
    try (buffered) {
201
      String line;
202 4 1. readWithMappingCallback : removed conditional - replaced equality check with true → TIMED_OUT
2. readWithMappingCallback : removed call to java/io/BufferedReader::readLine → KILLED
3. readWithMappingCallback : removed conditional - replaced equality check with false → KILLED
4. readWithMappingCallback : negated conditional → KILLED
      while ((line = buffered.readLine()) != null) {
203 4 1. readWithMappingCallback : Substituted 1 with 2 → KILLED
2. readWithMappingCallback : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatLineProcessor::processLine → KILLED
3. readWithMappingCallback : Substituted 0 with 1 → KILLED
4. readWithMappingCallback : Replaced long addition with subtraction → KILLED
        processor.processLine(line, ++lineCounter[0], callback);
204
      }
205
    } catch (IOException e) {
206 9 1. readWithMappingCallback : Substituted 0 with 1 → KILLED
2. readWithMappingCallback : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED
3. readWithMappingCallback : Replaced long addition with subtraction → KILLED
4. readWithMappingCallback : replaced call to java/lang/String::format with argument → KILLED
5. readWithMappingCallback : removed call to java/lang/String::format → KILLED
6. readWithMappingCallback : Substituted 1 with 0 → KILLED
7. readWithMappingCallback : Substituted 1 with 2 → KILLED
8. readWithMappingCallback : Substituted 0 with 1 → KILLED
9. readWithMappingCallback : removed call to java/lang/Long::valueOf → KILLED
      throw new FixedFormatIOException(format("IO error reading line %d", lineCounter[0] + 1), e);
207
    }
208
  }
209
210
  // --- process ---
211
212
  /**
213
   * Reads all records from {@code reader} and dispatches each to the handler registered
214
   * for its class in {@code registry}.
215
   *
216
   * <p>Classes not present in the registry are silently ignored — they are still parsed,
217
   * but no handler is invoked. Because the registry is supplied per call rather than stored
218
   * in the reader, the same {@link FixedFormatReader} instance is safe to use from multiple
219
   * threads with independent registries, provided that all configured strategies and the
220
   * {@link com.ancientprogramming.fixedformat4j.format.FixedFormatManager} are also thread-safe.
221
   * The built-in strategies and
222
   * {@link com.ancientprogramming.fixedformat4j.format.impl.FixedFormatManagerImpl} are thread-safe
223
   * and satisfy this requirement.</p>
224
   *
225
   * <pre>{@code
226
   * reader.process(source, new HandlerRegistry()
227
   *     .on(HeaderRecord.class, this::onHeader)
228
   *     .on(DetailRecord.class, this::onDetail));
229
   * }</pre>
230
   *
231
   * @param reader   the source of lines; closed when this method returns
232
   * @param registry the typed handlers to invoke per matched class; must not be {@code null}
233
   * @throws FixedFormatIOException if an IO error occurs while reading
234
   */
235
  public void process(Reader reader, HandlerRegistry registry) {
236 2 1. process : removed call to java/util/Objects::requireNonNull → SURVIVED
2. process : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
    Objects.requireNonNull(reader, "reader must not be null");
237 2 1. process : removed call to java/util/Objects::requireNonNull → SURVIVED
2. process : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
    Objects.requireNonNull(registry, "registry must not be null");
238 1 1. process : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::readWithMappingCallback → KILLED
    readWithMappingCallback(reader, registry::dispatch);
239
  }
240
241
  /**
242
   * Reads all records from {@code inputStream} using UTF-8 encoding and dispatches each to
243
   * its handler in {@code registry}.
244
   *
245
   * @param inputStream the source stream; closed when this method returns
246
   * @param registry    the typed handlers to invoke per matched class; must not be {@code null}
247
   * @throws FixedFormatIOException if an IO error occurs while reading
248
   */
249
  public void process(InputStream inputStream, HandlerRegistry registry) {
250 1 1. process : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED
    process(inputStream, StandardCharsets.UTF_8, registry);
251
  }
252
253
  /**
254
   * Reads all records from {@code inputStream} using the given charset and dispatches each to
255
   * its handler in {@code registry}.
256
   *
257
   * @param inputStream the source stream; closed when this method returns
258
   * @param charset     the character encoding to apply
259
   * @param registry    the typed handlers to invoke per matched class; must not be {@code null}
260
   * @throws FixedFormatIOException if an IO error occurs while reading
261
   */
262
  public void process(InputStream inputStream, Charset charset, HandlerRegistry registry) {
263 2 1. process : removed call to java/util/Objects::requireNonNull → SURVIVED
2. process : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
    Objects.requireNonNull(registry, "registry must not be null");
264 2 1. process : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
2. lambda$process$2 : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED
    withReader(inputStream, charset, r -> { process(r, registry); return null; });
265
  }
266
267
  /**
268
   * Reads all records from {@code path} using UTF-8 encoding and dispatches each to
269
   * its handler in {@code registry}.
270
   *
271
   * @param path     the path to read
272
   * @param registry the typed handlers to invoke per matched class; must not be {@code null}
273
   * @throws FixedFormatIOException if the path cannot be opened or an IO error occurs
274
   */
275
  public void process(Path path, HandlerRegistry registry) {
276 1 1. process : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED
    process(path, StandardCharsets.UTF_8, registry);
277
  }
278
279
  /**
280
   * Reads all records from {@code path} using the given charset and dispatches each to
281
   * its handler in {@code registry}.
282
   *
283
   * @param path     the path to read
284
   * @param charset  the character encoding to apply
285
   * @param registry the typed handlers to invoke per matched class; must not be {@code null}
286
   * @throws FixedFormatIOException if the path cannot be opened or an IO error occurs
287
   */
288
  public void process(Path path, Charset charset, HandlerRegistry registry) {
289 2 1. process : removed call to java/util/Objects::requireNonNull → SURVIVED
2. process : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
    Objects.requireNonNull(registry, "registry must not be null");
290 2 1. process : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
2. lambda$process$3 : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED
    withReader(path, charset, r -> { process(r, registry); return null; });
291
  }
292
293
  // --- openStream ---
294
295
  /**
296
   * Returns a lazy {@link Stream} of parsed records backed by {@code reader}.
297
   *
298
   * <p>The caller is responsible for closing the stream. The underlying reader is closed
299
   * automatically when the stream is closed. Always use {@code try}-with-resources:</p>
300
   * <pre>{@code
301
   * try (Stream<Object> s = reader.openStream(source)) {
302
   *     s.forEach(this::handleRecord);
303
   * }
304
   * }</pre>
305
   *
306
   * @param reader the source of lines; closed when the returned stream is closed
307
   * @return a lazy, ordered, non-null stream of parsed record objects
308
   * @throws NullPointerException if {@code reader} is {@code null}
309
   */
310
  public Stream<Object> openStream(Reader reader) {
311 2 1. openStream : removed call to java/util/Objects::requireNonNull → KILLED
2. openStream : replaced call to java/util/Objects::requireNonNull with argument → KILLED
    Objects.requireNonNull(reader, "reader must not be null");
312 1 1. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::toBuffered → KILLED
    BufferedReader buffered = toBuffered(reader);
313 4 1. openStream : Substituted 0 with 1 → SURVIVED
2. openStream : removed call to java/util/stream/StreamSupport::stream → KILLED
3. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
4. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatSpliterator::<init> → KILLED
    return StreamSupport.stream(new FixedFormatSpliterator(buffered, processor), false)
314 1 1. openStream : removed call to java/util/stream/Stream::onClose → KILLED
        .onClose(() -> {
315
          try {
316 1 1. lambda$openStream$4 : removed call to java/io/BufferedReader::close → KILLED
            buffered.close();
317
          } catch (IOException e) {
318 1 1. lambda$openStream$4 : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → NO_COVERAGE
            throw new FixedFormatIOException("IO error closing stream", e);
319
          }
320
        });
321
  }
322
323
  /**
324
   * Returns a lazy {@link Stream} of parsed records from {@code inputStream} using UTF-8 encoding.
325
   *
326
   * <p>The caller must close the returned stream (via {@code try}-with-resources).
327
   * Closing the stream closes the underlying input stream.</p>
328
   *
329
   * @param inputStream the source stream; closed when the returned stream is closed
330
   * @return a lazy, ordered, non-null stream of parsed record objects
331
   * @throws NullPointerException if {@code inputStream} is {@code null}
332
   */
333
  public Stream<Object> openStream(InputStream inputStream) {
334 2 1. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
2. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
    return openStream(inputStream, StandardCharsets.UTF_8);
335
  }
336
337
  /**
338
   * Returns a lazy {@link Stream} of parsed records from {@code inputStream} using the given charset.
339
   *
340
   * <p>The caller must close the returned stream (via {@code try}-with-resources).
341
   * Closing the stream closes the underlying input stream.</p>
342
   *
343
   * @param inputStream the source stream; closed when the returned stream is closed
344
   * @param charset     the character encoding to apply
345
   * @return a lazy, ordered, non-null stream of parsed record objects
346
   * @throws NullPointerException if {@code inputStream} or {@code charset} is {@code null}
347
   */
348
  public Stream<Object> openStream(InputStream inputStream, Charset charset) {
349 2 1. openStream : removed call to java/util/Objects::requireNonNull → KILLED
2. openStream : replaced call to java/util/Objects::requireNonNull with argument → KILLED
    Objects.requireNonNull(inputStream, "inputStream must not be null");
350 2 1. openStream : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
2. openStream : removed call to java/util/Objects::requireNonNull → SURVIVED
    Objects.requireNonNull(charset, "charset must not be null");
351 3 1. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
2. openStream : removed call to java/io/InputStreamReader::<init> → KILLED
3. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
    return openStream(new InputStreamReader(inputStream, charset));
352
  }
353
354
  /**
355
   * Returns a lazy {@link Stream} of parsed records from {@code path} using UTF-8 encoding.
356
   *
357
   * <p>The caller must close the returned stream (via {@code try}-with-resources).
358
   * Closing the stream closes the underlying file.</p>
359
   *
360
   * @param path the path to read
361
   * @return a lazy, ordered, non-null stream of parsed record objects
362
   * @throws NullPointerException   if {@code path} is {@code null}
363
   * @throws FixedFormatIOException if the path cannot be opened
364
   */
365
  public Stream<Object> openStream(Path path) {
366 2 1. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
2. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
    return openStream(path, StandardCharsets.UTF_8);
367
  }
368
369
  /**
370
   * Returns a lazy {@link Stream} of parsed records from {@code path} using the given charset.
371
   *
372
   * <p>The caller must close the returned stream (via {@code try}-with-resources).
373
   * Closing the stream closes the underlying file.</p>
374
   *
375
   * @param path    the path to read
376
   * @param charset the character encoding to apply
377
   * @return a lazy, ordered, non-null stream of parsed record objects
378
   * @throws NullPointerException   if {@code path} or {@code charset} is {@code null}
379
   * @throws FixedFormatIOException if the path cannot be opened
380
   */
381
  public Stream<Object> openStream(Path path, Charset charset) {
382 2 1. openStream : removed call to java/util/Objects::requireNonNull → KILLED
2. openStream : replaced call to java/util/Objects::requireNonNull with argument → KILLED
    Objects.requireNonNull(path, "path must not be null");
383 2 1. openStream : removed call to java/util/Objects::requireNonNull → SURVIVED
2. openStream : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
    Objects.requireNonNull(charset, "charset must not be null");
384
    try {
385 5 1. openStream : removed call to java/nio/file/Files::newInputStream → KILLED
2. openStream : removed call to java/io/InputStreamReader::<init> → KILLED
3. openStream : Substituted 0 with 1 → KILLED
4. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
5. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
      return openStream(new InputStreamReader(Files.newInputStream(path), charset));
386
    } catch (IOException e) {
387 5 1. openStream : replaced call to java/lang/String::format with argument → SURVIVED
2. openStream : removed call to java/lang/String::format → SURVIVED
3. openStream : Substituted 0 with 1 → KILLED
4. openStream : Substituted 1 with 0 → KILLED
5. openStream : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED
      throw new FixedFormatIOException(format("Cannot open path: %s", path), e);
388
    }
389
  }
390
391
  /**
392
   * Returns a lazy {@link Stream} of parsed records of type {@code clazz} from {@code reader}.
393
   *
394
   * <p>Lines that produce a record of a different type are silently filtered out.
395
   * The caller must close the returned stream (via {@code try}-with-resources).</p>
396
   *
397
   * @param <T>    the record type
398
   * @param reader the source of lines; closed when the returned stream is closed
399
   * @param clazz  the type to retain; records of other types are discarded
400
   * @return a lazy, ordered, non-null stream of {@code T} records
401
   * @throws NullPointerException if {@code reader} or {@code clazz} is {@code null}
402
   */
403
  @SuppressWarnings("unchecked")
404
  public <T> Stream<T> openStream(Reader reader, Class<T> clazz) {
405 2 1. openStream : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. openStream : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(clazz, "clazz must not be null");
406 7 1. openStream : replaced call to java/util/stream/Stream::map with receiver → SURVIVED
2. openStream : removed call to java/util/stream/Stream::filter → KILLED
3. openStream : replaced call to java/util/stream/Stream::filter with receiver → KILLED
4. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
5. openStream : removed call to java/util/stream/Stream::map → KILLED
6. lambda$openStream$5 : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$5 → KILLED
7. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
    return openStream(reader).filter(clazz::isInstance).map(r -> (T) r);
407
  }
408
409
  /**
410
   * Returns a lazy {@link Stream} of parsed records of type {@code clazz} from {@code inputStream}
411
   * using UTF-8 encoding.
412
   *
413
   * @param <T>         the record type
414
   * @param inputStream the source stream; closed when the returned stream is closed
415
   * @param clazz       the type to retain; records of other types are discarded
416
   * @return a lazy, ordered, non-null stream of {@code T} records
417
   * @throws NullPointerException if {@code inputStream} or {@code clazz} is {@code null}
418
   */
419
  @SuppressWarnings("unchecked")
420
  public <T> Stream<T> openStream(InputStream inputStream, Class<T> clazz) {
421 2 1. openStream : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
2. openStream : removed call to java/util/Objects::requireNonNull → SURVIVED
    Objects.requireNonNull(clazz, "clazz must not be null");
422 7 1. lambda$openStream$6 : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$6 → SURVIVED
2. openStream : replaced call to java/util/stream/Stream::map with receiver → SURVIVED
3. openStream : removed call to java/util/stream/Stream::filter → KILLED
4. openStream : replaced call to java/util/stream/Stream::filter with receiver → KILLED
5. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
6. openStream : removed call to java/util/stream/Stream::map → KILLED
7. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
    return openStream(inputStream).filter(clazz::isInstance).map(r -> (T) r);
423
  }
424
425
  /**
426
   * Returns a lazy {@link Stream} of parsed records of type {@code clazz} from {@code path}
427
   * using UTF-8 encoding.
428
   *
429
   * @param <T>   the record type
430
   * @param path  the path to read
431
   * @param clazz the type to retain; records of other types are discarded
432
   * @return a lazy, ordered, non-null stream of {@code T} records
433
   * @throws NullPointerException   if {@code path} or {@code clazz} is {@code null}
434
   * @throws FixedFormatIOException if the path cannot be opened
435
   */
436
  @SuppressWarnings("unchecked")
437
  public <T> Stream<T> openStream(Path path, Class<T> clazz) {
438 2 1. openStream : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
2. openStream : removed call to java/util/Objects::requireNonNull → SURVIVED
    Objects.requireNonNull(clazz, "clazz must not be null");
439 7 1. lambda$openStream$7 : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$7 → SURVIVED
2. openStream : replaced call to java/util/stream/Stream::map with receiver → SURVIVED
3. openStream : replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
4. openStream : removed call to java/util/stream/Stream::filter → KILLED
5. openStream : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED
6. openStream : removed call to java/util/stream/Stream::map → KILLED
7. openStream : replaced call to java/util/stream/Stream::filter with receiver → KILLED
    return openStream(path).filter(clazz::isInstance).map(r -> (T) r);
440
  }
441
442
  // --- factory ---
443
444
  /**
445
   * Returns a new builder for constructing a {@link FixedFormatReader}.
446
   *
447
   * @return a fresh builder instance
448
   */
449
  public static FixedFormatReaderBuilder builder() {
450 2 1. builder : removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReaderBuilder::<init> → KILLED
2. builder : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::builder → KILLED
    return new FixedFormatReaderBuilder();
451
  }
452
453
  private static BufferedReader toBuffered(Reader reader) {
454 5 1. toBuffered : negated conditional → KILLED
2. toBuffered : removed conditional - replaced equality check with false → KILLED
3. toBuffered : removed conditional - replaced equality check with true → KILLED
4. toBuffered : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::toBuffered → KILLED
5. toBuffered : removed call to java/io/BufferedReader::<init> → KILLED
    return reader instanceof BufferedReader ? (BufferedReader) reader : new BufferedReader(reader);
455
  }
456
457
  private static <R> R withReader(InputStream inputStream, Charset charset, Function<Reader, R> body) {
458 2 1. withReader : removed call to java/util/Objects::requireNonNull → KILLED
2. withReader : replaced call to java/util/Objects::requireNonNull with argument → KILLED
    Objects.requireNonNull(inputStream, "inputStream must not be null");
459 2 1. withReader : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
2. withReader : removed call to java/util/Objects::requireNonNull → SURVIVED
    Objects.requireNonNull(charset, "charset must not be null");
460 1 1. withReader : removed call to java/io/InputStreamReader::<init> → KILLED
    try (InputStreamReader r = new InputStreamReader(inputStream, charset)) {
461 3 1. withReader : removed call to java/util/function/Function::apply → KILLED
2. withReader : replaced call to java/util/function/Function::apply with argument → KILLED
3. withReader : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
      return body.apply(r);
462
    } catch (IOException e) {
463 1 1. withReader : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → NO_COVERAGE
      throw new FixedFormatIOException("IO error reading input stream", e);
464
    }
465
  }
466
467
  private static <R> R withReader(Path path, Charset charset, Function<Reader, R> body) {
468 2 1. withReader : replaced call to java/util/Objects::requireNonNull with argument → KILLED
2. withReader : removed call to java/util/Objects::requireNonNull → KILLED
    Objects.requireNonNull(path, "path must not be null");
469 2 1. withReader : replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
2. withReader : removed call to java/util/Objects::requireNonNull → SURVIVED
    Objects.requireNonNull(charset, "charset must not be null");
470 3 1. withReader : Substituted 0 with 1 → KILLED
2. withReader : removed call to java/io/InputStreamReader::<init> → KILLED
3. withReader : removed call to java/nio/file/Files::newInputStream → KILLED
    try (InputStreamReader r = new InputStreamReader(Files.newInputStream(path), charset)) {
471 3 1. withReader : replaced call to java/util/function/Function::apply with argument → KILLED
2. withReader : removed call to java/util/function/Function::apply → KILLED
3. withReader : replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED
      return body.apply(r);
472
    } catch (IOException e) {
473 5 1. withReader : Substituted 0 with 1 → KILLED
2. withReader : removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED
3. withReader : removed call to java/lang/String::format → KILLED
4. withReader : Substituted 1 with 0 → KILLED
5. withReader : replaced call to java/lang/String::format with argument → KILLED
      throw new FixedFormatIOException(format("Cannot open path: %s", path), e);
474
    }
475
  }
476
}

Mutations

96

1.1
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 mappings → KILLED

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

98

1.1
Location : <init>
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/FixedFormatLineProcessor::<init> → 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 processor → KILLED

3.3
Location : <init>
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/FixedFormatReaderBuilder::buildIndex → KILLED

130

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readNullReader_npeMessageNamesParameter()]
removed call to java/util/Objects::requireNonNull → KILLED

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readNullReader_npeMessageNamesParameter()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

133

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
removed call to java/util/LinkedHashMap::<init> → KILLED

135

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

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaCanRethrowToAbortProcessing()]
removed call to com/ancientprogramming/fixedformat4j/io/read/RecordMapping::getRecordClass → KILLED

3.3
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaCanRethrowToAbortProcessing()]
replaced call to java/util/Map::put with argument → KILLED

4.4
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaCanRethrowToAbortProcessing()]
removed call to java/util/Map::put → KILLED

137

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

138

1.1
Location : read
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/FixedFormatReader::readWithMappingCallback → KILLED

139

1.1
Location : lambda$read$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaCanRethrowToAbortProcessing()]
removed call to java/util/Map::get → KILLED

2.2
Location : lambda$read$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaCanRethrowToAbortProcessing()]
replaced call to java/util/Map::get with argument → KILLED

3.3
Location : lambda$read$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOutputShapes.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOutputShapes]/[method:readGetReturnsTypedRecordsInOrder()]
removed call to java/util/List::add → KILLED

140

1.1
Location : lambda$read$0
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:customLambdaStrategyDoesNotEmitRecordForFailedLine()]
removed call to java/util/List::add → KILLED

142

1.1
Location : lambda$read$1
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:readResultExcludesClassesWithNoMatches()]
replaced boolean return with false for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$read$1 → KILLED

2.2
Location : lambda$read$1
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:readResultExcludesClassesWithNoMatches()]
removed call to java/util/List::isEmpty → KILLED

3.3
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:readResultExcludesClassesWithNoMatches()]
removed call to java/util/Set::removeIf → KILLED

4.4
Location : lambda$read$1
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOutputShapes.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOutputShapes]/[method:readGetReturnsTypedRecordsInOrder()]
replaced boolean return with true for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$read$1 → KILLED

5.5
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:skipAndLogSkipsBadLineAndContinuesParsing()]
removed call to java/util/Map::entrySet → KILLED

6.6
Location : lambda$read$1
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderParseError]/[method:skipAndLogSkipsBadLineAndContinuesParsing()]
removed call to java/util/Map$Entry::getValue → KILLED

143

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

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

155

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

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:throwsNullPointerWhenInputStreamIsNull()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED

168

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:throwsNullPointerWhenInputStreamIsNull()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromInputStreamWithExplicitCharset()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED

180

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

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readNullPath_npeMessageNamesParameter()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED

193

1.1
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:throwsNullPointerWhenPathCharsetIsNull()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

2.2
Location : read
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromPath()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::read → KILLED

198

1.1
Location : readWithMappingCallback
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/FixedFormatReader::toBuffered → KILLED

199

1.1
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderUnmatched.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderUnmatched]/[method:throwsOnUnmatchedLineWhenStrategyIsThrowException()]
Substituted 0 with 1 → KILLED

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

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

202

1.1
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
removed call to java/io/BufferedReader::readLine → KILLED

2.2
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:multiMatchThrowOnAmbiguityThrowsWhenTwoPatternsMatch()]
negated conditional → KILLED

4.4
Location : readWithMappingCallback
Killed by : none
removed conditional - replaced equality check with true → TIMED_OUT

203

1.1
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderUnmatched.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderUnmatched]/[method:throwsOnUnmatchedLineWhenStrategyIsThrowException()]
Substituted 1 with 2 → KILLED

2.2
Location : readWithMappingCallback
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/FixedFormatLineProcessor::processLine → KILLED

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

4.4
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestStrategiesAndHandlers]/[method:parseErrorCustomLambdaInvokesHandlerAndDoesNotEmitRecord()]
Replaced long addition with subtraction → KILLED

206

1.1
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
Substituted 0 with 1 → KILLED

2.2
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED

3.3
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
Replaced long addition with subtraction → KILLED

4.4
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
replaced call to java/lang/String::format with argument → KILLED

5.5
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
removed call to java/lang/String::format → KILLED

6.6
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
Substituted 1 with 0 → KILLED

7.7
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
Substituted 1 with 2 → KILLED

8.8
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
Substituted 0 with 1 → KILLED

9.9
Location : readWithMappingCallback
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
removed call to java/lang/Long::valueOf → KILLED

236

1.1
Location : process
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED
Covering tests

2.2
Location : process
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED Covering tests

237

1.1
Location : process
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED
Covering tests

2.2
Location : process
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED Covering tests

238

1.1
Location : process
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:processWorksWithInputStreamAndCharset()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::readWithMappingCallback → KILLED

250

1.1
Location : process
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:throwsNullPointerWhenInputStreamIsNullOnProcess()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED

263

1.1
Location : process
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED
Covering tests

2.2
Location : process
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED Covering tests

264

1.1
Location : process
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:throwsNullPointerWhenCharsetIsNullOnProcess()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

2.2
Location : lambda$process$2
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:processWorksWithInputStreamAndCharset()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED

276

1.1
Location : process
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:throwsNullPointerWhenRegistryIsNullForPathNoCharset(java.nio.file.Path)]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED

289

1.1
Location : process
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED
Covering tests

2.2
Location : process
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED Covering tests

290

1.1
Location : process
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:processWorksWithPath()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

2.2
Location : lambda$process$3
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderProcess]/[method:processWorksWithPath()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::process → KILLED

311

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullReader_throwsNpe()]
removed call to java/util/Objects::requireNonNull → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullReader_throwsNpe()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

312

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::toBuffered → KILLED

313

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed call to java/util/stream/StreamSupport::stream → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_parseErrorSkipAndLog_streamContinuesAfterErrorLine()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

3.3
Location : openStream
Killed by : none
Substituted 0 with 1 → SURVIVED
Covering tests

4.4
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatSpliterator::<init> → KILLED

314

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed call to java/util/stream/Stream::onClose → KILLED

316

1.1
Location : lambda$openStream$4
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_earlyTermination_closesUnderlyingInputStream()]
removed call to java/io/BufferedReader::close → KILLED

318

1.1
Location : lambda$openStream$4
Killed by : none
removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → NO_COVERAGE

334

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullInputStream_throwsNpe()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_utf8Default()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

349

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullInputStream_throwsNpe()]
removed call to java/util/Objects::requireNonNull → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullInputStream_throwsNpe()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

350

1.1
Location : openStream
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
Covering tests

2.2
Location : openStream
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED Covering tests

351

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_utf8Default()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_utf8Default()]
removed call to java/io/InputStreamReader::<init> → KILLED

3.3
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_inputStream_utf8Default()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

366

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullPath_throwsNpe()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_path_utf8Default()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

382

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullPath_throwsNpe()]
removed call to java/util/Objects::requireNonNull → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nullPath_throwsNpe()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

383

1.1
Location : openStream
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED
Covering tests

2.2
Location : openStream
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED Covering tests

385

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nonExistentPath_throwsFixedFormatIOException()]
removed call to java/nio/file/Files::newInputStream → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_path_utf8Default()]
removed call to java/io/InputStreamReader::<init> → KILLED

3.3
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nonExistentPath_throwsFixedFormatIOException()]
Substituted 0 with 1 → KILLED

4.4
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_path_utf8Default()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

5.5
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_path_utf8Default()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

387

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nonExistentPath_throwsFixedFormatIOException()]
Substituted 0 with 1 → KILLED

2.2
Location : openStream
Killed by : none
replaced call to java/lang/String::format with argument → SURVIVED
Covering tests

3.3
Location : openStream
Killed by : none
removed call to java/lang/String::format → SURVIVED Covering tests

4.4
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nonExistentPath_throwsFixedFormatIOException()]
Substituted 1 with 0 → KILLED

5.5
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_nonExistentPath_throwsFixedFormatIOException()]
removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED

405

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

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

406

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_singleType_returnsTypedStreamWithoutCast()]
removed call to java/util/stream/Stream::filter → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_noRecordsMatchType_returnsEmptyStream()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

3.3
Location : openStream
Killed by : none
replaced call to java/util/stream/Stream::map with receiver → SURVIVED
Covering tests

4.4
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_singleType_returnsTypedStreamWithoutCast()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

5.5
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_singleType_returnsTypedStreamWithoutCast()]
removed call to java/util/stream/Stream::map → KILLED

6.6
Location : lambda$openStream$5
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_singleType_returnsTypedStreamWithoutCast()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$5 → KILLED

7.7
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedReader_singleType_returnsTypedStreamWithoutCast()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

421

1.1
Location : openStream
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
Covering tests

2.2
Location : openStream
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED Covering tests

422

1.1
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedInputStream_multiType_filtersToRequestedType()]
removed call to java/util/stream/Stream::filter → KILLED

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedInputStream_multiType_filtersToRequestedType()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

3.3
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedInputStream_multiType_filtersToRequestedType()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

4.4
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedInputStream_multiType_filtersToRequestedType()]
removed call to java/util/stream/Stream::map → KILLED

5.5
Location : lambda$openStream$6
Killed by : none
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$6 → SURVIVED
Covering tests

6.6
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedInputStream_multiType_filtersToRequestedType()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

7.7
Location : openStream
Killed by : none
replaced call to java/util/stream/Stream::map with receiver → SURVIVED Covering tests

438

1.1
Location : openStream
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
Covering tests

2.2
Location : openStream
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED Covering tests

439

1.1
Location : lambda$openStream$7
Killed by : none
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::lambda$openStream$7 → SURVIVED
Covering tests

2.2
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedPath_multiType_filtersToRequestedType()]
replaced return value with Stream.empty for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

3.3
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedPath_multiType_filtersToRequestedType()]
removed call to java/util/stream/Stream::filter → KILLED

4.4
Location : openStream
Killed by : none
replaced call to java/util/stream/Stream::map with receiver → SURVIVED Covering tests

5.5
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedPath_multiType_filtersToRequestedType()]
removed call to com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::openStream → KILLED

6.6
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedPath_multiType_filtersToRequestedType()]
removed call to java/util/stream/Stream::map → KILLED

7.7
Location : openStream
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_typedPath_multiType_filtersToRequestedType()]
replaced call to java/util/stream/Stream::filter with receiver → KILLED

450

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

2.2
Location : builder
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderBuilder]/[method:throwsWhenNoMappings()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::builder → KILLED

454

1.1
Location : toBuffered
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
negated conditional → KILLED

2.2
Location : toBuffered
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:ioErrorMidReadMessageContainsCorrectLineNumber()]
removed conditional - replaced equality check with false → KILLED

3.3
Location : toBuffered
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed conditional - replaced equality check with true → KILLED

4.4
Location : toBuffered
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::toBuffered → KILLED

5.5
Location : toBuffered
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderOpenStream]/[method:openStream_reader_emptyInput_returnsEmptyStream()]
removed call to java/io/BufferedReader::<init> → KILLED

458

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readNullInputStream_npeMessageNamesParameter()]
removed call to java/util/Objects::requireNonNull → KILLED

2.2
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readNullInputStream_npeMessageNamesParameter()]
replaced call to java/util/Objects::requireNonNull with argument → KILLED

459

1.1
Location : withReader
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
Covering tests

2.2
Location : withReader
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED Covering tests

460

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:inputStreamIsClosedAfterReadAsResult()]
removed call to java/io/InputStreamReader::<init> → KILLED

461

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromInputStreamWithExplicitCharset()]
removed call to java/util/function/Function::apply → KILLED

2.2
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:inputStreamIsClosedAfterReadAsResult()]
replaced call to java/util/function/Function::apply with argument → KILLED

3.3
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromInputStreamWithExplicitCharset()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

463

1.1
Location : withReader
Killed by : none
removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → NO_COVERAGE

468

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

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

469

1.1
Location : withReader
Killed by : none
replaced call to java/util/Objects::requireNonNull with argument → SURVIVED
Covering tests

2.2
Location : withReader
Killed by : none
removed call to java/util/Objects::requireNonNull → SURVIVED Covering tests

470

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
Substituted 0 with 1 → KILLED

2.2
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromPath()]
removed call to java/io/InputStreamReader::<init> → KILLED

3.3
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
removed call to java/nio/file/Files::newInputStream → KILLED

471

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromPath()]
replaced call to java/util/function/Function::apply with argument → KILLED

2.2
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromPath()]
removed call to java/util/function/Function::apply → KILLED

3.3
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:readsFromPath()]
replaced return value with null for com/ancientprogramming/fixedformat4j/io/read/FixedFormatReader::withReader → KILLED

473

1.1
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
Substituted 0 with 1 → KILLED

2.2
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
removed call to com/ancientprogramming/fixedformat4j/exception/FixedFormatIOException::<init> → KILLED

3.3
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
removed call to java/lang/String::format → KILLED

4.4
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
Substituted 1 with 0 → KILLED

5.5
Location : withReader
Killed by : com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources.[engine:junit-jupiter]/[class:com.ancientprogramming.fixedformat4j.io.TestFixedFormatReaderInputSources]/[method:nonExistentPathThrowsWithPathInMessage()]
replaced call to java/lang/String::format with argument → KILLED

Active mutators

Tests examined


Report generated by PIT 1.23.1 support