File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialTextAnnotation.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 DialTextAnnotation)) {↵ | 4 | if (!(obj instanceof XYDifferenceRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | ↵ | |
7 | DialTextAnnotation that = (DialTextAnnotation) obj;↵ | 7 | }↵ | |
8 | if (!this.label.equals(that.label)) {↵ | 8 | if (!super.equals(obj)) {↵ | |
9 | return false;↵ | 9 | return false; ↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!this.font↵ | 11 | XYDifferenceRenderer that = (XYDifferenceRenderer) obj;↵ | |
12 | .equals(that.font)) {↵ | 12 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) {↵ | |
13 | return false;↵ | 13 | return false; ↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!PaintUtilities.equal(this.paint, that.paint)) {↵ | 15 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) {↵ | |
16 | return false;↵ | 16 | return false; ↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.radius != that.radius) {↵ | 18 | if (this.shapesVisible != that.shapesVisible) {↵ | |
19 | return false;↵ | 19 | return false; ↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (this.angle != that.angle) {↵ | 21 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) {↵ | |
22 | return false;↵ | 22 | return false; ↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (!this.anchor.equals(that.anchor)) {↵ | 24 | if (this.roundXCoordinates != that.roundXCoordinates) {↵ | |
25 | return false;↵ | 25 | return false;↵ | |
26 | }↵ | 26 | }↵ | |
27 | return super.equals(obj); | 27 | return true; | |
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.6 |
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.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 DialTextAnnotation)) |
| 3 | if (!(obj instanceof XYDifferenceRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DialTextAnnotation that = (DialTextAnnotation)obj; | | ||||||||||||||||||||||||||||
6 | if (!this.label.equals(that.label)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||
7 | return false; | 6 | return false; | |||||||||||||||||||||||||||
| 7 | XYDifferenceRenderer that = (XYDifferenceRenderer)obj; | ||||||||||||||||||||||||||||
8 | if (!this.font.equals(that.font)) |
| 8 | if (!PaintUtilities.equal(this.positivePaint, that.positivePaint)) | ||||||||||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.paint, that.paint)) |
| 10 | if (!PaintUtilities.equal(this.negativePaint, that.negativePaint)) | ||||||||||||||||||||||||||
11 | return false; | 11 | return false; | |||||||||||||||||||||||||||
12 | if (this.radius != that.radius) |
| 12 | if (this.shapesVisible != that.shapesVisible) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (this.angle != that.angle) |
| 16 | if (this.roundXCoordinates != that.roundXCoordinates) | ||||||||||||||||||||||||||
15 | return false; | 17 | return false; | |||||||||||||||||||||||||||
16 | if (!this.anchor.equals(that.anchor)) |
| 14 | if (!ShapeUtilities.equal(this.legendLine, that.legendLine)) | ||||||||||||||||||||||||||
17 | return false; | 15 | return false; | |||||||||||||||||||||||||||
18 | return super.equals(obj); |
| 18 | return true; |
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 | Expression this.font.equals(that.font) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression PaintUtilities.equal(this.positivePaint,that.positivePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.paint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.negativePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type double of variable this.radius does not match with type boolean of variable this.shapesVisible |
8 | Expression that.radius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.shapesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type double of variable that.radius does not match with type boolean of variable that.shapesVisible |
11 | Type double of variable this.angle does not match with type boolean of variable this.roundXCoordinates |
12 | Expression that.angle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.roundXCoordinates cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type double of variable that.angle does not match with type boolean of variable that.roundXCoordinates |
15 | Expression this.anchor.equals(that.anchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression ShapeUtilities.equal(this.legendLine,that.legendLine) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
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.dial.DialTextAnnotation and org.jfree.chart.renderer.xy.XYDifferenceRenderer do not have a common superclass |