File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainXYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | CombinedDomainXYPlot result = (CombinedDomainXY↵ | 1 | CombinedRangeCategoryPlot result ↵ | |
2 | Plot) super.clone();↵ | 2 | = (CombinedRangeCategoryPlot) 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 | ↵ | |||
8 | // after setting up all the subplots, the shared domain axis may need↵ | 9 | // after setting up all the subplots, the shared range axis may need ↵ | |
9 | // reconfiguring↵ | 10 | // reconfiguring↵ | |
10 | ValueAxis domainAxis = result.getDomainAxis();↵ | 11 | ValueAxis rangeAxis = result.getRangeAxis();↵ | |
11 | if (domainAxis != null) {↵ | 12 | if (rangeAxis != null) {↵ | |
12 | domainAxis.configure();↵ | 13 | rangeAxis.configure();↵ | |
13 | }↵ | 14 | }↵ | |
15 | ↵ | |||
14 | return result; | 16 |
| |
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.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) | 129.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | CombinedDomainXYPlot result = (CombinedDomainXYPlot)super.clone(); |
| 1 | CombinedRangeCategoryPlot result = (CombinedRangeCategoryPlot)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 domainAxis = result.getDomainAxis(); |
| 6 | ValueAxis rangeAxis = result.getRangeAxis(); | |||||||||||||||||||
7 | if (domainAxis != null) |
| 7 | if (rangeAxis != null) | |||||||||||||||||||
8 | domainAxis.configure(); |
| 8 | rangeAxis.configure(); | |||||||||||||||||||
9 | return result; |
| 9 | return result; |
Row | Violation |
---|---|
1 | Super method call CombinedDomainXYPlot result=(CombinedDomainXYPlot)super.clone(); cannot be extracted from method |
2 | Super method call CombinedRangeCategoryPlot result=(CombinedRangeCategoryPlot)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.getDomainAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression result.getRangeAxis() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | 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 getDomainAxis() , public org.jfree.chart.axis.ValueAxis getRangeAxis() |