File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/BarRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/LegendTitle.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 24 | Number of AST nodes: 24 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true; ↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof BarRenderer)) {↵ | 4 | if (!(obj instanceof LegendTitle)) {↵ | |
5 | return false;↵ | 5 | return false; ↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | if (!super.equals(obj)) {↵ | |
8 | return false;↵ | 8 | return false; ↵ | |
9 | }↵ | 9 | }↵ | |
10 | BarRenderer that = (BarRenderer) obj;↵ | 10 | ↵ | |
11 | if (this.base != that.base↵ | 11 | LegendTitle that = (LegendTitle) obj;↵ | |
12 | ) {↵ | 12 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) {↵ | |
13 | return false;↵ | 13 | return false; ↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (this.itemMargin != that.itemMargin) {↵ | 15 | if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) {↵ | |
16 | return false;↵ | 16 | return false; ↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.drawBarOutline != that.drawBarOutline) {↵ | 18 | if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) {↵ | |
19 | return false;↵ | 19 | return false; ↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (this.maximumBarWidth != that.maximumBarWidth) {↵ | 21 | if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) {↵ | |
22 | return false;↵ | 22 | return false; ↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (this.minimumBarLength != that.minimumBarLength) {↵ | 24 | if (!this.itemFont.equals(that.itemFont)) {↵ | |
25 | return false;↵ | 25 | return false; ↵ | |
26 | }↵ | 26 | }↵ | |
27 | if (!ObjectUtilities.equal(this.gradientPaintTransformer,↵ | 27 | if (!↵ | |
28 | that.gradientPaintTransformer)) {↵ | 28 | this.itemPaint.equals(that.itemPaint)) {↵ | |
29 | return false;↵ | 29 | return false; ↵ | |
30 | }↵ | 30 | }↵ | |
31 | if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback,↵ | 31 | if (!↵ | |
32 | that.positiveItemLabelPositionFallback)) {↵ | 32 | this.hLayout.equals(that.hLayout)) {↵ | |
33 | return false;↵ | 33 | return false; ↵ | |
34 | }↵ | 34 | }↵ | |
35 | if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback,↵ | 35 | if (!↵ | |
36 | that.negativeItemLabelPositionFallback)) {↵ | 36 | this.vLayout.equals(that.vLayout)) {↵ | |
37 | return false;↵ | 37 | return false; ↵ | |
38 | }↵ | 38 | }↵ | |
39 | return true; | 39 |
| |
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) | 10.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 188 |
Number of mapped statements | 19 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 10.2 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||||||
3 | if (!(obj instanceof BarRenderer)) |
| 3 | if (!(obj instanceof LegendTitle)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
6 | return false; | 6 | return false; | |||||||||||||||||||||||||||||||
7 | BarRenderer that = (BarRenderer)obj; |
| 7 | LegendTitle that = (LegendTitle)obj; | ||||||||||||||||||||||||||||||
8 | if (this.base != that.base) |
| 10 | if (this.legendItemGraphicEdge != that.legendItemGraphicEdge) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (this.itemMargin != that.itemMargin) |
| 12 | if (this.legendItemGraphicAnchor != that.legendItemGraphicAnchor) | ||||||||||||||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.drawBarOutline != that.drawBarOutline) |
| 14 | if (this.legendItemGraphicLocation != that.legendItemGraphicLocation) | ||||||||||||||||||||||||||||||
13 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
14 | if (this.maximumBarWidth != that.maximumBarWidth) |
| | |||||||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||||||
16 | if (this.minimumBarLength != that.minimumBarLength) |
| | |||||||||||||||||||||||||||||||
17 | return false; |
| | |||||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) |
| 8 | if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) | ||||||||||||||||||||||||||||||
19 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) |
| 18 | if (!this.itemPaint.equals(that.itemPaint)) | ||||||||||||||||||||||||||||||
21 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
22 | if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) |
| 16 | if (!this.itemFont.equals(that.itemFont)) | ||||||||||||||||||||||||||||||
23 | return false; | 17 | return false; |
Row | Violation |
---|---|
1 | Super method call if(!super.equals(obj)) cannot be extracted from method |
2 | Super method call if(!super.equals(obj)) cannot be extracted from method |
3 | Type double of variable this.base does not match with type org.jfree.ui.RectangleEdge of variable this.legendItemGraphicEdge |
4 | Expression that.base cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.legendItemGraphicEdge cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type double of variable that.base does not match with type org.jfree.ui.RectangleEdge of variable that.legendItemGraphicEdge |
7 | Type double of variable this.itemMargin does not match with type org.jfree.ui.RectangleAnchor of variable this.legendItemGraphicAnchor |
8 | Expression that.itemMargin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.legendItemGraphicAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type double of variable that.itemMargin does not match with type org.jfree.ui.RectangleAnchor of variable that.legendItemGraphicAnchor |
11 | Type boolean of variable this.drawBarOutline does not match with type org.jfree.ui.RectangleAnchor of variable this.legendItemGraphicLocation |
12 | Expression that.drawBarOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.legendItemGraphicLocation cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type boolean of variable that.drawBarOutline does not match with type org.jfree.ui.RectangleAnchor of variable that.legendItemGraphicLocation |
15 | Unmatched statement if(this.maximumBarWidth != that.maximumBarWidth) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
16 | Unmatched return false; |
17 | Unmatched statement if(this.minimumBarLength != that.minimumBarLength) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
18 | Unmatched return false; |
19 | Type org.jfree.ui.GradientPaintTransformer of variable this.gradientPaintTransformer does not match with type java.awt.Paint of variable this.backgroundPaint |
20 | Expression that.gradientPaintTransformer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.backgroundPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type org.jfree.ui.GradientPaintTransformer of variable that.gradientPaintTransformer does not match with type java.awt.Paint of variable that.backgroundPaint |
23 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
24 | Expression ObjectUtilities.equal(this.positiveItemLabelPositionFallback,that.positiveItemLabelPositionFallback) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression this.itemPaint.equals(that.itemPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression ObjectUtilities.equal(this.negativeItemLabelPositionFallback,that.negativeItemLabelPositionFallback) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression this.itemFont.equals(that.itemFont) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Clone fragment #1 returns variable that with type org.jfree.chart.renderer.category.BarRenderer , while Clone fragment #2 returns variable that with type org.jfree.chart.title.LegendTitle |
29 | Not all possible execution flows end in a return statement |
30 | The refactoring of the clones is infeasible, because classes org.jfree.chart.renderer.category.BarRenderer and org.jfree.chart.title.LegendTitle do not have a common superclass |