File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/LegendItemEntity.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialPointer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | ↵ | 3 | ↵ | |
4 | }↵ | 4 | }↵ | |
5 | if (!(obj instanceof LegendItemEntity)) {↵ | 5 | if (!(obj instanceof DialPointer.Pointer)) {↵ | |
6 | return false;↵ | 6 | return false;↵ | |
7 | }↵ | 7 | ↵ | |
8 | LegendItemEntity that = (LegendItemEntity) obj;↵ | |||
9 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)↵ | 8 | }↵ | |
9 | DialPointer.Pointer that = (DialPointer.Pointer) obj;↵ | |||
10 | ↵ | |||
10 | ) {↵ | 11 | if (this.widthRadius != that.widthRadius) {↵ | |
11 | return false;↵ | 12 | return false;↵ | |
12 | }↵ | 13 | }↵ | |
13 | if (this.seriesIndex != that.seriesIndex) {↵ | 14 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | |
14 | return false;↵ | 15 | return false;↵ | |
15 | ↵ | 16 | ↵ | |
16 | }↵ | 17 | }↵ | |
17 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) {↵ | 18 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | |
18 | return false;↵ | 19 | return false;↵ | |
19 | }↵ | 20 | ↵ | |
21 | }↵ | |||
20 | return super.equals(obj); | 22 | return super.equals(obj); | |
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.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 53 |
Number of mapped statements | 12 |
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) | 5.2 |
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 LegendItemEntity)) |
| 3 | if (!(obj instanceof DialPointer.Pointer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | LegendItemEntity that = (LegendItemEntity)obj; |
| 5 | DialPointer.Pointer that = (DialPointer.Pointer)obj; | ||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) |
| 8 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) | ||||||||||||||||||||||||||||||
7 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.seriesIndex != that.seriesIndex) |
| 6 | if (this.widthRadius != that.widthRadius) | ||||||||||||||||||||||||||||||
9 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) |
| 10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) | ||||||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
12 | return super.equals(obj); |
| 12 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Type java.lang.Comparable of variable this.seriesKey does not match with type java.awt.Paint of variable this.fillPaint |
2 | Expression that.seriesKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.fillPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type java.lang.Comparable of variable that.seriesKey does not match with type java.awt.Paint of variable that.fillPaint |
5 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
6 | Type int of variable this.seriesIndex does not match with type double of variable this.widthRadius |
7 | Expression that.seriesIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.widthRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type int of variable that.seriesIndex does not match with type double of variable that.widthRadius |
10 | Type org.jfree.data.general.Dataset of variable this.dataset does not match with type java.awt.Paint of variable this.outlinePaint |
11 | Expression that.dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.data.general.Dataset of variable that.dataset does not match with type java.awt.Paint of variable that.outlinePaint |
14 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
15 | Super method call return super.equals(obj); cannot be extracted from method |
16 | Super method call return super.equals(obj); cannot be extracted from method |
17 | The refactoring of the clones is infeasible, because classes org.jfree.chart.entity.LegendItemEntity and org.jfree.chart.plot.dial.DialPointer.Pointer do not have a common superclass |