File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/CyclicNumberAxis.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 CyclicNumberAxis)) {↵ | 4 | if (!(obj instanceof ArcDialFrame)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | CyclicNumberAxis that = (CyclicNumberAxis) obj; ↵ | |||
11 | if (this.period != that.period↵ | 8 | ArcDialFrame that = (ArcDialFrame) obj;↵ | |
9 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | ) {↵ | 12 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (this.offset != that.offset) {↵ | 15 | if (this.startAngle != that.startAngle) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!PaintUtilities.equal(this.advanceLinePaint, ↵ | 18 | if (↵ | |
19 | that.advanceLinePaint)) {↵ | 19 | this.extent != that.extent) {↵ | |
20 | return false;↵ | 20 | return false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (!ObjectUtilities.equal(this.advanceLineStroke, ↵ | 22 | if (↵ | |
23 | that.advanceLineStroke)) {↵ | 23 | this.innerRadius != that.innerRadius) {↵ | |
24 | return false;↵ | 24 | return false;↵ | |
25 | }↵ | 25 | }↵ | |
26 | if (this.advanceLineVisible != that.advanceLineVisible) {↵ | 26 | if (this.outerRadius != that.outerRadius) {↵ | |
27 | return false;↵ | 27 | return false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) {↵ | 29 | if (!this.stroke.equals(that.stroke)) {↵ | |
30 | return false;↵ | 30 | return false;↵ | |
31 | }↵ | 31 | }↵ | |
32 | return true; | 32 | 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) | 7.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 148 |
Number of mapped statements | 19 |
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) | 8.7 |
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 CyclicNumberAxis)) |
| 3 | if (!(obj instanceof ArcDialFrame)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | ArcDialFrame that = (ArcDialFrame)obj; | ||||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 18 | if (!this.stroke.equals(that.stroke)) | ||||||||||||||||||||||||||||||
6 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
7 | CyclicNumberAxis that = (CyclicNumberAxis)obj; | | ||||||||||||||||||||||||||||||||
8 | if (this.period != that.period) |
| 10 | if (this.startAngle != that.startAngle) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.offset != that.offset) |
| 12 | if (this.extent != that.extent) | ||||||||||||||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) |
| 8 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) |
| 6 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||||||||||||||
15 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
16 | if (this.advanceLineVisible != that.advanceLineVisible) |
| 16 | if (this.outerRadius != that.outerRadius) | ||||||||||||||||||||||||||||||
17 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
18 | if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) |
| 14 | if (this.innerRadius != that.innerRadius) | ||||||||||||||||||||||||||||||
19 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
20 | return true; |
| 20 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Expression this.stroke.equals(that.stroke) 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 that.period cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.startAngle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.offset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.extent cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.advanceLinePaint 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 this.advanceLineStroke does not match with type java.awt.Paint of variable this.backgroundPaint |
10 | Expression that.advanceLineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type java.awt.Stroke of variable that.advanceLineStroke does not match with type java.awt.Paint of variable that.backgroundPaint |
13 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
14 | Type boolean of variable this.advanceLineVisible does not match with type double of variable this.outerRadius |
15 | Expression that.advanceLineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.outerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type boolean of variable that.advanceLineVisible does not match with type double of variable that.outerRadius |
18 | Type boolean of variable this.boundMappedToLastCycle does not match with type double of variable this.innerRadius |
19 | Expression that.boundMappedToLastCycle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression that.innerRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type boolean of variable that.boundMappedToLastCycle does not match with type double of variable that.innerRadius |
22 | Super method call return super.equals(obj); cannot be extracted from method |
23 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.CyclicNumberAxis and org.jfree.chart.plot.dial.ArcDialFrame do not have a common superclass |