if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } if (!super.equals(obj)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } return true;
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;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer.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 BoxAndWhiskerRenderer)) {
4
        if (!(obj instanceof XYAreaRenderer)) {
5
            return false;
5
            return false;   
6
        }
6
        }
7
        if (!super.equals(obj)
7
        XYAreaRenderer that = (XYAreaRenderer) obj;
8
) {
8
        if (this.plotArea != that.plotArea) {
9
            return false;
9
            return false;
10
        }
10
   
11
        BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj;
11
        
12
        if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)
12
}
13
) {
13
        if (this.plotLines != that.plotLines) {
14
            return false;
14
            return false;   
15
        }
15
        }
16
        if (this.fillBox != that.fillBox) {
16
        if (this.plotShapes != that.plotShapes) {
17
            return false;
17
            return false;   
18
        }
18
        }
19
        if (this.itemMargin != that.itemMargin) {
19
        if (this.showOutline != that.showOutline) {
20
            return false;
20
            return false;   
21
        }
21
        }
22
        if (this.maximumBarWidth != that.maximumBarWidth) {
22
        if (!ShapeUtilities.equal(this.legendArea, that.legendArea)) {
23
            return false;
23
            return false;   
24
        }
24
        }
25
        return true;
25
        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)5.6
Clones locationClones are in different classes having the same super class
Number of node comparisons89
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)5.6
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (obj == this)
    1
    if (obj == this)
    2
    return true;
    2
    return true;
    3
    if (!(obj instanceof BoxAndWhiskerRenderer))
    3
    if (!(obj instanceof BoxAndWhiskerRenderer))
    3
    if (!(obj instanceof XYAreaRenderer))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.renderer.category.BoxAndWhiskerRendererorg.jfree.chart.renderer.xy.XYAreaRendererSUBCLASS_TYPE_MISMATCH
    3
    if (!(obj instanceof XYAreaRenderer))
    4
    return false;
    4
    return false;
                                                                                          
    5
    XYAreaRenderer that = (XYAreaRenderer)obj;
                                                                              
    6
    if (this.plotArea != that.plotArea)
                                    
    7
    return false;
    Preondition Violations
    Unmatched return false;
    7
    return false;
    5
    if (!super.equals(obj))
    5
    if (!super.equals(obj))
    14
    if (!ShapeUtilities.equal(this.legendArea, that.legendArea))
    Differences
    Expression1Expression2Difference
    super.equals(obj)ShapeUtilities.equal(this.legendArea,that.legendArea)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression ShapeUtilities.equal(this.legendArea,that.legendArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Super method call if(!super.equals(obj)) cannot be extracted from method
    14
    if (!ShapeUtilities.equal(this.legendArea, that.legendArea))
    6
    return false;
    15
    return false;
    7
    BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer)obj;
                                                                                                                      
    8
    if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint))
                                                                                                                                          
    9
    return false;
    9
    return false;
    Preondition Violations
    Unmatched return false;
                                    
    10
    if (this.fillBox != that.fillBox)
    10
    if (this.fillBox != that.fillBox)
    10
    if (this.plotShapes != that.plotShapes)
    Differences
    Expression1Expression2Difference
    fillBoxplotShapesVARIABLE_NAME_MISMATCH
    org.jfree.chart.renderer.category.BoxAndWhiskerRendererorg.jfree.chart.renderer.xy.XYAreaRendererSUBCLASS_TYPE_MISMATCH
    fillBoxplotShapesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression that.fillBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.plotShapes cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    if (this.plotShapes != that.plotShapes)
    11
    return false;
    11
    return false;
    12
    if (this.itemMargin != that.itemMargin)
    12
    if (this.itemMargin != that.itemMargin)
    12
    if (this.showOutline != that.showOutline)
    Differences
    Expression1Expression2Difference
    itemMarginshowOutlineVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.category.BoxAndWhiskerRendererorg.jfree.chart.renderer.xy.XYAreaRendererSUBCLASS_TYPE_MISMATCH
    itemMarginshowOutlineVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.itemMargin does not match with type boolean of variable this.showOutline
    Expression that.itemMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type double of variable that.itemMargin does not match with type boolean of variable that.showOutline
    12
    if (this.showOutline != that.showOutline)
    13
    return false;
    13
    return false;
    14
    if (this.maximumBarWidth != that.maximumBarWidth)
    14
    if (this.maximumBarWidth != that.maximumBarWidth)
    8
    if (this.plotLines != that.plotLines)
    Differences
    Expression1Expression2Difference
    maximumBarWidthplotLinesVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    org.jfree.chart.renderer.category.BoxAndWhiskerRendererorg.jfree.chart.renderer.xy.XYAreaRendererSUBCLASS_TYPE_MISMATCH
    maximumBarWidthplotLinesVARIABLE_NAME_MISMATCH
    doublebooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type double of variable this.maximumBarWidth does not match with type boolean of variable this.plotLines
    Expression that.maximumBarWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type double of variable that.maximumBarWidth does not match with type boolean of variable that.plotLines
    8
    if (this.plotLines != that.plotLines)
    15
    return false;
    9
    return false;
    Precondition Violations (15)
    Row Violation
    1Unmatched return false;
    2Expression ShapeUtilities.equal(this.legendArea,that.legendArea) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Super method call if(!super.equals(obj)) cannot be extracted from method
    4Unmatched return false;
    5Expression that.fillBox cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression that.plotShapes cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Type double of variable this.itemMargin does not match with type boolean of variable this.showOutline
    8Expression that.itemMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression that.showOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Type double of variable that.itemMargin does not match with type boolean of variable that.showOutline
    11Type double of variable this.maximumBarWidth does not match with type boolean of variable this.plotLines
    12Expression that.maximumBarWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Type double of variable that.maximumBarWidth does not match with type boolean of variable that.plotLines
    15Not all possible execution flows end in a return statement