File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/WaterfallBarRenderer.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 (!super.equals(obj)) {↵ | |||
5 | return false;↵ | |||
6 | }↵ | |||
4 | if (!(obj instanceof DateAxis)) {↵ | 7 | if (!(obj instanceof WaterfallBarRenderer)) {↵ | |
5 | return false;↵ | 8 | return false;↵ | |
6 | }↵ | 9 | }↵ | |
7 | DateAxis that = (DateAxis) obj;↵ | 10 | WaterfallBarRenderer that = (WaterfallBarRenderer) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) {↵ | 11 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) {↵ | |
9 | return false;↵ | 12 | return false;↵ | |
10 | }↵ | 13 | }↵ | |
11 | if (!ObjectUtilities.equal(this.dateFormatOverride,↵ | 14 | if (!PaintUtilities.equal(this.↵ | |
12 | that.dateFormatOverride)) {↵ | 15 | lastBarPaint, that.lastBarPaint)) {↵ | |
13 | return false;↵ | 16 | return false;↵ | |
14 | }↵ | 17 | }↵ | |
15 | if (!ObjectUtilities.equal(this.tickMarkPosition,↵ | 18 | if (!PaintUtilities.equal(this.positiveBarPaint,↵ | |
16 | that.tickMarkPosition)) {↵ | 19 | that.positiveBarPaint)) {↵ | |
17 | return false;↵ | 20 | return false;↵ | |
18 | }↵ | 21 | }↵ | |
19 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) {↵ | 22 | if (!PaintUtilities.equal(this.↵ | |
20 | return false;↵ | 23 | negativeBarPaint,↵ | |
21 | }↵ | 24 | ↵ | |
22 | if (!super.equals(obj)) {↵ | 25 | that.negativeBarPaint)) {↵ | |
23 | return false;↵ | 26 | return false;↵ | |
24 | }↵ | 27 | }↵ | |
25 | return true; | 28 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 119 |
Number of mapped statements | 16 |
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) | 7.0 |
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)) |
| 5 | if (!(obj instanceof WaterfallBarRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 6 | return false; | |||||||||||||||||||||||||||||||
5 | DateAxis that = (DateAxis)obj; |
| 7 | WaterfallBarRenderer that = (WaterfallBarRenderer)obj; | ||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 8 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) | ||||||||||||||||||||||||||||||
7 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) |
| 10 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) |
| 12 | if (!PaintUtilities.equal(this.positiveBarPaint, that.positiveBarPaint)) | ||||||||||||||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) |
| 14 | if (!PaintUtilities.equal(this.negativeBarPaint, that.negativeBarPaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
14 | if (!super.equals(obj)) |
| 3 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
15 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
16 | return true; | 16 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.DateTickUnit of variable this.tickUnit does not match with type java.awt.Paint of variable this.firstBarPaint |
2 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.firstBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.chart.axis.DateTickUnit of variable that.tickUnit does not match with type java.awt.Paint of variable that.firstBarPaint |
5 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
6 | Type java.text.DateFormat of variable this.dateFormatOverride does not match with type java.awt.Paint of variable this.lastBarPaint |
7 | Expression that.dateFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.lastBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.text.DateFormat of variable that.dateFormatOverride does not match with type java.awt.Paint of variable that.lastBarPaint |
10 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
11 | Type org.jfree.chart.axis.DateTickMarkPosition of variable this.tickMarkPosition does not match with type java.awt.Paint of variable this.positiveBarPaint |
12 | Expression that.tickMarkPosition cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.positiveBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type org.jfree.chart.axis.DateTickMarkPosition of variable that.tickMarkPosition does not match with type java.awt.Paint of variable that.positiveBarPaint |
15 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
16 | Type org.jfree.chart.axis.Timeline of variable this.timeline does not match with type java.awt.Paint of variable this.negativeBarPaint |
17 | Expression that.timeline cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.negativeBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type org.jfree.chart.axis.Timeline of variable that.timeline does not match with type java.awt.Paint of variable that.negativeBarPaint |
20 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
21 | Super method call if(!super.equals(obj)) cannot be extracted from method |
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.renderer.category.WaterfallBarRenderer do not have a common superclass |