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/panel/PanelConsoles::setLayout → NO_COVERAGE
        this.setLayout(new BorderLayout());
86 1 1. <init> : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_JAVA_TOOLTIP, this.javaTextPane.getProxy());
87 1 1. <init> : removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE
        this.javaTextPane.getProxy().setEditable(false);
88 1 1. <init> : removed call to com/jsql/view/swing/console/JTextPaneAppender::registerJavaConsole → NO_COVERAGE
        JTextPaneAppender.registerJavaConsole(this.javaTextPane);
89
90 1 1. <init> : removed call to com/jsql/view/swing/panel/PanelConsoles::initSplit → NO_COVERAGE
        this.initSplit();
91
92 1 1. <init> : removed call to com/jsql/view/swing/util/MediatorHelper::register → NO_COVERAGE
        MediatorHelper.register(this.tabConsoles);
93 1 1. <init> : removed call to com/jsql/view/swing/panel/PanelConsoles::initTabsConsoles → NO_COVERAGE
        this.initTabsConsoles();
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
100
    private void initSplit() {
101
        this.networkSplitPane = new JSplitPaneWithZeroSizeDivider(JSplitPane.HORIZONTAL_SPLIT);
102 1 1. initSplit : removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE
        this.networkSplitPane.setDividerLocation(600);
103
104
        this.tabbedPaneNetworkTab = new TabbedPaneNetworkTab();
105 1 1. initSplit : removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE
        this.networkSplitPane.setRightComponent(this.tabbedPaneNetworkTab);
106
        this.networkTable = new NetworkTable(this.tabbedPaneNetworkTab);
107
108
        JPanel panelTable = new JPanel(new BorderLayout());  // required for correct scroll placement
109 1 1. initSplit : removed call to javax/swing/JPanel::add → NO_COVERAGE
        panelTable.add(new JScrollPane(this.networkTable), BorderLayout.CENTER);
110 1 1. initSplit : removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE
        this.networkSplitPane.setLeftComponent(panelTable);
111
    }
112
113
    private void initTabsConsoles() {
114
        var proxyChunk = new JTextAreaPlaceholderConsole(I18nUtil.valueByKey(PanelConsoles.CONSOLE_CHUNK_TOOLTIP));
115
        this.chunkTextArea = new JPopupTextArea(proxyChunk).getProxy();
116 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_CHUNK_TOOLTIP, proxyChunk);
117 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE
        this.chunkTextArea.setLineWrap(true);
118 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE
        this.chunkTextArea.setEditable(false);
119
120
        var proxyBinary = new JTextAreaPlaceholderConsole(I18nUtil.valueByKey(PanelConsoles.CONSOLE_BINARY_TOOLTIP));
121 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_BINARY_TOOLTIP, proxyBinary);
122
        this.binaryTextArea = new JPopupTextArea(proxyBinary).getProxy();
123 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setLineWrap → NO_COVERAGE
        this.binaryTextArea.setLineWrap(true);
124 1 1. initTabsConsoles : removed call to javax/swing/JTextArea::setEditable → NO_COVERAGE
        this.binaryTextArea.setEditable(false);
125
126
        var consoleTextPane = new SimpleConsoleAdapter("Console", I18nUtil.valueByKey(PanelConsoles.CONSOLE_MAIN_TOOLTIP));
127 1 1. initTabsConsoles : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(PanelConsoles.CONSOLE_MAIN_TOOLTIP, consoleTextPane.getProxy());
128 1 1. initTabsConsoles : removed call to javax/swing/JTextPane::setEditable → NO_COVERAGE
        consoleTextPane.getProxy().setEditable(false);
129 1 1. initTabsConsoles : removed call to com/jsql/view/swing/console/JTextPaneAppender::register → NO_COVERAGE
        JTextPaneAppender.register(consoleTextPane);
130
131 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
132
            "CONSOLE_MAIN_LABEL",
133
            PanelConsoles.CONSOLE_MAIN_TOOLTIP,
134
            UiUtil.CONSOLE.getIcon(),
135
            new JScrollPane(consoleTextPane.getProxy()),
136
            0
137
        );
138
139
        var preferences = Preferences.userRoot().node(InjectionModel.class.getName());  // Order is important
140 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.JAVA_VISIBLE, false)) {
141 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertJavaTab → NO_COVERAGE
            this.insertJavaTab();
142
        }
143 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.NETWORK_VISIBLE, true)) {
144 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertNetworkTab → NO_COVERAGE
            this.insertNetworkTab();
145
        }
146 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.CHUNK_VISIBLE, true)) {
147 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertChunkTab → NO_COVERAGE
            this.insertChunkTab();
148
        }
149 1 1. initTabsConsoles : negated conditional → NO_COVERAGE
        if (preferences.getBoolean(PreferencesUtil.BINARY_VISIBLE, true)) {
150 1 1. initTabsConsoles : removed call to com/jsql/view/swing/panel/PanelConsoles::insertBooleanTab → NO_COVERAGE
            this.insertBooleanTab();
151
        }
152
153 1 1. initTabsConsoles : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseListener → NO_COVERAGE
        this.tabConsoles.addMouseListener(new MouseAdapter() {
154
            @Override
155
            public void mousePressed(MouseEvent e) {
156
                int tabIndex = PanelConsoles.this.tabConsoles.indexAtLocation(e.getX(), e.getY());
157 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
158 1 1. mousePressed : removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE
                    SplitNS.getActionHideShowConsole().actionPerformed(null);
159
                }
160
            }
161
        });
162 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
163
            JTabbedPane tabs = this.tabConsoles;
164 2 1. lambda$initTabsConsoles$0 : negated conditional → NO_COVERAGE
2. lambda$initTabsConsoles$0 : changed conditional boundary → NO_COVERAGE
            if (tabs.getSelectedIndex() > -1) {
165
                var currentTabHeader = tabs.getTabComponentAt(tabs.getSelectedIndex());
166 1 1. lambda$initTabsConsoles$0 : negated conditional → NO_COVERAGE
                if (currentTabHeader != null) {
167 1 1. lambda$initTabsConsoles$0 : removed call to java/awt/Component::setFont → NO_COVERAGE
                    currentTabHeader.setFont(currentTabHeader.getFont().deriveFont(Font.PLAIN));
168 1 1. lambda$initTabsConsoles$0 : removed call to java/awt/Component::setForeground → NO_COVERAGE
                    currentTabHeader.setForeground(UIManager.getColor("TabbedPane.foreground"));
169
                }
170
            }
171
        });
172
    }
173
174
    private JPanel initExpandPanel() {
175
        var labelShowSouth = new JLabel(UiUtil.ARROW_DOWN.getIcon());
176 1 1. initExpandPanel : removed call to javax/swing/JLabel::setName → NO_COVERAGE
        labelShowSouth.setName("buttonShowSouth");
177 1 1. initExpandPanel : removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE
        labelShowSouth.addMouseListener(new MouseAdapter() {
178
            @Override
179
            public void mouseClicked(MouseEvent e) {
180 1 1. mouseClicked : removed call to com/jsql/view/swing/panel/split/ActionHideShowConsole::actionPerformed → NO_COVERAGE
                SplitNS.getActionHideShowConsole().actionPerformed(null);
181
            }
182
        });
183
        
184 1 1. initExpandPanel : removed call to javax/swing/JLabel::setName → NO_COVERAGE
        this.labelShowNorth.setName("buttonShowNorth");
185 1 1. initExpandPanel : removed call to javax/swing/JLabel::addMouseListener → NO_COVERAGE
        this.labelShowNorth.addMouseListener(new MouseAdapter() {
186
            @Override
187
            public void mouseClicked(MouseEvent e) {
188 1 1. mouseClicked : removed call to com/jsql/view/swing/panel/split/ActionHideShowResult::actionPerformed → NO_COVERAGE
                SplitNS.getActionHideShowResult().actionPerformed(null);
189
            }
190
        });
191
192
        var panelExpander = new JPanel();
193 1 1. initExpandPanel : removed call to javax/swing/JPanel::setLayout → NO_COVERAGE
        panelExpander.setLayout(new BoxLayout(panelExpander, BoxLayout.LINE_AXIS));
194
        panelExpander.add(Box.createGlue());
195
        panelExpander.add(this.labelShowNorth);
196
        panelExpander.add(labelShowSouth);
197 1 1. initExpandPanel : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::initExpandPanel → NO_COVERAGE
        return panelExpander;
198
    }
199
200
    public void reset() {
201
        // Empty infos tabs
202 1 1. reset : removed call to javax/swing/JTextArea::setText → NO_COVERAGE
        this.chunkTextArea.setText(StringUtils.EMPTY);
203 1 1. reset : removed call to javax/swing/JTextArea::setText → NO_COVERAGE
        this.binaryTextArea.setText(StringUtils.EMPTY);
204 1 1. reset : removed call to javax/swing/JTextPane::setText → NO_COVERAGE
        this.javaTextPane.getProxy().setText(StringUtils.EMPTY);
205
206 1 1. reset : removed call to java/util/List::clear → NO_COVERAGE
        this.networkTable.getListHttpHeader().clear();
207
        // Fix #4657, Fix #1860: Multiple Exceptions on setRowCount()
208
        try {
209 1 1. reset : removed call to javax/swing/table/DefaultTableModel::setRowCount → NO_COVERAGE
            ((DefaultTableModel) this.networkTable.getModel()).setRowCount(0);
210
        } catch(NullPointerException | ArrayIndexOutOfBoundsException e) {
211
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
212
        }
213
214 1 1. reset : removed call to com/jsql/view/swing/panel/consoles/TabbedPaneNetworkTab::reset → NO_COVERAGE
        this.tabbedPaneNetworkTab.reset();
215
    }
216
217
    /**
218
     * Add Chunk console to bottom panel.
219
     */
220
    public void insertChunkTab() {
221 1 1. insertChunkTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
222
            "CONSOLE_CHUNK_LABEL",
223
            PanelConsoles.CONSOLE_CHUNK_TOOLTIP,
224
            UiUtil.CHUNK.getIcon(),
225
            new JScrollPane(this.chunkTextArea),
226
            1
227
        );
228
    }
229
230
    /**
231
     * Add Binary console to bottom panel.
232
     */
233
    public void insertBooleanTab() {
234 1 1. insertBooleanTab : negated conditional → NO_COVERAGE
        var positionFromChunk = this.tabConsoles.indexOfTab(UiUtil.CHUNK.getIcon()) != -1 ? 1 : 0;
235 1 1. insertBooleanTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
236
            "CONSOLE_BINARY_LABEL",
237
            PanelConsoles.CONSOLE_BINARY_TOOLTIP,
238 1 1. insertBooleanTab : Replaced integer addition with subtraction → NO_COVERAGE
            UiUtil.BINARY.getIcon(),
239
            new JScrollPane(this.binaryTextArea),
240
            1 + positionFromChunk
241
        );
242
    }
243
244
    /**
245
     * Add Network tab to bottom panel.
246
     */
247
    public void insertNetworkTab() {
248 1 1. insertNetworkTab : negated conditional → NO_COVERAGE
        var positionFromJava = this.tabConsoles.indexOfTab(UiUtil.CUP.getIcon()) != -1 ? 1 : 0;
249 1 1. insertNetworkTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
250
            "CONSOLE_NETWORK_LABEL",
251
            "CONSOLE_NETWORK_TOOLTIP",
252
            UiUtil.NETWORK.getIcon(),
253
            this.networkSplitPane,  // no scroller on split, instead managed by scrollers on network table and tabs
254 1 1. insertNetworkTab : Replaced integer subtraction with addition → NO_COVERAGE
            this.tabConsoles.getTabCount() - positionFromJava
255
        );
256
    }
257
258
    /**
259
     * Add Java console to bottom panel.
260
     */
261
    public void insertJavaTab() {
262 1 1. insertJavaTab : removed call to com/jsql/view/swing/panel/PanelConsoles::buildI18nTab → NO_COVERAGE
        this.buildI18nTab(
263
            "CONSOLE_JAVA_LABEL",
264
            PanelConsoles.CONSOLE_JAVA_TOOLTIP,
265
            UiUtil.CUP.getIcon(),
266
            new JScrollPane(this.javaTextPane.getProxy()),
267
            this.tabConsoles.getTabCount()
268
        );
269
    }
270
    
271
    private void buildI18nTab(String keyLabel, String keyTooltip, Icon icon, Component manager, int position) {
272
        var refJToolTipI18n = new AtomicReference<>(new JToolTipI18n(I18nViewUtil.valueByKey(keyTooltip)));
273
        
274
        var labelTab = new JLabel(I18nViewUtil.valueByKey(keyLabel), icon, SwingConstants.CENTER) {
275
            @Override
276
            public JToolTip createToolTip() {
277 1 1. createToolTip : removed call to java/util/concurrent/atomic/AtomicReference::set → NO_COVERAGE
                refJToolTipI18n.set(new JToolTipI18n(I18nViewUtil.valueByKey(keyTooltip)));
278 1 1. createToolTip : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles$4::createToolTip → NO_COVERAGE
                return refJToolTipI18n.get();
279
            }
280
        };
281
        
282 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::setName → NO_COVERAGE
        labelTab.setName(keyLabel);
283 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::addMouseListener → NO_COVERAGE
        labelTab.addMouseListener(new MouseAdapter() {
284
            @Override
285
            public void mousePressed(MouseEvent event) {
286
                // Fix #90428: IllegalArgumentException
287
                // Fix #92973: ArrayIndexOutOfBoundsException
288
                try {
289 1 1. mousePressed : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setSelectedComponent → NO_COVERAGE
                    PanelConsoles.this.tabConsoles.setSelectedComponent(manager);
290
                } catch (ArrayIndexOutOfBoundsException | IllegalArgumentException e) {
291
                    LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
292
                }
293
            }
294
        });
295
        
296 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);
297 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);
298
        
299 1 1. buildI18nTab : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(keyLabel, labelTab);
300 1 1. buildI18nTab : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
        I18nViewUtil.addComponentForKey(keyTooltip, refJToolTipI18n.get());
301 1 1. buildI18nTab : removed call to com/jsql/view/swing/panel/PanelConsoles$4::setToolTipText → NO_COVERAGE
        labelTab.setToolTipText(I18nViewUtil.valueByKey(keyTooltip));
302
    }
303
    
304
    public void messageChunk(String text) {
305
        try {
306 1 1. messageChunk : removed call to javax/swing/JTextArea::append → NO_COVERAGE
            this.chunkTextArea.append(text +"\n");
307 1 1. messageChunk : removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE
            this.chunkTextArea.setCaretPosition(this.chunkTextArea.getDocument().getLength());
308
        } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
309
            // Fix #67063: NullPointerException on chunkTab.append()
310
            // Fix #4770 on chunkTab.append()
311
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e.getMessage(), e);
312
        }
313
    }
314
    
315
    public void messageBinary(String text) {
316
        try {
317 1 1. messageBinary : removed call to javax/swing/JTextArea::append → NO_COVERAGE
            this.binaryTextArea.append(String.format("\t%s", text));
318 1 1. messageBinary : removed call to javax/swing/JTextArea::setCaretPosition → NO_COVERAGE
            this.binaryTextArea.setCaretPosition(this.binaryTextArea.getDocument().getLength());
319
        } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
320
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e.getMessage(), e);
321
        }
322
    }
323
    
324
    
325
    // Getter and setter
326
327
    public int getDividerLocation() {
328 1 1. getDividerLocation : replaced int return with 0 for com/jsql/view/swing/panel/PanelConsoles::getDividerLocation → NO_COVERAGE
        return this.dividerLocation;
329
    }
330
331
    public void setDividerLocation(int location) {
332
        this.dividerLocation = location;
333
    }
334
335
    public JLabel getLabelShowNorth() {
336 1 1. getLabelShowNorth : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getLabelShowNorth → NO_COVERAGE
        return this.labelShowNorth;
337
    }
338
339
    public NetworkTable getNetworkTable() {
340 1 1. getNetworkTable : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getNetworkTable → NO_COVERAGE
        return this.networkTable;
341
    }
342
343
    public TabbedPaneNetworkTab getTabbedPaneNetworkTab() {
344 1 1. getTabbedPaneNetworkTab : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getTabbedPaneNetworkTab → NO_COVERAGE
        return this.tabbedPaneNetworkTab;
345
    }
346
347
    public JSplitPane getNetworkSplitPane() {
348 1 1. getNetworkSplitPane : replaced return value with null for com/jsql/view/swing/panel/PanelConsoles::getNetworkSplitPane → NO_COVERAGE
        return this.networkSplitPane;
349
    }
350
}

Mutations

85

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

86

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

87

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

88

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

90

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

92

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

93

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

96

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

102

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::setRightComponent → NO_COVERAGE

109

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

110

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

116

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

117

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

118

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

121

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

123

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

124

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

127

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

128

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

129

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

131

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

140

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

141

1.1
Location : initTabsConsoles
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::insertJavaTab → 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::insertNetworkTab → 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::insertChunkTab → 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::insertBooleanTab → NO_COVERAGE

153

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

157

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

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

158

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

162

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

164

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

166

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

167

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

168

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

176

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

177

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

180

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

184

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

185

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

188

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

193

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

197

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

202

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

203

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

204

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

206

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

209

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

214

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

221

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

234

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

235

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

238

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

248

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

249

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

254

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

262

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

277

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

278

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

282

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

283

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

289

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

296

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

297

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

299

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

300

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

301

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

306

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

307

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

317

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

318

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

328

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

336

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

340

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

344

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

348

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

Active mutators

Tests examined


Report generated by PIT 1.22.0