299-1-2

Object result = null; 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; } return result;
Object result = null; 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; } return result;

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: 8 |  | Number of AST nodes: 8

1

    Object result = null;↵

1

    Object result = null;↵

2

            if (this.equals(PieLabelLinkStyle.STANDARD)) {↵

2

            if (this.equals(AreaRendererEndType.LEVEL)) {↵

3

                result = PieLabelLinkStyle.STANDARD;↵

3

                result = AreaRendererEndType.LEVEL;↵

4

            }↵

4

            }↵

5

            else if (this.equals(PieLabelLinkStyle.QUAD_CURVE)) {↵

5

            else if (this.equals(↵

6

                result = PieLabelLinkStyle.QUAD_CURVE↵

6

    AreaRendererEndType.TAPER)) {↵

7

    ;↵

7

                result = AreaRendererEndType.TAPER;↵

8

            }↵

8

            }↵

9

            else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE)) {↵

9

            else if (this.equals(↵

10

                result = PieLabelLinkStyle.CUBIC_CURV↵

10

    AreaRendererEndType.TRUNCATE)) {↵

11

    E;↵

11

                result = AreaRendererEndType.TRUNCATE;↵

12

            }↵

12

            }↵

13

            return result;

13

            return result;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8
Clones location | Clones are in different classes
Number of node comparisons | 31

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 5
   Number of unmapped statements in the first code fragment | 3
   Number of unmapped statements in the second code fragment | 3
   Time elapsed for statement mapping (ms) | 1.0
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       Object result = null;

   1

       Object result = null;

   2

       if (this.equals(PieLabelLinkStyle.STANDARD))

   2 | if (this.equals(PieLabelLinkStyle.STANDARD))
   2 | if (this.equals(AreaRendererEndType.LEVEL))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH
   STANDARD | LEVEL | VARIABLE_NAME_MISMATCH
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable 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 before or after the extracted code, because it has dependencies to/from statements that will be extracted

   3

       result = AreaRendererEndType.LEVEL;

   3

       result = PieLabelLinkStyle.STANDARD;

   3 | result = PieLabelLinkStyle.STANDARD;

   Preondition Violations
   Unmatched statement result=PieLabelLinkStyle.STANDARD; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   4

       else if (this.equals(PieLabelLinkStyle.QUAD_CURVE))

   4 | else if (this.equals(PieLabelLinkStyle.QUAD_CURVE))
   4 | else if (this.equals(AreaRendererEndType.TAPER))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH
   QUAD_CURVE | TAPER | VARIABLE_NAME_MISMATCH
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable 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 before or after the extracted code, because it has dependencies to/from statements that will be extracted

   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 before or after the extracted code, because it has dependencies to/from statements that will be extracted

   6

       else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE))

   6 | else if (this.equals(PieLabelLinkStyle.CUBIC_CURVE))
   6 | else if (this.equals(AreaRendererEndType.TRUNCATE))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH
   CUBIC_CURVE | TRUNCATE | VARIABLE_NAME_MISMATCH
   org.jfree.chart.plot.PieLabelLinkStyle | org.jfree.chart.renderer.AreaRendererEndType | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable 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 before or after the extracted code, because it has dependencies to/from statements that will be extracted

   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 before or after the extracted code, because it has dependencies to/from statements that will be extracted

   8

       return result;

   8

       return result;

   Precondition Violations (12)
   Row | Violation
   --- | ---
   1 | Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType
   2 | Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle.STANDARD does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType.LEVEL
   3 | Unmatched statement result=AreaRendererEndType.LEVEL; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   4 | Unmatched statement result=PieLabelLinkStyle.STANDARD; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   5 | Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType
   6 | 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
   7 | Unmatched statement result=AreaRendererEndType.TAPER; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   8 | Unmatched statement result=PieLabelLinkStyle.QUAD_CURVE; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   9 | Type org.jfree.chart.plot.PieLabelLinkStyle of variable PieLabelLinkStyle does not match with type org.jfree.chart.renderer.AreaRendererEndType of variable AreaRendererEndType
   10 | 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
   11 | Unmatched statement result=AreaRendererEndType.TRUNCATE; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   12 | Unmatched statement result=PieLabelLinkStyle.CUBIC_CURVE; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted