File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/StandardPieURLGenerator.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 | ↵ | |
3 | if (!ObjectUtilities.equal(this.text, t.text↵ | 3 | return true;↵ | |
4 | }↵ | |||
4 | )) {↵ | 5 | if (!(obj instanceof StandardPieURLGenerator)) {↵ | |
5 | return false; ↵ | 6 | return false;↵ | |
6 | }↵ | |||
7 | ↵ | |||
7 | }↵ | |||
8 | StandardPieURLGenerator that = (StandardPieURLGenerator) obj;↵ | |||
8 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | 9 | if (!this.prefix.equals(that.prefix)) {↵ | |
9 | return false; ↵ | 10 | return false;↵ | |
10 | ↵ | |||
11 | }↵ | 11 | }↵ | |
12 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | 12 | if (!this.categoryParameterName.equals(that.categoryParameterName)) {↵ | |
13 | return false; ↵ | 13 | return false;↵ | |
14 | ↵ | |||
15 | }↵ | 14 | }↵ | |
16 | if (!(this.angle == t.angl↵ | 15 | if (!ObjectUtilities.equal(this.indexParameterName, ↵ | |
17 | e)) {↵ | 16 | that.indexParameterName)) {↵ | |
18 | return false; ↵ | 17 | return false;↵ | |
19 | ↵ | |||
20 | }↵ | 18 | }↵ | |
21 | return true;↵ | 19 | return true; | |
22 | } | |||
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) | 1.6 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | Tick t = (Tick)obj; | | ||||||||||||||||||||||||||
5 | if (!ObjectUtilities.equal(this.text, t.text)) |
| 10 | if (!ObjectUtilities.equal(this.indexParameterName, that.indexParameterName)) | ||||||||||||||||||||||||
6 | return false; | 11 | return false; | |||||||||||||||||||||||||
7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) |
| 3 | if (!(obj instanceof StandardPieURLGenerator)) | ||||||||||||||||||||||||
8 | return false; | 4 | return false; | |||||||||||||||||||||||||
| 5 | StandardPieURLGenerator that = (StandardPieURLGenerator)obj; | ||||||||||||||||||||||||||
9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) |
| 6 | if (!this.prefix.equals(that.prefix)) | ||||||||||||||||||||||||
10 | return false; | 7 | return false; | |||||||||||||||||||||||||
11 | if (!(this.angle == t.angle)) |
| 8 | if (!this.categoryParameterName.equals(that.categoryParameterName)) | ||||||||||||||||||||||||
12 | return false; | 9 | 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.indexParameterName 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.indexParameterName |
4 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression that.indexParameterName cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression ObjectUtilities.equal(this.textAnchor,t.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression ObjectUtilities.equal(this.rotationAnchor,t.rotationAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression this.prefix.equals(that.prefix) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression (this.angle == t.angle) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression this.categoryParameterName.equals(that.categoryParameterName) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Not all possible execution flows end in a return statement |