File path: /jfreechart-1.0.10/src/org/jfree/chart/needle/MeterNeedle.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/ArcDialFrame.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 20 | Number of AST nodes: 20 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof MeterNeedle)) {↵ | 4 | if (!(obj instanceof ArcDialFrame)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | MeterNeedle that = (MeterNeedle) obj;↵ | 7 | ArcDialFrame that = (ArcDialFrame) obj;↵ | |
8 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | 8 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {↵ | 11 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | 14 | if (this.startAngle != that.startAngle) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!PaintUtilities.equal(this.highlightPaint, that.highlightPaint)) {↵ | 17 | if (this.extent != that.extent) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (this.size != that.size) {↵ | 20 | if (this.innerRadius != that.innerRadius) {↵ | |
21 | return false;↵ | 21 | return false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | if (this.rotateX != that.rotateX) {↵ | 23 | if (this.outerRadius != that.outerRadius) {↵ | |
24 | return false;↵ | 24 | return false;↵ | |
25 | }↵ | 25 | }↵ | |
26 | if (this.rotateY != that.rotateY) {↵ | 26 | if (!this.stroke.equals(that.stroke)) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | return true; | 29 | 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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 142 |
Number of mapped statements | 16 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 7.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | ||||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | ||||||||||||||||||||||||||||||||
3 | if (!(obj instanceof MeterNeedle)) |
| 3 | if (!(obj instanceof ArcDialFrame)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | ArcDialFrame that = (ArcDialFrame)obj; | |||||||||||||||||||||||||||||||||
5 | MeterNeedle that = (MeterNeedle)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) |
| 6 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | |||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) |
| 8 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) | |||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
| 10 | if (this.startAngle != that.startAngle) | |||||||||||||||||||||||||||||||||
|
| 11 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) |
| 18 | if (!this.stroke.equals(that.stroke)) | |||||||||||||||||||||||||||||||
11 | return false; | 19 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.highlightPaint, that.highlightPaint)) | | |||||||||||||||||||||||||||||||||
13 | return false; |
| | ||||||||||||||||||||||||||||||||
14 | if (this.size != that.size) |
| 14 | if (this.innerRadius != that.innerRadius) | |||||||||||||||||||||||||||||||
15 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
16 | if (this.rotateX != that.rotateX) |
| 16 | if (this.outerRadius != that.outerRadius) | |||||||||||||||||||||||||||||||
17 | return false; | 17 | return false; | ||||||||||||||||||||||||||||||||
18 | if (this.rotateY != that.rotateY) |
| 12 | if (this.extent != that.extent) | |||||||||||||||||||||||||||||||
19 | return false; | 13 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.needle.MeterNeedle does not match with type org.jfree.chart.plot.dial.ArcDialFrame |
2 | Type java.awt.Paint of variable that.outlinePaint does not match with type java.awt.Paint of variable that.backgroundPaint |
3 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type java.awt.Stroke of variable this.outlineStroke does not match with type java.awt.Paint of variable this.foregroundPaint |
6 | Type java.awt.Stroke of variable that.outlineStroke does not match with type java.awt.Paint of variable that.foregroundPaint |
7 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.foregroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.awt.Stroke of variable that.outlineStroke does not match with type java.awt.Paint of variable that.foregroundPaint |
10 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
11 | Unmatched return false; |
12 | Expression PaintUtilities.equal(this.fillPaint,that.fillPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression this.stroke.equals(that.stroke) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Unmatched return false; |
15 | Type int of variable this.size does not match with type double of variable this.innerRadius |
16 | Type int of variable that.size does not match with type double of variable that.innerRadius |
17 | Expression that.size cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.innerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type int of variable that.size does not match with type double of variable that.innerRadius |
20 | Type double of variable that.rotateX does not match with type double of variable that.outerRadius |
21 | Expression that.rotateX cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression that.outerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Type double of variable that.rotateY does not match with type double of variable that.extent |
24 | Expression that.rotateY cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression that.extent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Not all possible execution flows end in a return statement |
27 | The refactoring of the clones is infeasible, because classes org.jfree.chart.needle.MeterNeedle and org.jfree.chart.plot.dial.ArcDialFrame do not have a common superclass |