File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialCap.java | File path: /jfreechart-1.0.10/src/org/jfree/data/category/DefaultIntervalCategoryDataset.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 (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DialCap)) {↵ | 4 | if (!(obj instanceof DefaultIntervalCategoryDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DialCap that = (DialCap↵ | 7 | DefaultIntervalCategoryDataset that ↵ | |
8 | ) obj;↵ | 8 | = (DefaultIntervalCategoryDataset) obj;↵ | |
9 | if (this.radius != that.radius) {↵ | 9 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | 12 | if (!Arrays.equals(this.categoryKeys, that.categoryKeys)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | 15 | if (!equal(this.startData, that.startData)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!this.outlineStroke.equals(that.outlineStroke)) {↵ | 18 | if (!equal(this.endData, that.endData)) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | return super.equals(obj)↵ | 21 | // seem to be the same...↵ | |
22 | ; | 22 | 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) | 4.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 49 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 7 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.2 |
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 DialCap)) |
| 3 | if (!(obj instanceof DefaultIntervalCategoryDataset)) | ||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
| 5 | DefaultIntervalCategoryDataset that = (DefaultIntervalCategoryDataset)obj; | ||||||||||||||
5 | DialCap that = (DialCap)obj; | | ||||||||||||||
6 | if (this.radius != that.radius) | | ||||||||||||||
7 | return false; |
| | |||||||||||||
8 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) | | ||||||||||||||
9 | return false; |
| | |||||||||||||
10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) | | ||||||||||||||
11 | return false; |
| | |||||||||||||
12 | if (!this.outlineStroke.equals(that.outlineStroke)) |
| 6 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) | ||||||||||||
13 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.plot.dial.DialCap does not match with type org.jfree.data.category.DefaultIntervalCategoryDataset |
2 | Unmatched return false; |
3 | Unmatched return false; |
4 | Unmatched return false; |
5 | Expression this.outlineStroke.equals(that.outlineStroke) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression Arrays.equals(this.seriesKeys,that.seriesKeys) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Not all possible execution flows end in a return statement |
8 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.dial.DialCap and org.jfree.data.category.DefaultIntervalCategoryDataset do not have a common superclass |