File path: /jfreechart-1.0.10/src/org/jfree/chart/block/BorderArrangement.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/CategoryItemEntity.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof BorderArrangement)) {↵ | 4 | if (!(obj instanceof CategoryItemEntity)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | BorderArrangement that = (BorderArrangement) obj;↵ | 7 | CategoryItemEntity that = (CategoryItemEntity) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) {↵ | 8 | if (!this.rowKey.equals(that.rowKey)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) {↵ | 11 | if (!this.columnKey.equals(that.columnKey)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) {↵ | 14 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)↵ | 17 | ↵ | |
18 | // check the deprecated fields↵ | |||
19 | if (this.categoryIndex != that.categoryIndex) {↵ | |||
20 | return false; ↵ | |||
21 | }↵ | |||
18 | ) {↵ | 22 | if (this.series != that.series) {↵ | |
19 | return false;↵ | 23 | return false; ↵ | |
20 | }↵ | 24 | }↵ | |
21 | if (!ObjectUtilities.equal(this.centerBlock, that.centerBlock)) {↵ | 25 | if (!ObjectUtilities.equal(this.category, that.category)) {↵ | |
22 | return false;↵ | 26 | return false; ↵ | |
23 | }↵ | 27 | }↵ | |
24 | return true; | 28 | 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) | 4.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 105 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 4.5 |
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 BorderArrangement)) |
| 3 | if (!(obj instanceof CategoryItemEntity)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | CategoryItemEntity that = (CategoryItemEntity)obj; | |||||||||||||||||||||||||||||
5 | BorderArrangement that = (BorderArrangement)obj; | | |||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.topBlock, that.topBlock)) |
| 10 | if (!ObjectUtilities.equal(this.dataset, that.dataset)) | |||||||||||||||||||||||||||
7 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
| 12 | if (this.categoryIndex != that.categoryIndex) | |||||||||||||||||||||||||||||
|
| 13 | return false; | ||||||||||||||||||||||||||||
| 14 | if (this.series != that.series) | |||||||||||||||||||||||||||||
|
| 15 | return false; | ||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.bottomBlock, that.bottomBlock)) |
| 16 | if (!ObjectUtilities.equal(this.category, that.category)) | |||||||||||||||||||||||||||
9 | return false; | 17 | return false; | ||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.leftBlock, that.leftBlock)) |
| 8 | if (!this.columnKey.equals(that.columnKey)) | |||||||||||||||||||||||||||
11 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.rightBlock, that.rightBlock)) |
| 6 | if (!this.rowKey.equals(that.rowKey)) | |||||||||||||||||||||||||||
13 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.block.BorderArrangement does not match with type org.jfree.chart.entity.CategoryItemEntity |
2 | Type org.jfree.chart.block.Block of variable this.topBlock does not match with type org.jfree.data.category.CategoryDataset of variable this.dataset |
3 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type org.jfree.data.category.CategoryDataset of variable that.dataset |
4 | Expression that.topBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.block.Block of variable that.topBlock does not match with type org.jfree.data.category.CategoryDataset of variable that.dataset |
7 | Unmatched return false; |
8 | Unmatched return false; |
9 | Type org.jfree.chart.block.Block of variable this.bottomBlock does not match with type java.lang.Object of variable this.category |
10 | Type org.jfree.chart.block.Block of variable that.bottomBlock does not match with type java.lang.Object of variable that.category |
11 | Expression that.bottomBlock cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.category cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.chart.block.Block of variable that.bottomBlock does not match with type java.lang.Object of variable that.category |
14 | Expression ObjectUtilities.equal(this.leftBlock,that.leftBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression this.columnKey.equals(that.columnKey) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression ObjectUtilities.equal(this.rightBlock,that.rightBlock) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression this.rowKey.equals(that.rowKey) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Not all possible execution flows end in a return statement |
19 | The refactoring of the clones is infeasible, because classes org.jfree.chart.block.BorderArrangement and org.jfree.chart.entity.CategoryItemEntity do not have a common superclass |