1371-3-4

SlidingGanttCategoryDataset clone = (SlidingGanttCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (GanttCategoryDataset) pc.clone(); } return clone;
XYBarDataset clone = (XYBarDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (XYDataset) pc.clone(); } return clone;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/SlidingGanttCategoryDataset.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYBarDataset.java
Method name: `Object clone()` |  | Method name: `Object clone()`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    SlidingGanttCategoryDataset clone↵

2

                    = (SlidingGanttCategoryDataset) super.clone();↵

1

    XYBarDataset clone = (XYBarDataset) super.clone();↵

3

            if (this.underlying instanceof PublicCloneable) {↵

2

            if (this.underlying instanceof PublicCloneable) {↵

4

            	PublicCloneable pc = (PublicCloneable) this.underlying;↵

3

            	PublicCloneable pc = (PublicCloneable) this.underlying;↵

5

                clone.underlying = (GanttCategoryDataset) pc.clone();↵

4

                clone.underlying = (XYDataset) pc.clone();↵

6

            }↵

5

            }↵

7

            return clone;

6

            return clone;

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