if (this.hour != FIRST_HOUR_IN_DAY) {
result = new Hour(this.hour - 1, this.day);
}
else { // we are at the first hour in the day...
Day prevDay = (Day) this.day.previous();
if (prevDay != null) {
result = new Hour(LAST_HOUR_IN_DAY, prevDay);
}
else {
result = null;
if (this.hour != LAST_HOUR_IN_DAY) {
result = new Hour(this.hour + 1, this.day);
}
else { // we are at the last hour in the day...
Day nextDay = (Day) this.day.next();
if (nextDay != null) {
result = new Hour(FIRST_HOUR_IN_DAY, nextDay);
}
else {
result = null;
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/Hour.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/data/time/Hour.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | if (this.hour != FIRST_HOUR_IN_DAY) {↵ | | 1 | if (this.hour != LAST_HOUR_IN_DAY) {↵
|
2 | result = new Hour(this.hour - 1, this.day);↵ | | 2 | result = new Hour(this.hour + 1, this.day);↵
|
3 | }↵ | | 3 | }↵
|
4 | else { // we are at the first hour in the day...↵ | | 4 | else { // we are at the last hour in the day...↵
|
5 | Day prevDay = (Day) this.day.previous();↵ | | 5 | Day nextDay = (Day) this.day.next();↵
|
6 | if (prevDay != null) {↵ | | 6 | if (nextDay != null) {↵
|
7 | result = new Hour(LAST_HOUR_IN_DAY, prevDay);↵ | | 7 | result = new Hour(FIRST_HOUR_IN_DAY, nextDay);↵
|
8 | }↵ | | 8 | }↵
|
9 | else {↵ | | 9 | else {↵
|
10 | result = null;↵ | | 10 | result = null;↵
|
11 | | | 11 |
|
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.0 |
Clones location | |
Number of node comparisons | 0 |