File path: /jfreechart-1.0.10/src/org/jfree/data/time/Quarter.java | File path: /jfreechart-1.0.10/src/org/jfree/data/time/Week.java | |||
Method name: RegularTimePeriod next()
|
Method name: RegularTimePeriod next()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (this.quarter < LAST_QUARTER) {↵ | 1 | if (this.week < actualMaxWeek) {↵ | |
2 | result = new Quarter(this.quarter + 1, this.year);↵ | 2 | result = new Week(this.week + 1, this.year);↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | if (this.year < 9999) {↵ | 5 | if (this.year < 9999) {↵ | |
6 | result = new Quarter(FIRST_QUARTER, this.year + 1);↵ | 6 | result = new Week(FIRST_WEEK_IN_YEAR, this.year + 1);↵ | |
7 | }↵ | 7 | }↵ | |
8 | else {↵ | 8 | else {↵ | |
9 | result = null;↵ | 9 | result = null;↵ | |
10 | }↵ | 10 | ↵ | |
11 | }↵ | |||
11 | } | 12 | } | |
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 different classes having the same super class |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (this.quarter < LAST_QUARTER) |
| 7 | if (this.week < actualMaxWeek) | ||||||||||||||||||
3 | result = new Quarter(this.quarter + 1, this.year); |
| 8 | result = new Week(this.week + 1, this.year); | ||||||||||||||||||
else | else | |||||||||||||||||||||
4 | if (this.year < 9999) | 9 | if (this.year < 9999) | |||||||||||||||||||
5 | result = new Quarter(FIRST_QUARTER, this.year + 1); |
| 10 | result = new Week(FIRST_WEEK_IN_YEAR, this.year + 1); | ||||||||||||||||||
else | else | |||||||||||||||||||||
6 | result = null; |
| 11 | result = null; |
Row | Violation |
---|---|
1 | Expression new Quarter(FIRST_QUARTER,this.year + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new Week(FIRST_WEEK_IN_YEAR,this.year + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Clone fragment #1 returns variable result with type org.jfree.data.time.Quarter , while Clone fragment #2 returns variable result with type org.jfree.data.time.Week |