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

Mutations

54

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

63

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

64

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

66

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

67

1.1
Location : highlight
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
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:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
Replaced integer addition with subtraction → KILLED

69

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

77

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

78

1.1
Location : lambda$markChangesFromBelow$0
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
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:otherLinesAreLeftAlone()]
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:headersAreMarkedWhole()]
negated conditional → KILLED

91

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

92

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

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

94

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

95

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

98

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

99

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

100

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

102

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

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

106

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

107

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

110

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

112

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

113

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

115

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:whatStoppedTheEmulationIsMarked()]
Replaced integer subtraction with addition → KILLED

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

117

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

120

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

127

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

130

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

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:aBreakpointMarkIsMarked()]
Replaced integer addition with subtraction → KILLED

136

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

137

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

138

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

140

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

141

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

144

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

145

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

152

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

155

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

157

1.1
Location : highlightInstruction
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:anUnrecognisedMnemonicStillGetsItsAddressAndOperand()]
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:anUnrecognisedMnemonicStillGetsItsAddressAndOperand()]
Replaced integer addition with subtraction → KILLED

158

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

160

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

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:aStateWithoutFlagsStillColoursItsRegisters()]
Replaced integer addition with subtraction → KILLED

173

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

175

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

178

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

179

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

181

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

184

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

185

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

191

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

192

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

194

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

196

1.1
Location : highlightState
Killed by : com.rox.debug.cpu.CpuTextHighlighterTest.[engine:junit-jupiter]/[class:com.rox.debug.cpu.CpuTextHighlighterTest]/[method:eachLinesValuesThatDifferFromTheLineBelowAreMarked()]
replaced return value with null for com/rox/debug/cpu/CpuTextHighlighter::highlightState → 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:#5]
negated conditional → KILLED

201

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

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:#5]
negated conditional → KILLED

204

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

206

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

207

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

209

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

210

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