SAXBuilder bldr = new SAXBuilder();
Document doc;
doc = bldr.build(compref);
Element root = doc.getRootElement();
Element body = root.getChild("body");
List sections = body.getChildren("section");
SAXBuilder bldr = new SAXBuilder();
Document doc;
doc = bldr.build(compref);
Element root = doc.getRootElement();
Element body = root.getChild("body");
List sections = body.getChildren("section");
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 createTitleSet()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | SAXBuilder bldr = new SAXBuilder();↵ | | 1 | SAXBuilder bldr = new SAXBuilder();↵
|
2 | Document doc;↵ | | 2 | Document doc;↵
|
3 | doc = bldr.build(compref);↵ | | 3 | doc = bldr.build(compref);↵
|
4 | Element root = doc.getRootElement();↵ | | 4 | Element root = doc.getRootElement();↵
|
5 | Element body = root.getChild("body");↵ | | 5 | Element body = root.getChild("body");↵
|
6 | List sections = body.getChildren("section"); | | 6 | List sections = body.getChildren("section");
|
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 0.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | SAXBuilder bldr = new SAXBuilder(); | | 3 | SAXBuilder bldr = new SAXBuilder(); |
4 | Document doc; | | 4 | Document doc; |
5 | doc = bldr.build(compref); | | 5 | doc = bldr.build(compref); |
6 | Element root = doc.getRootElement(); | | 6 | Element root = doc.getRootElement(); |
7 | Element body = root.getChild("body"); | | 7 | Element body = root.getChild("body"); |
8 | List sections = body.getChildren("section"); | | 8 | List sections = body.getChildren("section"); |
Precondition Violations (0)
Row |
Violation |