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 (this == obj) { return true; } if (!(obj instanceof RingPlot)) { return false; } RingPlot that = (RingPlot) obj; if (this.separatorsVisible != that.separatorsVisible) { return false; } if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke)) { return false; } if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) { return false; } if (this.innerSeparatorExtension != that.innerSeparatorExtension) { return false; } if (this.outerSeparatorExtension != that.outerSeparatorExtension) { return false; } if (this.sectionDepth != that.sectionDepth) { 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/RingPlot.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 (this == obj) {
2
            return true;
2
            return true;
3
        }
3
        }
4
        if (!(obj instanceof MarkerAxisBand)) {
4
        if (!(obj instanceof RingPlot)) {
5
            return false;
5
            return false;
6
        }
6
        }
7
        MarkerAxisBand that = (MarkerAxisBand) obj;
7
        RingPlot that = (RingPlot) obj;
8
        if (this.topOuterGap != that.topOuterGap) {
8
        if (this.separatorsVisible != that.separatorsVisible) {
9
            return false;
9
            return false;
10
        }
10
        }
11
        if (this.topInnerGap != that.topInnerGap) {
11
        if (
12
            return false;
13
        }
14
        if (this.bottomInnerGap != that.bottomInnerGap
12
!ObjectUtilities.equal(this.separatorStroke, 
13
                that.separatorStroke)) {
14
            return false;
15
        }
15
) {
16
        if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint)) {
16
            return false;
17
            return false;
17
        }
18
        }
18
        if (this.bottomOuterGap != that.bottomOuterGap) {
19
        if (this.
19
            return false;
20
        }
21
        if (!ObjectUtilities.equal(this.font, that.font)
20
innerSeparatorExtension != that.innerSeparatorExtension) {
21
            return false;
22
        }
22
) {
23
        if (this.outerSeparatorExtension != that.outerSeparatorExtension) {
23
            return false;
24
            return false;
24
        }
25
        }
25
        if (!ObjectUtilities.equal(this.markers, that.markers)) {
26
        if (this.sectionDepth != that.sectionDepth) {
26
            return false;
27
            return false;
27
        }
28
        }
28
        return true;
29
        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)5.6
Clones locationClones are in different classes
Number of node comparisons113
  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)5.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (!(obj instanceof MarkerAxisBand))
    3
    if (!(obj instanceof MarkerAxisBand))
    3
    if (!(obj instanceof RingPlot))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.axis.MarkerAxisBand does not match with type org.jfree.chart.plot.RingPlot
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    3
    if (!(obj instanceof RingPlot))
    4
    return false;
    4
    return false;
                                                                  
    5
    RingPlot that = (RingPlot)obj;
    5
    MarkerAxisBand that = (MarkerAxisBand)obj;
                                                                                          
    6
    if (this.topOuterGap != that.topOuterGap)
    6
    if (this.topOuterGap != that.topOuterGap)
    12
    if (this.innerSeparatorExtension != that.innerSeparatorExtension)
    Differences
    Expression1Expression2Difference
    topOuterGapinnerSeparatorExtensionVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    topOuterGapinnerSeparatorExtensionVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.topOuterGap does not match with type double of variable that.innerSeparatorExtension
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.topOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.innerSeparatorExtension cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12
    if (this.innerSeparatorExtension != that.innerSeparatorExtension)
    7
    return false;
    13
    return false;
    8
    if (this.topInnerGap != that.topInnerGap)
    8
    if (this.topInnerGap != that.topInnerGap)
    14
    if (this.outerSeparatorExtension != that.outerSeparatorExtension)
    Differences
    Expression1Expression2Difference
    topInnerGapouterSeparatorExtensionVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    topInnerGapouterSeparatorExtensionVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.topInnerGap does not match with type double of variable that.outerSeparatorExtension
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.topInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.outerSeparatorExtension cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    if (this.outerSeparatorExtension != that.outerSeparatorExtension)
    9
    return false;
    15
    return false;
    10
    if (this.bottomInnerGap != that.bottomInnerGap)
    10
    if (this.bottomInnerGap != that.bottomInnerGap)
    16
    if (this.sectionDepth != that.sectionDepth)
    Differences
    Expression1Expression2Difference
    bottomInnerGapsectionDepthVARIABLE_NAME_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    bottomInnerGapsectionDepthVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type double of variable that.bottomInnerGap does not match with type double of variable that.sectionDepth
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.bottomInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.sectionDepth cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16
    if (this.sectionDepth != that.sectionDepth)
    11
    return false;
    17
    return false;
    12
    if (this.bottomOuterGap != that.bottomOuterGap)
    12
    if (this.bottomOuterGap != that.bottomOuterGap)
    6
    if (this.separatorsVisible != that.separatorsVisible)
    Differences
    Expression1Expression2Difference
    bottomOuterGapseparatorsVisibleVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    bottomOuterGapseparatorsVisibleVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.bottomOuterGap does not match with type boolean of variable this.separatorsVisible
    Type double of variable that.bottomOuterGap does not match with type boolean of variable that.separatorsVisible
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.bottomOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.separatorsVisible 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 boolean of variable that.separatorsVisible
    6
    if (this.separatorsVisible != that.separatorsVisible)
    13
    return false;
    7
    return false;
    14
    if (!ObjectUtilities.equal(this.font, that.font))
    14
    if (!ObjectUtilities.equal(this.font, that.font))
    8
    if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke))
    Differences
    Expression1Expression2Difference
    fontseparatorStrokeVARIABLE_NAME_MISMATCH
    java.awt.Fontjava.awt.StrokeVARIABLE_TYPE_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    fontseparatorStrokeVARIABLE_NAME_MISMATCH
    java.awt.Fontjava.awt.StrokeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.awt.Font of variable this.font does not match with type java.awt.Stroke of variable this.separatorStroke
    • Make classes java.awt.Font and java.awt.Stroke extend a common superclass
    Type java.awt.Font of variable that.font does not match with type java.awt.Stroke of variable that.separatorStroke
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.separatorStroke 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.Stroke of variable that.separatorStroke
    • Make classes java.awt.Font and java.awt.Stroke extend a common superclass
    8
    if (!ObjectUtilities.equal(this.separatorStroke, that.separatorStroke))
    15
    return false;
    9
    return false;
    16
    if (!ObjectUtilities.equal(this.markers, that.markers))
    16
    if (!ObjectUtilities.equal(this.markers, that.markers))
    10
    if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint))
    Differences
    Expression1Expression2Difference
    markersseparatorPaintVARIABLE_NAME_MISMATCH
    java.util.Listjava.awt.PaintVARIABLE_TYPE_MISMATCH
    org.jfree.chart.axis.MarkerAxisBandorg.jfree.chart.plot.RingPlotVARIABLE_TYPE_MISMATCH
    markersseparatorPaintVARIABLE_NAME_MISMATCH
    java.util.Listjava.awt.PaintVARIABLE_TYPE_MISMATCH
    org.jfree.util.ObjectUtilitiesorg.jfree.util.PaintUtilitiesVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List of variable this.markers does not match with type java.awt.Paint of variable this.separatorPaint
    • Make classes java.util.List and java.awt.Paint extend a common superclass
    Type java.util.List of variable that.markers does not match with type java.awt.Paint of variable that.separatorPaint
    • Make classes org.jfree.chart.axis.MarkerAxisBand and org.jfree.chart.plot.RingPlot extend a common superclass
    Expression that.markers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.separatorPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.util.List of variable that.markers does not match with type java.awt.Paint of variable that.separatorPaint
    • Make classes java.util.List 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
    10
    if (!PaintUtilities.equal(this.separatorPaint, that.separatorPaint))
    17
    return false;
    11
    return false;
    Precondition Violations (27)
    Row Violation
    1Type org.jfree.chart.axis.MarkerAxisBand does not match with type org.jfree.chart.plot.RingPlot
    2Type double of variable that.topOuterGap does not match with type double of variable that.innerSeparatorExtension
    3Expression that.topOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression that.innerSeparatorExtension 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.outerSeparatorExtension
    6Expression that.topInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression that.outerSeparatorExtension 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.sectionDepth
    9Expression that.bottomInnerGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression that.sectionDepth 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 boolean of variable this.separatorsVisible
    12Type double of variable that.bottomOuterGap does not match with type boolean of variable that.separatorsVisible
    13Expression that.bottomOuterGap cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression that.separatorsVisible 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 boolean of variable that.separatorsVisible
    16Type java.awt.Font of variable this.font does not match with type java.awt.Stroke of variable this.separatorStroke
    17Type java.awt.Font of variable that.font does not match with type java.awt.Stroke of variable that.separatorStroke
    18Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression that.separatorStroke 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.Stroke of variable that.separatorStroke
    21Type java.util.List of variable this.markers does not match with type java.awt.Paint of variable this.separatorPaint
    22Type java.util.List of variable that.markers does not match with type java.awt.Paint of variable that.separatorPaint
    23Expression that.markers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression that.separatorPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Type java.util.List of variable that.markers does not match with type java.awt.Paint of variable that.separatorPaint
    26Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities
    27Not all possible execution flows end in a return statement