File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/StandardXYZToolTipGenerator.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/MinMaxCategoryRenderer.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | if (obj == this) {↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | 2 | return true;↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (!(obj instanceof StandardXYZToolTipGenerator)) {↵ | 4 | if (!(obj instanceof MinMaxCategoryRenderer)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (!super.equals(obj)) {↵ | 7 | ↵ | |
8 | return false;↵ | |||
9 | }↵ | |||
10 | StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator) obj;↵ | |||
11 | if (!Objec↵ | 8 | MinMaxCategoryRenderer that = (MinMaxCategoryRenderer) obj;↵ | |
9 | if (this.plotLines != that.plotLines) {↵ | |||
10 | return false;↵ | |||
11 | }↵ | |||
12 | tUtilities.equal(this.zFormat, that.zFormat)) {↵ | 12 | if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) {↵ | |
13 | return false;↵ | 13 | return false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | if (!ObjectUtilities.equal(this.zDateFormat, that.zDateFormat)) {↵ | 15 | if (!this.groupStroke.equals(that.groupStroke)) {↵ | |
16 | return false;↵ | 16 | return false;↵ | |
17 | }↵ | 17 | }↵ | |
18 | return true; | 18 | return super.equals(obj); | |
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) | 2.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 47 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.9 |
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 StandardXYZToolTipGenerator)) |
| 3 | if (!(obj instanceof MinMaxCategoryRenderer)) | ||||||||||||||||||||||||||||||
4 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||
| 5 | MinMaxCategoryRenderer that = (MinMaxCategoryRenderer)obj; | ||||||||||||||||||||||||||||||||
| 6 | if (this.plotLines != that.plotLines) | ||||||||||||||||||||||||||||||||
|
| 7 | return false; | |||||||||||||||||||||||||||||||
5 | if (!super.equals(obj)) |
| 10 | if (!this.groupStroke.equals(that.groupStroke)) | ||||||||||||||||||||||||||||||
6 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||
7 | StandardXYZToolTipGenerator that = (StandardXYZToolTipGenerator)obj; | | ||||||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.zFormat, that.zFormat)) |
| 8 | if (!PaintUtilities.equal(this.groupPaint, that.groupPaint)) | ||||||||||||||||||||||||||||||
9 | return false; | 9 | return false; |
Row | Violation |
---|---|
1 | Unmatched return false; |
2 | Expression this.groupStroke.equals(that.groupStroke) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Super method call if(!super.equals(obj)) cannot be extracted from method |
4 | Type java.text.NumberFormat of variable this.zFormat does not match with type java.awt.Paint of variable this.groupPaint |
5 | Expression that.zFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression that.groupPaint cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Type java.text.NumberFormat of variable that.zFormat does not match with type java.awt.Paint of variable that.groupPaint |
8 | Type org.jfree.util.ObjectUtilities does not match with type org.jfree.util.PaintUtilities |
9 | Not all possible execution flows end in a return statement |
10 | The refactoring of the clones is infeasible, because classes org.jfree.chart.labels.StandardXYZToolTipGenerator and org.jfree.chart.renderer.category.MinMaxCategoryRenderer do not have a common superclass |