File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/AbstractPieItemLabelGenerator.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 | AbstractPieItemLabelGenerator clone↵ | 1 | HighLowItemLabelGenerator clone ↵ | |
2 | = (AbstractPieItemLabelGenerator) 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.percentFormat != null) {↵ | 6 | if (this.numberFormatter != null) {↵ | |
7 | clone.percentFormat = (NumberFormat) this.percentFormat.clone();↵ | 7 | clone.numberFormatter = (NumberFormat) this.numberFormatter.clone();↵ | |
8 | }↵ | 8 | }↵ | |
9 | ↵ | |||
9 | 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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 3.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | HighLowItemLabelGenerator clone = (HighLowItemLabelGenerator)super.clone(); | ||||||||||||||||||||||||||||||||||
1 | AbstractPieItemLabelGenerator clone = (AbstractPieItemLabelGenerator)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.percentFormat != null) |
| 2 | if (this.dateFormatter != null) | ||||||||||||||||||||||||||||||||
5 | clone.percentFormat = (NumberFormat)this.percentFormat.clone(); |
| 3 | clone.dateFormatter = (DateFormat)this.dateFormatter.clone(); | ||||||||||||||||||||||||||||||||
| 6 | return clone; | ||||||||||||||||||||||||||||||||||
6 | return clone; | |
Row | Violation |
---|---|
1 | Type java.text.NumberFormat of variable clone.numberFormat does not match with type java.text.NumberFormat of variable clone.numberFormatter |
2 | Expression clone.numberFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression clone.numberFormatter cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression clone.numberFormat is a field being modified, and thus it cannot be parameterized |
5 | Expression clone.numberFormatter is a field being modified, and thus it cannot be parameterized |
6 | Type java.text.NumberFormat of variable clone.percentFormat does not match with type java.text.DateFormat of variable clone.dateFormatter |
7 | Expression clone.percentFormat 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.percentFormat 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 |
11 | Expression (NumberFormat)this.percentFormat.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression (DateFormat)this.dateFormatter.clone() cannot be parameterized, because it has dependencies to/from statements that will be extracted |