1775-1-2

double value = this.axis.java2DToValue(xx, colorBarArea, edge); line.setLine(xx, y1, xx, y2); g2.setPaint(getPaint(value)); g2.draw(line); xx += 1;
double value = this.axis.java2DToValue(xx, colorBarArea, edge); line.setLine(y1, xx, y2, xx); g2.setPaint(getPaint(value)); g2.draw(line); xx += 1;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ColorBar.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/ColorBar.java
Method name: `void drawColorBar(Graphics2D, Rectangle2D, RectangleEdge)` |  | Method name: `void drawColorBar(Graphics2D, Rectangle2D, RectangleEdge)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    double value = this.axis.java2DToValue(xx, colorBarArea, edge);↵

1

    double value = this.axis.java2DToValue(xx, colorBarArea, edge);↵

2

                    line.setLine(xx, y1, xx, y2);↵

2

                    line.setLine(y1, xx, y2, xx);↵

3

                    g2.setPaint(getPaint(value));↵

3

                    g2.setPaint(getPaint(value));↵

4

                    g2.draw(line);↵

4

                    g2.draw(line);↵

5

                    xx += 1;

5

                    xx += 1;

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

   11

       double value = this.axis.java2DToValue(xx, colorBarArea, edge);

   21

       double value = this.axis.java2DToValue(xx, colorBarArea, edge);

   12

       line.setLine(xx, y1, xx, y2);

   12 | line.setLine(xx, y1, xx, y2);
   22 | line.setLine(y1, xx, y2, xx);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xx | y1 | VARIABLE_NAME_MISMATCH
   y1 | xx | VARIABLE_NAME_MISMATCH
   xx | y2 | VARIABLE_NAME_MISMATCH
   y2 | xx | VARIABLE_NAME_MISMATCH

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

   22

       line.setLine(y1, xx, y2, xx);

   13

       g2.setPaint(getPaint(value));

   23

       g2.setPaint(getPaint(value));

   14

       g2.draw(line);

   24

       g2.draw(line);

   15

       xx += 1;

   25

       xx += 1;

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