StemmerPatchTrieLoader.java

1
/*******************************************************************************
2
 * Copyright (C) 2026, Leo Galambos
3
 * All rights reserved.
4
 * 
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are met:
7
 * 
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 
11
 * 2. Redistributions in binary form must reproduce the above copyright notice,
12
 *    this list of conditions and the following disclaimer in the documentation
13
 *    and/or other materials provided with the distribution.
14
 * 
15
 * 3. Neither the name of the copyright holder nor the names of its contributors
16
 *    may be used to endorse or promote products derived from this software
17
 *    without specific prior written permission.
18
 * 
19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
 * POSSIBILITY OF SUCH DAMAGE.
30
 ******************************************************************************/
31
package org.egothor.stemmer;
32
33
import java.io.BufferedReader;
34
import java.io.IOException;
35
import java.io.InputStream;
36
import java.io.InputStreamReader;
37
import java.nio.charset.StandardCharsets;
38
import java.nio.file.Files;
39
import java.nio.file.Path;
40
import java.util.Objects;
41
import java.util.logging.Level;
42
import java.util.logging.Logger;
43
44
/**
45
 * Loader of patch-command tries from bundled stemmer dictionaries.
46
 *
47
 * <p>
48
 * Each dictionary is line-oriented. The first token on a line is interpreted as
49
 * the stem, and all following tokens are treated as known variants of that
50
 * stem.
51
 *
52
 * <p>
53
 * For each line, the loader inserts:
54
 * <ul>
55
 * <li>the stem itself mapped to the canonical no-op patch command
56
 * {@link PatchCommandEncoder#NOOP_PATCH}, when requested by the caller</li>
57
 * <li>every distinct variant mapped to the patch command transforming that
58
 * variant to the stem</li>
59
 * </ul>
60
 *
61
 * <p>
62
 * Parsing is delegated to {@link StemmerDictionaryParser}, which also supports
63
 * line remarks introduced by {@code #} or {@code //}.
64
 */
65
public final class StemmerPatchTrieLoader {
66
67
    /**
68
     * Logger of this class.
69
     */
70
    private static final Logger LOGGER = Logger.getLogger(StemmerPatchTrieLoader.class.getName());
71
72
    /**
73
     * Canonical no-op patch command used when the source and target are equal.
74
     */
75
    private static final String NOOP_PATCH_COMMAND = PatchCommandEncoder.NOOP_PATCH;
76
77
    /**
78
     * Utility class.
79
     */
80
    private StemmerPatchTrieLoader() {
81
        throw new AssertionError("No instances.");
82
    }
83
84
    /**
85
     * Supported bundled stemmer dictionaries.
86
     */
87
    public enum Language {
88
89
        /**
90
         * Danish.
91
         */
92
        DA_DK("da_dk"),
93
94
        /**
95
         * German.
96
         */
97
        DE_DE("de_de"),
98
99
        /**
100
         * Spanish.
101
         */
102
        ES_ES("es_es"),
103
104
        /**
105
         * French.
106
         */
107
        FR_FR("fr_fr"),
108
109
        /**
110
         * Italian.
111
         */
112
        IT_IT("it_it"),
113
114
        /**
115
         * Dutch.
116
         */
117
        NL_NL("nl_nl"),
118
119
        /**
120
         * Norwegian.
121
         */
122
        NO_NO("no_no"),
123
124
        /**
125
         * Portuguese.
126
         */
127
        PT_PT("pt_pt"),
128
129
        /**
130
         * Russian.
131
         */
132
        RU_RU("ru_ru"),
133
134
        /**
135
         * Swedish.
136
         */
137
        SV_SE("sv_se"),
138
139
        /**
140
         * English.
141
         */
142
        US_UK("us_uk"),
143
144
        /**
145
         * English professional dictionary.
146
         */
147
        US_UK_PROFI("us_uk.profi");
148
149
        /**
150
         * Resource directory name.
151
         */
152
        private final String resourceDirectory;
153
154
        /**
155
         * Creates a language constant.
156
         *
157
         * @param resourceDirectory resource directory name
158
         */
159
        Language(final String resourceDirectory) {
160
            this.resourceDirectory = resourceDirectory;
161
        }
162
163
        /**
164
         * Returns the classpath resource path of the stemmer dictionary.
165
         *
166
         * @return classpath resource path
167
         */
168
        public String resourcePath() {
169 1 1. resourcePath : replaced return value with "" for org/egothor/stemmer/StemmerPatchTrieLoader$Language::resourcePath → SURVIVED
            return this.resourceDirectory + "/stemmer";
170
        }
171
172
        /**
173
         * Returns the resource directory name.
174
         *
175
         * @return resource directory name
176
         */
177
        public String resourceDirectory() {
178 1 1. resourceDirectory : replaced return value with "" for org/egothor/stemmer/StemmerPatchTrieLoader$Language::resourceDirectory → NO_COVERAGE
            return this.resourceDirectory;
179
        }
180
    }
181
182
    /**
183
     * Loads a bundled dictionary using explicit reduction settings.
184
     *
185
     * @param language          bundled language dictionary
186
     * @param storeOriginal     whether the stem itself should be inserted using the
187
     *                          canonical no-op patch command
188
     * @param reductionSettings reduction settings
189
     * @return compiled patch-command trie
190
     * @throws NullPointerException if any argument is {@code null}
191
     * @throws IOException          if the dictionary cannot be found or read
192
     */
193
    public static FrequencyTrie<String> load(final Language language, final boolean storeOriginal,
194
            final ReductionSettings reductionSettings) throws IOException {
195
        Objects.requireNonNull(language, "language");
196
        Objects.requireNonNull(reductionSettings, "reductionSettings");
197
198
        final String resourcePath = language.resourcePath();
199
200
        try (InputStream inputStream = openBundledResource(resourcePath);
201
                BufferedReader reader = new BufferedReader(
202
                        new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
203 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
            return load(reader, resourcePath, storeOriginal, reductionSettings);
204
        }
205
    }
206
207
    /**
208
     * Loads a bundled dictionary using default settings for the supplied reduction
209
     * mode.
210
     *
211
     * @param language      bundled language dictionary
212
     * @param storeOriginal whether the stem itself should be inserted using the
213
     *                      canonical no-op patch command
214
     * @param reductionMode reduction mode
215
     * @return compiled patch-command trie
216
     * @throws NullPointerException if any argument is {@code null}
217
     * @throws IOException          if the dictionary cannot be found or read
218
     */
219
    public static FrequencyTrie<String> load(final Language language, final boolean storeOriginal,
220
            final ReductionMode reductionMode) throws IOException {
221
        Objects.requireNonNull(reductionMode, "reductionMode");
222 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
        return load(language, storeOriginal, ReductionSettings.withDefaults(reductionMode));
223
    }
224
225
    /**
226
     * Loads a dictionary from a filesystem path using explicit reduction settings.
227
     *
228
     * @param path              path to the dictionary file
229
     * @param storeOriginal     whether the stem itself should be inserted using the
230
     *                          canonical no-op patch command
231
     * @param reductionSettings reduction settings
232
     * @return compiled patch-command trie
233
     * @throws NullPointerException if any argument is {@code null}
234
     * @throws IOException          if the file cannot be opened or read
235
     */
236
    public static FrequencyTrie<String> load(final Path path, final boolean storeOriginal,
237
            final ReductionSettings reductionSettings) throws IOException {
238
        Objects.requireNonNull(path, "path");
239
        Objects.requireNonNull(reductionSettings, "reductionSettings");
240
241
        try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
242 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
            return load(reader, path.toAbsolutePath().toString(), storeOriginal, reductionSettings);
243
        }
244
    }
245
246
    /**
247
     * Loads a dictionary from a filesystem path using default settings for the
248
     * supplied reduction mode.
249
     *
250
     * @param path          path to the dictionary file
251
     * @param storeOriginal whether the stem itself should be inserted using the
252
     *                      canonical no-op patch command
253
     * @param reductionMode reduction mode
254
     * @return compiled patch-command trie
255
     * @throws NullPointerException if any argument is {@code null}
256
     * @throws IOException          if the file cannot be opened or read
257
     */
258
    public static FrequencyTrie<String> load(final Path path, final boolean storeOriginal,
259
            final ReductionMode reductionMode) throws IOException {
260
        Objects.requireNonNull(reductionMode, "reductionMode");
261 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
        return load(path, storeOriginal, ReductionSettings.withDefaults(reductionMode));
262
    }
263
264
    /**
265
     * Loads a dictionary from a filesystem path string using explicit reduction
266
     * settings.
267
     *
268
     * @param fileName          file name or path string
269
     * @param storeOriginal     whether the stem itself should be inserted using the
270
     *                          canonical no-op patch command
271
     * @param reductionSettings reduction settings
272
     * @return compiled patch-command trie
273
     * @throws NullPointerException if any argument is {@code null}
274
     * @throws IOException          if the file cannot be opened or read
275
     */
276
    public static FrequencyTrie<String> load(final String fileName, final boolean storeOriginal,
277
            final ReductionSettings reductionSettings) throws IOException {
278
        Objects.requireNonNull(fileName, "fileName");
279 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
        return load(Path.of(fileName), storeOriginal, reductionSettings);
280
    }
281
282
    /**
283
     * Loads a dictionary from a filesystem path string using default settings for
284
     * the supplied reduction mode.
285
     *
286
     * @param fileName      file name or path string
287
     * @param storeOriginal whether the stem itself should be inserted using the
288
     *                      canonical no-op patch command
289
     * @param reductionMode reduction mode
290
     * @return compiled patch-command trie
291
     * @throws NullPointerException if any argument is {@code null}
292
     * @throws IOException          if the file cannot be opened or read
293
     */
294
    public static FrequencyTrie<String> load(final String fileName, final boolean storeOriginal,
295
            final ReductionMode reductionMode) throws IOException {
296
        Objects.requireNonNull(fileName, "fileName");
297 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
        return load(Path.of(fileName), storeOriginal, reductionMode);
298
    }
299
300
    /**
301
     * Parses one dictionary and builds the compiled trie.
302
     *
303
     * @param reader            dictionary reader
304
     * @param sourceDescription logical source description used for diagnostics
305
     * @param storeOriginal     whether the stem itself should be inserted using the
306
     *                          canonical no-op patch command
307
     * @param reductionSettings reduction settings
308
     * @return compiled patch-command trie
309
     * @throws IOException if parsing fails
310
     */
311
    private static FrequencyTrie<String> load(final BufferedReader reader, final String sourceDescription,
312
            final boolean storeOriginal, final ReductionSettings reductionSettings) throws IOException {
313 1 1. lambda$load$0 : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::lambda$load$0 → KILLED
        final FrequencyTrie.Builder<String> builder = new FrequencyTrie.Builder<>(String[]::new, reductionSettings);
314
        final PatchCommandEncoder patchCommandEncoder = new PatchCommandEncoder();
315
        final int[] insertedMappings = new int[1];
316
317
        final StemmerDictionaryParser.ParseStatistics statistics = StemmerDictionaryParser.parse(reader,
318
                sourceDescription, (stem, variants, lineNumber) -> {
319 1 1. lambda$load$1 : negated conditional → KILLED
                    if (storeOriginal) {
320
                        builder.put(stem, NOOP_PATCH_COMMAND);
321 1 1. lambda$load$1 : Replaced integer addition with subtraction → SURVIVED
                        insertedMappings[0]++;
322
                    }
323
324
                    for (String variant : variants) {
325 1 1. lambda$load$1 : negated conditional → KILLED
                        if (!variant.equals(stem)) {
326
                            builder.put(variant, patchCommandEncoder.encode(variant, stem));
327 1 1. lambda$load$1 : Replaced integer addition with subtraction → SURVIVED
                            insertedMappings[0]++;
328
                        }
329
                    }
330
                });
331
332
        if (LOGGER.isLoggable(Level.FINE)) {
333
            LOGGER.log(Level.FINE,
334
                    "Loaded stemmer dictionary from {0}; insertedMappings={1}, lines={2}, entries={3}, ignoredLines={4}.",
335
                    new Object[] { sourceDescription, insertedMappings[0], statistics.lineCount(),
336
                            statistics.entryCount(), statistics.ignoredLineCount() });
337
        }
338
339 1 1. load : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED
        return builder.build();
340
    }
341
342
    /**
343
     * Loads a GZip-compressed binary patch-command trie from a filesystem path.
344
     *
345
     * @param path path to the compressed binary trie file
346
     * @return compiled patch-command trie
347
     * @throws NullPointerException if {@code path} is {@code null}
348
     * @throws IOException          if the file cannot be opened, decompressed, or
349
     *                              read
350
     */
351
    public static FrequencyTrie<String> loadBinary(final Path path) throws IOException {
352
        Objects.requireNonNull(path, "path");
353 1 1. loadBinary : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED
        return StemmerPatchTrieBinaryIO.read(path);
354
    }
355
356
    /**
357
     * Loads a GZip-compressed binary patch-command trie from a filesystem path
358
     * string.
359
     *
360
     * @param fileName file name or path string
361
     * @return compiled patch-command trie
362
     * @throws NullPointerException if {@code fileName} is {@code null}
363
     * @throws IOException          if the file cannot be opened, decompressed, or
364
     *                              read
365
     */
366
    public static FrequencyTrie<String> loadBinary(final String fileName) throws IOException {
367
        Objects.requireNonNull(fileName, "fileName");
368 1 1. loadBinary : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED
        return StemmerPatchTrieBinaryIO.read(fileName);
369
    }
370
371
    /**
372
     * Loads a GZip-compressed binary patch-command trie from an input stream.
373
     *
374
     * @param inputStream source input stream
375
     * @return compiled patch-command trie
376
     * @throws NullPointerException if {@code inputStream} is {@code null}
377
     * @throws IOException          if the stream cannot be decompressed or read
378
     */
379
    public static FrequencyTrie<String> loadBinary(final InputStream inputStream) throws IOException {
380
        Objects.requireNonNull(inputStream, "inputStream");
381 1 1. loadBinary : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED
        return StemmerPatchTrieBinaryIO.read(inputStream);
382
    }
383
384
    /**
385
     * Saves a compiled patch-command trie as a GZip-compressed binary file.
386
     *
387
     * @param trie compiled trie
388
     * @param path target file
389
     * @throws NullPointerException if any argument is {@code null}
390
     * @throws IOException          if writing fails
391
     */
392
    public static void saveBinary(final FrequencyTrie<String> trie, final Path path) throws IOException {
393
        Objects.requireNonNull(trie, "trie");
394
        Objects.requireNonNull(path, "path");
395 1 1. saveBinary : removed call to org/egothor/stemmer/StemmerPatchTrieBinaryIO::write → KILLED
        StemmerPatchTrieBinaryIO.write(trie, path);
396
    }
397
398
    /**
399
     * Saves a compiled patch-command trie as a GZip-compressed binary file.
400
     *
401
     * @param trie     compiled trie
402
     * @param fileName target file name or path string
403
     * @throws NullPointerException if any argument is {@code null}
404
     * @throws IOException          if writing fails
405
     */
406
    public static void saveBinary(final FrequencyTrie<String> trie, final String fileName) throws IOException {
407
        Objects.requireNonNull(trie, "trie");
408
        Objects.requireNonNull(fileName, "fileName");
409 1 1. saveBinary : removed call to org/egothor/stemmer/StemmerPatchTrieBinaryIO::write → NO_COVERAGE
        StemmerPatchTrieBinaryIO.write(trie, fileName);
410
    }
411
412
    /**
413
     * Opens a bundled resource from the classpath.
414
     *
415
     * @param resourcePath classpath resource path
416
     * @return opened input stream
417
     * @throws IOException if the resource cannot be found
418
     */
419
    private static InputStream openBundledResource(final String resourcePath) throws IOException {
420
        final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
421
        final InputStream inputStream = classLoader.getResourceAsStream(resourcePath);
422 1 1. openBundledResource : negated conditional → KILLED
        if (inputStream == null) {
423
            throw new IOException("Stemmer resource not found: " + resourcePath);
424
        }
425 1 1. openBundledResource : replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::openBundledResource → KILLED
        return inputStream;
426
    }
427
}

Mutations

169

1.1
Location : resourcePath
Killed by : none
replaced return value with "" for org/egothor/stemmer/StemmerPatchTrieLoader$Language::resourcePath → SURVIVED
Covering tests

178

1.1
Location : resourceDirectory
Killed by : none
replaced return value with "" for org/egothor/stemmer/StemmerPatchTrieLoader$Language::resourceDirectory → NO_COVERAGE

203

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:BundledDictionaryTests]/[test-template:shouldPreserveAllStemCandidatesForBundledDictionaries(java.lang.String, org.egothor.stemmer.StemmerPatchTrieLoader$Language, org.egothor.stemmer.ReductionMode)]/[test-template-invocation:#16]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

222

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:BundledDictionaryTests]/[test-template:shouldPreserveAllStemCandidatesForBundledDictionaries(java.lang.String, org.egothor.stemmer.StemmerPatchTrieLoader$Language, org.egothor.stemmer.ReductionMode)]/[test-template-invocation:#16]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

242

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldStoreOriginalStemWhenRequested()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

261

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldStoreOriginalStemWhenRequested()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

279

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldLoadEquivalentTrieFromPathAndStringOverloads()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

297

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldLoadEquivalentTrieFromPathAndStringOverloads()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

313

1.1
Location : lambda$load$0
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldStoreOriginalStemWhenRequested()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::lambda$load$0 → KILLED

319

1.1
Location : lambda$load$1
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldStoreOriginalStemWhenRequested()]
negated conditional → KILLED

321

1.1
Location : lambda$load$1
Killed by : none
Replaced integer addition with subtraction → SURVIVED
Covering tests

325

1.1
Location : lambda$load$1
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldNotStoreOriginalStemWhenDisabled()]
negated conditional → KILLED

327

1.1
Location : lambda$load$1
Killed by : none
Replaced integer addition with subtraction → SURVIVED
Covering tests

339

1.1
Location : load
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldStoreOriginalStemWhenRequested()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::load → KILLED

353

1.1
Location : loadBinary
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldRoundTripBinaryTrieAcrossAllBinaryOverloads()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED

368

1.1
Location : loadBinary
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldRoundTripBinaryTrieAcrossAllBinaryOverloads()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED

381

1.1
Location : loadBinary
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldRoundTripBinaryTrieAcrossAllBinaryOverloads()]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::loadBinary → KILLED

395

1.1
Location : saveBinary
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:FilesystemAndParserTests]/[method:shouldRoundTripBinaryTrieAcrossAllBinaryOverloads()]
removed call to org/egothor/stemmer/StemmerPatchTrieBinaryIO::write → KILLED

409

1.1
Location : saveBinary
Killed by : none
removed call to org/egothor/stemmer/StemmerPatchTrieBinaryIO::write → NO_COVERAGE

422

1.1
Location : openBundledResource
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:BundledDictionaryTests]/[test-template:shouldPreserveAllStemCandidatesForBundledDictionaries(java.lang.String, org.egothor.stemmer.StemmerPatchTrieLoader$Language, org.egothor.stemmer.ReductionMode)]/[test-template-invocation:#16]
negated conditional → KILLED

425

1.1
Location : openBundledResource
Killed by : org.egothor.stemmer.StemmerPatchTrieLoaderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.StemmerPatchTrieLoaderTest]/[nested-class:BundledDictionaryTests]/[test-template:shouldPreserveAllStemCandidatesForBundledDictionaries(java.lang.String, org.egothor.stemmer.StemmerPatchTrieLoader$Language, org.egothor.stemmer.ReductionMode)]/[test-template-invocation:#16]
replaced return value with null for org/egothor/stemmer/StemmerPatchTrieLoader::openBundledResource → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1