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