1371-1-2

XYBlockRenderer clone = (XYBlockRenderer) super.clone(); if (this.paintScale instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.paintScale; clone.paintScale = (PaintScale) pc.clone(); } return clone;
SlidingCategoryDataset clone = (SlidingCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (CategoryDataset) pc.clone(); } return clone;

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

1

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

1

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

2

            if (this.paintScale instanceof PublicCloneable) {↵

2

            if (this.underlying instanceof PublicCloneable) {↵

3

                PublicCloneable pc = (PublicCloneable) this.paintScale;↵

3

            	PublicCloneable pc = (PublicCloneable) this.underlying;↵

4

                clone.paintScale = (PaintScale) pc.clone();↵

4

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

5

            }↵

5

            }↵

6

            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
Number of node comparisons | 1