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: 5 | Number of AST nodes: 5 | |||
1 | double x;↵ | 1 | double y;↵ | |
2 | if (orient == PlotOrientation.VERTICAL) {↵ | 2 | if (orient == PlotOrientation.VERTICAL) {↵ | |
3 | x = domainAxis.java2DToValue(anchor.getX(), dataArea,↵ | 3 | y = rangeAxis.java2DToValue(anchor.getY(), dataArea,↵ | |
4 | getDomainAxisEdge());↵ | 4 | getRangeAxisEdge());↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | x = domainAxis.java2DToValue(anchor.getY(), dataArea,↵ | 7 | y = rangeAxis.java2DToValue(anchor.getX(), dataArea,↵ | |
8 | getDomainAxisEdge());↵ | 8 | getRangeAxisEdge());↵ | |
9 | }↵ | 9 | }↵ | |
10 | crosshairState.setAnchorX(x); | 10 | crosshairState.setAnchorY(y); | |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 14 |
Number of mapped statements | 5 |
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) | 46.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27 | double x; |
| 34 | double y; | |||||||||||||||||||||
28 | if (orient == PlotOrientation.VERTICAL) | 35 | if (orient == PlotOrientation.VERTICAL) | ||||||||||||||||||||||
29 | x = domainAxis.java2DToValue(anchor.getX(), dataArea, getDomainAxisEdge()); |
| 36 | y = rangeAxis.java2DToValue(anchor.getY(), dataArea, getRangeAxisEdge()); | |||||||||||||||||||||
else | else | ||||||||||||||||||||||||
30 | x = domainAxis.java2DToValue(anchor.getY(), dataArea, getDomainAxisEdge()); |
| 37 | y = rangeAxis.java2DToValue(anchor.getX(), dataArea, getRangeAxisEdge()); | |||||||||||||||||||||
31 | crosshairState.setAnchorX(x); |
| 38 | crosshairState.setAnchorY(y); |
Row | Violation |
---|---|
1 | Expression getDomainAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression getRangeAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression getDomainAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
4 | Expression getRangeAxisEdge() is a method call throwing exception(s) that should be caught by a try block that will be extracted |
5 | Expression crosshairState.setAnchorX(x) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression crosshairState.setAnchorY(y) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression crosshairState.setAnchorX(x) is a void method call, and thus it cannot be parameterized |
8 | Expression crosshairState.setAnchorY(y) is a void method call, and thus it cannot be parameterized |