if (this == o) return true; if (!(o instanceof Inner)) return false; final Inner cidSuper = (Inner) o; if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null) return false; return true;
if (this == o) return true; if (!(o instanceof Middle)) return false; final Middle cidMaster = (Middle) o; if (id != null ? !id.equals(cidMaster.id) : cidMaster.id != null) return false; return true;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/Inner.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: 8 Number of AST nodes: 8
1
if (this == o) return true;
1
if (this == o) return true;
2
		if (!(o instanceof Inner)) return false;
2
		if (!(o instanceof Middle)) return false;
3
		final Inner cidSuper = (Inner) o;
3
		final Middle cidMaster = (Middle) o;
4
		if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null) return false;
4
		if (id != null ? !id.equals(cidMaster.id) : cidMaster.id != null) return false;
5
		return true;
5
		return true;
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.7
Clones locationClones are in different classes
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (this == o)
    1
    if (this == o)
    2
    return true;
    2
    return true;
    3
    if (!(o instanceof Inner))
    3
    if (!(o instanceof Inner))
    3
    if (!(o instanceof Middle))
    Differences
    Expression1Expression2Difference
    org.hibernate.test.legacy.Innerorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.legacy.Inner does not match with type org.hibernate.test.legacy.Middle
    • Make classes org.hibernate.test.legacy.Inner and org.hibernate.test.legacy.Middle extend a common superclass
    3
    if (!(o instanceof Middle))
    4
    return false;
    4
    return false;
                                                                            
    5
    final Middle cidMaster = (Middle)o;
    5
    final Inner cidSuper = (Inner)o;
                                                                      
    6
    if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null)
    6
    if (id != null ? !id.equals(cidSuper.id) : cidSuper.id != null)
    6
    if (id != null ? !id.equals(cidMaster.id) : cidMaster.id != null)
    Differences
    Expression1Expression2Difference
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.MiddleKeyVARIABLE_TYPE_MISMATCH
    cidSupercidMasterVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.Innerorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.MiddleKeyVARIABLE_TYPE_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.MiddleKeyVARIABLE_TYPE_MISMATCH
    cidSupercidMasterVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.Innerorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.MiddleKeyVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.MiddleKey of variable id
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.MiddleKey extend a common superclass
    Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    • Make classes org.hibernate.test.legacy.Inner and org.hibernate.test.legacy.Middle extend a common superclass
    Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.MiddleKey extend a common superclass
    Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.MiddleKey of variable id
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.MiddleKey extend a common superclass
    Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    • Make classes org.hibernate.test.legacy.Inner and org.hibernate.test.legacy.Middle extend a common superclass
    Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.MiddleKey extend a common superclass
    6
    if (id != null ? !id.equals(cidMaster.id) : cidMaster.id != null)
    7
    return false;
    7
    return false;
    8
    return true;
    8
    return true;
    Precondition Violations (15)
    Row Violation
    1Type org.hibernate.test.legacy.Inner does not match with type org.hibernate.test.legacy.Middle
    2Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.MiddleKey of variable id
    3Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    6Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    9Type org.hibernate.test.legacy.InnerKey of variable id does not match with type org.hibernate.test.legacy.MiddleKey of variable id
    10Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id
    13Expression cidSuper.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression cidMaster.id cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Type org.hibernate.test.legacy.InnerKey of variable cidSuper.id does not match with type org.hibernate.test.legacy.MiddleKey of variable cidMaster.id