if (obj == this) { return true; } if (!(obj instanceof StackedXYAreaRenderer2)) { return false; } StackedXYAreaRenderer2 that = (StackedXYAreaRenderer2) obj; if (this.roundXCoordinates != that.roundXCoordinates) { return false; } return super.equals(obj);
if (obj == this) { return true; } if (!(obj instanceof XYSplineRenderer)) { return false; } XYSplineRenderer that = (XYSplineRenderer) obj; if (this.precision != that.precision) { return false; } return super.equals(obj);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYSplineRenderer.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 8 Number of AST nodes: 8
1
if (obj == this) {
1
if (obj == this) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof StackedXYAreaRenderer2)) {
4
        if (!(obj instanceof XYSplineRenderer)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        StackedXYAreaRenderer2 that = (StackedXYAreaRenderer2) obj;
7
        XYSplineRenderer that = (XYSplineRenderer) obj;
8
        if (this.roundXCoordinates != that.roundXCoordinates) {
8
        if (this.precision != that.precision) {
9
            return false;
9
            return false;
10
        }
10
        }
11
        return super.equals(obj);
11
        return super.equals(obj);
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons22
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (obj == this)
    1
    if (obj == this)
    2
    return true;
    2
    return true;
    3
    if (!(obj instanceof StackedXYAreaRenderer2))
    3
    if (!(obj instanceof StackedXYAreaRenderer2))
    3
    if (!(obj instanceof XYSplineRenderer))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.StackedXYAreaRenderer2org.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYSplineRenderer))
    4
    return false;
    4
    return false;
    5
    StackedXYAreaRenderer2 that = (StackedXYAreaRenderer2)obj;
    5
    StackedXYAreaRenderer2 that = (StackedXYAreaRenderer2)obj;
    5
    XYSplineRenderer that = (XYSplineRenderer)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.StackedXYAreaRenderer2org.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.StackedXYAreaRenderer2org.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.StackedXYAreaRenderer2org.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    5
    XYSplineRenderer that = (XYSplineRenderer)obj;
    6
    if (this.roundXCoordinates != that.roundXCoordinates)
    6
    if (this.roundXCoordinates != that.roundXCoordinates)
    6
    if (this.precision != that.precision)
    Differences
    Expression1Expression2Difference
    roundXCoordinatesprecisionVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.StackedXYAreaRenderer2org.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    roundXCoordinatesprecisionVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.roundXCoordinates does not match with type int of variable this.precision
    Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.precision cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type boolean of variable that.roundXCoordinates does not match with type int of variable that.precision
    6
    if (this.precision != that.precision)
    7
    return false;
    7
    return false;
    8
    return super.equals(obj);
    8
    return super.equals(obj);
    8
    return super.equals(obj);
    Preondition Violations
    Super method call return super.equals(obj); cannot be extracted from method
    Super method call return super.equals(obj); cannot be extracted from method
    8
    return super.equals(obj);
    Precondition Violations (6)
    Row Violation
    1Type boolean of variable this.roundXCoordinates does not match with type int of variable this.precision
    2Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression that.precision cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type boolean of variable that.roundXCoordinates does not match with type int of variable that.precision
    5Super method call return super.equals(obj); cannot be extracted from method
    6Super method call return super.equals(obj); cannot be extracted from method