1422-1-2

for (int i = 0; i < this.data.size(); i++) { ComparableObjectItem item = (ComparableObjectItem) this.data.get(i); if (item.getComparable().equals(x)) { return i; } } return -1;
for (int i = 0; i < this.data.size(); i++) { XYDataItem item = (XYDataItem) this.data.get(i); if (item.getX().equals(x)) { return i; } } return -1;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/ComparableObjectSeries.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    for (int i = 0; i < this.data.size(); i++) {↵

1

    for (int i = 0; i < this.data.size(); i++) {↵

2

                    ComparableObjectItem item = (ComparableObjectItem) ↵

2

                    ↵

3

                            this.data.get(i);↵

3

    XYDataItem item = (XYDataItem) this.data.get(i);↵

4

                    if (item.getComparable().equals(x)) {↵

4

                    if (item.getX().equals(x)) {↵

5

                        return i;   ↵

5

                        return i;↵

6

                    }↵

6

                    }↵

7

                }↵

7

                }↵

8

                return -1;↵

8

                return -1;↵

9

9

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.0
Clones location |
Number of node comparisons | 0