File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/Inner.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/Outer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (this == o) return true;↵ | 1 | if (this == o) return true;↵ | |
2 | if (!(o instanceof Inner)) return false;↵ | 2 | if (!(o instanceof Outer)) return false;↵ | |
3 | final Inner cidSuper = (Inner) o;↵ | 3 | final Outer cidDetail = (Outer) o;↵ | |
4 | if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null) return false;↵ | 4 | if (id != null ? !id.equals(cidDetail.id) : cidDetail.id != null) return false;↵ | |
5 | return true; | 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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 31 |
Number of mapped statements | 7 |
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.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this == o) | 1 | if (this == o) | ||||||||||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||||||||||||
3 | if (!(o instanceof Inner)) |
| 3 | if (!(o instanceof Outer)) | |||||||||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||||||||
| 5 | final Outer cidDetail = (Outer)o; | |||||||||||||||||||||||||||||||||||||||
5 | final Inner cidSuper = (Inner)o; | | |||||||||||||||||||||||||||||||||||||||
6 | if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null) |
| 6 | if (id != null ? !id.equals(cidDetail.id) : cidDetail.id != null) | |||||||||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||||||||
8 | return true; | 8 | return true; |
Row | Violation |
---|---|
1 | Type boolean of variable o instanceof Inner does not match with type boolean of variable o instanceof Outer |
2 | Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.OuterKey of variable id |
3 | Type org.hibernate.test.legacy.Inner of variable cidSuper does not match with type org.hibernate.test.legacy.Outer of variable cidDetail |
4 | Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.OuterKey of variable cidDetail.id |
5 | Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.OuterKey of variable id |
6 | Type org.hibernate.test.legacy.Inner of variable cidSuper does not match with type org.hibernate.test.legacy.Outer of variable cidDetail |
7 | Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.OuterKey of variable cidDetail.id |