File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/XYLineAnnotation.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/ScatterRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 20 | Number of AST nodes: 20 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!super.equals(obj)) {↵ | 4 | if (!↵ | |
5 | return false;↵ | |||
6 | }↵ | |||
7 | if (!(obj instanceof XYLineAnnotation)) {↵ | |||
8 | return false;↵ | |||
9 | }↵ | |||
10 | XYLineAnnotation that = (XYLineAnnotation) obj;↵ | |||
11 | if (this.x1 != that.x1↵ | 5 | (obj instanceof ScatterRenderer)) {↵ | |
6 | return false;↵ | |||
7 | }↵ | |||
8 | ScatterRenderer that = (ScatterRenderer) obj;↵ | |||
9 | if (!ObjectUtilities.equal(this.seriesShapesFilled,↵ | |||
12 | ) {↵ | 10 | that.seriesShapesFilled)) {↵ | |
13 | return false;↵ | 11 | return false;↵ | |
14 | }↵ | 12 | }↵ | |
15 | if (this.y1 != that.y1) {↵ | 13 | if (this.baseShapesFilled != that.baseShapesFilled) {↵ | |
16 | return false;↵ | 14 | return false;↵ | |
17 | }↵ | 15 | }↵ | |
18 | if (this.x2 != that.x2) {↵ | 16 | if (this.useFillPaint != that.useFillPaint) {↵ | |
19 | return false;↵ | 17 | return false;↵ | |
20 | }↵ | 18 | }↵ | |
21 | if (this.y2 != that.y2) {↵ | 19 | if (this.drawOutlines != that.drawOutlines) {↵ | |
22 | return false;↵ | 20 | return false;↵ | |
23 | }↵ | 21 | }↵ | |
24 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | 22 | if (this.useOutlinePaint != that.useOutlinePaint) {↵ | |
25 | return false;↵ | 23 | return false;↵ | |
26 | }↵ | 24 | }↵ | |
27 | if (!ObjectUtilities.equal(this.stroke, that.stroke)) {↵ | 25 | if (this.useSeriesOffset != that.useSeriesOffset) {↵ | |
28 | return false;↵ | 26 | return false;↵ | |
29 | }↵ | 27 | }↵ | |
30 | // seems to be the same...↵ | 28 | ↵ | |
29 | if (this.itemMargin != that.itemMargin) {↵ | |||
31 | return true↵ | 30 | return false;↵ | |
31 | }↵ | |||
32 | ; | 32 | return super.equals(obj); | |
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) | 8.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 124 |
Number of mapped statements | 14 |
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) | 5.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||
3 | if (!super.equals(obj)) |
| 3 | if (!(obj instanceof ScatterRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
| 5 | ScatterRenderer that = (ScatterRenderer)obj; | ||||||||||||||||||||||||||||
5 | if (!(obj instanceof XYLineAnnotation)) |
| 6 | if (!ObjectUtilities.equal(this.seriesShapesFilled, that.seriesShapesFilled)) | ||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||
7 | XYLineAnnotation that = (XYLineAnnotation)obj; | | ||||||||||||||||||||||||||||
8 | if (this.x1 != that.x1) |
| 8 | if (this.baseShapesFilled != that.baseShapesFilled) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (this.y1 != that.y1) |
| 10 | if (this.useFillPaint != that.useFillPaint) | ||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||
12 | if (this.x2 != that.x2) |
| 12 | if (this.drawOutlines != that.drawOutlines) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (this.y2 != that.y2) |
| 14 | if (this.useOutlinePaint != that.useOutlinePaint) | ||||||||||||||||||||||||||
15 | return false; | 15 | return false; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Expression ObjectUtilities.equal(this.seriesShapesFilled,that.seriesShapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type double of variable this.x1 does not match with type boolean of variable this.baseShapesFilled |
4 | Expression that.x1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.baseShapesFilled cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type double of variable that.x1 does not match with type boolean of variable that.baseShapesFilled |
7 | Type double of variable this.y1 does not match with type boolean of variable this.useFillPaint |
8 | Expression that.y1 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.useFillPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type double of variable that.y1 does not match with type boolean of variable that.useFillPaint |
11 | Type double of variable this.x2 does not match with type boolean of variable this.drawOutlines |
12 | Expression that.x2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.drawOutlines cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type double of variable that.x2 does not match with type boolean of variable that.drawOutlines |
15 | Type double of variable this.y2 does not match with type boolean of variable this.useOutlinePaint |
16 | Expression that.y2 cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.useOutlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type double of variable that.y2 does not match with type boolean of variable that.useOutlinePaint |
19 | Not all possible execution flows end in a return statement |
20 | The refactoring of the clones is infeasible, because classes org.jfree.chart.annotations.XYLineAnnotation and org.jfree.chart.renderer.category.ScatterRenderer do not have a common superclass |