if (obj == this) { return true; } if (!(obj instanceof XYAreaRenderer)) { return false; } XYAreaRenderer that = (XYAreaRenderer) obj; if (this.plotArea != that.plotArea) { return false; } if (this.plotLines != that.plotLines) { return false; } if (this.plotShapes != that.plotShapes) { return false; } if (this.showOutline != that.showOutline) { return false; } if (!ShapeUtilities.equal(this.legendArea, that.legendArea)) { return false; } return true;
if (obj == this) { return true; } if (!(obj instanceof XYStepAreaRenderer)) { return false; } XYStepAreaRenderer that = (XYStepAreaRenderer) obj; if (this.showOutline != that.showOutline) { return false; } if (this.shapesVisible != that.shapesVisible) { return false; } if (this.shapesFilled != that.shapesFilled) { return false; } if (this.plotArea != that.plotArea) { return false; } if (this.rangeBase != that.rangeBase) { 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/XYAreaRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepAreaRenderer.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 16 Number of AST nodes: 16
1
if (obj == this) {
1
if (obj == this) {
2
            return true;   
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof XYAreaRenderer)) {
4
        if (!(obj instanceof XYStepAreaRenderer)) {
5
            return false;   
5
            return false;
6
        }
6
        }
7
        XYAreaRenderer that = (XYAreaRenderer) obj;
7
        XYStepAreaRenderer that = (XYStepAreaRenderer) obj;
8
        if (this.plotArea != that.plotArea) {
8
        if (this.showOutline != that.showOutline) {
9
            return false;   
9
            return false;
10
        }
10
        }
11
        if (this.plotLines != that.plotLines) {
11
        if (this.shapesVisible != that.shapesVisible) {
12
            return false;   
12
            return false;
13
        }
13
        }
14
        if (this.plotShapes != that.plotShapes) {
14
        if (this.shapesFilled != that.shapesFilled) {
15
            return false;   
15
            return false;
16
        }
16
        }
17
        if (this.showOutline != that.showOutline) {
17
        if (this.plotArea != that.plotArea) {
18
            return false;   
18
            return false;
19
        }
19
        }
20
        if (!ShapeUtilities.equal(this.legendArea, that.legendArea)) {
20
        if (this.rangeBase != that.rangeBase) {
21
            return false;   
21
            return false;
22
        }
22
        }
23
        return true;
23
        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)7.6
Clones locationClones are in different classes having the same super class
Number of node comparisons86
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements13
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.3
    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 XYAreaRenderer))
    3
    if (!(obj instanceof XYAreaRenderer))
    3
    if (!(obj instanceof XYStepAreaRenderer))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYStepAreaRenderer))
    4
    return false;
    4
    return false;
    5
    XYAreaRenderer that = (XYAreaRenderer)obj;
    5
    XYAreaRenderer that = (XYAreaRenderer)obj;
    5
    XYStepAreaRenderer that = (XYStepAreaRenderer)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    5
    XYStepAreaRenderer that = (XYStepAreaRenderer)obj;
    6
    if (this.plotArea != that.plotArea)
    6
    if (this.plotArea != that.plotArea)
    12
    if (this.plotArea != that.plotArea)
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression that.plotArea cannot be unified with expression that.plotArea , because common superclass org.jfree.chart.renderer.xy.AbstractXYItemRenderer does not declare member(s) private boolean plotArea
    12
    if (this.plotArea != that.plotArea)
    7
    return false;
    13
    return false;
    8
    if (this.plotLines != that.plotLines)
    8
    if (this.plotLines != that.plotLines)
    8
    if (this.shapesVisible != that.shapesVisible)
    Differences
    Expression1Expression2Difference
    plotLinesshapesVisibleVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    plotLinesshapesVisibleVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    if (this.shapesVisible != that.shapesVisible)
    9
    return false;
    9
    return false;
    10
    if (this.plotShapes != that.plotShapes)
    10
    if (this.plotShapes != that.plotShapes)
    10
    if (this.shapesFilled != that.shapesFilled)
    Differences
    Expression1Expression2Difference
    plotShapesshapesFilledVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    plotShapesshapesFilledVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.plotShapes cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    if (this.shapesFilled != that.shapesFilled)
    11
    return false;
    11
    return false;
    12
    if (this.showOutline != that.showOutline)
    12
    if (this.showOutline != that.showOutline)
    6
    if (this.showOutline != that.showOutline)
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.XYAreaRendererorg.jfree.chart.renderer.xy.XYStepAreaRendererSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression that.showOutline cannot be unified with expression that.showOutline , because common superclass org.jfree.chart.renderer.xy.AbstractXYItemRenderer does not declare member(s) private boolean showOutline
    6
    if (this.showOutline != that.showOutline)
    13
    return false;
    7
    return false;
    Precondition Violations (8)
    Row Violation
    1Expression that.plotArea cannot be unified with expression that.plotArea , because common superclass org.jfree.chart.renderer.xy.AbstractXYItemRenderer does not declare member(s) private boolean plotArea
    2Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression that.plotShapes cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression that.showOutline cannot be unified with expression that.showOutline , because common superclass org.jfree.chart.renderer.xy.AbstractXYItemRenderer does not declare member(s) private boolean showOutline
    7Clone fragment #1 returns variable that with type org.jfree.chart.renderer.xy.XYAreaRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.XYStepAreaRenderer
    8Not all possible execution flows end in a return statement