File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/dial/DialPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYBarRenderer.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 DialPlot)) {↵ | 4 | if (!(obj instanceof XYBarRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DialPlot that = (DialPlot) obj;↵ | 7 | ↵ | |
8 | if (!ObjectUtilities.equal(this.background, that.background)) {↵ | |||
9 | return false;↵ | |||
10 | }↵ | |||
11 | if (!ObjectUtilities.equal(this.cap,↵ | 8 | if (!super.equals(obj)) {↵ | |
9 | return false;↵ | |||
10 | }↵ | |||
11 | XYBarRenderer that = (XYBarRenderer) obj;↵ | |||
12 | that.cap)) {↵ | 12 | if (this.base != that.base) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!this.dialFrame.equals(that.dialFrame)) {↵ | 15 | if (this.drawBarOutline != that.drawBarOutline) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (this.viewX != that.viewX) {↵ | 18 | if (this.margin != that.margin) {↵ | |
19 | return false;↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | if (this.viewY != that.viewY) {↵ | 21 | if (this.useYInterval != that.useYInterval) {↵ | |
22 | return false;↵ | 22 | return false;↵ | |
23 | }↵ | 23 | }↵ | |
24 | if (this.viewW != that.viewW↵ | 24 | if (!ObjectUtilities.equal(↵ | |
25 | this.gradientPaintTransformer, that.gradientPaintTransformer)↵ | |||
25 | ) {↵ | 26 | ) {↵ | |
26 | return false;↵ | 27 | return false;↵ | |
27 | }↵ | 28 | }↵ | |
28 | if (this.viewH != that.viewH) {↵ | 29 | if (!ShapeUtilities.equal(this.legendBar, that.legendBar)) {↵ | |
29 | return false;↵ | 30 | return false; ↵ | |
30 | }↵ | 31 | }↵ | |
31 | if (!this.layers.equals(that.layers↵ | 32 | if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback,↵ | |
32 | )) {↵ | 33 | that.positiveItemLabelPositionFallback)) {↵ | |
33 | return false;↵ | 34 | return false;↵ | |
34 | }↵ | 35 | }↵ | |
35 | if (!this.pointers.equals(that.pointers↵ | 36 | if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback,↵ | |
36 | )) {↵ | 37 | that.negativeItemLabelPositionFallback)) {↵ | |
37 | return false;↵ | 38 | return false;↵ | |
38 | }↵ | 39 | } ↵ | |
39 | return super.equals(obj); | 40 | return true; | |
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) | 12.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 221 |
Number of mapped statements | 24 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 16.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (obj == this) | 1 | if (obj == this) | |||||||||||||||||||||||||||
2 | return true; | 2 | return true; | |||||||||||||||||||||||||||
3 | if (!(obj instanceof DialPlot)) |
| 3 | if (!(obj instanceof XYBarRenderer)) | ||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||
5 | DialPlot that = (DialPlot)obj; |
| 7 | XYBarRenderer that = (XYBarRenderer)obj; | ||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.background, that.background)) |
| 16 | if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) | ||||||||||||||||||||||||||
7 | return false; | 17 | return false; | |||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.cap, that.cap)) |
| 20 | if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) | ||||||||||||||||||||||||||
9 | return false; | 21 | return false; | |||||||||||||||||||||||||||
10 | if (!this.dialFrame.equals(that.dialFrame)) |
| 5 | if (!super.equals(obj)) | ||||||||||||||||||||||||||
11 | return false; | 6 | return false; | |||||||||||||||||||||||||||
12 | if (this.viewX != that.viewX) |
| 12 | if (this.margin != that.margin) | ||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||
14 | if (this.viewY != that.viewY) |
| 8 | if (this.base != that.base) | ||||||||||||||||||||||||||
15 | return false; | 9 | return false; | |||||||||||||||||||||||||||
16 | if (this.viewW != that.viewW) |
| 14 | if (this.useYInterval != that.useYInterval) | ||||||||||||||||||||||||||
17 | return false; | 15 | return false; | |||||||||||||||||||||||||||
18 | if (this.viewH != that.viewH) |
| 10 | if (this.drawBarOutline != that.drawBarOutline) | ||||||||||||||||||||||||||
19 | return false; | 11 | return false; | |||||||||||||||||||||||||||
20 | if (!this.layers.equals(that.layers)) |
| 18 | if (!ShapeUtilities.equal(this.legendBar, that.legendBar)) | ||||||||||||||||||||||||||
21 | return false; | 19 | return false; | |||||||||||||||||||||||||||
22 | if (!this.pointers.equals(that.pointers)) |
| 22 | if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) | ||||||||||||||||||||||||||
23 | return false; | 23 | return false; | |||||||||||||||||||||||||||
24 | return super.equals(obj); |
| 24 | return true; |
Row | Violation |
---|---|
1 | Type org.jfree.chart.plot.dial.DialLayer of variable this.background does not match with type org.jfree.ui.GradientPaintTransformer of variable this.gradientPaintTransformer |
2 | Expression that.background cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression that.gradientPaintTransformer cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.chart.plot.dial.DialLayer of variable that.background does not match with type org.jfree.ui.GradientPaintTransformer of variable that.gradientPaintTransformer |
5 | Type org.jfree.chart.plot.dial.DialLayer of variable this.cap does not match with type org.jfree.chart.labels.ItemLabelPosition of variable this.positiveItemLabelPositionFallback |
6 | Expression that.cap cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression that.positiveItemLabelPositionFallback cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type org.jfree.chart.plot.dial.DialLayer of variable that.cap does not match with type org.jfree.chart.labels.ItemLabelPosition of variable that.positiveItemLabelPositionFallback |
9 | Expression this.dialFrame.equals(that.dialFrame) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Super method call if(!super.equals(obj)) cannot be extracted from method |
11 | Expression that.viewX cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.margin cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.viewY cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression that.base cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Type double of variable this.viewW does not match with type boolean of variable this.useYInterval |
16 | Expression that.viewW cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression that.useYInterval cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Type double of variable that.viewW does not match with type boolean of variable that.useYInterval |
19 | Type double of variable this.viewH does not match with type boolean of variable this.drawBarOutline |
20 | Expression that.viewH cannot be parameterized, because it has dependencies to/from statements that will be extracted |
21 | Expression that.drawBarOutline cannot be parameterized, because it has dependencies to/from statements that will be extracted |
22 | Type double of variable that.viewH does not match with type boolean of variable that.drawBarOutline |
23 | Expression this.layers.equals(that.layers) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression ShapeUtilities.equal(this.legendBar,that.legendBar) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
25 | Expression this.pointers.equals(that.pointers) 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 | Super method call return super.equals(obj); cannot be extracted from method |
28 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.dial.DialPlot and org.jfree.chart.renderer.xy.XYBarRenderer do not have a common superclass |