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

Mutations

173

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

182

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

207

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

226

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

246

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

265

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

283

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

301

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

317

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

323

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

325

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

329

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

331

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

343

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

357

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

372

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

385

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

399

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

413

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

426

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

429

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