1510-2-3

x = domainAxis.valueToJava2D(this.polygon[i], dataArea, domainEdge); y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, rangeEdge); area.lineTo((float) y, (float) x);
x = domainAxis.valueToJava2D(this.polygon[i], dataArea, domainEdge); y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, rangeEdge); area.lineTo((float) x, (float) y);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/XYPolygonAnnotation.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/XYPolygonAnnotation.java
Method name: `void draw(Graphics2D, XYPlot, Rectangle2D, ValueAxis, ValueAxis, int, PlotRenderingInfo)` |  | Method name: `void draw(Graphics2D, XYPlot, Rectangle2D, ValueAxis, ValueAxis, int, PlotRenderingInfo)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    x = domainAxis.valueToJava2D(this.polygon[i], dataArea, ↵

1

    x = domainAxis.valueToJava2D(this.polygon[i], dataArea, ↵

2

                            domainEdge);↵

2

                            domainEdge);↵

3

                    y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, ↵

3

                    y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, ↵

4

                            rangeEdge);↵

4

                            rangeEdge);↵

5

                    area.lineTo((float) y, (float) x);

5

                    area.lineTo((float) x, (float) y);

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.0
Clones location | Clones are in the same method
Number of node comparisons | 10

1. {Non-refactorable}

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

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

   12

       x = domainAxis.valueToJava2D(this.polygon[i], dataArea, domainEdge);

   19

       x = domainAxis.valueToJava2D(this.polygon[i], dataArea, domainEdge);

   13

       y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, rangeEdge);

   20

       y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea, rangeEdge);

   14

       area.lineTo((float)y, (float)x);

   14 | area.lineTo((float)y, (float)x);
   21 | area.lineTo((float)x, (float)y);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   y | x | VARIABLE_NAME_MISMATCH
   x | y | VARIABLE_NAME_MISMATCH

   Preondition Violations
   Expression y cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression x cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression x cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression y cannot be parameterized, because it has dependencies to/from statements that will be extracted

   21

       area.lineTo((float)x, (float)y);

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression y cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression x cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression x cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression y cannot be parameterized, because it has dependencies to/from statements that will be extracted