1514-1-2

double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3); l_subtrahendCurX = l_minuendCurX; l_subtrahendCurY = new Double((l_slope * l_x1) + (l_y3 - (l_slope * l_x3))); l_subtrahendXs.add(l_subtrahendCurX); l_subtrahendYs.add(l_subtrahendCurY);
double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1); l_minuendCurX = l_subtrahendCurX; l_minuendCurY = new Double((l_slope * l_x3) + (l_y1 - (l_slope * l_x1))); l_minuendXs.add(l_minuendCurX); l_minuendYs.add(l_minuendCurY);

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

1

    double l_slope   = (l_y4 - l_y3) / (l_x4 - l_x3);↵

1

    double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1);↵

2

                    l_subtrahendCurX = l_minuendCurX;↵

2

                    l_minuendCurX  = l_subtrahendCurX;↵

3

                    l_subtrahendCurY = new Double((l_slope * l_x1) ↵

3

                    l_minuendCurY  = new Double((l_slope * l_x3) ↵

4

                            + (l_y3 - (l_slope * l_x3)));↵

4

                            + (l_y1 - (l_slope * l_x1)));↵

5

                    l_subtrahendXs.add(l_subtrahendCurX);↵

5

                    l_minuendXs.add(l_minuendCurX);↵

6

                    l_subtrahendYs.add(l_subtrahendCurY);

6

                    l_minuendYs.add(l_minuendCurY);

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 | 26

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 5
   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
   --- | --- | --- | --- | ---

   88

       double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3);

   88 | double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3);
   94 | double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   l_y4 | l_y2 | VARIABLE_NAME_MISMATCH
   l_y3 | l_y1 | VARIABLE_NAME_MISMATCH
   l_x4 | l_x2 | VARIABLE_NAME_MISMATCH
   l_x3 | l_x1 | VARIABLE_NAME_MISMATCH

   94

       double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1);

   89

       l_subtrahendCurX = l_minuendCurX;

   89 | l_subtrahendCurX = l_minuendCurX;
   95 | l_minuendCurX = l_subtrahendCurX;

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   l_subtrahendCurX | l_minuendCurX | VARIABLE_NAME_MISMATCH
   l_minuendCurX | l_subtrahendCurX | VARIABLE_NAME_MISMATCH

   95

       l_minuendCurX = l_subtrahendCurX;

   90

       l_subtrahendCurY = new Double((l_slope * l_x1) + (l_y3 - (l_slope * l_x3)));

   90 | l_subtrahendCurY = new Double((l_slope * l_x1) + (l_y3 - (l_slope * l_x3)));
   96 | l_minuendCurY = new Double((l_slope * l_x3) + (l_y1 - (l_slope * l_x1)));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   l_subtrahendCurY | l_minuendCurY | VARIABLE_NAME_MISMATCH
   l_x1 | l_x3 | VARIABLE_NAME_MISMATCH
   l_y3 | l_y1 | VARIABLE_NAME_MISMATCH
   l_x3 | l_x1 | VARIABLE_NAME_MISMATCH

   96

       l_minuendCurY = new Double((l_slope * l_x3) + (l_y1 - (l_slope * l_x1)));

   91

       l_subtrahendXs.add(l_subtrahendCurX);

   91 | l_subtrahendXs.add(l_subtrahendCurX);
   97 | l_minuendXs.add(l_minuendCurX);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   l_subtrahendCurX | l_minuendCurX | VARIABLE_NAME_MISMATCH
   l_subtrahendXs | l_minuendXs | VARIABLE_NAME_MISMATCH

   97

       l_minuendXs.add(l_minuendCurX);

   92

       l_subtrahendYs.add(l_subtrahendCurY);

   92 | l_subtrahendYs.add(l_subtrahendCurY);
   98 | l_minuendYs.add(l_minuendCurY);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   l_subtrahendCurY | l_minuendCurY | VARIABLE_NAME_MISMATCH
   l_subtrahendYs | l_minuendYs | VARIABLE_NAME_MISMATCH

   98

       l_minuendYs.add(l_minuendCurY);

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Clone fragment #1 returns variables l_subtrahendCurX, l_subtrahendCurY , while Clone fragment #2 returns variables l_minuendCurY, l_minuendCurX