File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/urls/StandardXYURLGenerator.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 StandardXYURLGenerator)) {↵ | |
5 | return false;↵ | 5 | return false;↵ | |
6 | ↵ | 6 | }↵ | |
7 | }↵ | 7 | ↵ | |
8 | ↵ | 8 | StandardXYURLGenerator that = (StandardXYURLGenerator) obj;↵ | |
9 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) {↵ | 9 | if (!ObjectUtilities.equal(that.prefix, this.prefix)) {↵ | |
10 | return false; ↵ | 10 | return false;↵ | |
11 | ↵ | |||
12 | }↵ | 11 | }↵ | |
13 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor↵ | 12 | if (!ObjectUtilities.equal(that.seriesParameterName, ↵ | |
14 | )) {↵ | 13 | this.seriesParameterName)) {↵ | |
15 | return false; ↵ | 14 | return false;↵ | |
16 | }↵ | 15 | ↵ | |
17 | if (!(this.angle == t.angl↵ | 16 | }↵ | |
17 | if (!ObjectUtilities.equal(that.itemParameterName, ↵ | |||
18 | e)) {↵ | 18 | this.itemParameterName)) {↵ | |
19 | return false; ↵ | 19 | return false;↵ | |
20 | }↵ | 20 | }↵ | |
21 | return true;↵ | 21 | 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) | 2.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 30 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 5 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | Tick t = (Tick)obj; | | |||||||||||||||||
| 5 | StandardXYURLGenerator that = (StandardXYURLGenerator)obj; | |||||||||||||||||
5 | if (!ObjectUtilities.equal(this.text, t.text)) |
| 6 | if (!ObjectUtilities.equal(that.prefix, this.prefix)) | |||||||||||||||
6 | return false; | 7 | return false; | ||||||||||||||||
7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) |
| 3 | if (!(obj instanceof StandardXYURLGenerator)) | |||||||||||||||
8 | return false; | 4 | return false; | ||||||||||||||||
9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) | | |||||||||||||||||
10 | return false; |
| | ||||||||||||||||
11 | if (!(this.angle == t.angle)) | | |||||||||||||||||
12 | return false; |
| |
Row | Violation |
---|---|
1 | Expression that.prefix cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression t.text cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ObjectUtilities.equal(this.textAnchor,t.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return false; |
5 | Unmatched return false; |
6 | Not all possible execution flows end in a return statement |