File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/CategoryPointerAnnotation.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/annotations/XYPointerAnnotation.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 24 | Number of AST nodes: 24 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof CategoryPointerAnnotation)) {↵ | 4 | if (!(obj instanceof XYPointerAnnotation)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | 8 | return false;↵ | |
9 | }↵ | 9 | }↵ | |
10 | CategoryPointerAnnotation that = (CategoryPointerAnnotation) obj;↵ | 10 | XYPointerAnnotation that = (XYPointerAnnotation) obj;↵ | |
11 | if (this.angle != that.angle) {↵ | 11 | if (this.angle != that.angle) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (this.tipRadius != that.tipRadius) {↵ | 14 | if (this.tipRadius != that.tipRadius) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.baseRadius != that.baseRadius) {↵ | 17 | if (this.baseRadius != that.baseRadius) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (this.arrowLength != that.arrowLength) {↵ | 20 | if (this.arrowLength != that.arrowLength) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | if (this.arrowWidth != that.arrowWidth) {↵ | 23 | if (this.arrowWidth != that.arrowWidth) {↵ | |
24 | return false;↵ | 24 | return false;↵ | |
25 | }↵ | 25 | }↵ | |
26 | if (!this.arrowPaint.equals(that.arrowPaint)) {↵ | 26 | if (!this.arrowPaint.equals(that.arrowPaint)) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) {↵ | 29 | if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) {↵ | |
30 | return false;↵ | 30 | return false;↵ | |
31 | }↵ | 31 | }↵ | |
32 | if (this.labelOffset != that.labelOffset) {↵ | 32 | if (this.labelOffset != that.labelOffset) {↵ | |
33 | return false;↵ | 33 | return false;↵ | |
34 | }↵ | 34 | }↵ | |
35 | return true; | 35 |
| |
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) | 13.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 221 |
Number of mapped statements | 24 |
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) | 10.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 CategoryPointerAnnotation)) |
| 3 | if (!(obj instanceof XYPointerAnnotation)) | ||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||
5 | if (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||
6 | return false; | 6 | return false; | |||||||||||||||||
7 | CategoryPointerAnnotation that = (CategoryPointerAnnotation)obj; |
| 7 | XYPointerAnnotation that = (XYPointerAnnotation)obj; | ||||||||||||||||
8 | if (this.angle != that.angle) |
| 8 | if (this.angle != that.angle) | ||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||
10 | if (this.tipRadius != that.tipRadius) |
| 10 | if (this.tipRadius != that.tipRadius) | ||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||
12 | if (this.baseRadius != that.baseRadius) |
| 12 | if (this.baseRadius != that.baseRadius) | ||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||
14 | if (this.arrowLength != that.arrowLength) |
| 14 | if (this.arrowLength != that.arrowLength) | ||||||||||||||||
15 | return false; | 15 | return false; | |||||||||||||||||
16 | if (this.arrowWidth != that.arrowWidth) |
| 16 | if (this.arrowWidth != that.arrowWidth) | ||||||||||||||||
17 | return false; | 17 | return false; | |||||||||||||||||
18 | if (!this.arrowPaint.equals(that.arrowPaint)) |
| 18 | if (!this.arrowPaint.equals(that.arrowPaint)) | ||||||||||||||||
19 | return false; | 19 | return false; | |||||||||||||||||
20 | if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) |
| 20 | if (!ObjectUtilities.equal(this.arrowStroke, that.arrowStroke)) | ||||||||||||||||
21 | return false; | 21 | return false; | |||||||||||||||||
22 | if (this.labelOffset != that.labelOffset) |
| 22 | if (this.labelOffset != that.labelOffset) | ||||||||||||||||
23 | return false; | 23 | return false; | |||||||||||||||||
24 | return true; | 24 | 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 | Expression that.angle cannot be unified with expression that.angle , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double angle |
4 | Expression that.tipRadius cannot be unified with expression that.tipRadius , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double tipRadius |
5 | Expression that.baseRadius cannot be unified with expression that.baseRadius , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double baseRadius |
6 | Expression that.arrowLength cannot be unified with expression that.arrowLength , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double arrowLength |
7 | Expression that.arrowWidth cannot be unified with expression that.arrowWidth , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double arrowWidth |
8 | Expression that.arrowPaint cannot be unified with expression that.arrowPaint , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private transient java.awt.Paint arrowPaint |
9 | Expression that.arrowStroke cannot be unified with expression that.arrowStroke , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private transient java.awt.Stroke arrowStroke |
10 | Expression that.labelOffset cannot be unified with expression that.labelOffset , because common superclass org.jfree.util.PublicCloneable does not declare member(s) private double labelOffset |
11 | The refactoring of the clones is infeasible, because classes org.jfree.chart.annotations.CategoryPointerAnnotation and org.jfree.chart.annotations.XYPointerAnnotation do not have a common superclass |