File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/gui/ThreadGroupGui.java | |||
Method name: JPanel createGroupingPanel()
|
Method name: JPanel createOnErrorPanel()
|
|||
Number of AST nodes: 14 | Number of AST nodes: 13 | |||
1 | DefaultComboBoxModel m = new DefaultComboBoxModel();↵ | |||
2 | // Note: position of these elements in the menu *must* match the↵ | |||
3 | // corresponding ProxyControl.GROUPING_* values.↵ | |||
4 | m.addElement↵ | 1 | JPanel panel = new JPanel();↵ | |
5 | (JMeterUtils.getResString("grouping_no_groups")); // $NON-NLS-1$↵ | 2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("↵ | |
6 | m.addElement(JMeterUtils.getResString("grouping_add_separators")); // $NON-NLS-1$↵ | |||
7 | m.addElement↵ | 3 | sampler_on_error_action"))); // $NON-NLS-1$↵ | |
4 | ButtonGroup group = new ButtonGroup();↵ | |||
8 | (JMeterUtils.getResString("grouping_in_controllers")); // $NON-NLS-1$↵ | 5 | continueBox = new JRadioButton(JMeterUtils.getResString("↵ | |
9 | m.addElement↵ | 6 | sampler_on_error_continue")); // $NON-NLS-1$↵ | |
7 | group.add(continueBox);↵ | |||
8 | panel.add(continueBox);↵ | |||
10 | (JMeterUtils.getResString("grouping_store_first_only")); // $NON-NLS-1$↵ | 9 | stopThrdBox = new JRadioButton(JMeterUtils.getResString("↵ | |
11 | groupingMode = new JComboBox(m);↵ | |||
12 | groupingMode.setSelectedIndex(0);↵ | |||
13 | groupingMode.addItemListener(this);↵ | |||
14 | JLabel label2 = new JLabel↵ | 10 | sampler_on_error_stop_thread")); // $NON-NLS-1$↵ | |
11 | group.add(stopThrdBox);↵ | |||
12 | panel.add(stopThrdBox);↵ | |||
15 | (JMeterUtils.getResString("grouping_mode")); // $NON-NLS-1$↵ | 13 | stopTestBox = new JRadioButton(JMeterUtils.getResString("↵ | |
16 | label2.setLabelFor(groupingMode);↵ | |||
17 | HorizontalPanel panel = new HorizontalPanel();↵ | |||
18 | panel.add(label2↵ | 14 | sampler_on_error_stop_test")); // $NON-NLS-1$↵ | |
19 | );↵ | 15 | group.add(stopTestBox);↵ | |
20 | panel.add(groupingMode);↵ | 16 | panel.add(stopTestBox);↵ | |
21 | return panel; | 17 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 174 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 10 |
Number of unmapped statements in the second code fragment | 9 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | DefaultComboBoxModel m = new DefaultComboBoxModel(); | | ||||||||||||||||||||||||
|
| 2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); | |||||||||||||||||||||||
2 | m.addElement(JMeterUtils.getResString("grouping_no_groups")); | | ||||||||||||||||||||||||
| 3 | ButtonGroup group = new ButtonGroup(); | ||||||||||||||||||||||||
3 | m.addElement(JMeterUtils.getResString("grouping_add_separators")); | | ||||||||||||||||||||||||
| 4 | continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); | ||||||||||||||||||||||||
4 | m.addElement(JMeterUtils.getResString("grouping_in_controllers")); | | ||||||||||||||||||||||||
| 5 | group.add(continueBox); | ||||||||||||||||||||||||
5 | m.addElement(JMeterUtils.getResString("grouping_store_first_only")); | | ||||||||||||||||||||||||
6 | groupingMode = new JComboBox(m); | | ||||||||||||||||||||||||
| 7 | stopThrdBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_thread")); | ||||||||||||||||||||||||
7 | groupingMode.setSelectedIndex(0); | | ||||||||||||||||||||||||
| 8 | group.add(stopThrdBox); | ||||||||||||||||||||||||
8 | groupingMode.addItemListener(this); | | ||||||||||||||||||||||||
9 | JLabel label2 = new JLabel(JMeterUtils.getResString("grouping_mode")); |
| 1 | JPanel panel = new JPanel(); | ||||||||||||||||||||||
10 | label2.setLabelFor(groupingMode); | | ||||||||||||||||||||||||
11 | HorizontalPanel panel = new HorizontalPanel(); | | ||||||||||||||||||||||||
12 | panel.add(label2); |
| 9 | panel.add(stopThrdBox); | ||||||||||||||||||||||
13 | panel.add(groupingMode); |
| 6 | panel.add(continueBox); | ||||||||||||||||||||||
| 10 | stopTestBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_test")); | ||||||||||||||||||||||||
| 11 | group.add(stopTestBox); | ||||||||||||||||||||||||
| 12 | panel.add(stopTestBox); | ||||||||||||||||||||||||
14 | return panel; |
| 13 | return panel; |
Row | Violation |
---|---|
1 | Unmatched statement panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression label2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variable label2 with type javax.swing.JLabel , while Clone fragment #2 returns variable panel with type javax.swing.JPanel |