1726-5-6

for (int c = 0; c < this.data.getColumnCount(); c++) { Number value = this.data.getValue(r, c); if (value != null) { unique.add(value); } }
for (int i = 0; i < this.data.size(); i++) { XYDataItem item = (XYDataItem) this.data.get(i); if (item.getX().equals(x)) { return i; } }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/general/WaferMapDataset.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeries.java
Method name: `Set getUniqueValues()` |  | Method name: `int indexOf(Number)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    for (int c = 0; c < this.data.getColumnCount(); c++) {↵

1

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

2

                    Number value = this.data.getValue(r, c);↵

2

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

3

                    if (value != null) {↵

3

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

4

                        unique.add(value);↵

4

                        return i;↵

5

                    }↵

5

                    }↵

6

                }

6

                }

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 | Clones are in different classes
Number of node comparisons | 1