File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof MultiplePiePlot)) {↵ | 4 | if (!(obj instanceof XYDifferenceRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | |||
7 | MultiplePiePlot that = (MultiplePiePlot) obj;↵ | |||
8 | if (this.dataExtractOrder != that.dataExtractOrder↵ | 6 | ↵ | |
7 | }↵ | |||
9 | ) {↵ | 8 | if (!super.equals(obj)) {↵ | |
10 | return false;↵ | 9 | return false; ↵ | |
11 | }↵ | 10 | }↵ | |
12 | if (this.limit != that.limit↵ | 11 | XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵ | |
13 | ) {↵ | 12 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {↵ | |
14 | return false;↵ | 13 | return false; ↵ | |
15 | }↵ | 14 | }↵ | |
16 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {↵ | 15 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {↵ | |
17 | return false;↵ | 16 | return false; ↵ | |
18 | }↵ | 17 | }↵ | |
19 | if (!PaintUtilities.equal(this.aggregatedItemsPaint,↵ | 18 | if (↵ | |
20 | that.aggregatedItemsPaint)) {↵ | 19 | this.shapesVisible != that.shapesVisible) {↵ | |
21 | return false;↵ | 20 | return false; ↵ | |
22 | }↵ | 21 | }↵ | |
23 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {↵ | 22 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
24 | return false;↵ | 23 | return false; ↵ | |
25 | }↵ | 24 | }↵ | |
26 | if (!super.equals(obj)) {↵ | 25 | if (this.roundXCoordinates != that.roundXCoordinates) {↵ | |
27 | return false;↵ | 26 | return false;↵ | |
28 | }↵ | 27 | }↵ | |
29 | return true; | 28 |
| |
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) | 6.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 125 |
Number of mapped statements | 18 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 7.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 (!(obj instanceof MultiplePiePlot)) |
| 3 | if (!(obj instanceof XYDifferenceRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | MultiplePiePlot that = (MultiplePiePlot)obj; |
| 7 | XYDifferenceRenderer that = (XYDifferenceRenderer)obj; | ||||||||||||||||||||||||||||||
6 | if (this.dataExtractOrder != that.dataExtractOrder) |
| 12 | if (this.shapesVisible != that.shapesVisible) | ||||||||||||||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
8 | if (this.limit != that.limit) |
| 16 | if (this.roundXCoordinates != that.roundXCoordinates) | ||||||||||||||||||||||||||||||
9 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
10 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
11 | return false; | 6 | return false; | |||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.aggregatedItemsPaint, that.aggregatedItemsPaint)) |
| 10 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) |
| 14 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | ||||||||||||||||||||||||||||||
15 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
16 | if (!super.equals(obj)) |
| 8 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) | ||||||||||||||||||||||||||||||
17 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
18 | return true; | 18 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.util.TableOrder of variable this.dataExtractOrder does not match with type boolean of variable this.shapesVisible |
2 | Expression that.dataExtractOrder cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.util.TableOrder of variable that.dataExtractOrder does not match with type boolean of variable that.shapesVisible |
5 | Type double of variable this.limit does not match with type boolean of variable this.roundXCoordinates |
6 | Expression that.limit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type double of variable that.limit does not match with type boolean of variable that.roundXCoordinates |
9 | Expression this.aggregatedItemsKey.equals(that.aggregatedItemsKey) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Super method call if(!super.equals(obj)) cannot be extracted from method |
11 | Expression that.aggregatedItemsPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type org.jfree.chart.JFreeChart of variable this.pieChart does not match with type java.awt.Shape of variable this.legendLine |
14 | Expression that.pieChart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.legendLine cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type org.jfree.chart.JFreeChart of variable that.pieChart does not match with type java.awt.Shape of variable that.legendLine |
17 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.ShapeUtilities |
18 | Expression PaintUtilities.equal(this.positivePaint,that.positivePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Super method call if(!super.equals(obj)) cannot be extracted from method |
20 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.MultiplePiePlot and org.jfree.chart.renderer.xy.XYDifferenceRenderer do not have a common superclass |