1416-1-4

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

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.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 (this.useOutlinePaint) {↵

1

    if (getUseOutlinePaint()) {↵

2

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

2

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

3

                        }↵

3

                        }↵

4

                        else {↵

4

                        else {↵

5

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

5

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

6

                        }↵

6

                        }↵

7

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

7

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

8

                        g2.draw(shape);

8

                        g2.draw(shape);

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.6
   Clone type | Type 2

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

   46

       if (this.useOutlinePaint)

   46 | if (this.useOutlinePaint)
   25 | if (getUseOutlinePaint())

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this |  | MISSING_METHOD_INVOCATION_EXPRESSION
   this.useOutlinePaint | getUseOutlinePaint() | FIELD_ACCESS_REPLACED_WITH_GETTER

   25

       if (getUseOutlinePaint())

   47

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

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

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

   26

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

       else

       else

   48

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

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

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

   27

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

   49

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

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

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

   28

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

   50

       g2.draw(shape);

   29

       g2.draw(shape);

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