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: 7 | Number of AST nodes: 7 | |||
1 | if (xMean != null) {↵ | 1 | if (yMean != null) {↵ | |
2 | double xxMean = rangeAxis.valueToJava2D(xMean.doubleValue(),↵ | 2 | yyAverage = rangeAxis.valueToJava2D(yMean.doubleValue(),↵ | |
3 | dataArea, location);↵ | 3 | dataArea, location);↵ | |
4 | aRadius = state.getBarWidth() / 4;↵ | 4 | aRadius = state.getBarWidth() / 4;↵ | |
5 | // here we check that the average marker will in fact be visible↵ | 5 | // here we check that the average marker will in fact be visible↵ | |
6 | // before drawing it...↵ | 6 | // before drawing it...↵ | |
7 | if ((xxMean > (dataArea.getMinX() - aRadius))↵ | 7 | if ((yyAverage > (dataArea.getMinY() - aRadius))↵ | |
8 | && (xxMean < (dataArea.getMaxX() + aRadius))) {↵ | 8 | && (yyAverage < (dataArea.getMaxY() + aRadius))) {↵ | |
9 | Ellipse2D.Double avgEllipse = new Ellipse2D.Double(xxMean↵ | 9 | Ellipse2D.Double avgEllipse = new Ellipse2D.Double(xx + aRadius,↵ | |
10 | - aRadius, yy + aRadius, aRadius * 2, aRadius * 2);↵ | 10 | yyAverage - aRadius, aRadius * 2, aRadius * 2);↵ | |
11 | g2.fill(avgEllipse);↵ | 11 | g2.fill(avgEllipse);↵ | |
12 | g2.draw(avgEllipse);↵ | 12 | g2.draw(avgEllipse);↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 6 |
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) | 14.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43 | if (xMean != null) |
| 46 | if (yMean != null) | |||||||||||||||||||||||||
44 | double xxMean = rangeAxis.valueToJava2D(xMean.doubleValue(), dataArea, location); |
| | ||||||||||||||||||||||||||
|
| 47 | yyAverage = rangeAxis.valueToJava2D(yMean.doubleValue(), dataArea, location); | ||||||||||||||||||||||||||
45 | aRadius = state.getBarWidth() / 4; | 48 | aRadius = state.getBarWidth() / 4; | ||||||||||||||||||||||||||
46 | if ((xxMean > (dataArea.getMinX() - aRadius)) && (xxMean < (dataArea.getMaxX() + aRadius))) |
| 49 | if ((yyAverage > (dataArea.getMinY() - aRadius)) && (yyAverage < (dataArea.getMaxY() + aRadius))) | |||||||||||||||||||||||||
47 | Ellipse2D.Double avgEllipse = new Ellipse2D.Double(xxMean - aRadius, yy + aRadius, aRadius * 2, aRadius * 2); |
| 50 | Ellipse2D.Double avgEllipse = new Ellipse2D.Double(xx + aRadius, yyAverage - aRadius, aRadius * 2, aRadius * 2); | |||||||||||||||||||||||||
48 | g2.fill(avgEllipse); | 51 | g2.fill(avgEllipse); | ||||||||||||||||||||||||||
49 | g2.draw(avgEllipse); | 52 | g2.draw(avgEllipse); |
Row | Violation |
---|---|
1 | Unmatched statement double xxMean=rangeAxis.valueToJava2D(xMean.doubleValue(),dataArea,location); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement double xxMean=rangeAxis.valueToJava2D(xMean.doubleValue(),dataArea,location); 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 |
3 | Unmatched statement yyAverage=rangeAxis.valueToJava2D(yMean.doubleValue(),dataArea,location); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement yyAverage=rangeAxis.valueToJava2D(yMean.doubleValue(),dataArea,location); 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 |
5 | Expression xxMean cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression xxMean - aRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression xx + aRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression yyAverage cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression yy + aRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression yyAverage - aRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables aRadius |