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
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)79.5
    Clone typeType 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
    l_x = Math.rint(l_x);
    28
    l_x = Math.rint(l_x);
    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);
    18
    l_path.lineTo((float)l_x, (float)l_y);
    30
    l_path.lineTo((float)l_y, (float)l_x);
    Differences
    Expression1Expression2Difference
    l_xl_yVARIABLE_NAME_MISMATCH
    l_yl_xVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted
    30
    l_path.lineTo((float)l_y, (float)l_x);
    Precondition Violations (4)
    Row Violation
    1Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression l_y cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression l_x cannot be parameterized, because it has dependencies to/from statements that will be extracted