1276-1-2

if (this.drawOutlines) { if (this.useOutlinePaint) { g2.setPaint(getItemOutlinePaint(row, column)); } else { g2.setPaint(getItemPaint(row, column)); } g2.setStroke(getItemOutlineStroke(row, column)); g2.draw(shape); }
if (this.drawOutlines) { if (this.useOutlinePaint) { 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/category/LineAndShapeRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/ScatterRenderer.java
Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)` |  | Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    if (this.drawOutlines) {↵

1

    if (this.drawOutlines) {↵

2

                        if (this.useOutlinePaint) {↵

2

                    if (this.useOutlinePaint) {↵

3

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

3

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

4

                        }↵

4

                    ↵

5

        ↵

5

    }↵

6

                    else {↵

6

                    else {↵

7

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

7

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

8

                        }↵

8

                    ↵

9

       ↵

9

    }↵

10

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

10

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

11

                        g2.draw(shape);↵

11

                    g2.draw(shape);↵

12

                    }

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

1. {Refactorable}

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

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

   45

       if (this.drawOutlines)

   27

       if (this.drawOutlines)

   46

       if (this.useOutlinePaint)

   28

       if (this.useOutlinePaint)

   47

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

   29

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

       else

       else

   48

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

   30

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

   49

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

   31

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

   50

       g2.draw(shape);

   32

       g2.draw(shape);

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