File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYBarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/MatrixSeriesCollection.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if (obj == this) {↵ | 1 | if (obj == null) {↵ | |
2 | return true; ↵ | 2 | return false;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof StackedXYBarRenderer)) {↵ | 4 | if (obj == this) {↵ | |
5 | return false; ↵ | 5 | return true;↵ | |
6 | }↵ | 6 | }↵ | |
7 | StackedXYBarRenderer that = (StackedXYBarRenderer) obj;↵ | 7 | ↵ | |
8 | if (this.renderAsPercentages != that.renderAsPercentages) {↵ | |||
9 | return false; ↵ | 8 | if (obj instanceof MatrixSeriesCollection) {↵ | |
9 | MatrixSeriesCollection c = (MatrixSeriesCollection) obj;↵ | |||
10 | return ObjectUtilities.equal(this.seriesList, c.seriesList);↵ | |||
10 | }↵ | 11 | }↵ | |
11 | return super.equals(obj); | 12 | return false; | |
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) | 0.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
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.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 3 | if (obj == this) | ||||||||||||
2 | return true; | 4 | return true; | ||||||||||||
3 | if (!(obj instanceof StackedXYBarRenderer)) |
| 5 | if (obj instanceof MatrixSeriesCollection) | |||||||||||
|
| 6 | MatrixSeriesCollection c = (MatrixSeriesCollection)obj; | ||||||||||||
4 | return false; |
| 7 | return ObjectUtilities.equal(this.seriesList, c.seriesList); |
Row | Violation |
---|---|
1 | Unmatched statement MatrixSeriesCollection c=(MatrixSeriesCollection)obj; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression ObjectUtilities.equal(this.seriesList,c.seriesList) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Not all possible execution flows end in a return statement |
4 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.StackedXYBarRenderer and org.jfree.data.xy.MatrixSeriesCollection do not have a common superclass |