File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialCap.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/StandardDialFrame.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DialCap)) {↵ | 4 | if (!(obj instanceof StandardDialFrame)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DialCap that = (DialCap) obj;↵ | 7 | StandardDialFrame that = (StandardDialFrame) obj;↵ | |
8 | if (this.radius != that.radius) {↵ | 8 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {↵ | 11 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | 14 | if (this.radius != that.radius) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (!this.outlineStroke.equals(that.outlineStroke)) {↵ | 17 | if (!this.stroke.equals(that.stroke)) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | return super.equals(obj); | 20 |
| |
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) | 3.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 76 |
Number of mapped statements | 14 |
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) | 5.9 |
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 DialCap)) |
| 3 | if (!(obj instanceof StandardDialFrame)) | ||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||
5 | DialCap that = (DialCap)obj; |
| 5 | StandardDialFrame that = (StandardDialFrame)obj; | ||||||||||||||||||
6 | if (this.radius != that.radius) |
| 10 | if (this.radius != that.radius) | ||||||||||||||||||
7 | return false; | 11 | return false; | |||||||||||||||||||
8 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) |
| 8 | if (!PaintUtilities.equal(this.foregroundPaint, that.foregroundPaint)) | ||||||||||||||||||
9 | return false; | 9 | return false; | |||||||||||||||||||
10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) |
| 6 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||
11 | return false; | 7 | return false; | |||||||||||||||||||
12 | if (!this.outlineStroke.equals(that.outlineStroke)) |
| 12 | if (!this.stroke.equals(that.stroke)) | ||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||
14 | return super.equals(obj); |
| 14 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Expression that.radius cannot be unified with expression that.radius , because common superclass org.jfree.chart.plot.dial.AbstractDialLayer does not declare member(s) private double radius |
2 | Expression that.fillPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.foregroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.stroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Super method call return super.equals(obj); cannot be extracted from method |
9 | Super method call return super.equals(obj); cannot be extracted from method |