File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/MonthDateFormat.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (this == obj) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof MonthDateFormat)) {↵ | 4 | if (obj instanceof Tick) {↵ | |
5 | return false;↵ | 5 | ↵ | |
6 | ↵ | 6 | Tick t = (Tick) obj; ↵ | |
7 | }↵ | 7 | ↵ | |
8 | if (!super.equals(obj)) {↵ | 8 | if (!ObjectUtilities.equal(this.text, t.text)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | ↵ | |
11 | MonthDateFormat that = (MonthDateFormat) obj;↵ | 11 | ↵ | |
12 | if (!Array↵ | 12 | }↵ | |
13 | s.equals(this.months, that.months)) {↵ | 13 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | |
14 | return false;↵ | 14 | return false;↵ | |
15 | ↵ | |||
15 | }↵ | 16 | }↵ | |
16 | if (!Arrays.equals(this.showYear, that.showYear)) {↵ | 17 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | |
17 | return false;↵ | 18 | return false;↵ | |
19 | ↵ | |||
18 | }↵ | 20 | }↵ | |
19 | if (!this.yearFormatter.equals(that.yearFormatter)) {↵ | 21 | if (!(this.angle == t.angle)) {↵ | |
20 | return false;↵ | 22 | return false; ↵ | |
21 | }↵ | 23 | }↵ | |
22 | return true; | 24 | return true;↵ | |
25 | }↵ | |||
26 |
| |||
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 52 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.1 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | Tick t = (Tick)obj; | ||||||||||||||
| 5 | if (!ObjectUtilities.equal(this.text, t.text)) | ||||||||||||||
|
| 6 | return false; | |||||||||||||
3 | if (!(obj instanceof MonthDateFormat)) |
| 11 | if (!(this.angle == t.angle)) | ||||||||||||
4 | return false; | 12 | return false; | |||||||||||||
5 | if (!super.equals(obj)) |
| 7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) | ||||||||||||
6 | return false; | 8 | return false; | |||||||||||||
7 | MonthDateFormat that = (MonthDateFormat)obj; | | ||||||||||||||
8 | if (!Arrays.equals(this.months, that.months)) | | ||||||||||||||
9 | return false; |
| | |||||||||||||
10 | if (!Arrays.equals(this.showYear, that.showYear)) | | ||||||||||||||
11 | return false; |
| | |||||||||||||
12 | if (!this.yearFormatter.equals(that.yearFormatter)) |
| 9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) | ||||||||||||
13 | return false; | 10 | return false; |
Row | Violation |
---|---|
1 | Unmatched return false; |
2 | Expression this.angle == t.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ObjectUtilities.equal(this.textAnchor,t.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Super method call if(!super.equals(obj)) cannot be extracted from method |
5 | Unmatched return false; |
6 | Unmatched return false; |
7 | Expression this.yearFormatter.equals(that.yearFormatter) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression ObjectUtilities.equal(this.rotationAnchor,t.rotationAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Not all possible execution flows end in a return statement |