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 | double yright = (y1 + y2) / 2.0 + stackRight[1];↵ | 2 | ↵ | |
3 | float transYRight↵ | |||
4 | = (float) rangeAxis.valueToJava2D(yright, dataArea, edge↵ | 3 | left.moveTo((float) xx1, transStack1);↵ | |
5 | 1);↵ | 4 | left.lineTo((float) xx1, transY1);↵ | |
6 | right.moveTo((float) xx1, transStack1);↵ | 5 | left.lineTo((float) xxLeft, transStackLeft);↵ | |
7 | right.lineTo((float) xx1, transY1);↵ | 6 | left.clone();↵ | |
8 | ↵ | 7 | }↵ | |
9 | right.lineTo((float) xxRight, transYRight);↵ | 8 | ↵ | |
10 | right.lineTo((float) xxRight, transStackRight);↵ | |||
11 | right.closePath();↵ | 9 | else {↵ | |
10 | double yleft = (y0 + y1) / 2.0 + stackLeft[0];↵ | |||
11 | float transYLeft = (float) rangeAxis.valueToJava2D(yleft,↵ | |||
12 | }↵ | 12 | ↵ | |
13 | else {↵ | 13 | dataArea, edge1);↵ | |
14 | right.moveTo((float) xx1, transStack1);↵ | 14 | left.moveTo((float) xx1, transY1);↵ | |
15 | right.lineTo((float) xx1, transY1);↵ | 15 | left.lineTo((float) xx1, transStack1);↵ | |
16 | right.lineTo((float) xxRight, transStackRigh↵ | 16 | left.lineTo((float) xxLeft, transStackLeft);↵ | |
17 | t);↵ | 17 | left.lineTo((float) xxLeft, transYLeft);↵ | |
18 | right.closePath();↵ | 18 | left.closePath();↵ | |
19 | } | 19 |
| |
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 144 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 12.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49 | if (y2 >= 0.0) |
| 64 | if (y0 >= 0.0) | ||||||||||||||||
50 | double yright = (y1 + y2) / 2.0 + stackRight[1]; | | ||||||||||||||||||
51 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | | ||||||||||||||||||
52 | right.moveTo((float)xx1, transStack1); |
| 65 | left.moveTo((float)xx1, transStack1); | ||||||||||||||||
53 | right.lineTo((float)xx1, transY1); |
| 66 | left.lineTo((float)xx1, transY1); | ||||||||||||||||
54 | right.lineTo((float)xxRight, transYRight); |
| 67 | left.lineTo((float)xxLeft, transStackLeft); | ||||||||||||||||
55 | right.lineTo((float)xxRight, transStackRight); |
| | |||||||||||||||||
56 | right.closePath(); | | ||||||||||||||||||
| 68 | left.clone(); | ||||||||||||||||||
else | else | |||||||||||||||||||
| 69 | double yleft = (y0 + y1) / 2.0 + stackLeft[0]; | ||||||||||||||||||
| 70 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); | ||||||||||||||||||
| 71 | left.moveTo((float)xx1, transY1); | ||||||||||||||||||
57 | right.moveTo((float)xx1, transStack1); |
| 72 | left.lineTo((float)xx1, transStack1); | ||||||||||||||||
58 | right.lineTo((float)xx1, transY1); |
| 73 | left.lineTo((float)xxLeft, transStackLeft); | ||||||||||||||||
59 | right.lineTo((float)xxRight, transStackRight); |
| 74 | left.lineTo((float)xxLeft, transYLeft); | ||||||||||||||||
60 | right.closePath(); |
| 75 | left.closePath(); |
Row | Violation |
---|---|
1 | Unmatched statement right.lineTo((float)xxRight,transStackRight); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression right.moveTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized |
3 | Expression left.lineTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized |