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