1211-4-11

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

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 side = new Area(new Rectangle2D.Double(↵

1

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

2

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

2

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

3

                                        arc.getEndPoint().getX() ↵

3

                                    arc.getStartPoint().getX() ↵

4

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

4

    - plotArea.getX(),↵

5

                                        plotArea.getHeight()));↵

5

                                    plotArea.getHeight()));↵

6

                                side.intersect(back);↵

6

                            side1.intersect(back);↵

7

                                g2.setPaint(paint);↵

7

                            g2.setPaint(paint);↵

8

                                g2.fill(side);↵

8

                            g2.fill(side1);↵

9

                                g2.setPaint(outlinePaint);↵

9

                            g2.setPaint(outlinePaint);↵

10

                                g2.draw(side);

10

                            g2.draw(side1);

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

   54

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

   157

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

   55

       side.intersect(back);

   55 | side.intersect(back);
   158 | side1.intersect(back);

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

   158

       side1.intersect(back);

   56

       g2.setPaint(paint);

   159

       g2.setPaint(paint);

   57

       g2.fill(side);

   57 | g2.fill(side);
   160 | g2.fill(side1);

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

   160

       g2.fill(side1);

   58

       g2.setPaint(outlinePaint);

   161

       g2.setPaint(outlinePaint);

   59

       g2.draw(side);

   59 | g2.draw(side);
   162 | g2.draw(side1);

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

   162

       g2.draw(side1);

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