File path: /jfreechart-1.0.10/src/org/jfree/chart/title/Title.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 Title)) {↵ | 4 | if (!(obj instanceof XYInterval)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)↵ | 7 | XYInterval that = (XYInterval) obj;↵ | |
8 | ) {↵ | 8 | if (this.xLow != that.xLow) {↵ | |
9 | return false; ↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | Title that = (Title) obj;↵ | |||
12 | if (this.position != that.position) {↵ | 11 | if (this.xHigh != that.xHigh) {↵ | |
13 | return false;↵ | 12 | return false;↵ | |
14 | }↵ | 13 | }↵ | |
15 | if (this.horizontalAlignment != that.horizontalAlignment) {↵ | 14 | if (this.y != that.y) {↵ | |
16 | return false;↵ | 15 | return false;↵ | |
17 | }↵ | 16 | }↵ | |
18 | if (this.verticalAlignment != that.verticalAlignment) {↵ | 17 | if (this.yLow != that.yLow) {↵ | |
19 | return false;↵ | 18 | return false;↵ | |
20 | }↵ | 19 | }↵ | |
21 | if (this.notify != that.notify) {↵ | 20 | if (this.yHigh != that.yHigh) {↵ | |
22 | return false;↵ | 21 | return false;↵ | |
23 | }↵ | 22 | }↵ | |
24 | 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.6 |
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 | 3 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | ||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||
3 | if (!(obj instanceof Title)) |
| 3 | if (!(obj instanceof XYInterval)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | XYInterval that = (XYInterval)obj; | |||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) | | |||||||||||||||||||||||||||||
6 | return false; |
| | ||||||||||||||||||||||||||||
7 | Title that = (Title)obj; | | |||||||||||||||||||||||||||||
8 | if (this.position != that.position) |
| 8 | if (this.xHigh != that.xHigh) | |||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
10 | if (this.horizontalAlignment != that.horizontalAlignment) |
| 10 | if (this.y != that.y) | |||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
12 | if (this.verticalAlignment != that.verticalAlignment) |
| 12 | if (this.yLow != that.yLow) | |||||||||||||||||||||||||||
13 | return false; | 13 | return false; | ||||||||||||||||||||||||||||
14 | if (this.notify != that.notify) |
| 6 | if (this.xLow != that.xLow) | |||||||||||||||||||||||||||
15 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.title.Title does not match with type org.jfree.data.xy.XYInterval |
2 | Unmatched return false; |
3 | Type org.jfree.ui.RectangleEdge of variable this.position does not match with type double of variable this.xHigh |
4 | Type org.jfree.ui.RectangleEdge of variable that.position does not match with type double of variable that.xHigh |
5 | Expression that.position cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.xHigh cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type org.jfree.ui.RectangleEdge of variable that.position does not match with type double of variable that.xHigh |
8 | Type org.jfree.ui.HorizontalAlignment of variable this.horizontalAlignment does not match with type double of variable this.y |
9 | Type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment does not match with type double of variable that.y |
10 | Expression that.horizontalAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.y cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment does not match with type double of variable that.y |
13 | Type org.jfree.ui.VerticalAlignment of variable this.verticalAlignment does not match with type double of variable this.yLow |
14 | Type org.jfree.ui.VerticalAlignment of variable that.verticalAlignment does not match with type double of variable that.yLow |
15 | Expression that.verticalAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.yLow cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type org.jfree.ui.VerticalAlignment of variable that.verticalAlignment does not match with type double of variable that.yLow |
18 | Type boolean of variable this.notify does not match with type double of variable this.xLow |
19 | Type boolean of variable that.notify does not match with type double of variable that.xLow |
20 | Expression that.notify cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.xLow cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type boolean of variable that.notify does not match with type double of variable that.xLow |
23 | Not all possible execution flows end in a return statement |
24 | The refactoring of the clones is infeasible, because classes org.jfree.chart.title.Title and org.jfree.data.xy.XYInterval do not have a common superclass |