int result = 193; result = 37 * result + this.category1.hashCode(); long temp = Double.doubleToLongBits(this.value1); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + this.category2.hashCode(); temp = Double.doubleToLongBits(this.value2); result = 37 * result + (int) (temp ^ (temp >>> 32)); result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.stroke.hashCode(); return result;
int result = 193; result = 37 * result + HashUtilities.hashCodeForPaint(this.paint); result = 37 * result + this.font.hashCode(); result = 37 * result + this.label.hashCode(); result = 37 * result + this.anchor.hashCode(); long temp = Double.doubleToLongBits(this.angle); result = 37 * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(this.radius); result = 37 * result + (int) (temp ^ (temp >>> 32)); return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/CategoryLineAnnotation.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.java
Method name: int hashCode() Method name: int hashCode()
Number of AST nodes: 10 Number of AST nodes: 10
1
int result = 193;
1
int result = 193;
2
        result = 37 * result + this.category1.hashCode();
2
        result = 37 * result + 
3
        long temp = Double.doubleToLongBits(this.value1);
4
        result = 37 * result + (int) (temp ^ (temp >>> 32)
3
HashUtilities.hashCodeForPaint(this.paint);
4
        result = 37 * result + this.font.hashCode();
5
);
5
        result = 37 * result + this.label.hashCode();
6
        result = 37 * result + this.category2.hashCode();
6
        result = 37 * result + this.anchor.hashCode();
7
        temp = Double.doubleToLongBits(this.value2);
7
        long temp = Double.doubleToLongBits(this.angle);
8
        result = 37 * result + (int) (temp ^ (temp >>> 32));
8
        result = 37 * result + (int) (temp ^ (temp >>> 32));
9
        result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
9
        
10
        result = 37 * result + this.stroke.hashCode(
10
temp = Double.doubleToLongBits(this.radius);
11
);
11
        result = 37 * result + (int) (temp ^ (temp >>> 32));
12
        return result;
12
        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 comparisons68
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    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 = 193;
    1
    int result = 193;
    2
    result = 37 * result + this.category1.hashCode();
    2
    result = 37 * result + this.category1.hashCode();
    2
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    Differences
    Expression1Expression2Difference
    this.category1.hashCode()HashUtilities.hashCodeForPaint(this.paint)TYPE_COMPATIBLE_REPLACEMENT
    2
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    3
    long temp = Double.doubleToLongBits(this.value1);
    3
    long temp = Double.doubleToLongBits(this.value1);
    6
    long temp = Double.doubleToLongBits(this.angle);
    Differences
    Expression1Expression2Difference
    value1angleVARIABLE_NAME_MISMATCH
    6
    long temp = Double.doubleToLongBits(this.angle);
    4
    result = 37 * result + (int)(temp ^ (temp >>> 32));
    7
    result = 37 * result + (int)(temp ^ (temp >>> 32));
    5
    result = 37 * result + this.category2.hashCode();
    5
    result = 37 * result + this.category2.hashCode();
    5
    result = 37 * result + this.anchor.hashCode();
    Differences
    Expression1Expression2Difference
    category2anchorVARIABLE_NAME_MISMATCH
    java.lang.Comparableorg.jfree.ui.TextAnchorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Comparable of variable this.category2 does not match with type org.jfree.ui.TextAnchor of variable this.anchor
    • Make classes java.lang.Comparable and org.jfree.ui.TextAnchor extend a common superclass
    5
    result = 37 * result + this.anchor.hashCode();
    6
    temp = Double.doubleToLongBits(this.value2);
    6
    temp = Double.doubleToLongBits(this.value2);
    8
    temp = Double.doubleToLongBits(this.radius);
    Differences
    Expression1Expression2Difference
    value2radiusVARIABLE_NAME_MISMATCH
    8
    temp = Double.doubleToLongBits(this.radius);
    7
    result = 37 * result + (int)(temp ^ (temp >>> 32));
    9
    result = 37 * result + (int)(temp ^ (temp >>> 32));
    8
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    8
    result = 37 * result + HashUtilities.hashCodeForPaint(this.paint);
    3
    result = 37 * result + this.font.hashCode();
    Differences
    Expression1Expression2Difference
    HashUtilities.hashCodeForPaint(this.paint)this.font.hashCode()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.font.hashCode() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    result = 37 * result + this.font.hashCode();
    9
    result = 37 * result + this.stroke.hashCode();
    9
    result = 37 * result + this.stroke.hashCode();
    4
    result = 37 * result + this.label.hashCode();
    Differences
    Expression1Expression2Difference
    strokelabelVARIABLE_NAME_MISMATCH
    java.awt.Strokejava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.awt.Stroke of variable this.stroke does not match with type java.lang.String of variable this.label
    • Make classes java.awt.Stroke and java.lang.String extend a common superclass
    4
    result = 37 * result + this.label.hashCode();
    10
    return result;
    10
    return result;
    Precondition Violations (3)
    Row Violation
    1Type java.lang.Comparable of variable this.category2 does not match with type org.jfree.ui.TextAnchor of variable this.anchor
    2Expression this.font.hashCode() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type java.awt.Stroke of variable this.stroke does not match with type java.lang.String of variable this.label