PatchCommandEncoder.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.util.concurrent.locks.ReentrantLock;
34
35
/**
36
 * Encodes a compact patch command that transforms one word form into another
37
 * and applies such commands back to source words.
38
 *
39
 * <p>
40
 * The generated patch command follows the historical Egothor convention:
41
 * instructions are serialized so that they are applied from the end of the
42
 * source word toward its beginning. This keeps the command stream compact and
43
 * matches the behavior expected by existing stemming data.
44
 * </p>
45
 *
46
 * <p>
47
 * The encoder computes a minimum-cost edit script using weighted insert,
48
 * delete, replace, and match transitions. The resulting trace is then
49
 * serialized into the compact patch language.
50
 * </p>
51
 *
52
 * <p>
53
 * This class is stateful and reuses internal dynamic-programming matrices
54
 * across invocations to reduce allocation pressure during repeated use.
55
 * Instances are therefore not suitable for unsynchronized concurrent access.
56
 * The {@link #encode(String, String)} method is synchronized so that a shared
57
 * instance can still be used safely when needed.
58
 * </p>
59
 */
60
public final class PatchCommandEncoder {
61
62
    /**
63
     * Serialized opcode for deleting one or more characters.
64
     */
65
    private static final char DELETE_OPCODE = 'D';
66
67
    /**
68
     * Serialized opcode for inserting one character.
69
     */
70
    private static final char INSERT_OPCODE = 'I';
71
72
    /**
73
     * Serialized opcode for replacing one character.
74
     */
75
    private static final char REPLACE_OPCODE = 'R';
76
77
    /**
78
     * Serialized opcode for skipping one or more unchanged characters.
79
     */
80
    private static final char SKIP_OPCODE = '-';
81
82
    /**
83
     * Sentinel placed immediately before {@code 'a'} and used to accumulate compact
84
     * counts in the patch format.
85
     */
86
    private static final char COUNT_SENTINEL = (char) ('a' - 1);
87
88
    /**
89
     * Serialized opcode for a canonical no-operation patch.
90
     *
91
     * <p>
92
     * This opcode represents an identity transform of the whole source word. It is
93
     * used to ensure that equal source and target words always produce the same
94
     * serialized patch command.
95
     * </p>
96
     */
97
    private static final char NOOP_OPCODE = 'N';
98
99
    /**
100
     * Canonical argument used by the serialized no-operation patch.
101
     */
102
    private static final char NOOP_ARGUMENT = 'a';
103
104
    /**
105
     * Canonical serialized no-operation patch.
106
     *
107
     * <p>
108
     * This constant is returned by {@link #encode(String, String)} whenever source
109
     * and target are equal.
110
     * </p>
111
     */
112
    /* default */ static final String NOOP_PATCH = String.valueOf(new char[] { NOOP_OPCODE, NOOP_ARGUMENT });
113
114
    /**
115
     * Safety penalty used to prevent a mismatch from being selected as a match.
116
     */
117
    private static final int MISMATCH_PENALTY = 100;
118
119
    /**
120
     * Extra matrix headroom reserved beyond the immediately required dimensions.
121
     *
122
     * <p>
123
     * A small fixed margin reduces repeated reallocation when a caller encodes many
124
     * similarly sized terms in sequence. The value is intentionally modest: large
125
     * enough to absorb minor size fluctuations, yet small enough to avoid
126
     * materially over-allocating the reused dynamic-programming matrices.
127
     * </p>
128
     */
129
    private static final int CAPACITY_MARGIN = 8;
130
131
    /**
132
     * Cost of inserting one character.
133
     */
134
    private final int insertCost;
135
136
    /**
137
     * Cost of deleting one character.
138
     */
139
    private final int deleteCost;
140
141
    /**
142
     * Cost of replacing one character.
143
     */
144
    private final int replaceCost;
145
146
    /**
147
     * Cost of keeping one matching character unchanged.
148
     */
149
    private final int matchCost;
150
151
    /**
152
     * Currently allocated source dimension of reusable matrices.
153
     */
154
    private int sourceCapacity;
155
156
    /**
157
     * Currently allocated target dimension of reusable matrices.
158
     */
159
    private int targetCapacity;
160
161
    /**
162
     * Dynamic-programming matrix containing cumulative minimum costs.
163
     */
164
    private int[][] costMatrix;
165
166
    /**
167
     * Matrix storing the chosen transition for each dynamic-programming cell.
168
     */
169
    private Trace[][] traceMatrix;
170
171
    /**
172
     * Reentrant lock for {@link #encode(String, String)} exclusive operation.
173
     */
174
    private final ReentrantLock lock = new ReentrantLock();
175
176
    /**
177
     * Internal dynamic-programming transition selected for one matrix cell.
178
     */
179
    private enum Trace {
180
181
        /**
182
         * Deletes one character from the source sequence.
183
         */
184
        DELETE,
185
186
        /**
187
         * Inserts one character from the target sequence.
188
         */
189
        INSERT,
190
191
        /**
192
         * Replaces one source character with one target character.
193
         */
194
        REPLACE,
195
196
        /**
197
         * Keeps one matching character unchanged.
198
         */
199
        MATCH
200
    }
201
202
    /**
203
     * Creates an encoder with the traditional Egothor cost model: insert = 1,
204
     * delete = 1, replace = 1, match = 0.
205
     */
206
    public PatchCommandEncoder() {
207
        this(1, 1, 1, 0);
208
    }
209
210
    /**
211
     * Creates an encoder with explicit operation costs.
212
     *
213
     * @param insertCost  cost of inserting one character
214
     * @param deleteCost  cost of deleting one character
215
     * @param replaceCost cost of replacing one character
216
     * @param matchCost   cost of keeping one equal character unchanged
217
     */
218
    public PatchCommandEncoder(int insertCost, int deleteCost, int replaceCost, int matchCost) {
219 2 1. <init> : changed conditional boundary → SURVIVED
2. <init> : negated conditional → KILLED
        if (insertCost < 0) {
220
            throw new IllegalArgumentException("insertCost must be non-negative.");
221
        }
222 2 1. <init> : changed conditional boundary → SURVIVED
2. <init> : negated conditional → KILLED
        if (deleteCost < 0) {
223
            throw new IllegalArgumentException("deleteCost must be non-negative.");
224
        }
225 2 1. <init> : changed conditional boundary → SURVIVED
2. <init> : negated conditional → KILLED
        if (replaceCost < 0) {
226
            throw new IllegalArgumentException("replaceCost must be non-negative.");
227
        }
228 2 1. <init> : changed conditional boundary → KILLED
2. <init> : negated conditional → KILLED
        if (matchCost < 0) {
229
            throw new IllegalArgumentException("matchCost must be non-negative.");
230
        }
231
232
        this.insertCost = insertCost;
233
        this.deleteCost = deleteCost;
234
        this.replaceCost = replaceCost;
235
        this.matchCost = matchCost;
236
        this.sourceCapacity = 0;
237
        this.targetCapacity = 0;
238
        this.costMatrix = new int[0][0];
239
        this.traceMatrix = new Trace[0][0];
240
    }
241
242
    /**
243
     * Produces a compact patch command that transforms {@code source} into
244
     * {@code target}.
245
     *
246
     * @param source source word form
247
     * @param target target word form
248
     * @return compact patch command, or {@code null} when any argument is
249
     *         {@code null}
250
     */
251
    public String encode(String source, String target) {
252 2 1. encode : negated conditional → KILLED
2. encode : negated conditional → KILLED
        if (source == null || target == null) {
253 1 1. encode : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED
            return null;
254
        }
255
256 1 1. encode : negated conditional → KILLED
        if (source.equals(target)) {
257 1 1. encode : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED
            return NOOP_PATCH;
258
        }
259
260
        int sourceLength = source.length();
261
        int targetLength = target.length();
262
263 1 1. encode : removed call to java/util/concurrent/locks/ReentrantLock::lock → KILLED
        lock.lock();
264
        try {
265 3 1. encode : removed call to org/egothor/stemmer/PatchCommandEncoder::ensureCapacity → KILLED
2. encode : Replaced integer addition with subtraction → KILLED
3. encode : Replaced integer addition with subtraction → KILLED
            ensureCapacity(sourceLength + 1, targetLength + 1);
266 1 1. encode : removed call to org/egothor/stemmer/PatchCommandEncoder::initializeBoundaryConditions → KILLED
            initializeBoundaryConditions(sourceLength, targetLength);
267
268
            char[] sourceCharacters = source.toCharArray();
269
            char[] targetCharacters = target.toCharArray();
270
271 1 1. encode : removed call to org/egothor/stemmer/PatchCommandEncoder::fillMatrices → KILLED
            fillMatrices(sourceCharacters, targetCharacters, sourceLength, targetLength);
272
273 1 1. encode : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED
            return buildPatchCommand(targetCharacters, sourceLength, targetLength);
274
        } finally {
275 1 1. encode : removed call to java/util/concurrent/locks/ReentrantLock::unlock → SURVIVED
            lock.unlock();
276
        }
277
    }
278
279
    /**
280
     * Applies a compact patch command to the supplied source word.
281
     *
282
     * <p>
283
     * This method operates directly on serialized opcodes rather than mapping them
284
     * to another representation. That keeps the hot path small and avoids
285
     * unnecessary indirection during patch application.
286
     * </p>
287
     *
288
     * <p>
289
     * For compatibility with the historical behavior, malformed patch input that
290
     * causes index failures results in the original source word being returned
291
     * unchanged.
292
     * </p>
293
     *
294
     * @param source       original source word
295
     * @param patchCommand compact patch command
296
     * @return transformed word, or {@code null} when {@code source} is {@code null}
297
     */
298
    @SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.AvoidLiteralsInIfCondition" })
299
    public static String apply(String source, String patchCommand) {
300 1 1. apply : negated conditional → KILLED
        if (source == null) {
301 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return null;
302
        }
303 2 1. apply : negated conditional → KILLED
2. apply : negated conditional → KILLED
        if (patchCommand == null || patchCommand.isEmpty()) {
304 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return source;
305
        }
306 1 1. apply : negated conditional → KILLED
        if (NOOP_PATCH.equals(patchCommand)) {
307 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return source;
308
        }
309
310 2 1. apply : Replaced bitwise AND with OR → KILLED
2. apply : negated conditional → KILLED
        if ((patchCommand.length() & 1) != 0) {
311 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return source;
312
        }
313
314
        StringBuilder result = new StringBuilder(source);
315
316 1 1. apply : negated conditional → KILLED
        if (result.isEmpty()) {
317 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return applyToEmptySource(result, patchCommand);
318
        }
319
320 1 1. apply : Replaced integer subtraction with addition → KILLED
        int position = result.length() - 1;
321
322
        try {
323 2 1. apply : changed conditional boundary → KILLED
2. apply : negated conditional → KILLED
            for (int patchIndex = 0, patchLength = patchCommand.length(); patchIndex < patchLength; patchIndex += 2) { // NOPMD
324
325
                char opcode = patchCommand.charAt(patchIndex);
326 1 1. apply : Replaced integer addition with subtraction → KILLED
                char argument = patchCommand.charAt(patchIndex + 1);
327
328
                switch (opcode) {
329
                    case SKIP_OPCODE:
330
                        final int skipCount = decodeEncodedCount(argument);
331 2 1. apply : negated conditional → KILLED
2. apply : changed conditional boundary → KILLED
                        if (skipCount < 1) {
332 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
                            return source;
333
                        }
334 2 1. apply : Replaced integer subtraction with addition → KILLED
2. apply : Replaced integer addition with subtraction → KILLED
                        position = position - skipCount + 1;
335
                        break;
336
337
                    case REPLACE_OPCODE:
338 1 1. apply : removed call to java/lang/StringBuilder::setCharAt → KILLED
                        result.setCharAt(position, argument);
339
                        break;
340
341
                    case DELETE_OPCODE:
342
                        final int deleteCount = decodeEncodedCount(argument);
343 2 1. apply : negated conditional → KILLED
2. apply : changed conditional boundary → KILLED
                        if (deleteCount < 1) {
344 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
                            return source;
345
                        }
346 1 1. apply : Replaced integer addition with subtraction → KILLED
                        int deleteEndExclusive = position + 1;
347 2 1. apply : Replaced integer subtraction with addition → KILLED
2. apply : Replaced integer subtraction with addition → KILLED
                        position -= deleteCount - 1;
348
                        result.delete(position, deleteEndExclusive);
349
                        break;
350
351
                    case INSERT_OPCODE:
352 1 1. apply : Replaced integer addition with subtraction → KILLED
                        result.insert(position + 1, argument);
353 1 1. apply : Changed increment from 1 to -1 → KILLED
                        position++;
354
                        break;
355
356
                    case NOOP_OPCODE:
357 1 1. apply : negated conditional → KILLED
                        if (argument != NOOP_ARGUMENT) {
358
                            throw new IllegalArgumentException("Unsupported NOOP patch argument: " + argument);
359
                        }
360 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → NO_COVERAGE
                        return source;
361
362
                    default:
363
                        throw new IllegalArgumentException("Unsupported patch opcode: " + opcode);
364
                }
365
366 1 1. apply : Changed increment from -1 to 1 → KILLED
                position--;
367
            }
368
        } catch (IndexOutOfBoundsException exception) {
369 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
            return source;
370
        }
371
372 1 1. apply : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED
        return result.toString();
373
    }
374
375
    /**
376
     * Decodes a compact count argument used by skip and delete instructions.
377
     *
378
     * <p>
379
     * Valid encoded counts start at {@code 'a'} for one affected character. Values
380
     * below {@code 'a'} are malformed and are reported to callers via the
381
     * compatibility fallback path rather than by throwing a dedicated exception.
382
     * </p>
383
     *
384
     * @param argument serialized count argument
385
     * @return decoded positive count, or {@code -1} when the argument is malformed
386
     */
387
    @SuppressWarnings("PMD.AvoidLiteralsInIfCondition")
388
    private static int decodeEncodedCount(final char argument) {
389 2 1. decodeEncodedCount : negated conditional → KILLED
2. decodeEncodedCount : changed conditional boundary → KILLED
        if (argument < 'a') {
390 1 1. decodeEncodedCount : replaced int return with 0 for org/egothor/stemmer/PatchCommandEncoder::decodeEncodedCount → SURVIVED
            return -1;
391
        }
392 3 1. decodeEncodedCount : Replaced integer subtraction with addition → KILLED
2. decodeEncodedCount : replaced int return with 0 for org/egothor/stemmer/PatchCommandEncoder::decodeEncodedCount → KILLED
3. decodeEncodedCount : Replaced integer addition with subtraction → KILLED
        return argument - 'a' + 1;
393
    }
394
395
    /**
396
     * Applies a patch command to an empty source word.
397
     *
398
     * <p>
399
     * Only insertion instructions are meaningful for an empty source. Skip,
400
     * replace, and delete instructions are treated as malformed and therefore cause
401
     * the original source to be preserved, consistent with the historical fallback
402
     * behavior for index-invalid commands.
403
     * </p>
404
     *
405
     * @param result       empty result builder
406
     * @param patchCommand compact patch command
407
     * @return transformed word, or the original empty word when the patch is
408
     *         malformed
409
     */
410
    private static String applyToEmptySource(StringBuilder result, String patchCommand) {
411
        try {
412 2 1. applyToEmptySource : negated conditional → KILLED
2. applyToEmptySource : changed conditional boundary → KILLED
            for (int patchIndex = 0, patchLength = patchCommand.length(); patchIndex < patchLength; patchIndex += 2) { // NOPMD
413
414
                char opcode = patchCommand.charAt(patchIndex);
415 1 1. applyToEmptySource : Replaced integer addition with subtraction → KILLED
                char argument = patchCommand.charAt(patchIndex + 1);
416
417
                switch (opcode) {
418
                    case INSERT_OPCODE:
419
                        result.insert(0, argument);
420
                        break;
421
422
                    case SKIP_OPCODE:
423
                    case REPLACE_OPCODE:
424
                    case DELETE_OPCODE:
425
                        return "";
426
427
                    case NOOP_OPCODE:
428 1 1. applyToEmptySource : negated conditional → NO_COVERAGE
                        if (argument != NOOP_ARGUMENT) {
429
                            throw new IllegalArgumentException("Unsupported NOOP patch argument: " + argument);
430
                        }
431
                        return "";
432
433
                    default:
434
                        throw new IllegalArgumentException("Unsupported patch opcode: " + opcode);
435
                }
436
            }
437
        } catch (IndexOutOfBoundsException exception) {
438
            return "";
439
        }
440
441 1 1. applyToEmptySource : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::applyToEmptySource → KILLED
        return result.toString();
442
    }
443
444
    /**
445
     * Ensures that internal matrices are large enough for the requested input
446
     * dimensions.
447
     *
448
     * @param requiredSourceCapacity required source dimension
449
     * @param requiredTargetCapacity required target dimension
450
     */
451
    private void ensureCapacity(int requiredSourceCapacity, int requiredTargetCapacity) {
452 4 1. ensureCapacity : changed conditional boundary → SURVIVED
2. ensureCapacity : changed conditional boundary → SURVIVED
3. ensureCapacity : negated conditional → TIMED_OUT
4. ensureCapacity : negated conditional → TIMED_OUT
        if (requiredSourceCapacity <= sourceCapacity && requiredTargetCapacity <= targetCapacity) {
453
            return;
454
        }
455
456 1 1. ensureCapacity : Replaced integer addition with subtraction → KILLED
        sourceCapacity = Math.max(sourceCapacity, requiredSourceCapacity) + CAPACITY_MARGIN;
457 1 1. ensureCapacity : Replaced integer addition with subtraction → KILLED
        targetCapacity = Math.max(targetCapacity, requiredTargetCapacity) + CAPACITY_MARGIN;
458
459
        costMatrix = new int[sourceCapacity][targetCapacity];
460
        traceMatrix = new Trace[sourceCapacity][targetCapacity];
461
    }
462
463
    /**
464
     * Initializes the first row and first column of the dynamic-programming
465
     * matrices.
466
     *
467
     * @param sourceLength length of the source word
468
     * @param targetLength length of the target word
469
     */
470
    private void initializeBoundaryConditions(int sourceLength, int targetLength) {
471
        costMatrix[0][0] = 0;
472
        traceMatrix[0][0] = Trace.MATCH;
473
474 2 1. initializeBoundaryConditions : changed conditional boundary → KILLED
2. initializeBoundaryConditions : negated conditional → KILLED
        for (int sourceIndex = 1; sourceIndex <= sourceLength; sourceIndex++) {
475 1 1. initializeBoundaryConditions : Replaced integer multiplication with division → SURVIVED
            costMatrix[sourceIndex][0] = sourceIndex * deleteCost;
476
            traceMatrix[sourceIndex][0] = Trace.DELETE;
477
        }
478
479 2 1. initializeBoundaryConditions : negated conditional → KILLED
2. initializeBoundaryConditions : changed conditional boundary → KILLED
        for (int targetIndex = 1; targetIndex <= targetLength; targetIndex++) {
480 1 1. initializeBoundaryConditions : Replaced integer multiplication with division → SURVIVED
            costMatrix[0][targetIndex] = targetIndex * insertCost;
481
            traceMatrix[0][targetIndex] = Trace.INSERT;
482
        }
483
    }
484
485
    /**
486
     * Fills dynamic-programming matrices for the supplied source and target
487
     * character sequences.
488
     *
489
     * @param sourceCharacters source characters
490
     * @param targetCharacters target characters
491
     * @param sourceLength     source length
492
     * @param targetLength     target length
493
     */
494
    private void fillMatrices(char[] sourceCharacters, char[] targetCharacters, int sourceLength, int targetLength) {
495
496 2 1. fillMatrices : negated conditional → KILLED
2. fillMatrices : changed conditional boundary → KILLED
        for (int sourceIndex = 1; sourceIndex <= sourceLength; sourceIndex++) {
497 1 1. fillMatrices : Replaced integer subtraction with addition → KILLED
            char sourceCharacter = sourceCharacters[sourceIndex - 1];
498
499 2 1. fillMatrices : changed conditional boundary → KILLED
2. fillMatrices : negated conditional → KILLED
            for (int targetIndex = 1; targetIndex <= targetLength; targetIndex++) {
500 1 1. fillMatrices : Replaced integer subtraction with addition → KILLED
                char targetCharacter = targetCharacters[targetIndex - 1];
501
502 2 1. fillMatrices : Replaced integer addition with subtraction → KILLED
2. fillMatrices : Replaced integer subtraction with addition → KILLED
                int deleteCandidate = costMatrix[sourceIndex - 1][targetIndex] + deleteCost;
503 2 1. fillMatrices : Replaced integer addition with subtraction → KILLED
2. fillMatrices : Replaced integer subtraction with addition → KILLED
                int insertCandidate = costMatrix[sourceIndex][targetIndex - 1] + insertCost;
504 3 1. fillMatrices : Replaced integer subtraction with addition → KILLED
2. fillMatrices : Replaced integer addition with subtraction → KILLED
3. fillMatrices : Replaced integer subtraction with addition → KILLED
                int replaceCandidate = costMatrix[sourceIndex - 1][targetIndex - 1] + replaceCost;
505 2 1. fillMatrices : Replaced integer subtraction with addition → KILLED
2. fillMatrices : Replaced integer subtraction with addition → KILLED
                int matchCandidate = costMatrix[sourceIndex - 1][targetIndex - 1]
506 2 1. fillMatrices : Replaced integer addition with subtraction → KILLED
2. fillMatrices : negated conditional → KILLED
                        + (sourceCharacter == targetCharacter ? matchCost : MISMATCH_PENALTY);
507
508
                int bestCost = matchCandidate;
509
                Trace bestTrace = Trace.MATCH;
510
511 2 1. fillMatrices : changed conditional boundary → KILLED
2. fillMatrices : negated conditional → KILLED
                if (deleteCandidate <= bestCost) {
512
                    bestCost = deleteCandidate;
513
                    bestTrace = Trace.DELETE;
514
                }
515 2 1. fillMatrices : changed conditional boundary → SURVIVED
2. fillMatrices : negated conditional → KILLED
                if (insertCandidate < bestCost) {
516
                    bestCost = insertCandidate;
517
                    bestTrace = Trace.INSERT;
518
                }
519 2 1. fillMatrices : negated conditional → KILLED
2. fillMatrices : changed conditional boundary → KILLED
                if (replaceCandidate < bestCost) {
520
                    bestCost = replaceCandidate;
521
                    bestTrace = Trace.REPLACE;
522
                }
523
524
                costMatrix[sourceIndex][targetIndex] = bestCost;
525
                traceMatrix[sourceIndex][targetIndex] = bestTrace;
526
            }
527
        }
528
    }
529
530
    /**
531
     * Reconstructs the compact patch command by traversing the trace matrix from
532
     * the final cell back to the origin.
533
     *
534
     * @param targetCharacters target characters
535
     * @param sourceLength     source length
536
     * @param targetLength     target length
537
     * @return compact patch command
538
     */
539
    private String buildPatchCommand(char[] targetCharacters, int sourceLength, int targetLength) {
540
541 1 1. buildPatchCommand : Replaced integer addition with subtraction → KILLED
        StringBuilder patchBuilder = new StringBuilder(sourceLength + targetLength);
542
543
        char pendingDeletes = COUNT_SENTINEL;
544
        char pendingSkips = COUNT_SENTINEL;
545
546
        int sourceIndex = sourceLength;
547
        int targetIndex = targetLength;
548
549 2 1. buildPatchCommand : negated conditional → KILLED
2. buildPatchCommand : negated conditional → KILLED
        while (sourceIndex != 0 || targetIndex != 0) {
550
            Trace trace = traceMatrix[sourceIndex][targetIndex];
551
552
            switch (trace) {
553
                case DELETE:
554 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingSkips != COUNT_SENTINEL) {
555 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                        appendInstruction(patchBuilder, SKIP_OPCODE, pendingSkips);
556
                        pendingSkips = COUNT_SENTINEL;
557
                    }
558 1 1. buildPatchCommand : Replaced integer addition with subtraction → KILLED
                    pendingDeletes++;
559 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    sourceIndex--;
560
                    break;
561
562
                case INSERT:
563 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingDeletes != COUNT_SENTINEL) {
564 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → NO_COVERAGE
                        appendInstruction(patchBuilder, DELETE_OPCODE, pendingDeletes);
565
                        pendingDeletes = COUNT_SENTINEL;
566
                    }
567 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingSkips != COUNT_SENTINEL) {
568 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                        appendInstruction(patchBuilder, SKIP_OPCODE, pendingSkips);
569
                        pendingSkips = COUNT_SENTINEL;
570
                    }
571 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    targetIndex--;
572 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                    appendInstruction(patchBuilder, INSERT_OPCODE, targetCharacters[targetIndex]);
573
                    break;
574
575
                case REPLACE:
576 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingDeletes != COUNT_SENTINEL) {
577 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                        appendInstruction(patchBuilder, DELETE_OPCODE, pendingDeletes);
578
                        pendingDeletes = COUNT_SENTINEL;
579
                    }
580 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingSkips != COUNT_SENTINEL) {
581 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                        appendInstruction(patchBuilder, SKIP_OPCODE, pendingSkips);
582
                        pendingSkips = COUNT_SENTINEL;
583
                    }
584 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    targetIndex--;
585 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    sourceIndex--;
586 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                    appendInstruction(patchBuilder, REPLACE_OPCODE, targetCharacters[targetIndex]);
587
                    break;
588
589
                case MATCH:
590 1 1. buildPatchCommand : negated conditional → KILLED
                    if (pendingDeletes != COUNT_SENTINEL) {
591 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
                        appendInstruction(patchBuilder, DELETE_OPCODE, pendingDeletes);
592
                        pendingDeletes = COUNT_SENTINEL;
593
                    }
594 1 1. buildPatchCommand : Replaced integer addition with subtraction → KILLED
                    pendingSkips++;
595 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    sourceIndex--;
596 1 1. buildPatchCommand : Changed increment from -1 to 1 → KILLED
                    targetIndex--;
597
                    break;
598
            }
599
        }
600
601 1 1. buildPatchCommand : negated conditional → KILLED
        if (pendingDeletes != COUNT_SENTINEL) {
602 1 1. buildPatchCommand : removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED
            appendInstruction(patchBuilder, DELETE_OPCODE, pendingDeletes);
603
        }
604
605 1 1. buildPatchCommand : replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::buildPatchCommand → KILLED
        return patchBuilder.toString();
606
    }
607
608
    /**
609
     * Appends one serialized instruction to the patch command builder.
610
     *
611
     * @param patchBuilder patch command builder
612
     * @param opcode       single-character instruction opcode
613
     * @param argument     encoded instruction argument
614
     */
615
    private static void appendInstruction(StringBuilder patchBuilder, char opcode, char argument) {
616
        patchBuilder.append(opcode).append(argument);
617
    }
618
}

Mutations

219

1.1
Location : <init>
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : <init>
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
negated conditional → KILLED

222

1.1
Location : <init>
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
negated conditional → KILLED

2.2
Location : <init>
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

225

1.1
Location : <init>
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : <init>
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
negated conditional → KILLED

228

1.1
Location : <init>
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
changed conditional boundary → KILLED

2.2
Location : <init>
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
negated conditional → KILLED

252

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenSourceIsNull()]
negated conditional → KILLED

2.2
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenTargetIsNull()]
negated conditional → KILLED

253

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnNullWhenSourceIsNull()]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED

256

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnCanonicalNoopPatchForEqualWords()]
negated conditional → KILLED

257

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[method:shouldReturnCanonicalNoopPatchForEqualWords()]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED

263

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
removed call to java/util/concurrent/locks/ReentrantLock::lock → KILLED

265

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
removed call to org/egothor/stemmer/PatchCommandEncoder::ensureCapacity → KILLED

2.2
Location : encode
Killed by : org.egothor.stemmer.FuzzStemmerAndTrieCompilationTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.FuzzStemmerAndTrieCompilationTest]/[method:generatedDictionariesShouldCompileAndStemConsistently()]
Replaced integer addition with subtraction → KILLED

3.3
Location : encode
Killed by : org.egothor.stemmer.FuzzStemmerAndTrieCompilationTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.FuzzStemmerAndTrieCompilationTest]/[method:generatedDictionariesShouldCompileAndStemConsistently()]
Replaced integer addition with subtraction → KILLED

266

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
removed call to org/egothor/stemmer/PatchCommandEncoder::initializeBoundaryConditions → KILLED

271

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
removed call to org/egothor/stemmer/PatchCommandEncoder::fillMatrices → KILLED

273

1.1
Location : encode
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::encode → KILLED

275

1.1
Location : encode
Killed by : none
removed call to java/util/concurrent/locks/ReentrantLock::unlock → SURVIVED
Covering tests

300

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldReturnSourceWhenPatchIsNull()]
negated conditional → KILLED

301

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldReturnNullWhenSourceIsNull()]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

303

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldReturnSourceWhenPatchIsNull()]
negated conditional → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldReturnSourceWhenPatchIsEmpty()]
negated conditional → KILLED

304

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldReturnSourceWhenPatchIsNull()]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

306

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

307

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#10]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

310

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
Replaced bitwise AND with OR → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

311

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldReturnOriginalSourceForMalformedOrIndexInvalidPatchCommands(int, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

316

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

317

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#8]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

320

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

323

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
changed conditional boundary → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
negated conditional → KILLED

326

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
Replaced integer addition with subtraction → KILLED

331

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#4]
negated conditional → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ReversedWordProcessingTests]/[test-template:shouldReconstructReversedTargetsFromReversedSources(int, java.lang.String, java.lang.String)]/[test-template-invocation:#11]
changed conditional boundary → KILLED

332

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldReturnOriginalSourceForMalformedOrIndexInvalidPatchCommands(int, java.lang.String, java.lang.String)]/[test-template-invocation:#12]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

334

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#4]
Replaced integer subtraction with addition → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#4]
Replaced integer addition with subtraction → KILLED

338

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
removed call to java/lang/StringBuilder::setCharAt → KILLED

343

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
negated conditional → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
changed conditional boundary → KILLED

344

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldReturnOriginalSourceForMalformedOrIndexInvalidPatchCommands(int, java.lang.String, java.lang.String)]/[test-template-invocation:#11]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

346

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer addition with subtraction → KILLED

347

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer subtraction with addition → KILLED

2.2
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer subtraction with addition → KILLED

352

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#2]
Replaced integer addition with subtraction → KILLED

353

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#19]
Changed increment from 1 to -1 → KILLED

357

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[method:shouldThrowForUnsupportedNoopArgument()]
negated conditional → KILLED

360

1.1
Location : apply
Killed by : none
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → NO_COVERAGE

366

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Changed increment from -1 to 1 → KILLED

369

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldReturnOriginalSourceForMalformedOrIndexInvalidPatchCommands(int, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

372

1.1
Location : apply
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#3]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::apply → KILLED

389

1.1
Location : decodeEncodedCount
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
negated conditional → KILLED

2.2
Location : decodeEncodedCount
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
changed conditional boundary → KILLED

390

1.1
Location : decodeEncodedCount
Killed by : none
replaced int return with 0 for org/egothor/stemmer/PatchCommandEncoder::decodeEncodedCount → SURVIVED
Covering tests

392

1.1
Location : decodeEncodedCount
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer subtraction with addition → KILLED

2.2
Location : decodeEncodedCount
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
replaced int return with 0 for org/egothor/stemmer/PatchCommandEncoder::decodeEncodedCount → KILLED

3.3
Location : decodeEncodedCount
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer addition with subtraction → KILLED

412

1.1
Location : applyToEmptySource
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#8]
negated conditional → KILLED

2.2
Location : applyToEmptySource
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#8]
changed conditional boundary → KILLED

415

1.1
Location : applyToEmptySource
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#8]
Replaced integer addition with subtraction → KILLED

428

1.1
Location : applyToEmptySource
Killed by : none
negated conditional → NO_COVERAGE

441

1.1
Location : applyToEmptySource
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ApplyTests]/[test-template:shouldApplyExplicitPatchCommandsCorrectly(int, java.lang.String, java.lang.String, java.lang.String)]/[test-template-invocation:#8]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::applyToEmptySource → KILLED

452

1.1
Location : ensureCapacity
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : ensureCapacity
Killed by : none
negated conditional → TIMED_OUT

3.3
Location : ensureCapacity
Killed by : none
changed conditional boundary → SURVIVED Covering tests

4.4
Location : ensureCapacity
Killed by : none
negated conditional → TIMED_OUT

456

1.1
Location : ensureCapacity
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
Replaced integer addition with subtraction → KILLED

457

1.1
Location : ensureCapacity
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
Replaced integer addition with subtraction → KILLED

474

1.1
Location : initializeBoundaryConditions
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
changed conditional boundary → KILLED

2.2
Location : initializeBoundaryConditions
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

475

1.1
Location : initializeBoundaryConditions
Killed by : none
Replaced integer multiplication with division → SURVIVED
Covering tests

479

1.1
Location : initializeBoundaryConditions
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

2.2
Location : initializeBoundaryConditions
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
changed conditional boundary → KILLED

480

1.1
Location : initializeBoundaryConditions
Killed by : none
Replaced integer multiplication with division → SURVIVED
Covering tests

496

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
changed conditional boundary → KILLED

497

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
Replaced integer subtraction with addition → KILLED

499

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
changed conditional boundary → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
negated conditional → KILLED

500

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
Replaced integer subtraction with addition → KILLED

502

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer addition with subtraction → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#2]
Replaced integer subtraction with addition → KILLED

503

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer addition with subtraction → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

504

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer addition with subtraction → KILLED

3.3
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

505

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
Replaced integer subtraction with addition → KILLED

506

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
Replaced integer addition with subtraction → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
negated conditional → KILLED

511

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#2]
changed conditional boundary → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
negated conditional → KILLED

515

1.1
Location : fillMatrices
Killed by : none
changed conditional boundary → SURVIVED
Covering tests

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
negated conditional → KILLED

519

1.1
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#3]
negated conditional → KILLED

2.2
Location : fillMatrices
Killed by : org.egothor.stemmer.CompiledTrieArtifactRegressionTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.CompiledTrieArtifactRegressionTest]/[test-template:shouldMatchGoldenArtifactAndExpectedHash(org.egothor.stemmer.CompiledTrieArtifactRegressionTest$ArtifactCase)]/[test-template-invocation:#2]
changed conditional boundary → KILLED

541

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
Replaced integer addition with subtraction → KILLED

549

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

2.2
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

554

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
negated conditional → KILLED

555

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ReversedWordProcessingTests]/[test-template:shouldReconstructReversedTargetsFromReversedSources(int, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

558

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
Replaced integer addition with subtraction → KILLED

559

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
Changed increment from -1 to 1 → KILLED

563

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#17]
negated conditional → KILLED

564

1.1
Location : buildPatchCommand
Killed by : none
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → NO_COVERAGE

567

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#17]
negated conditional → KILLED

568

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

571

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#17]
Changed increment from -1 to 1 → KILLED

572

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#17]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

576

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
negated conditional → KILLED

577

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandlePluralToSingularTransformation()]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

580

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
negated conditional → KILLED

581

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#11]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

584

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
Changed increment from -1 to 1 → KILLED

585

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
Changed increment from -1 to 1 → KILLED

586

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleSingleCharacterReplacement()]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

590

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#5]
negated conditional → KILLED

591

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:StemmingScenarioTests]/[method:shouldHandleDeletionHeavySuffixStripping()]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

594

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:ReversedWordProcessingTests]/[test-template:shouldReconstructReversedTargetsFromReversedSources(int, java.lang.String, java.lang.String)]/[test-template-invocation:#7]
Replaced integer addition with subtraction → KILLED

595

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#10]
Changed increment from -1 to 1 → KILLED

596

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#10]
Changed increment from -1 to 1 → KILLED

601

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
negated conditional → KILLED

602

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[nested-class:EncodeTests]/[test-template:shouldReconstructTargetForRoundTripPairs(int, java.lang.String, java.lang.String)]/[test-template-invocation:#14]
removed call to org/egothor/stemmer/PatchCommandEncoder::appendInstruction → KILLED

605

1.1
Location : buildPatchCommand
Killed by : org.egothor.stemmer.PatchCommandEncoderTest.[engine:junit-jupiter]/[class:org.egothor.stemmer.PatchCommandEncoderTest]/[test-template:shouldPreserveCorrectnessUnderMirroredInputOrientation(int, java.lang.String, java.lang.String)]/[test-template-invocation:#16]
replaced return value with "" for org/egothor/stemmer/PatchCommandEncoder::buildPatchCommand → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1