File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/entity/ChartEntity.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 12 | |||
1 | if (obj instanceof Tick) {↵ | 1 | if (obj == this) {↵ | |
2 | Tick t = (Tick) obj; ↵ | 2 | return true; ↵ | |
3 | ↵ | 3 | }↵ | |
4 | if (!ObjectUtilities.equal(this.text, t.text)) {↵ | 4 | if (!(obj instanceof ChartEntity)) {↵ | |
5 | return false; ↵ | 5 | return false; ↵ | |
6 | ↵ | 6 | }↵ | |
7 | }↵ | 7 | ↵ | |
8 | ↵ | 8 | ChartEntity that = (ChartEntity) obj;↵ | |
9 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | 9 | if (!this.area.equals(that.area)) {↵ | |
10 | return false; ↵ | 10 | return false; ↵ | |
11 | }↵ | 11 | ↵ | |
12 | ↵ | 12 | }↵ | |
13 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | 13 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) {↵ | |
14 | return false; ↵ | 14 | return false; ↵ | |
15 | }↵ | 15 | ↵ | |
16 | ↵ | 16 | }↵ | |
17 | if (!(this.angle == t.angle)) {↵ | 17 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) {↵ | |
18 | return false; ↵ | 18 | return false; ↵ | |
19 | }↵ | 19 | }↵ | |
20 | return true;↵ | 20 | return true; | |
21 | } | |||
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 | 51 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | Tick t = (Tick)obj; | | ||||||||||||||||||||||||||||||||||
| 5 | ChartEntity that = (ChartEntity)obj; | ||||||||||||||||||||||||||||||||||
5 | if (!ObjectUtilities.equal(this.text, t.text)) |
| 8 | if (!ObjectUtilities.equal(this.toolTipText, that.toolTipText)) | ||||||||||||||||||||||||||||||||
6 | return false; | 9 | return false; | |||||||||||||||||||||||||||||||||
7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) |
| 10 | if (!ObjectUtilities.equal(this.urlText, that.urlText)) | ||||||||||||||||||||||||||||||||
8 | return false; | 11 | return false; | |||||||||||||||||||||||||||||||||
9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) |
| 3 | if (!(obj instanceof ChartEntity)) | ||||||||||||||||||||||||||||||||
10 | return false; | 4 | return false; | |||||||||||||||||||||||||||||||||
11 | if (!(this.angle == t.angle)) |
| 6 | if (!this.area.equals(that.area)) | ||||||||||||||||||||||||||||||||
12 | return false; | 7 | return false; |
Row | Violation |
---|---|
1 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression that.toolTipText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.String of variable t.text does not match with type java.lang.String of variable that.toolTipText |
4 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.toolTipText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type org.jfree.ui.TextAnchor of variable this.textAnchor does not match with type java.lang.String of variable this.urlText |
7 | Expression t.textAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression that.urlText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Type org.jfree.ui.TextAnchor of variable t.textAnchor does not match with type java.lang.String of variable that.urlText |
10 | Expression t.textAnchor cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression that.urlText cannot be parameterized, because it has dependencies to/from statements that will be extracted |
12 | Type org.jfree.ui.TextAnchor of variable t.textAnchor does not match with type java.lang.String of variable that.urlText |
13 | Expression ObjectUtilities.equal(this.rotationAnchor,t.rotationAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression (this.angle == t.angle) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
15 | Expression this.area.equals(that.area) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
16 | Not all possible execution flows end in a return statement |