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 (y0 >= 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 | left.moveTo(transX1, transStack1);↵ | |
7 | left.lineTo(transX1, transStack1);↵ | 5 | left.lineTo(transX1, transY1);↵ | |
8 | left.lineTo(transXLeft, transStackLeft);↵ | 6 | left.lineTo(transXLeft, transStackLeft);↵ | |
9 | left.lineTo(transXLeft, transYLeft);↵ | 7 | ↵ | |
10 | }↵ | 8 | }↵ | |
11 | else {↵ | 9 | else {↵ | |
12 | left.moveTo(transY1, transX1);↵ | 10 | left.moveTo(transStack1, transX1);↵ | |
13 | left.lineTo(transStack1, transX1);↵ | 11 | left.lineTo(transY1, transX1);↵ | |
14 | left.lineTo(transStackLeft, transXLeft);↵ | 12 | left.lineTo(transStackLeft, transXLeft);↵ | |
15 | left.lineTo(transYLeft, transXLeft);↵ | 13 | ↵ | |
16 | ↵ | 14 | }↵ | |
15 | left.clone();↵ | |||
16 | }↵ | |||
17 | }↵ | 17 | else {↵ | |
18 | left.closePath();↵ | 18 | double yleft = (y0 + y1) / 2.0 + stackLeft[0];↵ | |
19 | float transYLeft = (float) rangeAxis.valueToJava2D(yleft,↵ | |||
19 | }↵ | 20 | ↵ | |
20 | else {↵ | 21 | dataArea, edge1);↵ | |
21 | if (orientation == PlotOrientation.VERTICAL) {↵ | 22 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
22 | left.moveTo(transX1, transStack1);↵ | 23 | left.moveTo(transX1, transY1);↵ | |
23 | left.lineTo(transX1, transY1);↵ | 24 | left.lineTo(transX1, transStack1);↵ | |
24 | left.lineTo(transXLeft, transStackLeft);↵ | 25 | left.lineTo(transXLeft, transStackLeft);↵ | |
25 | ↵ | 26 | left.lineTo(transXLeft, transYLeft);↵ | |
26 | }↵ | 27 | }↵ | |
27 | else {↵ | 28 | else {↵ | |
28 | left.moveTo(transStack1, transX1);↵ | 29 | left.moveTo(transY1, transX1);↵ | |
29 | left.lineTo(transY1, transX1);↵ | 30 | left.lineTo(transStack1, transX1);↵ | |
30 | left.lineTo(transStackLeft, transXLeft);↵ | 31 | left.lineTo(transStackLeft, transXLeft);↵ | |
31 | ↵ | 32 | left.lineTo(transYLeft, transXLeft);↵ | |
32 | }↵ | 33 | }↵ | |
33 | left.closePath();↵ | 34 | left.closePath();↵ | |
34 | } | 35 |
| |
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 | 20 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 87.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45 | if (y0 >= 0.0) |
| 91 | if (y0 >= 0.0) | ||||||||||
46 | double yleft = (y0 + y1) / 2.0 + stackLeft[1]; |
| 100 | double yleft = (y0 + y1) / 2.0 + stackLeft[0]; | ||||||||||
47 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); | 101 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); | |||||||||||
48 | if (orientation == PlotOrientation.VERTICAL) | 102 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||
49 | left.moveTo(transX1, transY1); | 103 | left.moveTo(transX1, transY1); | |||||||||||
50 | left.lineTo(transX1, transStack1); | 104 | left.lineTo(transX1, transStack1); | |||||||||||
51 | left.lineTo(transXLeft, transStackLeft); | 105 | left.lineTo(transXLeft, transStackLeft); | |||||||||||
52 | left.lineTo(transXLeft, transYLeft); | 106 | left.lineTo(transXLeft, transYLeft); | |||||||||||
else | else | |||||||||||||
53 | left.moveTo(transY1, transX1); | 107 | left.moveTo(transY1, transX1); | |||||||||||
54 | left.lineTo(transStack1, transX1); | 108 | left.lineTo(transStack1, transX1); | |||||||||||
55 | left.lineTo(transStackLeft, transXLeft); | 109 | left.lineTo(transStackLeft, transXLeft); | |||||||||||
56 | left.lineTo(transYLeft, transXLeft); | 110 | left.lineTo(transYLeft, transXLeft); | |||||||||||
57 | left.closePath(); | 111 | left.closePath(); | |||||||||||
else | else | |||||||||||||
58 | if (orientation == PlotOrientation.VERTICAL) | 92 | if (orientation == PlotOrientation.VERTICAL) | |||||||||||
59 | left.moveTo(transX1, transStack1); | 93 | left.moveTo(transX1, transStack1); | |||||||||||
60 | left.lineTo(transX1, transY1); | 94 | left.lineTo(transX1, transY1); | |||||||||||
61 | left.lineTo(transXLeft, transStackLeft); | 95 | left.lineTo(transXLeft, transStackLeft); | |||||||||||
else | else | |||||||||||||
62 | left.moveTo(transStack1, transX1); | 96 | left.moveTo(transStack1, transX1); | |||||||||||
63 | left.lineTo(transY1, transX1); | 97 | left.lineTo(transY1, transX1); | |||||||||||
64 | left.lineTo(transStackLeft, transXLeft); | 98 | left.lineTo(transStackLeft, transXLeft); | |||||||||||
65 | left.closePath(); |
| | |||||||||||
| 99 | left.clone(); |
Row | Violation |
---|---|
1 | Unmatched statement left.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |