File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (this.itemLabelGenerator != null) {↵ | 1 | if (this.baseToolTipGenerator != null) {↵ | |
2 | if (this.itemLabelGenerator instanceof PublicCloneable) {↵ | 2 | if (this.baseToolTipGenerator instanceof PublicCloneable) {↵ | |
3 | PublicCloneable pc↵ | 3 | PublicCloneable pc↵ | |
4 | = (PublicCloneable) this.itemLabelGenerator;↵ | 4 | = (PublicCloneable) this.baseToolTipGenerator;↵ | |
5 | clone.itemLabelGenerator↵ | 5 | clone.baseToolTipGenerator↵ | |
6 | = (CategoryItemLabelGenerator) pc.clone();↵ | 6 | = (CategoryToolTipGenerator) pc.clone();↵ | |
7 | }↵ | 7 | }↵ | |
8 | else {↵ | 8 | else {↵ | |
9 | throw new CloneNotSupportedException(↵ | 9 | throw new CloneNotSupportedException(↵ | |
10 | "ItemLabelGenerator not cloneable.");↵ | 10 | "Base tool tip generator not cloneable.");↵ | |
11 | }↵ | 11 | }↵ | |
12 | } | 12 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (this.itemLabelGenerator != null) |
| 21 | if (this.baseToolTipGenerator != null) | ||||||||||||||
3 | if (this.itemLabelGenerator instanceof PublicCloneable) |
| 22 | if (this.baseToolTipGenerator instanceof PublicCloneable) | ||||||||||||||
4 | PublicCloneable pc = (PublicCloneable)this.itemLabelGenerator; |
| 23 | PublicCloneable pc = (PublicCloneable)this.baseToolTipGenerator; | ||||||||||||||
5 | clone.itemLabelGenerator = (CategoryItemLabelGenerator)pc.clone(); |
| | |||||||||||||||
|
| 24 | clone.baseToolTipGenerator = (CategoryToolTipGenerator)pc.clone(); | |||||||||||||||
else | else | |||||||||||||||||
6 | throw new CloneNotSupportedException("ItemLabelGenerator not cloneable."); |
| 25 | throw new CloneNotSupportedException("Base tool tip generator not cloneable."); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable this.itemLabelGenerator does not match with type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.baseToolTipGenerator |
2 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable this.itemLabelGenerator does not match with type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.baseToolTipGenerator |
3 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable this.itemLabelGenerator does not match with type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.baseToolTipGenerator |
4 | Unmatched statement clone.itemLabelGenerator=(CategoryItemLabelGenerator)pc.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement clone.itemLabelGenerator=(CategoryItemLabelGenerator)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 |
6 | Unmatched statement clone.baseToolTipGenerator=(CategoryToolTipGenerator)pc.clone(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement clone.baseToolTipGenerator=(CategoryToolTipGenerator)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 |