File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer.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: 16 | 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 XYBoxAndWhiskerRenderer)) {↵ | 4 | if (!(obj instanceof DefaultIntervalCategoryDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | 8 | DefaultIntervalCategoryDataset that ↵ | |
9 | }↵ | 9 | ↵ | |
10 | XYBoxAndWhiskerRenderer that = (XYBoxAndWhiskerRenderer) obj;↵ | 10 | = (DefaultIntervalCategoryDataset) obj;↵ | |
11 | if (this.boxWidth != that.getBoxWidth()) {↵ | 11 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.boxPaint, that.boxPaint)) {↵ | 14 | if (!Arrays.equals(this.categoryKeys, that.categoryKeys)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) {↵ | 17 | if (!equal(this.startData, that.startData)) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (this.fillBox != that.fillBox) {↵ | 20 | if (!equal(this.endData, that.endData)) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | // seem to be the same...↵ | |||
23 | return true; | 24 |
| |
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) | 5.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 54 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.9 |
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 XYBoxAndWhiskerRenderer)) |
| 3 | if (!(obj instanceof DefaultIntervalCategoryDataset)) | ||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
| 5 | DefaultIntervalCategoryDataset that = (DefaultIntervalCategoryDataset)obj; | ||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) | ||||||||||||
6 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer does not match with type org.jfree.data.category.DefaultIntervalCategoryDataset |
2 | Expression Arrays.equals(this.seriesKeys,that.seriesKeys) 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 | Not all possible execution flows end in a return statement |
5 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer and org.jfree.data.category.DefaultIntervalCategoryDataset do not have a common superclass |