File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeXYPlot.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | CombinedRangeCategoryPlot result ↵ | 1 | CombinedRangeXYPlot result ↵ | |
2 | = (CombinedRangeCategoryPlot) super.clone(); ↵ | 2 | = (CombinedRangeXYPlot) super.clone();↵ | |
3 | result.subplots = (List) ObjectUtilities.deepClone(this.subplots);↵ | 3 | result.subplots = (List) ObjectUtilities.deepClone(this.subplots);↵ | |
4 | for (Iterator it = result.subplots.iterator(); it.hasNext();) {↵ | 4 | for (Iterator it = result.subplots.iterator(); it.hasNext();) {↵ | |
5 | Plot child = (Plot) it.next();↵ | 5 | Plot child = (Plot) it.next();↵ | |
6 | child.setParent(result);↵ | 6 | child.setParent(result);↵ | |
7 | }↵ | 7 | }↵ | |
8 | ↵ | |||
9 | // after setting up all the subplots, the shared range axis may need ↵ | 8 | // after setting up all the subplots, the shared range axis may need↵ | |
10 | // reconfiguring↵ | 9 | // reconfiguring↵ | |
11 | ValueAxis rangeAxis = result.getRangeAxis();↵ | 10 | ValueAxis rangeAxis = result.getRangeAxis();↵ | |
12 | if (rangeAxis != null) {↵ | 11 | if (rangeAxis != null) {↵ | |
13 | rangeAxis.configure();↵ | 12 | rangeAxis.configure();↵ | |
14 | }↵ | 13 | }↵ | |
15 | ↵ | |||
16 | return result; | 14 |
| |
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) | 1.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 23 |
Number of mapped statements | 9 |
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) | 29.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | CombinedRangeCategoryPlot result = (CombinedRangeCategoryPlot)super.clone(); |
| 1 | CombinedRangeXYPlot result = (CombinedRangeXYPlot)super.clone(); | ||||||||||||||||||
2 | result.subplots = (List)ObjectUtilities.deepClone(this.subplots); |
| 2 | result.subplots = (List)ObjectUtilities.deepClone(this.subplots); | ||||||||||||||||||
3 | for (Iterator it = result.subplots.iterator(); it.hasNext(); ) |
| 3 | for (Iterator it = result.subplots.iterator(); it.hasNext(); ) | ||||||||||||||||||
4 | Plot child = (Plot)it.next(); | 4 | Plot child = (Plot)it.next(); | |||||||||||||||||||
5 | child.setParent(result); |
| 5 | child.setParent(result); | ||||||||||||||||||
6 | ValueAxis rangeAxis = result.getRangeAxis(); |
| 6 | ValueAxis rangeAxis = result.getRangeAxis(); | ||||||||||||||||||
7 | if (rangeAxis != null) | 7 | if (rangeAxis != null) | |||||||||||||||||||
8 | rangeAxis.configure(); | 8 | rangeAxis.configure(); | |||||||||||||||||||
9 | return result; |
| 9 | return result; |
Row | Violation |
---|---|
1 | Super method call CombinedRangeCategoryPlot result=(CombinedRangeCategoryPlot)super.clone(); cannot be extracted from method |
2 | Super method call CombinedRangeXYPlot result=(CombinedRangeXYPlot)super.clone(); cannot be extracted from method |
3 | Expression result.subplots cannot be unified with expression result.subplots , because common superclass org.jfree.chart.plot.Plot does not declare member(s) private List#RAW subplots |
4 | Expression result.subplots cannot be unified with expression result.subplots , because common superclass org.jfree.chart.plot.Plot does not declare member(s) private List#RAW subplots |
5 | Expression result cannot be unified with expression result , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public org.jfree.chart.axis.ValueAxis getRangeAxis() |