File path: /jfreechart-1.0.10/src/org/jfree/chart/block/FlowArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/data/time/Second.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true; ↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof FlowArrangement)) {↵ | 4 | if (!(obj instanceof Second)) {↵ | |
5 | return false; ↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | FlowArrangement that = (FlowArrangement) obj;↵ | 7 | ↵ | |
8 | if (this.horizontalAlignment != that.horizontalAlignment↵ | 8 | Second that = (Second) obj;↵ | |
9 | ) {↵ | 9 | if (this.second != that.second) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (this.verticalAlignment != that.verticalAlignment) {↵ | 12 | if (this.minute != that.minute) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (this.horizontalGap != that.horizontalGap) {↵ | 15 | if (this.hour != that.hour) {↵ | |
16 | return false; ↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.verticalGap != that.verticalGap) {↵ | 18 | if (!this.day.equals(that.day)) {↵ | |
19 | return false; ↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | return true; | 21 |
| |
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) | 2.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 61 |
Number of mapped statements | 10 |
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) | 2.9 |
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 FlowArrangement)) |
| 3 | if (!(obj instanceof Second)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | Second that = (Second)obj; | |||||||||||||||||||||||||||||
5 | FlowArrangement that = (FlowArrangement)obj; | | |||||||||||||||||||||||||||||
6 | if (this.horizontalAlignment != that.horizontalAlignment) |
| 6 | if (this.second != that.second) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
8 | if (this.verticalAlignment != that.verticalAlignment) |
| 8 | if (this.minute != that.minute) | |||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
10 | if (this.horizontalGap != that.horizontalGap) |
| 10 | if (this.hour != that.hour) | |||||||||||||||||||||||||||
11 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.FlowArrangement does not match with type org.jfree.data.time.Second |
2 | Type org.jfree.ui.HorizontalAlignment of variable this.horizontalAlignment does not match with type byte of variable this.second |
3 | Type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment does not match with type byte of variable that.second |
4 | Expression that.horizontalAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.second cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment does not match with type byte of variable that.second |
7 | Type org.jfree.ui.VerticalAlignment of variable this.verticalAlignment does not match with type byte of variable this.minute |
8 | Type org.jfree.ui.VerticalAlignment of variable that.verticalAlignment does not match with type byte of variable that.minute |
9 | Expression that.verticalAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.minute cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type org.jfree.ui.VerticalAlignment of variable that.verticalAlignment does not match with type byte of variable that.minute |
12 | Type double of variable this.horizontalGap does not match with type byte of variable this.hour |
13 | Type double of variable that.horizontalGap does not match with type byte of variable that.hour |
14 | Expression that.horizontalGap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.hour cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type double of variable that.horizontalGap does not match with type byte of variable that.hour |
17 | Not all possible execution flows end in a return statement |
18 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.FlowArrangement and org.jfree.data.time.Second do not have a common superclass |