File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/OuterKey.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/Middle.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 8 | |||
1 | if (this == o) return true;↵ | 1 | if (this == o) return true;↵ | |
2 | if (!(o instanceof OuterKey)) return false;↵ | 2 | if (!(o instanceof Middle)) return false;↵ | |
3 | final OuterKey cidDetailID = (OuterKey) o;↵ | 3 | final Middle cidMaster = (Middle) o;↵ | |
4 | if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false;↵ | 4 | if (id != null ? !id.equals(cid↵ | |
5 | if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null) return false;↵ | 5 | Master.id) : cidMaster.id != null) return false;↵ | |
6 | return true; | 6 |
| |
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.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 34 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this == o) | 1 | if (this == o) | ||||||||||||||||||||||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||||||||||||||||||||||||
3 | if (!(o instanceof OuterKey)) |
| 3 | if (!(o instanceof Middle)) | |||||||||||||||||||||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | final Middle cidMaster = (Middle)o; | |||||||||||||||||||||||||||||||||||||||||||||||||||
5 | final OuterKey cidDetailID = (OuterKey)o; | | |||||||||||||||||||||||||||||||||||||||||||||||||||
6 | if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) |
| 6 | if (id != null ? !id.equals(cidMaster.id) : cidMaster.id != null) | |||||||||||||||||||||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||||||||||||||||||||
8 | if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null) | | |||||||||||||||||||||||||||||||||||||||||||||||||||
9 | return false; |
| | ||||||||||||||||||||||||||||||||||||||||||||||||||
10 | return true; | 8 | return true; |
Row | Violation |
---|---|
1 | Type boolean of variable o instanceof OuterKey does not match with type boolean of variable o instanceof Middle |
2 | Type java.lang.String of variable detailId does not match with type org.hibernate.test.legacy.MiddleKey of variable id |
3 | Type org.hibernate.test.legacy.OuterKey of variable cidDetailID does not match with type org.hibernate.test.legacy.Middle of variable cidMaster |
4 | Type java.lang.String of variable cidDetailID.detailId does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id |
5 | Type java.lang.String of variable detailId does not match with type org.hibernate.test.legacy.MiddleKey of variable id |
6 | Type org.hibernate.test.legacy.OuterKey of variable cidDetailID does not match with type org.hibernate.test.legacy.Middle of variable cidMaster |
7 | Type java.lang.String of variable cidDetailID.detailId does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id |
8 | Unmatched return false; |