File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | for (int i = 0; i < this.domainAxes.size(); i++) {↵ | 1 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | |
2 | ValueAxis axis = (ValueAxis) this.domainAxes.get(i);↵ | 2 | ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);↵ | |
3 | if (axis != null) {↵ | 3 | if (axis != null) {↵ | |
4 | ValueAxis clonedAxis = (ValueAxis) axis.clone();↵ | 4 | ValueAxis clonedAxis = (ValueAxis) axis.clone();↵ | |
5 | clone.domainAxes.set(i, clonedAxis);↵ | 5 | clone.rangeAxes.set(i, clonedAxis);↵ | |
6 | clonedAxis.setPlot(clone);↵ | 6 | clonedAxis.setPlot(clone);↵ | |
7 | clonedAxis.addChangeListener(clone);↵ | 7 | clonedAxis.addChangeListener(clone);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 29 |
Number of mapped statements | 7 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (int i = 0; i < this.domainAxes.size(); i++) |
| 12 | for (int i = 0; i < this.rangeAxes.size(); i++) | ||||||||||
4 | ValueAxis axis = (ValueAxis)this.domainAxes.get(i); |
| 13 | ValueAxis axis = (ValueAxis)this.rangeAxes.get(i); | ||||||||||
5 | if (axis != null) | 14 | if (axis != null) | |||||||||||
6 | ValueAxis clonedAxis = (ValueAxis)axis.clone(); | 15 | ValueAxis clonedAxis = (ValueAxis)axis.clone(); | |||||||||||
7 | clone.domainAxes.set(i, clonedAxis); |
| 16 | clone.rangeAxes.set(i, clonedAxis); | ||||||||||
8 | clonedAxis.setPlot(clone); | 17 | clonedAxis.setPlot(clone); | |||||||||||
9 | clonedAxis.addChangeListener(clone); | 18 | clonedAxis.addChangeListener(clone); |
Row | Violation |
---|