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 zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
|
Method name: void readObject(ObjectInputStream)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | 1 | for (int i = 0; i < domainAxisCount; i++) {↵ | |
2 | ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);↵ | 2 | Axis axis = (Axis) this.domainAxes.get(i);↵ | |
3 | if (rangeAxis != null) {↵ | 3 | if (axis != null) {↵ | |
4 | rangeAxis.zoomRange(lowerPercent, upperPercent↵ | 4 | axis.setPlot(this);↵ | |
5 | );↵ | 5 | axis.addChangeListener(this);↵ | |
6 | }↵ | 6 | }↵ | |
7 | } | 7 |
| |
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.4 |
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 | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 207.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < this.rangeAxes.size(); i++) |
| 21 | for (int i = 0; i < domainAxisCount; i++) | ||||||||||||||||||||||||||||
2 | ValueAxis rangeAxis = (ValueAxis)this.rangeAxes.get(i); |
| 22 | Axis axis = (Axis)this.domainAxes.get(i); | ||||||||||||||||||||||||||||
3 | if (rangeAxis != null) |
| 23 | if (axis != null) | ||||||||||||||||||||||||||||
4 | rangeAxis.zoomRange(lowerPercent, upperPercent); |
| 24 | axis.setPlot(this); | ||||||||||||||||||||||||||||
|
| 25 | axis.addChangeListener(this); |
Row | Violation |
---|---|
1 | Expression (ValueAxis)this.rangeAxes.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (Axis)this.domainAxes.get(i) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression rangeAxis.zoomRange(lowerPercent,upperPercent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression axis.setPlot(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression rangeAxis.zoomRange(lowerPercent,upperPercent) is a void method call, and thus it cannot be parameterized |
6 | Expression axis.setPlot(this) is a void method call, and thus it cannot be parameterized |
7 | Expression rangeAxis cannot be unified with expression axis , because common superclass org.jfree.chart.axis.Axis does not declare member(s) public void zoomRange(double, double) |
8 | Expression rangeAxis.zoomRange(lowerPercent,upperPercent) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression axis.setPlot(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression rangeAxis.zoomRange(lowerPercent,upperPercent) is a void method call, and thus it cannot be parameterized |
11 | Expression axis.setPlot(this) is a void method call, and thus it cannot be parameterized |
12 | Unmatched statement axis.addChangeListener(this); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
13 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables axis |