HexDump.java

1
package com.rox.debug.memory;
2
3
import java.util.Locale;
4
import java.util.OptionalInt;
5
import java.util.function.IntUnaryOperator;
6
7
/** Classic hex-dump text: 16 bytes per row, each row prefixed with its address, optionally with an ASCII column. */
8
public final class HexDump {
9
    private static final int BYTES_PER_ROW = 16;
10
    private static final int FIRST_PRINTABLE = 0x20;
11
    private static final int LAST_PRINTABLE = 0x7E;
12
    private static final char[] HEX_DIGITS = "0123456789ABCDEF".toCharArray();
13
    private static final int ADDRESS_COLUMN_WIDTH = "0000:".length();
14
    private static final int BYTE_WIDTH = " 00".length();
15
    private static final String ASCII_OPEN = "  |";
16
    private static final int HEX_RADIX = 16;
17
    private static final int MAX_BYTE_DIGITS = 2;
18
19
    private HexDump(){
20
    }
21
22
    /**
23
     * {@code 0010: 00 01 ... 0F} per row, plus {@code  |....|} when {@code ascii} (non-printable bytes as
24
     * {@code .}). A last row shorter than 16 bytes is just shorter.
25
     *
26
     * @param end inclusive
27
     */
28
    public static String format(final IntUnaryOperator peek, final int start, final int end, final boolean ascii){
29
        final StringBuilder out = new StringBuilder();
30
        final StringBuilder characters = new StringBuilder(BYTES_PER_ROW);
31 2 1. format : changed conditional boundary → KILLED
2. format : negated conditional → KILLED
        for (int row = start; row <= end; row += BYTES_PER_ROW){
32 2 1. format : Replaced integer addition with subtraction → KILLED
2. format : Replaced integer subtraction with addition → KILLED
            final int rowEnd = Math.min(row + BYTES_PER_ROW - 1, end);
33 1 1. format : removed call to java/lang/StringBuilder::setLength → KILLED
            characters.setLength(0);
34 2 1. format : Replaced Shift Right with Shift Left → KILLED
2. format : removed call to com/rox/debug/memory/HexDump::appendHex → KILLED
            appendHex(out, row >> 8);
35 1 1. format : removed call to com/rox/debug/memory/HexDump::appendHex → KILLED
            appendHex(out, row);
36
            out.append(':');
37 2 1. format : changed conditional boundary → KILLED
2. format : negated conditional → KILLED
            for (int address = row; address <= rowEnd; address++){
38
                final int value = peek.applyAsInt(address);
39
                out.append(' ');
40 1 1. format : removed call to com/rox/debug/memory/HexDump::appendHex → KILLED
                appendHex(out, value);
41 4 1. format : negated conditional → KILLED
2. format : changed conditional boundary → KILLED
3. format : negated conditional → KILLED
4. format : changed conditional boundary → KILLED
                characters.append(value >= FIRST_PRINTABLE && value <= LAST_PRINTABLE ? (char) value : '.');
42
            }
43 1 1. format : negated conditional → KILLED
            if (ascii){
44
                out.append("  |").append(characters).append('|');
45
            }
46
            out.append('\n');
47
        }
48 1 1. format : replaced return value with "" for com/rox/debug/memory/HexDump::format → KILLED
        return out.toString();
49
    }
50
51
    /**
52
     * The address of the byte at {@code offset} in {@link #format}'s text for the same arguments - its hex
53
     * column (including the space before it) or its ASCII column. Empty for the address column, the
54
     * separators and anywhere past the end.
55
     */
56
    public static OptionalInt addressAt(final int offset, final int start, final int end, final boolean ascii){
57
        final int rowLength = rowLength(BYTES_PER_ROW, ascii);
58 3 1. addressAt : Replaced integer division with multiplication → KILLED
2. addressAt : Replaced integer addition with subtraction → KILLED
3. addressAt : Replaced integer multiplication with division → KILLED
        final int rowStart = start + (offset / rowLength) * BYTES_PER_ROW;
59 2 1. addressAt : negated conditional → KILLED
2. addressAt : changed conditional boundary → KILLED
        if (rowStart > end){
60 1 1. addressAt : replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED
            return OptionalInt.empty();
61
        }
62 2 1. addressAt : Replaced integer subtraction with addition → KILLED
2. addressAt : Replaced integer addition with subtraction → KILLED
        final int bytesInRow = Math.min(BYTES_PER_ROW, end - rowStart + 1);
63 1 1. addressAt : Replaced integer modulus with multiplication → KILLED
        final int column = offset % rowLength;
64 2 1. addressAt : Replaced integer addition with subtraction → KILLED
2. addressAt : Replaced integer multiplication with division → KILLED
        final int hexEnd = ADDRESS_COLUMN_WIDTH + bytesInRow * BYTE_WIDTH;
65 4 1. addressAt : changed conditional boundary → KILLED
2. addressAt : negated conditional → KILLED
3. addressAt : negated conditional → KILLED
4. addressAt : changed conditional boundary → KILLED
        if (column >= ADDRESS_COLUMN_WIDTH && column < hexEnd){
66 4 1. addressAt : Replaced integer division with multiplication → KILLED
2. addressAt : Replaced integer subtraction with addition → KILLED
3. addressAt : Replaced integer addition with subtraction → KILLED
4. addressAt : replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED
            return OptionalInt.of(rowStart + (column - ADDRESS_COLUMN_WIDTH) / BYTE_WIDTH);
67
        }
68 1 1. addressAt : Replaced integer addition with subtraction → KILLED
        final int asciiStart = hexEnd + ASCII_OPEN.length();
69 6 1. addressAt : negated conditional → KILLED
2. addressAt : changed conditional boundary → KILLED
3. addressAt : Replaced integer addition with subtraction → KILLED
4. addressAt : negated conditional → KILLED
5. addressAt : negated conditional → KILLED
6. addressAt : changed conditional boundary → KILLED
        if (ascii && column >= asciiStart && column < asciiStart + bytesInRow){
70 3 1. addressAt : Replaced integer addition with subtraction → KILLED
2. addressAt : replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED
3. addressAt : Replaced integer subtraction with addition → KILLED
            return OptionalInt.of(rowStart + column - asciiStart);
71
        }
72 1 1. addressAt : replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED
        return OptionalInt.empty();
73
    }
74
75
    /**
76
     * A byte typed into a hex view: one or two hex digits, optionally after {@code $} or {@code 0x} -
77
     * so {@code 10} is {@code $10}, not ten.
78
     *
79
     * @throws IllegalArgumentException if it isn't one
80
     */
81
    public static int parseByte(final String text){
82
        final String trimmed = text.strip().toLowerCase(Locale.ROOT);
83 1 1. parseByte : negated conditional → KILLED
        final String digits = trimmed.startsWith("$") ? trimmed.substring(1)
84 1 1. parseByte : negated conditional → KILLED
                : trimmed.startsWith("0x") ? trimmed.substring(2) : trimmed;
85
        //checked by hand rather than trusting parseInt, which would also accept a sign
86 3 1. parseByte : negated conditional → KILLED
2. parseByte : changed conditional boundary → KILLED
3. parseByte : negated conditional → KILLED
        if (digits.isEmpty() || digits.length() > MAX_BYTE_DIGITS
87 4 1. parseByte : negated conditional → KILLED
2. lambda$parseByte$0 : negated conditional → KILLED
3. lambda$parseByte$0 : replaced boolean return with true for com/rox/debug/memory/HexDump::lambda$parseByte$0 → KILLED
4. lambda$parseByte$0 : changed conditional boundary → KILLED
                || !digits.chars().allMatch(c -> Character.digit(c, HEX_RADIX) >= 0)){
88
            throw new IllegalArgumentException("'" + text + "' isn't a hex byte ($00-$FF)");
89
        }
90 1 1. parseByte : replaced int return with 0 for com/rox/debug/memory/HexDump::parseByte → KILLED
        return Integer.parseInt(digits, HEX_RADIX);
91
    }
92
93
    /** Characters in a row of {@code bytes} bytes, newline included. */
94
    private static int rowLength(final int bytes, final boolean ascii){
95 2 1. rowLength : Replaced integer multiplication with division → KILLED
2. rowLength : Replaced integer addition with subtraction → KILLED
        final int hex = ADDRESS_COLUMN_WIDTH + bytes * BYTE_WIDTH;
96 6 1. rowLength : Replaced integer addition with subtraction → KILLED
2. rowLength : replaced int return with 0 for com/rox/debug/memory/HexDump::rowLength → KILLED
3. rowLength : Replaced integer addition with subtraction → KILLED
4. rowLength : Replaced integer addition with subtraction → KILLED
5. rowLength : negated conditional → KILLED
6. rowLength : Replaced integer addition with subtraction → KILLED
        return (ascii ? hex + ASCII_OPEN.length() + bytes + "|".length() : hex) + "\n".length();
97
    }
98
99
    /**
100
     * Two uppercase hex digits for {@code value}'s low byte - by table lookup rather than
101
     * {@code String.format}, which is slow enough to matter when a viewer redraws a 32KB region
102
     * (~35,000 bytes) several times a second.
103
     */
104
    private static void appendHex(final StringBuilder out, final int value){
105 3 1. appendHex : Replaced bitwise AND with OR → KILLED
2. appendHex : Replaced Shift Right with Shift Left → KILLED
3. appendHex : Replaced bitwise AND with OR → KILLED
        out.append(HEX_DIGITS[(value >> 4) & 0x0F]).append(HEX_DIGITS[value & 0x0F]);
106
    }
107
}

Mutations

31

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:aSingleByteRangeIsOneShortRow()]
changed conditional boundary → KILLED

2.2
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
negated conditional → KILLED

32

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced integer addition with subtraction → KILLED

2.2
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced integer subtraction with addition → KILLED

33

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:eachRowHasItsOwnAsciiColumn()]
removed call to java/lang/StringBuilder::setLength → KILLED

34

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced Shift Right with Shift Left → KILLED

2.2
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
removed call to com/rox/debug/memory/HexDump::appendHex → KILLED

35

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
removed call to com/rox/debug/memory/HexDump::appendHex → KILLED

37

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
changed conditional boundary → KILLED

2.2
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
negated conditional → KILLED

40

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
removed call to com/rox/debug/memory/HexDump::appendHex → KILLED

41

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:asciiColumnShowsPrintableBytesAndDotsForTheRest()]
negated conditional → KILLED

2.2
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:asciiColumnShowsPrintableBytesAndDotsForTheRest()]
changed conditional boundary → KILLED

3.3
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:asciiColumnShowsPrintableBytesAndDotsForTheRest()]
negated conditional → KILLED

4.4
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:asciiColumnShowsPrintableBytesAndDotsForTheRest()]
changed conditional boundary → KILLED

43

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
negated conditional → KILLED

48

1.1
Location : format
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
replaced return value with "" for com/rox/debug/memory/HexDump::format → KILLED

58

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer division with multiplication → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer addition with subtraction → KILLED

3.3
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer multiplication with division → KILLED

59

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
negated conditional → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
changed conditional boundary → KILLED

60

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtIsEmptyBeforeAndAfterTheText()]
replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED

62

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtStopsAtAShortLastRowsEnd()]
Replaced integer subtraction with addition → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer addition with subtraction → KILLED

63

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer modulus with multiplication → KILLED

64

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
Replaced integer addition with subtraction → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer multiplication with division → KILLED

65

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:addressAtIsEmptyOffTheBytes(int)]/[test-template-invocation:#3]
changed conditional boundary → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
negated conditional → KILLED

3.3
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
negated conditional → KILLED

4.4
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
changed conditional boundary → KILLED

66

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtWithoutAsciiHasShorterRowsAndNoAsciiColumn()]
Replaced integer division with multiplication → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer subtraction with addition → KILLED

3.3
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtWithoutAsciiHasShorterRowsAndNoAsciiColumn()]
Replaced integer addition with subtraction → KILLED

4.4
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED

68

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:addressAtIsEmptyOffTheBytes(int)]/[test-template-invocation:#3]
Replaced integer addition with subtraction → KILLED

69

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:addressAtIsEmptyOffTheBytes(int)]/[test-template-invocation:#2]
negated conditional → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtStopsAtAShortLastRowsEnd()]
changed conditional boundary → KILLED

3.3
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
Replaced integer addition with subtraction → KILLED

4.4
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
negated conditional → KILLED

5.5
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
negated conditional → KILLED

6.6
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:addressAtIsEmptyOffTheBytes(int)]/[test-template-invocation:#5]
changed conditional boundary → KILLED

70

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
Replaced integer addition with subtraction → KILLED

2.2
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED

3.3
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsTheByteUnderAnyOfItsHexColumnsAndItsAsciiColumn()]
Replaced integer subtraction with addition → KILLED

72

1.1
Location : addressAt
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtWithoutAsciiHasShorterRowsAndNoAsciiColumn()]
replaced return value with null for com/rox/debug/memory/HexDump::addressAt → KILLED

83

1.1
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteRejectsAnythingElse(java.lang.String)]/[test-template-invocation:#1]
negated conditional → KILLED

84

1.1
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteRejectsAnythingElse(java.lang.String)]/[test-template-invocation:#9]
negated conditional → KILLED

86

1.1
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteRejectsAnythingElse(java.lang.String)]/[test-template-invocation:#4]
negated conditional → KILLED

2.2
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#3]
changed conditional boundary → KILLED

3.3
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#3]
negated conditional → KILLED

87

1.1
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#3]
negated conditional → KILLED

2.2
Location : lambda$parseByte$0
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#3]
negated conditional → KILLED

3.3
Location : lambda$parseByte$0
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteRejectsAnythingElse(java.lang.String)]/[test-template-invocation:#6]
replaced boolean return with true for com/rox/debug/memory/HexDump::lambda$parseByte$0 → KILLED

4.4
Location : lambda$parseByte$0
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#5]
changed conditional boundary → KILLED

90

1.1
Location : parseByte
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:parseByteReadsHexWithOrWithoutAPrefix(java.lang.String, int)]/[test-template-invocation:#3]
replaced int return with 0 for com/rox/debug/memory/HexDump::parseByte → KILLED

95

1.1
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer multiplication with division → KILLED

2.2
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer addition with subtraction → KILLED

96

1.1
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtCountsWholeRowsDown()]
Replaced integer addition with subtraction → KILLED

2.2
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
replaced int return with 0 for com/rox/debug/memory/HexDump::rowLength → KILLED

3.3
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
Replaced integer addition with subtraction → KILLED

4.4
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtCountsWholeRowsDown()]
Replaced integer addition with subtraction → KILLED

5.5
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:addressAtFindsALastRowOfExactlyOneByte()]
negated conditional → KILLED

6.6
Location : rowLength
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[test-template:addressAtIsEmptyOffTheBytes(int)]/[test-template-invocation:#6]
Replaced integer addition with subtraction → KILLED

105

1.1
Location : appendHex
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced bitwise AND with OR → KILLED

2.2
Location : appendHex
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced Shift Right with Shift Left → KILLED

3.3
Location : appendHex
Killed by : com.rox.debug.memory.HexDumpTest.[engine:junit-jupiter]/[class:com.rox.debug.memory.HexDumpTest]/[method:rowsAreLabelledWithAbsoluteAddresses()]
Replaced bitwise AND with OR → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1