File path: /jfreechart-1.0.10/src/org/jfree/data/time/Millisecond.java | File path: /jfreechart-1.0.10/src/org/jfree/data/time/Millisecond.java | |||
Method name: RegularTimePeriod previous()
|
Method name: RegularTimePeriod next()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (this.millisecond != FIRST_MILLISECOND_IN_SECOND) {↵ | 1 | if (this.millisecond != LAST_MILLISECOND_IN_SECOND) {↵ | |
2 | result = new Millisecond(this.millisecond - 1, getSecond());↵ | 2 | result = new Millisecond(this.millisecond + 1, getSecond());↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | Second previous = (Second) getSecond().previous();↵ | 5 | Second next = (Second) getSecond().next();↵ | |
6 | if (previous != null) {↵ | 6 | if (next != null) {↵ | |
7 | result = new Millisecond(LAST_MILLISECOND_IN_SECOND, previous);↵ | 7 | result = new Millisecond(FIRST_MILLISECOND_IN_SECOND, next);↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (this.millisecond != FIRST_MILLISECOND_IN_SECOND) |
| 2 | if (this.millisecond != LAST_MILLISECOND_IN_SECOND) | |||||||||||||
|
| 3 | result = new Millisecond(this.millisecond + 1, getSecond()); | ||||||||||||||
3 | result = new Millisecond(this.millisecond - 1, getSecond()); |
| | ||||||||||||||
else | else | ||||||||||||||||
4 | Second previous = (Second)getSecond().previous(); |
| 4 | Second next = (Second)getSecond().next(); | |||||||||||||
5 | if (previous != null) |
| 5 | if (next != null) | |||||||||||||
6 | result = new Millisecond(LAST_MILLISECOND_IN_SECOND, previous); |
| 6 | result = new Millisecond(FIRST_MILLISECOND_IN_SECOND, next); |
Row | Violation |
---|---|
1 | Unmatched statement result=new Millisecond(this.millisecond + 1,getSecond()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement result=new Millisecond(this.millisecond - 1,getSecond()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |