int result = 193; result = HashUtilities.hashCode(result, this.anchor); result = HashUtilities.hashCode(result, this.coordinateType); result = HashUtilities.hashCode(result, this.x); result = HashUtilities.hashCode(result, this.y); result = HashUtilities.hashCode(result, this.maxWidth); result = HashUtilities.hashCode(result, this.maxHeight); result = HashUtilities.hashCode(result, this.title); return result;
int result = HashUtilities.hashCode(193, this.fillPaint); result = HashUtilities.hashCode(result, this.highlightPaint); result = HashUtilities.hashCode(result, this.outlinePaint); result = HashUtilities.hashCode(result, this.outlineStroke); result = HashUtilities.hashCode(result, this.rotateX); result = HashUtilities.hashCode(result, this.rotateY); result = HashUtilities.hashCode(result, this.size); return result;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/experimental/org/jfree/experimental/chart/annotations/XYTitleAnnotation.java File path: /jfreechart-1.0.10/src/org/jfree/chart/needle/MeterNeedle.java
Method name: int hashCode() Method name: int hashCode()
Number of AST nodes: 9 Number of AST nodes: 8
1
int result = 193;
1
int result =
2
        result = HashUtilities.hashCode(result, this.anchor);
2
 HashUtilities.hashCode(193, this.fillPaint);
3
        result = HashUtilities.hashCode(result, this.coordinateType);
3
        result = HashUtilities.hashCode(result, this.highlightPaint);
4
        result = HashUtilities.hashCode(result, this.x);
4
        result = HashUtilities.hashCode(result, this.outlinePaint);
5
        result = HashUtilities.hashCode(result, this.y);
5
        result = HashUtilities.hashCode(result, this.outlineStroke);
6
        result = HashUtilities.hashCode(result, this.maxWidth);
6
        result = HashUtilities.hashCode(result, this.rotateX);
7
        result = HashUtilities.hashCode(result, this.maxHeight);
7
        result = HashUtilities.hashCode(result, this.rotateY);
8
        result = HashUtilities.hashCode(result, this.title);
8
        result = HashUtilities.hashCode(result, this.size);
9
        return result;
9
        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 comparisons72
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    int result = 193;
    1
    int result = 193;
    1
    int result = HashUtilities.hashCode(193, this.fillPaint);
    Differences
    Expression1Expression2Difference
    193HashUtilities.hashCode(193,this.fillPaint)TYPE_COMPATIBLE_REPLACEMENT
    1
    int result = HashUtilities.hashCode(193, this.fillPaint);
    2
    result = HashUtilities.hashCode(result, this.anchor);
    2
    result = HashUtilities.hashCode(result, this.anchor);
    2
    result = HashUtilities.hashCode(result, this.highlightPaint);
    Differences
    Expression1Expression2Difference
    anchorhighlightPaintVARIABLE_NAME_MISMATCH
    org.jfree.ui.RectangleAnchorjava.awt.PaintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.ui.RectangleAnchor of variable this.anchor does not match with type java.awt.Paint of variable this.highlightPaint
    • Make classes org.jfree.ui.RectangleAnchor and java.awt.Paint extend a common superclass
    2
    result = HashUtilities.hashCode(result, this.highlightPaint);
    3
    result = HashUtilities.hashCode(result, this.coordinateType);
    3
    result = HashUtilities.hashCode(result, this.coordinateType);
    3
    result = HashUtilities.hashCode(result, this.outlinePaint);
    Differences
    Expression1Expression2Difference
    coordinateTypeoutlinePaintVARIABLE_NAME_MISMATCH
    org.jfree.experimental.chart.util.XYCoordinateTypejava.awt.PaintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.experimental.chart.util.XYCoordinateType of variable this.coordinateType does not match with type java.awt.Paint of variable this.outlinePaint
    • Make classes org.jfree.experimental.chart.util.XYCoordinateType and java.awt.Paint extend a common superclass
    3
    result = HashUtilities.hashCode(result, this.outlinePaint);
    4
    result = HashUtilities.hashCode(result, this.x);
    4
    result = HashUtilities.hashCode(result, this.x);
    4
    result = HashUtilities.hashCode(result, this.outlineStroke);
    Differences
    Expression1Expression2Difference
    xoutlineStrokeVARIABLE_NAME_MISMATCH
    doublejava.awt.StrokeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.x does not match with type java.awt.Stroke of variable this.outlineStroke
    4
    result = HashUtilities.hashCode(result, this.outlineStroke);
    5
    result = HashUtilities.hashCode(result, this.y);
    5
    result = HashUtilities.hashCode(result, this.y);
    5
    result = HashUtilities.hashCode(result, this.rotateX);
    Differences
    Expression1Expression2Difference
    yrotateXVARIABLE_NAME_MISMATCH
    5
    result = HashUtilities.hashCode(result, this.rotateX);
    6
    result = HashUtilities.hashCode(result, this.maxWidth);
    6
    result = HashUtilities.hashCode(result, this.maxWidth);
    6
    result = HashUtilities.hashCode(result, this.rotateY);
    Differences
    Expression1Expression2Difference
    maxWidthrotateYVARIABLE_NAME_MISMATCH
    6
    result = HashUtilities.hashCode(result, this.rotateY);
    7
    result = HashUtilities.hashCode(result, this.maxHeight);
    7
    result = HashUtilities.hashCode(result, this.maxHeight);
    7
    result = HashUtilities.hashCode(result, this.size);
    Differences
    Expression1Expression2Difference
    maxHeightsizeVARIABLE_NAME_MISMATCH
    doubleintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.maxHeight does not match with type int of variable this.size
    7
    result = HashUtilities.hashCode(result, this.size);
                                      
    8
    return result;
    Preondition Violations
    Unmatched statement return result; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return result;
    8
    return result;
    8
    result = HashUtilities.hashCode(result, this.title);
    8
    result = HashUtilities.hashCode(result, this.title);
    Preondition Violations
    Unmatched statement result=HashUtilities.hashCode(result,this.title); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                            
    9
    return result;
    9
    return result;
    Preondition Violations
    Unmatched return result;
                                      
    Precondition Violations (8)
    Row Violation
    1Type org.jfree.ui.RectangleAnchor of variable this.anchor does not match with type java.awt.Paint of variable this.highlightPaint
    2Type org.jfree.experimental.chart.util.XYCoordinateType of variable this.coordinateType does not match with type java.awt.Paint of variable this.outlinePaint
    3Type double of variable this.x does not match with type java.awt.Stroke of variable this.outlineStroke
    4Type double of variable this.maxHeight does not match with type int of variable this.size
    5Unmatched statement return result; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6Unmatched return result;
    7Unmatched statement result=HashUtilities.hashCode(result,this.title); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8Unmatched return result;