File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/DateAxis.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 18 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof DateAxis)) {↵ | 4 | if (!(obj instanceof MultiplePiePlot)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | DateAxis that = (DateAxis) obj;↵ | 7 | ↵ | |
8 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)↵ | 8 | MultiplePiePlot that = (MultiplePiePlot) obj;↵ | |
9 | ) {↵ | 9 | if (this.dataExtractOrder != that.dataExtractOrder) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (!ObjectUtilities.equal(this.dateFormatOverride,↵ | 12 | if (this.limit != that.limit) {↵ | |
13 | return false;↵ | |||
13 | ↵ | 14 | }↵ | |
14 | that.dateFormatOverride)) {↵ | 15 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) {↵ | |
15 | return false;↵ | 16 | return false;↵ | |
16 | }↵ | 17 | }↵ | |
17 | if (!ObjectUtilities.equal(this.tickMarkPosition,↵ | 18 | if (!PaintUtilities.equal(this.aggregatedItemsPaint,↵ | |
18 | that.tickMarkPosition)) {↵ | 19 | that.aggregatedItemsPaint)) {↵ | |
19 | return false;↵ | 20 | return false;↵ | |
20 | }↵ | 21 | }↵ | |
21 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) {↵ | 22 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) {↵ | |
22 | return false;↵ | 23 | return false;↵ | |
23 | }↵ | 24 | }↵ | |
24 | if (!super.equals(obj)) {↵ | 25 | if (!super.equals(obj)) {↵ | |
25 | return false;↵ | 26 | return false;↵ | |
26 | }↵ | 27 | }↵ | |
27 | 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.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 105 |
Number of mapped statements | 13 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 6.5 |
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 DateAxis)) |
| 3 | if (!(obj instanceof MultiplePiePlot)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
5 | DateAxis that = (DateAxis)obj; |
| 5 | MultiplePiePlot that = (MultiplePiePlot)obj; | ||||||||||||||||||||||||||||||
|
| 6 | if (this.dataExtractOrder != that.dataExtractOrder) | |||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
|
| 8 | if (this.limit != that.limit) | |||||||||||||||||||||||||||||||
|
| 9 | return false; | |||||||||||||||||||||||||||||||
6 | if (!ObjectUtilities.equal(this.tickUnit, that.tickUnit)) |
| 14 | if (!ObjectUtilities.equal(this.pieChart, that.pieChart)) | ||||||||||||||||||||||||||||||
7 | return false; | 15 | return false; | |||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.dateFormatOverride, that.dateFormatOverride)) |
| 12 | if (!PaintUtilities.equal(this.aggregatedItemsPaint, that.aggregatedItemsPaint)) | ||||||||||||||||||||||||||||||
9 | return false; | 13 | return false; | |||||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.tickMarkPosition, that.tickMarkPosition)) |
| 16 | if (!super.equals(obj)) | ||||||||||||||||||||||||||||||
11 | return false; | 17 | return false; | |||||||||||||||||||||||||||||||
12 | if (!ObjectUtilities.equal(this.timeline, that.timeline)) |
| 10 | if (!this.aggregatedItemsKey.equals(that.aggregatedItemsKey)) | ||||||||||||||||||||||||||||||
13 | return false; | 11 | return false; |
Row | Violation |
---|---|
1 | Unmatched statement if(this.dataExtractOrder != that.dataExtractOrder) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return false; |
3 | Unmatched statement if(this.limit != that.limit) cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Type org.jfree.chart.axis.DateTickUnit of variable this.tickUnit does not match with type org.jfree.chart.JFreeChart of variable this.pieChart |
6 | Expression that.tickUnit cannot be unified with expression that.pieChart , because common superclass type java.io.Serializable cannot be passed as an argument to public static boolean equal(java.lang.Object, java.lang.Object) |
7 | Expression that.tickUnit cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.pieChart cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type org.jfree.chart.axis.DateTickUnit of variable that.tickUnit does not match with type org.jfree.chart.JFreeChart of variable that.pieChart |
10 | Type java.text.DateFormat of variable this.dateFormatOverride does not match with type java.awt.Paint of variable this.aggregatedItemsPaint |
11 | Expression that.dateFormatOverride cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Expression that.aggregatedItemsPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Type java.text.DateFormat of variable that.dateFormatOverride does not match with type java.awt.Paint of variable that.aggregatedItemsPaint |
14 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
15 | Expression ObjectUtilities.equal(this.tickMarkPosition,that.tickMarkPosition) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Super method call if(!super.equals(obj)) cannot be extracted from method |
17 | Expression ObjectUtilities.equal(this.timeline,that.timeline) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression this.aggregatedItemsKey.equals(that.aggregatedItemsKey) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables that |
20 | Not all possible execution flows end in a return statement |
21 | The refactoring of the clones is infeasible, because classes org.jfree.chart.axis.DateAxis and org.jfree.chart.plot.MultiplePiePlot do not have a common superclass |