1324-1-2

Ellipse2D dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius); Ellipse2D dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius); g2.draw(dot1); g2.draw(dot2);
Ellipse2D.Double dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius); Ellipse2D.Double dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius); g2.draw(dot1); g2.draw(dot2);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.java
Method name: `void drawMultipleEllipse(Point2D, double, double, Graphics2D)` |  | Method name: `void drawMultipleEllipse(Point2D, double, double, Graphics2D)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    Ellipse2D dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2)↵

1

    Ellipse2D.Double dot1 = new Ellipse2D.Double(point.getX() ↵

2

                    + oRadius, point.getY(), oRadius, oRadius);↵

2

                    - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius);↵

3

            Ellipse2D dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2),↵

3

            Ellipse2D.Double dot2 = new Ellipse2D.Double(point.getX() ↵

4

                    point.getY(), oRadius, oRadius);↵

4

                    + (boxWidth / 2), point.getY(), oRadius, oRadius);↵

5

            g2.draw(dot1);↵

5

            g2.draw(dot1);↵

6

            g2.draw(dot2);

6

            g2.draw(dot2);

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.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 16

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) | 0.0
   Clone type | Type 2

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

   1

       Ellipse2D dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius);

   1 | Ellipse2D dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius);
   2 | Ellipse2D.Double dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   Ellipse2D | Ellipse2D.Double | TYPE_COMPATIBLE_REPLACEMENT
   dot1 | dot2 | VARIABLE_NAME_MISMATCH
   java.awt.geom.Ellipse2D | java.awt.geom.Ellipse2D.Double | SUBCLASS_TYPE_MISMATCH
   oRadius | (boxWidth / 2) | TYPE_COMPATIBLE_REPLACEMENT
   point.getX() - (boxWidth / 2) | point.getX() | INFIX_LEFT_OPERAND_MISMATCH

   2

       Ellipse2D.Double dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius);

   2

       Ellipse2D dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius);

   2 | Ellipse2D dot2 = new Ellipse2D.Double(point.getX() + (boxWidth / 2), point.getY(), oRadius, oRadius);
   1 | Ellipse2D.Double dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   Ellipse2D | Ellipse2D.Double | TYPE_COMPATIBLE_REPLACEMENT
   dot2 | dot1 | VARIABLE_NAME_MISMATCH
   java.awt.geom.Ellipse2D | java.awt.geom.Ellipse2D.Double | SUBCLASS_TYPE_MISMATCH
   (boxWidth / 2) | oRadius | TYPE_COMPATIBLE_REPLACEMENT
   point.getX() | point.getX() - (boxWidth / 2) | INFIX_LEFT_OPERAND_MISMATCH

   1

       Ellipse2D.Double dot1 = new Ellipse2D.Double(point.getX() - (boxWidth / 2) + oRadius, point.getY(), oRadius, oRadius);

   3

       g2.draw(dot1);

   3 | g2.draw(dot1);
   4 | g2.draw(dot2);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   dot1 | dot2 | VARIABLE_NAME_MISMATCH
   java.awt.geom.Ellipse2D | java.awt.geom.Ellipse2D.Double | SUBCLASS_TYPE_MISMATCH

   4

       g2.draw(dot2);

   4

       g2.draw(dot2);

   4 | g2.draw(dot2);
   3 | g2.draw(dot1);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   dot2 | dot1 | VARIABLE_NAME_MISMATCH
   java.awt.geom.Ellipse2D | java.awt.geom.Ellipse2D.Double | SUBCLASS_TYPE_MISMATCH

   3

       g2.draw(dot1);

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