if (this.maxStartIndex >= 0) { long maxStart = getDataItem(this.maxStartIndex).getPeriod() .getStart().getTime(); if (start > maxStart) { this.maxStartIndex = index; } } else { this.maxStartIndex = index; }
if (this.minEndIndex >= 0) { long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd() .getTime(); if (end < minEnd) { this.minEndIndex = index; } } else { this.minEndIndex = index; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/TimePeriodValues.java File path: /jfreechart-1.0.10/src/org/jfree/data/time/TimePeriodValues.java
Method name: void updateBounds(TimePeriod, int) Method name: void updateBounds(TimePeriod, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (this.maxStartIndex >= 0) {
1
if (this.minEndIndex >= 0) {
2
            long maxStart = getDataItem(this.maxStartIndex).getPeriod()
2
            long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd()
3
                .getStart().getTime();
3
                .getTime();
4
            if (start > maxStart) {
4
            if (end < minEnd) {
5
                this.maxStartIndex = index;           
5
                this.minEndIndex = index;           
6
            }
6
            }
7
        }
7
        }
8
        else {
8
        else {
9
            this.maxStartIndex = index;
9
            this.minEndIndex = index;
10
        }
10
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons1