File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedAreaRenderer.java | |||
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | if (y0 >= 0.0) {↵ | 1 | if (y2 >= 0.0) {↵ | |
2 | double yleft = (y0 + y1) / 2.0 + stackLeft[1];↵ | 2 | double yright = (y1 + y2) / 2.0 + stackRight[1];↵ | |
3 | float transYLeft↵ | 3 | float transYRight↵ | |
4 | = (float) rangeAxis.valueToJava2D(yleft, dataArea, edge1);↵ | 4 | = (float) rangeAxis.valueToJava2D(yright, dataArea, edge1);↵ | |
5 | left.moveTo((float) xx1, transY1);↵ | 5 | right.moveTo((float) xx1, transStack1);↵ | |
6 | left.lineTo((float) xx1, transStack1);↵ | 6 | right.lineTo((float) xx1, transY1);↵ | |
7 | left.lineTo((float) xxLeft, transStackLeft);↵ | 7 | right.lineTo((float) xxRight, transYRight);↵ | |
8 | left.lineTo((float) xxLeft, transYLeft);↵ | 8 | right.lineTo((float) xxRight, transStackRight);↵ | |
9 | left.closePath();↵ | 9 | right.closePath();↵ | |
10 | }↵ | 10 | }↵ | |
11 | else {↵ | 11 | else {↵ | |
12 | left.moveTo((float) xx1, transStack1);↵ | 12 | right.moveTo((float) xx1, transStack1);↵ | |
13 | left.lineTo((float) xx1, transY1);↵ | 13 | right.lineTo((float) xx1, transY1);↵ | |
14 | left.lineTo((float) xxLeft, transStackLeft);↵ | 14 | right.lineTo((float) xxRight, transStackRight);↵ | |
15 | left.closePath();↵ | 15 | right.closePath();↵ | |
16 | } | 16 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 145 |
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) | 17.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36 | if (y0 >= 0.0) |
| 49 | if (y2 >= 0.0) | |||||||||||||||||||
37 | double yleft = (y0 + y1) / 2.0 + stackLeft[1]; |
| 50 | double yright = (y1 + y2) / 2.0 + stackRight[1]; | |||||||||||||||||||
38 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); |
| 51 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | |||||||||||||||||||
39 | left.moveTo((float)xx1, transY1); |
| 52 | right.moveTo((float)xx1, transStack1); | |||||||||||||||||||
40 | left.lineTo((float)xx1, transStack1); |
| 53 | right.lineTo((float)xx1, transY1); | |||||||||||||||||||
41 | left.lineTo((float)xxLeft, transStackLeft); |
| 54 | right.lineTo((float)xxRight, transYRight); | |||||||||||||||||||
42 | left.lineTo((float)xxLeft, transYLeft); |
| 55 | right.lineTo((float)xxRight, transStackRight); | |||||||||||||||||||
43 | left.closePath(); |
| 56 | right.closePath(); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
44 | left.moveTo((float)xx1, transStack1); |
| 57 | right.moveTo((float)xx1, transStack1); | |||||||||||||||||||
45 | left.lineTo((float)xx1, transY1); |
| 58 | right.lineTo((float)xx1, transY1); | |||||||||||||||||||
46 | left.lineTo((float)xxLeft, transStackLeft); |
| 59 | right.lineTo((float)xxRight, transStackRight); | |||||||||||||||||||
47 | left.closePath(); |
| 60 | 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 |