if (cnay != null) { if (ycycleBound == y[0]) { cnay.setBoundMappedToLastCycle(y[1] <= ycycleBound); } if (ycycleBound == y[1]) { cnay.setBoundMappedToLastCycle(y[0] <= ycycleBound); } }
if (cnay != null) { if (ycycleBound == y[2]) { cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound); } if (ycycleBound == y[3]) { cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/CyclicXYItemRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/CyclicXYItemRenderer.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: 5 Number of AST nodes: 5
1
if (cnay != null) {
1
if (cnay != null) {
2
            if (ycycleBound == y[0]) {
2
                if (ycycleBound == y[2]) {
3
                cnay.setBoundMappedToLastCycle(y[1] <= ycycleBound);
3
                    cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);
4
            }
4
                }
5
            if (ycycleBound == y[1]) {
5
                if (ycycleBound == y[3]) {
6
                cnay.setBoundMappedToLastCycle(y[0] <= ycycleBound);
6
                    cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);
7
            }
7
            
8
    }
8
        }
9
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    78
    if (cnay != null)
    101
    if (cnay != null)
    79
    if (ycycleBound == y[0])
    79
    if (ycycleBound == y[0])
    102
    if (ycycleBound == y[2])
    Differences
    Expression1Expression2Difference
    02LITERAL_VALUE_MISMATCH
    102
    if (ycycleBound == y[2])
    80
    cnay.setBoundMappedToLastCycle(y[1] <= ycycleBound);
    80
    cnay.setBoundMappedToLastCycle(y[1] <= ycycleBound);
    103
    cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);
    Differences
    Expression1Expression2Difference
    13LITERAL_VALUE_MISMATCH
    103
    cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);
    81
    if (ycycleBound == y[1])
    81
    if (ycycleBound == y[1])
    104
    if (ycycleBound == y[3])
    Differences
    Expression1Expression2Difference
    13LITERAL_VALUE_MISMATCH
    104
    if (ycycleBound == y[3])
    82
    cnay.setBoundMappedToLastCycle(y[0] <= ycycleBound);
    82
    cnay.setBoundMappedToLastCycle(y[0] <= ycycleBound);
    105
    cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);
    Differences
    Expression1Expression2Difference
    02LITERAL_VALUE_MISMATCH
    105
    cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);
    Precondition Violations (0)
    Row Violation