File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/unionsubclass/UnionSubclassTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/unionsubclass/UnionSubclassTest.java | |||
Method name: void testUnionSubclass()
|
Method name: void testUnionSubclass()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | for ( Iterator iter = beings.iterator(); iter.hasNext(); ) {↵ | 1 | for ( Iterator iter = beings.iterator(); iter.hasNext(); ) {↵ | |
2 | Being b = (Being) iter.next();↵ | 2 | Being b = (Being) iter.next();↵ | |
3 | assertTrue( Hibernate.isInitialized( b.getLocation() ) );↵ | 3 | assertFalse( Hibernate.isInitialized( b.getLocation() ) );↵ | |
4 | assertNotNull( b.getLocation().getName() );↵ | 4 | assertNotNull( b.getLocation().getName() );↵ | |
5 | assertNotNull( b.getIdentity() );↵ | 5 | assertNotNull( b.getIdentity() );↵ | |
6 | assertNotNull( b.getSpecies() );↵ | 6 | assertNotNull( b.getSpecies() );↵ | |
7 | } | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 36 |
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) | 3.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29 | for (Iterator iter = beings.iterator(); iter.hasNext(); ) | 38 | for (Iterator iter = beings.iterator(); iter.hasNext(); ) | |||||||||||||||
30 | Being b = (Being)iter.next(); | 39 | Being b = (Being)iter.next(); | |||||||||||||||
31 | assertTrue(Hibernate.isInitialized(b.getLocation())); |
| 40 | assertFalse(Hibernate.isInitialized(b.getLocation())); | ||||||||||||||
32 | assertNotNull(b.getLocation().getName()); | 41 | assertNotNull(b.getLocation().getName()); | |||||||||||||||
33 | assertNotNull(b.getIdentity()); | 42 | assertNotNull(b.getIdentity()); | |||||||||||||||
34 | assertNotNull(b.getSpecies()); | 43 | assertNotNull(b.getSpecies()); |
Row | Violation |
---|---|
1 | Expression assertTrue(Hibernate.isInitialized(b.getLocation())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression assertFalse(Hibernate.isInitialized(b.getLocation())) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression assertTrue(Hibernate.isInitialized(b.getLocation())) is a void method call, and thus it cannot be parameterized |
4 | Expression assertFalse(Hibernate.isInitialized(b.getLocation())) is a void method call, and thus it cannot be parameterized |