File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/idprops/LineItemPK.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/collection/backref/map/compkey/MapKey.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 ) { ↵ | 1 | if ( this == o ) {↵ | |
2 | return true; ↵ | 2 | return true;↵ | |
3 | } ↵ | 3 | }↵ | |
4 | if ( o == null || getClass() != o.getClass() ) { ↵ | 4 | if ( o == null || getClass() != o.getClass() ) {↵ | |
5 | return false; ↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | LineItemPK that = ( LineItemPK↵ | |||
8 | ) o;↵ | 7 | MapKey mapKey = ( MapKey ) o;↵ | |
9 | ↵ | |||
10 | if ( !order.equals( that.order ) ) {↵ | 8 | if ( !↵ | |
11 | return false;↵ | |||
12 | }↵ | |||
13 | if ( !productCode.equals( that.productCode ) ) { ↵ | 9 | role.equals( mapKey.role ) ) {↵ | |
14 | return false; ↵ | 10 | return false;↵ | |
15 | }↵ | 11 | }↵ | |
16 | ↵ | |||
17 | return true; | 12 |
| |
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 | 8 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
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 == null || getClass() != o.getClass()) | 3 | if (o == null || getClass() != o.getClass()) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | LineItemPK that = (LineItemPK)o; |
| 5 | MapKey mapKey = (MapKey)o; | ||||||||||||||||||||||||||
6 | if (!order.equals(that.order)) |
| 6 | if (!role.equals(mapKey.role)) | ||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||
8 | if (!productCode.equals(that.productCode)) | | ||||||||||||||||||||||||||||
9 | return false; |
| | |||||||||||||||||||||||||||
10 | return true; | 8 | return true; |
Row | Violation |
---|---|
1 | Expression that.order cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression mapKey.role cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.hibernate.test.idprops.Order of variable that.order does not match with type java.lang.String of variable mapKey.role |
4 | Type org.hibernate.test.idprops.Order of variable order does not match with type java.lang.String of variable role |
5 | Unmatched return false; |
6 | Clone fragment #1 returns variables that , while Clone fragment #2 returns variables |