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 drawDomainGridline(Graphics2D, CategoryPlot, Rectangle2D, double)
|
Method name: void drawDomainGridline(Graphics2D, CategoryPlot, Rectangle2D, double)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
2 | double y0 = value;↵ | 2 | double y0 = value;↵ | |
3 | double y1 = value - getYOffset();↵ | 3 | double y1 = value - getYOffset();↵ | |
4 | double x0 = dataArea.getMinX();↵ | 4 | double x0 = dataArea.getMinX();↵ | |
5 | double x1 = x0 + getXOffset();↵ | 5 | double x1 = x0 + getXOffset();↵ | |
6 | double x2 = dataArea.getMaxX();↵ | 6 | double x2 = dataArea.getMaxX();↵ | |
7 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | 7 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | |
8 | line2 = new Line2D.Double(x1, y1, x2, y1);↵ | 8 | line2 = new Line2D.Double(x1, y1, x2, y1);↵ | |
9 | }↵ | 9 | }↵ | |
10 | else if (orientation == PlotOrientation.VERTICAL) {↵ | 10 | else if (orientation == PlotOrientation.VERTICAL) {↵ | |
11 | double x0 = value;↵ | 11 | double x0 = value;↵ | |
12 | double x1 = value + getXOffset();↵ | 12 | double x1 = value + getXOffset();↵ | |
13 | double y0 = dataArea.getMaxY();↵ | 13 | double y0 = dataArea.getMaxY();↵ | |
14 | double y1 = y0 - getYOffset();↵ | 14 | double y1 = y0 - getYOffset();↵ | |
15 | double y2 = dataArea.getMinY();↵ | 15 | double y2 = dataArea.getMinY();↵ | |
16 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | 16 | line1 = new Line2D.Double(x0, y0, x1, y1);↵ | |
17 | line2 = new Line2D.Double(x1, y1, x1, y2);↵ | 17 | line2 = new Line2D.Double(x1, y1, x1, y2);↵ | |
18 | } | 18 |
| |
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.3 |
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) | 9.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
4 | if (orientation == PlotOrientation.HORIZONTAL) | 4 | if (orientation == PlotOrientation.HORIZONTAL) | |
5 | double y0 = value; | 5 | double y0 = value; | |
6 | double y1 = value - getYOffset(); | 6 | double y1 = value - getYOffset(); | |
7 | double x0 = dataArea.getMinX(); | 7 | double x0 = dataArea.getMinX(); | |
8 | double x1 = x0 + getXOffset(); | 8 | double x1 = x0 + getXOffset(); | |
9 | double x2 = dataArea.getMaxX(); | 9 | double x2 = dataArea.getMaxX(); | |
10 | line1 = new Line2D.Double(x0, y0, x1, y1); | 10 | line1 = new Line2D.Double(x0, y0, x1, y1); | |
11 | line2 = new Line2D.Double(x1, y1, x2, y1); | 11 | line2 = new Line2D.Double(x1, y1, x2, y1); | |
12 | else if (orientation == PlotOrientation.VERTICAL) | 12 | else if (orientation == PlotOrientation.VERTICAL) | |
13 | double x0 = value; | 13 | double x0 = value; | |
14 | double x1 = value + getXOffset(); | 14 | double x1 = value + getXOffset(); | |
15 | double y0 = dataArea.getMaxY(); | 15 | double y0 = dataArea.getMaxY(); | |
16 | double y1 = y0 - getYOffset(); | 16 | double y1 = y0 - getYOffset(); | |
17 | double y2 = dataArea.getMinY(); | 17 | double y2 = dataArea.getMinY(); | |
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, x1, y2); | 19 | line2 = new Line2D.Double(x1, y1, x1, y2); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables line1, line2 , while Clone fragment #2 returns variables line1, line2 |