File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/filter/Category.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/InnerKey.java | |||
Method name: int hashCode()
|
Method name: int hashCode()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | int result;↵ | 1 | int result;↵ | |
2 | result = name.hashCode();↵ | 2 | result = ↵ | |
3 | result = 29 * result + ( effectiveStartDate != null ? effectiveStartDate.hashCode() : 0 );↵ | 3 | (akey != null ? akey.hashCode() : 0);↵ | |
4 | result = 29 * result + ( effectiveEndDate != null ? effectiveEndDate.hashCode() : 0 );↵ | 4 | result = 29 * result + (bkey != null ? bkey.hashCode() : 0);↵ | |
5 | return result; | 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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int result; | 1 | int result; | ||||||||||||||||||||||
2 | result = name.hashCode(); |
| 2 | result = (akey != null ? akey.hashCode() : 0); | |||||||||||||||||||||
3 | result = 29 * result + (effectiveStartDate != null ? effectiveStartDate.hashCode() : 0); |
| 3 | result = 29 * result + (bkey != null ? bkey.hashCode() : 0); | |||||||||||||||||||||
4 | result = 29 * result + (effectiveEndDate != null ? effectiveEndDate.hashCode() : 0); |
| | ||||||||||||||||||||||
5 | return result; | 4 | return result; |
Row | Violation |
---|---|
1 | Type java.util.Date of variable effectiveStartDate does not match with type java.lang.String of variable bkey |
2 | Type java.util.Date of variable effectiveStartDate does not match with type java.lang.String of variable bkey |
3 | Unmatched statement result=29 * result + (effectiveEndDate != null ? effectiveEndDate.hashCode() : 0); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Clone fragment #1 returns variables result , while Clone fragment #2 returns variables |