File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/NumberAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.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 NumberAxis)) {↵ | 4 | if (!(obj instanceof MultiplePiePlot)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | NumberAxis that = (NumberAxis) obj;↵ | |||
11 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero↵ | 8 | MultiplePiePlot that = (MultiplePiePlot) obj;↵ | |
9 | if (this.dataExtractOrder != that.dataExtractOrder) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | ) {↵ | 12 | if (this.limit != that.limit) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) {↵ | 15 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUni↵ | 18 | if (!PaintUtilities.equal(this.aggregatedItemsPaint,↵ | |
19 | t)) {↵ | 19 | that.aggregatedItemsPaint)) {↵ | |
20 | return false;↵ | 20 | return false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (!ObjectUtilities.equal(this.numberFormatOverride,↵ | 22 | if (!ObjectUtilities.equal(this.↵ | |
23 | that.numberFormatOverride)) {↵ | 23 | pieChart, that.pieChart)) {↵ | |
24 | return false;↵ | 24 | return false;↵ | |
25 | }↵ | 25 | }↵ | |
26 | if (!this.rangeType.equals(that.rangeType)) {↵ | 26 | if (!super.equals(obj)) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | return true; | 29 |
| |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 125 |
Number of mapped statements | 17 |
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) | 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 NumberAxis)) |
| 3 | if (!(obj instanceof MultiplePiePlot)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | MultiplePiePlot that = (MultiplePiePlot)obj; | ||||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 16 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
6 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
7 | NumberAxis that = (NumberAxis)obj; | | ||||||||||||||||||||||||||||||||
8 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) |
| 8 | if (this.limit != that.limit) | ||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) |
| 6 | if (this.dataExtractOrder != that.dataExtractOrder) | ||||||||||||||||||||||||||||||
11 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 14 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) | ||||||||||||||||||||||||||||||
13 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.numberFormatOverride, that.numberFormatOverride)) |
| 12 | if (!PaintUtilities.equal(this.aggregatedItemsPaint, that.aggregatedItemsPaint)) | ||||||||||||||||||||||||||||||
15 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
16 | if (!this.rangeType.equals(that.rangeType)) |
| 10 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) | ||||||||||||||||||||||||||||||
17 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
18 | return true; | 18 | return true; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Type boolean of variable this.autoRangeIncludesZero does not match with type double of variable this.limit |
4 | Expression that.autoRangeIncludesZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.limit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type boolean of variable that.autoRangeIncludesZero does not match with type double of variable that.limit |
7 | Type boolean of variable this.autoRangeStickyZero does not match with type org.jfree.util.TableOrder of variable this.dataExtractOrder |
8 | Expression that.autoRangeStickyZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.dataExtractOrder cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type boolean of variable that.autoRangeStickyZero does not match with type org.jfree.util.TableOrder of variable that.dataExtractOrder |
11 | Type org.jfree.chart.axis.NumberTickUnit of variable this.tickUnit does not match with type org.jfree.chart.JFreeChart of variable this.pieChart |
12 | Expression that.tickUnit cannot be unified with expression that.pieChart , because common superclass type java.io.Serializable cannot be passed as an argument to public static boolean equal(java.lang.Object, java.lang.Object) |
13 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression that.pieChart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type org.jfree.chart.axis.NumberTickUnit of variable that.tickUnit does not match with type org.jfree.chart.JFreeChart of variable that.pieChart |
16 | Type java.text.NumberFormat of variable this.numberFormatOverride does not match with type java.awt.Paint of variable this.aggregatedItemsPaint |
17 | Expression that.numberFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.aggregatedItemsPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type java.text.NumberFormat of variable that.numberFormatOverride does not match with type java.awt.Paint of variable that.aggregatedItemsPaint |
20 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
21 | Expression that.rangeType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression that.aggregatedItemsKey cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Type org.jfree.data.RangeType of variable that.rangeType does not match with type java.lang.Comparable of variable that.aggregatedItemsKey |
24 | Type org.jfree.data.RangeType of variable this.rangeType does not match with type java.lang.Comparable of variable this.aggregatedItemsKey |
25 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.NumberAxis and org.jfree.chart.plot.MultiplePiePlot do not have a common superclass |