File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBlockRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/Title.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | 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 XYBlockRenderer)) {↵ | 4 | if (!(obj instanceof Title)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | XYBlockRenderer that = (XYBlockRenderer↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false; ↵ | |||
9 | }↵ | |||
8 | ) obj;↵ | 10 | Title that = (Title) obj;↵ | |
9 | if (this.blockHeight != that.blockHeight) {↵ | 11 | if (this.position != that.position) {↵ | |
10 | return false;↵ | 12 | return false;↵ | |
11 | }↵ | 13 | }↵ | |
12 | if (this.blockWidth != that.blockWidth) {↵ | 14 | if (this.horizontalAlignment != that.horizontalAlignment) {↵ | |
13 | return false;↵ | 15 | return false;↵ | |
14 | }↵ | 16 | }↵ | |
15 | if (!this.blockAnchor.equals(that.blockAnchor)) {↵ | 17 | if (this.verticalAlignment != that.verticalAlignment) {↵ | |
16 | return false;↵ | 18 | return false;↵ | |
17 | }↵ | 19 | }↵ | |
18 | if (!this.paintScale.equals(that.paintScale)) {↵ | 20 | if (this.notify != that.notify) {↵ | |
19 | return false;↵ | 21 | return false;↵ | |
20 | }↵ | 22 | }↵ | |
21 | return super.equals(obj); | 23 | return true; | |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 64 |
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) | 3.3 |
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 XYBlockRenderer)) |
| 3 | if (!(obj instanceof Title)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
5 | XYBlockRenderer that = (XYBlockRenderer)obj; | | |||||||||||||||||||||||||||||
| 7 | Title that = (Title)obj; | |||||||||||||||||||||||||||||
6 | if (this.blockHeight != that.blockHeight) |
| 8 | if (this.position != that.position) | |||||||||||||||||||||||||||
7 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
8 | if (this.blockWidth != that.blockWidth) |
| 10 | if (this.horizontalAlignment != that.horizontalAlignment) | |||||||||||||||||||||||||||
9 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
10 | if (!this.blockAnchor.equals(that.blockAnchor)) |
| 5 | if (!super.equals(obj)) | |||||||||||||||||||||||||||
11 | return false; | 6 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.renderer.xy.XYBlockRenderer does not match with type org.jfree.chart.title.Title |
2 | Type double of variable this.blockHeight does not match with type org.jfree.ui.RectangleEdge of variable this.position |
3 | Type double of variable that.blockHeight does not match with type org.jfree.ui.RectangleEdge of variable that.position |
4 | Expression that.blockHeight cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.position cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type double of variable that.blockHeight does not match with type org.jfree.ui.RectangleEdge of variable that.position |
7 | Type double of variable this.blockWidth does not match with type org.jfree.ui.HorizontalAlignment of variable this.horizontalAlignment |
8 | Type double of variable that.blockWidth does not match with type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment |
9 | Expression that.blockWidth cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.horizontalAlignment cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type double of variable that.blockWidth does not match with type org.jfree.ui.HorizontalAlignment of variable that.horizontalAlignment |
12 | Expression this.blockAnchor.equals(that.blockAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Super method call if(!super.equals(obj)) cannot be extracted from method |
14 | Not all possible execution flows end in a return statement |
15 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.XYBlockRenderer and org.jfree.chart.title.Title do not have a common superclass |