File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java | |||
Method name: void drawItemPass0(Graphics2D, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState)
|
Method name: void drawItemPass0(Graphics2D, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ((l_x3 < l_x1) && (l_x1 < l_x4)) {↵ | 1 | if ((l_x1 < l_x3) && (l_x3 < l_x2)) {↵ | |
2 | // project onto subtrahend↵ | 2 | // project onto minuend↵ | |
3 | double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3);↵ | 3 | double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1);↵ | |
4 | l_subtrahendCurX = l_minuendCurX;↵ | 4 | l_minuendCurX = l_subtrahendCurX;↵ | |
5 | l_subtrahendCurY = new Double((l_slope * l_x1) ↵ | 5 | l_minuendCurY = new Double((l_slope * l_x3) ↵ | |
6 | + (l_y3 - (l_slope * l_x3)));↵ | 6 | + (l_y1 - (l_slope * l_x1)));↵ | |
7 | l_subtrahendXs.add(l_subtrahendCurX);↵ | 7 | l_minuendXs.add(l_minuendCurX);↵ | |
8 | l_subtrahendYs.add(l_subtrahendCurY);↵ | 8 | l_minuendYs.add(l_minuendCurY);↵ | |
9 | } | 9 |
| |
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 the same method |
Number of node comparisons | 37 |
Number of mapped statements | 6 |
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) | 31.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
87 | if ((l_x3 < l_x1) && (l_x1 < l_x4)) |
| 93 | if ((l_x1 < l_x3) && (l_x3 < l_x2)) | |||||||||||||||||||
88 | double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3); |
| 94 | double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1); | |||||||||||||||||||
89 | l_subtrahendCurX = l_minuendCurX; |
| 95 | l_minuendCurX = l_subtrahendCurX; | |||||||||||||||||||
90 | l_subtrahendCurY = new Double((l_slope * l_x1) + (l_y3 - (l_slope * l_x3))); |
| 96 | l_minuendCurY = new Double((l_slope * l_x3) + (l_y1 - (l_slope * l_x1))); | |||||||||||||||||||
91 | l_subtrahendXs.add(l_subtrahendCurX); |
| 97 | l_minuendXs.add(l_minuendCurX); | |||||||||||||||||||
92 | l_subtrahendYs.add(l_subtrahendCurY); |
| 98 | l_minuendYs.add(l_minuendCurY); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables l_subtrahendCurX, l_subtrahendCurY , while Clone fragment #2 returns variables l_minuendCurY, l_minuendCurX |