if (obj == this) { return true; } if (!(obj instanceof ClusteredXYBarRenderer)) { return false; } ClusteredXYBarRenderer that = (ClusteredXYBarRenderer) obj; if (this.centerBarAtStartValue != that.centerBarAtStartValue) { 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/ClusteredXYBarRenderer.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 ClusteredXYBarRenderer)) {
4
        if (!(obj instanceof XYSplineRenderer)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        ClusteredXYBarRenderer that = (ClusteredXYBarRenderer) obj;
7
        XYSplineRenderer that = (XYSplineRenderer) obj;
8
        if (this.centerBarAtStartValue != that.centerBarAtStartValue) {
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.0
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.1
    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 ClusteredXYBarRenderer))
    3
    if (!(obj instanceof ClusteredXYBarRenderer))
    3
    if (!(obj instanceof XYSplineRenderer))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.ClusteredXYBarRendererorg.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYSplineRenderer))
    4
    return false;
    4
    return false;
    5
    ClusteredXYBarRenderer that = (ClusteredXYBarRenderer)obj;
    5
    ClusteredXYBarRenderer that = (ClusteredXYBarRenderer)obj;
    5
    XYSplineRenderer that = (XYSplineRenderer)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.ClusteredXYBarRendererorg.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.ClusteredXYBarRendererorg.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.ClusteredXYBarRendererorg.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    5
    XYSplineRenderer that = (XYSplineRenderer)obj;
    6
    if (this.centerBarAtStartValue != that.centerBarAtStartValue)
    6
    if (this.centerBarAtStartValue != that.centerBarAtStartValue)
    6
    if (this.precision != that.precision)
    Differences
    Expression1Expression2Difference
    centerBarAtStartValueprecisionVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.ClusteredXYBarRendererorg.jfree.chart.renderer.xy.XYSplineRendererSUBCLASS_TYPE_MISMATCH
    centerBarAtStartValueprecisionVARIABLE_NAME_MISMATCH
    booleanintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.centerBarAtStartValue does not match with type int of variable this.precision
    Expression that.centerBarAtStartValue 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.centerBarAtStartValue 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.centerBarAtStartValue does not match with type int of variable this.precision
    2Expression that.centerBarAtStartValue 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.centerBarAtStartValue 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