426-4-5

if (getItemShapeFilled(row, column)) { if (this.useFillPaint) { g2.setPaint(getItemFillPaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.fill(shape); }
if (getItemShapeFilled(series, item)) { if (this.useFillPaint) { g2.setPaint(getItemFillPaint(series, item)); } else { g2.setPaint(getItemPaint(series, item)); } g2.fill(shape); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/ScatterRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYLineAndShapeRenderer.java
Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)` |  | Method name: `void drawSecondaryPass(Graphics2D, XYPlot, XYDataset, int, int, int, ValueAxis, Rectangle2D, ValueAxis, CrosshairState, EntityCollection)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    if (getItemShapeFilled(row, column)) {↵

1

    if (getItemShapeFilled(series, item)) {↵

2

                    if (this.useFillPaint) {↵

2

                        if (this.useFillPaint) {↵

3

                        g2.setPaint(getItemFillPaint(row, column));↵

3

                            g2.setPaint(getItemFillPaint(series, item));↵

4

                    }↵

4

                     ↵

5

       }↵

5

                    else {↵

6

                        else {↵

6

                        g2.setPaint(getItemPaint(row, column));↵

7

                            g2.setPaint(getItemPaint(series, item));↵

7

                    }↵

8

                        }↵

8

                    g2.fill(shape);↵

9

                        g2.fill(shape);↵

9

                }

10

                    }

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

1. {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) | 1.2
   Clone type | Type 2

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

   22

       if (getItemShapeFilled(row, column))

   22 | if (getItemShapeFilled(row, column))
   19 | if (getItemShapeFilled(series, item))

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   row | series | VARIABLE_NAME_MISMATCH
   column | item | VARIABLE_NAME_MISMATCH

   19

       if (getItemShapeFilled(series, item))

   23

       if (this.useFillPaint)

   20

       if (this.useFillPaint)

   24

       g2.setPaint(getItemFillPaint(row, column));

   24 | g2.setPaint(getItemFillPaint(row, column));
   21 | g2.setPaint(getItemFillPaint(series, item));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   row | series | VARIABLE_NAME_MISMATCH
   column | item | VARIABLE_NAME_MISMATCH

   21

       g2.setPaint(getItemFillPaint(series, item));

       else

       else

   25

       g2.setPaint(getItemPaint(row, column));

   25 | g2.setPaint(getItemPaint(row, column));
   22 | g2.setPaint(getItemPaint(series, item));

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   row | series | VARIABLE_NAME_MISMATCH
   column | item | VARIABLE_NAME_MISMATCH

   22

       g2.setPaint(getItemPaint(series, item));

   26

       g2.fill(shape);

   23

       g2.fill(shape);

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