List components = ((Element) sections.get(i)).getChildren("component");
for (int j = 0; j < components.size(); j++) {
Element comp = (Element) components.get(j);
guiTags.put(comp.getAttributeValue("tag"), Boolean.FALSE);
}
List components = ((Element) sections.get(i)).getChildren("component");
for (int j = 0; j < components.size(); j++) {
Element comp = (Element) components.get(j);
funcTitles.put(comp.getAttributeValue("name"), Boolean.FALSE);
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/JMeterTest.java
|
|
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/JMeterTest.java
|
Method name: void createTagSet()
|
|
Method name: void createFunctionSet()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | List components = ((Element) sections.get(i)).getChildren("component");↵ | | 1 | List components = ((Element) sections.get(i)).getChildren("component");↵
|
2 | for (int j = 0; j < components.size(); j++) {↵ | | 2 | for (int j = 0; j < components.size(); j++) {↵
|
3 | Element comp = (Element) components.get(j);↵ | | 3 | Element comp = (Element) components.get(j);↵
|
4 | guiTags.put(comp.getAttributeValue("tag"), Boolean.FALSE);↵ | | 4 | funcTitles.put(comp.getAttributeValue("name"), Boolean.FALSE);↵
|
5 | } | | 5 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 12 |
-
{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.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | List components = ((Element)sections.get(i)).getChildren("component"); | | 11 | List components = ((Element)sections.get(i)).getChildren("component"); |
11 | for (int j = 0; j < components.size(); j++) | | 12 | for (int j = 0; j < components.size(); j++) |
12 | Element comp = (Element)components.get(j); | | 13 | Element comp = (Element)components.get(j); |
13 | guiTags.put(comp.getAttributeValue("tag"), Boolean.FALSE); | | 14 | funcTitles.put(comp.getAttributeValue("name"), Boolean.FALSE); |
Precondition Violations (0)
Row |
Violation |