File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/SymbolAxis.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 SymbolAxis)) {↵ | 4 | if (!(obj instanceof DefaultIntervalCategoryDataset)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | SymbolAxis that = (SymbolAxis) obj;↵ | 7 | ↵ | |
8 | if (!this.symbols.equals(that.symbol↵ | 8 | DefaultIntervalCategoryDataset that ↵ | |
9 | = (DefaultIntervalCategoryDataset) obj;↵ | |||
9 | s)) {↵ | 10 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) {↵ | |
10 | return false;↵ | 11 | return false;↵ | |
11 | }↵ | 12 | }↵ | |
12 | if (this.gridBandsVisible != that.gridBandsVisible) {↵ | 13 | if (!Arrays.equals(this.categoryKeys, that.categoryKeys)) {↵ | |
13 | return false;↵ | 14 | return false;↵ | |
14 | }↵ | 15 | }↵ | |
15 | if (!PaintUtilities.equal(this.gridBandPaint, that.gridBandPaint)) {↵ | 16 | if (!equal(this.startData, that.startData)) {↵ | |
16 | return false;↵ | 17 | return false;↵ | |
17 | }↵ | 18 | }↵ | |
18 | if (!PaintUtilities.equal(this.gridBandAlternatePaint, ↵ | 19 | if (!↵ | |
19 | that.gridBandAlternatePaint)) {↵ | 20 | equal(this.endData, that.endData)) {↵ | |
20 | return false;↵ | 21 | return false;↵ | |
21 | }↵ | 22 | }↵ | |
22 | return super.equals(obj)↵ | 23 | // seem to be the same...↵ | |
23 | ; | 24 | 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) | 5.0 |
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 | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 3.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||
2 | return true; | 2 | return true; | |||||||||||||
3 | if (!(obj instanceof SymbolAxis)) |
| 3 | if (!(obj instanceof DefaultIntervalCategoryDataset)) | ||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
| 5 | DefaultIntervalCategoryDataset that = (DefaultIntervalCategoryDataset)obj; | ||||||||||||||
5 | SymbolAxis that = (SymbolAxis)obj; | | ||||||||||||||
6 | if (!this.symbols.equals(that.symbols)) |
| 6 | if (!Arrays.equals(this.seriesKeys, that.seriesKeys)) | ||||||||||||
7 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.SymbolAxis does not match with type org.jfree.data.category.DefaultIntervalCategoryDataset |
2 | Expression this.symbols.equals(that.symbols) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression Arrays.equals(this.seriesKeys,that.seriesKeys) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Not all possible execution flows end in a return statement |
5 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.SymbolAxis and org.jfree.data.category.DefaultIntervalCategoryDataset do not have a common superclass |