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 | ↵ | |
3 | float transYLeft↵ | |||
4 | = (float) rangeAxis.valueToJava2D(yleft, dataArea, edge1);↵ | 3 | right.moveTo((float) xx1, transStack1);↵ | |
5 | left.moveTo((float) xx1, transY1);↵ | 4 | right.lineTo((float) xx1, transY1);↵ | |
6 | left.lineTo((float) xx1, transStack1);↵ | 5 | right.lineTo((float) xxRight, transStackRight);↵ | |
7 | left.lineTo((float) xxLeft, transStackLeft);↵ | 6 | ↵ | |
8 | left.lineTo((float) xxLeft, transYLeft);↵ | |||
9 | left.closePath();↵ | 7 | right.closePath();↵ | |
8 | }↵ | |||
9 | else {↵ | |||
10 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | |||
11 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | |||
10 | }↵ | 12 | ↵ | |
11 | else {↵ | 13 | dataArea, edge1);↵ | |
12 | left.moveTo((float) xx1, transStack1);↵ | 14 | right.moveTo((float) xx1, transStack1);↵ | |
13 | left.lineTo((float) xx1, transY1);↵ | 15 | right.lineTo((float) xx1, transY1);↵ | |
14 | lef↵ | 16 | right.lineTo((float) xxRight, transYRight);↵ | |
15 | t.lineTo((float) xxLeft, transStackLeft);↵ | 17 | right.lineTo((float) xxRight, transStackRight);↵ | |
16 | left.closePath();↵ | 18 | right.closePath();↵ | |
17 | } | 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 | 9 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 43.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
36 | if (y0 >= 0.0) |
| 77 | if (y2 >= 0.0) | ||||||||||||||||||||||||
37 | double yleft = (y0 + y1) / 2.0 + stackLeft[1]; |
| | |||||||||||||||||||||||||
38 | float transYLeft = (float)rangeAxis.valueToJava2D(yleft, dataArea, edge1); |
| | |||||||||||||||||||||||||
39 | left.moveTo((float)xx1, transY1); |
| | |||||||||||||||||||||||||
40 | left.lineTo((float)xx1, transStack1); |
| 78 | right.moveTo((float)xx1, transStack1); | ||||||||||||||||||||||||
41 | left.lineTo((float)xxLeft, transStackLeft); |
| 79 | right.lineTo((float)xx1, transY1); | ||||||||||||||||||||||||
42 | left.lineTo((float)xxLeft, transYLeft); |
| 80 | right.lineTo((float)xxRight, transStackRight); | ||||||||||||||||||||||||
43 | left.closePath(); |
| 81 | right.closePath(); | ||||||||||||||||||||||||
else | else | |||||||||||||||||||||||||||
|
| 82 | double yright = (y1 + y2) / 2.0 + stackRight[0]; | |||||||||||||||||||||||||
|
| 83 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | |||||||||||||||||||||||||
44 | left.moveTo((float)xx1, transStack1); |
| 84 | right.moveTo((float)xx1, transStack1); | ||||||||||||||||||||||||
45 | left.lineTo((float)xx1, transY1); |
| 85 | right.lineTo((float)xx1, transY1); | ||||||||||||||||||||||||
46 | left.lineTo((float)xxLeft, transStackLeft); |
| 86 | right.lineTo((float)xxRight, transYRight); | ||||||||||||||||||||||||
47 | left.closePath(); |
| 87 | right.lineTo((float)xxRight, transStackRight); | ||||||||||||||||||||||||
|
| 88 | right.closePath(); |
Row | Violation |
---|---|
1 | Unmatched statement double yleft=(y0 + y1) / 2.0 + stackLeft[1]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement float transYLeft=(float)rangeAxis.valueToJava2D(yleft,dataArea,edge1); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement float transYLeft=(float)rangeAxis.valueToJava2D(yleft,dataArea,edge1); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
4 | Unmatched statement left.moveTo((float)xx1,transY1); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Expression left.lineTo((float)xx1,transStack1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression right.moveTo((float)xx1,transStack1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression left.lineTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized |
8 | Expression right.moveTo((float)xx1,transStack1) is a void method call, and thus it cannot be parameterized |
9 | Unmatched statement double yright=(y1 + y2) / 2.0 + stackRight[0]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
10 | Unmatched statement float transYRight=(float)rangeAxis.valueToJava2D(yright,dataArea,edge1); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
11 | Unmatched statement float transYRight=(float)rangeAxis.valueToJava2D(yright,dataArea,edge1); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
12 | Expression transYRight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression left.closePath() is a void method call, and thus it cannot be parameterized |
16 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
17 | Expression left.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression left.closePath() is a void method call, and thus it cannot be parameterized |
20 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
21 | Unmatched statement right.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |