File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/LegendItemEntity.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/StandardCategoryURLGenerator.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 StandardCategoryURLGenerator)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | LegendItemEntity that = (LegendItemEntity) obj;↵ | 7 | StandardCategoryURLGenerator that = (StandardCategoryURLGenerator) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) {↵ | 8 | if (!ObjectUtilities.equal(this.prefix, that.prefix)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.seriesIndex != that.seriesIndex↵ | 11 | if (!ObjectUtilities.equal(this.seriesParameterName,↵ | |
12 | ) {↵ | 12 | that.seriesParameterName)) {↵ | |
13 | return false; ↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!ObjectUtilities.equal(this.dataset,↵ | 15 | if (!ObjectUtilities.equal(this.categoryParameterName,↵ | |
16 | that.dataset)) {↵ | 16 | that.categoryParameterName)) {↵ | |
17 | return false;↵ | 17 | return false;↵ | |
18 | }↵ | 18 | }↵ | |
19 | return super.equals(obj); | 19 | 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) | 2.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 47 |
Number of mapped statements | 8 |
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) | 2.3 |
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 LegendItemEntity)) |
| 3 | if (!(obj instanceof StandardCategoryURLGenerator)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | StandardCategoryURLGenerator that = (StandardCategoryURLGenerator)obj; | |||||||||||||||||||||||||||||
5 | LegendItemEntity that = (LegendItemEntity)obj; | | |||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.seriesKey, that.seriesKey)) |
| 6 | if (!ObjectUtilities.equal(this.prefix, that.prefix)) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
8 | if (this.seriesIndex != that.seriesIndex) | | |||||||||||||||||||||||||||||
9 | return false; |
| | ||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) |
| 8 | if (!ObjectUtilities.equal(this.seriesParameterName, that.seriesParameterName)) | |||||||||||||||||||||||||||
11 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.entity.LegendItemEntity does not match with type org.jfree.chart.urls.StandardCategoryURLGenerator |
2 | Type java.lang.Comparable of variable this.seriesKey does not match with type java.lang.String of variable this.prefix |
3 | Type java.lang.Comparable of variable that.seriesKey does not match with type java.lang.String of variable that.prefix |
4 | Expression that.seriesKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.prefix cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.lang.Comparable of variable that.seriesKey does not match with type java.lang.String of variable that.prefix |
7 | Unmatched return false; |
8 | Type org.jfree.data.general.Dataset of variable this.dataset does not match with type java.lang.String of variable this.seriesParameterName |
9 | Type org.jfree.data.general.Dataset of variable that.dataset does not match with type java.lang.String of variable that.seriesParameterName |
10 | Expression that.dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.seriesParameterName cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.data.general.Dataset of variable that.dataset does not match with type java.lang.String of variable that.seriesParameterName |
13 | Not all possible execution flows end in a return statement |
14 | The refactoring of the clones is infeasible, because classes org.jfree.chart.entity.LegendItemEntity and org.jfree.chart.urls.StandardCategoryURLGenerator do not have a common superclass |