File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/DefaultDrawingSupplier.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StandardXYItemRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 26 | Number of AST nodes: 28 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DefaultDrawingSupplier)) {↵ | 4 | if (!(obj instanceof StandardXYItemRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DefaultDrawingSupplier that = (DefaultDrawingSupplier) obj;↵ | 7 | StandardXYItemRenderer that = (StandardXYItemRenderer) obj;↵ | |
8 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) {↵ | 8 | if (this.baseShapesVisible != that.baseShapesVisible) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.paintIndex != that.paintIndex) {↵ | 11 | if (this.plotLines != that.plotLines) {↵ | |
12 | return false; ↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!Arrays.equals(this.outlinePaintSequence, ↵ | 14 | if (↵ | |
15 | that.outlinePaintSequence)) {↵ | 15 | this.plotImages != that.plotImages) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.outlinePaintIndex != that.outlinePaintIndex) {↵ | 18 | if (this.plotDiscontinuous != that.plotDiscontinuous) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)) {↵ | 21 | if (this.gapThresholdType != that.gapThresholdType) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (this.strokeIndex != that.strokeIndex) {↵ | 24 | if (this.gapThreshold != that.gapThreshold) {↵ | |
25 | return false; ↵ | 25 | return false;↵ | |
26 | }↵ | 26 | }↵ | |
27 | if (!Arrays.equals(this.outlineStrokeSequence, ↵ | 27 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) {↵ | |
28 | return false;↵ | |||
28 | ↵ | 29 | }↵ | |
29 | that.outlineStrokeSequence)) {↵ | 30 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) {↵ | |
30 | return false;↵ | 31 | return false;↵ | |
31 | }↵ | 32 | }↵ | |
32 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) {↵ | 33 | if (this.baseShapesFilled != that.baseShapesFilled) {↵ | |
33 | return false; ↵ | 34 | return false;↵ | |
34 | }↵ | 35 | }↵ | |
35 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) {↵ | 36 | if (this.drawSeriesLineAsPath != that.drawSeriesLineAsPath) {↵ | |
36 | return false;↵ | 37 | return false;↵ | |
37 | }↵ | 38 | }↵ | |
38 | if (this.shapeIndex != that.shapeIndex) {↵ | 39 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
39 | return false;↵ | 40 | return false;↵ | |
40 | }↵ | 41 | }↵ | |
41 | return true; | 42 | 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) | 15.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 235 |
Number of mapped statements | 19 |
Number of unmapped statements in the first code fragment | 6 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 13.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 DefaultDrawingSupplier)) |
| 3 | if (!(obj instanceof StandardXYItemRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DefaultDrawingSupplier that = (DefaultDrawingSupplier)obj; |
| 5 | StandardXYItemRenderer that = (StandardXYItemRenderer)obj; | ||||||||||||||||||||||||||
|
| 6 | if (this.baseShapesVisible != that.baseShapesVisible) | |||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||
6 | if (!Arrays.equals(this.paintSequence, that.paintSequence)) |
| 20 | if (!this.seriesShapesFilled.equals(that.seriesShapesFilled)) | ||||||||||||||||||||||||||
7 | return false; | 21 | return false; | |||||||||||||||||||||||||||
8 | if (this.paintIndex != that.paintIndex) |
| 8 | if (this.plotLines != that.plotLines) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (!Arrays.equals(this.outlinePaintSequence, that.outlinePaintSequence)) |
| | |||||||||||||||||||||||||||
11 | return false; |
| | |||||||||||||||||||||||||||
12 | if (this.outlinePaintIndex != that.outlinePaintIndex) |
| 12 | if (this.plotDiscontinuous != that.plotDiscontinuous) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (!Arrays.equals(this.strokeSequence, that.strokeSequence)) |
| | |||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||
16 | if (this.strokeIndex != that.strokeIndex) |
| 16 | if (this.gapThreshold != that.gapThreshold) | ||||||||||||||||||||||||||
17 | return false; | 17 | return false; | |||||||||||||||||||||||||||
18 | if (!Arrays.equals(this.outlineStrokeSequence, that.outlineStrokeSequence)) |
| | |||||||||||||||||||||||||||
19 | return false; |
| | |||||||||||||||||||||||||||
20 | if (this.outlineStrokeIndex != that.outlineStrokeIndex) |
| 14 | if (this.gapThresholdType != that.gapThresholdType) | ||||||||||||||||||||||||||
21 | return false; | 15 | return false; | |||||||||||||||||||||||||||
22 | if (!equalShapes(this.shapeSequence, that.shapeSequence)) |
| 18 | if (!ObjectUtilities.equal(this.shapesFilled, that.shapesFilled)) | ||||||||||||||||||||||||||
23 | return false; | 19 | return false; | |||||||||||||||||||||||||||
24 | if (this.shapeIndex != that.shapeIndex) |
| 10 | if (this.plotImages != that.plotImages) | ||||||||||||||||||||||||||
25 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(this.baseShapesVisible != that.baseShapesVisible) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return false; |
3 | Expression Arrays.equals(this.paintSequence,that.paintSequence) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression this.seriesShapesFilled.equals(that.seriesShapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type int of variable this.paintIndex does not match with type boolean of variable this.plotLines |
6 | Expression that.paintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.plotLines cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type int of variable that.paintIndex does not match with type boolean of variable that.plotLines |
9 | Unmatched statement if(!Arrays.equals(this.outlinePaintSequence,that.outlinePaintSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
10 | Unmatched return false; |
11 | Type int of variable this.outlinePaintIndex does not match with type boolean of variable this.plotDiscontinuous |
12 | Expression that.outlinePaintIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.plotDiscontinuous cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type int of variable that.outlinePaintIndex does not match with type boolean of variable that.plotDiscontinuous |
15 | Unmatched statement if(!Arrays.equals(this.strokeSequence,that.strokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
16 | Unmatched return false; |
17 | Type int of variable this.strokeIndex does not match with type double of variable this.gapThreshold |
18 | Expression that.strokeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression that.gapThreshold cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Type int of variable that.strokeIndex does not match with type double of variable that.gapThreshold |
21 | Unmatched statement if(!Arrays.equals(this.outlineStrokeSequence,that.outlineStrokeSequence)) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
22 | Unmatched return false; |
23 | Type int of variable this.outlineStrokeIndex does not match with type org.jfree.util.UnitType of variable this.gapThresholdType |
24 | Expression that.outlineStrokeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression that.gapThresholdType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Type int of variable that.outlineStrokeIndex does not match with type org.jfree.util.UnitType of variable that.gapThresholdType |
27 | Expression equalShapes(this.shapeSequence,that.shapeSequence) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression ObjectUtilities.equal(this.shapesFilled,that.shapesFilled) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Type int of variable this.shapeIndex does not match with type boolean of variable this.plotImages |
30 | Expression that.shapeIndex cannot be parameterized, because it has dependencies to/from statements that will be extracted |
31 | Expression that.plotImages cannot be parameterized, because it has dependencies to/from statements that will be extracted |
32 | Type int of variable that.shapeIndex does not match with type boolean of variable that.plotImages |
33 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.DefaultDrawingSupplier , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.StandardXYItemRenderer |
34 | Not all possible execution flows end in a return statement |
35 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.DefaultDrawingSupplier and org.jfree.chart.renderer.xy.StandardXYItemRenderer do not have a common superclass |