while ( iter.hasNext() ) {
AST n = iter.nextNode();
count++;
System.out.println( n );
}
while ( iter2.hasNext() ) {
AST n = iter2.nextNode();
count2++;
System.out.println( n );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/ast/ASTIteratorTest.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/ast/ASTIteratorTest.java
|
Method name: void testParentsFirstIterator()
|
|
Method name: void testParentsFirstIterator()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter2.hasNext() ) {↵
|
2 | AST n = iter.nextNode();↵ | | 2 | AST n = iter2.nextNode();↵
|
3 | count++;↵ | | 3 | count2++;↵
|
4 | System.out.println( n );↵ | | 4 | System.out.println( n );↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 16 |
-
{Non-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 |
17 | while (iter.hasNext()) | | 25 | while (iter2.hasNext()) |
18 | | | 26 | AST n = iter2.nextNode(); |
19 | | | 27 | |
20 | | | 28 | |
Precondition Violations (2)
Row |
Violation |
1 | Type org.hibernate.hql.ast.util.ASTParentsFirstIterator of variable iter does not match with type org.hibernate.hql.ast.util.ASTIterator of variable iter2 |
2 | Type org.hibernate.hql.ast.util.ASTParentsFirstIterator of variable iter does not match with type org.hibernate.hql.ast.util.ASTIterator of variable iter2 |