File path: /jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues.java | File path: /jfreechart-1.0.10/src/org/jfree/data/general/DefaultPieDataset.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | Comparable k1 = getKey(i);↵ | 1 | Comparable k1 = getKey(i);↵ | |
2 | Comparable k2 = that.getKey(i);↵ | 2 | Comparable k2 = that.getKey(i);↵ | |
3 | if (!k1.equals(k2)) {↵ | 3 | if (!k1.equals(k2)) {↵ | |
4 | return false;↵ | 4 | return false;↵ | |
5 | }↵ | 5 | }↵ | |
6 | Number v1 = getValue(i);↵ | 6 | Number v1 = getValue(i);↵ | |
7 | Number v2 = that.getValue(i);↵ | 7 | Number v2 = that.getValue(i);↵ | |
8 | if (v1 == null) {↵ | 8 | if (v1 == null) {↵ | |
9 | if (v2 != null) {↵ | 9 | if (v2 != null) {↵ | |
10 | return false;↵ | 10 | return false;↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | else {↵ | 13 | else {↵ | |
14 | if (!v1.equals(v2)) {↵ | 14 | if (!v1.equals(v2)) {↵ | |
15 | return false;↵ | 15 | return false;↵ | |
16 | }↵ | 16 | }↵ | |
17 | } | 17 |
| |
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) | 0.5 |
Clones location | Clones are in different classes |
Number of node comparisons | 36 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | Comparable k1 = getKey(i); | 10 | Comparable k1 = getKey(i); | ||||||||||||
11 | Comparable k2 = that.getKey(i); |
| 11 | Comparable k2 = that.getKey(i); | |||||||||||
12 | if (!k1.equals(k2)) | 12 | if (!k1.equals(k2)) | ||||||||||||
13 | return false; |
| 13 | return false; | |||||||||||
14 | Number v1 = getValue(i); | 14 | Number v1 = getValue(i); | ||||||||||||
15 | Number v2 = that.getValue(i); |
| 15 | Number v2 = that.getValue(i); | |||||||||||
16 | if (v1 == null) | 16 | if (v1 == null) | ||||||||||||
17 | if (v2 != null) | 17 | if (v2 != null) | ||||||||||||
18 | return false; |
| 18 | return false; | |||||||||||
else | else | ||||||||||||||
19 | if (!v1.equals(v2)) | 19 | if (!v1.equals(v2)) | ||||||||||||
20 | return false; |
| 20 | return false; |
Row | Violation |
---|---|
1 | Type org.jfree.data.KeyedValues of variable that does not match with type org.jfree.data.general.PieDataset of variable that |
2 | Type org.jfree.data.KeyedValues of variable that does not match with type org.jfree.data.general.PieDataset of variable that |
3 | Conditional return false; |
4 | Conditional return false; |
5 | Conditional return false; |
6 | Conditional return false; |
7 | Conditional return false; |
8 | Conditional return false; |