File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MeterInterval.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DateAxis)) {↵ | 4 | if (!(obj instanceof MeterInterval)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DateAxis that = (DateAxis) obj;↵ | 7 | MeterInterval that = (MeterInterval) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 8 | if (!this.label.equals(that.label)) {↵ | |
9 | return false;↵ | 9 | return false;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (!ObjectUtilities.equal(this.dateFormatOverride,↵ | 11 | if (!↵ | |
12 | that.dateFormatOverride)) {↵ | 12 | this.range.equals(that.range)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!ObjectUtilities.equal(this.tickMarkPosition,↵ | 15 | if (!PaintUtilities.equal(this.↵ | |
16 | that.tickMarkPosition)) {↵ | 16 | outlinePaint, that.outlinePaint)) {↵ | |
17 | return false;↵ | 17 | return false;↵ | |
18 | }↵ | 18 | }↵ | |
19 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) {↵ | 19 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {↵ | |
20 | return false;↵ | 20 | return false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (!super.equals(obj)) {↵ | 22 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
23 | return false;↵ | 23 | return false;↵ | |
24 | }↵ | 24 | }↵ | |
25 | return true; | 25 |
| |
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.9 |
Clones location | Clones are in different classes |
Number of node comparisons | 119 |
Number of mapped statements | 15 |
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) | 9.1 |
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 DateAxis)) |
| 3 | if (!(obj instanceof MeterInterval)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | MeterInterval that = (MeterInterval)obj; | |||||||||||||||||||||||||||||||||
5 | DateAxis that = (DateAxis)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 12 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) | |||||||||||||||||||||||||||||||
7 | return false; | 13 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) |
| 10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) | |||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) |
| 14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | |||||||||||||||||||||||||||||||
11 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) |
| 8 | if (!this.range.equals(that.range)) | |||||||||||||||||||||||||||||||
13 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
14 | if (!super.equals(obj)) |
| 6 | if (!this.label.equals(that.label)) | |||||||||||||||||||||||||||||||
15 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
16 | return true; | 16 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.DateAxis does not match with type org.jfree.chart.plot.MeterInterval |
2 | Type org.jfree.chart.axis.DateTickUnit of variable this.tickUnit does not match with type java.awt.Stroke of variable this.outlineStroke |
3 | Type org.jfree.chart.axis.DateTickUnit of variable that.tickUnit does not match with type java.awt.Stroke of variable that.outlineStroke |
4 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.chart.axis.DateTickUnit of variable that.tickUnit does not match with type java.awt.Stroke of variable that.outlineStroke |
7 | Type java.text.DateFormat of variable this.dateFormatOverride does not match with type java.awt.Paint of variable this.outlinePaint |
8 | Type java.text.DateFormat of variable that.dateFormatOverride does not match with type java.awt.Paint of variable that.outlinePaint |
9 | Expression that.dateFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Type java.text.DateFormat of variable that.dateFormatOverride does not match with type java.awt.Paint of variable that.outlinePaint |
12 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
13 | Type org.jfree.chart.axis.DateTickMarkPosition of variable this.tickMarkPosition does not match with type java.awt.Paint of variable this.backgroundPaint |
14 | Type org.jfree.chart.axis.DateTickMarkPosition of variable that.tickMarkPosition does not match with type java.awt.Paint of variable that.backgroundPaint |
15 | Expression that.tickMarkPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type org.jfree.chart.axis.DateTickMarkPosition of variable that.tickMarkPosition does not match with type java.awt.Paint of variable that.backgroundPaint |
18 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
19 | Expression ObjectUtilities.equal(this.timeline,that.timeline) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression this.range.equals(that.range) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Super method call if(!super.equals(obj)) cannot be extracted from method |
23 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.DateAxis and org.jfree.chart.plot.MeterInterval do not have a common superclass |