File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Axis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MeterPlot.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 44 | Number of AST nodes: 42 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | } ↵ | |
4 | if (!(obj instanceof Axis)) {↵ | 4 | if (!(obj instanceof MeterPlot)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | ↵ | |
7 | Axis that = (Axis) obj;↵ | 7 | ↵ | |
8 | if (this.visible != that.visible↵ | 8 | }↵ | |
9 | ) {↵ | 9 | if (!super.equals(obj)) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | MeterPlot that = (MeterPlot) obj;↵ | |||
12 | if (!ObjectUtilities.equal(this.label, that.label)) {↵ | 13 | if (!ObjectUtilities.equal(this.units, that.units)) {↵ | |
13 | return false;↵ | 14 | return false; ↵ | |
14 | }↵ | 15 | }↵ | |
15 | if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) {↵ | 16 | if (!ObjectUtilities.equal(this.range, that.range)) {↵ | |
16 | return false;↵ | 17 | return false;↵ | |
17 | }↵ | 18 | }↵ | |
18 | if (!PaintUtilities.equal(this.labelPaint, that.labelPaint)) {↵ | 19 | if (!ObjectUtilities.equal(this.intervals, that.intervals)) {↵ | |
19 | return false;↵ | 20 | return false; ↵ | |
20 | }↵ | 21 | }↵ | |
21 | if (!ObjectUtilities.equal(this.labelInsets, that.labelInsets)) {↵ | 22 | if (!PaintUtilities.equal(this.↵ | |
22 | return false;↵ | 23 | dialOutlinePaint, ↵ | |
23 | }↵ | 24 | ↵ | |
24 | if (this.labelAngle != that.labelAngle) {↵ | 25 | that.dialOutlinePaint)) {↵ | |
25 | return false;↵ | 26 | return false; ↵ | |
26 | }↵ | 27 | }↵ | |
27 | if (this.axisLineVisible != that.axisLineVisible) {↵ | 28 | if (this.shape != that.shape) {↵ | |
28 | return false;↵ | 29 | return false; ↵ | |
29 | }↵ | 30 | }↵ | |
30 | if (!ObjectUtilities.equal(this.axisLineStroke, that.axisLineStroke↵ | 31 | if (!PaintUtilities.equal(this.dialBackgroundPaint, ↵ | |
31 | )) {↵ | 32 | that.dialBackgroundPaint)) {↵ | |
32 | return false;↵ | 33 | return false; ↵ | |
33 | }↵ | 34 | }↵ | |
34 | if (!PaintUtilities.equal(this.axisLinePaint, that.axisLinePaint)) {↵ | 35 | if (!PaintUtilities.equal(this.needlePaint, that.needlePaint)) {↵ | |
35 | return false;↵ | 36 | return false; ↵ | |
36 | }↵ | 37 | }↵ | |
37 | if (this.tickLabelsVisible != that.tickLabelsVisible) {↵ | 38 | if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) {↵ | |
38 | return false;↵ | 39 | return false; ↵ | |
39 | }↵ | 40 | }↵ | |
40 | if (!ObjectUtilities.equal(this.tickLabelFont, that.tickLabelFont)) {↵ | 41 | if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) {↵ | |
41 | return false;↵ | 42 | return false; ↵ | |
42 | }↵ | 43 | }↵ | |
43 | if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) {↵ | 44 | if (!PaintUtilities.equal(this.tickPaint, that.tickPaint)) {↵ | |
44 | return false;↵ | 45 | return false;↵ | |
45 | }↵ | 46 | }↵ | |
46 | if (!ObjectUtilities.equal(↵ | 47 | if (↵ | |
47 | this.tickLabelInsets, that.tickLabelInsets↵ | |||
48 | )) {↵ | 48 | this.tickSize != that.tickSize) {↵ | |
49 | return false;↵ | 49 | return false;↵ | |
50 | }↵ | 50 | }↵ | |
51 | if (this.tickMarksVisible != that.tickMarksVisible) {↵ | 51 | if (this.tickLabelsVisible != that.tickLabelsVisible) {↵ | |
52 | return false;↵ | 52 | return false; ↵ | |
53 | }↵ | 53 | }↵ | |
54 | if (this.tickMarkInsideLength != that.tickMarkInsideLength) {↵ | 54 | if (!ObjectUtilities.equal(this.tickLabelFont, that.tickLabelFont)) {↵ | |
55 | return false;↵ | 55 | return false; ↵ | |
56 | }↵ | 56 | }↵ | |
57 | if (this.tickMarkOutsideLength != that.tickMarkOutsideLength) {↵ | 57 | if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) {↵ | |
58 | return false;↵ | 58 | return false;↵ | |
59 | }↵ | 59 | }↵ | |
60 | if (!PaintUtilities.equal(this.tickMarkPaint, that.tickMarkPain↵ | 60 | if (!ObjectUtilities.equal(this.tickLabelFormat, ↵ | |
61 | t)) {↵ | 61 | that.tickLabelFormat)) {↵ | |
62 | return false;↵ | 62 | return false; ↵ | |
63 | }↵ | 63 | }↵ | |
64 | if (!ObjectUtilities.equal(this.tickMarkStroke, that.tickMarkStroke)) {↵ | 64 | if (this.drawBorder != that.drawBorder) {↵ | |
65 | return false;↵ | 65 | return false; ↵ | |
66 | }↵ | 66 | }↵ | |
67 | if (this.fixedDimension != that.fixedDimension) {↵ | 67 | if (this.meterAngle != that.meterAngle) {↵ | |
68 | return false;↵ | 68 | return false; ↵ | |
69 | }↵ | 69 | }↵ | |
70 | return true; | 70 |
| |
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) | 82.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 775 |
Number of mapped statements | 36 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 52.4 |
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 Axis)) |
| 3 | if (!(obj instanceof MeterPlot)) | |||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||||||
| 5 | if (!super.equals(obj)) | |||||||||||||||||||||||||||||||||
|
| 6 | return false; | ||||||||||||||||||||||||||||||||
5 | Axis that = (Axis)obj; | | |||||||||||||||||||||||||||||||||
| 7 | MeterPlot that = (MeterPlot)obj; | |||||||||||||||||||||||||||||||||
6 | if (this.visible != that.visible) |
| 30 | if (this.tickLabelsVisible != that.tickLabelsVisible) | |||||||||||||||||||||||||||||||
7 | return false; | 31 | return false; | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.label, that.label)) |
| 8 | if (!ObjectUtilities.equal(this.units, that.units)) | |||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.labelFont, that.labelFont)) |
| 22 | if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) | |||||||||||||||||||||||||||||||
11 | return false; | 23 | return false; | ||||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.labelPaint, that.labelPaint)) |
| 14 | if (!PaintUtilities.equal(this.dialOutlinePaint, that.dialOutlinePaint)) | |||||||||||||||||||||||||||||||
13 | return false; | 15 | return false; | ||||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.labelInsets, that.labelInsets)) |
| 12 | if (!ObjectUtilities.equal(this.intervals, that.intervals)) | |||||||||||||||||||||||||||||||
15 | return false; | 13 | return false; | ||||||||||||||||||||||||||||||||
| 18 | if (!PaintUtilities.equal(this.dialBackgroundPaint, that.dialBackgroundPaint)) | |||||||||||||||||||||||||||||||||
|
| 19 | return false; | ||||||||||||||||||||||||||||||||
16 | if (this.labelAngle != that.labelAngle) |
| 28 | if (this.tickSize != that.tickSize) | |||||||||||||||||||||||||||||||
17 | return false; | 29 | return false; | ||||||||||||||||||||||||||||||||
18 | if (this.axisLineVisible != that.axisLineVisible) |
| 38 | if (this.drawBorder != that.drawBorder) | |||||||||||||||||||||||||||||||
19 | return false; | 39 | return false; | ||||||||||||||||||||||||||||||||
20 | if (!ObjectUtilities.equal(this.axisLineStroke, that.axisLineStroke)) |
| 10 | if (!ObjectUtilities.equal(this.range, that.range)) | |||||||||||||||||||||||||||||||
21 | return false; | 11 | return false; | ||||||||||||||||||||||||||||||||
22 | if (!PaintUtilities.equal(this.axisLinePaint, that.axisLinePaint)) |
| 20 | if (!PaintUtilities.equal(this.needlePaint, that.needlePaint)) | |||||||||||||||||||||||||||||||
23 | return false; | 21 | return false; | ||||||||||||||||||||||||||||||||
24 | if (this.tickLabelsVisible != that.tickLabelsVisible) |
| 16 | if (this.shape != that.shape) | |||||||||||||||||||||||||||||||
25 | return false; | 17 | return false; | ||||||||||||||||||||||||||||||||
26 | if (!ObjectUtilities.equal(this.tickLabelFont, that.tickLabelFont)) |
| 32 | if (!ObjectUtilities.equal(this.tickLabelFont, that.tickLabelFont)) | |||||||||||||||||||||||||||||||
27 | return false; | 33 | return false; | ||||||||||||||||||||||||||||||||
28 | if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) |
| 34 | if (!PaintUtilities.equal(this.tickLabelPaint, that.tickLabelPaint)) | |||||||||||||||||||||||||||||||
29 | return false; | 35 | return false; | ||||||||||||||||||||||||||||||||
30 | if (!ObjectUtilities.equal(this.tickLabelInsets, that.tickLabelInsets)) |
| 36 | if (!ObjectUtilities.equal(this.tickLabelFormat, that.tickLabelFormat)) | |||||||||||||||||||||||||||||||
31 | return false; | 37 | return false; | ||||||||||||||||||||||||||||||||
32 | if (this.tickMarksVisible != that.tickMarksVisible) |
| 40 | if (this.meterAngle != that.meterAngle) | |||||||||||||||||||||||||||||||
33 | return false; | 41 | return false; | ||||||||||||||||||||||||||||||||
34 | if (this.tickMarkInsideLength != that.tickMarkInsideLength) | | |||||||||||||||||||||||||||||||||
35 | return false; |
| | ||||||||||||||||||||||||||||||||
36 | if (this.tickMarkOutsideLength != that.tickMarkOutsideLength) | | |||||||||||||||||||||||||||||||||
37 | return false; |
| | ||||||||||||||||||||||||||||||||
38 | if (!PaintUtilities.equal(this.tickMarkPaint, that.tickMarkPaint)) |
| 26 | if (!PaintUtilities.equal(this.tickPaint, that.tickPaint)) | |||||||||||||||||||||||||||||||
39 | return false; | 27 | return false; | ||||||||||||||||||||||||||||||||
40 | if (!ObjectUtilities.equal(this.tickMarkStroke, that.tickMarkStroke)) |
| 24 | if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) | |||||||||||||||||||||||||||||||
41 | return false; | 25 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.axis.Axis does not match with type org.jfree.chart.plot.MeterPlot |
2 | Unmatched return false; |
3 | Type boolean of variable that.visible does not match with type boolean of variable that.tickLabelsVisible |
4 | Expression that.visible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.tickLabelsVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.lang.String of variable that.label does not match with type java.lang.String of variable that.units |
7 | Expression that.label cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.units cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.awt.Font of variable that.labelFont does not match with type java.awt.Font of variable that.valueFont |
10 | Expression that.labelFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.valueFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type java.awt.Paint of variable that.labelPaint does not match with type java.awt.Paint of variable that.dialOutlinePaint |
13 | Expression that.labelPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression that.dialOutlinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type org.jfree.ui.RectangleInsets of variable this.labelInsets does not match with type java.util.List of variable this.intervals |
16 | Type org.jfree.ui.RectangleInsets of variable that.labelInsets does not match with type java.util.List of variable that.intervals |
17 | Expression that.labelInsets cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression that.intervals cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Type org.jfree.ui.RectangleInsets of variable that.labelInsets does not match with type java.util.List of variable that.intervals |
20 | Unmatched return false; |
21 | Type double of variable that.labelAngle does not match with type double of variable that.tickSize |
22 | Expression that.labelAngle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression that.tickSize cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Type boolean of variable that.axisLineVisible does not match with type boolean of variable that.drawBorder |
25 | Expression that.axisLineVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
26 | Expression that.drawBorder cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Type java.awt.Stroke of variable this.axisLineStroke does not match with type org.jfree.data.Range of variable this.range |
28 | Type java.awt.Stroke of variable that.axisLineStroke does not match with type org.jfree.data.Range of variable that.range |
29 | Expression that.axisLineStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
30 | Expression that.range cannot be parameterized, because it has dependencies to/from statements that will be extracted |
31 | Type java.awt.Stroke of variable that.axisLineStroke does not match with type org.jfree.data.Range of variable that.range |
32 | Type java.awt.Paint of variable that.axisLinePaint does not match with type java.awt.Paint of variable that.needlePaint |
33 | Expression that.axisLinePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
34 | Expression that.needlePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
35 | Type boolean of variable this.tickLabelsVisible does not match with type org.jfree.chart.plot.DialShape of variable this.shape |
36 | Type boolean of variable that.tickLabelsVisible does not match with type org.jfree.chart.plot.DialShape of variable that.shape |
37 | Expression that.tickLabelsVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
38 | Expression that.shape cannot be parameterized, because it has dependencies to/from statements that will be extracted |
39 | Type boolean of variable that.tickLabelsVisible does not match with type org.jfree.chart.plot.DialShape of variable that.shape |
40 | Type java.awt.Font of variable that.tickLabelFont does not match with type java.awt.Font of variable that.tickLabelFont |
41 | Type java.awt.Paint of variable that.tickLabelPaint does not match with type java.awt.Paint of variable that.tickLabelPaint |
42 | Type org.jfree.ui.RectangleInsets of variable this.tickLabelInsets does not match with type java.text.NumberFormat of variable this.tickLabelFormat |
43 | Type org.jfree.ui.RectangleInsets of variable that.tickLabelInsets does not match with type java.text.NumberFormat of variable that.tickLabelFormat |
44 | Expression that.tickLabelInsets cannot be parameterized, because it has dependencies to/from statements that will be extracted |
45 | Expression that.tickLabelFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
46 | Type org.jfree.ui.RectangleInsets of variable that.tickLabelInsets does not match with type java.text.NumberFormat of variable that.tickLabelFormat |
47 | Type boolean of variable this.tickMarksVisible does not match with type int of variable this.meterAngle |
48 | Type boolean of variable that.tickMarksVisible does not match with type int of variable that.meterAngle |
49 | Expression that.tickMarksVisible cannot be parameterized, because it has dependencies to/from statements that will be extracted |
50 | Expression that.meterAngle cannot be parameterized, because it has dependencies to/from statements that will be extracted |
51 | Type boolean of variable that.tickMarksVisible does not match with type int of variable that.meterAngle |
52 | Unmatched return false; |
53 | Unmatched return false; |
54 | Type java.awt.Paint of variable that.tickMarkPaint does not match with type java.awt.Paint of variable that.tickPaint |
55 | Expression that.tickMarkPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
56 | Expression that.tickPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
57 | Type java.awt.Stroke of variable this.tickMarkStroke does not match with type java.awt.Paint of variable this.valuePaint |
58 | Type java.awt.Stroke of variable that.tickMarkStroke does not match with type java.awt.Paint of variable that.valuePaint |
59 | Expression that.tickMarkStroke cannot be parameterized, because it has dependencies to/from statements that will be extracted |
60 | Expression that.valuePaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
61 | Type java.awt.Stroke of variable that.tickMarkStroke does not match with type java.awt.Paint of variable that.valuePaint |
62 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
63 | Not all possible execution flows end in a return statement |
64 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.Axis and org.jfree.chart.plot.MeterPlot do not have a common superclass |