1564-1-3

if (orientation == PlotOrientation.VERTICAL) { this.pArea.addPoint((int) transX1, (int) transY2); } else if (orientation == PlotOrientation.HORIZONTAL) { this.pArea.addPoint((int) transY2, (int) transX1); }
if (orientation == PlotOrientation.VERTICAL) { this.pArea.addPoint((int) transX1, (int) transY1); } else if (orientation == PlotOrientation.HORIZONTAL) { this.pArea.addPoint((int) transY1, (int) transX1); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepAreaRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYStepAreaRenderer.java
Method name: `void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)` |  | Method name: `void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    if (orientation == PlotOrientation.VERTICAL) {↵

1

    if (orientation == PlotOrientation.VERTICAL) {↵

2

                    this.pArea.addPoint((int) transX1, (int) transY2);↵

2

                    this.pArea.addPoint((int) transX1, (int) transY1);↵

3

                }↵

3

                }↵

4

                else if (orientation == PlotOrientation.HORIZONTAL) {↵

4

                else if (orientation == PlotOrientation.HORIZONTAL) {↵

5

                    this.pArea.addPoint((int) transY2, (int) transX1);↵

5

                    this.pArea.addPoint((int) transY1, (int) transX1);↵

6

                }

6

                }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in the same method
Number of node comparisons | 14

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 4
   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) | 2.5
   Clone type | Type 2

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

   18

       if (orientation == PlotOrientation.VERTICAL)

   44

       if (orientation == PlotOrientation.VERTICAL)

   19

       this.pArea.addPoint((int)transX1, (int)transY2);

   19 | this.pArea.addPoint((int)transX1, (int)transY2);
   45 | this.pArea.addPoint((int)transX1, (int)transY1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   transY2 | transY1 | VARIABLE_NAME_MISMATCH

   45

       this.pArea.addPoint((int)transX1, (int)transY1);

   20

       else if (orientation == PlotOrientation.HORIZONTAL)

   46

       else if (orientation == PlotOrientation.HORIZONTAL)

   21

       this.pArea.addPoint((int)transY2, (int)transX1);

   21 | this.pArea.addPoint((int)transY2, (int)transX1);
   47 | this.pArea.addPoint((int)transY1, (int)transX1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   transY2 | transY1 | VARIABLE_NAME_MISMATCH

   47

       this.pArea.addPoint((int)transY1, (int)transX1);

   Precondition Violations (0)
   Row | Violation
   --- | ---