File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/ChartEntity.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/AbstractCategoryItemLabelGenerator.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 ChartEntity)) {↵ | 4 | if (!(obj instanceof AbstractCategoryItemLabelGenerator)) {↵ | |
5 | return false; ↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | ChartEntity that = (ChartEntity↵ | 7 | ↵ | |
8 | AbstractCategoryItemLabelGenerator that ↵ | |||
8 | ) obj;↵ | 9 | = (AbstractCategoryItemLabelGenerator) obj;↵ | |
9 | if (!this.area.equals(that.area)) {↵ | 10 | if (!this.labelFormat.equals(that.labelFormat)) {↵ | |
10 | return false; ↵ | 11 | return false;↵ | |
11 | }↵ | 12 | }↵ | |
12 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {↵ | 13 | if (!ObjectUtilities.equal(this.dateFormat, that.dateFormat)) {↵ | |
13 | return false; ↵ | 14 | return false;↵ | |
14 | }↵ | 15 | }↵ | |
15 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | 16 | if (!ObjectUtilities.equal(this.numberFormat, that.numberFormat)) {↵ | |
16 | return false; ↵ | 17 | return false;↵ | |
17 | }↵ | 18 | }↵ | |
18 | return true; | 19 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 62 |
Number of mapped statements | 12 |
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) | 3.5 |
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 ChartEntity)) |
| 3 | if (!(obj instanceof AbstractCategoryItemLabelGenerator)) | |||||||||||||||||||||||||||
4 | return false; | 4 | return false; | ||||||||||||||||||||||||||||
5 | ChartEntity that = (ChartEntity)obj; |
| 5 | AbstractCategoryItemLabelGenerator that = (AbstractCategoryItemLabelGenerator)obj; | |||||||||||||||||||||||||||
6 | if (!this.area.equals(that.area)) |
| 6 | if (!this.labelFormat.equals(that.labelFormat)) | |||||||||||||||||||||||||||
7 | return false; | 7 | return false; | ||||||||||||||||||||||||||||
8 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) |
| 8 | if (!ObjectUtilities.equal(this.dateFormat, that.dateFormat)) | |||||||||||||||||||||||||||
9 | return false; | 9 | return false; | ||||||||||||||||||||||||||||
10 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) |
| 10 | if (!ObjectUtilities.equal(this.numberFormat, that.numberFormat)) | |||||||||||||||||||||||||||
11 | return false; | 11 | return false; | ||||||||||||||||||||||||||||
12 | return true; | 12 | return true; |
Row | Violation |
---|---|
1 | Expression that.area cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression that.labelFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.awt.Shape of variable that.area does not match with type java.lang.String of variable that.labelFormat |
4 | Type java.awt.Shape of variable this.area does not match with type java.lang.String of variable this.labelFormat |
5 | Type java.lang.String of variable this.toolTipText does not match with type java.text.DateFormat of variable this.dateFormat |
6 | Expression that.toolTipText cannot be unified with expression that.dateFormat , 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.toolTipText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.dateFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type java.lang.String of variable that.toolTipText does not match with type java.text.DateFormat of variable that.dateFormat |
10 | Type java.lang.String of variable this.urlText does not match with type java.text.NumberFormat of variable this.numberFormat |
11 | Expression that.urlText cannot be unified with expression that.numberFormat , because common superclass type java.io.Serializable cannot be passed as an argument to public static boolean equal(java.lang.Object, java.lang.Object) |
12 | Expression that.urlText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression that.numberFormat cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Type java.lang.String of variable that.urlText does not match with type java.text.NumberFormat of variable that.numberFormat |