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 zoomDomainAxes(double, PlotRenderingInfo, Point2D, boolean)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (rangeAxis != null) {↵ | 1 | if (domainAxis != null) {↵ | |
2 | if (useAnchor) {↵ | 2 | if (useAnchor) {↵ | |
3 | // get the relevant source coordinate given the plot↵ | 3 | // get the relevant source coordinate given the plot↵ | |
4 | // orientation↵ | 4 | // orientation↵ | |
5 | double sourceY = source.getY();↵ | 5 | double sourceX = source.getX();↵ | |
6 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | 6 | if (this.orientation == PlotOrientation.HORIZONTAL) {↵ | |
7 | sourceY = source.getX();↵ | 7 | sourceX = source.getY();↵ | |
8 | }↵ | 8 | }↵ | |
9 | double anchorY = rangeAxis.java2DToValue(sourceY,↵ | 9 | double anchorX = domainAxis.java2DToValue(sourceX,↵ | |
10 | info.getDataArea(), getRangeAxisEdge());↵ | 10 | info.getDataArea(), getDomainAxisEdge());↵ | |
11 | rangeAxis.resizeRange(factor, anchorY);↵ | 11 | domainAxis.resizeRange(factor, anchorX);↵ | |
12 | }↵ | 12 | }↵ | |
13 | else {↵ | 13 | else {↵ | |
14 | rangeAxis.resizeRange(factor);↵ | 14 | domainAxis.resizeRange(factor);↵ | |
15 | }↵ | 15 | }↵ | |
16 | } | 16 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 31 |
Number of mapped statements | 8 |
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) | 238.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (rangeAxis != null) |
| 3 | if (domainAxis != null) | |||||||||||||||||||||
4 | if (useAnchor) | 4 | if (useAnchor) | ||||||||||||||||||||||
5 | double sourceY = source.getY(); |
| 5 | double sourceX = source.getX(); | |||||||||||||||||||||
6 | if (this.orientation == PlotOrientation.HORIZONTAL) | 6 | if (this.orientation == PlotOrientation.HORIZONTAL) | ||||||||||||||||||||||
7 | sourceY = source.getX(); |
| 7 | sourceX = source.getY(); | |||||||||||||||||||||
8 | double anchorY = rangeAxis.java2DToValue(sourceY, info.getDataArea(), getRangeAxisEdge()); |
| 8 | double anchorX = domainAxis.java2DToValue(sourceX, info.getDataArea(), getDomainAxisEdge()); | |||||||||||||||||||||
9 | rangeAxis.resizeRange(factor, anchorY); |
| 9 | domainAxis.resizeRange(factor, anchorX); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
10 | rangeAxis.resizeRange(factor); |
| 10 | domainAxis.resizeRange(factor); |
Row | Violation |
---|---|
1 | Expression getRangeAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression getDomainAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |