File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java | |||
Method name: void testRecursiveLoad()
|
Method name: void testRecursiveLoad()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while ( iter.hasNext() ) {↵ | 1 | while ( iter.hasNext() ) {↵ | |
2 | GlarchProxy g = (GlarchProxy) iter.next();↵ | 2 | BarProxy bar = (BarProxy) iter.next();↵ | |
3 | assertTrue( "not null", g!=null );↵ | 3 | assertTrue( "not null", bar!=null );↵ | |
4 | iter.remove();↵ | 4 | iter.remove();↵ | |
5 | } | 5 |
| |
See real code fragment | See real code fragment |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 16 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30 | while (iter.hasNext()) | 66 | while (iter.hasNext()) | |||||||||||||||
31 | GlarchProxy g = (GlarchProxy)iter.next(); |
| | |||||||||||||||
|
| 67 | BarProxy bar = (BarProxy)iter.next(); | |||||||||||||||
32 | assertTrue("not null", g != null); |
| 68 | assertTrue("not null", bar != null); | ||||||||||||||
33 | iter.remove(); | 69 | iter.remove(); |
Row | Violation |
---|---|
1 | Unmatched statement GlarchProxy g=(GlarchProxy)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement BarProxy bar=(BarProxy)iter.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type org.hibernate.test.legacy.GlarchProxy of variable g does not match with type org.hibernate.test.legacy.BarProxy of variable bar |