AddressMenuBar.java

1
package com.jsql.view.swing.panel.address;
2
3
import com.jsql.model.injection.strategy.AbstractStrategy;
4
import com.jsql.model.injection.strategy.StrategyInjectionError;
5
import com.jsql.model.injection.vendor.model.Vendor;
6
import com.jsql.model.injection.vendor.model.yaml.Method;
7
import com.jsql.util.I18nUtil;
8
import com.jsql.util.LogLevelUtil;
9
import com.jsql.view.swing.manager.util.ComboMenu;
10
import com.jsql.view.swing.panel.PanelAddressBar;
11
import com.jsql.view.swing.panel.util.ButtonAddressBar;
12
import com.jsql.view.swing.text.JToolTipI18n;
13
import com.jsql.view.swing.ui.ComponentBorder;
14
import com.jsql.view.swing.util.I18nViewUtil;
15
import com.jsql.view.swing.util.MediatorHelper;
16
import com.jsql.view.swing.util.UiUtil;
17
import org.apache.logging.log4j.LogManager;
18
import org.apache.logging.log4j.Logger;
19
20
import javax.swing.*;
21
import java.awt.*;
22
import java.util.Arrays;
23
import java.util.Locale;
24
25
public class AddressMenuBar extends JMenuBar {
26
    
27
    /**
28
     * Log4j logger sent to view.
29
     */
30
    private static final Logger LOGGER = LogManager.getRootLogger();
31
32
    private JMenu itemRadioStrategyError = new JMenu();
33
34
    private final JMenu menuVendor;
35
    private final JMenu menuStrategy;
36
    private final ButtonGroup groupStrategy = new ButtonGroup();
37
38
    /**
39
     * Animated GIF displayed during injection.
40
     */
41
    private final JLabel loader = new JLabel(UiUtil.ICON_LOADER_GIF);
42
43
    /**
44
     * Connection button.
45
     */
46
    private final ButtonAddressBar buttonInUrl = new ButtonAddressBar();
47
    
48
    public AddressMenuBar(PanelAddressBar panelAddressBar) {
49
        
50 1 1. <init> : removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setName → NO_COVERAGE
        this.buttonInUrl.setName("buttonInUrl");
51 1 1. <init> : removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setToolTipText → NO_COVERAGE
        this.buttonInUrl.setToolTipText(I18nUtil.valueByKey("BUTTON_START_TOOLTIP"));
52 1 1. <init> : removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::addActionListener → NO_COVERAGE
        this.buttonInUrl.addActionListener(new ActionStart(panelAddressBar));
53
54
        var buttonInTextfield = new ComponentBorder(this.buttonInUrl, 17, 0);
55 1 1. <init> : removed call to com/jsql/view/swing/ui/ComponentBorder::install → NO_COVERAGE
        buttonInTextfield.install(panelAddressBar.getTextFieldAddress());
56
        
57 1 1. <init> : removed call to com/jsql/view/swing/panel/address/AddressMenuBar::setOpaque → NO_COVERAGE
        this.setOpaque(false);
58 1 1. <init> : removed call to com/jsql/view/swing/panel/address/AddressMenuBar::setBorder → NO_COVERAGE
        this.setBorder(null);
59
60
        this.menuStrategy = new ComboMenu("Strategy auto");
61 1 1. <init> : removed call to javax/swing/JMenu::setName → NO_COVERAGE
        this.menuStrategy.setName("menuStrategy");
62
        
63
        final var patternKeyTooltipStrategy = "STRATEGY_%s_TOOLTIP";
64
65
        for (final AbstractStrategy strategy: MediatorHelper.model().getMediatorStrategy().getStrategies()) {
66
            
67
            JMenuItem itemRadioStrategy;
68
69 1 1. <init> : negated conditional → NO_COVERAGE
            if (strategy == MediatorHelper.model().getMediatorStrategy().getError()) {
70
                
71
                itemRadioStrategy = new JMenu(strategy.toString());
72
                this.itemRadioStrategyError = (JMenu) itemRadioStrategy;
73 1 1. <init> : removed call to java/awt/Component::setName → NO_COVERAGE
                itemRadioStrategy.getComponent().setName("itemRadioStrategyError");
74
                
75
            } else {
76
                
77
                final var refTooltip = new JToolTipI18n[] {
78
                        
79
                    new JToolTipI18n(
80
                        I18nUtil.valueByKey(
81
                            String.format(
82
                                patternKeyTooltipStrategy,
83
                                strategy.getName().toUpperCase(Locale.ROOT)
84
                            )
85
                        )
86
                    )
87
                };
88
                
89
                itemRadioStrategy = new JRadioButtonMenuItem(strategy.toString()) {
90
                    
91
                    @Override
92
                    public JToolTip createToolTip() {
93
                        
94
                        JToolTipI18n tipI18n = new JToolTipI18n(
95
                            I18nUtil.valueByKey(
96
                                String.format(
97
                                    patternKeyTooltipStrategy,
98
                                    strategy.getName().toUpperCase(Locale.ROOT)
99
                                )
100
                            )
101
                        );
102
                        
103
                        refTooltip[0] = tipI18n;
104
                        
105 1 1. createToolTip : replaced return value with null for com/jsql/view/swing/panel/address/AddressMenuBar$1::createToolTip → NO_COVERAGE
                        return tipI18n;
106
                    }
107
                };
108
                
109 1 1. <init> : removed call to com/jsql/view/swing/util/I18nViewUtil::addComponentForKey → NO_COVERAGE
                I18nViewUtil.addComponentForKey(
110
                    String.format(
111
                        patternKeyTooltipStrategy,
112
                        strategy.getName().toUpperCase(Locale.ROOT)
113
                    ),
114
                    refTooltip[0]
115
                );
116
117 1 1. <init> : removed call to java/awt/Component::setName → NO_COVERAGE
                itemRadioStrategy.getComponent().setName("itemRadioStrategy"+ strategy);
118
                
119 1 1. <init> : removed call to javax/swing/JMenuItem::addActionListener → NO_COVERAGE
                itemRadioStrategy.addActionListener(actionEvent -> {
120
                    
121 1 1. lambda$new$0 : removed call to javax/swing/JMenu::setText → NO_COVERAGE
                    this.menuStrategy.setText(strategy.toString());
122 1 1. lambda$new$0 : removed call to com/jsql/model/injection/strategy/MediatorStrategy::setStrategy → NO_COVERAGE
                    MediatorHelper.model().getMediatorStrategy().setStrategy(strategy);
123
                });
124
                
125 1 1. <init> : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE
                this.groupStrategy.add(itemRadioStrategy);
126
            }
127
128
            this.menuStrategy.add(itemRadioStrategy);
129
            
130 1 1. <init> : removed call to javax/swing/JMenuItem::setToolTipText → NO_COVERAGE
            itemRadioStrategy.setToolTipText(
131
                I18nUtil.valueByKey(
132
                    String.format(
133
                        patternKeyTooltipStrategy,
134
                        strategy.getName().toUpperCase(Locale.ROOT)
135
                    )
136
                )
137
            );
138 1 1. <init> : removed call to javax/swing/JComponent::setEnabled → NO_COVERAGE
            ((JComponent) itemRadioStrategy).setEnabled(false);
139
        }
140
141
        this.menuVendor = new ComboMenu(MediatorHelper.model().getMediatorVendor().getAuto().toString());
142 1 1. <init> : removed call to javax/swing/JMenu::setName → NO_COVERAGE
        this.menuVendor.setName("menuVendor");
143 3 1. <init> : Replaced integer division with multiplication → NO_COVERAGE
2. <init> : removed call to javax/swing/JPopupMenu::setLayout → NO_COVERAGE
3. <init> : Replaced integer addition with subtraction → NO_COVERAGE
        this.menuVendor.getPopupMenu().setLayout(new GridLayout((MediatorHelper.model().getMediatorVendor().getVendors().size() + 1) / 2, 2));
144
145
        var groupVendor = new ButtonGroup();
146
147
        for (final Vendor vendor: MediatorHelper.model().getMediatorVendor().getVendors()) {
148
            
149 1 1. <init> : negated conditional → NO_COVERAGE
            JMenuItem itemRadioVendor = new JRadioButtonMenuItem(vendor.toString(), vendor == MediatorHelper.model().getMediatorVendor().getAuto());
150 1 1. <init> : removed call to javax/swing/JMenuItem::setName → NO_COVERAGE
            itemRadioVendor.setName("itemRadioVendor"+ vendor);
151 1 1. <init> : removed call to javax/swing/JMenuItem::addActionListener → NO_COVERAGE
            itemRadioVendor.addActionListener(actionEvent -> {
152
                
153 1 1. lambda$new$1 : removed call to javax/swing/JMenu::setText → NO_COVERAGE
                this.menuVendor.setText(vendor.toString());
154 1 1. lambda$new$1 : removed call to com/jsql/model/injection/vendor/MediatorVendor::setVendorByUser → NO_COVERAGE
                MediatorHelper.model().getMediatorVendor().setVendorByUser(vendor);
155
            });
156
            
157
            this.menuVendor.add(itemRadioVendor);
158 1 1. <init> : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE
            groupVendor.add(itemRadioVendor);
159
        }
160
161
        this.add(Box.createHorizontalGlue());
162
        this.add(this.loader);
163
        this.add(Box.createHorizontalStrut(5));
164
        this.add(this.menuVendor);
165
        this.add(this.menuStrategy);
166
167 1 1. <init> : removed call to javax/swing/JLabel::setVisible → NO_COVERAGE
        this.loader.setVisible(false);
168 1 1. <init> : removed call to javax/swing/JLabel::setCursor → NO_COVERAGE
        this.loader.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
169
    }
170
171
    public void endPreparation() {
172
        
173 1 1. endPreparation : removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setToolTipText → NO_COVERAGE
        this.buttonInUrl.setToolTipText(I18nUtil.valueByKey("BUTTON_START_TOOLTIP"));
174 1 1. endPreparation : removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setInjectionReady → NO_COVERAGE
        this.buttonInUrl.setInjectionReady();
175 1 1. endPreparation : removed call to javax/swing/JLabel::setVisible → NO_COVERAGE
        this.loader.setVisible(false);
176
    }
177
    
178
    public void initErrorMethods(Vendor vendor) {
179
        
180 1 1. initErrorMethods : removed call to javax/swing/JMenu::removeAll → NO_COVERAGE
        this.itemRadioStrategyError.removeAll();
181
182
        var indexError = 0;
183
        
184
        if (
185 1 1. initErrorMethods : negated conditional → NO_COVERAGE
            vendor != MediatorHelper.model().getMediatorVendor().getAuto()
186 1 1. initErrorMethods : negated conditional → NO_COVERAGE
            && vendor.instance().getModelYaml().getStrategy().getError() != null
187
        ) {
188
            
189
            for (Method methodError: vendor.instance().getModelYaml().getStrategy().getError().getMethod()) {
190
                
191
                JMenuItem itemRadioVendor = new JRadioButtonMenuItem(methodError.getName());
192 1 1. initErrorMethods : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
                itemRadioVendor.setEnabled(false);
193 1 1. initErrorMethods : removed call to javax/swing/JMenuItem::setName → NO_COVERAGE
                itemRadioVendor.setName("itemRadioVendor"+ methodError.getName());
194
                
195
                this.itemRadioStrategyError.add(itemRadioVendor);
196 1 1. initErrorMethods : removed call to javax/swing/ButtonGroup::add → NO_COVERAGE
                this.groupStrategy.add(itemRadioVendor);
197
198
                int indexErrorFinal = indexError;
199
                
200 1 1. initErrorMethods : removed call to javax/swing/JMenuItem::addActionListener → NO_COVERAGE
                itemRadioVendor.addActionListener(actionEvent -> {
201
                    
202 1 1. lambda$initErrorMethods$2 : removed call to javax/swing/JMenu::setText → NO_COVERAGE
                    this.menuStrategy.setText(methodError.getName());
203 1 1. lambda$initErrorMethods$2 : removed call to com/jsql/model/injection/strategy/MediatorStrategy::setStrategy → NO_COVERAGE
                    MediatorHelper.model().getMediatorStrategy().setStrategy(MediatorHelper.model().getMediatorStrategy().getError());
204 1 1. lambda$initErrorMethods$2 : removed call to com/jsql/model/injection/strategy/StrategyInjectionError::setIndexErrorStrategy → NO_COVERAGE
                    MediatorHelper.model().getMediatorStrategy().getError().setIndexErrorStrategy(indexErrorFinal);
205
                });
206
207 1 1. initErrorMethods : Changed increment from 1 to -1 → NO_COVERAGE
                indexError++;
208
            }
209
        }
210
    }
211
    
212
    public void reset() {
213
        
214 1 1. reset : negated conditional → NO_COVERAGE
        if (MediatorHelper.model().getMediatorVendor().getVendorByUser() == MediatorHelper.model().getMediatorVendor().getAuto()) {
215 1 1. reset : removed call to javax/swing/JMenu::setText → NO_COVERAGE
            this.menuVendor.setText(MediatorHelper.model().getMediatorVendor().getAuto().toString());
216
        }
217
        
218 1 1. reset : removed call to javax/swing/JMenu::setText → NO_COVERAGE
        this.menuStrategy.setText("Strategy auto");
219
        
220 2 1. reset : negated conditional → NO_COVERAGE
2. reset : changed conditional boundary → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
221 1 1. reset : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
            this.menuStrategy.getItem(i).setEnabled(false);
222
        }
223
        
224 1 1. reset : removed call to javax/swing/JMenu::removeAll → NO_COVERAGE
        this.getMenuError().removeAll();
225 1 1. reset : removed call to javax/swing/ButtonGroup::clearSelection → NO_COVERAGE
        this.groupStrategy.clearSelection();
226
    }
227
    
228
    public void setVendor(Vendor vendor) {
229
        
230 1 1. setVendor : removed call to javax/swing/JMenu::setText → NO_COVERAGE
        this.menuVendor.setText(vendor.toString());
231 1 1. setVendor : removed call to com/jsql/view/swing/panel/address/AddressMenuBar::initErrorMethods → NO_COVERAGE
        this.initErrorMethods(vendor);
232
    }
233
    
234
    public void resetLabelStrategy() {
235 2 1. resetLabelStrategy : changed conditional boundary → NO_COVERAGE
2. resetLabelStrategy : negated conditional → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
236
            
237 1 1. resetLabelStrategy : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
            this.menuStrategy.getItem(i).setEnabled(false);
238 1 1. resetLabelStrategy : removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE
            this.menuStrategy.getItem(i).setSelected(false);
239
        }
240
    }
241
    
242
    public void markStrategy(AbstractStrategy strategy) {
243
        
244 1 1. markStrategy : removed call to javax/swing/JMenu::setText → NO_COVERAGE
        this.menuStrategy.setText(strategy.toString());
245
        
246 2 1. markStrategy : changed conditional boundary → NO_COVERAGE
2. markStrategy : negated conditional → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
247 1 1. markStrategy : negated conditional → NO_COVERAGE
            if (this.menuStrategy.getItem(i).getText().equals(strategy.toString())) {
248
                
249 1 1. markStrategy : removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE
                this.menuStrategy.getItem(i).setSelected(true);
250
                break;
251
            }
252
        }
253
    }
254
    
255
    public void markStrategyInvulnerable(AbstractStrategy strategy) {
256 2 1. markStrategyInvulnerable : negated conditional → NO_COVERAGE
2. markStrategyInvulnerable : changed conditional boundary → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
257 1 1. markStrategyInvulnerable : negated conditional → NO_COVERAGE
            if (this.menuStrategy.getItem(i).getText().equals(strategy.toString())) {
258
                
259 1 1. markStrategyInvulnerable : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
                this.menuStrategy.getItem(i).setEnabled(false);
260
                break;
261
            }
262
        }
263
    }
264
    
265
    public void markErrorInvulnerable(int indexMethodError) {
266
        
267
        AbstractStrategy strategy = MediatorHelper.model().getMediatorStrategy().getError();
268
        
269
        // Fix #36975: ArrayIndexOutOfBoundsException on getItem()
270
        // Fix #40352: NullPointerException on ?
271
        try {
272 2 1. markErrorInvulnerable : negated conditional → NO_COVERAGE
2. markErrorInvulnerable : changed conditional boundary → NO_COVERAGE
            for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
273 1 1. markErrorInvulnerable : negated conditional → NO_COVERAGE
                if (this.menuStrategy.getItem(i).getText().equals(strategy.toString())) {
274
275 1 1. markErrorInvulnerable : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
                    ((JMenu) this.menuStrategy.getItem(i)).getItem(indexMethodError).setEnabled(false);
276
                    break;
277
                }
278
            }
279
        } catch (ArrayIndexOutOfBoundsException | NullPointerException e) {
280
            LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
281
        }
282
    }
283
    
284
    public void markError() {
285
286
        StrategyInjectionError strategy = MediatorHelper.model().getMediatorStrategy().getError();
287 1 1. markError : removed call to javax/swing/JMenu::setText → NO_COVERAGE
        this.menuStrategy.setText(strategy.toString());
288
        
289
        JMenu menuError = this.getMenuError();
290
        
291
        int indexError = strategy.getIndexErrorStrategy();
292
        String nameError = MediatorHelper.model().getMediatorVendor().getVendor().instance().getModelYaml().getStrategy().getError().getMethod().get(indexError).getName();
293
        
294 2 1. markError : changed conditional boundary → NO_COVERAGE
2. markError : negated conditional → NO_COVERAGE
        for (var i = 0 ; i < menuError.getItemCount() ; i++) {
295
            // Fix #44635: ArrayIndexOutOfBoundsException on getItem()
296
            try {
297 1 1. markError : negated conditional → NO_COVERAGE
                if (menuError.getItem(i).getText().equals(nameError)) {
298
                    
299 1 1. markError : removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE
                    menuError.getItem(i).setSelected(true);
300 1 1. markError : removed call to javax/swing/JMenu::setText → NO_COVERAGE
                    this.menuStrategy.setText(nameError);
301
                    
302
                    break;
303
                }
304
            } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {
305
                LOGGER.log(LogLevelUtil.CONSOLE_JAVA, e, e);
306
            }
307
        }
308
    }
309
310
    private JMenu getMenuError() {
311
        
312 1 1. getMenuError : replaced return value with null for com/jsql/view/swing/panel/address/AddressMenuBar::getMenuError → NO_COVERAGE
        return (JMenu) Arrays.stream(this.menuStrategy.getMenuComponents())
313 2 1. lambda$getMenuError$3 : replaced boolean return with true for com/jsql/view/swing/panel/address/AddressMenuBar::lambda$getMenuError$3 → NO_COVERAGE
2. lambda$getMenuError$3 : replaced boolean return with false for com/jsql/view/swing/panel/address/AddressMenuBar::lambda$getMenuError$3 → NO_COVERAGE
            .filter(c -> ((JMenuItem) c).getText().equalsIgnoreCase(MediatorHelper.model().getMediatorStrategy().getError().getName()))
314
            .findFirst()
315
            .orElse(new JMenuItem("Mock"));
316
    }
317
    
318
    public void markErrorVulnerable(int indexMethodError) {
319
        
320
        AbstractStrategy strategy = MediatorHelper.model().getMediatorStrategy().getError();
321
        
322 2 1. markErrorVulnerable : changed conditional boundary → NO_COVERAGE
2. markErrorVulnerable : negated conditional → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
323
            
324
            JMenuItem menuItemStrategy = this.menuStrategy.getItem(i);
325
            
326 1 1. markErrorVulnerable : negated conditional → NO_COVERAGE
            if (menuItemStrategy.getText().equals(strategy.toString())) {
327
                
328
                JMenu menuError = (JMenu) menuItemStrategy;
329 1 1. markErrorVulnerable : removed call to javax/swing/JMenu::setEnabled → NO_COVERAGE
                menuError.setEnabled(true);
330
                
331
                // Fix #46578: ArrayIndexOutOfBoundsException on getItem()
332 4 1. markErrorVulnerable : changed conditional boundary → NO_COVERAGE
2. markErrorVulnerable : changed conditional boundary → NO_COVERAGE
3. markErrorVulnerable : negated conditional → NO_COVERAGE
4. markErrorVulnerable : negated conditional → NO_COVERAGE
                if (0 <= indexMethodError && indexMethodError < menuError.getItemCount()) {
333 1 1. markErrorVulnerable : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
                    menuError.getItem(indexMethodError).setEnabled(true);
334
                }
335
                
336
                break;
337
            }
338
        }
339
    }
340
    
341
    public void markStrategyVulnerable(AbstractStrategy strategy) {
342 2 1. markStrategyVulnerable : changed conditional boundary → NO_COVERAGE
2. markStrategyVulnerable : negated conditional → NO_COVERAGE
        for (var i = 0 ; i < this.menuStrategy.getItemCount() ; i++) {
343 1 1. markStrategyVulnerable : negated conditional → NO_COVERAGE
            if (this.menuStrategy.getItem(i).getText().equals(strategy.toString())) {
344
                
345 1 1. markStrategyVulnerable : removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE
                this.menuStrategy.getItem(i).setEnabled(true);
346
                break;
347
            }
348
        }
349
    }
350
    
351
    
352
    // Getter and setter
353
354
    public JLabel getLoader() {
355 1 1. getLoader : replaced return value with null for com/jsql/view/swing/panel/address/AddressMenuBar::getLoader → NO_COVERAGE
        return this.loader;
356
    }
357
358
    public ButtonAddressBar getButtonInUrl() {
359 1 1. getButtonInUrl : replaced return value with null for com/jsql/view/swing/panel/address/AddressMenuBar::getButtonInUrl → NO_COVERAGE
        return this.buttonInUrl;
360
    }
361
}

Mutations

50

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

51

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

52

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

55

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/ui/ComponentBorder::install → NO_COVERAGE

57

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

58

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

61

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

69

1.1
Location : <init>
Killed by : none
negated conditional → NO_COVERAGE

73

1.1
Location : <init>
Killed by : none
removed call to java/awt/Component::setName → NO_COVERAGE

105

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

109

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

117

1.1
Location : <init>
Killed by : none
removed call to java/awt/Component::setName → NO_COVERAGE

119

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

121

1.1
Location : lambda$new$0
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

122

1.1
Location : lambda$new$0
Killed by : none
removed call to com/jsql/model/injection/strategy/MediatorStrategy::setStrategy → NO_COVERAGE

125

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

130

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

138

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

142

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

143

1.1
Location : <init>
Killed by : none
Replaced integer division with multiplication → NO_COVERAGE

2.2
Location : <init>
Killed by : none
removed call to javax/swing/JPopupMenu::setLayout → NO_COVERAGE

3.3
Location : <init>
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

149

1.1
Location : <init>
Killed by : none
negated conditional → NO_COVERAGE

150

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

151

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

153

1.1
Location : lambda$new$1
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

154

1.1
Location : lambda$new$1
Killed by : none
removed call to com/jsql/model/injection/vendor/MediatorVendor::setVendorByUser → NO_COVERAGE

158

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

167

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

168

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

173

1.1
Location : endPreparation
Killed by : none
removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setToolTipText → NO_COVERAGE

174

1.1
Location : endPreparation
Killed by : none
removed call to com/jsql/view/swing/panel/util/ButtonAddressBar::setInjectionReady → NO_COVERAGE

175

1.1
Location : endPreparation
Killed by : none
removed call to javax/swing/JLabel::setVisible → NO_COVERAGE

180

1.1
Location : initErrorMethods
Killed by : none
removed call to javax/swing/JMenu::removeAll → NO_COVERAGE

185

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

186

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

192

1.1
Location : initErrorMethods
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

193

1.1
Location : initErrorMethods
Killed by : none
removed call to javax/swing/JMenuItem::setName → NO_COVERAGE

196

1.1
Location : initErrorMethods
Killed by : none
removed call to javax/swing/ButtonGroup::add → NO_COVERAGE

200

1.1
Location : initErrorMethods
Killed by : none
removed call to javax/swing/JMenuItem::addActionListener → NO_COVERAGE

202

1.1
Location : lambda$initErrorMethods$2
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

203

1.1
Location : lambda$initErrorMethods$2
Killed by : none
removed call to com/jsql/model/injection/strategy/MediatorStrategy::setStrategy → NO_COVERAGE

204

1.1
Location : lambda$initErrorMethods$2
Killed by : none
removed call to com/jsql/model/injection/strategy/StrategyInjectionError::setIndexErrorStrategy → NO_COVERAGE

207

1.1
Location : initErrorMethods
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

214

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

215

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

218

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

220

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

2.2
Location : reset
Killed by : none
changed conditional boundary → NO_COVERAGE

221

1.1
Location : reset
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

224

1.1
Location : reset
Killed by : none
removed call to javax/swing/JMenu::removeAll → NO_COVERAGE

225

1.1
Location : reset
Killed by : none
removed call to javax/swing/ButtonGroup::clearSelection → NO_COVERAGE

230

1.1
Location : setVendor
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

231

1.1
Location : setVendor
Killed by : none
removed call to com/jsql/view/swing/panel/address/AddressMenuBar::initErrorMethods → NO_COVERAGE

235

1.1
Location : resetLabelStrategy
Killed by : none
changed conditional boundary → NO_COVERAGE

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

237

1.1
Location : resetLabelStrategy
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

238

1.1
Location : resetLabelStrategy
Killed by : none
removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE

244

1.1
Location : markStrategy
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

246

1.1
Location : markStrategy
Killed by : none
changed conditional boundary → NO_COVERAGE

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

247

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

249

1.1
Location : markStrategy
Killed by : none
removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE

256

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

2.2
Location : markStrategyInvulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

257

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

259

1.1
Location : markStrategyInvulnerable
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

272

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

2.2
Location : markErrorInvulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

273

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

275

1.1
Location : markErrorInvulnerable
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

287

1.1
Location : markError
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

294

1.1
Location : markError
Killed by : none
changed conditional boundary → NO_COVERAGE

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

297

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

299

1.1
Location : markError
Killed by : none
removed call to javax/swing/JMenuItem::setSelected → NO_COVERAGE

300

1.1
Location : markError
Killed by : none
removed call to javax/swing/JMenu::setText → NO_COVERAGE

312

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

313

1.1
Location : lambda$getMenuError$3
Killed by : none
replaced boolean return with true for com/jsql/view/swing/panel/address/AddressMenuBar::lambda$getMenuError$3 → NO_COVERAGE

2.2
Location : lambda$getMenuError$3
Killed by : none
replaced boolean return with false for com/jsql/view/swing/panel/address/AddressMenuBar::lambda$getMenuError$3 → NO_COVERAGE

322

1.1
Location : markErrorVulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

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

326

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

329

1.1
Location : markErrorVulnerable
Killed by : none
removed call to javax/swing/JMenu::setEnabled → NO_COVERAGE

332

1.1
Location : markErrorVulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : markErrorVulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : markErrorVulnerable
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : markErrorVulnerable
Killed by : none
negated conditional → NO_COVERAGE

333

1.1
Location : markErrorVulnerable
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

342

1.1
Location : markStrategyVulnerable
Killed by : none
changed conditional boundary → NO_COVERAGE

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

343

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

345

1.1
Location : markStrategyVulnerable
Killed by : none
removed call to javax/swing/JMenuItem::setEnabled → NO_COVERAGE

355

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

359

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

Active mutators

Tests examined


Report generated by PIT 1.16.1