1369-1-2

double yleft = (y0 + y1) / 2.0 + stackLeft[0]; float transYLeft = (float) rangeAxis.valueToJava2D(yleft, dataArea, edge1); left.moveTo((float) xx1, transY1); left.lineTo((float) xx1, transStack1); left.lineTo((float) xxLeft, transStackLeft); left.lineTo((float) xxLeft, transYLeft); left.closePath();
double yright = (y1 + y2) / 2.0 + stackRight[0]; float transYRight = (float) rangeAxis.valueToJava2D(yright, dataArea, edge1); right.moveTo((float) xx1, transStack1); right.lineTo((float) xx1, transY1); right.lineTo((float) xxRight, transYRight); right.lineTo((float) xxRight, transStackRight); right.closePath();

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java
Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)` |  | Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    double yleft = (y0 + y1) / 2.0 + stackLeft[0];↵

1

    double yright = (y1 + y2) / 2.0 + stackRight[0];↵

2

                    float transYLeft = (float) rangeAxis.valueToJava2D(yleft,↵

2

                    float transYRight = (float) rangeAxis.valueToJava2D(yright,↵

3

                            dataArea, edge1);↵

3

                            dataArea, edge1);↵

4

                    left.moveTo((float) xx1, transY1);↵

4

                    right.moveTo((float) xx1, transStack1);↵

5

                    left.lineTo((float) xx1, transStack1);↵

5

                    right.lineTo((float) xx1, transY1);↵

6

                    left.lineTo((float) xxLeft, transStackLeft);↵

6

                    right.lineTo((float) xxRight, transYRight);↵

7

                    left.lineTo((float) xxLeft, transYLeft);↵

7

                    right.lineTo((float) xxRight, transStackRight);↵

8

                    left.closePath();

8

                    right.closePath();

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

1. {Non-refactorable}

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

   69

       double yleft = (y0 + y1) / 2.0 + stackLeft[0];

   69 | double yleft = (y0 + y1) / 2.0 + stackLeft[0];
   82 | double yright = (y1 + y2) / 2.0 + stackRight[0];

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   yleft | yright | VARIABLE_NAME_MISMATCH
   y0 | y1 | VARIABLE_NAME_MISMATCH
   y1 | y2 | VARIABLE_NAME_MISMATCH
   stackLeft | stackRight | VARIABLE_NAME_MISMATCH

   82

       double yright = (y1 + y2) / 2.0 + stackRight[0];

   70

       float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1);

   70 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1);
   83 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   transYLeft | transYRight | VARIABLE_NAME_MISMATCH
   yleft | yright | VARIABLE_NAME_MISMATCH

   83

       float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1);

   71

       left.moveTo((float)xx1, transY1);

   71 | left.moveTo((float)xx1, transY1);
   88 | right.closePath();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   moveTo | closePath | METHOD_INVOCATION_NAME_MISMATCH
   left | right | VARIABLE_NAME_MISMATCH
   left.moveTo((float)xx1,transY1) | right.closePath() | ARGUMENT_NUMBER_MISMATCH

   Preondition Violations
   Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression left.moveTo((float)xx1,transY1) is a void method call, and thus it cannot be parameterized
   Expression right.closePath() is a void method call, and thus it cannot be parameterized
   Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression left.moveTo((float)xx1,transY1) is a void method call, and thus it cannot be parameterized
   Expression right.closePath() is a void method call, and thus it cannot be parameterized

   88

       right.closePath();

   72

       left.lineTo((float)xx1, transStack1);

   72 | left.lineTo((float)xx1, transStack1);
   84 | right.moveTo((float)xx1, transStack1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   lineTo | moveTo | METHOD_INVOCATION_NAME_MISMATCH
   left | right | VARIABLE_NAME_MISMATCH

   Preondition Violations
   Expression left.lineTo((float)xx1,transStack1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression left.lineTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized
   Expression right.moveTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized

   84

       right.moveTo((float)xx1, transStack1);

   73

       left.lineTo((float)xxLeft, transStackLeft);

   73 | left.lineTo((float)xxLeft, transStackLeft);
   85 | right.lineTo((float)xx1, transY1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xxLeft | xx1 | VARIABLE_NAME_MISMATCH
   transStackLeft | transY1 | VARIABLE_NAME_MISMATCH
   left | right | VARIABLE_NAME_MISMATCH

   85

       right.lineTo((float)xx1, transY1);

   74

       left.lineTo((float)xxLeft, transYLeft);

   74 | left.lineTo((float)xxLeft, transYLeft);
   86 | right.lineTo((float)xxRight, transYRight);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xxLeft | xxRight | VARIABLE_NAME_MISMATCH
   transYLeft | transYRight | VARIABLE_NAME_MISMATCH
   left | right | VARIABLE_NAME_MISMATCH

   86

       right.lineTo((float)xxRight, transYRight);

   75

       left.closePath();

   75 | left.closePath();
   87 | right.lineTo((float)xxRight, transStackRight);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   closePath | lineTo | METHOD_INVOCATION_NAME_MISMATCH
   left | right | VARIABLE_NAME_MISMATCH
   left.closePath() | right.lineTo((float)xxRight,transStackRight) | ARGUMENT_NUMBER_MISMATCH

   Preondition Violations
   Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression left.closePath() is a void method call, and thus it cannot be parameterized
   Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized
   Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression left.closePath() is a void method call, and thus it cannot be parameterized
   Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized

   87

       right.lineTo((float)xxRight, transStackRight);

   Precondition Violations (17)
   Row | Violation
   --- | ---
   1 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression left.moveTo((float)xx1,transY1) is a void method call, and thus it cannot be parameterized
   3 | Expression right.closePath() is a void method call, and thus it cannot be parameterized
   4 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   5 | Expression left.moveTo((float)xx1,transY1) is a void method call, and thus it cannot be parameterized
   6 | Expression right.closePath() is a void method call, and thus it cannot be parameterized
   7 | Expression left.lineTo((float)xx1,transStack1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   8 | Expression left.lineTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized
   9 | Expression right.moveTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized
   10 | Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   11 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   12 | Expression left.closePath() is a void method call, and thus it cannot be parameterized
   13 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized
   14 | Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   15 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   16 | Expression left.closePath() is a void method call, and thus it cannot be parameterized
   17 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized