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.toolTipGenerator != null) {↵ | 1 | if (this.baseItemURLGenerator != null) {↵ | |
2 | if (this.toolTipGenerator instanceof PublicCloneable) {↵ | 2 | if (this.baseItemURLGenerator instanceof PublicCloneable) {↵ | |
3 | PublicCloneable pc↵ | 3 | PublicCloneable pc↵ | |
4 | = (PublicCloneable) this.toolTipGenerator;↵ | 4 | = (PublicCloneable) this.baseItemURLGenerator;↵ | |
5 | clone.toolTipGenerator = (CategoryToolTipGenerator) pc.clone();↵ | 5 | clone.baseItemURLGenerator = (CategoryURLGenerator) pc.clone();↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | throw new CloneNotSupportedException(↵ | 8 | throw new CloneNotSupportedException(↵ | |
9 | "Tool tip generator not cloneable.");↵ | 9 | "Base item URL generator not cloneable.");↵ | |
10 | }↵ | 10 | }↵ | |
11 | } | 11 |
| |
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 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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | if (this.toolTipGenerator != null) |
| 33 | if (this.baseItemURLGenerator != null) | ||||||||||||||
15 | if (this.toolTipGenerator instanceof PublicCloneable) |
| 34 | if (this.baseItemURLGenerator instanceof PublicCloneable) | ||||||||||||||
16 | PublicCloneable pc = (PublicCloneable)this.toolTipGenerator; |
| 35 | PublicCloneable pc = (PublicCloneable)this.baseItemURLGenerator; | ||||||||||||||
17 | clone.toolTipGenerator = (CategoryToolTipGenerator)pc.clone(); |
| | |||||||||||||||
|
| 36 | clone.baseItemURLGenerator = (CategoryURLGenerator)pc.clone(); | |||||||||||||||
else | else | |||||||||||||||||
18 | throw new CloneNotSupportedException("Tool tip generator not cloneable."); |
| 37 | throw new CloneNotSupportedException("Base item URL generator not cloneable."); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.toolTipGenerator does not match with type org.jfree.chart.urls.CategoryURLGenerator of variable this.baseItemURLGenerator |
2 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.toolTipGenerator does not match with type org.jfree.chart.urls.CategoryURLGenerator of variable this.baseItemURLGenerator |
3 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.toolTipGenerator does not match with type org.jfree.chart.urls.CategoryURLGenerator of variable this.baseItemURLGenerator |
4 | Unmatched statement clone.toolTipGenerator=(CategoryToolTipGenerator)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.toolTipGenerator=(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 |
6 | Unmatched statement clone.baseItemURLGenerator=(CategoryURLGenerator)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.baseItemURLGenerator=(CategoryURLGenerator)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 |