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.minStartIndex >= 0) {↵ | 1 | if (this.minEndIndex >= 0) {↵ | |
2 | long minStart = getDataItem(this.minStartIndex).getPeriod()↵ | 2 | long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd()↵ | |
3 | .getStart().getTime();↵ | 3 | .getTime();↵ | |
4 | if (start < minStart) {↵ | 4 | if (end < minEnd) {↵ | |
5 | this.minStartIndex = index; ↵ | 5 | this.minEndIndex = index; ↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | else {↵ | 8 | else {↵ | |
9 | this.minStartIndex = index;↵ | 9 | this.minEndIndex = index;↵ | |
10 | } | 10 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
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) | 4.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | if (this.minStartIndex >= 0) |
| 28 | if (this.minEndIndex >= 0) | ||||||||||||||||||
5 | long minStart = getDataItem(this.minStartIndex).getPeriod().getStart().getTime(); |
| 29 | long minEnd = getDataItem(this.minEndIndex).getPeriod().getEnd().getTime(); | ||||||||||||||||||
6 | if (start < minStart) |
| 30 | if (end < minEnd) | ||||||||||||||||||
7 | this.minStartIndex = index; |
| 31 | this.minEndIndex = index; | ||||||||||||||||||
else | else | |||||||||||||||||||||
8 | this.minStartIndex = index; |
| 32 | this.minEndIndex = index; |
Row | Violation |
---|---|
1 | Expression getDataItem(this.minStartIndex).getPeriod().getStart() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression getDataItem(this.minEndIndex).getPeriod().getEnd() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.minStartIndex is a field being modified, and thus it cannot be parameterized |
4 | Expression this.minEndIndex is a field being modified, and thus it cannot be parameterized |
5 | Expression this.minStartIndex is a field being modified, and thus it cannot be parameterized |
6 | Expression this.minEndIndex is a field being modified, and thus it cannot be parameterized |