File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: void readObject(ObjectInputStream)
|
Method name: void zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | 1 | for (int i = 0; i < this.domainAxes.size(); i++) {↵ | |
2 | ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);↵ | 2 | ValueAxis domainAxis = (ValueAxis) this.domainAxes.get(i);↵ | |
3 | if (yAxis != null) {↵ | 3 | if (domainAxis != null) {↵ | |
4 | yAxis.setPlot(this);↵ | 4 | ↵ | |
5 | yAxis.addChangeListener(this);↵ | 5 | domainAxis.zoomRange(lowerPercent, upperPercent);↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 7 |
| |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 40.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | for (int i = 0; i < this.rangeAxes.size(); i++) |
| 1 | for (int i = 0; i < this.domainAxes.size(); i++) | ||||||||||||||||||||||||
14 | ValueAxis yAxis = (ValueAxis)this.rangeAxes.get(i); |
| 2 | ValueAxis domainAxis = (ValueAxis)this.domainAxes.get(i); | ||||||||||||||||||||||||
15 | if (yAxis != null) |
| 3 | if (domainAxis != null) | ||||||||||||||||||||||||
16 | yAxis.setPlot(this); |
| 4 | domainAxis.zoomRange(lowerPercent, upperPercent); | ||||||||||||||||||||||||
17 | yAxis.addChangeListener(this); |
| |
Row | Violation |
---|---|
1 | Expression yAxis.setPlot(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression domainAxis.zoomRange(lowerPercent,upperPercent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression yAxis.setPlot(this) is a void method call, and thus it cannot be parameterized |
4 | Expression domainAxis.zoomRange(lowerPercent,upperPercent) is a void method call, and thus it cannot be parameterized |
5 | Expression yAxis.setPlot(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression domainAxis.zoomRange(lowerPercent,upperPercent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression yAxis.setPlot(this) is a void method call, and thus it cannot be parameterized |
8 | Expression domainAxis.zoomRange(lowerPercent,upperPercent) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement yAxis.addChangeListener(this); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |