File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/PolarPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 32 | Number of AST nodes: 32 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof PolarPlot)) {↵ | 4 | if (!(obj instanceof AbstractXYItemRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | PolarPlot that = (PolarPlot) obj;↵ | 7 | AbstractXYItemRenderer that = (AbstractXYItemRenderer) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.axis, that.axis)) {↵ | 8 | if (!ObjectUtilities.equal(this.↵ | |
9 | return false;↵ | 9 | itemLabelGenerator,↵ | |
10 | }↵ | 10 | ↵ | |
11 | if (!ObjectUtilities.equal(this.renderer, that.renderer)) {↵ | 11 | that.itemLabelGenerator)) {↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | if (!this.angleTickUnit.equals(that.angleTickUnit)) {↵ | 14 | if (!this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | if (this.angleGridlinesVisible != that.angleGridlinesVisible) {↵ | 17 | if (↵ | |
18 | return false;↵ | |||
19 | }↵ | |||
20 | if (this.angleLabelsVisible != that.angleLabelsVisible↵ | 18 | !ObjectUtilities.equal(this.baseItemLabelGenerator,↵ | |
19 | that.baseItemLabelGenerator)) {↵ | |||
20 | return false;↵ | |||
21 | }↵ | |||
22 | if (!ObjectUtilities.equal(this.toolTipGenerator,↵ | |||
21 | ) {↵ | 23 | that.toolTipGenerator)) {↵ | |
22 | return false;↵ | 24 | return false;↵ | |
23 | }↵ | 25 | }↵ | |
24 | if (!this.angleLabelFont.equals(that.angleLabelFont)) {↵ | 26 | if (!this.toolTipGeneratorList.equals(that.toolTipGeneratorList)) {↵ | |
25 | return false;↵ | 27 | return false;↵ | |
26 | }↵ | 28 | }↵ | |
27 | if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint↵ | 29 | if (!ObjectUtilities.equal(this.baseToolTipGenerator,↵ | |
28 | )) {↵ | 30 | that.baseToolTipGenerator)) {↵ | |
29 | return false;↵ | 31 | return false;↵ | |
30 | }↵ | 32 | }↵ | |
31 | if (!ObjectUtilities.equal(this.angleGridlineStroke,↵ | 33 | if (!ObjectUtilities.equal(this.↵ | |
32 | that.angleGridlineStroke)) {↵ | 34 | urlGenerator, that.urlGenerator)) {↵ | |
33 | return false;↵ | 35 | return false;↵ | |
34 | }↵ | 36 | }↵ | |
35 | if (!PaintUtilities.equal(↵ | 37 | if (!↵ | |
36 | this.angleGridlinePaint, that.angleGridlinePaint↵ | |||
37 | ↵ | 38 | this.foregroundAnnotations.equals(that.foregroundAnnotations)) {↵ | |
39 | return false;↵ | |||
40 | }↵ | |||
38 | )) {↵ | 41 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) {↵ | |
39 | return false;↵ | 42 | return false;↵ | |
40 | }↵ | 43 | }↵ | |
41 | if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) {↵ | 44 | if (this.defaultEntityRadius != that.defaultEntityRadius) {↵ | |
42 | return false;↵ | 45 | return false;↵ | |
43 | }↵ | 46 | }↵ | |
44 | if (!ObjectUtilities.equal(this.radiusGridlineStroke,↵ | 47 | if (!ObjectUtilities.equal(this.↵ | |
45 | that.radiusGridlineStroke↵ | 48 | legendItemLabelGenerator,↵ | |
46 | )) {↵ | 49 | that.legendItemLabelGenerator)) {↵ | |
47 | return false;↵ | 50 | return false;↵ | |
48 | }↵ | 51 | }↵ | |
49 | if (!PaintUtilities.equal(this.radiusGridlinePaint,↵ | 52 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator,↵ | |
50 | that.radiusGridlinePaint)) {↵ | 53 | that.legendItemToolTipGenerator)) {↵ | |
51 | return false;↵ | 54 | return false;↵ | |
52 | }↵ | 55 | }↵ | |
53 | if (!this.cornerTextItems.equals(that.cornerTextItems↵ | 56 | if (!ObjectUtilities.equal(this.legendItemURLGenerator,↵ | |
54 | )) {↵ | 57 | that.legendItemURLGenerator)) {↵ | |
55 | return false;↵ | 58 | return false;↵ | |
56 | }↵ | 59 | }↵ | |
57 | return super.equals(obj); | 60 |
| |
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) | 34.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 430 |
Number of mapped statements | 27 |
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) | 30.3 |
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 PolarPlot)) |
| 3 | if (!(obj instanceof AbstractXYItemRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | PolarPlot that = (PolarPlot)obj; |
| 5 | AbstractXYItemRenderer that = (AbstractXYItemRenderer)obj; | ||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.axis, that.axis)) |
| 6 | if (!ObjectUtilities.equal(this.itemLabelGenerator, that.itemLabelGenerator)) | ||||||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.renderer, that.renderer)) |
| 10 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator, that.baseItemLabelGenerator)) | ||||||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
10 | if (!this.angleTickUnit.equals(that.angleTickUnit)) |
| 8 | if (!this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList)) | ||||||||||||||||||||||||||||||
11 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||
12 | if (this.angleGridlinesVisible != that.angleGridlinesVisible) |
| 24 | if (this.defaultEntityRadius != that.defaultEntityRadius) | ||||||||||||||||||||||||||||||
13 | return false; | 25 | return false; | |||||||||||||||||||||||||||||||
14 | if (this.angleLabelsVisible != that.angleLabelsVisible) |
| | |||||||||||||||||||||||||||||||
15 | return false; |
| | |||||||||||||||||||||||||||||||
16 | if (!this.angleLabelFont.equals(that.angleLabelFont)) |
| 14 | if (!this.toolTipGeneratorList.equals(that.toolTipGeneratorList)) | ||||||||||||||||||||||||||||||
17 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
18 | if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) |
| 18 | if (!ObjectUtilities.equal(this.urlGenerator, that.urlGenerator)) | ||||||||||||||||||||||||||||||
19 | return false; | 19 | return false; | |||||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) |
| 16 | if (!ObjectUtilities.equal(this.baseToolTipGenerator, that.baseToolTipGenerator)) | ||||||||||||||||||||||||||||||
21 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
22 | if (!PaintUtilities.equal(this.angleGridlinePaint, that.angleGridlinePaint)) |
| 26 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator, that.legendItemLabelGenerator)) | ||||||||||||||||||||||||||||||
23 | return false; | 27 | return false; | |||||||||||||||||||||||||||||||
24 | if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) |
| | |||||||||||||||||||||||||||||||
25 | return false; |
| | |||||||||||||||||||||||||||||||
26 | if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) |
| 12 | if (!ObjectUtilities.equal(this.toolTipGenerator, that.toolTipGenerator)) | ||||||||||||||||||||||||||||||
27 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
28 | if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) |
| 22 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) | ||||||||||||||||||||||||||||||
29 | return false; | 23 | return false; | |||||||||||||||||||||||||||||||
30 | if (!this.cornerTextItems.equals(that.cornerTextItems)) |
| 20 | if (!this.foregroundAnnotations.equals(that.foregroundAnnotations)) | ||||||||||||||||||||||||||||||
31 | return false; | 21 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.ValueAxis of variable this.axis does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.itemLabelGenerator |
2 | Expression that.axis cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.itemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.chart.axis.ValueAxis of variable that.axis does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.itemLabelGenerator |
5 | Type org.jfree.chart.renderer.PolarItemRenderer of variable this.renderer does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.baseItemLabelGenerator |
6 | Expression that.renderer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.baseItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.jfree.chart.renderer.PolarItemRenderer of variable that.renderer does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.baseItemLabelGenerator |
9 | Expression that.angleTickUnit cannot be unified with expression that.itemLabelGeneratorList , because common superclass type java.io.Serializable cannot be passed as an argument to public boolean equals(java.lang.Object) |
10 | Expression that.angleTickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.itemLabelGeneratorList cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.chart.axis.TickUnit of variable that.angleTickUnit does not match with type org.jfree.util.ObjectList of variable that.itemLabelGeneratorList |
13 | Type org.jfree.chart.axis.TickUnit of variable this.angleTickUnit does not match with type org.jfree.util.ObjectList of variable this.itemLabelGeneratorList |
14 | Type boolean of variable this.angleGridlinesVisible does not match with type int of variable this.defaultEntityRadius |
15 | Expression that.angleGridlinesVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Expression that.defaultEntityRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Type boolean of variable that.angleGridlinesVisible does not match with type int of variable that.defaultEntityRadius |
18 | Unmatched statement if(this.angleLabelsVisible != that.angleLabelsVisible) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
19 | Unmatched return false; |
20 | Expression that.angleLabelFont cannot be unified with expression that.toolTipGeneratorList , because common superclass type java.io.Serializable cannot be passed as an argument to public boolean equals(java.lang.Object) |
21 | Expression that.angleLabelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Expression that.toolTipGeneratorList cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Type java.awt.Font of variable that.angleLabelFont does not match with type org.jfree.util.ObjectList of variable that.toolTipGeneratorList |
24 | Type java.awt.Font of variable this.angleLabelFont does not match with type org.jfree.util.ObjectList of variable this.toolTipGeneratorList |
25 | Type java.awt.Paint of variable this.angleLabelPaint does not match with type org.jfree.chart.urls.XYURLGenerator of variable this.urlGenerator |
26 | Expression that.angleLabelPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression that.urlGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Type java.awt.Paint of variable that.angleLabelPaint does not match with type org.jfree.chart.urls.XYURLGenerator of variable that.urlGenerator |
29 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
30 | Type java.awt.Stroke of variable this.angleGridlineStroke does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable this.baseToolTipGenerator |
31 | Expression that.angleGridlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
32 | Expression that.baseToolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Type java.awt.Stroke of variable that.angleGridlineStroke does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable that.baseToolTipGenerator |
34 | Type java.awt.Paint of variable this.angleGridlinePaint does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable this.legendItemLabelGenerator |
35 | Expression that.angleGridlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Expression that.legendItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
37 | Type java.awt.Paint of variable that.angleGridlinePaint does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable that.legendItemLabelGenerator |
38 | Type org.jfree.util.PaintUtilities does not match with type org.jfree.util.ObjectUtilities |
39 | Unmatched statement if(this.radiusGridlinesVisible != that.radiusGridlinesVisible) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
40 | Unmatched return false; |
41 | Type java.awt.Stroke of variable this.radiusGridlineStroke does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable this.toolTipGenerator |
42 | Expression that.radiusGridlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
43 | Expression that.toolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
44 | Type java.awt.Stroke of variable that.radiusGridlineStroke does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable that.toolTipGenerator |
45 | Expression PaintUtilities.equal(this.radiusGridlinePaint,that.radiusGridlinePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
46 | Expression this.backgroundAnnotations.equals(that.backgroundAnnotations) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
47 | Expression that.cornerTextItems cannot be parameterized, because it has dependencies to/from statements that will be extracted |
48 | Expression that.foregroundAnnotations cannot be parameterized, because it has dependencies to/from statements that will be extracted |
49 | Clone fragment #1 returns variable that with type org.jfree.chart.plot.PolarPlot , while Clone fragment #2 returns variable that with type org.jfree.chart.renderer.xy.AbstractXYItemRenderer |
50 | Not all possible execution flows end in a return statement |
51 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.PolarPlot and org.jfree.chart.renderer.xy.AbstractXYItemRenderer do not have a common superclass |