if (myClass.isInstance(element)) {
log.debug("Applicable: " + element.getName());
if (ascending) {
elements.addFirst(element);
} else {
elements.add(element);
}
}
if (myClass.isInstance(element)) {
if (ascending) {
elements.addFirst(element);
} else {
elements.add(element);
}
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
|
Method name: Collection findApplicableElements(JMeterTreeNode, Class, boolean)
|
|
Method name: Collection findApplicableElements(JMeterTreeNode, Class, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | if (myClass.isInstance(element)) {↵ | | 1 | if (myClass.isInstance(element)) {↵
|
2 | log.debug("Applicable: " + element.getName());↵ | | 2 | ↵
|
3 | if (ascending) {↵ | | 3 | if (ascending) {↵
|
4 | elements.addFirst(element);↵ | | 4 | elements.addFirst(element);↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | elements.add(element);↵ | | 6 | elements.add(element);↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 3.1 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
18 | if (myClass.isInstance(element)) | | 8 | if (myClass.isInstance(element)) |
19 | log.debug("Applicable: " + element.getName()); | | | |
20 | | | 9 | |
21 | elements.addFirst(element); | | 10 | elements.addFirst(element); |
| | | | |
22 | | | 11 | |
Precondition Violations (0)
Row |
Violation |