File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cuk/CompositePropertyRefTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/propertyref/basic/PropertyRefTest.java | |||
Method name: void testOneToOnePropertyRef()
|
Method name: void testOneToOnePropertyRef()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( ( (Person) l.get(0) ).getName().equals("Max") ) {↵ | 1 | if ( ( (Person) l.get(0) ).getName().equals("Max") ) { ↵ | |
2 | assertNull( ( (Person) l.get(0) ).getAddress() );↵ | 2 | assertNull( ( (Person) l.get(0) ).getAddress() ); ↵ | |
3 | assertNotNull( ( (Person) l.get(1) ).getAddress() );↵ | 3 | assertNotNull( ( (Person) l.get(1) ).getAddress() ); ↵ | |
4 | }↵ | 4 | } ↵ | |
5 | else {↵ | 5 | else { ↵ | |
6 | assertNull( ( (Person) l.get(1) ).getAddress() );↵ | 6 | assertNull( ( (Person) l.get(1) ).getAddress() ); ↵ | |
7 | assertNotNull( ( (Person) l.get(0) ).getAddress() );↵ | 7 | assertNotNull( ( (Person) l.get(0) ).getAddress() ); ↵ | |
8 | } | 8 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
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) | 4.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38 | if (((Person)l.get(0)).getName().equals("Max")) |
| 38 | if (((Person)l.get(0)).getName().equals("Max")) | |||||||||||||||
39 | assertNull(((Person)l.get(0)).getAddress()); |
| 39 | assertNull(((Person)l.get(0)).getAddress()); | |||||||||||||||
40 | assertNotNull(((Person)l.get(1)).getAddress()); |
| 40 | assertNotNull(((Person)l.get(1)).getAddress()); | |||||||||||||||
else | else | ||||||||||||||||||
41 | assertNull(((Person)l.get(1)).getAddress()); |
| 41 | assertNull(((Person)l.get(1)).getAddress()); | |||||||||||||||
42 | assertNotNull(((Person)l.get(0)).getAddress()); |
| 42 | assertNotNull(((Person)l.get(0)).getAddress()); |
Row | Violation |
---|---|
1 | Type org.hibernate.test.cuk.Person of variable (Person)l.get(0) does not match with type org.hibernate.test.propertyref.basic.Person of variable (Person)l.get(0) |
2 | Type org.hibernate.test.cuk.Address of variable ((Person)l.get(0)).getAddress() does not match with type org.hibernate.test.propertyref.basic.Address of variable ((Person)l.get(0)).getAddress() |
3 | Type org.hibernate.test.cuk.Person of variable (Person)l.get(0) does not match with type org.hibernate.test.propertyref.basic.Person of variable (Person)l.get(0) |
4 | Type org.hibernate.test.cuk.Address of variable ((Person)l.get(1)).getAddress() does not match with type org.hibernate.test.propertyref.basic.Address of variable ((Person)l.get(1)).getAddress() |
5 | Type org.hibernate.test.cuk.Person of variable (Person)l.get(1) does not match with type org.hibernate.test.propertyref.basic.Person of variable (Person)l.get(1) |
6 | Type org.hibernate.test.cuk.Address of variable ((Person)l.get(1)).getAddress() does not match with type org.hibernate.test.propertyref.basic.Address of variable ((Person)l.get(1)).getAddress() |
7 | Type org.hibernate.test.cuk.Person of variable (Person)l.get(1) does not match with type org.hibernate.test.propertyref.basic.Person of variable (Person)l.get(1) |
8 | Type org.hibernate.test.cuk.Address of variable ((Person)l.get(0)).getAddress() does not match with type org.hibernate.test.propertyref.basic.Address of variable ((Person)l.get(0)).getAddress() |
9 | Type org.hibernate.test.cuk.Person of variable (Person)l.get(0) does not match with type org.hibernate.test.propertyref.basic.Person of variable (Person)l.get(0) |