File path: /jfreechart-1.0.10/src/org/jfree/chart/axis/Tick.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/AbstractPieItemLabelGenerator.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 12 | |||
1 | Tick t = (Tick) obj; ↵ | |||
2 | if (!ObjectUtilities.equal(this.text, t.text↵ | 1 | if (obj == this) {↵ | |
2 | return true;↵ | |||
3 | }↵ | |||
3 | )) {↵ | 4 | if (!(obj instanceof AbstractPieItemLabelGenerator)) {↵ | |
4 | return false;↵ | 5 | return false;↵ | |
5 | ↵ | 6 | }↵ | |
6 | }↵ | 7 | ↵ | |
7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor↵ | 8 | AbstractPieItemLabelGenerator that↵ | |
9 | = (AbstractPieItemLabelGenerator) obj;↵ | |||
8 | )) {↵ | 10 | if (!this.labelFormat.equals(that.labelFormat)) {↵ | |
9 | return false; ↵ | 11 | return false;↵ | |
10 | ↵ | |||
11 | }↵ | 12 | }↵ | |
12 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) {↵ | 13 | if (!this.numberFormat.equals(that.numberFormat)) {↵ | |
13 | return false; ↵ | 14 | return false;↵ | |
14 | ↵ | |||
15 | }↵ | 15 | }↵ | |
16 | if (!(this.angle == t.angle)) {↵ | 16 | if (!this.percentFormat.equals(that.percentFormat)) {↵ | |
17 | return false; ↵ | 17 | return false;↵ | |
18 | ↵ | |||
19 | }↵ | 18 | }↵ | |
20 | 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) | 1.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 54 |
Number of mapped statements | 9 |
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.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | Tick t = (Tick)obj; | | ||||||||||||||
5 | if (!ObjectUtilities.equal(this.text, t.text)) |
| 3 | if (!(obj instanceof AbstractPieItemLabelGenerator)) | ||||||||||||
6 | return false; | 4 | return false; | |||||||||||||
| 5 | AbstractPieItemLabelGenerator that = (AbstractPieItemLabelGenerator)obj; | ||||||||||||||
7 | if (!ObjectUtilities.equal(this.textAnchor, t.textAnchor)) |
| 6 | if (!this.labelFormat.equals(that.labelFormat)) | ||||||||||||
8 | return false; | 7 | return false; | |||||||||||||
9 | if (!ObjectUtilities.equal(this.rotationAnchor, t.rotationAnchor)) |
| 8 | if (!this.numberFormat.equals(that.numberFormat)) | ||||||||||||
10 | return false; | 9 | return false; | |||||||||||||
11 | if (!(this.angle == t.angle)) |
| 10 | if (!this.percentFormat.equals(that.percentFormat)) | ||||||||||||
12 | return false; | 11 | return false; | |||||||||||||
13 | return true; | 12 | return true; |
Row | Violation |
---|---|
1 | Expression ObjectUtilities.equal(this.text,t.text) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ObjectUtilities.equal(this.textAnchor,t.textAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression this.labelFormat.equals(that.labelFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression ObjectUtilities.equal(this.rotationAnchor,t.rotationAnchor) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression this.numberFormat.equals(that.numberFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression (this.angle == t.angle) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression this.percentFormat.equals(that.percentFormat) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Not all possible execution flows end in a return statement |