1377-1-2

if (dataset instanceof GanttCategoryDataset) { GanttCategoryDataset gcd = (GanttCategoryDataset) dataset; drawTasks(g2, state, dataArea, plot, domainAxis, rangeAxis, gcd, row, column); } else { // let the superclass handle it... super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); }
if (dataset instanceof IntervalCategoryDataset) { IntervalCategoryDataset d = (IntervalCategoryDataset) dataset; drawInterval(g2, state, dataArea, plot, domainAxis, rangeAxis, d, row, column); } else { super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/IntervalBarRenderer.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 (dataset instanceof GanttCategoryDataset) {↵

1

    if (dataset instanceof IntervalCategoryDataset) {↵

2

                 GanttCategoryDataset gcd = (GanttCategoryDataset) dataset;↵

2

                 IntervalCategoryDataset d = (IntervalCategoryDataset) dataset;↵

3

                 drawTasks(g2, state, dataArea, plot, domainAxis, rangeAxis, gcd,↵

3

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

4

                         row, column);↵

4

                         d, row, column);↵

5

             }↵

5

             }↵

6

             else {  // let the superclass handle it...↵

6

             else {↵

7

                 super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis,↵

7

                 super.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis,↵

8

                         dataset, row, column, pass);↵

8

                         dataset, row, column, pass);↵

9

             }

9

             }

See real code fragment |  | See real code fragment

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