1144-1-2

double hGap = plotArea.getWidth() * this.interiorGap; double vGap = plotArea.getHeight() * this.interiorGap; double igx1 = plotArea.getX() + hGap; double igx2 = plotArea.getMaxX() - hGap; double igy1 = plotArea.getY() + vGap; double igy2 = plotArea.getMaxY() - vGap; g2.setPaint(Color.gray); g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1));
if (DEBUG_DRAW_INTERIOR) { double hGap = plotArea.getWidth() * getInteriorGap(); double vGap = plotArea.getHeight() * getInteriorGap(); double igx1 = plotArea.getX() + hGap; double igx2 = plotArea.getMaxX() - hGap; double igy1 = plotArea.getY() + vGap; double igy2 = plotArea.getMaxY() - vGap; g2.setPaint(Color.lightGray); g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1)); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PiePlot3D.java
Method name: `void drawPie(Graphics2D, Rectangle2D, PlotRenderingInfo)` |  | Method name: `void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)`
Number of AST nodes: 8 |  | Number of AST nodes: 9

1

    if (DEBUG_DRAW_INTERIOR) {↵

1

    double hGap = plotArea.getWidth() * this.interiorGap;↵

2

                double hGap = plotArea.getWidth() * getInteriorGap();↵

2

                double vGap = plotArea.getHeight() * this.interiorGap;↵

3

                double vGap = plotArea.getHeight() * getInteriorGap↵

3

            ↵

4

    ();↵

4

                double igx1 = plotArea.getX() + hGap;↵

5

                double igx1 = plotArea.getX() + hGap;↵

5

                double igx2 = plotArea.getMaxX() - hGap;↵

6

                double igx2 = plotArea.getMaxX() - hGap;↵

6

                double igy1 = plotArea.getY() + vGap;↵

7

                double igy1 = plotArea.getY() + vGap;↵

7

                double igy2 = plotArea.getMaxY() - vGap;↵

8

                double igy2 = plotArea.getMaxY() - vGap;↵

8

                g2.setPaint(Color.gray);↵

9

                g2.setPaint(Color.lightGray);↵

9

                g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, ↵

10

                g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, ↵

10

                        igy2 - igy1));

11

                        igy2 - igy1));↵

12

            }

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

1. {Refactorable}

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

   8

       double hGap = plotArea.getWidth() * this.interiorGap;

   8 | double hGap = plotArea.getWidth() * this.interiorGap;
   17 | double hGap = plotArea.getWidth() * getInteriorGap();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this |  | MISSING_METHOD_INVOCATION_EXPRESSION
   this.interiorGap | getInteriorGap() | FIELD_ACCESS_REPLACED_WITH_GETTER

   17

       double hGap = plotArea.getWidth() * getInteriorGap();

   9

       double vGap = plotArea.getHeight() * this.interiorGap;

   9 | double vGap = plotArea.getHeight() * this.interiorGap;
   18 | double vGap = plotArea.getHeight() * getInteriorGap();

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this |  | MISSING_METHOD_INVOCATION_EXPRESSION
   this.interiorGap | getInteriorGap() | FIELD_ACCESS_REPLACED_WITH_GETTER

   18

       double vGap = plotArea.getHeight() * getInteriorGap();

   10

       double igx1 = plotArea.getX() + hGap;

   19

       double igx1 = plotArea.getX() + hGap;

   11

       double igx2 = plotArea.getMaxX() - hGap;

   20

       double igx2 = plotArea.getMaxX() - hGap;

   12

       double igy1 = plotArea.getY() + vGap;

   21

       double igy1 = plotArea.getY() + vGap;

   13

       double igy2 = plotArea.getMaxY() - vGap;

   22

       double igy2 = plotArea.getMaxY() - vGap;

   14

       g2.setPaint(Color.gray);

   14 | g2.setPaint(Color.gray);
   23 | g2.setPaint(Color.lightGray);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   gray | lightGray | VARIABLE_NAME_MISMATCH

   23

       g2.setPaint(Color.lightGray);

   15

       g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1));

   24

       g2.draw(new Rectangle2D.Double(igx1, igy1, igx2 - igx1, igy2 - igy1));

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