PanelConsoles.java

1
/*******************************************************************************
2
 * Copyhacked (H) 2012-2025.
3
 * This program and the accompanying materials
4
 * are made available under no term at all, use it like
5
 * you want, but share and discuss it
6
 * every time possible with every body.
7
 *
8
 * Contributors:
9
 *      ron190 at ymail dot com - initial implementation
10
 *******************************************************************************/
11
package com.jsql.view.swing.panel;
12
13
import com.jsql.model.InjectionModel;
14
import com.jsql.util.I18nUtil;
15
import com.jsql.util.LogLevelUtil;
16
import com.jsql.util.PreferencesUtil;
17
import com.jsql.view.swing.console.JTextPaneAppender;
18
import com.jsql.view.swing.console.SimpleConsoleAdapter;
19
import com.jsql.view.swing.panel.consoles.NetworkTable;
20
import com.jsql.view.swing.panel.consoles.TabbedPaneNetworkTab;
21
import com.jsql.view.swing.panel.split.SplitNS;
22
import com.jsql.view.swing.tab.TabbedPaneWheeled;
23
import com.jsql.view.swing.text.JPopupTextArea;
24
import com.jsql.view.swing.text.JTextAreaPlaceholderConsole;
25
import com.jsql.view.swing.text.JToolTipI18n;
26
import com.jsql.view.swing.util.I18nViewUtil;
27
import com.jsql.view.swing.util.JSplitPaneWithZeroSizeDivider;
28
import com.jsql.view.swing.util.MediatorHelper;
29
import com.jsql.view.swing.util.UiUtil;
30
import org.apache.commons.lang3.StringUtils;
31
import org.apache.logging.log4j.LogManager;
32
import org.apache.logging.log4j.Logger;
33
34
import javax.swing.*;
35
import javax.swing.table.DefaultTableModel;
36
import java.awt.*;
37
import java.awt.event.MouseAdapter;
38
import java.awt.event.MouseEvent;
39
import java.util.concurrent.atomic.AtomicReference;
40
import java.util.prefs.Preferences;
41
42
/**
43
 * A panel with different consoles displayed on the bottom.
44
 */
45
public class PanelConsoles extends JPanel {
46
47
    private static final Logger LOGGER = LogManager.getRootLogger();
48
49
    public static final String CONSOLE_JAVA_TOOLTIP = "CONSOLE_JAVA_TOOLTIP";
50
    public static final String CONSOLE_CHUNK_TOOLTIP = "CONSOLE_CHUNK_TOOLTIP";
51
    public static final String CONSOLE_BINARY_TOOLTIP = "CONSOLE_BINARY_TOOLTIP";
52
    public static final String CONSOLE_MAIN_TOOLTIP = "CONSOLE_MAIN_TOOLTIP";
53
54
    /**
55
     * Console for java exception messages.
56
     */
57
    private final SimpleConsoleAdapter javaTextPane = new SimpleConsoleAdapter("Java", I18nUtil.valueByKey(PanelConsoles.CONSOLE_JAVA_TOOLTIP));
58
    
59
    /**
60
     * Console for raw SQL results.
61
     */
62
    private JTextArea chunkTextArea;
63
64
    /**
65
     * Panel displaying table of HTTP requests and responses.
66
     */
67
    private JSplitPane networkSplitPane;
68
69
    /**
70
     * Console for binary representation of characters found with blind/time injection.
71
     */
72
    private JTextArea binaryTextArea;
73
74
    private final TabbedPaneWheeled tabConsoles = new TabbedPaneWheeled();
75
    private TabbedPaneNetworkTab tabbedPaneNetworkTab;
76
    private NetworkTable networkTable;
77
    
78
    private final JLabel labelShowNorth = new JLabel(UiUtil.ARROW_UP.getIcon());
79
    private int dividerLocation = 0;
80
    
81
    /**
82
     * Create panel at the bottom with different consoles to report injection process.
83
     */
84
    public PanelConsoles() {
85 1 1. <init> : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_JAVA_TOOLTIP, this.javaTextPane.getProxy());
86 1 1. <init> : removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE
        this.javaTextPane.getProxy().setEditable(false);
87 1 1. <init> : removed call to com/jsql/view/swing/console/JTextPaneAppender::registerJavaConsole → NO_COVERAGE
        JTextPaneAppender.registerJavaConsole(this.javaTextPane);
88
        
89 1 1. <init> : removed call to com/jsql/view/swing/panel/PanelConsoles::initSplit → NO_COVERAGE
        this.initSplit();
90
91 1 1. <init> : removed call to com/jsql/view/swing/util/MediatorHelper::register → NO_COVERAGE
        MediatorHelper.register(this.tabConsoles);
92 1 1. <init> : removed call to com/jsql/view/swing/panel/PanelConsoles::initTabsConsoles → NO_COVERAGE
        this.initTabsConsoles();
93 1 1. <init> : removed call to com/jsql/view/swing/panel/PanelConsoles::setLayout → NO_COVERAGE
        this.setLayout(new BorderLayout());
94
95
        JPanel expandPanel = this.initExpandPanel();
96 1 1. <init> : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::putClientProperty → NO_COVERAGE
        this.tabConsoles.putClientProperty("JTabbedPane.trailingComponent", expandPanel);
97
        this.add(this.tabConsoles);
98
99 1 1. <init> : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setAlignmentX → NO_COVERAGE
        this.tabConsoles.setAlignmentX(FlowLayout.LEADING);
100
    }
101
102
    private void initSplit() {
103
        this.networkSplitPane = new JSplitPaneWithZeroSizeDivider(JSplitPane.HORIZONTAL_SPLIT);
104 1 1. initSplit : removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE
        this.networkSplitPane.setDividerLocation(600);
105 1 1. initSplit : removed call to javax/swing/JSplitPane::setPreferredSize → NO_COVERAGE
        this.networkSplitPane.setPreferredSize(new Dimension(0,0));  // required for correct scroll placement
106
107
        this.tabbedPaneNetworkTab = new TabbedPaneNetworkTab();
108 1 1. initSplit : removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE
        this.networkSplitPane.setRightComponent(this.tabbedPaneNetworkTab);
109
        this.networkTable = new NetworkTable(this.tabbedPaneNetworkTab);
110
        
111
        JPanel panelTable = new JPanel(new BorderLayout());  // required for correct scroll placement
112 1 1. initSplit : removed call to javax/swing/JPanel::add → NO_COVERAGE
        panelTable.add(new JScrollPane(this.networkTable), BorderLayout.CENTER);
113 1 1. initSplit : removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE
        this.networkSplitPane.setLeftComponent(panelTable);
114
    }
115
116
    private void initTabsConsoles() {
117
        var proxyChunk = new JTextAreaPlaceholderConsole(I18nUtil.valueByKey(PanelConsoles.CONSOLE_CHUNK_TOOLTIP));
118
        this.chunkTextArea = new JPopupTextArea(proxyChunk).getProxy();
119 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_CHUNK_TOOLTIP, proxyChunk);
120 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE
        this.chunkTextArea.setLineWrap(true);
121 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE
        this.chunkTextArea.setEditable(false);
122
123
        var proxyBinary = new JTextAreaPlaceholderConsole(I18nUtil.valueByKey(PanelConsoles.CONSOLE_BINARY_TOOLTIP));
124 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_BINARY_TOOLTIP, proxyBinary);
125
        this.binaryTextArea = new JPopupTextArea(proxyBinary).getProxy();
126 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE
        this.binaryTextArea.setLineWrap(true);
127 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE
        this.binaryTextArea.setEditable(false);
128
129
        var consoleTextPane = new SimpleConsoleAdapter("Console", I18nUtil.valueByKey(PanelConsoles.CONSOLE_MAIN_TOOLTIP));
130 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_MAIN_TOOLTIP, consoleTextPane.getProxy());
131 1 1. initTabsConsoles : removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE
        consoleTextPane.getProxy().setEditable(false);
132 1 1. initTabsConsoles : removed call to com/jsql/view/swing/console/JTextPaneAppender::register → NO_COVERAGE
        JTextPaneAppender.register(consoleTextPane);
133
134 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
135
            "CONSOLE_MAIN_LABEL",
136
            PanelConsoles.CONSOLE_MAIN_TOOLTIP,
137
                UiUtil.CONSOLE.getIcon(),
138
            new JScrollPane(consoleTextPane.getProxy()),
139
            0
140
        );
141
142
        var preferences = Preferences.userRoot().node(InjectionModel.class.getName());  // Order is important
143 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.JAVA_VISIBLE, false)) {
144 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertJavaTab → NO_COVERAGE
            this.insertJavaTab();
145
        }
146 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.NETWORK_VISIBLE, true)) {
147 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertNetworkTab → NO_COVERAGE
            this.insertNetworkTab();
148
        }
149 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.CHUNK_VISIBLE, true)) {
150 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertChunkTab → NO_COVERAGE
            this.insertChunkTab();
151
        }
152 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.BINARY_VISIBLE, true)) {
153 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertBooleanTab → NO_COVERAGE
            this.insertBooleanTab();
154
        }
155
156 1 1. initTabsConsoles : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseListener → NO_COVERAGE
        this.tabConsoles.addMouseListener(new MouseAdapter() {
157
            @Override
158
            public void mousePressed(MouseEvent e) {
159
                int tabIndex = PanelConsoles.this.tabConsoles.indexAtLocation(e.getX(), e.getY());
160 2 1. mousePressed : negated conditional → NO_COVERAGE
2. mousePressed : negated conditional → NO_COVERAGE
                if (tabIndex == -1 && e.getButton() == MouseEvent.BUTTON2) {  // middle click on header with no tab
161 1 1. mousePressed : removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE
                    SplitNS.getActionHideShowConsole().actionPerformed(null);
162
                }
163
            }
164
        });
165 1 1. initTabsConsoles : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addChangeListener → NO_COVERAGE
        this.tabConsoles.addChangeListener(changeEvent -> {  // Reset Font when tab is selected
166
            JTabbedPane tabs = this.tabConsoles;
167 2 1. lambda$initTabsConsoles$0 : negated conditional → NO_COVERAGE
2. lambda$initTabsConsoles$0 : changed conditional boundary → NO_COVERAGE
            if (tabs.getSelectedIndex() > -1) {
168
                var currentTabHeader = tabs.getTabComponentAt(tabs.getSelectedIndex());
169 1 1. lambda$initTabsConsoles$0 : negated conditional → NO_COVERAGE
                if (currentTabHeader != null) {
170 1 1. lambda$initTabsConsoles$0 : removed call to java/awt/Component::setFont → NO_COVERAGE
                    currentTabHeader.setFont(currentTabHeader.getFont().deriveFont(Font.PLAIN));
171 1 1. lambda$initTabsConsoles$0 : removed call to java/awt/Component::setForeground → NO_COVERAGE
                    currentTabHeader.setForeground(UIManager.getColor("TabbedPane.foreground"));
172
                }
173
            }
174
        });
175
    }
176
177
    private JPanel initExpandPanel() {
178
        var labelShowSouth = new JLabel(UiUtil.ARROW_DOWN.getIcon());
179 1 1. initExpandPanel : removed call to javax/swing/JLabel::setName → NO_COVERAGE
        labelShowSouth.setName("buttonShowSouth");
180 1 1. initExpandPanel : removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE
        labelShowSouth.addMouseListener(new MouseAdapter() {
181
            @Override
182
            public void mouseClicked(MouseEvent e) {
183 1 1. mouseClicked : removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE
                SplitNS.getActionHideShowConsole().actionPerformed(null);
184
            }
185
        });
186
        
187 1 1. initExpandPanel : removed call to javax/swing/JLabel::setName → NO_COVERAGE
        this.labelShowNorth.setName("buttonShowNorth");
188 1 1. initExpandPanel : removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE
        this.labelShowNorth.addMouseListener(new MouseAdapter() {
189
            @Override
190
            public void mouseClicked(MouseEvent e) {
191 1 1. mouseClicked : removed call to com/jsql/view/swing/panel/split/ActionHideShowResult::actionPerformed → NO_COVERAGE
                SplitNS.getActionHideShowResult().actionPerformed(null);
192
            }
193
        });
194
195
        var panelExpander = new JPanel();
196 1 1. initExpandPanel : removed call to javax/swing/JPanel::setLayout → NO_COVERAGE
        panelExpander.setLayout(new BoxLayout(panelExpander, BoxLayout.X_AXIS));
197
        panelExpander.add(Box.createGlue());
198
        panelExpander.add(this.labelShowNorth);
199
        panelExpander.add(labelShowSouth);
200 1 1. initExpandPanel : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::initExpandPanel → NO_COVERAGE
        return panelExpander;
201
    }
202
203
    public void reset() {
204
        // Empty infos tabs
205 1 1. reset : removed call to javax/swing/JTextArea::setText → NO_COVERAGE
        this.chunkTextArea.setText(StringUtils.EMPTY);
206 1 1. reset : removed call to javax/swing/JTextArea::setText → NO_COVERAGE
        this.binaryTextArea.setText(StringUtils.EMPTY);
207 1 1. reset : removed call to javax/swing/JTextPane::setText → NO_COVERAGE
        this.javaTextPane.getProxy().setText(StringUtils.EMPTY);
208
209 1 1. reset : removed call to java/util/List::clear → NO_COVERAGE
        this.networkTable.getListHttpHeader().clear();
210
        // Fix #4657, Fix #1860: Multiple Exceptions on setRowCount()
211
        try {
212 1 1. reset : removed call to javax/swing/table/DefaultTableModel::setRowCount → NO_COVERAGE
            ((DefaultTableModel) this.networkTable.getModel()).setRowCount(0);
213
        } catch(NullPointerException | ArrayIndexOutOfBoundsException e) {
214
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
215
        }
216
217 1 1. reset : removed call to com/jsql/view/swing/panel/consoles/TabbedPaneNetworkTab::reset → NO_COVERAGE
        this.tabbedPaneNetworkTab.reset();
218
    }
219
220
    /**
221
     * Add Chunk console to bottom panel.
222
     */
223
    public void insertChunkTab() {
224 1 1. insertChunkTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
225
            "CONSOLE_CHUNK_LABEL",
226
            PanelConsoles.CONSOLE_CHUNK_TOOLTIP,
227
            UiUtil.CHUNK.getIcon(),
228
            new JScrollPane(this.chunkTextArea),
229
            1
230
        );
231
    }
232
233
    /**
234
     * Add Binary console to bottom panel.
235
     */
236
    public void insertBooleanTab() {
237 1 1. insertBooleanTab : negated conditional → NO_COVERAGE
        var positionFromChunk = this.tabConsoles.indexOfTab(UiUtil.CHUNK.getIcon()) != -1 ? 1 : 0;
238 1 1. insertBooleanTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
239
            "CONSOLE_BINARY_LABEL",
240
            PanelConsoles.CONSOLE_BINARY_TOOLTIP,
241 1 1. insertBooleanTab : Replaced integer addition with subtraction → NO_COVERAGE
            UiUtil.BINARY.getIcon(),
242
            new JScrollPane(this.binaryTextArea),
243
            1 + positionFromChunk
244
        );
245
    }
246
247
    /**
248
     * Add Network tab to bottom panel.
249
     */
250
    public void insertNetworkTab() {
251 1 1. insertNetworkTab : negated conditional → NO_COVERAGE
        var positionFromJava = this.tabConsoles.indexOfTab(UiUtil.CUP.getIcon()) != -1 ? 1 : 0;
252 1 1. insertNetworkTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
253
            "CONSOLE_NETWORK_LABEL",
254
            "CONSOLE_NETWORK_TOOLTIP",
255
            UiUtil.NETWORK.getIcon(),
256
            new JScrollPane(this.networkSplitPane),
257 1 1. insertNetworkTab : Replaced integer subtraction with addition → NO_COVERAGE
            this.tabConsoles.getTabCount() - positionFromJava
258
        );
259
    }
260
261
    /**
262
     * Add Java console to bottom panel.
263
     */
264
    public void insertJavaTab() {
265 1 1. insertJavaTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
266
            "CONSOLE_JAVA_LABEL",
267
            PanelConsoles.CONSOLE_JAVA_TOOLTIP,
268
            UiUtil.CUP.getIcon(),
269
            new JScrollPane(this.javaTextPane.getProxy()),
270
            this.tabConsoles.getTabCount()
271
        );
272
    }
273
    
274
    private void buildI18nTab(String keyLabel, String keyTooltip, Icon icon, Component manager, int position) {
275
        var refJToolTipI18n = new AtomicReference<>(new JToolTipI18n(I18nViewUtil.valueByKey(keyTooltip)));
276
        
277
        var labelTab = new JLabel(I18nViewUtil.valueByKey(keyLabel), icon, SwingConstants.CENTER) {
278
            @Override
279
            public JToolTip createToolTip() {
280 1 1. createToolTip : removed call to java/util/concurrent/atomic/AtomicReference::set → NO_COVERAGE
                refJToolTipI18n.set(new JToolTipI18n(I18nViewUtil.valueByKey(keyTooltip)));
281 1 1. createToolTip : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles$4::createToolTip → NO_COVERAGE
                return refJToolTipI18n.get();
282
            }
283
        };
284
        
285 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::setName → NO_COVERAGE
        labelTab.setName(keyLabel);
286 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::addMouseListener → NO_COVERAGE
        labelTab.addMouseListener(new MouseAdapter() {
287
            @Override
288
            public void mousePressed(MouseEvent event) {
289
                // Fix #90428: IllegalArgumentException
290
                // Fix #92973: ArrayIndexOutOfBoundsException
291
                try {
292 1 1. mousePressed : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setSelectedComponent → NO_COVERAGE
                    PanelConsoles.this.tabConsoles.setSelectedComponent(manager);
293
                } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException e) {
294
                    LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
295
                }
296
            }
297
        });
298
        
299 1 1. buildI18nTab : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::insertTab → NO_COVERAGE
        this.tabConsoles.insertTab(I18nViewUtil.valueByKey(keyLabel), icon, manager, null, position);
300 1 1. buildI18nTab : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setTabComponentAt → NO_COVERAGE
        this.tabConsoles.setTabComponentAt(this.tabConsoles.indexOfTab(I18nViewUtil.valueByKey(keyLabel)), labelTab);
301
        
302 1 1. buildI18nTab : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(keyLabel, labelTab);
303 1 1. buildI18nTab : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(keyTooltip, refJToolTipI18n.get());
304 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::setToolTipText → NO_COVERAGE
        labelTab.setToolTipText(I18nViewUtil.valueByKey(keyTooltip));
305
    }
306
    
307
    public void messageChunk(String text) {
308
        try {
309 1 1. messageChunk : removed call to javax/swing/JTextArea::append → NO_COVERAGE
            this.chunkTextArea.append(text +"\n");
310 1 1. messageChunk : removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE
            this.chunkTextArea.setCaretPosition(this.chunkTextArea.getDocument().getLength());
311
        } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
312
            // Fix #67063: NullPointerException on chunkTab.append()
313
            // Fix #4770 on chunkTab.append()
314
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e.getMessage(), e);
315
        }
316
    }
317
    
318
    public void messageBinary(String text) {
319
        try {
320 1 1. messageBinary : removed call to javax/swing/JTextArea::append → NO_COVERAGE
            this.binaryTextArea.append(String.format("\t%s", text));
321 1 1. messageBinary : removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE
            this.binaryTextArea.setCaretPosition(this.binaryTextArea.getDocument().getLength());
322
        } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
323
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e.getMessage(), e);
324
        }
325
    }
326
    
327
    
328
    // Getter and setter
329
330
    public int getDividerLocation() {
331 1 1. getDividerLocation : replaced int return with 0 for com/jsql/view/swing/panel/PanelConsoles::getDividerLocation → NO_COVERAGE
        return this.dividerLocation;
332
    }
333
334
    public void setDividerLocation(int location) {
335
        this.dividerLocation = location;
336
    }
337
338
    public JLabel getLabelShowNorth() {
339 1 1. getLabelShowNorth : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getLabelShowNorth → NO_COVERAGE
        return this.labelShowNorth;
340
    }
341
342
    public NetworkTable getNetworkTable() {
343 1 1. getNetworkTable : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getNetworkTable → NO_COVERAGE
        return this.networkTable;
344
    }
345
346
    public TabbedPaneNetworkTab getTabbedPaneNetworkTab() {
347 1 1. getTabbedPaneNetworkTab : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getTabbedPaneNetworkTab → NO_COVERAGE
        return this.tabbedPaneNetworkTab;
348
    }
349
}

Mutations

85

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

86

1.1
Location : <init>
Killed by : none
removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE

87

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/console/JTextPaneAppender::registerJavaConsole → NO_COVERAGE

89

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::initSplit → NO_COVERAGE

91

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/util/MediatorHelper::register → NO_COVERAGE

92

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::initTabsConsoles → NO_COVERAGE

93

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::setLayout → NO_COVERAGE

96

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::putClientProperty → NO_COVERAGE

99

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setAlignmentX → NO_COVERAGE

104

1.1
Location : initSplit
Killed by : none
removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE

105

1.1
Location : initSplit
Killed by : none
removed call to javax/swing/JSplitPane::setPreferredSize → NO_COVERAGE

108

1.1
Location : initSplit
Killed by : none
removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE

112

1.1
Location : initSplit
Killed by : none
removed call to javax/swing/JPanel::add → NO_COVERAGE

113

1.1
Location : initSplit
Killed by : none
removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE

119

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

120

1.1
Location : initTabsConsoles
Killed by : none
removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE

121

1.1
Location : initTabsConsoles
Killed by : none
removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE

124

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

126

1.1
Location : initTabsConsoles
Killed by : none
removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE

127

1.1
Location : initTabsConsoles
Killed by : none
removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE

130

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

131

1.1
Location : initTabsConsoles
Killed by : none
removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE

132

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/console/JTextPaneAppender::register → NO_COVERAGE

134

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE

143

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

144

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::insertJavaTab → NO_COVERAGE

146

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

147

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::insertNetworkTab → NO_COVERAGE

149

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

150

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::insertChunkTab → NO_COVERAGE

152

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

153

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::insertBooleanTab → NO_COVERAGE

156

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseListener → NO_COVERAGE

160

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

2.2
Location : mousePressed
Killed by : none
negated conditional → NO_COVERAGE

161

1.1
Location : mousePressed
Killed by : none
removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE

165

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addChangeListener → NO_COVERAGE

167

1.1
Location : lambda$initTabsConsoles$0
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : lambda$initTabsConsoles$0
Killed by : none
changed conditional boundary → NO_COVERAGE

169

1.1
Location : lambda$initTabsConsoles$0
Killed by : none
negated conditional → NO_COVERAGE

170

1.1
Location : lambda$initTabsConsoles$0
Killed by : none
removed call to java/awt/Component::setFont → NO_COVERAGE

171

1.1
Location : lambda$initTabsConsoles$0
Killed by : none
removed call to java/awt/Component::setForeground → NO_COVERAGE

179

1.1
Location : initExpandPanel
Killed by : none
removed call to javax/swing/JLabel::setName → NO_COVERAGE

180

1.1
Location : initExpandPanel
Killed by : none
removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE

183

1.1
Location : mouseClicked
Killed by : none
removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE

187

1.1
Location : initExpandPanel
Killed by : none
removed call to javax/swing/JLabel::setName → NO_COVERAGE

188

1.1
Location : initExpandPanel
Killed by : none
removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE

191

1.1
Location : mouseClicked
Killed by : none
removed call to com/jsql/view/swing/panel/split/ActionHideShowResult::actionPerformed → NO_COVERAGE

196

1.1
Location : initExpandPanel
Killed by : none
removed call to javax/swing/JPanel::setLayout → NO_COVERAGE

200

1.1
Location : initExpandPanel
Killed by : none
replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::initExpandPanel → NO_COVERAGE

205

1.1
Location : reset
Killed by : none
removed call to javax/swing/JTextArea::setText → NO_COVERAGE

206

1.1
Location : reset
Killed by : none
removed call to javax/swing/JTextArea::setText → NO_COVERAGE

207

1.1
Location : reset
Killed by : none
removed call to javax/swing/JTextPane::setText → NO_COVERAGE

209

1.1
Location : reset
Killed by : none
removed call to java/util/List::clear → NO_COVERAGE

212

1.1
Location : reset
Killed by : none
removed call to javax/swing/table/DefaultTableModel::setRowCount → NO_COVERAGE

217

1.1
Location : reset
Killed by : none
removed call to com/jsql/view/swing/panel/consoles/TabbedPaneNetworkTab::reset → NO_COVERAGE

224

1.1
Location : insertChunkTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE

237

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

238

1.1
Location : insertBooleanTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE

241

1.1
Location : insertBooleanTab
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

251

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

252

1.1
Location : insertNetworkTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE

257

1.1
Location : insertNetworkTab
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

265

1.1
Location : insertJavaTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE

280

1.1
Location : createToolTip
Killed by : none
removed call to java/util/concurrent/atomic/AtomicReference::set → NO_COVERAGE

281

1.1
Location : createToolTip
Killed by : none
replaced return value with null for com/jsql/view/swing/panel/PanelConsoles$4::createToolTip → NO_COVERAGE

285

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles$4::setName → NO_COVERAGE

286

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles$4::addMouseListener → NO_COVERAGE

292

1.1
Location : mousePressed
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setSelectedComponent → NO_COVERAGE

299

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::insertTab → NO_COVERAGE

300

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setTabComponentAt → NO_COVERAGE

302

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

303

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE

304

1.1
Location : buildI18nTab
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles$4::setToolTipText → NO_COVERAGE

309

1.1
Location : messageChunk
Killed by : none
removed call to javax/swing/JTextArea::append → NO_COVERAGE

310

1.1
Location : messageChunk
Killed by : none
removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE

320

1.1
Location : messageBinary
Killed by : none
removed call to javax/swing/JTextArea::append → NO_COVERAGE

321

1.1
Location : messageBinary
Killed by : none
removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE

331

1.1
Location : getDividerLocation
Killed by : none
replaced int return with 0 for com/jsql/view/swing/panel/PanelConsoles::getDividerLocation → NO_COVERAGE

339

1.1
Location : getLabelShowNorth
Killed by : none
replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getLabelShowNorth → NO_COVERAGE

343

1.1
Location : getNetworkTable
Killed by : none
replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getNetworkTable → NO_COVERAGE

347

1.1
Location : getTabbedPaneNetworkTab
Killed by : none
replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getTabbedPaneNetworkTab → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.22.0