File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/title/LegendGraphic.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 instanceof LegendGraphic)) {↵ | |
2 | return true;↵ | 2 | return false;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof AbstractXYItemRenderer)) {↵ | 4 | ↵ | |
5 | return false;↵ | |||
6 | }↵ | |||
7 | AbstractXYItemRenderer that = (AbstractXYItemRenderer) obj;↵ | |||
8 | if (!ObjectUtilities.equal(this.itemLabelGenerator,↵ | |||
9 | that.itemLabelGenerator↵ | 5 | LegendGraphic that = (LegendGraphic) obj;↵ | |
6 | if (this.shapeVisible != that.shapeVisible) {↵ | |||
7 | return false;↵ | |||
8 | }↵ | |||
10 | )) {↵ | 9 | if (!ShapeUtilities.equal(this.shape, that.shape)) {↵ | |
11 | return false;↵ | 10 | return false;↵ | |
12 | }↵ | 11 | }↵ | |
13 | if (!this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList)) {↵ | 12 | if (this.shapeFilled != that.shapeFilled) {↵ | |
14 | return false;↵ | 13 | return false;↵ | |
15 | }↵ | 14 | }↵ | |
16 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator,↵ | 15 | if (!PaintUtilities.equal(this.↵ | |
17 | that.baseItemLabelGenerator)) {↵ | 16 | fillPaint, that.fillPaint)) {↵ | |
18 | return false;↵ | 17 | return false;↵ | |
19 | }↵ | 18 | }↵ | |
20 | if (!ObjectUtilities.equal(this.toolTipGenerator,↵ | 19 | if (!ObjectUtilities.equal(this.fillPaintTransformer, ↵ | |
21 | that.toolTipGenerator)) {↵ | 20 | that.fillPaintTransformer)) {↵ | |
22 | return false;↵ | 21 | return false;↵ | |
23 | }↵ | 22 | }↵ | |
24 | if (!this.toolTipGeneratorList.equals(that.toolTipGeneratorList)) {↵ | 23 | if (this.shapeOutlineVisible != that.shapeOutlineVisible) {↵ | |
25 | return false;↵ | 24 | return false;↵ | |
26 | }↵ | 25 | }↵ | |
27 | if (!ObjectUtilities.equal(this.baseToolTipGenerator,↵ | 26 | if (!PaintUtilities.equal(this.↵ | |
28 | that.baseToolTipGenerator)) {↵ | 27 | outlinePaint, that.outlinePaint)) {↵ | |
29 | return false;↵ | 28 | return false;↵ | |
30 | }↵ | 29 | }↵ | |
31 | if (!ObjectUtilities.equal(this.urlGenerator, that.urlGenerator)) {↵ | 30 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {↵ | |
32 | return false;↵ | 31 | return false;↵ | |
33 | }↵ | 32 | }↵ | |
34 | if (!this.foregroundAnnotations.equals(that.foregroundAnnotations)) {↵ | 33 | if (this.shapeAnchor != that.shapeAnchor) {↵ | |
35 | return false;↵ | 34 | return false;↵ | |
36 | }↵ | 35 | }↵ | |
37 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) {↵ | 36 | if (this.shapeLocation != that.shapeLocation) {↵ | |
38 | return false;↵ | 37 | return false;↵ | |
39 | }↵ | 38 | }↵ | |
40 | if (this.defaultEntityRadius != that.defaultEntityRadius) {↵ | 39 | if (this.lineVisible != that.lineVisible) {↵ | |
41 | return false;↵ | 40 | return false;↵ | |
42 | }↵ | 41 | }↵ | |
43 | if (!ObjectUtilities.equal(this.legendItemLabelGenerator,↵ | 42 | if (!ShapeUtilities.equal(this.l↵ | |
44 | that.legendItemLabelGenerator)) {↵ | 43 | ine, that.line)) {↵ | |
45 | return false;↵ | 44 | return false;↵ | |
46 | }↵ | 45 | }↵ | |
47 | if (!ObjectUtilities.equal(this.legendItemToolTipGenerator,↵ | 46 | if (!PaintUtilities.equal(this.l↵ | |
48 | that.legendItemToolTipGenerator)) {↵ | 47 | inePaint, that.linePaint)) {↵ | |
49 | return false;↵ | 48 | return false;↵ | |
50 | }↵ | 49 | }↵ | |
51 | if (!ObjectUtilities.equal(this.legendItemURLGenerator,↵ | 50 | if (!ObjectUtilities.equal(this.l↵ | |
52 | that.legendItemURLGenerator)) {↵ | 51 | ineStroke, that.lineStroke)) {↵ | |
53 | return false;↵ | 52 | return false;↵ | |
54 | }↵ | 53 | }↵ | |
55 | return super.equals(obj); | 54 |
| |
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) | 26.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 379 |
Number of mapped statements | 20 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 11 |
Time elapsed for statement mapping (ms) | 17.3 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (!(obj instanceof AbstractXYItemRenderer)) |
| 1 | if (!(obj instanceof LegendGraphic)) | |||||||||||||||||||||||||||||||
4 | return false; | 2 | return false; | ||||||||||||||||||||||||||||||||
| 3 | LegendGraphic that = (LegendGraphic)obj; | |||||||||||||||||||||||||||||||||
| 4 | if (this.shapeVisible != that.shapeVisible) | |||||||||||||||||||||||||||||||||
|
| 5 | return false; | ||||||||||||||||||||||||||||||||
5 | AbstractXYItemRenderer that = (AbstractXYItemRenderer)obj; | | |||||||||||||||||||||||||||||||||
| 8 | if (this.shapeFilled != that.shapeFilled) | |||||||||||||||||||||||||||||||||
|
| 9 | return false; | ||||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.itemLabelGenerator, that.itemLabelGenerator)) |
| 12 | if (!ObjectUtilities.equal(this.fillPaintTransformer, that.fillPaintTransformer)) | |||||||||||||||||||||||||||||||
7 | return false; | 13 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList)) |
| 6 | if (!ShapeUtilities.equal(this.shape, that.shape)) | |||||||||||||||||||||||||||||||
9 | return false; | 7 | return false; | ||||||||||||||||||||||||||||||||
| 14 | if (this.shapeOutlineVisible != that.shapeOutlineVisible) | |||||||||||||||||||||||||||||||||
|
| 15 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.baseItemLabelGenerator, that.baseItemLabelGenerator)) |
| 18 | if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) | |||||||||||||||||||||||||||||||
11 | return false; | 19 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.toolTipGenerator, that.toolTipGenerator)) |
| 30 | if (!ObjectUtilities.equal(this.lineStroke, that.lineStroke)) | |||||||||||||||||||||||||||||||
13 | return false; | 31 | return false; | ||||||||||||||||||||||||||||||||
14 | if (!this.toolTipGeneratorList.equals(that.toolTipGeneratorList)) |
| 10 | if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) | |||||||||||||||||||||||||||||||
15 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
16 | if (!ObjectUtilities.equal(this.baseToolTipGenerator, that.baseToolTipGenerator)) |
| 16 | if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) | |||||||||||||||||||||||||||||||
17 | return false; | 17 | return false; | ||||||||||||||||||||||||||||||||
| 20 | if (this.shapeAnchor != that.shapeAnchor) | |||||||||||||||||||||||||||||||||
|
| 21 | return false; | ||||||||||||||||||||||||||||||||
| 24 | if (this.lineVisible != that.lineVisible) | |||||||||||||||||||||||||||||||||
|
| 25 | return false; | ||||||||||||||||||||||||||||||||
18 | if (!ObjectUtilities.equal(this.urlGenerator, that.urlGenerator)) |
| 26 | if (!ShapeUtilities.equal(this.line, that.line)) | |||||||||||||||||||||||||||||||
19 | return false; | 27 | return false; | ||||||||||||||||||||||||||||||||
20 | if (!this.foregroundAnnotations.equals(that.foregroundAnnotations)) |
| 28 | if (!PaintUtilities.equal(this.linePaint, that.linePaint)) | |||||||||||||||||||||||||||||||
21 | return false; | 29 | return false; | ||||||||||||||||||||||||||||||||
22 | if (!this.backgroundAnnotations.equals(that.backgroundAnnotations)) | | |||||||||||||||||||||||||||||||||
23 | return false; |
| | ||||||||||||||||||||||||||||||||
24 | if (this.defaultEntityRadius != that.defaultEntityRadius) |
| 22 | if (this.shapeLocation != that.shapeLocation) | |||||||||||||||||||||||||||||||
25 | return false; | 23 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.renderer.xy.AbstractXYItemRenderer does not match with type org.jfree.chart.title.LegendGraphic |
2 | Unmatched return false; |
3 | Unmatched return false; |
4 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable this.itemLabelGenerator does not match with type org.jfree.ui.GradientPaintTransformer of variable this.fillPaintTransformer |
5 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable that.itemLabelGenerator does not match with type org.jfree.ui.GradientPaintTransformer of variable that.fillPaintTransformer |
6 | Expression that.itemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.fillPaintTransformer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable that.itemLabelGenerator does not match with type org.jfree.ui.GradientPaintTransformer of variable that.fillPaintTransformer |
9 | Expression this.itemLabelGeneratorList.equals(that.itemLabelGeneratorList) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression ShapeUtilities.equal(this.shape,that.shape) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Unmatched return false; |
12 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable this.baseItemLabelGenerator does not match with type java.awt.Stroke of variable this.outlineStroke |
13 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable that.baseItemLabelGenerator does not match with type java.awt.Stroke of variable that.outlineStroke |
14 | Expression that.baseItemLabelGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression that.outlineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Type org.jfree.chart.labels.XYItemLabelGenerator of variable that.baseItemLabelGenerator does not match with type java.awt.Stroke of variable that.outlineStroke |
17 | Type org.jfree.chart.labels.XYToolTipGenerator of variable this.toolTipGenerator does not match with type java.awt.Stroke of variable this.lineStroke |
18 | Type org.jfree.chart.labels.XYToolTipGenerator of variable that.toolTipGenerator does not match with type java.awt.Stroke of variable that.lineStroke |
19 | Expression that.toolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
20 | Expression that.lineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Type org.jfree.chart.labels.XYToolTipGenerator of variable that.toolTipGenerator does not match with type java.awt.Stroke of variable that.lineStroke |
22 | Expression this.toolTipGeneratorList.equals(that.toolTipGeneratorList) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression PaintUtilities.equal(this.fillPaint,that.fillPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Type org.jfree.chart.labels.XYToolTipGenerator of variable this.baseToolTipGenerator does not match with type java.awt.Paint of variable this.outlinePaint |
25 | Type org.jfree.chart.labels.XYToolTipGenerator of variable that.baseToolTipGenerator does not match with type java.awt.Paint of variable that.outlinePaint |
26 | Expression that.baseToolTipGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression that.outlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Type org.jfree.chart.labels.XYToolTipGenerator of variable that.baseToolTipGenerator does not match with type java.awt.Paint of variable that.outlinePaint |
29 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
30 | Unmatched return false; |
31 | Unmatched return false; |
32 | Type org.jfree.chart.urls.XYURLGenerator of variable this.urlGenerator does not match with type java.awt.Shape of variable this.line |
33 | Type org.jfree.chart.urls.XYURLGenerator of variable that.urlGenerator does not match with type java.awt.Shape of variable that.line |
34 | Expression that.urlGenerator cannot be parameterized, because it has dependencies to/from statements that will be extracted |
35 | Expression that.line cannot be parameterized, because it has dependencies to/from statements that will be extracted |
36 | Type org.jfree.chart.urls.XYURLGenerator of variable that.urlGenerator does not match with type java.awt.Shape of variable that.line |
37 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.ShapeUtilities |
38 | Expression this.foregroundAnnotations.equals(that.foregroundAnnotations) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
39 | Expression PaintUtilities.equal(this.linePaint,that.linePaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
40 | Unmatched return false; |
41 | Type int of variable this.defaultEntityRadius does not match with type org.jfree.ui.RectangleAnchor of variable this.shapeLocation |
42 | Type int of variable that.defaultEntityRadius does not match with type org.jfree.ui.RectangleAnchor of variable that.shapeLocation |
43 | Expression that.defaultEntityRadius cannot be parameterized, because it has dependencies to/from statements that will be extracted |
44 | Expression that.shapeLocation cannot be parameterized, because it has dependencies to/from statements that will be extracted |
45 | Type int of variable that.defaultEntityRadius does not match with type org.jfree.ui.RectangleAnchor of variable that.shapeLocation |
46 | Not all possible execution flows end in a return statement |