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: 5 | Number of AST nodes: 5 | |||
1 | Being b = (Being) iter.next();↵ | 1 | Being b = (Being) iter.next();↵ | |
2 | assertTrue( Hibernate.isInitialized( b.getLocation() ) );↵ | 2 | assertFalse( Hibernate.isInitialized( b.getLocation() ) );↵ | |
3 | assertNotNull( b.getLocation().getName() );↵ | 3 | assertNotNull( b.getLocation().getName() );↵ | |
4 | assertNotNull( b.getIdentity() );↵ | 4 | assertNotNull( b.getIdentity() );↵ | |
5 | assertNotNull( b.getSpecies() ); | 5 |
| |
See real code fragment | See real code fragment |
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 in the same method |
Number of node comparisons | 26 |
Number of mapped statements | 5 |
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 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |