163-2-3

if (s1 == null) { return s2 == null; } if (s2 == null) { return false; } if (s1.length != s2.length) { return false; } for (int i = 0; i < s1.length; i++) { if (!ShapeUtilities.equal(s1[i], s2[i])) { return false; } } return true;
if (array1 == null) { return (array2 == null); } if (array2 == null) { return false; } if (array1.length != array2.length) { return false; } for (int i = 0; i < array1.length; i++) { if (!Arrays.equals(array1[i], array2[i])) { return false; } } return true;

Clone fragments detected by clone detection tool
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

            return true;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in different classes
Number of node comparisons | 1