File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.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 DialTextAnnotation)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | MultiplePiePlot that = (MultiplePiePlot) obj;↵ | 7 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | |
8 | if (this.dataExtractOrder != that.dataExtractOrder) {↵ | 8 | if (!this.label.equals(that.label)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (this.limit != that.limit) {↵ | 11 | if (!this.font.equals(that.font)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {↵ | 14 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!PaintUtilities.equal(this.aggregatedItemsPaint,↵ | 17 | if (↵ | |
18 | that.aggregatedItemsPaint)) {↵ | 18 | this.radius != that.radius) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {↵ | 21 | if (this.angle != that.angle) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (!super.equals(obj)) {↵ | 24 | if (!this.anchor.equals(that.anchor)) {↵ | |
25 | return false;↵ | 25 | return false;↵ | |
26 | }↵ | 26 | }↵ | |
27 | return true; | 27 | 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) | 5.5 |
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.3 |
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 DialTextAnnotation)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | MultiplePiePlot that = (MultiplePiePlot)obj; |
| 5 | DialTextAnnotation that = (DialTextAnnotation)obj; | ||||||||||||||||||||||||||
6 | if (this.dataExtractOrder != that.dataExtractOrder) |
| 12 | if (this.radius != that.radius) | ||||||||||||||||||||||||||
7 | return false; | 13 | return false; | |||||||||||||||||||||||||||
8 | if (this.limit != that.limit) |
| 14 | if (this.angle != that.angle) | ||||||||||||||||||||||||||
9 | return false; | 15 | return false; | |||||||||||||||||||||||||||
10 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) |
| 8 | if (!this.font.equals(that.font)) | ||||||||||||||||||||||||||
11 | return false; | 9 | return false; | |||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.aggregatedItemsPaint, that.aggregatedItemsPaint)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | ||||||||||||||||||||||||||
13 | return false; | 11 | return false; | |||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) |
| 16 | if (!this.anchor.equals(that.anchor)) | ||||||||||||||||||||||||||
15 | return false; | 17 | return false; | |||||||||||||||||||||||||||
16 | if (!super.equals(obj)) |
| 6 | if (!this.label.equals(that.label)) | ||||||||||||||||||||||||||
17 | return false; | 7 | return false; | |||||||||||||||||||||||||||
18 | return true; |
| 18 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Type org.jfree.util.TableOrder of variable this.dataExtractOrder does not match with type double of variable this.radius |
2 | Expression that.dataExtractOrder cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.radius 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 double of variable that.radius |
5 | Expression that.limit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.aggregatedItemsKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.lang.Comparable of variable that.aggregatedItemsKey does not match with type java.awt.Font of variable that.font |
10 | Type java.lang.Comparable of variable this.aggregatedItemsKey does not match with type java.awt.Font of variable this.font |
11 | Expression that.aggregatedItemsPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression ObjectUtilities.equal(this.pieChart,that.pieChart) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression this.anchor.equals(that.anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Super method call if(!super.equals(obj)) cannot be extracted from method |
17 | Super method call return super.equals(obj); cannot be extracted from method |
18 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.MultiplePiePlot and org.jfree.chart.plot.dial.DialTextAnnotation do not have a common superclass |