if (x==y) return true; if (x==null || y==null) return false; return x.equals(y);
if (x==y) return true; if (x==null || y==null) return false; return ( (String[]) x )[0].equals( ( (String[]) y )[0] ) && ( (String[]) x )[1].equals( ( (String[]) y )[1] );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/typeparameters/DefaultValueIntegerType.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/DoubleStringType.java
Method name: boolean equals(Object, Object) Method name: boolean equals(Object, Object)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (x==y) return true;
1
if (x==y) return true;
2
		if (x==null || y==null) return false;
2
		if (x==null || y==null) return false;
3
		return x.equals(y);
3
		return ( (String[]) x )[0].equals( ( (String[]) y )[0] ) && ( (String[]) x )[1].equals( ( (String[]) y )[1] );
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (x == y)
    1
    if (x == y)
    2
    return true;
    2
    return true;
    3
    if (x == null || y == null)
    3
    if (x == null || y == null)
    4
    return false;
    4
    return false;
    5
    return x.equals(y);
    5
    return x.equals(y);
    5
    return ((String[])x)[0].equals(((String[])y)[0]) && ((String[])x)[1].equals(((String[])y)[1]);
    Differences
    Expression1Expression2Difference
    x.equals(y)((String[])x)[0].equals(((String[])y)[0]) && ((String[])x)[1].equals(((String[])y)[1])TYPE_COMPATIBLE_REPLACEMENT
    5
    return ((String[])x)[0].equals(((String[])y)[0]) && ((String[])x)[1].equals(((String[])y)[1]);
    Precondition Violations (0)
    Row Violation