File path: /jfreechart-1.0.10/src/org/jfree/data/category/SlidingCategoryDataset.java | File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/SlidingGanttCategoryDataset.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | SlidingCategoryDataset clone↵ | 1 | SlidingGanttCategoryDataset clone↵ | |
2 | = (SlidingCategoryDataset) super.clone();↵ | 2 | = (SlidingGanttCategoryDataset) super.clone();↵ | |
3 | if (this.underlying instanceof PublicCloneable) {↵ | 3 | if (this.underlying instanceof PublicCloneable) {↵ | |
4 | PublicCloneable pc = (PublicCloneable) this.underlying;↵ | 4 | PublicCloneable pc = (PublicCloneable) this.underlying;↵ | |
5 | clone.underlying = (CategoryDataset) pc.clone();↵ | 5 | clone.underlying = (GanttCategoryDataset) pc.clone();↵ | |
6 | }↵ | 6 | }↵ | |
7 | return clone; | 7 |
| |
See real code fragment | See real code fragment |
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 |
Number of mapped statements | 5 |
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) | 3.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | SlidingCategoryDataset clone = (SlidingCategoryDataset)super.clone(); |
| 1 | SlidingGanttCategoryDataset clone = (SlidingGanttCategoryDataset)super.clone(); | ||||||||||||||||||||||
2 | if (this.underlying instanceof PublicCloneable) |
| 2 | if (this.underlying instanceof PublicCloneable) | ||||||||||||||||||||||
3 | PublicCloneable pc = (PublicCloneable)this.underlying; |
| 3 | PublicCloneable pc = (PublicCloneable)this.underlying; | ||||||||||||||||||||||
4 | clone.underlying = (CategoryDataset)pc.clone(); |
| 4 | clone.underlying = (GanttCategoryDataset)pc.clone(); | ||||||||||||||||||||||
5 | return clone; |
| 5 | return clone; |
Row | Violation |
---|---|
1 | Super method call SlidingCategoryDataset clone=(SlidingCategoryDataset)super.clone(); cannot be extracted from method |
2 | Super method call SlidingGanttCategoryDataset clone=(SlidingGanttCategoryDataset)super.clone(); cannot be extracted from method |
3 | Expression clone.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression clone.underlying cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression clone.underlying is a field being modified, and thus it cannot be parameterized |
6 | Expression clone.underlying is a field being modified, and thus it cannot be parameterized |
7 | Expression (CategoryDataset)pc.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression (GanttCategoryDataset)pc.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted |