if (obj == this) { return true; } if (!(obj instanceof MarkerAxisBand)) { return false; } MarkerAxisBand that = (MarkerAxisBand) obj; if (this.topOuterGap != that.topOuterGap) { return false; } if (this.topInnerGap != that.topInnerGap) { return false; } if (this.bottomInnerGap != that.bottomInnerGap) { return false; } if (this.bottomOuterGap != that.bottomOuterGap) { return false; } if (!ObjectUtilities.equal(this.font, that.font)) { return false; } if (!ObjectUtilities.equal(this.markers, that.markers)) { return false; } return true;
if (obj == this) { return true; } if (!(obj instanceof StandardDialRange)) { return false; } StandardDialRange that = (StandardDialRange) obj; if (this.scaleIndex != that.scaleIndex) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!PaintUtilities.equal(this.paint, that.paint)) { return false; } if (this.innerRadius != that.innerRadius) { return false; } if (this.outerRadius != that.outerRadius) { return false; } return super.equals(obj);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/MarkerAxisBand.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/StandardDialRange.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 18 Number of AST nodes: 18
1
if (obj == this) {
1
if (obj == this) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof MarkerAxisBand)) {
4
        if (!(obj instanceof StandardDialRange)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        MarkerAxisBand that = (MarkerAxisBand) obj;
7
        
8
        if (this.topOuterGap != that.topOuterGap
8
StandardDialRange that = (StandardDialRange) obj;
9
) {
9
        if (this.scaleIndex != that.scaleIndex) {
10
            return false;
10
            return false;
11
        }
11
        }
12
        if (this.topInnerGap != that.topInnerGap) {
12
        if (this.lowerBound != that.lowerBound) {
13
            return false;
13
            return false;
14
        }
14
        }
15
        if (this.bottomInnerGap != that.bottomInnerGap) {
15
        if (this.upperBound != that.upperBound) {
16
            return false;
16
            return false;
17
        }
17
        }
18
        if (this.bottomOuterGap != that.bottomOuterGap) {
18
        if (!PaintUtilities.equal(this.paint, that.paint)) {
19
            return false;
19
            return false;
20
        }
20
        }
21
        if (!ObjectUtilities.equal(this.font, that.font)) {
21
        if (this.innerRadius != that.innerRadius) {
22
            return false;
22
            return false;
23
        }
23
        }
24
        if (!ObjectUtilities.equal(this.markers, that.markers)) {
24
        if (this.outerRadius != that.outerRadius) {
25
            return false;
25
            return false;
26
        }
26
        }
27
        return true;
27
        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)4.4
Clones locationClones are in different classes
Number of node comparisons107
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)4.9
    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 MarkerAxisBand))
    3
    if (!(obj instanceof MarkerAxisBand))
    3
    if (!(obj instanceof StandardDialRange))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.axis.MarkerAxisBand does not match with type org.jfree.chart.plot.dial.StandardDialRange
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    3
    if (!(obj instanceof StandardDialRange))
    4
    return false;
    4
    return false;
                                                                                                      
    5
    StandardDialRange that = (StandardDialRange)obj;
    5
    MarkerAxisBand that = (MarkerAxisBand)obj;
                                                                                          
    6
    if (this.topOuterGap != that.topOuterGap)
    6
    if (this.topOuterGap != that.topOuterGap)
    8
    if (this.lowerBound != that.lowerBound)
    Differences
    Expression1Expression2Difference
    topOuterGaplowerBoundVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    topOuterGaplowerBoundVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.topOuterGap does not match with type double of variable that.lowerBound
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    Expression that.topOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.lowerBound cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    if (this.lowerBound != that.lowerBound)
    7
    return false;
    9
    return false;
    8
    if (this.topInnerGap != that.topInnerGap)
    8
    if (this.topInnerGap != that.topInnerGap)
    10
    if (this.upperBound != that.upperBound)
    Differences
    Expression1Expression2Difference
    topInnerGapupperBoundVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    topInnerGapupperBoundVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.topInnerGap does not match with type double of variable that.upperBound
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    Expression that.topInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.upperBound cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    if (this.upperBound != that.upperBound)
    9
    return false;
    11
    return false;
    10
    if (this.bottomInnerGap != that.bottomInnerGap)
    10
    if (this.bottomInnerGap != that.bottomInnerGap)
    14
    if (this.innerRadius != that.innerRadius)
    Differences
    Expression1Expression2Difference
    bottomInnerGapinnerRadiusVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    bottomInnerGapinnerRadiusVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.bottomInnerGap does not match with type double of variable that.innerRadius
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    Expression that.bottomInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.innerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    if (this.innerRadius != that.innerRadius)
    11
    return false;
    15
    return false;
    12
    if (this.bottomOuterGap != that.bottomOuterGap)
    12
    if (this.bottomOuterGap != that.bottomOuterGap)
    6
    if (this.scaleIndex != that.scaleIndex)
    Differences
    Expression1Expression2Difference
    bottomOuterGapscaleIndexVARIABLE_NAME_MISMATCH
    doubleintVARIABLE_TYPE_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    bottomOuterGapscaleIndexVARIABLE_NAME_MISMATCH
    doubleintVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.bottomOuterGap does not match with type int of variable this.scaleIndex
    Type double of variable that.bottomOuterGap does not match with type int of variable that.scaleIndex
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    Expression that.bottomOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.scaleIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type double of variable that.bottomOuterGap does not match with type int of variable that.scaleIndex
    6
    if (this.scaleIndex != that.scaleIndex)
    13
    return false;
    7
    return false;
    14
    if (!ObjectUtilities.equal(this.font, that.font))
    14
    if (!ObjectUtilities.equal(this.font, that.font))
    12
    if (!PaintUtilities.equal(this.paint, that.paint))
    Differences
    Expression1Expression2Difference
    fontpaintVARIABLE_NAME_MISMATCH
    java.awt.Fontjava.awt.PaintVARIABLE_TYPE_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.dial.StandardDialRangeVARIABLE_TYPE_MISMATCH
    fontpaintVARIABLE_NAME_MISMATCH
    java.awt.Fontjava.awt.PaintVARIABLE_TYPE_MISMATCH
    org.jfree.util.ObjectUtilitiesorg.jfree.util.PaintUtilitiesVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.awt.Font of variable this.font does not match with type java.awt.Paint of variable this.paint
    • Make classes java.awt.Font and java.awt.Paint extend a common superclass
    Type java.awt.Font of variable that.font does not match with type java.awt.Paint of variable that.paint
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange extend a common superclass
    Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.awt.Font of variable that.font does not match with type java.awt.Paint of variable that.paint
    • Make classes java.awt.Font and java.awt.Paint extend a common superclass
    Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities
    • Make classes org.jfree.util.ObjectUtilities and org.jfree.util.PaintUtilities extend a common superclass
    12
    if (!PaintUtilities.equal(this.paint, that.paint))
    15
    return false;
    13
    return false;
    Precondition Violations (23)
    Row Violation
    1Type org.jfree.chart.axis.MarkerAxisBand does not match with type org.jfree.chart.plot.dial.StandardDialRange
    2Type double of variable that.topOuterGap does not match with type double of variable that.lowerBound
    3Expression that.topOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression that.lowerBound cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type double of variable that.topInnerGap does not match with type double of variable that.upperBound
    6Expression that.topInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression that.upperBound cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type double of variable that.bottomInnerGap does not match with type double of variable that.innerRadius
    9Expression that.bottomInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression that.innerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Type double of variable this.bottomOuterGap does not match with type int of variable this.scaleIndex
    12Type double of variable that.bottomOuterGap does not match with type int of variable that.scaleIndex
    13Expression that.bottomOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression that.scaleIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Type double of variable that.bottomOuterGap does not match with type int of variable that.scaleIndex
    16Type java.awt.Font of variable this.font does not match with type java.awt.Paint of variable this.paint
    17Type java.awt.Font of variable that.font does not match with type java.awt.Paint of variable that.paint
    18Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Type java.awt.Font of variable that.font does not match with type java.awt.Paint of variable that.paint
    21Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities
    22Not all possible execution flows end in a return statement
    23The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.dial.StandardDialRange do not have a common superclass