File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/AbstractCategoryItemLabelGenerator.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/HighLowItemLabelGenerator.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | AbstractCategoryItemLabelGenerator clone ↵ | 1 | HighLowItemLabelGenerator clone ↵ | |
2 | = (AbstractCategoryItemLabelGenerator) super.clone();↵ | 2 | = (HighLowItemLabelGenerator) super.clone();↵ | |
3 | if (this.numberFormat != null) {↵ | 3 | if (this.dateFormatter != null) {↵ | |
4 | clone.numberFormat = (NumberFormat) this.numberFormat.clone();↵ | 4 | clone.dateFormatter = (DateFormat) this.dateFormatter.clone();↵ | |
5 | } ↵ | 5 | }↵ | |
6 | if (this.dateFormat != null) {↵ | 6 | if (this.numberFormatter != null) {↵ | |
7 | clone.dateFormat = (DateFormat) this.dateFormat.clone();↵ | 7 | clone.numberFormatter = (NumberFormat) this.numberFormatter.clone();↵ | |
8 | }↵ | 8 | }↵ | |
9 | ↵ | 9 | ↵ | |
10 | return clone; | 10 |
| |
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.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 6 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | AbstractCategoryItemLabelGenerator clone = (AbstractCategoryItemLabelGenerator)super.clone(); |
| 1 | HighLowItemLabelGenerator clone = (HighLowItemLabelGenerator)super.clone(); | ||||||||||||||||||||
2 | if (this.numberFormat != null) |
| 4 | if (this.numberFormatter != null) | ||||||||||||||||||||
3 | clone.numberFormat = (NumberFormat)this.numberFormat.clone(); |
| 5 | clone.numberFormatter = (NumberFormat)this.numberFormatter.clone(); | ||||||||||||||||||||
4 | if (this.dateFormat != null) |
| 2 | if (this.dateFormatter != null) | ||||||||||||||||||||
5 | clone.dateFormat = (DateFormat)this.dateFormat.clone(); |
| 3 | clone.dateFormatter = (DateFormat)this.dateFormatter.clone(); | ||||||||||||||||||||
6 | return clone; |
| 6 | return clone; |
Row | Violation |
---|---|
1 | Super method call AbstractCategoryItemLabelGenerator clone=(AbstractCategoryItemLabelGenerator)super.clone(); cannot be extracted from method |
2 | Super method call HighLowItemLabelGenerator clone=(HighLowItemLabelGenerator)super.clone(); cannot be extracted from method |
3 | Expression clone.numberFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression clone.numberFormatter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression clone.numberFormat is a field being modified, and thus it cannot be parameterized |
6 | Expression clone.numberFormatter is a field being modified, and thus it cannot be parameterized |
7 | Expression clone.dateFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression clone.dateFormatter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression clone.dateFormat is a field being modified, and thus it cannot be parameterized |
10 | Expression clone.dateFormatter is a field being modified, and thus it cannot be parameterized |