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/ftp/config/gui/FtpConfigGui.java | |||
Method name: JPanel createOnErrorPanel()
|
Method name: JPanel createOptionsPanel()
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | JPanel panel = new JPanel();↵ | |||
2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); //$NON-NLS-1$↵ | |||
3 | ButtonGroup group = new ButtonGroup();↵ | 1 | ButtonGroup group = new ButtonGroup();↵ | |
4 | continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); //$NON-NLS-1$↵ | 2 | getBox = new JRadioButton(JMeterUtils.getResString("ftp_get")); //$NON-NLS-1$↵ | |
5 | group.add(continueBox);↵ | 3 | group.add(getBox);↵ | |
6 | continueBox.setSelected(true);↵ | 4 | getBox.setSelected(true);↵ | |
7 | panel.add(continueBox);↵ | |||
8 | stopThrd↵ | |||
9 | Box = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_thread")); //$NON-NLS-1$↵ | 5 | putBox = new JRadioButton(JMeterUtils.getResString("ftp_put")); //$NON-NLS-1$↵ | |
10 | group.add(stopThrdBox);↵ | 6 | group.add(↵ | |
11 | panel.add(stopThrdBox);↵ | |||
12 | stopTestBox = new JRadioButton↵ | 7 | putBox);↵ | |
8 | binaryMode = new JCheckBox(JMeterUtils.getResString("ftp_binary_mode")); //$NON-NLS-1$↵ | |||
13 | (JMeterUtils.getResString("sampler_on_error_stop_test")); //$NON-NLS-1$↵ | 9 | saveResponseData = new JCheckBox(JMeterUtils.getResString("↵ | |
14 | group.add(stopTes↵ | 10 | ftp_save_response_data")); //$NON-NLS-1$↵ | |
11 | ↵ | |||
12 | ↵ | |||
13 | JPanel optionsPanel = new HorizontalPanel();↵ | |||
14 | optionsPanel.add(getBox);↵ | |||
15 | tBox);↵ | 15 | optionsPanel.add(putBox);↵ | |
16 | panel.add(stopTestBox↵ | 16 | optionsPanel.add(binaryMode);↵ | |
17 | );↵ | 17 | optionsPanel.add(saveResponseData);↵ | |
18 | return panel; | 18 | return optionsPanel; | |
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 | 110 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | JPanel panel = new JPanel(); |
| 9 | JPanel optionsPanel = new HorizontalPanel(); | |||||||||||||||||||||
2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sampler_on_error_action"))); |
| | ||||||||||||||||||||||
3 | ButtonGroup group = new ButtonGroup(); | 1 | ButtonGroup group = new ButtonGroup(); | ||||||||||||||||||||||
4 | continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); |
| 2 | getBox = new JRadioButton(JMeterUtils.getResString("ftp_get")); | |||||||||||||||||||||
5 | group.add(continueBox); |
| 3 | group.add(getBox); | |||||||||||||||||||||
6 | continueBox.setSelected(true); |
| 4 | getBox.setSelected(true); | |||||||||||||||||||||
| 8 | saveResponseData = new JCheckBox(JMeterUtils.getResString("ftp_save_response_data")); | |||||||||||||||||||||||
7 | panel.add(continueBox); |
| 10 | optionsPanel.add(getBox); | |||||||||||||||||||||
8 | stopThrdBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_thread")); |
| 5 | putBox = new JRadioButton(JMeterUtils.getResString("ftp_put")); | |||||||||||||||||||||
9 | group.add(stopThrdBox); |
| 6 | group.add(putBox); | |||||||||||||||||||||
10 | panel.add(stopThrdBox); |
| 11 | optionsPanel.add(putBox); | |||||||||||||||||||||
11 | stopTestBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_test")); |
| 7 | binaryMode = new JCheckBox(JMeterUtils.getResString("ftp_binary_mode")); | |||||||||||||||||||||
12 | group.add(stopTestBox); | | |||||||||||||||||||||||
13 | panel.add(stopTestBox); |
| 12 | optionsPanel.add(binaryMode); | |||||||||||||||||||||
| 13 | optionsPanel.add(saveResponseData); | |||||||||||||||||||||||
14 | return panel; |
| 14 | return optionsPanel; |
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 continueBox is a field being modified, and thus it cannot be parameterized |
3 | Expression getBox is a field being modified, and thus it cannot be parameterized |
4 | Expression continueBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression getBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression continueBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression getBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression continueBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression getBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression stopThrdBox is a field being modified, and thus it cannot be parameterized |
11 | Expression putBox is a field being modified, and thus it cannot be parameterized |
12 | Expression stopThrdBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression putBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression stopThrdBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression putBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression stopTestBox is a field being modified, and thus it cannot be parameterized |
17 | Expression binaryMode is a field being modified, and thus it cannot be parameterized |
18 | Expression stopTestBox cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression binaryMode cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Clone fragment #1 returns variables panel, group , while Clone fragment #2 returns variables optionsPanel |