1660-3-6

if (cnax != null) { if (xcycleBound == x[1]) { cnax.setBoundMappedToLastCycle(x[2] <= xcycleBound); } if (xcycleBound == x[2]) { cnax.setBoundMappedToLastCycle(x[1] <= xcycleBound); } }
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 (cnax != null) {↵

1

    if (cnay != null) {↵

2

                if (xcycleBound == x[1]) {↵

2

                    if (ycycleBound == y[2]) {↵

3

                    cnax.setBoundMappedToLastCycle(x[2] <= xcycleBound);↵

3

                        cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);↵

4

                }↵

4

                    }↵

5

                if (xcycleBound == x[2]) {↵

5

                    if (ycycleBound == y[3]) {↵

6

                    cnax.setBoundMappedToLastCycle(x[1] <= xcycleBound);↵

6

                        cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);↵

7

                }↵

7

                ↵

8

        }↵

8

            }

9

                }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in the same method
Number of node comparisons | 14

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 5
   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) | 1.3
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   84

       if (cnax != null)

   84 | if (cnax != null)
   101 | if (cnay != null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   cnax | cnay | VARIABLE_NAME_MISMATCH

   101

       if (cnay != null)

   85

       if (xcycleBound == x[1])

   85 | if (xcycleBound == x[1])
   104 | if (ycycleBound == y[3])

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xcycleBound | ycycleBound | VARIABLE_NAME_MISMATCH
   x | y | VARIABLE_NAME_MISMATCH
   1 | 3 | LITERAL_VALUE_MISMATCH

   104

       if (ycycleBound == y[3])

   86

       cnax.setBoundMappedToLastCycle(x[2] <= xcycleBound);

   86 | cnax.setBoundMappedToLastCycle(x[2] <= xcycleBound);
   105 | cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   x | y | VARIABLE_NAME_MISMATCH
   xcycleBound | ycycleBound | VARIABLE_NAME_MISMATCH
   cnax | cnay | VARIABLE_NAME_MISMATCH

   105

       cnay.setBoundMappedToLastCycle(y[2] <= ycycleBound);

   87

       if (xcycleBound == x[2])

   87 | if (xcycleBound == x[2])
   102 | if (ycycleBound == y[2])

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xcycleBound | ycycleBound | VARIABLE_NAME_MISMATCH
   x | y | VARIABLE_NAME_MISMATCH

   102

       if (ycycleBound == y[2])

   88

       cnax.setBoundMappedToLastCycle(x[1] <= xcycleBound);

   88 | cnax.setBoundMappedToLastCycle(x[1] <= xcycleBound);
   103 | cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   x | y | VARIABLE_NAME_MISMATCH
   1 | 3 | LITERAL_VALUE_MISMATCH
   xcycleBound | ycycleBound | VARIABLE_NAME_MISMATCH
   cnax | cnay | VARIABLE_NAME_MISMATCH

   103

       cnay.setBoundMappedToLastCycle(y[3] <= ycycleBound);

   Precondition Violations (0)
   Row | Violation
   --- | ---