if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true;
if (obj == this) { return true; } if (!(obj instanceof XYDifferenceRenderer)) { return false; } if (!super.equals(obj)) { return false; } XYDifferenceRenderer that = (XYDifferenceRenderer) obj; if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) { return false; } if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) { return false; } if (this.shapesVisible != that.shapesVisible) { return false; } if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) { return false; } if (this.roundXCoordinates != that.roundXCoordinates) { return false; } return true;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java
Method name: boolean equals(Object) Method name: boolean equals(Object)
Number of AST nodes: 18 Number of AST nodes: 18
1
if (this == obj) {
1
if (obj == this) {
2
            return true;
2
            return true;   
3
        }
3
        }
4
        if (!(obj instanceof HighLowRenderer)) {
4
        if (!(obj instanceof XYDifferenceRenderer)) {
5
            return false;
5
            return false;
6
        }
6
   
7
        HighLowRenderer that = (HighLowRenderer) obj;
7
        
8
        if (this.drawOpenTicks != that.drawOpenTicks
8
}
9
) {
9
        if (!super.equals(obj)) {
10
            return false;
10
            return false;   
11
        }
11
        }
12
        if (this.drawCloseTicks != that.drawCloseTicks
12
        XYDifferenceRenderer that = (XYDifferenceRenderer) obj;
13
) {
13
        if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {
14
            return false;
14
            return false;   
15
        }
15
        }
16
        if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) {
16
        if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {
17
            return false;
17
            return false;   
18
        }
18
        }
19
        if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) {
19
        if (this.shapesVisible != that.shapesVisible) {
20
            return false;
20
            return false;   
21
        }
21
        }
22
        if (this.tickLength != that.tickLength) {
22
        if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {
23
            return false;
23
            return false;   
24
        }
24
        }
25
        if (!super.equals(obj)) {
25
        if (this.roundXCoordinates != that.roundXCoordinates) {
26
            return false;
26
            return false;
27
        }
27
        }
28
        return true;
28
        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)6.7
Clones locationClones are in different classes having the same super class
Number of node comparisons116
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements13
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)9.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    3
    if (!(obj instanceof HighLowRenderer))
    3
    if (!(obj instanceof HighLowRenderer))
    3
    if (!(obj instanceof XYDifferenceRenderer))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYDifferenceRenderer))
    4
    return false;
    4
    return false;
    5
    HighLowRenderer that = (HighLowRenderer)obj;
    5
    HighLowRenderer that = (HighLowRenderer)obj;
    7
    XYDifferenceRenderer that = (XYDifferenceRenderer)obj;
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    7
    XYDifferenceRenderer that = (XYDifferenceRenderer)obj;
    6
    if (this.drawOpenTicks != that.drawOpenTicks)
    6
    if (this.drawOpenTicks != that.drawOpenTicks)
    12
    if (this.shapesVisible != that.shapesVisible)
    Differences
    Expression1Expression2Difference
    drawOpenTicksshapesVisibleVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    drawOpenTicksshapesVisibleVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.drawOpenTicks 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
    12
    if (this.shapesVisible != that.shapesVisible)
    7
    return false;
    13
    return false;
    8
    if (this.drawCloseTicks != that.drawCloseTicks)
    8
    if (this.drawCloseTicks != that.drawCloseTicks)
    16
    if (this.roundXCoordinates != that.roundXCoordinates)
    Differences
    Expression1Expression2Difference
    drawCloseTicksroundXCoordinatesVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    drawCloseTicksroundXCoordinatesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.drawCloseTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16
    if (this.roundXCoordinates != that.roundXCoordinates)
    9
    return false;
    17
    return false;
    10
    if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint))
    10
    if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint))
    10
    if (!PaintUtilities.equal(this.negativePaint, that.negativePaint))
    Differences
    Expression1Expression2Difference
    openTickPaintnegativePaintVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    openTickPaintnegativePaintVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.openTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    if (!PaintUtilities.equal(this.negativePaint, that.negativePaint))
    11
    return false;
    11
    return false;
    12
    if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint))
    12
    if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint))
    8
    if (!PaintUtilities.equal(this.positivePaint, that.positivePaint))
    Differences
    Expression1Expression2Difference
    closeTickPaintpositivePaintVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.xy.HighLowRendererorg.jfree.chart.renderer.xy.XYDifferenceRendererSUBCLASS_TYPE_MISMATCH
    closeTickPaintpositivePaintVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.positivePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    if (!PaintUtilities.equal(this.positivePaint, that.positivePaint))
    13
    return false;
    9
    return false;
                                                                                                                                
    14
    if (!ShapeUtilities.equal(this.legendLine, that.legendLine))
    Preondition Violations
    Unmatched statement if(!ShapeUtilities.equal(this.legendLine,that.legendLine)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    14
    if (!ShapeUtilities.equal(this.legendLine, that.legendLine))
                                      
    15
    return false;
    Preondition Violations
    Unmatched return false;
    15
    return false;
    14
    if (this.tickLength != that.tickLength)
    14
    if (this.tickLength != that.tickLength)
    Preondition Violations
    Unmatched statement if(this.tickLength != that.tickLength) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                        
    15
    return false;
    15
    return false;
    Preondition Violations
    Unmatched return false;
                                      
    16
    if (!super.equals(obj))
    16
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    Preondition Violations
    Super method call if(!super.equals(obj)) cannot be extracted from method
    Super method call if(!super.equals(obj)) cannot be extracted from method
    5
    if (!super.equals(obj))
    17
    return false;
    6
    return false;
    Precondition Violations (16)
    Row Violation
    1Expression that.drawOpenTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression that.drawCloseTicks cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression that.openTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression that.closeTickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression that.positivePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Unmatched statement if(!ShapeUtilities.equal(this.legendLine,that.legendLine)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10Unmatched return false;
    11Unmatched statement if(this.tickLength != that.tickLength) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12Unmatched return false;
    13Super method call if(!super.equals(obj)) cannot be extracted from method
    14Super method call if(!super.equals(obj)) cannot be extracted from method
    15Clone fragment #1 returns variable that with type org.jfree.chart.renderer.xy.HighLowRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.XYDifferenceRenderer
    16Not all possible execution flows end in a return statement