File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BoxAndWhiskerRenderer.java | |||
Method name: void drawHorizontalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int)
|
Method name: void drawVerticalItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (xQ1 != null && xQ3 != null && xMax != null && xMin != null) {↵ | 1 | if (yQ1 != null && yQ3 != null && yMax != null && yMin != null) {↵ | |
2 | double xxQ1 = rangeAxis.valueToJava2D(xQ1.doubleValue(), dataArea,↵ | 2 | double yyQ1 = rangeAxis.valueToJava2D(yQ1.doubleValue(), dataArea,↵ | |
3 | location);↵ | 3 | location);↵ | |
4 | double xxQ3 = rangeAxis.valueToJava2D(xQ3.doubleValue(), dataArea,↵ | 4 | double yyQ3 = rangeAxis.valueToJava2D(yQ3.doubleValue(), dataArea,↵ | |
5 | location);↵ | 5 | location);↵ | |
6 | double xxMax = rangeAxis.valueToJava2D(xMax.doubleValue(), dataArea,↵ | 6 | double yyMax = rangeAxis.valueToJava2D(yMax.doubleValue(),↵ | |
7 | location);↵ | 7 | dataArea, location);↵ | |
8 | double xxMin = rangeAxis.valueToJava2D(xMin.doubleValue(), dataArea,↵ | 8 | double yyMin = rangeAxis.valueToJava2D(yMin.doubleValue(),↵ | |
9 | location);↵ | 9 | dataArea, location);↵ | |
10 | double yymid = yy + state.getBarWidth() / 2.0;↵ | 10 | double xxmid = xx + state.getBarWidth() / 2.0;↵ | |
11 | // draw the upper shadow...↵ | 11 | // draw the upper shadow...↵ | |
12 | g2.draw(new Line2D.Double(xxMax, yymid, xxQ3, yymid));↵ | 12 | g2.draw(new Line2D.Double(xxmid, yyMax, xxmid, yyQ3));↵ | |
13 | g2.draw(new Line2D.Double(xxMax, yy, xxMax,↵ | 13 | g2.draw(new Line2D.Double(xx, yyMax, xx + state.getBarWidth(),↵ | |
14 | yy + state.getBarWidth()));↵ | 14 | yyMax));↵ | |
15 | // draw the lower shadow...↵ | 15 | // draw the lower shadow...↵ | |
16 | g2.draw(new Line2D.Double(xxMin, yymid, xxQ1, yymid));↵ | 16 | g2.draw(new Line2D.Double(xxmid, yyMin, xxmid, yyQ1));↵ | |
17 | g2.draw(new Line2D.Double(xxMin, yy, xxMin,↵ | 17 | g2.draw(new Line2D.Double(xx, yyMin, xx + state.getBarWidth(),↵ | |
18 | yy + state.getBarWidth()));↵ | 18 | yyMin));↵ | |
19 | // draw the box...↵ | 19 | // draw the body...↵ | |
20 | box = new Rectangle2D.Double(Math.min(xxQ1, xxQ3), yy,↵ | 20 | box = new Rectangle2D.Double(xx, Math.min(yyQ1, yyQ3),↵ | |
21 | Math.abs(xxQ1 - xxQ3), state.getBarWidth());↵ | 21 | state.getBarWidth(), Math.abs(yyQ1 - yyQ3));↵ | |
22 | if (this.fillBox) {↵ | 22 | if (this.fillBox) {↵ | |
23 | g2.fill(box);↵ | 23 | g2.fill(box);↵ | |
24 | }↵ | 24 | }↵ | |
25 | g2.setStroke(getItemOutlineStroke(row, column));↵ | 25 | g2.setStroke(getItemOutlineStroke(row, column));↵ | |
26 | g2.setPaint(getItemOutlinePaint(row, column));↵ | 26 | g2.setPaint(getItemOutlinePaint(row, column));↵ | |
27 | g2.draw(box);↵ | 27 | g2.draw(box);↵ | |
28 | } | 28 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 200 |
Number of mapped statements | 16 |
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) | 324.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
24 | if (xQ1 != null && xQ3 != null && xMax != null && xMin != null) |
| 28 | if (yQ1 != null && yQ3 != null && yMax != null && yMin != null) | |||||||||||||||||||||||||||
25 | double xxQ1 = rangeAxis.valueToJava2D(xQ1.doubleValue(), dataArea, location); |
| 29 | double yyQ1 = rangeAxis.valueToJava2D(yQ1.doubleValue(), dataArea, location); | |||||||||||||||||||||||||||
26 | double xxQ3 = rangeAxis.valueToJava2D(xQ3.doubleValue(), dataArea, location); |
| 30 | double yyQ3 = rangeAxis.valueToJava2D(yQ3.doubleValue(), dataArea, location); | |||||||||||||||||||||||||||
27 | double xxMax = rangeAxis.valueToJava2D(xMax.doubleValue(), dataArea, location); |
| 31 | double yyMax = rangeAxis.valueToJava2D(yMax.doubleValue(), dataArea, location); | |||||||||||||||||||||||||||
28 | double xxMin = rangeAxis.valueToJava2D(xMin.doubleValue(), dataArea, location); |
| 32 | double yyMin = rangeAxis.valueToJava2D(yMin.doubleValue(), dataArea, location); | |||||||||||||||||||||||||||
29 | double yymid = yy + state.getBarWidth() / 2.0; |
| 33 | double xxmid = xx + state.getBarWidth() / 2.0; | |||||||||||||||||||||||||||
30 | g2.draw(new Line2D.Double(xxMax, yymid, xxQ3, yymid)); |
| 34 | g2.draw(new Line2D.Double(xxmid, yyMax, xxmid, yyQ3)); | |||||||||||||||||||||||||||
31 | g2.draw(new Line2D.Double(xxMax, yy, xxMax, yy + state.getBarWidth())); |
| 35 | g2.draw(new Line2D.Double(xx, yyMax, xx + state.getBarWidth(), yyMax)); | |||||||||||||||||||||||||||
32 | g2.draw(new Line2D.Double(xxMin, yymid, xxQ1, yymid)); |
| 36 | g2.draw(new Line2D.Double(xxmid, yyMin, xxmid, yyQ1)); | |||||||||||||||||||||||||||
33 | g2.draw(new Line2D.Double(xxMin, yy, xxMin, yy + state.getBarWidth())); |
| 37 | g2.draw(new Line2D.Double(xx, yyMin, xx + state.getBarWidth(), yyMin)); | |||||||||||||||||||||||||||
34 | box = new Rectangle2D.Double(Math.min(xxQ1, xxQ3), yy, Math.abs(xxQ1 - xxQ3), state.getBarWidth()); |
| 38 | box = new Rectangle2D.Double(xx, Math.min(yyQ1, yyQ3), state.getBarWidth(), Math.abs(yyQ1 - yyQ3)); | |||||||||||||||||||||||||||
35 | if (this.fillBox) | 39 | if (this.fillBox) | ||||||||||||||||||||||||||||
36 | g2.fill(box); | 40 | g2.fill(box); | ||||||||||||||||||||||||||||
37 | g2.setStroke(getItemOutlineStroke(row, column)); | 41 | g2.setStroke(getItemOutlineStroke(row, column)); | ||||||||||||||||||||||||||||
38 | g2.setPaint(getItemOutlinePaint(row, column)); | 42 | g2.setPaint(getItemOutlinePaint(row, column)); | ||||||||||||||||||||||||||||
39 | g2.draw(box); | 43 | g2.draw(box); |
Row | Violation |
---|---|
1 | Expression xxMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression xxmid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression yymid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression yyMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression xxQ3 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression xxmid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression yymid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression yyQ3 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression xxMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression yyMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression xxMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression yyMax cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression xxMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression xxmid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression yymid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression yyMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression xxQ1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression xxmid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression yymid cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression yyQ1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression xxMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression yyMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression xxMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression yyMin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression Math.min(xxQ1,xxQ3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression Math.min(yyQ1,yyQ3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression Math.abs(xxQ1 - xxQ3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression Math.abs(yyQ1 - yyQ3) cannot be parameterized, because it has dependencies to/from statements that will be extracted |