File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/DefaultDrawingSupplier.java | File path: /jfreechart-1.0.10/src/org/jfree/data/category/DefaultIntervalCategoryDataset.java | |||
Method name: boolean equalShapes(Shape[], Shape[])
|
Method name: boolean equal(Number[][], Number[][])
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (s1 == null) {↵ | 1 | if (array1 == null) {↵ | |
2 | return s2 == null; ↵ | 2 | return (array2 == null);↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (s2 == null) {↵ | 4 | if (array2 == null) {↵ | |
5 | return false; ↵ | 5 | return false;↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (s1.length != s2.length) {↵ | 7 | if (array1.length != array2.length) {↵ | |
8 | return false; ↵ | 8 | return false;↵ | |
9 | }↵ | 9 | }↵ | |
10 | for (int i = 0; i < s1.length; i++) {↵ | 10 | for (int i = 0; i < array1.length; i++) {↵ | |
11 | if (!ShapeUtilities.equal(s1[i], s2[i])) {↵ | 11 | if (!Arrays.equals(array1[i], array2[i])) {↵ | |
12 | return false; ↵ | 12 | return false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | return true; | 15 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 23 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (s1 == null) |
| 3 | if (array2 == null) | |||||||||||||||||||||
2 | return s2 == null; |
| 4 | return false; | |||||||||||||||||||||
3 | if (s2 == null) |
| 1 | if (array1 == null) | |||||||||||||||||||||
4 | return false; |
| 2 | return (array2 == null); | |||||||||||||||||||||
5 | if (s1.length != s2.length) |
| 5 | if (array1.length != array2.length) | |||||||||||||||||||||
6 | return false; | 6 | return false; | ||||||||||||||||||||||
| 7 | for (int i = 0; i < array1.length; i++) | |||||||||||||||||||||||
| 8 | if (!Arrays.equals(array1[i], array2[i])) | |||||||||||||||||||||||
|
| 9 | return false; | ||||||||||||||||||||||
7 | for (int i = 0; i < s1.length; i++) | | |||||||||||||||||||||||
8 | if (!ShapeUtilities.equal(s1[i], s2[i])) | | |||||||||||||||||||||||
9 | return false; |
| | ||||||||||||||||||||||
10 | return true; | 10 | return true; |
Row | Violation |
---|---|
1 | Type java.awt.Shape[] of variable s1 does not match with type java.lang.Number[][] of variable array2 |
2 | Type java.awt.Shape[] of variable s2 does not match with type java.lang.Number[][] of variable array1 |
3 | Type int of variable s1.length does not match with type int of variable array1.length |
4 | Type int of variable s2.length does not match with type int of variable array2.length |
5 | Unmatched return false; |
6 | Unmatched return false; |
7 | Not all possible execution flows end in a return statement |