int result; result = order.hashCode(); result = 31 * result + productCode.hashCode(); return result;
int result; result = resultClass.hashCode(); result = 31 * result + propertyAccessor.hashCode(); return result;
Clone fragments detected by clone detection tool
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/core/src/main/java/org/hibernate/transform/AliasToBeanResultTransformer.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 = order.hashCode();
2
		result = resultClass.hashCode();
3
		result = 31 * result + productCode.hashCode();
3
		result = 31 * result + propertyAccessor.hashCode();
4
		return result;
4
		return result;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    int result;
    1
    int result;
    2
    result = order.hashCode();
    2
    result = order.hashCode();
    2
    result = resultClass.hashCode();
    Differences
    Expression1Expression2Difference
    orderresultClassVARIABLE_NAME_MISMATCH
    org.hibernate.test.idprops.Orderjava.lang.ClassVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.idprops.Order of variable order does not match with type java.lang.Class of variable resultClass
    • Make classes org.hibernate.test.idprops.Order and java.lang.Class extend a common superclass
    2
    result = resultClass.hashCode();
    3
    result = 31 * result + productCode.hashCode();
    3
    result = 31 * result + productCode.hashCode();
    3
    result = 31 * result + propertyAccessor.hashCode();
    Differences
    Expression1Expression2Difference
    productCodepropertyAccessorVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.hibernate.property.PropertyAccessorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable productCode does not match with type org.hibernate.property.PropertyAccessor of variable propertyAccessor
    • Make classes java.lang.String and org.hibernate.property.PropertyAccessor extend a common superclass
    3
    result = 31 * result + propertyAccessor.hashCode();
    4
    return result;
    4
    return result;
    Precondition Violations (2)
    Row Violation
    1Type org.hibernate.test.idprops.Order of variable order does not match with type java.lang.Class of variable resultClass
    2Type java.lang.String of variable productCode does not match with type org.hibernate.property.PropertyAccessor of variable propertyAccessor