if (this.equals(PieLabelLinkStyle.STANDARD)) { result = PieLabelLinkStyle.STANDARD; } else if (this.equals(PieLabelLinkStyle.QUAD_CURVE)) { result = PieLabelLinkStyle.QUAD_CURVE; } else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE)) { result = PieLabelLinkStyle.CUBIC_CURVE; }
if (this.equals(AreaRendererEndType.LEVEL)) { result = AreaRendererEndType.LEVEL; } else if (this.equals(AreaRendererEndType.TAPER)) { result = AreaRendererEndType.TAPER; } else if (this.equals(AreaRendererEndType.TRUNCATE)) { result = AreaRendererEndType.TRUNCATE; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PieLabelLinkStyle.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/AreaRendererEndType.java
Method name: Object readResolve() Method name: Object readResolve()
Number of AST nodes: 6 Number of AST nodes: 6
1
if (this.equals(PieLabelLinkStyle.STANDARD)) {
1
if (this.equals(AreaRendererEndType.LEVEL)) {
2
            result = PieLabelLinkStyle.STANDARD;
2
            result = AreaRendererEndType.LEVEL;
3
        }
3
        }
4
        else if (this.equals(PieLabelLinkStyle.QUAD_CURVE)) {
4
        else if (this.equals(
5
            result = PieLabelLinkStyle.QUAD_CURVE
5
AreaRendererEndType.TAPER)) {
6
;
6
            result = AreaRendererEndType.TAPER;
7
        }
7
        }
8
        else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
8
        else if (this.equals(
9
            result = PieLabelLinkStyle.CUBIC_CURV
9
AreaRendererEndType.TRUNCATE)) {
10
E;
10
            result = AreaRendererEndType.TRUNCATE;
11
        }
11
        }
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)0.9
Clones locationClones are in different classes
Number of node comparisons27
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)1.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (this.equals(PieLabelLinkStyle.STANDARD))
    2
    if (this.equals(PieLabelLinkStyle.STANDARD))
    2
    if (this.equals(AreaRendererEndType.LEVEL))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    STANDARDLEVELVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.STANDARD does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.LEVEL
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    2
    if (this.equals(AreaRendererEndType.LEVEL))
                                                                            
    3
    result = AreaRendererEndType.LEVEL;
    Preondition Violations
    Unmatched statement result=AreaRendererEndType.LEVEL; cannot be moved, because it updates a variable modified in other unmapped statements
    3
    result = AreaRendererEndType.LEVEL;
    3
    result = PieLabelLinkStyle.STANDARD;
    3
    result = PieLabelLinkStyle.STANDARD;
    Preondition Violations
    Unmatched statement result=PieLabelLinkStyle.STANDARD; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                              
    4
    else if (this.equals(PieLabelLinkStyle.QUAD_CURVE))
    4
    else if (this.equals(PieLabelLinkStyle.QUAD_CURVE))
    4
    else if (this.equals(AreaRendererEndType.TAPER))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    QUAD_CURVETAPERVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.QUAD_CURVE does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.TAPER
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    4
    else if (this.equals(AreaRendererEndType.TAPER))
                                                                            
    5
    result = AreaRendererEndType.TAPER;
    Preondition Violations
    Unmatched statement result=AreaRendererEndType.TAPER; cannot be moved, because it updates a variable modified in other unmapped statements
    5
    result = AreaRendererEndType.TAPER;
    5
    result = PieLabelLinkStyle.QUAD_CURVE;
    5
    result = PieLabelLinkStyle.QUAD_CURVE;
    Preondition Violations
    Unmatched statement result=PieLabelLinkStyle.QUAD_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                  
    6
    else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE))
    6
    else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE))
    6
    else if (this.equals(AreaRendererEndType.TRUNCATE))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    CUBIC_CURVETRUNCATEVARIABLE_NAME_MISMATCH
    org.jfree.chart.plot.PieLabelLinkStyleorg.jfree.chart.renderer.AreaRendererEndTypeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.CUBIC_CURVE does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.TRUNCATE
    • Make classes org.jfree.chart.plot.PieLabelLinkStyle and org.jfree.chart.renderer.AreaRendererEndType extend a common superclass
    6
    else if (this.equals(AreaRendererEndType.TRUNCATE))
                                                                                  
    7
    result = AreaRendererEndType.TRUNCATE;
    Preondition Violations
    Unmatched statement result=AreaRendererEndType.TRUNCATE; cannot be moved, because it updates a variable modified in other unmapped statements
    7
    result = AreaRendererEndType.TRUNCATE;
    7
    result = PieLabelLinkStyle.CUBIC_CURVE;
    7
    result = PieLabelLinkStyle.CUBIC_CURVE;
    Preondition Violations
    Unmatched statement result=PieLabelLinkStyle.CUBIC_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                                    
    Precondition Violations (12)
    Row Violation
    1Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    2Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.STANDARD does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.LEVEL
    3Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    4Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.QUAD_CURVE does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.TAPER
    5Type org.jfree.chart.plot.PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType
    6Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.CUBIC_CURVE does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.TRUNCATE
    7Unmatched statement result=PieLabelLinkStyle.STANDARD; cannot be moved, because it updates a variable modified in other unmapped statements
    8Unmatched statement result=PieLabelLinkStyle.QUAD_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements
    9Unmatched statement result=PieLabelLinkStyle.CUBIC_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements
    10Unmatched statement result=AreaRendererEndType.LEVEL; cannot be moved, because it updates a variable modified in other unmapped statements
    11Unmatched statement result=AreaRendererEndType.TAPER; cannot be moved, because it updates a variable modified in other unmapped statements
    12Unmatched statement result=AreaRendererEndType.TRUNCATE; cannot be moved, because it updates a variable modified in other unmapped statements