if (this.minEndIndex >= 0) { long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd() .getTime(); if (end < minEnd) { this.minEndIndex = index; } } else { this.minEndIndex = index; }
if (this.maxEndIndex >= 0) { long maxEnd = getDataItem(this.maxEndIndex).getPeriod().getEnd() .getTime(); if (end > maxEnd) { this.maxEndIndex = index; } } else { this.maxEndIndex = 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.minEndIndex >= 0) {
1
if (this.maxEndIndex >= 0) {
2
            long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd()
2
            long maxEnd = getDataItem(this.maxEndIndex).getPeriod().getEnd()
3
                .getTime();
3
                .getTime();
4
            if (end < minEnd) {
4
            if (end > maxEnd) {
5
                this.minEndIndex = index;           
5
                this.maxEndIndex = index;           
6
            }
6
            }
7
        }
7
        }
8
        else {
8
        else {
9
            this.minEndIndex = index;
9
            this.maxEndIndex = 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