File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MeterInterval.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 (!(obj instanceof MeterInterval)) {↵ | 4 | if (!super.equals(obj)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | MeterInterval that = (MeterInterval) obj;↵ | 7 | ↵ | |
8 | if (!this.label.equals(that.label)) {↵ | |||
9 | return false;↵ | |||
10 | }↵ | 8 | if (!(obj instanceof WaterfallBarRenderer)) {↵ | |
9 | return false;↵ | |||
10 | }↵ | |||
11 | WaterfallBarRenderer that = (WaterfallBarRenderer) obj;↵ | |||
11 | if (!this.range.equals(that.range)) {↵ | 12 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) {↵ | |
12 | return false;↵ | 13 | return false;↵ | |
13 | }↵ | 14 | }↵ | |
14 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {↵ | 15 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) {↵ | |
15 | return false;↵ | 16 | return false;↵ | |
16 | }↵ | 17 | }↵ | |
17 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke↵ | 18 | if (!PaintUtilities.equal(this.positiveBarPaint,↵ | |
18 | )) {↵ | 19 | that.positiveBarPaint)) {↵ | |
19 | return false;↵ | 20 | return false;↵ | |
20 | }↵ | 21 | }↵ | |
21 | if (!PaintUtilities.equal(this.backgroundPaint, that.background↵ | 22 | if (!PaintUtilities.equal(this.negativeBarPaint,↵ | |
22 | Paint)) {↵ | 23 | that.negativeBarPaint)) {↵ | |
23 | return false;↵ | 24 | return false;↵ | |
24 | }↵ | 25 | }↵ | |
25 | return true; | 26 |
| |
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.7 |
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) | 8.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 MeterInterval)) |
| 5 | if (!(obj instanceof WaterfallBarRenderer)) | |||||||||||||||||||||||||||||||
4 | return false; | 6 | return false; | ||||||||||||||||||||||||||||||||
5 | MeterInterval that = (MeterInterval)obj; | | |||||||||||||||||||||||||||||||||
6 | if (!this.label.equals(that.label)) |
| 3 | if (!super.equals(obj)) | |||||||||||||||||||||||||||||||
7 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 7 | WaterfallBarRenderer that = (WaterfallBarRenderer)obj; | |||||||||||||||||||||||||||||||||
8 | if (!this.range.equals(that.range)) |
| 8 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) | |||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) |
| 10 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) | |||||||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) |
| 12 | if (!PaintUtilities.equal(this.positiveBarPaint, that.positiveBarPaint)) | |||||||||||||||||||||||||||||||
13 | return false; | 13 | return false; | ||||||||||||||||||||||||||||||||
14 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) |
| 14 | if (!PaintUtilities.equal(this.negativeBarPaint, that.negativeBarPaint)) | |||||||||||||||||||||||||||||||
15 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
16 | return true; | 16 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.plot.MeterInterval does not match with type org.jfree.chart.renderer.category.WaterfallBarRenderer |
2 | Expression this.label.equals(that.label) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Expression this.range.equals(that.range) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression PaintUtilities.equal(this.firstBarPaint,that.firstBarPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.awt.Paint of variable that.outlinePaint does not match with type java.awt.Paint of variable that.lastBarPaint |
7 | Expression that.outlinePaint 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.awt.Stroke of variable this.outlineStroke does not match with type java.awt.Paint of variable this.positiveBarPaint |
10 | Type java.awt.Stroke of variable that.outlineStroke does not match with type java.awt.Paint of variable that.positiveBarPaint |
11 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.positiveBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type java.awt.Stroke of variable that.outlineStroke does not match with type java.awt.Paint of variable that.positiveBarPaint |
14 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
15 | Type java.awt.Paint of variable that.backgroundPaint does not match with type java.awt.Paint of variable that.negativeBarPaint |
16 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.negativeBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.MeterInterval and org.jfree.chart.renderer.category.WaterfallBarRenderer do not have a common superclass |