File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.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: 30 | 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 AbstractCategoryItemRenderer)) {↵ | 4 | if (!(obj instanceof AbstractXYItemRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | AbstractCategoryItemRenderer that = (AbstractCategoryItemRenderer) obj;↵ | 7 | AbstractXYItemRenderer that = (AbstractXYItemRenderer) obj;↵ | |
8 | if (!ObjectUtilities.equal(this.itemLabelGenerator,↵ | 8 | if (!ObjectUtilities.equal(this.itemLabelGenerator,↵ | |
9 | that.itemLabelGenerator)) {↵ | 9 | that.itemLabelGenerator)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!ObjectUtilities.equal(this.itemLabelGeneratorList,↵ | 12 | if (!this.itemLabelGeneratorList↵ | |
13 | that.itemLabelGeneratorList)) {↵ | 13 | .equals(that.itemLabelGeneratorList)) {↵ | |
14 | return false;↵ | 14 | return false;↵ | |
15 | }↵ | 15 | }↵ | |
16 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator,↵ | 16 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator,↵ | |
17 | that.baseItemLabelGenerator)) {↵ | 17 | that.baseItemLabelGenerator)) {↵ | |
18 | return false;↵ | 18 | return false;↵ | |
19 | }↵ | 19 | }↵ | |
20 | if (!ObjectUtilities.equal(this.toolTipGenerator,↵ | 20 | if (!ObjectUtilities.equal(this.toolTipGenerator,↵ | |
21 | that.toolTipGenerator)) {↵ | 21 | that.toolTipGenerator)) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (!ObjectUtilities.equal(this.toolTipGeneratorList,↵ | 24 | if (!this.toolTipGeneratorList↵ | |
25 | that.toolTipGeneratorList)) {↵ | 25 | .equals(that.toolTipGeneratorList)) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | if (!ObjectUtilities.equal(this.baseToolTipGenerator,↵ | 28 | if (!ObjectUtilities.equal(this.baseToolTipGenerator,↵ | |
29 | that.baseToolTipGenerator)) {↵ | 29 | that.baseToolTipGenerator)) {↵ | |
30 | return false;↵ | 30 | return false;↵ | |
31 | }↵ | 31 | }↵ | |
32 | if (!ObjectUtilities.equal(this.itemURLGenerator,↵ | 32 | if (!ObjectUtilities.equal(this.urlGenerator,↵ | |
33 | that.itemURLGenerator)) {↵ | 33 | that.urlGenerator)) {↵ | |
34 | return false;↵ | 34 | return false;↵ | |
35 | }↵ | 35 | }↵ | |
36 | if (!ObjectUtilities.equal(this.itemURLGeneratorList,↵ | 36 | if (!↵ | |
37 | that.itemURLGeneratorList)) {↵ | 37 | this.foregroundAnnotations.equals(that.foregroundAnnotations)) {↵ | |
38 | return false;↵ | 38 | return false;↵ | |
39 | }↵ | 39 | }↵ | |
40 | if (!ObjectUtilities.equal(this.baseItemURLGenerator,↵ | 40 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) {↵ | |
41 | return false;↵ | |||
41 | ↵ | 42 | }↵ | |
42 | that.baseItemURLGenerator)) {↵ | 43 | if (this.defaultEntityRadius != that.defaultEntityRadius) {↵ | |
43 | return false;↵ | 44 | return false;↵ | |
44 | }↵ | 45 | }↵ | |
45 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator,↵ | 46 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator,↵ | |
46 | that.legendItemLabelGenerator)) {↵ | 47 | that.legendItemLabelGenerator)) {↵ | |
47 | return false;↵ | 48 | return false;↵ | |
48 | }↵ | 49 | }↵ | |
49 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator,↵ | 50 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator,↵ | |
50 | that.legendItemToolTipGenerator)) {↵ | 51 | that.legendItemToolTipGenerator)) {↵ | |
51 | return false;↵ | 52 | return false;↵ | |
52 | }↵ | 53 | }↵ | |
53 | if (!ObjectUtilities.equal(this.legendItemURLGenerator,↵ | 54 | if (!ObjectUtilities.equal(this.legendItemURLGenerator,↵ | |
54 | that.legendItemURLGenerator)) {↵ | 55 | that.legendItemURLGenerator)) {↵ | |
55 | return false;↵ | 56 | return false;↵ | |
56 | }↵ | 57 | }↵ | |
57 | return super.equals(obj); | 58 |
| |
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) | 39.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 490 |
Number of mapped statements | 30 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 33.7 |
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 AbstractCategoryItemRenderer)) |
| 3 | if (!(obj instanceof AbstractXYItemRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | AbstractCategoryItemRenderer that = (AbstractCategoryItemRenderer)obj; |
| 5 | AbstractXYItemRenderer that = (AbstractXYItemRenderer)obj; | ||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.itemLabelGenerator, that.itemLabelGenerator)) |
| 6 | if (!ObjectUtilities.equal(this.itemLabelGenerator, that.itemLabelGenerator)) | ||||||||||||||||||||||||||
7 | return false; | 7 | return false; | |||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.itemLabelGeneratorList, that.itemLabelGeneratorList)) |
| 10 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator, that.baseItemLabelGenerator)) | ||||||||||||||||||||||||||
9 | return false; | 11 | return false; | |||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator, that.baseItemLabelGenerator)) |
| 12 | if (!ObjectUtilities.equal(this.toolTipGenerator, that.toolTipGenerator)) | ||||||||||||||||||||||||||
11 | return false; | 13 | return false; | |||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.toolTipGenerator, that.toolTipGenerator)) |
| 16 | if (!ObjectUtilities.equal(this.baseToolTipGenerator, that.baseToolTipGenerator)) | ||||||||||||||||||||||||||
13 | return false; | 17 | return false; | |||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.toolTipGeneratorList, that.toolTipGeneratorList)) |
| 18 | if (!ObjectUtilities.equal(this.urlGenerator, that.urlGenerator)) | ||||||||||||||||||||||||||
15 | return false; | 19 | return false; | |||||||||||||||||||||||||||
|
| 24 | if (this.defaultEntityRadius != that.defaultEntityRadius) | |||||||||||||||||||||||||||
|
| 25 | return false; | |||||||||||||||||||||||||||
16 | if (!ObjectUtilities.equal(this.baseToolTipGenerator, that.baseToolTipGenerator)) |
| 26 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator, that.legendItemLabelGenerator)) | ||||||||||||||||||||||||||
17 | return false; | 27 | return false; | |||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.itemURLGenerator, that.itemURLGenerator)) |
| 28 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator, that.legendItemToolTipGenerator)) | ||||||||||||||||||||||||||
19 | return false; | 29 | return false; | |||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(this.itemURLGeneratorList, that.itemURLGeneratorList)) |
| 30 | if (!ObjectUtilities.equal(this.legendItemURLGenerator, that.legendItemURLGenerator)) | ||||||||||||||||||||||||||
21 | return false; | 31 | return false; | |||||||||||||||||||||||||||
22 | if (!ObjectUtilities.equal(this.baseItemURLGenerator, that.baseItemURLGenerator)) |
| 22 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) | ||||||||||||||||||||||||||
23 | return false; | 23 | return false; | |||||||||||||||||||||||||||
24 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator, that.legendItemLabelGenerator)) |
| 20 | if (!this.foregroundAnnotations.equals(that.foregroundAnnotations)) | ||||||||||||||||||||||||||
25 | return false; | 21 | return false; | |||||||||||||||||||||||||||
26 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator, that.legendItemToolTipGenerator)) |
| 14 | if (!this.toolTipGeneratorList.equals(that.toolTipGeneratorList)) | ||||||||||||||||||||||||||
27 | return false; | 15 | return false; | |||||||||||||||||||||||||||
28 | if (!ObjectUtilities.equal(this.legendItemURLGenerator, that.legendItemURLGenerator)) |
| 8 | if (!this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList)) | ||||||||||||||||||||||||||
29 | return false; | 9 | return false; | |||||||||||||||||||||||||||
30 | return super.equals(obj); |
| 32 | return super.equals(obj); |
Row | Violation |
---|---|
1 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable this.itemLabelGenerator does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.itemLabelGenerator |
2 | Expression that.itemLabelGenerator 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.labels.CategoryItemLabelGenerator of variable that.itemLabelGenerator does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.itemLabelGenerator |
5 | Type org.jfree.util.ObjectList of variable this.itemLabelGeneratorList does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable this.baseItemLabelGenerator |
6 | Expression that.itemLabelGeneratorList 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.util.ObjectList of variable that.itemLabelGeneratorList does not match with type org.jfree.chart.labels.XYItemLabelGenerator of variable that.baseItemLabelGenerator |
9 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable this.baseItemLabelGenerator does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable this.toolTipGenerator |
10 | Expression that.baseItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.toolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.chart.labels.CategoryItemLabelGenerator of variable that.baseItemLabelGenerator does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable that.toolTipGenerator |
13 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.toolTipGenerator does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable this.baseToolTipGenerator |
14 | Expression that.toolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.baseToolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable that.toolTipGenerator does not match with type org.jfree.chart.labels.XYToolTipGenerator of variable that.baseToolTipGenerator |
17 | Type org.jfree.util.ObjectList of variable this.toolTipGeneratorList does not match with type org.jfree.chart.urls.XYURLGenerator of variable this.urlGenerator |
18 | Expression that.toolTipGeneratorList cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression that.urlGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Type org.jfree.util.ObjectList of variable that.toolTipGeneratorList does not match with type org.jfree.chart.urls.XYURLGenerator of variable that.urlGenerator |
21 | Unmatched statement if(this.defaultEntityRadius != that.defaultEntityRadius) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
22 | Unmatched return false; |
23 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable this.baseToolTipGenerator does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable this.legendItemLabelGenerator |
24 | Expression that.baseToolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression that.legendItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Type org.jfree.chart.labels.CategoryToolTipGenerator of variable that.baseToolTipGenerator does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable that.legendItemLabelGenerator |
27 | Type org.jfree.chart.urls.CategoryURLGenerator of variable this.itemURLGenerator does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable this.legendItemToolTipGenerator |
28 | Expression that.itemURLGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
29 | Expression that.legendItemToolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Type org.jfree.chart.urls.CategoryURLGenerator of variable that.itemURLGenerator does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable that.legendItemToolTipGenerator |
31 | Type org.jfree.util.ObjectList of variable this.itemURLGeneratorList does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable this.legendItemURLGenerator |
32 | Expression that.itemURLGeneratorList cannot be parameterized, because it has dependencies to/from statements that will be extracted |
33 | Expression that.legendItemURLGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
34 | Type org.jfree.util.ObjectList of variable that.itemURLGeneratorList does not match with type org.jfree.chart.labels.XYSeriesLabelGenerator of variable that.legendItemURLGenerator |
35 | Expression ObjectUtilities.equal(this.baseItemURLGenerator,that.baseItemURLGenerator) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Expression this.backgroundAnnotations.equals(that.backgroundAnnotations) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
37 | Expression ObjectUtilities.equal(this.legendItemLabelGenerator,that.legendItemLabelGenerator) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
38 | Expression this.foregroundAnnotations.equals(that.foregroundAnnotations) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
39 | Expression ObjectUtilities.equal(this.legendItemToolTipGenerator,that.legendItemToolTipGenerator) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
40 | Expression this.toolTipGeneratorList.equals(that.toolTipGeneratorList) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
41 | Expression ObjectUtilities.equal(this.legendItemURLGenerator,that.legendItemURLGenerator) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
42 | Expression this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
43 | Super method call return super.equals(obj); cannot be extracted from method |
44 | Super method call return super.equals(obj); cannot be extracted from method |
45 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables that |
46 | Not all possible execution flows end in a return statement |