File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer2.java | |||
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 21 | Number of AST nodes: 21 | |||
1 | if (y2 >= 0.0) {↵ | 1 | if (y2 >= 0.0) {↵ | |
2 | double yright = (y1 + y2) / 2.0 + stackRight[1];↵ | 2 | ↵ | |
3 | float transYRight↵ | |||
4 | = (float) rangeAxis.valueToJava2D(yright, dataArea, edge1);↵ | |||
5 | if (orientation == PlotOrientation.VERTICAL) {↵ | 3 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
6 | right.moveTo(transX1, transStack1);↵ | 4 | right.moveTo(transX1, transStack1);↵ | |
7 | right.lineTo(transX1, transY1);↵ | 5 | right.lineTo(transX1, transY1);↵ | |
8 | right.lineTo(transXRight, transYRight);↵ | |||
9 | right.lineTo(transXRight, transStackRight);↵ | 6 | right.lineTo(transXRight, transStackRight);↵ | |
10 | }↵ | 7 | }↵ | |
11 | else {↵ | 8 | else {↵ | |
12 | right.moveTo(transStack1, transX1);↵ | 9 | right.moveTo(transStack1, transX1);↵ | |
13 | right.lineTo(transY1, transX1);↵ | 10 | right.lineTo(transY1, transX1);↵ | |
14 | right.lineTo(transYRight, transXRight);↵ | 11 | right.lineTo(transStackRight, transXRight);↵ | |
15 | ↵ | 12 | }↵ | |
16 | right.lineTo(transStackRight, transXRight);↵ | 13 | right.closePath();↵ | |
17 | ↵ | 14 | }↵ | |
18 | }↵ | 15 | else {↵ | |
19 | right.closePath();↵ | 16 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | |
17 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | |||
20 | }↵ | 18 | ↵ | |
21 | else {↵ | 19 | dataArea, edge1);↵ | |
22 | if (orientation == PlotOrientation.VERTICAL) {↵ | 20 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
23 | right.moveTo(transX1, transStack1);↵ | 21 | right.moveTo(transX1, transStack1);↵ | |
24 | right.lineTo(transX1, transY1);↵ | 22 | right.lineTo(transX1, transY1);↵ | |
23 | right.lineTo(transXRight, transYRight);↵ | |||
25 | right.lineTo(transXRight, transStackRight);↵ | 24 | right.lineTo(transXRight, transStackRight);↵ | |
26 | }↵ | 25 | }↵ | |
27 | else {↵ | 26 | else {↵ | |
28 | right.moveTo(transStack1, transX1);↵ | 27 | right.moveTo(transStack1, transX1);↵ | |
29 | right.lineTo(transY1, transX1);↵ | 28 | right.lineTo(transY1, transX1);↵ | |
29 | right.lineTo(transYRight, transXRight);↵ | |||
30 | right.lineTo(transStackRight, transXRight);↵ | 30 | right.lineTo(transStackRight, transXRight);↵ | |
31 | }↵ | 31 | }↵ | |
32 | right.closePath();↵ | 32 | right.closePath();↵ | |
33 | } | 33 |
| |
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 205 |
Number of mapped statements | 21 |
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) | 22.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67 | if (y2 >= 0.0) |
| 113 | if (y2 >= 0.0) | ||||||||||
68 | double yright = (y1 + y2) / 2.0 + stackRight[1]; |
| 122 | double yright = (y1 + y2) / 2.0 + stackRight[0]; | ||||||||||
69 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | 123 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | |||||||||||
70 | if (orientation == PlotOrientation.VERTICAL) | 124 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||
71 | right.moveTo(transX1, transStack1); | 125 | right.moveTo(transX1, transStack1); | |||||||||||
72 | right.lineTo(transX1, transY1); | 126 | right.lineTo(transX1, transY1); | |||||||||||
73 | right.lineTo(transXRight, transYRight); | 127 | right.lineTo(transXRight, transYRight); | |||||||||||
74 | right.lineTo(transXRight, transStackRight); | 128 | right.lineTo(transXRight, transStackRight); | |||||||||||
else | else | |||||||||||||
75 | right.moveTo(transStack1, transX1); | 129 | right.moveTo(transStack1, transX1); | |||||||||||
76 | right.lineTo(transY1, transX1); | 130 | right.lineTo(transY1, transX1); | |||||||||||
77 | right.lineTo(transYRight, transXRight); | 131 | right.lineTo(transYRight, transXRight); | |||||||||||
78 | right.lineTo(transStackRight, transXRight); | 132 | right.lineTo(transStackRight, transXRight); | |||||||||||
79 | right.closePath(); | 133 | right.closePath(); | |||||||||||
else | else | |||||||||||||
80 | if (orientation == PlotOrientation.VERTICAL) | 114 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||
81 | right.moveTo(transX1, transStack1); | 115 | right.moveTo(transX1, transStack1); | |||||||||||
82 | right.lineTo(transX1, transY1); | 116 | right.lineTo(transX1, transY1); | |||||||||||
83 | right.lineTo(transXRight, transStackRight); | 117 | right.lineTo(transXRight, transStackRight); | |||||||||||
else | else | |||||||||||||
84 | right.moveTo(transStack1, transX1); | 118 | right.moveTo(transStack1, transX1); | |||||||||||
85 | right.lineTo(transY1, transX1); | 119 | right.lineTo(transY1, transX1); | |||||||||||
86 | right.lineTo(transStackRight, transXRight); | 120 | right.lineTo(transStackRight, transXRight); | |||||||||||
87 | right.closePath(); | 121 | right.closePath(); |
Row | Violation |
---|