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: 12 | Number of AST nodes: 12 | |||
1 | double yleft = (y0 + y1) / 2.0 + stackLeft[0];↵ | 1 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | |
2 | float transYLeft = (float) rangeAxis.valueToJava2D(yleft,↵ | 2 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | |
3 | dataArea, edge1);↵ | 3 | dataArea, edge1);↵ | |
4 | if (orientation == PlotOrientation.VERTICAL) {↵ | 4 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
5 | left.moveTo(transX1, transY1);↵ | 5 | right.moveTo(transX1, transStack1);↵ | |
6 | left.lineTo(transX1, transStack1);↵ | 6 | right.lineTo(transX1, transY1);↵ | |
7 | left.lineTo(transXLeft, transStackLeft);↵ | 7 | right.lineTo(transXRight, transYRight);↵ | |
8 | left.lineTo(transXLeft, transYLeft);↵ | 8 | right.lineTo(transXRight, transStackRight);↵ | |
9 | }↵ | 9 | }↵ | |
10 | else {↵ | 10 | else {↵ | |
11 | left.moveTo(transY1, transX1);↵ | 11 | right.moveTo(transStack1, transX1);↵ | |
12 | left.lineTo(transStack1, transX1);↵ | 12 | right.lineTo(transY1, transX1);↵ | |
13 | left.lineTo(transStackLeft, transXLeft);↵ | 13 | right.lineTo(transYRight, transXRight);↵ | |
14 | left.lineTo(transYLeft, transXLeft);↵ | 14 | right.lineTo(transStackRight, transXRight);↵ | |
15 | }↵ | 15 | }↵ | |
16 | left.closePath(); | 16 | right.closePath(); | |
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 | 92 |
Number of mapped statements | 12 |
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) | 51.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100 | double yleft = (y0 + y1) / 2.0 + stackLeft[0]; |
| 122 | double yright = (y1 + y2) / 2.0 + stackRight[0]; | |||||||||||||||||||
101 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); |
| 123 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | |||||||||||||||||||
102 | if (orientation == PlotOrientation.VERTICAL) | 124 | if (orientation == PlotOrientation.VERTICAL) | ||||||||||||||||||||
103 | left.moveTo(transX1, transY1); |
| 125 | right.moveTo(transX1, transStack1); | |||||||||||||||||||
104 | left.lineTo(transX1, transStack1); |
| 126 | right.lineTo(transX1, transY1); | |||||||||||||||||||
105 | left.lineTo(transXLeft, transStackLeft); |
| 127 | right.lineTo(transXRight, transYRight); | |||||||||||||||||||
106 | left.lineTo(transXLeft, transYLeft); |
| 128 | right.lineTo(transXRight, transStackRight); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
107 | left.moveTo(transY1, transX1); |
| 129 | right.moveTo(transStack1, transX1); | |||||||||||||||||||
108 | left.lineTo(transStack1, transX1); |
| 130 | right.lineTo(transY1, transX1); | |||||||||||||||||||
109 | left.lineTo(transStackLeft, transXLeft); |
| 131 | right.lineTo(transYRight, transXRight); | |||||||||||||||||||
110 | left.lineTo(transYLeft, transXLeft); |
| 132 | right.lineTo(transStackRight, transXRight); | |||||||||||||||||||
111 | left.closePath(); |
| 133 | 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 |