File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/WaterfallBarRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 18 | Number of AST nodes: 16 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof MultiplePiePlot)) {↵ | 4 | if (!super.equals(obj)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | MultiplePiePlot that = (MultiplePiePlot) obj;↵ | 7 | ↵ | |
8 | if (this.dataExtractOrder != that.dataExtractOrder) {↵ | |||
9 | return false;↵ | |||
10 | }↵ | |||
11 | if (this.limit != that.limit↵ | 8 | if (!(obj instanceof WaterfallBarRenderer)) {↵ | |
9 | return false;↵ | |||
10 | }↵ | |||
11 | WaterfallBarRenderer that = (WaterfallBarRenderer) obj;↵ | |||
12 | ) {↵ | 12 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {↵ | 15 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | if (!PaintUtilities.equal(this.aggregatedItemsPaint,↵ | 18 | if (!PaintUtilities.equal(this.positiveBarPaint,↵ | |
19 | that.aggregatedItemsPaint)) {↵ | 19 | that.positiveBarPaint)) {↵ | |
20 | return false;↵ | 20 | return false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {↵ | 22 | if (!PaintUtilities.equal(this.↵ | |
23 | return false;↵ | 23 | negativeBarPaint,↵ | |
24 | }↵ | 24 | ↵ | |
25 | if (!super.equals(obj)) {↵ | 25 | that.negativeBarPaint)) {↵ | |
26 | return false;↵ | 26 | return false;↵ | |
27 | }↵ | 27 | }↵ | |
28 | return true; | 28 |
| |
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) | 5.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 105 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 5.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 MultiplePiePlot)) |
| 5 | if (!(obj instanceof WaterfallBarRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 6 | return false; | |||||||||||||||||||||||||||||||
5 | MultiplePiePlot that = (MultiplePiePlot)obj; | | ||||||||||||||||||||||||||||||||
6 | if (this.dataExtractOrder != that.dataExtractOrder) | | ||||||||||||||||||||||||||||||||
7 | return false; |
| | |||||||||||||||||||||||||||||||
8 | if (this.limit != that.limit) | | ||||||||||||||||||||||||||||||||
9 | return false; |
| | |||||||||||||||||||||||||||||||
10 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) |
| 3 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
11 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 7 | WaterfallBarRenderer that = (WaterfallBarRenderer)obj; | ||||||||||||||||||||||||||||||||
12 | if (!PaintUtilities.equal(this.aggregatedItemsPaint, that.aggregatedItemsPaint)) |
| 12 | if (!PaintUtilities.equal(this.positiveBarPaint, that.positiveBarPaint)) | ||||||||||||||||||||||||||||||
13 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
14 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) |
| 10 | if (!PaintUtilities.equal(this.lastBarPaint, that.lastBarPaint)) | ||||||||||||||||||||||||||||||
15 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
16 | if (!super.equals(obj)) |
| 8 | if (!PaintUtilities.equal(this.firstBarPaint, that.firstBarPaint)) | ||||||||||||||||||||||||||||||
17 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Unmatched return false; |
2 | Unmatched return false; |
3 | Expression this.aggregatedItemsKey.equals(that.aggregatedItemsKey) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Super method call if(!super.equals(obj)) cannot be extracted from method |
5 | Expression that.aggregatedItemsPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.positiveBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type org.jfree.chart.JFreeChart of variable this.pieChart does not match with type java.awt.Paint of variable this.lastBarPaint |
8 | Expression that.pieChart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression that.lastBarPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Type org.jfree.chart.JFreeChart of variable that.pieChart does not match with type java.awt.Paint of variable that.lastBarPaint |
11 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
12 | Expression PaintUtilities.equal(this.firstBarPaint,that.firstBarPaint) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Super method call if(!super.equals(obj)) cannot be extracted from method |
14 | Not all possible execution flows end in a return statement |
15 | The refactoring of the clones is infeasible, because classes org.jfree.chart.plot.MultiplePiePlot and org.jfree.chart.renderer.category.WaterfallBarRenderer do not have a common superclass |