if (this.equals(ItemLabelAnchor.OUTSIDE10)) { result = ItemLabelAnchor.OUTSIDE10; } else if (this.equals(ItemLabelAnchor.OUTSIDE11)) { result = ItemLabelAnchor.OUTSIDE11; } else if (this.equals(ItemLabelAnchor.OUTSIDE12)) { result = ItemLabelAnchor.OUTSIDE12; }
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; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/ItemLabelAnchor.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PieLabelLinkStyle.java
Method name: Object readResolve() Method name: Object readResolve()
Number of AST nodes: 6 Number of AST nodes: 6
1
if (this.equals(ItemLabelAnchor.OUTSIDE10)) {
1
if (this.equals(PieLabelLinkStyle.STANDARD)) {
2
            result = ItemLabelAnchor.OUTSIDE10;
2
            result = PieLabelLinkStyle.STANDARD;
3
        }
3
        }
4
        else if (this.equals(ItemLabelAnchor.OUTSIDE11)) {
4
        else if (this.equals(PieLabelLinkStyle.QUAD_CURVE)) {
5
            result = ItemLabelAnchor.OUTSIDE11;
5
            result = PieLabelLinkStyle.QUAD_CURVE;
6
        }
6
        }
7
        else if (this.equals(ItemLabelAnchor.OUTSIDE12)) {
7
        else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE)) {
8
            result = ItemLabelAnchor.OUTSIDE12;
8
            result = PieLabelLinkStyle.CUBIC_CURVE;
9
        }
9
        }
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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    46
    if (this.equals(ItemLabelAnchor.OUTSIDE10))
    46
    if (this.equals(ItemLabelAnchor.OUTSIDE10))
    2
    if (this.equals(PieLabelLinkStyle.STANDARD))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    OUTSIDE10STANDARDVARIABLE_NAME_MISMATCH
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE10 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.STANDARD
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    2
    if (this.equals(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
    3
    result = PieLabelLinkStyle.STANDARD;
    47
    result = ItemLabelAnchor.OUTSIDE10;
    47
    result = ItemLabelAnchor.OUTSIDE10;
    Preondition Violations
    Unmatched statement result=ItemLabelAnchor.OUTSIDE10; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                              
    48
    else if (this.equals(ItemLabelAnchor.OUTSIDE11))
    48
    else if (this.equals(ItemLabelAnchor.OUTSIDE11))
    4
    else if (this.equals(PieLabelLinkStyle.QUAD_CURVE))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    OUTSIDE11QUAD_CURVEVARIABLE_NAME_MISMATCH
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE11 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.QUAD_CURVE
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    4
    else if (this.equals(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
    5
    result = PieLabelLinkStyle.QUAD_CURVE;
    49
    result = ItemLabelAnchor.OUTSIDE11;
    49
    result = ItemLabelAnchor.OUTSIDE11;
    Preondition Violations
    Unmatched statement result=ItemLabelAnchor.OUTSIDE11; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                              
    50
    else if (this.equals(ItemLabelAnchor.OUTSIDE12))
    50
    else if (this.equals(ItemLabelAnchor.OUTSIDE12))
    6
    else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE))
    Differences
    Expression1Expression2Difference
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    OUTSIDE12CUBIC_CURVEVARIABLE_NAME_MISMATCH
    org.jfree.chart.labels.ItemLabelAnchororg.jfree.chart.plot.PieLabelLinkStyleVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE12 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.CUBIC_CURVE
    • Make classes org.jfree.chart.labels.ItemLabelAnchor and org.jfree.chart.plot.PieLabelLinkStyle extend a common superclass
    6
    else if (this.equals(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
    7
    result = PieLabelLinkStyle.CUBIC_CURVE;
    51
    result = ItemLabelAnchor.OUTSIDE12;
    51
    result = ItemLabelAnchor.OUTSIDE12;
    Preondition Violations
    Unmatched statement result=ItemLabelAnchor.OUTSIDE12; cannot be moved, because it updates a variable modified in other unmapped statements
                                                                              
    Precondition Violations (12)
    Row Violation
    1Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    2Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE10 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.STANDARD
    3Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    4Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE11 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.QUAD_CURVE
    5Type org.jfree.chart.labels.ItemLabelAnchor does not match with type org.jfree.chart.plot.PieLabelLinkStyle
    6Type org.jfree.chart.labels.ItemLabelAnchor of variable ItemLabelAnchor.OUTSIDE12 does not match with type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.CUBIC_CURVE
    7Unmatched statement result=ItemLabelAnchor.OUTSIDE10; cannot be moved, because it updates a variable modified in other unmapped statements
    8Unmatched statement result=ItemLabelAnchor.OUTSIDE11; cannot be moved, because it updates a variable modified in other unmapped statements
    9Unmatched statement result=ItemLabelAnchor.OUTSIDE12; cannot be moved, because it updates a variable modified in other unmapped statements
    10Unmatched statement result=PieLabelLinkStyle.STANDARD; cannot be moved, because it updates a variable modified in other unmapped statements
    11Unmatched statement result=PieLabelLinkStyle.QUAD_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements
    12Unmatched statement result=PieLabelLinkStyle.CUBIC_CURVE; cannot be moved, because it updates a variable modified in other unmapped statements