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 (y2 >= 0.0) {↵ | 1 | if (y0 >= 0.0) {↵ | |
2 | right.moveTo((float) xx1, transStack1);↵ | 2 | left.moveTo((float) xx1, transStack1);↵ | |
3 | right.lineTo((float) xx1, transY1);↵ | 3 | left.lineTo((float) xx1, transY1);↵ | |
4 | right.lineTo((float) xxRight, transStackRight);↵ | 4 | left.lineTo((float) xxLeft, transStackLeft);↵ | |
5 | right.closePath();↵ | 5 | left.clone();↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | 8 | double yleft = (y0 + y1) / 2.0 + stackLeft[0];↵ | |
9 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | 9 | float transYLeft = (float) rangeAxis.valueToJava2D(yleft,↵ | |
10 | dataArea, edge1);↵ | 10 | dataArea, edge1);↵ | |
11 | right.moveTo((float) xx1, transStack1);↵ | 11 | left.moveTo((float) xx1, transY1);↵ | |
12 | right.lineTo((float) xx1, transY1);↵ | 12 | left.lineTo((float) xx1, transStack1);↵ | |
13 | right.lineTo((float) xxRight, transYRight);↵ | 13 | left.lineTo((float) xxLeft, transStackLeft);↵ | |
14 | right.lineTo((float) xxRight, transStackRight);↵ | 14 | left.lineTo((float) xxLeft, transYLeft);↵ | |
15 | right.closePath();↵ | 15 | left.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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 147 |
Number of mapped statements | 11 |
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) | 16.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
77 | if (y2 >= 0.0) |
| 64 | if (y0 >= 0.0) | |||||||||||||||||||
78 | right.moveTo((float)xx1, transStack1); |
| 65 | left.moveTo((float)xx1, transStack1); | |||||||||||||||||||
79 | right.lineTo((float)xx1, transY1); |
| 66 | left.lineTo((float)xx1, transY1); | |||||||||||||||||||
80 | right.lineTo((float)xxRight, transStackRight); |
| 67 | left.lineTo((float)xxLeft, transStackLeft); | |||||||||||||||||||
| 68 | left.clone(); | |||||||||||||||||||||
81 | right.closePath(); |
| | ||||||||||||||||||||
else | else | ||||||||||||||||||||||
82 | double yright = (y1 + y2) / 2.0 + stackRight[0]; |
| 69 | double yleft = (y0 + y1) / 2.0 + stackLeft[0]; | |||||||||||||||||||
83 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); |
| 70 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); | |||||||||||||||||||
84 | right.moveTo((float)xx1, transStack1); |
| 71 | left.moveTo((float)xx1, transY1); | |||||||||||||||||||
85 | right.lineTo((float)xx1, transY1); |
| 72 | left.lineTo((float)xx1, transStack1); | |||||||||||||||||||
86 | right.lineTo((float)xxRight, transYRight); |
| 73 | left.lineTo((float)xxLeft, transStackLeft); | |||||||||||||||||||
87 | right.lineTo((float)xxRight, transStackRight); |
| 74 | left.lineTo((float)xxLeft, transYLeft); | |||||||||||||||||||
88 | right.closePath(); |
| 75 | left.closePath(); |
Row | Violation |
---|---|
1 | Unmatched statement right.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression transYRight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression transYLeft cannot be parameterized, because it has dependencies to/from statements that will be extracted |