1 | package com.jsql.view.swing.panel.preferences; | |
2 | ||
3 | import com.jsql.util.tampering.TamperingType; | |
4 | import com.jsql.view.swing.panel.PanelPreferences; | |
5 | import com.jsql.view.swing.scrollpane.LightScrollPane; | |
6 | import com.jsql.view.swing.sql.lexer.HighlightedDocument; | |
7 | import com.jsql.view.swing.tab.TabHeader.Cleanable; | |
8 | import com.jsql.view.swing.text.JPopupTextPane; | |
9 | import com.jsql.view.swing.text.JTextPanePlaceholder; | |
10 | import com.jsql.view.swing.text.listener.DocumentListenerEditing; | |
11 | import com.jsql.view.swing.util.MediatorHelper; | |
12 | import com.jsql.view.swing.util.UiUtil; | |
13 | ||
14 | import javax.swing.*; | |
15 | import java.awt.*; | |
16 | import java.util.AbstractMap.SimpleEntry; | |
17 | import java.util.stream.Stream; | |
18 | ||
19 | public class PanelTampering extends JPanel implements Cleanable { | |
20 | | |
21 | private final JCheckBox checkboxIsTamperingBase64 = new JCheckBox(); | |
22 | private final JCheckBox checkboxIsTamperingVersionComment = new JCheckBox(); | |
23 | private final JCheckBox checkboxIsTamperingFunctionComment = new JCheckBox(); | |
24 | private final JCheckBox checkboxIsTamperingEqualToLike = new JCheckBox(); | |
25 | private final JCheckBox checkboxIsTamperingRandomCase = new JCheckBox(); | |
26 | private final JCheckBox checkboxIsTamperingEval = new JCheckBox(); | |
27 | private final JCheckBox checkboxIsTamperingHexToChar = new JCheckBox(); | |
28 | private final JCheckBox checkboxIsTamperingStringToChar = new JCheckBox(); | |
29 | private final JCheckBox checkboxIsTamperingQuoteToUtf8 = new JCheckBox(); | |
30 | private final JRadioButton radioIsTamperingSpaceToMultilineComment = new JRadioButton(); | |
31 | private final JRadioButton radioIsTamperingSpaceToDashComment = new JRadioButton(); | |
32 | private final JRadioButton radioIsTamperingSpaceToSharpComment = new JRadioButton(); | |
33 | | |
34 | private final JTextPane textPaneEval; | |
35 | ||
36 | public PanelTampering(PanelPreferences panelPreferences) { | |
37 | | |
38 |
1
1. <init> : removed call to com/jsql/view/swing/panel/preferences/PanelTampering::setBorder → NO_COVERAGE |
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
39 | ||
40 | var emptyLabelCommonConversion = new JLabel(); | |
41 | var labelCommonConversion = new JLabel("<html><b>Common conversion</b></html>"); | |
42 | ||
43 | String tooltipIsTamperingBase64 = TamperingType.BASE64.instance().getTooltip(); | |
44 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingBase64.setToolTipText(tooltipIsTamperingBase64); |
45 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingBase64.setFocusable(false); |
46 | var labelIsTamperingBase64 = new JButton(TamperingType.BASE64.instance().getDescription()); | |
47 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingBase64.setToolTipText(tooltipIsTamperingBase64); |
48 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingBase64.addActionListener(actionEvent -> { |
49 | | |
50 |
2
1. lambda$new$0 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$0 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingBase64.setSelected(!this.checkboxIsTamperingBase64.isSelected()); |
51 |
1
1. lambda$new$0 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
52 | }); | |
53 | | |
54 | String tooltipIsTamperingFunctionComment = TamperingType.COMMENT_TO_METHOD_SIGNATURE.instance().getTooltip(); | |
55 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingFunctionComment.setToolTipText(tooltipIsTamperingFunctionComment); |
56 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingFunctionComment.setFocusable(false); |
57 | var labelIsTamperingFunctionComment = new JButton(TamperingType.COMMENT_TO_METHOD_SIGNATURE.instance().getDescription()); | |
58 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingFunctionComment.setToolTipText(tooltipIsTamperingFunctionComment); |
59 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingFunctionComment.addActionListener(actionEvent -> { |
60 | | |
61 |
2
1. lambda$new$1 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$1 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingFunctionComment.setSelected(!this.checkboxIsTamperingFunctionComment.isSelected()); |
62 |
1
1. lambda$new$1 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
63 | }); | |
64 | | |
65 | String tooltipIsTamperingEqualToLike = TamperingType.EQUAL_TO_LIKE.instance().getTooltip(); | |
66 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingEqualToLike.setToolTipText(tooltipIsTamperingEqualToLike); |
67 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingEqualToLike.setFocusable(false); |
68 | var labelIsTamperingEqualToLike = new JButton(TamperingType.EQUAL_TO_LIKE.instance().getDescription()); | |
69 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingEqualToLike.setToolTipText(tooltipIsTamperingEqualToLike); |
70 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingEqualToLike.addActionListener(actionEvent -> { |
71 | | |
72 |
2
1. lambda$new$2 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$2 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingEqualToLike.setSelected(!this.checkboxIsTamperingEqualToLike.isSelected()); |
73 |
1
1. lambda$new$2 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
74 | }); | |
75 | | |
76 | String tooltipIsTamperingRandomCase = TamperingType.RANDOM_CASE.instance().getTooltip(); | |
77 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingRandomCase.setToolTipText(tooltipIsTamperingRandomCase); |
78 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingRandomCase.setFocusable(false); |
79 | var labelIsTamperingRandomCase = new JButton(TamperingType.RANDOM_CASE.instance().getDescription()); | |
80 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingRandomCase.setToolTipText(tooltipIsTamperingRandomCase); |
81 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingRandomCase.addActionListener(actionEvent -> { |
82 | | |
83 |
2
1. lambda$new$3 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$3 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingRandomCase.setSelected(!this.checkboxIsTamperingRandomCase.isSelected()); |
84 |
1
1. lambda$new$3 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
85 | }); | |
86 | | |
87 | var tooltipIsTamperingEval = "Custom tamper in JavaScript and Java, e.g. sql.replace(/\\+/gm,'/**/')"; | |
88 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingEval.setToolTipText(tooltipIsTamperingEval); |
89 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingEval.setFocusable(false); |
90 | | |
91 | this.textPaneEval = new JPopupTextPane(new JTextPanePlaceholder(tooltipIsTamperingEval)).getProxy(); | |
92 |
1
1. <init> : removed call to javax/swing/text/Caret::setBlinkRate → NO_COVERAGE |
this.textPaneEval.getCaret().setBlinkRate(500); |
93 | var textAreaIsTamperingEval = new LightScrollPane(this.textPaneEval); | |
94 |
1
1. <init> : removed call to com/jsql/view/swing/scrollpane/LightScrollPane::setBorder → NO_COVERAGE |
textAreaIsTamperingEval.setBorder(UiUtil.BORDER_FOCUS_LOST); |
95 |
1
1. <init> : removed call to com/jsql/view/swing/scrollpane/LightScrollPane::setMinimumSize → NO_COVERAGE |
textAreaIsTamperingEval.setMinimumSize(new Dimension(400, 100)); |
96 | ||
97 | var emptySpaceConversion = new JLabel(); | |
98 | var labelSpaceConversion = new JLabel("<html><br /><b>Space conversion (use double click to uncheck)</b></html>"); | |
99 | ||
100 | var groupSpaceToComment = new ButtonGroup(); | |
101 |
1
1. <init> : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE |
groupSpaceToComment.add(this.radioIsTamperingSpaceToDashComment); |
102 |
1
1. <init> : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE |
groupSpaceToComment.add(this.radioIsTamperingSpaceToMultilineComment); |
103 |
1
1. <init> : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE |
groupSpaceToComment.add(this.radioIsTamperingSpaceToSharpComment); |
104 | | |
105 | String tooltipIsTamperingSpaceToMultilineComment = TamperingType.SPACE_TO_MULTILINE_COMMENT.instance().getTooltip(); | |
106 |
1
1. <init> : removed call to javax/swing/JRadioButton::setToolTipText → NO_COVERAGE |
this.radioIsTamperingSpaceToMultilineComment.setToolTipText(tooltipIsTamperingSpaceToMultilineComment); |
107 |
1
1. <init> : removed call to javax/swing/JRadioButton::setFocusable → NO_COVERAGE |
this.radioIsTamperingSpaceToMultilineComment.setFocusable(false); |
108 | var labelIsTamperingSpaceToMultilineComment = new JButton(TamperingType.SPACE_TO_MULTILINE_COMMENT.instance().getDescription()); | |
109 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingSpaceToMultilineComment.setToolTipText(tooltipIsTamperingSpaceToMultilineComment); |
110 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingSpaceToMultilineComment.addActionListener(actionEvent -> { |
111 | | |
112 |
1
1. lambda$new$4 : negated conditional → NO_COVERAGE |
if (this.radioIsTamperingSpaceToMultilineComment.isSelected()) { |
113 |
1
1. lambda$new$4 : removed call to javax/swing/ButtonGroup::clearSelection → NO_COVERAGE |
groupSpaceToComment.clearSelection(); |
114 | } else { | |
115 |
2
1. lambda$new$4 : removed call to javax/swing/JRadioButton::setSelected → NO_COVERAGE 2. lambda$new$4 : negated conditional → NO_COVERAGE |
this.radioIsTamperingSpaceToMultilineComment.setSelected(!this.radioIsTamperingSpaceToMultilineComment.isSelected()); |
116 | } | |
117 | | |
118 |
1
1. lambda$new$4 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
119 | }); | |
120 | | |
121 | String tooltipIsTamperingSpaceToDashComment = TamperingType.SPACE_TO_DASH_COMMENT.instance().getTooltip(); | |
122 |
1
1. <init> : removed call to javax/swing/JRadioButton::setToolTipText → NO_COVERAGE |
this.radioIsTamperingSpaceToDashComment.setToolTipText(tooltipIsTamperingSpaceToDashComment); |
123 |
1
1. <init> : removed call to javax/swing/JRadioButton::setFocusable → NO_COVERAGE |
this.radioIsTamperingSpaceToDashComment.setFocusable(false); |
124 | var labelIsTamperingSpaceToDashComment = new JButton(TamperingType.SPACE_TO_DASH_COMMENT.instance().getDescription()); | |
125 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingSpaceToDashComment.setToolTipText(tooltipIsTamperingSpaceToDashComment); |
126 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingSpaceToDashComment.addActionListener(actionEvent -> { |
127 | | |
128 |
1
1. lambda$new$5 : negated conditional → NO_COVERAGE |
if (this.radioIsTamperingSpaceToDashComment.isSelected()) { |
129 |
1
1. lambda$new$5 : removed call to javax/swing/ButtonGroup::clearSelection → NO_COVERAGE |
groupSpaceToComment.clearSelection(); |
130 | } else { | |
131 |
2
1. lambda$new$5 : removed call to javax/swing/JRadioButton::setSelected → NO_COVERAGE 2. lambda$new$5 : negated conditional → NO_COVERAGE |
this.radioIsTamperingSpaceToDashComment.setSelected(!this.radioIsTamperingSpaceToDashComment.isSelected()); |
132 | } | |
133 | | |
134 |
1
1. lambda$new$5 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
135 | }); | |
136 | | |
137 | String tooltipIsTamperingSpaceToSharpComment = TamperingType.SPACE_TO_SHARP_COMMENT.instance().getTooltip(); | |
138 |
1
1. <init> : removed call to javax/swing/JRadioButton::setToolTipText → NO_COVERAGE |
this.radioIsTamperingSpaceToSharpComment.setToolTipText(tooltipIsTamperingSpaceToSharpComment); |
139 |
1
1. <init> : removed call to javax/swing/JRadioButton::setFocusable → NO_COVERAGE |
this.radioIsTamperingSpaceToSharpComment.setFocusable(false); |
140 | var labelIsTamperingSpaceToSharpComment = new JButton(TamperingType.SPACE_TO_SHARP_COMMENT.instance().getDescription()); | |
141 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingSpaceToSharpComment.setToolTipText(tooltipIsTamperingSpaceToSharpComment); |
142 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingSpaceToSharpComment.addActionListener(actionEvent -> { |
143 | | |
144 |
1
1. lambda$new$6 : negated conditional → NO_COVERAGE |
if (this.radioIsTamperingSpaceToSharpComment.isSelected()) { |
145 |
1
1. lambda$new$6 : removed call to javax/swing/ButtonGroup::clearSelection → NO_COVERAGE |
groupSpaceToComment.clearSelection(); |
146 | } else { | |
147 |
2
1. lambda$new$6 : removed call to javax/swing/JRadioButton::setSelected → NO_COVERAGE 2. lambda$new$6 : negated conditional → NO_COVERAGE |
this.radioIsTamperingSpaceToSharpComment.setSelected(!this.radioIsTamperingSpaceToSharpComment.isSelected()); |
148 | } | |
149 | | |
150 |
1
1. lambda$new$6 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
151 | }); | |
152 | | |
153 | String tooltipIsTamperingVersionComment = TamperingType.VERSIONED_COMMENT_TO_METHOD_SIGNATURE.instance().getTooltip(); | |
154 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingVersionComment.setToolTipText(tooltipIsTamperingVersionComment); |
155 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingVersionComment.setFocusable(false); |
156 | var labelIsTamperingVersionComment = new JButton(TamperingType.VERSIONED_COMMENT_TO_METHOD_SIGNATURE.instance().getDescription()); | |
157 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingVersionComment.setToolTipText(tooltipIsTamperingVersionComment); |
158 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingVersionComment.addActionListener(actionEvent -> { |
159 | | |
160 |
2
1. lambda$new$7 : negated conditional → NO_COVERAGE 2. lambda$new$7 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsTamperingVersionComment.setSelected(!this.checkboxIsTamperingVersionComment.isSelected()); |
161 |
1
1. lambda$new$7 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
162 | }); | |
163 | | |
164 | String tooltipIsTamperingHexToChar = TamperingType.HEX_TO_CHAR.instance().getTooltip(); | |
165 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingHexToChar.setToolTipText(tooltipIsTamperingHexToChar); |
166 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingHexToChar.setFocusable(false); |
167 | var labelIsTamperingHexToChar = new JButton(TamperingType.HEX_TO_CHAR.instance().getDescription()); | |
168 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingHexToChar.setToolTipText(tooltipIsTamperingHexToChar); |
169 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingHexToChar.addActionListener(actionEvent -> { |
170 | | |
171 |
2
1. lambda$new$8 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$8 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingHexToChar.setSelected(!this.checkboxIsTamperingHexToChar.isSelected()); |
172 |
1
1. lambda$new$8 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
173 | }); | |
174 | | |
175 | var tooltipIsTamperingQuoteToUtf8 = TamperingType.QUOTE_TO_UTF8.instance().getTooltip(); | |
176 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingQuoteToUtf8.setToolTipText(tooltipIsTamperingQuoteToUtf8); |
177 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingQuoteToUtf8.setFocusable(false); |
178 | var labelIsTamperingQuoteToUtf8 = new JButton(TamperingType.QUOTE_TO_UTF8.instance().getDescription()); | |
179 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingQuoteToUtf8.setToolTipText(tooltipIsTamperingQuoteToUtf8); |
180 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingQuoteToUtf8.addActionListener(actionEvent -> { |
181 | | |
182 |
2
1. lambda$new$9 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$9 : negated conditional → NO_COVERAGE |
this.checkboxIsTamperingQuoteToUtf8.setSelected(!this.checkboxIsTamperingQuoteToUtf8.isSelected()); |
183 |
1
1. lambda$new$9 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
184 | }); | |
185 | | |
186 | var tooltipIsTamperingStringToChar = TamperingType.STRING_TO_CHAR.instance().getTooltip(); | |
187 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsTamperingStringToChar.setToolTipText(tooltipIsTamperingStringToChar); |
188 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsTamperingStringToChar.setFocusable(false); |
189 | var labelIsTamperingStringToChar = new JButton(TamperingType.STRING_TO_CHAR.instance().getDescription()); | |
190 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsTamperingStringToChar.setToolTipText(tooltipIsTamperingStringToChar); |
191 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsTamperingStringToChar.addActionListener(actionEvent -> { |
192 | | |
193 |
2
1. lambda$new$10 : negated conditional → NO_COVERAGE 2. lambda$new$10 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsTamperingStringToChar.setSelected(!this.checkboxIsTamperingStringToChar.isSelected()); |
194 |
1
1. lambda$new$10 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
195 | }); | |
196 | | |
197 | Stream.of( | |
198 | new SimpleEntry<>(labelIsTamperingBase64, TamperingType.BASE64), | |
199 | new SimpleEntry<>(labelIsTamperingFunctionComment, TamperingType.COMMENT_TO_METHOD_SIGNATURE), | |
200 | new SimpleEntry<>(labelIsTamperingVersionComment, TamperingType.VERSIONED_COMMENT_TO_METHOD_SIGNATURE), | |
201 | new SimpleEntry<>(labelIsTamperingEqualToLike, TamperingType.EQUAL_TO_LIKE), | |
202 | new SimpleEntry<>(labelIsTamperingRandomCase, TamperingType.RANDOM_CASE), | |
203 | new SimpleEntry<>(labelIsTamperingHexToChar, TamperingType.HEX_TO_CHAR), | |
204 | new SimpleEntry<>(labelIsTamperingStringToChar, TamperingType.STRING_TO_CHAR), | |
205 | new SimpleEntry<>(labelIsTamperingQuoteToUtf8, TamperingType.QUOTE_TO_UTF8), | |
206 | new SimpleEntry<>(labelIsTamperingSpaceToMultilineComment, TamperingType.SPACE_TO_MULTILINE_COMMENT), | |
207 | new SimpleEntry<>(labelIsTamperingSpaceToDashComment, TamperingType.SPACE_TO_DASH_COMMENT), | |
208 | new SimpleEntry<>(labelIsTamperingSpaceToSharpComment, TamperingType.SPACE_TO_SHARP_COMMENT) | |
209 | ) | |
210 |
1
1. <init> : removed call to java/util/stream/Stream::forEach → NO_COVERAGE |
.forEach(entry -> { |
211 | | |
212 |
1
1. lambda$new$11 : removed call to javax/swing/JButton::addMouseListener → NO_COVERAGE |
entry.getKey().addMouseListener(new TamperingMouseAdapter(entry.getValue(), this.textPaneEval)); |
213 | | |
214 |
1
1. lambda$new$11 : removed call to javax/swing/JButton::setHorizontalAlignment → NO_COVERAGE |
entry.getKey().setHorizontalAlignment(SwingConstants.LEFT); |
215 |
1
1. lambda$new$11 : removed call to javax/swing/JButton::setBorderPainted → NO_COVERAGE |
entry.getKey().setBorderPainted(false); |
216 |
1
1. lambda$new$11 : removed call to javax/swing/JButton::setContentAreaFilled → NO_COVERAGE |
entry.getKey().setContentAreaFilled(false); |
217 | }); | |
218 | ||
219 | var emptyLabelCustomConversion = new JLabel(); | |
220 | var labelCustomConversion = new JLabel("<html><br /><b>Custom conversion</b></html>"); | |
221 | ||
222 | var document = new HighlightedDocument(HighlightedDocument.JAVASCRIPT_STYLE); | |
223 |
1
1. <init> : removed call to com/jsql/view/swing/sql/lexer/HighlightedDocument::setHighlightStyle → NO_COVERAGE |
document.setHighlightStyle(HighlightedDocument.JAVASCRIPT_STYLE); |
224 |
1
1. <init> : removed call to javax/swing/JTextPane::setStyledDocument → NO_COVERAGE |
this.textPaneEval.setStyledDocument(document); |
225 | | |
226 |
1
1. <init> : removed call to com/jsql/view/swing/sql/lexer/HighlightedDocument::addDocumentListener → NO_COVERAGE |
document.addDocumentListener(new DocumentListenerEditing() { |
227 | | |
228 | @Override | |
229 | public void process() { | |
230 | | |
231 |
1
1. process : removed call to com/jsql/util/TamperingUtil::setCustomTamper → NO_COVERAGE |
MediatorHelper.model().getMediatorUtils().getTamperingUtil().setCustomTamper(PanelTampering.this.textPaneEval.getText()); |
232 | } | |
233 | }); | |
234 | | |
235 |
1
1. <init> : removed call to javax/swing/JTextPane::setText → NO_COVERAGE |
this.textPaneEval.setText(MediatorHelper.model().getMediatorUtils().getTamperingUtil().getCustomTamper()); |
236 | | |
237 | var groupLayout = new GroupLayout(this); | |
238 |
1
1. <init> : removed call to com/jsql/view/swing/panel/preferences/PanelTampering::setLayout → NO_COVERAGE |
this.setLayout(groupLayout); |
239 | | |
240 |
1
1. <init> : removed call to javax/swing/GroupLayout::setHorizontalGroup → NO_COVERAGE |
groupLayout.setHorizontalGroup( |
241 | groupLayout | |
242 | .createSequentialGroup() | |
243 | .addGroup( | |
244 | groupLayout | |
245 | .createParallelGroup(GroupLayout.Alignment.TRAILING, false) | |
246 | .addComponent(emptyLabelCommonConversion) | |
247 | .addComponent(this.checkboxIsTamperingBase64) | |
248 | .addComponent(this.checkboxIsTamperingFunctionComment) | |
249 | .addComponent(this.checkboxIsTamperingVersionComment) | |
250 | .addComponent(this.checkboxIsTamperingEqualToLike) | |
251 | .addComponent(this.checkboxIsTamperingRandomCase) | |
252 | .addComponent(this.checkboxIsTamperingStringToChar) | |
253 | .addComponent(this.checkboxIsTamperingHexToChar) | |
254 | .addComponent(this.checkboxIsTamperingQuoteToUtf8) | |
255 | .addComponent(emptySpaceConversion) | |
256 | .addComponent(this.radioIsTamperingSpaceToMultilineComment) | |
257 | .addComponent(this.radioIsTamperingSpaceToDashComment) | |
258 | .addComponent(this.radioIsTamperingSpaceToSharpComment) | |
259 | .addComponent(emptyLabelCustomConversion) | |
260 | .addComponent(this.checkboxIsTamperingEval) | |
261 | ) | |
262 | .addGroup( | |
263 | groupLayout | |
264 | .createParallelGroup() | |
265 | .addComponent(labelCommonConversion) | |
266 | .addComponent(labelIsTamperingBase64) | |
267 | .addComponent(labelIsTamperingFunctionComment) | |
268 | .addComponent(labelIsTamperingVersionComment) | |
269 | .addComponent(labelIsTamperingEqualToLike) | |
270 | .addComponent(labelIsTamperingRandomCase) | |
271 | .addComponent(labelIsTamperingStringToChar) | |
272 | .addComponent(labelIsTamperingHexToChar) | |
273 | .addComponent(labelIsTamperingQuoteToUtf8) | |
274 | .addComponent(labelSpaceConversion) | |
275 | .addComponent(labelIsTamperingSpaceToMultilineComment) | |
276 | .addComponent(labelIsTamperingSpaceToDashComment) | |
277 | .addComponent(labelIsTamperingSpaceToSharpComment) | |
278 | .addComponent(labelCustomConversion) | |
279 | .addComponent(textAreaIsTamperingEval) | |
280 | ) | |
281 | ); | |
282 | | |
283 |
1
1. <init> : removed call to javax/swing/GroupLayout::setVerticalGroup → NO_COVERAGE |
groupLayout.setVerticalGroup( |
284 | groupLayout | |
285 | .createSequentialGroup() | |
286 | .addGroup( | |
287 | groupLayout | |
288 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
289 | .addComponent(emptyLabelCommonConversion) | |
290 | .addComponent(labelCommonConversion) | |
291 | ) | |
292 | .addGroup( | |
293 | groupLayout | |
294 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
295 | .addComponent(this.checkboxIsTamperingBase64) | |
296 | .addComponent(labelIsTamperingBase64) | |
297 | ) | |
298 | .addGroup( | |
299 | groupLayout | |
300 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
301 | .addComponent(this.checkboxIsTamperingFunctionComment) | |
302 | .addComponent(labelIsTamperingFunctionComment) | |
303 | ) | |
304 | .addGroup( | |
305 | groupLayout | |
306 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
307 | .addComponent(this.checkboxIsTamperingVersionComment) | |
308 | .addComponent(labelIsTamperingVersionComment) | |
309 | ) | |
310 | .addGroup( | |
311 | groupLayout | |
312 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
313 | .addComponent(this.checkboxIsTamperingEqualToLike) | |
314 | .addComponent(labelIsTamperingEqualToLike) | |
315 | ) | |
316 | .addGroup( | |
317 | groupLayout | |
318 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
319 | .addComponent(this.checkboxIsTamperingRandomCase) | |
320 | .addComponent(labelIsTamperingRandomCase) | |
321 | ) | |
322 | .addGroup( | |
323 | groupLayout | |
324 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
325 | .addComponent(this.checkboxIsTamperingStringToChar) | |
326 | .addComponent(labelIsTamperingStringToChar) | |
327 | ) | |
328 | .addGroup( | |
329 | groupLayout | |
330 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
331 | .addComponent(this.checkboxIsTamperingHexToChar) | |
332 | .addComponent(labelIsTamperingHexToChar) | |
333 | ) | |
334 | .addGroup( | |
335 | groupLayout | |
336 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
337 | .addComponent(this.checkboxIsTamperingQuoteToUtf8) | |
338 | .addComponent(labelIsTamperingQuoteToUtf8) | |
339 | ) | |
340 | .addGroup( | |
341 | groupLayout | |
342 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
343 | .addComponent(emptySpaceConversion) | |
344 | .addComponent(labelSpaceConversion) | |
345 | ) | |
346 | .addGroup( | |
347 | groupLayout | |
348 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
349 | .addComponent(this.radioIsTamperingSpaceToMultilineComment) | |
350 | .addComponent(labelIsTamperingSpaceToMultilineComment) | |
351 | ) | |
352 | .addGroup( | |
353 | groupLayout | |
354 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
355 | .addComponent(this.radioIsTamperingSpaceToDashComment) | |
356 | .addComponent(labelIsTamperingSpaceToDashComment) | |
357 | ) | |
358 | .addGroup( | |
359 | groupLayout | |
360 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
361 | .addComponent(this.radioIsTamperingSpaceToSharpComment) | |
362 | .addComponent(labelIsTamperingSpaceToSharpComment) | |
363 | ) | |
364 | .addGroup( | |
365 | groupLayout | |
366 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
367 | .addComponent(emptyLabelCustomConversion) | |
368 | .addComponent(labelCustomConversion) | |
369 | ) | |
370 | .addGroup( | |
371 | groupLayout | |
372 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
373 | .addComponent(this.checkboxIsTamperingEval) | |
374 | .addComponent(textAreaIsTamperingEval) | |
375 | ) | |
376 | ); | |
377 | | |
378 | Stream.of( | |
379 | this.checkboxIsTamperingEval, | |
380 | this.checkboxIsTamperingBase64, | |
381 | this.checkboxIsTamperingFunctionComment, | |
382 | this.checkboxIsTamperingVersionComment, | |
383 | this.checkboxIsTamperingEqualToLike, | |
384 | this.checkboxIsTamperingRandomCase, | |
385 | this.checkboxIsTamperingHexToChar, | |
386 | this.checkboxIsTamperingStringToChar, | |
387 | this.checkboxIsTamperingQuoteToUtf8, | |
388 | this.radioIsTamperingSpaceToMultilineComment, | |
389 | this.radioIsTamperingSpaceToDashComment, | |
390 | this.radioIsTamperingSpaceToSharpComment | |
391 | ) | |
392 |
2
1. <init> : removed call to java/util/stream/Stream::forEach → NO_COVERAGE 2. lambda$new$12 : removed call to javax/swing/JToggleButton::addActionListener → NO_COVERAGE |
.forEach(button -> button.addActionListener(panelPreferences.getActionListenerSave())); |
393 | } | |
394 | ||
395 | @Override | |
396 | public void clean() { | |
397 |
1
1. clean : removed call to com/jsql/view/swing/util/UiUtil::stopDocumentColorer → NO_COVERAGE |
UiUtil.stopDocumentColorer(this.textPaneEval); |
398 | } | |
399 | | |
400 | | |
401 | // Getter and setter | |
402 | ||
403 | public JCheckBox getCheckboxIsTamperingBase64() { | |
404 |
1
1. getCheckboxIsTamperingBase64 : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingBase64 → NO_COVERAGE |
return this.checkboxIsTamperingBase64; |
405 | } | |
406 | | |
407 | public JCheckBox getCheckboxIsTamperingEqualToLike() { | |
408 |
1
1. getCheckboxIsTamperingEqualToLike : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingEqualToLike → NO_COVERAGE |
return this.checkboxIsTamperingEqualToLike; |
409 | } | |
410 | | |
411 | public JCheckBox getCheckboxIsTamperingFunctionComment() { | |
412 |
1
1. getCheckboxIsTamperingFunctionComment : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingFunctionComment → NO_COVERAGE |
return this.checkboxIsTamperingFunctionComment; |
413 | } | |
414 | | |
415 | public JCheckBox getCheckboxIsTamperingVersionComment() { | |
416 |
1
1. getCheckboxIsTamperingVersionComment : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingVersionComment → NO_COVERAGE |
return this.checkboxIsTamperingVersionComment; |
417 | } | |
418 | | |
419 | public JCheckBox getCheckboxIsTamperingRandomCase() { | |
420 |
1
1. getCheckboxIsTamperingRandomCase : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingRandomCase → NO_COVERAGE |
return this.checkboxIsTamperingRandomCase; |
421 | } | |
422 | | |
423 | public JCheckBox getCheckboxIsTamperingEval() { | |
424 |
1
1. getCheckboxIsTamperingEval : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingEval → NO_COVERAGE |
return this.checkboxIsTamperingEval; |
425 | } | |
426 | | |
427 | public JRadioButton getRadioIsTamperingSpaceToDashComment() { | |
428 |
1
1. getRadioIsTamperingSpaceToDashComment : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getRadioIsTamperingSpaceToDashComment → NO_COVERAGE |
return this.radioIsTamperingSpaceToDashComment; |
429 | } | |
430 | | |
431 | public JRadioButton getRadioIsTamperingSpaceToMultilineComment() { | |
432 |
1
1. getRadioIsTamperingSpaceToMultilineComment : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getRadioIsTamperingSpaceToMultilineComment → NO_COVERAGE |
return this.radioIsTamperingSpaceToMultilineComment; |
433 | } | |
434 | | |
435 | public JRadioButton getRadioIsTamperingSpaceToSharpComment() { | |
436 |
1
1. getRadioIsTamperingSpaceToSharpComment : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getRadioIsTamperingSpaceToSharpComment → NO_COVERAGE |
return this.radioIsTamperingSpaceToSharpComment; |
437 | } | |
438 | | |
439 | public JCheckBox getCheckboxIsTamperingHexToChar() { | |
440 |
1
1. getCheckboxIsTamperingHexToChar : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingHexToChar → NO_COVERAGE |
return this.checkboxIsTamperingHexToChar; |
441 | } | |
442 | | |
443 | public JCheckBox getCheckboxIsTamperingQuoteToUtf8() { | |
444 |
1
1. getCheckboxIsTamperingQuoteToUtf8 : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingQuoteToUtf8 → NO_COVERAGE |
return this.checkboxIsTamperingQuoteToUtf8; |
445 | } | |
446 | ||
447 | public JCheckBox getCheckboxIsTamperingStringToChar() { | |
448 |
1
1. getCheckboxIsTamperingStringToChar : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelTampering::getCheckboxIsTamperingStringToChar → NO_COVERAGE |
return this.checkboxIsTamperingStringToChar; |
449 | } | |
450 | } | |
Mutations | ||
38 |
1.1 |
|
44 |
1.1 |
|
45 |
1.1 |
|
47 |
1.1 |
|
48 |
1.1 |
|
50 |
1.1 2.2 |
|
51 |
1.1 |
|
55 |
1.1 |
|
56 |
1.1 |
|
58 |
1.1 |
|
59 |
1.1 |
|
61 |
1.1 2.2 |
|
62 |
1.1 |
|
66 |
1.1 |
|
67 |
1.1 |
|
69 |
1.1 |
|
70 |
1.1 |
|
72 |
1.1 2.2 |
|
73 |
1.1 |
|
77 |
1.1 |
|
78 |
1.1 |
|
80 |
1.1 |
|
81 |
1.1 |
|
83 |
1.1 2.2 |
|
84 |
1.1 |
|
88 |
1.1 |
|
89 |
1.1 |
|
92 |
1.1 |
|
94 |
1.1 |
|
95 |
1.1 |
|
101 |
1.1 |
|
102 |
1.1 |
|
103 |
1.1 |
|
106 |
1.1 |
|
107 |
1.1 |
|
109 |
1.1 |
|
110 |
1.1 |
|
112 |
1.1 |
|
113 |
1.1 |
|
115 |
1.1 2.2 |
|
118 |
1.1 |
|
122 |
1.1 |
|
123 |
1.1 |
|
125 |
1.1 |
|
126 |
1.1 |
|
128 |
1.1 |
|
129 |
1.1 |
|
131 |
1.1 2.2 |
|
134 |
1.1 |
|
138 |
1.1 |
|
139 |
1.1 |
|
141 |
1.1 |
|
142 |
1.1 |
|
144 |
1.1 |
|
145 |
1.1 |
|
147 |
1.1 2.2 |
|
150 |
1.1 |
|
154 |
1.1 |
|
155 |
1.1 |
|
157 |
1.1 |
|
158 |
1.1 |
|
160 |
1.1 2.2 |
|
161 |
1.1 |
|
165 |
1.1 |
|
166 |
1.1 |
|
168 |
1.1 |
|
169 |
1.1 |
|
171 |
1.1 2.2 |
|
172 |
1.1 |
|
176 |
1.1 |
|
177 |
1.1 |
|
179 |
1.1 |
|
180 |
1.1 |
|
182 |
1.1 2.2 |
|
183 |
1.1 |
|
187 |
1.1 |
|
188 |
1.1 |
|
190 |
1.1 |
|
191 |
1.1 |
|
193 |
1.1 2.2 |
|
194 |
1.1 |
|
210 |
1.1 |
|
212 |
1.1 |
|
214 |
1.1 |
|
215 |
1.1 |
|
216 |
1.1 |
|
223 |
1.1 |
|
224 |
1.1 |
|
226 |
1.1 |
|
231 |
1.1 |
|
235 |
1.1 |
|
238 |
1.1 |
|
240 |
1.1 |
|
283 |
1.1 |
|
392 |
1.1 2.2 |
|
397 |
1.1 |
|
404 |
1.1 |
|
408 |
1.1 |
|
412 |
1.1 |
|
416 |
1.1 |
|
420 |
1.1 |
|
424 |
1.1 |
|
428 |
1.1 |
|
432 |
1.1 |
|
436 |
1.1 |
|
440 |
1.1 |
|
444 |
1.1 |
|
448 |
1.1 |