File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYErrorRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYErrorRenderer.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: 7 | Number of AST nodes: 7 | |||
1 | if (orientation == PlotOrientation.VERTICAL) {↵ | 1 | if (orientation == PlotOrientation.VERTICAL) {↵ | |
2 | line = new Line2D.Double(xx0, yy, xx1, yy);↵ | 2 | line = new Line2D.Double(xx, yy0, xx, yy1);↵ | |
3 | cap1 = new Line2D.Double(xx0, yy - adj, xx0, yy + adj);↵ | 3 | cap1 = new Line2D.Double(xx - adj, yy0, xx + adj, yy0);↵ | |
4 | cap2 = new Line2D.Double(xx1, yy - adj, xx1, yy + adj);↵ | 4 | cap2 = new Line2D.Double(xx - adj, yy1, xx + adj, yy1);↵ | |
5 | }↵ | 5 | }↵ | |
6 | else { // PlotOrientation.HORIZONTAL↵ | 6 | else { // PlotOrientation.HORIZONTAL↵ | |
7 | line = new Line2D.Double(yy, xx0, yy, xx1);↵ | 7 | line = new Line2D.Double(yy0, xx, yy1, xx);↵ | |
8 | cap1 = new Line2D.Double(yy - adj, xx0, yy + adj, xx0);↵ | 8 | cap1 = new Line2D.Double(yy0, xx - adj, yy0, xx + adj);↵ | |
9 | cap2 = new Line2D.Double(yy - adj, xx1, yy + adj, xx1);↵ | 9 | cap2 = new Line2D.Double(yy1, xx - adj, yy1, xx + adj);↵ | |
10 | } | 10 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 50 |
Number of mapped statements | 7 |
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) | 19.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16 | if (orientation == PlotOrientation.VERTICAL) | 42 | if (orientation == PlotOrientation.VERTICAL) | ||||||||||||||||||||
17 | line = new Line2D.Double(xx0, yy, xx1, yy); |
| 43 | line = new Line2D.Double(xx, yy0, xx, yy1); | |||||||||||||||||||
18 | cap1 = new Line2D.Double(xx0, yy - adj, xx0, yy + adj); |
| 44 | cap1 = new Line2D.Double(xx - adj, yy0, xx + adj, yy0); | |||||||||||||||||||
19 | cap2 = new Line2D.Double(xx1, yy - adj, xx1, yy + adj); |
| 45 | cap2 = new Line2D.Double(xx - adj, yy1, xx + adj, yy1); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
20 | line = new Line2D.Double(yy, xx0, yy, xx1); |
| 46 | line = new Line2D.Double(yy0, xx, yy1, xx); | |||||||||||||||||||
21 | cap1 = new Line2D.Double(yy - adj, xx0, yy + adj, xx0); |
| 47 | cap1 = new Line2D.Double(yy0, xx - adj, yy0, xx + adj); | |||||||||||||||||||
22 | cap2 = new Line2D.Double(yy - adj, xx1, yy + adj, xx1); |
| 48 | cap2 = new Line2D.Double(yy1, xx - adj, yy1, xx + adj); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables line, cap1, cap2 , while Clone fragment #2 returns variables line, cap1, cap2 |