File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CategoryLabelPositions.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateTickUnit.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (this == obj) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CategoryLabelPositions)) {↵ | 4 | if (!(obj instanceof DateTickUnit)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | CategoryLabelPositions that = (CategoryLabelPositions) obj;↵ | |||
8 | if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
9 | return false;↵ | 8 | return false;↵ | |
10 | }↵ | 9 | }↵ | |
11 | if (!this.positionForAxisAtBottom.equals(↵ | 10 | ↵ | |
12 | that.positionForAxisAtBottom)↵ | 11 | DateTickUnit that = (DateTickUnit) obj;↵ | |
13 | ) {↵ | 12 | if (this.unit != that.unit) {↵ | |
14 | return false;↵ | 13 | return false;↵ | |
15 | }↵ | 14 | }↵ | |
16 | if (!this.positionForAxisAtLeft.equals(that.positionForAxisAtLeft)) {↵ | 15 | if (this.count != that.count) {↵ | |
17 | return false;↵ | 16 | return false;↵ | |
18 | }↵ | 17 | }↵ | |
19 | if (!this.positionForAxisAtRight.equals(that.positionForAxisAtRight)) {↵ | 18 | if (!ObjectUtilities.equal(this.formatter, that.formatter)) {↵ | |
20 | return false;↵ | 19 | return false;↵ | |
21 | }↵ | 20 | }↵ | |
22 | ↵ | |||
23 | return true; | 21 |
| |
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 | 55 |
Number of mapped statements | 6 |
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) | 7.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof CategoryLabelPositions)) |
| 3 | if (!(obj instanceof DateTickUnit)) | ||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
5 | CategoryLabelPositions that = (CategoryLabelPositions)obj; | | ||||||||||||||
6 | if (!this.positionForAxisAtTop.equals(that.positionForAxisAtTop)) |
| 5 | if (!super.equals(obj)) | ||||||||||||
7 | return false; | 6 | return false; | |||||||||||||
| 7 | DateTickUnit that = (DateTickUnit)obj; | ||||||||||||||
| 8 | if (this.unit != that.unit) | ||||||||||||||
|
| 9 | return false; | |||||||||||||
| 10 | if (this.count != that.count) | ||||||||||||||
|
| 11 | return false; | |||||||||||||
8 | if (!this.positionForAxisAtBottom.equals(that.positionForAxisAtBottom)) |
| 12 | if (!ObjectUtilities.equal(this.formatter, that.formatter)) | ||||||||||||
9 | return false; | 13 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.CategoryLabelPositions does not match with type org.jfree.chart.axis.DateTickUnit |
2 | Expression this.positionForAxisAtTop.equals(that.positionForAxisAtTop) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Unmatched return false; |
5 | Unmatched return false; |
6 | Expression this.positionForAxisAtBottom.equals(that.positionForAxisAtBottom) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression ObjectUtilities.equal(this.formatter,that.formatter) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Not all possible execution flows end in a return statement |