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 (y2 >= 0.0) {↵ | |
2 | double yright = (y1 + y2) / 2.0 + stackRight[1];↵ | |||
3 | float transYRight↵ | |||
4 | = (float) rangeAxis.valueToJava2D(yright, dataArea, edge1);↵ | |||
5 | right.moveTo((float) xx1, transStack1);↵ | 2 | right.moveTo((float) xx1, transStack1);↵ | |
6 | right.lineTo((float) xx1, transY1);↵ | 3 | right.lineTo((float) xx1, transY1);↵ | |
7 | right.lineTo((float) xxRight, transYRight);↵ | 4 | right.lineTo((float) xxRight, transStackRight);↵ | |
8 | right.lineTo((float) xxRight, transS↵ | 5 | right.closePath();↵ | |
6 | }↵ | |||
7 | else {↵ | |||
9 | tackRight);↵ | 8 | double yright = (y1 + y2) / 2.0 + stackRight[0];↵ | |
10 | right.closePath();↵ | 9 | float transYRight = (float) rangeAxis.valueToJava2D(yright,↵ | |
11 | }↵ | 10 | ↵ | |
12 | else {↵ | 11 | dataArea, edge1);↵ | |
13 | right.moveTo((float) xx1, transStack1);↵ | 12 | right.moveTo((float) xx1, transStack1);↵ | |
14 | right.lineTo((float) xx1, transY1);↵ | 13 | right.lineTo((float) xx1, transY1);↵ | |
14 | right.lineTo((float) xxRight, transYRight);↵ | |||
15 | right.lineTo((float) xxRight, transStackRight);↵ | 15 | right.lineTo((float) xxRight, transStackRight);↵ | |
16 | right.closePath();↵ | 16 | right.closePath();↵ | |
17 | } | 17 |
| |
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) | 12.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
49 | if (y2 >= 0.0) | 77 | if (y2 >= 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); | 78 | right.moveTo((float)xx1, transStack1); | ||||||||||||||||||||||
53 | right.lineTo((float)xx1, transY1); | 79 | right.lineTo((float)xx1, transY1); | ||||||||||||||||||||||
54 | right.lineTo((float)xxRight, transYRight); |
| 80 | right.lineTo((float)xxRight, transStackRight); | |||||||||||||||||||||
55 | right.lineTo((float)xxRight, transStackRight); |
| 81 | right.closePath(); | |||||||||||||||||||||
56 | right.closePath(); |
| | ||||||||||||||||||||||
else | else | ||||||||||||||||||||||||
|
| 82 | double yright = (y1 + y2) / 2.0 + stackRight[0]; | ||||||||||||||||||||||
| 83 | float transYRight = (float)rangeAxis.valueToJava2D(yright, dataArea, edge1); | |||||||||||||||||||||||
57 | right.moveTo((float)xx1, transStack1); | 84 | right.moveTo((float)xx1, transStack1); | ||||||||||||||||||||||
58 | right.lineTo((float)xx1, transY1); | 85 | right.lineTo((float)xx1, transY1); | ||||||||||||||||||||||
59 | right.lineTo((float)xxRight, transStackRight); |
| 86 | right.lineTo((float)xxRight, transYRight); | |||||||||||||||||||||
60 | right.closePath(); |
| 87 | right.lineTo((float)xxRight, transStackRight); | |||||||||||||||||||||
|
| 88 | right.closePath(); |
Row | Violation |
---|---|
1 | Unmatched statement double yright=(y1 + y2) / 2.0 + stackRight[1]; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
5 | Expression right.closePath() is a void method call, and thus it cannot be parameterized |
6 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
9 | Expression right.closePath() is a void method call, and thus it cannot be parameterized |
10 | Unmatched statement right.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | 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 |
12 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression right.closePath() is a void method call, and thus it cannot be parameterized |
15 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
16 | Expression right.closePath() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression right.lineTo((float)xxRight,transStackRight) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression right.closePath() is a void method call, and thus it cannot be parameterized |
19 | Expression right.lineTo((float)xxRight,transStackRight) is a void method call, and thus it cannot be parameterized |
20 | Unmatched statement right.closePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |