File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/subselect/SubselectTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/unionsubclass/UnionSubclassTest.java | |||
Method name: void testEntitySubselect()
|
Method name: void testUnionSubclass()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for ( Iterator iter = beings.iterator(); iter.hasNext(); ) {↵ | 1 | Being b = (Being) iter.next();↵ | |
2 | Being b = (Being) iter.next(↵ | |||
3 | );↵ | 2 | assertTrue( Hibernate.isInitialized( b.getLocation() ) );↵ | |
4 | assertNotNull( b.getLocation() );↵ | 3 | assertNotNull( b.getLocation().getName() );↵ | |
5 | assertNotNull( b.getIdentity() );↵ | 4 | assertNotNull( b.getIdentity() );↵ | |
6 | assertNotNull( b.getSpecies() );↵ | 5 |
| |
7 | } | |||
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 20 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | Being b = (Being)iter.next(); |
| | |||||||||||||||
|
| 30 | Being b = (Being)iter.next(); | |||||||||||||||
| 31 | assertTrue(Hibernate.isInitialized(b.getLocation())); | ||||||||||||||||
| 32 | assertNotNull(b.getLocation().getName()); | ||||||||||||||||
17 | assertNotNull(b.getLocation()); |
| 34 | assertNotNull(b.getSpecies()); | ||||||||||||||
18 | assertNotNull(b.getIdentity()); |
| 33 | assertNotNull(b.getIdentity()); | ||||||||||||||
19 | assertNotNull(b.getSpecies()); | |
Row | Violation |
---|---|
1 | Unmatched statement Being b=(Being)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 Being b=(Being)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.subselect.Being of variable b does not match with type org.hibernate.test.unionsubclass.Being of variable b |
4 | Type org.hibernate.test.subselect.Being of variable b does not match with type org.hibernate.test.unionsubclass.Being of variable b |