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 (y0 >= 0.0) {↵ | 1 | if (y2 >= 0.0) {↵ | |
2 | double yleft = (y0 + y1) / 2.0 + stackLeft[1];↵ | 2 | ↵ | |
3 | float transYLeft↵ | |||
4 | = (float) rangeAxis.valueToJava2D(yleft, dataArea, edge1);↵ | |||
5 | if (orientation == PlotOrientation.VERTICAL) {↵ | 3 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
6 | left.moveTo(transX1, transY1);↵ | 4 | right.moveTo(transX1, transStack1);↵ | |
7 | left.lineTo(transX1, transStack1);↵ | 5 | right.lineTo(transX1, transY1);↵ | |
8 | left.lineTo(transXLeft, transStackLeft);↵ | 6 | right.lineTo(transXRight, transStack↵ | |
9 | left.lineTo(transXLeft, transYLeft);↵ | 7 | Right);↵ | |
10 | }↵ | 8 | }↵ | |
11 | else {↵ | 9 | else {↵ | |
12 | left.moveTo(transY1, transX1);↵ | 10 | right.moveTo(transStack1, transX1);↵ | |
13 | left.lineTo(transStack1, transX1);↵ | 11 | right.lineTo(transY1, transX1);↵ | |
14 | left.lineTo(transStackLeft, transXLeft);↵ | 12 | right.lineTo(transStackRight, transXRight);↵ | |
15 | left.lineTo(transYLeft, transXLeft↵ | 13 | }↵ | |
16 | );↵ | 14 | right.closePath();↵ | |
17 | ↵ | 15 | }↵ | |
18 | }↵ | 16 | else {↵ | |
19 | left.closePath();↵ | 17 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | |
18 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | |||
20 | }↵ | 19 | ↵ | |
21 | else {↵ | 20 | dataArea, edge1);↵ | |
22 | if (orientation == PlotOrientation.VERTICAL) {↵ | 21 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
23 | left.moveTo(transX1, transStack1);↵ | 22 | right.moveTo(transX1, transStack1);↵ | |
24 | left.lineTo(transX1, transY1);↵ | 23 | right.lineTo(transX1, transY1);↵ | |
25 | lef↵ | 24 | right.lineTo(transXRight, transYRight);↵ | |
26 | t.lineTo(transXLeft, transStackLeft);↵ | 25 | right.lineTo(transXRight, transStackRight);↵ | |
27 | }↵ | 26 | }↵ | |
28 | else {↵ | 27 | else {↵ | |
29 | left.moveTo(transStack1, transX1);↵ | 28 | right.moveTo(transStack1, transX1);↵ | |
30 | left.lineTo(transY1, transX1);↵ | 29 | right.lineTo(transY1, transX1);↵ | |
31 | lef↵ | 30 | right.lineTo(transYRight, transXRight);↵ | |
32 | t.lineTo(transStackLeft, transXLeft);↵ | 31 | right.lineTo(transStackRight, transXRight);↵ | |
33 | }↵ | 32 | }↵ | |
34 | left.closePath();↵ | 33 | right.closePath();↵ | |
35 | } | 34 |
| |
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.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) | 27.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45 | if (y0 >= 0.0) |
| 113 | if (y2 >= 0.0) | ||||||||||||||||||||||
46 | double yleft = (y0 + y1) / 2.0 + stackLeft[1]; |
| 122 | double yright = (y1 + y2) / 2.0 + stackRight[0]; | ||||||||||||||||||||||
47 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); |
| 123 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | ||||||||||||||||||||||
48 | if (orientation == PlotOrientation.VERTICAL) | 124 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||||||||||||||
49 | left.moveTo(transX1, transY1); |
| 125 | right.moveTo(transX1, transStack1); | ||||||||||||||||||||||
50 | left.lineTo(transX1, transStack1); |
| 126 | right.lineTo(transX1, transY1); | ||||||||||||||||||||||
51 | left.lineTo(transXLeft, transStackLeft); |
| 127 | right.lineTo(transXRight, transYRight); | ||||||||||||||||||||||
52 | left.lineTo(transXLeft, transYLeft); |
| 128 | right.lineTo(transXRight, transStackRight); | ||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
53 | left.moveTo(transY1, transX1); |
| 129 | right.moveTo(transStack1, transX1); | ||||||||||||||||||||||
54 | left.lineTo(transStack1, transX1); |
| 130 | right.lineTo(transY1, transX1); | ||||||||||||||||||||||
55 | left.lineTo(transStackLeft, transXLeft); |
| 131 | right.lineTo(transYRight, transXRight); | ||||||||||||||||||||||
56 | left.lineTo(transYLeft, transXLeft); |
| 132 | right.lineTo(transStackRight, transXRight); | ||||||||||||||||||||||
57 | left.closePath(); |
| 133 | right.closePath(); | ||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
58 | if (orientation == PlotOrientation.VERTICAL) | 114 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||||||||||||||
59 | left.moveTo(transX1, transStack1); |
| 115 | right.moveTo(transX1, transStack1); | ||||||||||||||||||||||
60 | left.lineTo(transX1, transY1); |
| 116 | right.lineTo(transX1, transY1); | ||||||||||||||||||||||
61 | left.lineTo(transXLeft, transStackLeft); |
| 117 | right.lineTo(transXRight, transStackRight); | ||||||||||||||||||||||
else | else | |||||||||||||||||||||||||
62 | left.moveTo(transStack1, transX1); |
| 118 | right.moveTo(transStack1, transX1); | ||||||||||||||||||||||
63 | left.lineTo(transY1, transX1); |
| 119 | right.lineTo(transY1, transX1); | ||||||||||||||||||||||
64 | left.lineTo(transStackLeft, transXLeft); |
| 120 | right.lineTo(transStackRight, transXRight); | ||||||||||||||||||||||
65 | left.closePath(); |
| 121 | right.closePath(); |
Row | Violation |
---|---|
1 | Expression transYRight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression transYLeft cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression transYRight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression transYLeft cannot be parameterized, because it has dependencies to/from statements that will be extracted |