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, PlotRenderingInfo, Point2D, boolean)
|
Method name: void zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | 1 | for (int i = 0; i < this.rangeAxes.size(); i++) {↵ | |
2 | ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);↵ | 2 | ValueAxis rangeAxis = (ValueAxis) this.rangeAxes.get(i);↵ | |
3 | if (rangeAxis != null) {↵ | 3 | if (rangeAxis != null) {↵ | |
4 | if (useAnchor) {↵ | 4 | if (useAnchor) {↵ | |
5 | // get the relevant source coordinate given the plot↵ | 5 | // get the relevant source coordinate given the plot↵ | |
6 | // orientation↵ | 6 | // orientation↵ | |
7 | double sourceY = source.getY();↵ | 7 | double sourceY = source.getY();↵ | |
8 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | 8 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | |
9 | sourceY = source.getX();↵ | 9 | sourceY = source.getX();↵ | |
10 | }↵ | 10 | }↵ | |
11 | double anchorY = rangeAxis.java2DToValue(sourceY,↵ | 11 | double anchorY = rangeAxis.java2DToValue(sourceY,↵ | |
12 | info.getDataArea(), getRangeAxisEdge());↵ | 12 | info.getDataArea(), getRangeAxisEdge());↵ | |
13 | rangeAxis.resizeRange(factor, anchorY);↵ | 13 | rangeAxis.resizeRange(factor, anchorY);↵ | |
14 | }↵ | 14 | }↵ | |
15 | else {↵ | 15 | else {↵ | |
16 | rangeAxis.resizeRange(factor);↵ | 16 | rangeAxis.resizeRange(factor);↵ | |
17 | }↵ | 17 | }↵ | |
18 | }↵ | 18 | }↵ | |
19 | } | 19 |
| |
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) | 1.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 34 |
Number of mapped statements | 10 |
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) | 169.5 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | for (int i = 0; i < this.rangeAxes.size(); i++) | 1 | for (int i = 0; i < this.rangeAxes.size(); i++) | |
2 | ValueAxis rangeAxis = (ValueAxis)this.rangeAxes.get(i); | 2 | ValueAxis rangeAxis = (ValueAxis)this.rangeAxes.get(i); | |
3 | if (rangeAxis != null) | 3 | if (rangeAxis != null) | |
4 | if (useAnchor) | 4 | if (useAnchor) | |
5 | double sourceY = source.getY(); | 5 | double sourceY = source.getY(); | |
6 | if (this.orientation == PlotOrientation.HORIZONTAL) | 6 | if (this.orientation == PlotOrientation.HORIZONTAL) | |
7 | sourceY = source.getX(); | 7 | sourceY = source.getX(); | |
8 | double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge()); | 8 | double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge()); | |
9 | rangeAxis.resizeRange(factor, anchorY); | 9 | rangeAxis.resizeRange(factor, anchorY); | |
else | else | |||
10 | rangeAxis.resizeRange(factor); | 10 | rangeAxis.resizeRange(factor); |
Row | Violation |
---|