1211-6-10

Area side2 = new Area(new Rectangle2D.Double( arc.getEndPoint().getX(), plotArea.getY(), plotArea.getMaxX() - arc.getEndPoint().getX(), plotArea.getHeight())); side2.intersect(front); g2.setPaint(paint); g2.fill(side2); g2.setPaint(outlinePaint); g2.draw(side2);
Area side = new Area(new Rectangle2D.Double( arc.getEndPoint().getX(), plotArea.getY(), arc.getStartPoint().getX() - arc.getEndPoint().getX(), plotArea.getHeight())); side.intersect(back); g2.setPaint(paint); g2.fill(side); g2.setPaint(outlinePaint); g2.draw(side);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: `void drawSide(Graphics2D, Rectangle2D, Arc2D, Area, Area, Paint, Paint, Stroke, boolean, boolean)` |  | Method name: `void drawSide(Graphics2D, Rectangle2D, Arc2D, Area, Area, Paint, Paint, Stroke, boolean, boolean)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    Area side2 = new Area(new Rectangle2D.Double(↵

1

    Area side = new Area(new Rectangle2D.Double(↵

2

                                    arc.getEndPoint().getX(), plotArea.getY(),↵

2

                                        arc.getEndPoint().getX(), plotArea.getY(),↵

3

                                    plotArea.getMaxX() ↵

3

                                        arc.getStartPoint().getX() ↵

4

    - arc.getEndPoint().getX(),↵

4

                                        - arc.getEndPoint().getX(),↵

5

                                    plotArea.getHeight()));↵

5

                                        plotArea.getHeight()));↵

6

                            side2.intersect(front);↵

6

                                side.intersect(↵

7

    back);↵

7

                            g2.setPaint(paint);↵

8

                                g2.setPaint(paint);↵

8

                            g2.fill(side2);↵

9

                                g2.fill(side);↵

9

                            g2.setPaint(outlinePaint);↵

10

                                g2.setPaint(outlinePaint);↵

10

                            g2.draw(side2);

11

                                g2.draw(side);

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 the same method
Number of node comparisons | 28

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 5
   Number of unmapped statements in the first code fragment | 1
   Number of unmapped statements in the second code fragment | 1
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 2

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

   84

       Area side2 = new Area(new Rectangle2D.Double(arc.getEndPoint().getX(), plotArea.getY(), plotArea.getMaxX() - arc.getEndPoint().getX(), plotArea.getHeight()));

   134

       Area side = new Area(new Rectangle2D.Double(arc.getEndPoint().getX(), plotArea.getY(), arc.getStartPoint().getX() - arc.getEndPoint().getX(), plotArea.getHeight()));

   85

       side2.intersect(front);

   85 | side2.intersect(front);
   135 | side.intersect(back);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   front | back | VARIABLE_NAME_MISMATCH
   side2 | side | VARIABLE_NAME_MISMATCH

   135

       side.intersect(back);

   86

       g2.setPaint(paint);

   136

       g2.setPaint(paint);

   87

       g2.fill(side2);

   87 | g2.fill(side2);
   137 | g2.fill(side);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   side2 | side | VARIABLE_NAME_MISMATCH

   137

       g2.fill(side);

   88

       g2.setPaint(outlinePaint);

   138

       g2.setPaint(outlinePaint);

   89

       g2.draw(side2);

   89 | g2.draw(side2);
   139 | g2.draw(side);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   side2 | side | VARIABLE_NAME_MISMATCH

   139

       g2.draw(side);

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