File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/OnErrorPanel.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java | |||
Method name: JPanel createOnErrorPanel()
|
Method name: JPanel createGroupingPanel()
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | JPanel panel = new JPanel();↵ | 1 | DefaultComboBoxModel m = new ↵ | |
2 | panel.setBorder(BorderFactory.createTitledBorder↵ | 2 | DefaultComboBoxModel();↵ | |
3 | // Note: position of these elements in the menu *must* match the↵ | |||
4 | // corresponding ProxyControl.GROUPING_* values.↵ | |||
3 | (JMeterUtils.getResString("sampler_on_error_action"))); //$NON-NLS-1$↵ | 5 | m.addElement(JMeterUtils.getResString("grouping_no_groups")); // $NON-NLS-1$↵ | |
4 | ButtonGroup group = new ButtonGroup();↵ | |||
5 | continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); //$NON-NLS-1$↵ | 6 | m.addElement(JMeterUtils.getResString("grouping_add_separators")); // $NON-NLS-1$↵ | |
6 | group.add(continueBox);↵ | 7 | ↵ | |
7 | continueBox.setSelected(true);↵ | |||
8 | panel.add(continueBox);↵ | |||
9 | stopThrdBox = new JRadioButton↵ | 8 | m.addElement(JMeterUtils.getResString("grouping_in_controllers")); // $NON-NLS-1$↵ | |
10 | (JMeterUtils.getResString("sampler_on_error_stop_thread")); //$NON-NLS-1$↵ | 9 | m.addElement(JMeterUtils.getResString("grouping_store_first_only")); // $NON-NLS-1$↵ | |
11 | group.add(stopThrdBox);↵ | 10 | group↵ | |
12 | panel.add(stopThrdBox);↵ | |||
13 | stopTestBox = new JRadioButton↵ | 11 | ingMode = new JComboBox(m);↵ | |
12 | groupingMode.setSelectedIndex(0);↵ | |||
13 | groupingMode.addItemListener(this);↵ | |||
14 | (JMeterUtils.getResString("sampler_on_error_stop_test")); //$NON-NLS-1$↵ | 14 | JLabel label2 = new JLabel(JMeterUtils.getResString("grouping_mode")); // $NON-NLS-1$↵ | |
15 | group.add(stopTestBox↵ | 15 | label2.setLabelFor(groupingMode);↵ | |
16 | HorizontalPanel panel = new HorizontalPanel();↵ | |||
16 | );↵ | 17 | panel.add(label2);↵ | |
17 | panel.add(stopTestBox);↵ | 18 | panel.add(groupingMode);↵ | |
18 | return panel; | 19 |
| |
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 | 160 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 10 |
Number of unmapped statements in the second code fragment | 10 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | DefaultComboBoxModel m = new DefaultComboBoxModel(); | ||||||||||||||||||
| 2 | m.addElement(JMeterUtils.getResString("grouping_no_groups")); | ||||||||||||||||||
1 | JPanel panel = new JPanel(); |
| 11 | HorizontalPanel panel = new HorizontalPanel(); | ||||||||||||||||
2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); | | ||||||||||||||||||
| 3 | m.addElement(JMeterUtils.getResString("grouping_add_separators")); | ||||||||||||||||||
3 | ButtonGroup group = new ButtonGroup(); | | ||||||||||||||||||
| 4 | m.addElement(JMeterUtils.getResString("grouping_in_controllers")); | ||||||||||||||||||
4 | continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); | | ||||||||||||||||||
| 5 | m.addElement(JMeterUtils.getResString("grouping_store_first_only")); | ||||||||||||||||||
5 | group.add(continueBox); | | ||||||||||||||||||
| 6 | groupingMode = new JComboBox(m); | ||||||||||||||||||
6 | continueBox.setSelected(true); | | ||||||||||||||||||
| 7 | groupingMode.setSelectedIndex(0); | ||||||||||||||||||
7 | panel.add(continueBox); |
| | |||||||||||||||||
| 8 | groupingMode.addItemListener(this); | ||||||||||||||||||
8 | stopThrdBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_thread")); | | ||||||||||||||||||
| 9 | JLabel label2 = new JLabel(JMeterUtils.getResString("grouping_mode")); | ||||||||||||||||||
9 | group.add(stopThrdBox); | | ||||||||||||||||||
| 10 | label2.setLabelFor(groupingMode); | ||||||||||||||||||
10 | panel.add(stopThrdBox); |
| 12 | panel.add(label2); | ||||||||||||||||
11 | stopTestBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_test")); | | ||||||||||||||||||
12 | group.add(stopTestBox); | | ||||||||||||||||||
13 | panel.add(stopTestBox); |
| 13 | panel.add(groupingMode); | ||||||||||||||||
14 | return panel; |
| 14 | return panel; |
Row | Violation |
---|---|
1 | Unmatched statement panel.add(continueBox); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables panel , while Clone fragment #2 returns variables |