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);
if (obj == this) { return true; } if (!(obj instanceof XYInterval)) { return false; } XYInterval that = (XYInterval) obj; if (this.xLow != that.xLow) { return false; } if (this.xHigh != that.xHigh) { return false; } if (this.y != that.y) { return false; } if (this.yLow != that.yLow) { return false; } if (this.yHigh != that.yHigh) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepAreaRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYInterval.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 XYStepAreaRenderer)) {
4
        if (!(obj instanceof XYInterval)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        XYStepAreaRenderer that = (XYStepAreaRenderer) obj;
7
        XYInterval that = (XYInterval) obj;
8
        if (this.showOutline != that.showOutline) {
8
        if (this.xLow != that.xLow) {
9
            return false;
9
            return false;
10
        }
10
        }
11
        if (this.shapesVisible != that.shapesVisible) {
11
        if (this.xHigh != that.xHigh) {
12
            return false;
12
            return false;
13
        }
13
        }
14
        if (this.shapesFilled != that.shapesFilled) {
14
        if (this.y != that.y) {
15
            return false;
15
            return false;
16
        }
16
        }
17
        if (this.plotArea != that.plotArea) {
17
        if (this.yLow != that.yLow) {
18
            return false;
18
            return false;
19
        }
19
        }
20
        if (this.rangeBase != that.rangeBase) {
20
        if (this.yHigh != that.yHigh) {
21
            return false;
21
            return false;
22
        }
22
        }
23
        return super.equals(obj);
23
        return true;
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)4.6
Clones locationClones are in different classes
Number of node comparisons104
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements15
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)5.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 XYStepAreaRenderer))
    3
    if (!(obj instanceof XYStepAreaRenderer))
    3
    if (!(obj instanceof XYInterval))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.renderer.xy.XYStepAreaRenderer does not match with type org.jfree.data.xy.XYInterval
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    3
    if (!(obj instanceof XYInterval))
    4
    return false;
    4
    return false;
                                                                          
    5
    XYInterval that = (XYInterval)obj;
    5
    XYStepAreaRenderer that = (XYStepAreaRenderer)obj;
                                                                                                          
    6
    if (this.showOutline != that.showOutline)
    6
    if (this.showOutline != that.showOutline)
    6
    if (this.xLow != that.xLow)
    Differences
    Expression1Expression2Difference
    showOutlinexLowVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    showOutlinexLowVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.showOutline does not match with type double of variable this.xLow
    Type boolean of variable that.showOutline does not match with type double of variable that.xLow
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.xLow cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type boolean of variable that.showOutline does not match with type double of variable that.xLow
    6
    if (this.xLow != that.xLow)
    7
    return false;
    7
    return false;
    8
    if (this.shapesVisible != that.shapesVisible)
    8
    if (this.shapesVisible != that.shapesVisible)
    8
    if (this.xHigh != that.xHigh)
    Differences
    Expression1Expression2Difference
    shapesVisiblexHighVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    shapesVisiblexHighVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.shapesVisible does not match with type double of variable this.xHigh
    Type boolean of variable that.shapesVisible does not match with type double of variable that.xHigh
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.xHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type boolean of variable that.shapesVisible does not match with type double of variable that.xHigh
    8
    if (this.xHigh != that.xHigh)
    9
    return false;
    9
    return false;
    10
    if (this.shapesFilled != that.shapesFilled)
    10
    if (this.shapesFilled != that.shapesFilled)
    10
    if (this.y != that.y)
    Differences
    Expression1Expression2Difference
    shapesFilledyVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    shapesFilledyVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.shapesFilled does not match with type double of variable this.y
    Type boolean of variable that.shapesFilled does not match with type double of variable that.y
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type boolean of variable that.shapesFilled does not match with type double of variable that.y
    10
    if (this.y != that.y)
    11
    return false;
    11
    return false;
    12
    if (this.plotArea != that.plotArea)
    12
    if (this.plotArea != that.plotArea)
    12
    if (this.yLow != that.yLow)
    Differences
    Expression1Expression2Difference
    plotAreayLowVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    plotAreayLowVARIABLE_NAME_MISMATCH
    booleandoubleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type boolean of variable this.plotArea does not match with type double of variable this.yLow
    Type boolean of variable that.plotArea does not match with type double of variable that.yLow
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    Expression that.plotArea cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.yLow cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type boolean of variable that.plotArea does not match with type double of variable that.yLow
    12
    if (this.yLow != that.yLow)
    13
    return false;
    13
    return false;
    14
    if (this.rangeBase != that.rangeBase)
    14
    if (this.rangeBase != that.rangeBase)
    14
    if (this.yHigh != that.yHigh)
    Differences
    Expression1Expression2Difference
    rangeBaseyHighVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.XYStepAreaRendererorg.jfree.data.xy.XYIntervalVARIABLE_TYPE_MISMATCH
    rangeBaseyHighVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.rangeBase does not match with type double of variable that.yHigh
    • Make classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval extend a common superclass
    Expression that.rangeBase cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.yHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    if (this.yHigh != that.yHigh)
    15
    return false;
    15
    return false;
    16
    return super.equals(obj);
    16
    return super.equals(obj);
    16
    return true;
    Differences
    Expression1Expression2Difference
    super.equals(obj)trueTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Super method call return super.equals(obj); cannot be extracted from method
    16
    return true;
    Precondition Violations (26)
    Row Violation
    1Type org.jfree.chart.renderer.xy.XYStepAreaRenderer does not match with type org.jfree.data.xy.XYInterval
    2Type boolean of variable this.showOutline does not match with type double of variable this.xLow
    3Type boolean of variable that.showOutline does not match with type double of variable that.xLow
    4Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression that.xLow cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type boolean of variable that.showOutline does not match with type double of variable that.xLow
    7Type boolean of variable this.shapesVisible does not match with type double of variable this.xHigh
    8Type boolean of variable that.shapesVisible does not match with type double of variable that.xHigh
    9Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression that.xHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Type boolean of variable that.shapesVisible does not match with type double of variable that.xHigh
    12Type boolean of variable this.shapesFilled does not match with type double of variable this.y
    13Type boolean of variable that.shapesFilled does not match with type double of variable that.y
    14Expression that.shapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression that.y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Type boolean of variable that.shapesFilled does not match with type double of variable that.y
    17Type boolean of variable this.plotArea does not match with type double of variable this.yLow
    18Type boolean of variable that.plotArea does not match with type double of variable that.yLow
    19Expression that.plotArea cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression that.yLow cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Type boolean of variable that.plotArea does not match with type double of variable that.yLow
    22Type double of variable that.rangeBase does not match with type double of variable that.yHigh
    23Expression that.rangeBase cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression that.yHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Super method call return super.equals(obj); cannot be extracted from method
    26The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.XYStepAreaRenderer and org.jfree.data.xy.XYInterval do not have a common superclass