File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBubbleRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYSplineRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 9 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof XYBubbleRenderer)) {↵ | 4 | if (!(obj instanceof ControlPoint)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | XYBubbleRenderer that = (XYBubbleRenderer) obj;↵ | 7 | ControlPoint that = (ControlPoint) obj;↵ | |
8 | if (this.scaleType != that.scaleType) {↵ | 8 | if (this.x != that.x) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | return super.equals(obj)↵ | 11 | /*&& y == ((ControlPoint) obj).y*/;↵ | |
12 | ; | 12 | 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) | 0.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 24 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 2.1 |
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 XYBubbleRenderer)) |
| 3 | if (!(obj instanceof ControlPoint)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
| 5 | ControlPoint that = (ControlPoint)obj; | |||||||||||||||||||||||||||||
5 | XYBubbleRenderer that = (XYBubbleRenderer)obj; | | |||||||||||||||||||||||||||||
6 | if (this.scaleType != that.scaleType) |
| 6 | if (this.x != that.x) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
| 8 | ; | |||||||||||||||||||||||||||||
8 | return super.equals(obj); |
| 9 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.renderer.xy.XYBubbleRenderer does not match with type org.jfree.chart.renderer.xy.XYSplineRenderer.ControlPoint |
2 | Type int of variable this.scaleType does not match with type float of variable this.x |
3 | Type int of variable that.scaleType does not match with type float of variable that.x |
4 | Expression that.scaleType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.x cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type int of variable that.scaleType does not match with type float of variable that.x |
7 | Super method call return super.equals(obj); cannot be extracted from method |
8 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.xy.XYBubbleRenderer and org.jfree.chart.renderer.xy.XYSplineRenderer.ControlPoint do not have a common superclass |