File path: /jfreechart-1.0.10/src/org/jfree/data/time/Millisecond.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYInterval.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof Millisecond)) {↵ | 4 | if (!(obj instanceof XYInterval)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | Millisecond that = (Millisecond) obj;↵ | 7 | XYInterval that = (XYInterval) obj;↵ | |
8 | if (this.millisecond != that.millisecond) {↵ | 8 | if (this.xLow != that.xLow) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.second != that.second) {↵ | 11 | if (this.xHigh != that.xHigh) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (this.minute != that.minute) {↵ | 14 | if (this.y != that.y) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.hour != that.hour) {↵ | 17 | if (this.yLow != that.yLow) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (!this.day.equals(that.day)) {↵ | 20 | if (this.yHigh != that.yHigh) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | return true; | 23 |
| |
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) | 3.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 86 |
Number of mapped statements | 12 |
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) | 3.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | ||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||
3 | if (!(obj instanceof Millisecond)) |
| 3 | if (!(obj instanceof XYInterval)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | XYInterval that = (XYInterval)obj; | |||||||||||||||||||||||||||||
5 | Millisecond that = (Millisecond)obj; | | |||||||||||||||||||||||||||||
6 | if (this.millisecond != that.millisecond) |
| 6 | if (this.xLow != that.xLow) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
8 | if (this.second != that.second) |
| 8 | if (this.xHigh != that.xHigh) | |||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
10 | if (this.minute != that.minute) |
| 10 | if (this.y != that.y) | |||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
12 | if (this.hour != that.hour) |
| 12 | if (this.yLow != that.yLow) | |||||||||||||||||||||||||||
13 | return false; | 13 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.data.time.Millisecond does not match with type org.jfree.data.xy.XYInterval |
2 | Type int of variable this.millisecond does not match with type double of variable this.xLow |
3 | Type int of variable that.millisecond does not match with type double of variable that.xLow |
4 | Expression that.millisecond cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.xLow cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type int of variable that.millisecond does not match with type double of variable that.xLow |
7 | Type byte of variable this.second does not match with type double of variable this.xHigh |
8 | Type byte of variable that.second does not match with type double of variable that.xHigh |
9 | Expression that.second cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.xHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type byte of variable that.second does not match with type double of variable that.xHigh |
12 | Type byte of variable this.minute does not match with type double of variable this.y |
13 | Type byte of variable that.minute does not match with type double of variable that.y |
14 | Expression that.minute cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type byte of variable that.minute does not match with type double of variable that.y |
17 | Type byte of variable this.hour does not match with type double of variable this.yLow |
18 | Type byte of variable that.hour does not match with type double of variable that.yLow |
19 | Expression that.hour cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression that.yLow cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type byte of variable that.hour does not match with type double of variable that.yLow |
22 | Not all possible execution flows end in a return statement |
23 | The refactoring of the clones is infeasible, because classes org.jfree.data.time.Millisecond and org.jfree.data.xy.XYInterval do not have a common superclass |