File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/transform/AliasToBeanResultTransformer.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/sql/hand/MonetaryAmount.java | |||
Method name: int hashCode()
|
Method name: int hashCode()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | int result;↵ | 1 | int result;↵ | |
2 | result = resultClass.hashCode();↵ | 2 | result = value.hashCode();↵ | |
3 | result = 31 * result + propertyAccessor.hashCode();↵ | 3 | result = 29 * result + currency.hashCode();↵ | |
4 | return result; | 4 |
| |
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 | 16 |
Number of mapped statements | 3 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | int result; | 1 | int result; | |||||||||||||||
2 | result = resultClass.hashCode(); |
| 2 | result = value.hashCode(); | ||||||||||||||
|
| 3 | result = 29 * result + currency.hashCode(); | |||||||||||||||
3 | result = 31 * result + propertyAccessor.hashCode(); |
| | |||||||||||||||
4 | return result; | 4 | return result; |
Row | Violation |
---|---|
1 | Type java.lang.Class of variable resultClass does not match with type java.math.BigDecimal of variable value |
2 | Unmatched statement result=29 * result + currency.hashCode(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement result=31 * result + propertyAccessor.hashCode(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |