File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/SizeAssertionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphVisualizer.java | |||
Method name: JRadioButton createComparatorButton(String, int, ButtonGroup)
|
Method name: JCheckBox createChooseCheckBox(String, Color)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | JRadioButton button = new JRadioButton(name);↵ | 1 | JCheckBox checkBox = new JCheckBox(JMeterUtils.getResString(labelResourceName));↵ | |
2 | button.setActionCommand(String.valueOf(value));↵ | 2 | checkBox.setSelected(tr↵ | |
3 | button.addActionListener(this);↵ | |||
4 | group.add(button↵ | 3 | ue);↵ | |
4 | checkBox.addItemListener(this);↵ | |||
5 | );↵ | 5 | checkBox.setForeground(color);↵ | |
6 | return button; | 6 | return checkBox; | |
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 | 15 |
Number of mapped statements | 3 |
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 | JRadioButton button = new JRadioButton(name); |
| 1 | JCheckBox checkBox = new JCheckBox(JMeterUtils.getResString(labelResourceName)); | ||||||||||||||||||||||
| 2 | checkBox.setSelected(true); | ||||||||||||||||||||||||
2 | button.setActionCommand(String.valueOf(value)); | | ||||||||||||||||||||||||
3 | button.addActionListener(this); |
| 3 | checkBox.addItemListener(this); | ||||||||||||||||||||||
| 4 | checkBox.setForeground(color); | ||||||||||||||||||||||||
4 | group.add(button); | | ||||||||||||||||||||||||
5 | return button; |
| 5 | return checkBox; |
Row | Violation |
---|---|
1 | Expression button.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression checkBox.addItemListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression button.addActionListener(this) is a void method call, and thus it cannot be parameterized |
4 | Expression checkBox.addItemListener(this) is a void method call, and thus it cannot be parameterized |
5 | Clone fragment #1 returns variable button with type javax.swing.JRadioButton , while Clone fragment #2 returns variable checkBox with type javax.swing.JCheckBox |