File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.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: 14 | Number of AST nodes: 14 | |||
1 | double previous = previousValue.doubleValue();↵ | 1 | double previous = previousValue.doubleValue();↵ | |
2 | double x0;↵ | 2 | double x0;↵ | |
3 | if (this.useSeriesOffset) {↵ | 3 | if (getUseSeriesOffset()) {↵ | |
4 | x0 = domainAxis.getCategorySeriesMiddle(↵ | 4 | x0 = domainAxis.getCategorySeriesMiddle(↵ | |
5 | dataset.getColumnKey(column - 1),↵ | 5 | dataset.getColumnKey(column - 1),↵ | |
6 | dataset.getRowKey(row), dataset,↵ | 6 | dataset.getRowKey(row), dataset,↵ | |
7 | this.itemMargin, dataArea,↵ | 7 | getItemMargin(), dataArea,↵ | |
8 | plot.getDomainAxisEdge());↵ | 8 | plot.getDomainAxisEdge());↵ | |
9 | }↵ | 9 | }↵ | |
10 | else {↵ | 10 | else {↵ | |
11 | x0 = domainAxis.getCategoryMiddle(column - 1,↵ | 11 | x0 = domainAxis.getCategoryMiddle(column - 1,↵ | |
12 | getColumnCount(), dataArea,↵ | 12 | getColumnCount(), dataArea,↵ | |
13 | plot.getDomainAxisEdge());↵ | 13 | plot.getDomainAxisEdge());↵ | |
14 | }↵ | 14 | }↵ | |
15 | double y0 = rangeAxis.valueToJava2D(previous, dataArea,↵ | 15 | double y0 = rangeAxis.valueToJava2D(previous, dataArea,↵ | |
16 | plot.getRangeAxisEdge());↵ | 16 | plot.getRangeAxisEdge());↵ | |
17 | Line2D line = null;↵ | 17 | Line2D line = null;↵ | |
18 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 18 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
19 | line = new Line2D.Double(y0, x0, y1, x1);↵ | 19 | line = new Line2D.Double(y0, x0, y1, x1);↵ | |
20 | }↵ | 20 | }↵ | |
21 | else if (orientation == PlotOrientation.VERTICAL) {↵ | 21 | else if (orientation == PlotOrientation.VERTICAL) {↵ | |
22 | line = new Line2D.Double(x0, y0, x1, y1);↵ | 22 | line = new Line2D.Double(x0, y0, x1, y1);↵ | |
23 | }↵ | 23 | }↵ | |
24 | g2.setPaint(getItemPaint(row, column));↵ | 24 | g2.setPaint(getItemPaint(row, column));↵ | |
25 | g2.setStroke(getItemStroke(row, column));↵ | 25 | g2.setStroke(getItemStroke(row, column));↵ | |
26 | g2.draw(line); | 26 |
| |
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 86 |
Number of mapped statements | 14 |
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) | 8.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | double previous = previousValue.doubleValue(); | 35 | double previous = previousValue.doubleValue(); | ||||||||||||||
20 | double x0; | 36 | double x0; | ||||||||||||||
21 | if (this.useSeriesOffset) |
| 37 | if (getUseSeriesOffset()) | |||||||||||||
22 | x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge()); |
| 38 | x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge()); | |||||||||||||
else | else | ||||||||||||||||
23 | x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge()); | 39 | x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge()); | ||||||||||||||
24 | double y0 = rangeAxis.valueToJava2D(previous, dataArea, plot.getRangeAxisEdge()); | 40 | double y0 = rangeAxis.valueToJava2D(previous, dataArea, plot.getRangeAxisEdge()); | ||||||||||||||
25 | Line2D line = null; | 41 | Line2D line = null; | ||||||||||||||
26 | if (orientation == PlotOrientation.HORIZONTAL) | 42 | if (orientation == PlotOrientation.HORIZONTAL) | ||||||||||||||
27 | line = new Line2D.Double(y0, x0, y1, x1); | 43 | line = new Line2D.Double(y0, x0, y1, x1); | ||||||||||||||
28 | else if (orientation == PlotOrientation.VERTICAL) | 44 | else if (orientation == PlotOrientation.VERTICAL) | ||||||||||||||
29 | line = new Line2D.Double(x0, y0, x1, y1); | 45 | line = new Line2D.Double(x0, y0, x1, y1); | ||||||||||||||
30 | g2.setPaint(getItemPaint(row, column)); | 46 | g2.setPaint(getItemPaint(row, column)); | ||||||||||||||
31 | g2.setStroke(getItemStroke(row, column)); | 47 | g2.setStroke(getItemStroke(row, column)); | ||||||||||||||
32 | g2.draw(line); | 48 | g2.draw(line); |
Row | Violation |
---|