if (this == o) return true; if (!(o instanceof InnerKey)) return false; final InnerKey cidSuperID = (InnerKey) o; if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null) return false; if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null) return false; return true;
if (this == o) return true; if (!(o instanceof OuterKey)) return false; final OuterKey cidDetailID = (OuterKey) o; if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false; if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != 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/InnerKey.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/OuterKey.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 10 Number of AST nodes: 10
1
if (this == o) return true;
1
if (this == o) return true;
2
		if (!(o instanceof InnerKey)) return false;
2
		if (!(o instanceof OuterKey)) return false;
3
		final InnerKey cidSuperID = (InnerKey) o;
3
		final OuterKey cidDetailID = (OuterKey) o;
4
		if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null) return false;
4
		if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null) return false;
5
		if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null) return false;
5
		if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null) return false;
6
		return true;
6
		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)1.7
Clones locationClones are in different classes
Number of node comparisons41
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.9
    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 InnerKey))
    3
    if (!(o instanceof InnerKey))
    3
    if (!(o instanceof OuterKey))
    Differences
    Expression1Expression2Difference
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.OuterKeyVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.legacy.InnerKey does not match with type org.hibernate.test.legacy.OuterKey
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.OuterKey extend a common superclass
    3
    if (!(o instanceof OuterKey))
    4
    return false;
    4
    return false;
                                                                                        
    5
    final OuterKey cidDetailID = (OuterKey)o;
    5
    final InnerKey cidSuperID = (InnerKey)o;
                                                                                      
    6
    if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null)
    6
    if (akey != null ? !akey.equals(cidSuperID.akey) : cidSuperID.akey != null)
    6
    if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null)
    Differences
    Expression1Expression2Difference
    akeydetailIdVARIABLE_NAME_MISMATCH
    cidSuperIDcidDetailIDVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.OuterKeyVARIABLE_TYPE_MISMATCH
    akeydetailIdVARIABLE_NAME_MISMATCH
    akeydetailIdVARIABLE_NAME_MISMATCH
    cidSuperIDcidDetailIDVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.OuterKeyVARIABLE_TYPE_MISMATCH
    akeydetailIdVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.akey does not match with type java.lang.String of variable cidDetailID.detailId
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.OuterKey extend a common superclass
    Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.akey does not match with type java.lang.String of variable cidDetailID.detailId
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.OuterKey extend a common superclass
    Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    if (detailId != null ? !detailId.equals(cidDetailID.detailId) : cidDetailID.detailId != null)
    7
    return false;
    7
    return false;
    8
    if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null)
    8
    if (bkey != null ? !bkey.equals(cidSuperID.bkey) : cidSuperID.bkey != null)
    8
    if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null)
    Differences
    Expression1Expression2Difference
    bkeymasterVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    cidSuperIDcidDetailIDVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.OuterKeyVARIABLE_TYPE_MISMATCH
    bkeymasterVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    bkeymasterVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    cidSuperIDcidDetailIDVARIABLE_NAME_MISMATCH
    org.hibernate.test.legacy.InnerKeyorg.hibernate.test.legacy.OuterKeyVARIABLE_TYPE_MISMATCH
    bkeymasterVARIABLE_NAME_MISMATCH
    java.lang.Stringorg.hibernate.test.legacy.MiddleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable bkey does not match with type org.hibernate.test.legacy.Middle of variable master
    • Make classes java.lang.String and org.hibernate.test.legacy.Middle extend a common superclass
    Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.OuterKey extend a common superclass
    Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    • Make classes java.lang.String and org.hibernate.test.legacy.Middle extend a common superclass
    Type java.lang.String of variable bkey does not match with type org.hibernate.test.legacy.Middle of variable master
    • Make classes java.lang.String and org.hibernate.test.legacy.Middle extend a common superclass
    Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    • Make classes org.hibernate.test.legacy.InnerKey and org.hibernate.test.legacy.OuterKey extend a common superclass
    Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    • Make classes java.lang.String and org.hibernate.test.legacy.Middle extend a common superclass
    8
    if (master != null ? !master.equals(cidDetailID.master) : cidDetailID.master != null)
    9
    return false;
    9
    return false;
    10
    return true;
    10
    return true;
    Precondition Violations (25)
    Row Violation
    1Type org.hibernate.test.legacy.InnerKey does not match with type org.hibernate.test.legacy.OuterKey
    2Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type java.lang.String of variable cidSuperID.akey does not match with type java.lang.String of variable cidDetailID.detailId
    5Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Type java.lang.String of variable cidSuperID.akey does not match with type java.lang.String of variable cidDetailID.detailId
    10Expression cidSuperID.akey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression cidDetailID.detailId cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Type java.lang.String of variable bkey does not match with type org.hibernate.test.legacy.Middle of variable master
    13Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    16Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    19Type java.lang.String of variable bkey does not match with type org.hibernate.test.legacy.Middle of variable master
    20Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master
    23Expression cidSuperID.bkey cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression cidDetailID.master cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Type java.lang.String of variable cidSuperID.bkey does not match with type org.hibernate.test.legacy.Middle of variable cidDetailID.master