for (int i = 1; i < l_xValues.length; i++) {
l_x = x_domainAxis.valueToJava2D((
(Double) l_xValues[i]).doubleValue(), x_dataArea,
l_domainAxisLocation);
if (this.roundXCoordinates) {
l_x = Math.rint(l_x);
}
l_y = x_rangeAxis.valueToJava2D((
(Double) l_yValues[i]).doubleValue(), x_dataArea,
l_rangeAxisLocation);
l_path.lineTo((float) l_x, (float) l_y);
}
for (int i = 1; i < l_xValues.length; i++) {
l_x = x_domainAxis.valueToJava2D((
(Double) l_xValues[i]).doubleValue(), x_dataArea,
l_domainAxisLocation);
if (this.roundXCoordinates) {
l_x = Math.rint(l_x);
}
l_y = x_rangeAxis.valueToJava2D((
(Double) l_yValues[i]).doubleValue(), x_dataArea,
l_rangeAxisLocation);
l_path.lineTo((float) l_y, (float) l_x);
}
Clone fragments detected by clone detection tool
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 createPolygon(Graphics2D, Rectangle2D, XYPlot, ValueAxis, ValueAxis, boolean, LinkedList, LinkedList)
|
|
Method name: void createPolygon(Graphics2D, Rectangle2D, XYPlot, ValueAxis, ValueAxis, boolean, LinkedList, LinkedList)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | for (int i = 1; i < l_xValues.length; i++) {↵ | | 1 | for (int i = 1; i < l_xValues.length; i++) {↵
|
2 | l_x = x_domainAxis.valueToJava2D((↵ | | 2 | l_x = x_domainAxis.valueToJava2D((↵
|
3 | (Double) l_xValues[i]).doubleValue(), x_dataArea, ↵ | | 3 | (Double) l_xValues[i]).doubleValue(), x_dataArea, ↵
|
4 | l_domainAxisLocation);↵ | | 4 | l_domainAxisLocation);↵
|
5 | if (this.roundXCoordinates) {↵ | | 5 | if (this.roundXCoordinates) {↵
|
6 | l_x = Math.rint(l_x);↵ | | 6 | l_x = Math.rint(l_x);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | l_y = x_rangeAxis.valueToJava2D((↵ | | 8 | l_y = x_rangeAxis.valueToJava2D((↵
|
9 | (Double) l_yValues[i]).doubleValue(), x_dataArea, ↵ | | 9 | (Double) l_yValues[i]).doubleValue(), x_dataArea, ↵
|
10 | l_rangeAxisLocation);↵ | | 10 | l_rangeAxisLocation);↵
|
11 | l_path.lineTo((float) l_x, (float) l_y);↵ | | 11 | l_path.lineTo((float) l_y, (float) l_x);↵
|
12 | } | | 12 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 |
-
{Non-refactorable}
Mapping Summary
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) | 29.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | for (int i = 1; i < l_xValues.length; i++) | | 25 | for (int i = 1; i < l_xValues.length; i++) |
14 | l_x = x_domainAxis.valueToJava2D(((Double)l_xValues[i]).doubleValue(), x_dataArea, l_domainAxisLocation); | | 26 | l_x = x_domainAxis.valueToJava2D(((Double)l_xValues[i]).doubleValue(), x_dataArea, l_domainAxisLocation); |
15 | if (this.roundXCoordinates) | | 27 | if (this.roundXCoordinates) |
16 | | | 28 | |
17 | l_y = x_rangeAxis.valueToJava2D(((Double)l_yValues[i]).doubleValue(), x_dataArea, l_rangeAxisLocation); | | 29 | l_y = x_rangeAxis.valueToJava2D(((Double)l_yValues[i]).doubleValue(), x_dataArea, l_rangeAxisLocation); |
18 | l_path.lineTo((float)l_x, (float)l_y); | | 30 | l_path.lineTo((float)l_y, (float)l_x); |
Precondition Violations (4)
Row |
Violation |
1 | Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted |