configureTestElement(ic);
if (style.isSelected()) {
((RandomController) ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS);
} else {
((RandomController) ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS);
}
configureTestElement(ic);
if (style.isSelected()) {
((InterleaveControl) ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS);
} else {
((InterleaveControl) ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/RandomControlGui.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/InterleaveControlGui.java
|
Method name: void modifyTestElement(TestElement)
|
|
Method name: void modifyTestElement(TestElement)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | configureTestElement(ic);↵ | | 1 | configureTestElement(ic);↵
|
2 | if (style.isSelected()) {↵ | | 2 | if (style.isSelected()) {↵
|
3 | ((RandomController) ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS);↵ | | 3 | ((InterleaveControl) ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS);↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | ((RandomController) ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS);↵ | | 5 | ((InterleaveControl) ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS);↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | configureTestElement(ic); | | 1 | configureTestElement(ic); |
2 | if (style.isSelected()) | | 2 | if (style.isSelected()) |
3 | ((RandomController)ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS); | | 3 | ((InterleaveControl)ic).setStyle(InterleaveControl.IGNORE_SUB_CONTROLLERS); |
| | | | |
4 | ((RandomController)ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS); | | 4 | ((InterleaveControl)ic).setStyle(InterleaveControl.USE_SUB_CONTROLLERS); |
Precondition Violations (0)
Row |
Violation |