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: 4 | Number of AST nodes: 4 | |||
1 | if (b_minuendDone && (l_x3 < l_x2) && (l_x2 < l_x4)) {↵ | 1 | if (b_subtrahendDone && (l_x1 < l_x4) && (l_x4 < 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_subtrahendNextX = l_minuendNextX;↵ | 4 | l_minuendNextX = l_subtrahendNextX;↵ | |
5 | l_subtrahendNextY = new Double((l_slope * l_x2) ↵ | 5 | l_minuendNextY = new Double((l_slope * l_x4) ↵ | |
6 | + (l_y3 - (l_slope * l_x3)));↵ | 6 | + (l_y1 - (l_slope * l_x1)));↵ | |
7 | } | 7 |
| |
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 | 20 |
Number of mapped statements | 4 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
214 | if (b_minuendDone && (l_x3 < l_x2) && (l_x2 < l_x4)) |
| 218 | if (b_subtrahendDone && (l_x1 < l_x4) && (l_x4 < l_x2)) | ||||||||||||||||||||||
215 | double l_slope = (l_y4 - l_y3) / (l_x4 - l_x3); |
| 219 | double l_slope = (l_y2 - l_y1) / (l_x2 - l_x1); | ||||||||||||||||||||||
216 | l_subtrahendNextX = l_minuendNextX; |
| 220 | l_minuendNextX = l_subtrahendNextX; | ||||||||||||||||||||||
217 | l_subtrahendNextY = new Double((l_slope * l_x2) + (l_y3 - (l_slope * l_x3))); |
| 221 | l_minuendNextY = new Double((l_slope * l_x4) + (l_y1 - (l_slope * l_x1))); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables l_subtrahendNextX, l_subtrahendNextY , while Clone fragment #2 returns variables l_minuendNextY, l_minuendNextX |