1415-4-5

if (this.useOutlinePaint) { g2.setPaint(getItemOutlinePaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.setStroke(getItemOutlineStroke(row, column)); g2.draw(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(series, item)) {↵

1

    if (this.useOutlinePaint) {↵

2

                        if (this.useFillPaint) {↵

2

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

3

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

3

                    }↵

4

                     ↵

5

       }↵

4

                    else {↵

6

                        else {↵

5

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

7

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

6

                    }↵

8

                        }↵

7

                    g2.setStroke(getItemOutlineStroke(row, column));↵

9

                        g2.fill(shape);↵

8

                    g2.draw(shape);

10

                    }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
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 | 12

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 4
   Number of unmapped statements in the first code fragment | 1
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 1229.9
   Clone type | Type 3

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

   28

       if (this.useOutlinePaint)

   28 | if (this.useOutlinePaint)
   20 | if (this.useFillPaint)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   useOutlinePaint | useFillPaint | VARIABLE_NAME_MISMATCH

   20

       if (this.useFillPaint)

   29

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getItemOutlinePaint | getItemFillPaint | METHOD_INVOCATION_NAME_MISMATCH
   row | series | VARIABLE_NAME_MISMATCH
   column | item | VARIABLE_NAME_MISMATCH

   21

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

       else

       else

   30

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

   30 | 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));

   31

       g2.setStroke(getItemOutlineStroke(row, column));

   32

       g2.draw(shape);

   32 | g2.draw(shape);
   23 | g2.fill(shape);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   draw | fill | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression g2.draw(shape) is a void method call, and thus it cannot be parameterized
   Expression g2.fill(shape) is a void method call, and thus it cannot be parameterized

   23

       g2.fill(shape);

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Expression g2.draw(shape) is a void method call, and thus it cannot be parameterized
   2 | Expression g2.fill(shape) is a void method call, and thus it cannot be parameterized