424-1-3

while (high - low > 1) { double midV = dataset.getXValue(series, mid); if (midV >= xLow) { low = mid; } else { high = mid; } mid = (low + high) / 2; }
while (high - low > 1) { double midV = dataset.getXValue(series, mid); if (midV > xHigh) { low = mid; } else { high = mid; } mid = (low + high) / 2; }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/RendererUtilities.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/RendererUtilities.java
Method name: `int findLiveItemsUpperBound(XYDataset, int, double, double)` |  | Method name: `int findLiveItemsLowerBound(XYDataset, int, double, double)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    while (high - low > 1) {↵

1

    while (high - low > 1) {↵

2

                    double midV = dataset.getXValue(series, mid);↵

2

                    double midV = dataset.getXValue(series, mid);↵

3

                    if (midV >= xLow) {↵

3

                    if (midV > xHigh) {↵

4

                        low = mid;↵

4

                        low = mid;↵

5

                    }↵

5

                    }↵

6

                    else {↵

6

                    else {↵

7

                        high = mid;↵

7

                        high = mid;↵

8

                    }↵

8

                    }↵

9

                    mid = (low + high) / 2;↵

9

                    mid = (low + high) / 2;↵

10

                }

10

                }

See real code fragment |  | See real code fragment

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