File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/StandardEntityCollection.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PlotRenderingInfo.java | |||
Method name: Object clone()
|
Method name: Object clone()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (int i = 0; i < this.entities.size(); i++) {↵ | 1 | for (int i = 0; i < this.subplotInfo.size(); i++) {↵ | |
2 | ChartEntity entity = (ChartEntity) this.entities↵ | 2 | PlotRenderingInfo info ↵ | |
3 | .get(i);↵ | 3 | = (PlotRenderingInfo) this.subplotInfo.get(i);↵ | |
4 | clone.entities.add(entity.clone());↵ | 4 | clone.subplotInfo.add(info.clone());↵ | |
5 | } | 5 |
| |
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (int i = 0; i < this.entities.size(); i++) |
| 7 | for (int i = 0; i < this.subplotInfo.size(); i++) | ||||||||||
4 | ChartEntity entity = (ChartEntity)this.entities.get(i); |
| | |||||||||||
5 | clone.entities.add(entity.clone()); |
| | |||||||||||
|
| 8 | PlotRenderingInfo info = (PlotRenderingInfo)this.subplotInfo.get(i); | |||||||||||
|
| 9 | clone.subplotInfo.add(info.clone()); |
Row | Violation |
---|---|
1 | Unmatched statement ChartEntity entity=(ChartEntity)this.entities.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement clone.entities.add(entity.clone()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement PlotRenderingInfo info=(PlotRenderingInfo)this.subplotInfo.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement clone.subplotInfo.add(info.clone()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |