419-1-2

if (this.drawOutlines) { if (getUseOutlinePaint()) { g2.setPaint(getItemOutlinePaint(series, item)); } else { g2.setPaint(getItemPaint(series, item)); } g2.setStroke(getItemOutlineStroke(series, item)); g2.draw(shape); }
if (getUseOutlinePaint()) { g2.setPaint(getItemOutlinePaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.setStroke(getItemOutlineStroke(row, column)); g2.draw(shape);

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

1

    if (this.drawOutlines) {↵

2

                        if (getUseOutlinePaint()) {↵

1

    if (getUseOutlinePaint()) {↵

3

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

2

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

4

                        }↵

3

                    }↵

5

                        else {↵

4

                    else {↵

6

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

5

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

7

                        }↵

6

                    ↵

8

        ↵

7

    }↵

9

                    g2.setStroke(getItemOutlineStroke(series, item));↵

8

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

10

                        g2.draw(shape);↵

9

                    g2.draw(shape);

11

                    }

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

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) | 23.5
   Clone type | Type 2

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

   25

       if (getUseOutlinePaint())

   26

       if (getUseOutlinePaint())

   26

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

   26 | g2.setPaint(getItemOutlinePaint(series, item));
   27 | g2.setPaint(getItemOutlinePaint(row, column));

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

   27

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

       else

       else

   27

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

   27 | g2.setPaint(getItemPaint(series, item));
   28 | g2.setPaint(getItemPaint(row, column));

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

   28

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

   28

       g2.setStroke(getItemOutlineStroke(series, item));

   28 | g2.setStroke(getItemOutlineStroke(series, item));
   29 | g2.setStroke(getItemOutlineStroke(row, column));

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

   29

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

   29

       g2.draw(shape);

   30

       g2.draw(shape);

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