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