1594-1-3

if (orientation == PlotOrientation.HORIZONTAL) { drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column); } else if (orientation == PlotOrientation.VERTICAL) { drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column); }
if (orientation == PlotOrientation.HORIZONTAL) { drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column); } else if (orientation == PlotOrientation.VERTICAL) { drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.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: 4 |  | Number of AST nodes: 4

1

    if (orientation == PlotOrientation.HORIZONTAL) {↵

1

    if (orientation == PlotOrientation.HORIZONTAL) {↵

2

                drawHorizontalItem(g2, state, dataArea, plot, domainAxis,↵

2

                drawHorizontalItem(g2, state, dataArea, plot, domainAxis,↵

3

                        rangeAxis, dataset, row, column);↵

3

                        rangeAxis, statData, row, column);↵

4

            }↵

4

            }↵

5

            else if (orientation == PlotOrientation.VERTICAL) {↵

5

            else if (orientation == PlotOrientation.VERTICAL) {↵

6

                drawVerticalItem(g2, state, dataArea, plot, domainAxis,↵

6

                drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis,↵

7

                        rangeAxis, dataset, row, column);↵

7

                        statData, row, column);↵

8

            }

8

            }

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

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 4
   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.4
   Clone type | Type 2

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

   4

       if (orientation == PlotOrientation.HORIZONTAL)

   5

       if (orientation == PlotOrientation.HORIZONTAL)

   5

       drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column);

   5 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column);
   6 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   dataset | statData | VARIABLE_NAME_MISMATCH
   org.jfree.data.category.CategoryDataset | org.jfree.data.statistics.StatisticalCategoryDataset | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.data.category.CategoryDataset of variable dataset does not match with type org.jfree.data.statistics.StatisticalCategoryDataset of variable statData
   - Make classes org.jfree.data.category.CategoryDataset and org.jfree.data.statistics.StatisticalCategoryDataset extend a common superclass

   6

       drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column);

   6

       else if (orientation == PlotOrientation.VERTICAL)

   7

       else if (orientation == PlotOrientation.VERTICAL)

   7

       drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column);

   7 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column);
   8 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   dataset | statData | VARIABLE_NAME_MISMATCH
   org.jfree.data.category.CategoryDataset | org.jfree.data.statistics.StatisticalCategoryDataset | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.data.category.CategoryDataset of variable dataset does not match with type org.jfree.data.statistics.StatisticalCategoryDataset of variable statData
   - Make classes org.jfree.data.category.CategoryDataset and org.jfree.data.statistics.StatisticalCategoryDataset extend a common superclass

   8

       drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column);

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type org.jfree.data.category.CategoryDataset of variable dataset does not match with type org.jfree.data.statistics.StatisticalCategoryDataset of variable statData
   2 | Type org.jfree.data.category.CategoryDataset of variable dataset does not match with type org.jfree.data.statistics.StatisticalCategoryDataset of variable statData