File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
Method name: void draw(Graphics2D, Rectangle2D, Point2D, PlotState, PlotRenderingInfo)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (!this.domainCrosshairLockedOnData && anchor != null) {↵ | 1 | if (!this.rangeCrosshairLockedOnData && anchor != null) {↵ | |
2 | double xx;↵ | 2 | double yy;↵ | |
3 | if (orient == PlotOrientation.VERTICAL) {↵ | 3 | if (orient == PlotOrientation.VERTICAL) {↵ | |
4 | xx = xAxis.java2DToValue(anchor.getX(), dataArea, xAxisEdge);↵ | 4 | yy = yAxis.java2DToValue(anchor.getY(), dataArea, yAxisEdge);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | xx = xAxis.java2DToValue(anchor.getY(), dataArea, xAxisEdge);↵ | 7 | yy = yAxis.java2DToValue(anchor.getX(), dataArea, yAxisEdge);↵ | |
8 | }↵ | 8 | }↵ | |
9 | crosshairState.setCrosshairX(xx);↵ | 9 | crosshairState.setCrosshairY(yy);↵ | |
10 | } | 10 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 6 |
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) | 12.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
108 | if (!this.domainCrosshairLockedOnData && anchor != null) |
| 123 | if (!this.rangeCrosshairLockedOnData && anchor != null) | |||||||||||||||||||||
109 | double xx; |
| 124 | double yy; | |||||||||||||||||||||
110 | if (orient == PlotOrientation.VERTICAL) | 125 | if (orient == PlotOrientation.VERTICAL) | ||||||||||||||||||||||
111 | xx = xAxis.java2DToValue(anchor.getX(), dataArea, xAxisEdge); |
| 126 | yy = yAxis.java2DToValue(anchor.getY(), dataArea, yAxisEdge); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
112 | xx = xAxis.java2DToValue(anchor.getY(), dataArea, xAxisEdge); |
| 127 | yy = yAxis.java2DToValue(anchor.getX(), dataArea, yAxisEdge); | |||||||||||||||||||||
113 | crosshairState.setCrosshairX(xx); |
| 128 | crosshairState.setCrosshairY(yy); |
Row | Violation |
---|---|
1 | Expression anchor.getX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression anchor.getY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression anchor.getY() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression anchor.getX() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression crosshairState.setCrosshairX(xx) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression crosshairState.setCrosshairY(yy) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression crosshairState.setCrosshairX(xx) is a void method call, and thus it cannot be parameterized |
8 | Expression crosshairState.setCrosshairY(yy) is a void method call, and thus it cannot be parameterized |