File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBlockRenderer.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 | XYBlockRenderer clone = (XYBlockRenderer↵ | 1 | SlidingGanttCategoryDataset clone↵ | |
2 | ) super.clone();↵ | 2 | = (SlidingGanttCategoryDataset) super.clone();↵ | |
3 | if (this.paintScale instanceof PublicCloneable) {↵ | 3 | if (this.underlying instanceof PublicCloneable) {↵ | |
4 | PublicCloneable pc = (PublicCloneable) this.paintScale;↵ | 4 | PublicCloneable pc = (PublicCloneable) this.underlying;↵ | |
5 | clone.paintScale = (PaintScale) 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 |
Number of node comparisons | 13 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | SlidingGanttCategoryDataset clone = (SlidingGanttCategoryDataset)super.clone(); | ||||||||||||||||
1 | XYBlockRenderer clone = (XYBlockRenderer)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.underlying = (GanttCategoryDataset)pc.clone(); | |||||||||||||||
4 | clone.paintScale = (PaintScale)pc.clone(); |
| | |||||||||||||||
|
| 5 | return clone; | |||||||||||||||
5 | return clone; |
| |
Row | Violation |
---|---|
1 | Type org.jfree.chart.renderer.PaintScale of variable this.paintScale does not match with type org.jfree.data.gantt.GanttCategoryDataset of variable this.underlying |
2 | Type org.jfree.chart.renderer.PaintScale of variable this.paintScale does not match with type org.jfree.data.gantt.GanttCategoryDataset of variable this.underlying |
3 | Unmatched statement clone.underlying=(GanttCategoryDataset)pc.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement clone.underlying=(GanttCategoryDataset)pc.clone(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement clone.paintScale=(PaintScale)pc.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement clone.paintScale=(PaintScale)pc.clone(); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Unmatched return clone; |
8 | Unmatched return clone; |