File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/NumberAxis.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 NumberAxis)) {↵ | 4 | if (!(obj instanceof DialTextAnnotation)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | NumberAxis that = (NumberAxis) obj;↵ | 8 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | |
11 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) {↵ | 9 | if (!this.label.equals(that.label)) {↵ | |
12 | return false;↵ | 10 | return false;↵ | |
13 | }↵ | 11 | }↵ | |
14 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) {↵ | 12 | if (!this.font.equals(that.font)) {↵ | |
15 | return false;↵ | 13 | return false;↵ | |
16 | }↵ | 14 | }↵ | |
17 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 15 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | |
18 | return false;↵ | 16 | return false;↵ | |
19 | }↵ | 17 | }↵ | |
20 | if (!ObjectUtilities.equal(this.numberFormatOverride,↵ | 18 | if (this.radius != that.radius) {↵ | |
19 | return false;↵ | |||
21 | ↵ | 20 | }↵ | |
22 | that.numberFormatOverride)) {↵ | 21 | if (this.angle != that.angle) {↵ | |
23 | return false;↵ | 22 | return false;↵ | |
24 | }↵ | 23 | }↵ | |
25 | if (!this.rangeType.equals(that.rangeType)) {↵ | 24 | if (!this.anchor.equals(that.anchor)) {↵ | |
26 | return false;↵ | 25 | return false;↵ | |
27 | }↵ | 26 | }↵ | |
28 | 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) | 4.8 |
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) | 6.8 |
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 DialTextAnnotation)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | DialTextAnnotation that = (DialTextAnnotation)obj; | ||||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 6 | if (!this.label.equals(that.label)) | ||||||||||||||||||||||||||||||
6 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
7 | NumberAxis that = (NumberAxis)obj; | | ||||||||||||||||||||||||||||||||
8 | if (this.autoRangeIncludesZero != that.autoRangeIncludesZero) |
| 12 | if (this.radius != that.radius) | ||||||||||||||||||||||||||||||
9 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.autoRangeStickyZero != that.autoRangeStickyZero) |
| 14 | if (this.angle != that.angle) | ||||||||||||||||||||||||||||||
11 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 10 | if (!PaintUtilities.equal(this.paint, that.paint)) | ||||||||||||||||||||||||||||||
13 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.numberFormatOverride, that.numberFormatOverride)) |
| 16 | if (!this.anchor.equals(that.anchor)) | ||||||||||||||||||||||||||||||
15 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
16 | if (!this.rangeType.equals(that.rangeType)) |
| 8 | if (!this.font.equals(that.font)) | ||||||||||||||||||||||||||||||
17 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
18 | return true; |
| 18 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
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.radius |
4 | Expression that.autoRangeIncludesZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.radius 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.radius |
7 | Type boolean of variable this.autoRangeStickyZero does not match with type double of variable this.angle |
8 | Expression that.autoRangeStickyZero cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.angle 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 double of variable that.angle |
11 | Type org.jfree.chart.axis.NumberTickUnit of variable this.tickUnit does not match with type java.awt.Paint of variable this.paint |
12 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type org.jfree.chart.axis.NumberTickUnit of variable that.tickUnit does not match with type java.awt.Paint of variable that.paint |
15 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
16 | Expression ObjectUtilities.equal(this.numberFormatOverride,that.numberFormatOverride) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression this.anchor.equals(that.anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.rangeType cannot be unified with expression that.font , because common superclass type java.io.Serializable cannot be passed as an argument to public boolean equals(java.lang.Object) |
19 | Expression that.rangeType cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression that.font cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type org.jfree.data.RangeType of variable that.rangeType does not match with type java.awt.Font of variable that.font |
22 | Type org.jfree.data.RangeType of variable this.rangeType does not match with type java.awt.Font of variable this.font |
23 | Super method call return super.equals(obj); cannot be extracted from method |
24 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.NumberAxis and org.jfree.chart.plot.dial.DialTextAnnotation do not have a common superclass |