File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/LegendItemEntity.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/MinMaxCategoryRenderer.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 | if (!(obj instanceof LegendItemEntity)) {↵ | 4 | if (!(obj instanceof MinMaxCategoryRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | LegendItemEntity that = (LegendItemEntity) obj;↵ | 7 | ↵ | |
8 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)↵ | 8 | MinMaxCategoryRenderer that = (MinMaxCategoryRenderer) obj;↵ | |
9 | ) {↵ | 9 | if (this.plotLines != that.plotLines) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (this.seriesIndex != that.seriesIndex) {↵ | 12 | if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) {↵ | |
13 | return false; ↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) {↵ | 15 | if (!this.groupStroke.equals(that.groupStroke)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | return super.equals(obj); | 18 |
| |
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.0 |
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) | 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 LegendItemEntity)) |
| 3 | if (!(obj instanceof MinMaxCategoryRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | LegendItemEntity that = (LegendItemEntity)obj; |
| 5 | MinMaxCategoryRenderer that = (MinMaxCategoryRenderer)obj; | ||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) |
| 8 | if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) | ||||||||||||||||||||||||||||||
7 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.seriesIndex != that.seriesIndex) |
| 6 | if (this.plotLines != that.plotLines) | ||||||||||||||||||||||||||||||
9 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) |
| 10 | if (!this.groupStroke.equals(that.groupStroke)) | ||||||||||||||||||||||||||||||
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.groupPaint |
2 | Expression that.seriesKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.groupPaint 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.groupPaint |
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 boolean of variable this.plotLines |
7 | Expression that.seriesIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.plotLines 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 boolean of variable that.plotLines |
10 | Expression ObjectUtilities.equal(this.dataset,that.dataset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression this.groupStroke.equals(that.groupStroke) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Super method call return super.equals(obj); cannot be extracted from method |
13 | Super method call return super.equals(obj); cannot be extracted from method |
14 | The refactoring of the clones is infeasible, because classes org.jfree.chart.entity.LegendItemEntity and org.jfree.chart.renderer.category.MinMaxCategoryRenderer do not have a common superclass |