File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer3D.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineRenderer3D.java | |||
Method name: void drawRangeGridline(Graphics2D, CategoryPlot, ValueAxis, Rectangle2D, double)
|
Method name: void drawRangeGridline(Graphics2D, CategoryPlot, ValueAxis, Rectangle2D, double)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
2 | double x0 = axis.valueToJava2D(value, adjusted,↵ | 2 | double x0 = axis.valueToJava2D(value, adjusted,↵ | |
3 | plot.getRangeAxisEdge());↵ | 3 | plot.getRangeAxisEdge());↵ | |
4 | double x1 = x0 + getXOffset();↵ | 4 | double x1 = x0 + getXOffset();↵ | |
5 | double y0 = dataArea.getMaxY();↵ | 5 | double y0 = dataArea.getMaxY();↵ | |
6 | double y1 = y0 - getYOffset();↵ | 6 | double y1 = y0 - getYOffset();↵ | |
7 | double y2 = dataArea.getMinY();↵ | 7 | double y2 = dataArea.getMinY();↵ | |
8 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | 8 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | |
9 | line2 = new Line2D.Double(x1, y1, x1, y2);↵ | 9 | line2 = new Line2D.Double(x1, y1, x1, y2);↵ | |
10 | }↵ | 10 | }↵ | |
11 | else if (orientation == PlotOrientation.VERTICAL) {↵ | 11 | else if (orientation == PlotOrientation.VERTICAL) {↵ | |
12 | double y0 = axis.valueToJava2D(value, adjusted,↵ | 12 | double y0 = axis.valueToJava2D(value, adjusted,↵ | |
13 | plot.getRangeAxisEdge());↵ | 13 | plot.getRangeAxisEdge());↵ | |
14 | double y1 = y0 - getYOffset();↵ | 14 | double y1 = y0 - getYOffset();↵ | |
15 | double x0 = dataArea.getMinX();↵ | 15 | double x0 = dataArea.getMinX();↵ | |
16 | double x1 = x0 + getXOffset();↵ | 16 | double x1 = x0 + getXOffset();↵ | |
17 | double x2 = dataArea.getMaxX();↵ | 17 | double x2 = dataArea.getMaxX();↵ | |
18 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | 18 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | |
19 | line2 = new Line2D.Double(x1, y1, x2, y1);↵ | 19 | line2 = new Line2D.Double(x1, y1, x2, y1);↵ | |
20 | } | 20 |
| |
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.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 193 |
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) | 12.1 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
8 | if (orientation == PlotOrientation.HORIZONTAL) | 8 | if (orientation == PlotOrientation.HORIZONTAL) | |
9 | double x0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); | 9 | double x0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); | |
10 | double x1 = x0 + getXOffset(); | 10 | double x1 = x0 + getXOffset(); | |
11 | double y0 = dataArea.getMaxY(); | 11 | double y0 = dataArea.getMaxY(); | |
12 | double y1 = y0 - getYOffset(); | 12 | double y1 = y0 - getYOffset(); | |
13 | double y2 = dataArea.getMinY(); | 13 | double y2 = dataArea.getMinY(); | |
14 | line1 = new Line2D.Double(x0, y0, x1, y1); | 14 | line1 = new Line2D.Double(x0, y0, x1, y1); | |
15 | line2 = new Line2D.Double(x1, y1, x1, y2); | 15 | line2 = new Line2D.Double(x1, y1, x1, y2); | |
16 | else if (orientation == PlotOrientation.VERTICAL) | 16 | else if (orientation == PlotOrientation.VERTICAL) | |
17 | double y0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); | 17 | double y0 = axis.valueToJava2D(value, adjusted, plot.getRangeAxisEdge()); | |
18 | double y1 = y0 - getYOffset(); | 18 | double y1 = y0 - getYOffset(); | |
19 | double x0 = dataArea.getMinX(); | 19 | double x0 = dataArea.getMinX(); | |
20 | double x1 = x0 + getXOffset(); | 20 | double x1 = x0 + getXOffset(); | |
21 | double x2 = dataArea.getMaxX(); | 21 | double x2 = dataArea.getMaxX(); | |
22 | line1 = new Line2D.Double(x0, y0, x1, y1); | 22 | line1 = new Line2D.Double(x0, y0, x1, y1); | |
23 | line2 = new Line2D.Double(x1, y1, x2, y1); | 23 | line2 = new Line2D.Double(x1, y1, x2, y1); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables line1, line2 , while Clone fragment #2 returns variables line1, line2 |