File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/HighLowRenderer.java | |||
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (!Double.isNaN(yOpen)) {↵ | 1 | if (!Double.isNaN(yClose)) {↵ | |
2 | double yyOpen = rangeAxis.valueToJava2D(yOpen, dataArea,↵ | 2 | double yyClose = rangeAxis.valueToJava2D(↵ | |
3 | location);↵ | 3 | yClose, dataArea, location);↵ | |
4 | if (this.openTickPaint != null) {↵ | 4 | if (this.closeTickPaint != null) {↵ | |
5 | g2.setPaint(this.openTickPaint);↵ | 5 | g2.setPaint(this.closeTickPaint);↵ | |
6 | }↵ | 6 | }↵ | |
7 | else {↵ | 7 | else {↵ | |
8 | g2.setPaint(itemPaint);↵ | 8 | g2.setPaint(itemPaint);↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | 10 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | |
11 | g2.draw(new Line2D.Double(yyOpen, xx + delta, yyOpen,↵ | 11 | g2.draw(new Line2D.Double(yyClose, xx, yyClose,↵ | |
12 | xx));↵ | 12 | xx - delta));↵ | |
13 | }↵ | 13 | }↵ | |
14 | else if (orientation == PlotOrientation.VERTICAL) {↵ | 14 | else if (orientation == PlotOrientation.VERTICAL) {↵ | |
15 | g2.draw(new Line2D.Double(xx - delta, yyOpen, xx,↵ | 15 | g2.draw(new Line2D.Double(xx, yyClose, xx + delta,↵ | |
16 | yyOpen));↵ | 16 | yyClose));↵ | |
17 | }↵ | 17 | }↵ | |
18 | } | 18 |
| |
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.8 |
Clones location | Clones are in the same method |
Number of node comparisons | 41 |
Number of mapped statements | 9 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33 | if (!Double.isNaN(yOpen)) |
| 44 | if (!Double.isNaN(yClose)) | |||||||||||||||||||
34 | double yyOpen = rangeAxis.valueToJava2D(yOpen, dataArea, location); |
| 45 | double yyClose = rangeAxis.valueToJava2D(yClose, dataArea, location); | |||||||||||||||||||
35 | if (this.openTickPaint != null) |
| 46 | if (this.closeTickPaint != null) | |||||||||||||||||||
36 | g2.setPaint(this.openTickPaint); |
| 47 | g2.setPaint(this.closeTickPaint); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
37 | g2.setPaint(itemPaint); | 48 | g2.setPaint(itemPaint); | ||||||||||||||||||||
38 | if (orientation == PlotOrientation.HORIZONTAL) | 49 | if (orientation == PlotOrientation.HORIZONTAL) | ||||||||||||||||||||
39 | g2.draw(new Line2D.Double(yyOpen, xx + delta, yyOpen, xx)); |
| 50 | g2.draw(new Line2D.Double(yyClose, xx, yyClose, xx - delta)); | |||||||||||||||||||
40 | else if (orientation == PlotOrientation.VERTICAL) | 51 | else if (orientation == PlotOrientation.VERTICAL) | ||||||||||||||||||||
41 | g2.draw(new Line2D.Double(xx - delta, yyOpen, xx, yyOpen)); |
| 52 | g2.draw(new Line2D.Double(xx, yyClose, xx + delta, yyClose)); |
Row | Violation |
---|