CpuTextHighlighter.java

1
package com.rox.debug.cpu;
2
3
import java.util.ArrayList;
4
import java.util.HashMap;
5
import java.util.List;
6
import java.util.Map;
7
import java.util.Set;
8
import java.util.regex.Matcher;
9
import java.util.regex.Pattern;
10
11
/**
12
 * Finds what to color in {@link CpuStateText#panel} output. Spans may overlap: a background kind
13
 * ({@link Kind#CHANGED}, {@link Kind#CURRENT_LINE}) layers over a text-colour kind. On instruction lines
14
 * carrying a state, each value that differs from the next such line down is marked {@link Kind#CHANGED}.
15
 */
16
public final class CpuTextHighlighter {
17
    public enum Kind {
18
        PAUSED, REGISTER_NAME, REGISTER_VALUE, CHANGED, FLAG_SET, FLAG_CLEAR, ACTIVE, HEADER,
19
        CURRENT_LINE, ADDRESS, JUMP_FLASH, FLOW, LOAD_STORE, ARITHMETIC, FLAGS_AND_STACK, IMMEDIATE, OPERAND, UNKNOWN
20
    }
21
22
    /** {@code length} characters of the text from {@code start}. */
23
    public record Span(int start, int length, Kind kind) {
24
    }
25
26
    private static final Set<String> FLOW = Set.of("JMP", "JSR", "RTS", "RTI", "BRK",
27
            "BCC", "BCS", "BEQ", "BMI", "BNE", "BPL", "BVC", "BVS");
28
    private static final Set<String> LOAD_STORE = Set.of("LDA", "LDX", "LDY", "STA", "STX", "STY",
29
            "TAX", "TAY", "TXA", "TYA", "TSX", "TXS");
30
    private static final Set<String> ARITHMETIC = Set.of("ADC", "SBC", "AND", "ORA", "EOR", "CMP", "CPX", "CPY",
31
            "BIT", "ASL", "LSR", "ROL", "ROR", "INC", "DEC", "INX", "INY", "DEX", "DEY");
32
    private static final Set<String> FLAGS_AND_STACK = Set.of("CLC", "SEC", "CLI", "SEI", "CLV", "CLD", "SED",
33
            "PHA", "PLA", "PHP", "PLP", "NOP");
34
35
    private static final Pattern REGISTER = Pattern.compile("(PC|A|X|Y|SP): (\\$[0-9A-F]+)");
36
    private static final Pattern ACTIVE = Pattern.compile("\\b(asserted|yes)\\b");
37
    private static final Pattern INSTRUCTION = Pattern.compile("([> ]) (\\$[0-9A-F]{4})  (\\S+(?: \\S+)?)(?: +(A:.*))?");
38
    private static final Pattern LINE_REGISTER = Pattern.compile("(A|X|Y|SP):([0-9A-F]{2})");
39
    private static final Pattern LINE_FLAGS = Pattern.compile("[Nn][Vv]-[Bb][Dd][Ii][Zz][Cc]");
40
    private static final Pattern LINE_INTERRUPT = Pattern.compile("\\b(irq|nmi)\\b");
41
    private static final String FLAG_NAMES = "NV-BDIZC";
42
    private static final String FLAGS_PREFIX = "Flags: ";
43
    private static final int FLAG_COUNT = 8; //NV-BDIZC
44
45
    private CpuTextHighlighter(){
46
    }
47
48
    /**
49
     * @param changed register/flag names to mark as {@link Kind#CHANGED} - see {@link RegisterChanges}
50
     */
51
    public static List<Span> highlight(final String text, final Set<String> changed){
52 1 1. highlight : replaced return value with Collections.emptyList for com/rox/debug/cpu/CpuTextHighlighter::highlight → KILLED
        return highlight(text, changed, false);
53
    }
54
55
    /** @param flashCurrentAddress also mark the current instruction's address as {@link Kind#JUMP_FLASH} - see {@link JumpFlash} */
56
    public static List<Span> highlight(final String text, final Set<String> changed, final boolean flashCurrentAddress){
57
        final List<Span> spans = new ArrayList<>();
58
        final List<LineState> states = new ArrayList<>();
59
        int lineStart = 0;
60
        for (final String line : text.split("\n", -1)){
61 1 1. highlight : removed call to com/rox/debug/cpu/CpuTextHighlighter::highlightLine → KILLED
            highlightLine(line, lineStart, changed, flashCurrentAddress, spans, states);
62 2 1. highlight : Replaced integer addition with subtraction → KILLED
2. highlight : Replaced integer addition with subtraction → KILLED
            lineStart += line.length() + 1;
63
        }
64 3 1. highlight : negated conditional → KILLED
2. highlight : changed conditional boundary → KILLED
3. highlight : Replaced integer addition with subtraction → KILLED
        for (int i = 0; i + 1 < states.size(); i++){
65 2 1. highlight : removed call to com/rox/debug/cpu/CpuTextHighlighter::markChangesFromBelow → KILLED
2. highlight : Replaced integer addition with subtraction → KILLED
            markChangesFromBelow(states.get(i), states.get(i + 1), spans);
66
        }
67 1 1. highlight : replaced return value with Collections.emptyList for com/rox/debug/cpu/CpuTextHighlighter::highlight → KILLED
        return spans;
68
    }
69
70
    /** One instruction line's state values, by name ({@code A}, {@code N}, {@code irq}...), with where each sits. */
71
    private record LineState(Map<String, String> values, Map<String, Integer> offsets) {
72
    }
73
74
    private static void markChangesFromBelow(final LineState line, final LineState below, final List<Span> spans){
75 1 1. markChangesFromBelow : removed call to java/util/Map::forEach → KILLED
        line.values().forEach((name, value) -> {
76 1 1. lambda$markChangesFromBelow$0 : negated conditional → KILLED
            if (!value.equals(below.values().get(name))){
77
                spans.add(new Span(line.offsets().get(name), value.length(), Kind.CHANGED));
78
            }
79
        });
80
    }
81
82
    private static void highlightLine(final String line, final int offset, final Set<String> changed,
83
                                      final boolean flashCurrentAddress, final List<Span> spans,
84
                                      final List<LineState> states){
85 1 1. highlightLine : negated conditional → KILLED
        if (line.startsWith("PAUSED")){
86
            spans.add(new Span(offset, "PAUSED".length(), Kind.PAUSED));
87 1 1. highlightLine : negated conditional → KILLED
        } else if (line.startsWith("PC: ")){
88
            final Matcher register = REGISTER.matcher(line);
89 1 1. highlightLine : negated conditional → KILLED
            while (register.find()){
90 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                spans.add(new Span(offset + register.start(1), register.group(1).length(), Kind.REGISTER_NAME));
91 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                spans.add(new Span(offset + register.start(2), register.group(2).length(), Kind.REGISTER_VALUE));
92 1 1. highlightLine : negated conditional → KILLED
                if (changed.contains(register.group(1))){
93 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                    spans.add(new Span(offset + register.start(2), register.group(2).length(), Kind.CHANGED));
94
                }
95
            }
96 1 1. highlightLine : negated conditional → KILLED
        } else if (line.startsWith(FLAGS_PREFIX)){
97 2 1. highlightLine : negated conditional → KILLED
2. highlightLine : changed conditional boundary → KILLED
            for (int i = 0; i < FLAG_COUNT; i++){
98 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                final int column = FLAGS_PREFIX.length() + i;
99
                final char flag = line.charAt(column);
100 1 1. highlightLine : negated conditional → KILLED
                if (flag == '-'){
101
                    continue;
102
                }
103 2 1. highlightLine : Replaced integer addition with subtraction → KILLED
2. highlightLine : negated conditional → KILLED
                spans.add(new Span(offset + column, 1, Character.isUpperCase(flag) ? Kind.FLAG_SET : Kind.FLAG_CLEAR));
104 1 1. highlightLine : negated conditional → KILLED
                if (changed.contains(String.valueOf(Character.toUpperCase(flag)))){
105 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                    spans.add(new Span(offset + column, 1, Kind.CHANGED));
106
                }
107
            }
108 1 1. highlightLine : negated conditional → KILLED
        } else if (line.startsWith("IRQ line: ")){
109
            final Matcher active = ACTIVE.matcher(line);
110 1 1. highlightLine : negated conditional → KILLED
            while (active.find()){
111 1 1. highlightLine : Replaced integer addition with subtraction → KILLED
                spans.add(new Span(offset + active.start(), active.group().length(), Kind.ACTIVE));
112
            }
113 1 1. highlightLine : negated conditional → KILLED
        } else if (line.startsWith("---")){
114
            spans.add(new Span(offset, line.length(), Kind.HEADER));
115
        } else {
116 1 1. highlightLine : removed call to com/rox/debug/cpu/CpuTextHighlighter::highlightInstruction → KILLED
            highlightInstruction(line, offset, flashCurrentAddress, spans, states);
117
        }
118
    }
119
120
    private static void highlightInstruction(final String line, final int offset, final boolean flashCurrentAddress,
121
                                             final List<Span> spans, final List<LineState> states){
122
        final Matcher instruction = INSTRUCTION.matcher(line);
123 1 1. highlightInstruction : negated conditional → KILLED
        if (!instruction.matches()){
124
            return;
125
        }
126 1 1. highlightInstruction : negated conditional → KILLED
        if (instruction.group(1).equals(">")){
127
            spans.add(new Span(offset, line.length(), Kind.CURRENT_LINE));
128
        }
129 1 1. highlightInstruction : Replaced integer addition with subtraction → KILLED
        spans.add(new Span(offset + instruction.start(2), instruction.group(2).length(), Kind.ADDRESS));
130 2 1. highlightInstruction : negated conditional → KILLED
2. highlightInstruction : negated conditional → KILLED
        if (flashCurrentAddress && instruction.group(1).equals(">")){
131 1 1. highlightInstruction : Replaced integer addition with subtraction → KILLED
            spans.add(new Span(offset + instruction.start(2), instruction.group(2).length(), Kind.JUMP_FLASH));
132
        }
133 1 1. highlightInstruction : negated conditional → KILLED
        if (instruction.group(4) != null){
134 1 1. highlightInstruction : Replaced integer addition with subtraction → KILLED
            states.add(highlightState(instruction.group(4), offset + instruction.start(4), spans));
135
        }
136
        final String code = instruction.group(3);
137 1 1. highlightInstruction : Replaced integer addition with subtraction → KILLED
        final int codeStart = offset + instruction.start(3);
138 1 1. highlightInstruction : negated conditional → KILLED
        if (code.startsWith("???")){
139
            spans.add(new Span(codeStart, code.length(), Kind.UNKNOWN));
140
            return;
141
        }
142
        final String[] parts = code.split(" ", 2);
143
        final String mnemonic = parts[0];
144
        final Kind kind = mnemonicKind(mnemonic);
145 1 1. highlightInstruction : negated conditional → KILLED
        if (kind != null){
146
            spans.add(new Span(codeStart, mnemonic.length(), kind));
147
        }
148 1 1. highlightInstruction : negated conditional → KILLED
        if (parts.length == 2){
149
            final String operand = parts[1];
150 2 1. highlightInstruction : Replaced integer addition with subtraction → KILLED
2. highlightInstruction : Replaced integer addition with subtraction → KILLED
            final int operandStart = codeStart + mnemonic.length() + 1;
151 1 1. highlightInstruction : negated conditional → KILLED
            if (operand.startsWith("#")){
152
                spans.add(new Span(operandStart, operand.length(), Kind.IMMEDIATE));
153 1 1. highlightInstruction : negated conditional → KILLED
            } else if (operand.contains("$")){
154
                spans.add(new Span(operandStart, operand.length(), Kind.OPERAND));
155
            }
156
        }
157
    }
158
159
    /** Colours an instruction line's state, returning its values for the line-to-line comparison. */
160
    private static LineState highlightState(final String state, final int offset, final List<Span> spans){
161
        final Map<String, String> values = new HashMap<>();
162
        final Map<String, Integer> offsets = new HashMap<>();
163
        final Matcher register = LINE_REGISTER.matcher(state);
164 1 1. highlightState : negated conditional → KILLED
        while (register.find()){
165 1 1. highlightState : Replaced integer addition with subtraction → KILLED
            spans.add(new Span(offset + register.start(1), register.group(1).length(), Kind.REGISTER_NAME));
166 1 1. highlightState : Replaced integer addition with subtraction → KILLED
            spans.add(new Span(offset + register.start(2), register.group(2).length(), Kind.REGISTER_VALUE));
167
            values.put(register.group(1), register.group(2));
168 1 1. highlightState : Replaced integer addition with subtraction → KILLED
            offsets.put(register.group(1), offset + register.start(2));
169
        }
170
        final Matcher flags = LINE_FLAGS.matcher(state);
171 1 1. highlightState : negated conditional → KILLED
        if (flags.find()){
172 2 1. highlightState : changed conditional boundary → KILLED
2. highlightState : negated conditional → KILLED
            for (int i = 0; i < FLAG_NAMES.length(); i++){
173
                final char flag = flags.group().charAt(i);
174 1 1. highlightState : negated conditional → KILLED
                if (flag == '-'){
175
                    continue;
176
                }
177 2 1. highlightState : Replaced integer addition with subtraction → KILLED
2. highlightState : Replaced integer addition with subtraction → KILLED
                final int at = offset + flags.start() + i;
178 1 1. highlightState : negated conditional → KILLED
                spans.add(new Span(at, 1, Character.isUpperCase(flag) ? Kind.FLAG_SET : Kind.FLAG_CLEAR));
179
                values.put(String.valueOf(FLAG_NAMES.charAt(i)), String.valueOf(flag));
180
                offsets.put(String.valueOf(FLAG_NAMES.charAt(i)), at);
181
            }
182
        }
183
        final Matcher interrupt = LINE_INTERRUPT.matcher(state);
184 1 1. highlightState : negated conditional → KILLED
        while (interrupt.find()){
185 1 1. highlightState : Replaced integer addition with subtraction → KILLED
            spans.add(new Span(offset + interrupt.start(), interrupt.group().length(), Kind.ACTIVE));
186
            values.put(interrupt.group(), interrupt.group());
187 1 1. highlightState : Replaced integer addition with subtraction → KILLED
            offsets.put(interrupt.group(), offset + interrupt.start());
188
        }
189 1 1. highlightState : replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::highlightState → KILLED
        return new LineState(values, offsets);
190
    }
191
192
    private static Kind mnemonicKind(final String mnemonic){
193 1 1. mnemonicKind : negated conditional → KILLED
        if (FLOW.contains(mnemonic)){
194 1 1. mnemonicKind : replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED
            return Kind.FLOW;
195
        }
196 1 1. mnemonicKind : negated conditional → KILLED
        if (LOAD_STORE.contains(mnemonic)){
197 1 1. mnemonicKind : replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED
            return Kind.LOAD_STORE;
198
        }
199 1 1. mnemonicKind : negated conditional → KILLED
        if (ARITHMETIC.contains(mnemonic)){
200 1 1. mnemonicKind : replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED
            return Kind.ARITHMETIC;
201
        }
202 1 1. mnemonicKind : negated conditional → KILLED
        if (FLAGS_AND_STACK.contains(mnemonic)){
203 1 1. mnemonicKind : replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED
            return Kind.FLAGS_AND_STACK;
204
        }
205
        return null;
206
    }
207
}

Mutations

52

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:headersAreMarkedWhole()]
replaced return value with Collections.emptyList for com/rox/debug/cpu/CpuTextHighlighter::highlight → KILLED

61

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:headersAreMarkedWhole()]
removed call to com/rox/debug/cpu/CpuTextHighlighter::highlightLine → KILLED

62

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
Replaced integer addition with subtraction → KILLED

2.2
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
Replaced integer addition with subtraction → KILLED

64

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
negated conditional → KILLED

2.2
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
changed conditional boundary → KILLED

3.3
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
Replaced integer addition with subtraction → KILLED

65

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
removed call to com/rox/debug/cpu/CpuTextHighlighter::markChangesFromBelow → KILLED

2.2
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
Replaced integer addition with subtraction → KILLED

67

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:headersAreMarkedWhole()]
replaced return value with Collections.emptyList for com/rox/debug/cpu/CpuTextHighlighter::highlight → KILLED

75

1.1
Location : markChangesFromBelow
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
removed call to java/util/Map::forEach → KILLED

76

1.1
Location : lambda$markChangesFromBelow$0
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
negated conditional → KILLED

85

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
negated conditional → KILLED

87

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:headersAreMarkedWhole()]
negated conditional → KILLED

89

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:registersGetNameAndValueAndChangedValuesAreMarked()]
negated conditional → KILLED

90

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:registersGetNameAndValueAndChangedValuesAreMarked()]
Replaced integer addition with subtraction → KILLED

91

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:registersGetNameAndValueAndChangedValuesAreMarked()]
Replaced integer addition with subtraction → KILLED

92

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:registersGetNameAndValueAndChangedValuesAreMarked()]
negated conditional → KILLED

93

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:registersGetNameAndValueAndChangedValuesAreMarked()]
Replaced integer addition with subtraction → KILLED

96

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
negated conditional → KILLED

97

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
negated conditional → KILLED

2.2
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
changed conditional boundary → KILLED

98

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
Replaced integer addition with subtraction → KILLED

100

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
negated conditional → KILLED

103

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
Replaced integer addition with subtraction → KILLED

2.2
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
negated conditional → KILLED

104

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
negated conditional → KILLED

105

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:flagsAreSetOrClearAndChangedFlagsAreMarked()]
Replaced integer addition with subtraction → KILLED

108

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:headersAreMarkedWhole()]
negated conditional → KILLED

110

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:activeInterruptLinesAreMarked()]
negated conditional → KILLED

111

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:activeInterruptLinesAreMarked()]
Replaced integer addition with subtraction → KILLED

113

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
negated conditional → KILLED

116

1.1
Location : highlightLine
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
removed call to com/rox/debug/cpu/CpuTextHighlighter::highlightInstruction → KILLED

123

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:otherLinesAreLeftAlone()]
negated conditional → KILLED

126

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
negated conditional → KILLED

129

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
Replaced integer addition with subtraction → KILLED

130

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aJumpFlashMarksOnlyTheCurrentInstructionsAddress()]
negated conditional → KILLED

2.2
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentInstructionLineIsMarkedWhole()]
negated conditional → KILLED

131

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aJumpFlashMarksOnlyTheCurrentInstructionsAddress()]
Replaced integer addition with subtraction → KILLED

133

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
negated conditional → KILLED

134

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
Replaced integer addition with subtraction → KILLED

137

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
Replaced integer addition with subtraction → KILLED

138

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:unknownBytesAreMarkedWhole()]
negated conditional → KILLED

145

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#5]
negated conditional → KILLED

148

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#5]
negated conditional → KILLED

150

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentInstructionLineIsMarkedWhole()]
Replaced integer addition with subtraction → KILLED

2.2
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentInstructionLineIsMarkedWhole()]
Replaced integer addition with subtraction → KILLED

151

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentInstructionLineIsMarkedWhole()]
negated conditional → KILLED

153

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:anUnrecognisedMnemonicStillGetsItsAddressAndOperand()]
negated conditional → KILLED

164

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
negated conditional → KILLED

165

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
Replaced integer addition with subtraction → KILLED

166

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
Replaced integer addition with subtraction → KILLED

168

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
Replaced integer addition with subtraction → KILLED

171

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
negated conditional → KILLED

172

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theLowestLineHasNothingBelowToCompareWith()]
changed conditional boundary → KILLED

2.2
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
negated conditional → KILLED

174

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
negated conditional → KILLED

177

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
Replaced integer addition with subtraction → KILLED

2.2
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
Replaced integer addition with subtraction → KILLED

178

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aLinesStateIsColouredLikeTheHeaderRegisters()]
negated conditional → KILLED

184

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aStateWithoutFlagsStillColoursItsRegisters()]
negated conditional → KILLED

185

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:aLinesStateIsColouredLikeTheHeaderRegisters()]
Replaced integer addition with subtraction → KILLED

187

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:anInterruptAppearingIsMarkedButOneGoingAwayHasNothingToMark()]
Replaced integer addition with subtraction → KILLED

189

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:theCurrentLineIsComparedWithTheLatestHistoryLineAcrossTheHeader()]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::highlightState → KILLED

193

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#5]
negated conditional → KILLED

194

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#3]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED

196

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#5]
negated conditional → KILLED

197

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#5]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED

199

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#6]
negated conditional → KILLED

200

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#7]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED

202

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#9]
negated conditional → KILLED

203

1.1
Location : mnemonicKind
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[test-template:mnemonicsAreColouredByKind(java.lang.String, com.rox.debug.cpu.CpuTextHighlighter$Kind)]/[test-template-invocation:#9]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::mnemonicKind → KILLED

Active mutators

Tests examined


Report generated by PIT 1.22.1