1097-1-2

Task result = null; int count = this.tasks.size(); for (int i = 0; i < count; i++) { Task t = (Task) this.tasks.get(i); if (t.getDescription().equals(description)) { result = t; break; } } return result;
int result = -1; int count = this.data.size(); for (int i = 0; i < count; i++) { TaskSeries s = (TaskSeries) this.data.get(i); if (s.getKey().equals(rowKey)) { result = i; break; } } return result;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeries.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeriesCollection.java
Method name: `Task get(String)` |  | Method name: `int getRowIndex(Comparable)`
Number of AST nodes: 8 |  | Number of AST nodes: 8

1

    Task result = null;↵

1

    int result = -1;↵

2

            int count = this.tasks.size();↵

2

            int count = this.data.size();↵

3

            for (int i = 0; i < count; i++) {↵

3

            for (int i = 0; i < count; i++) {↵

4

                Task t = (Task) this.tasks.get(i);↵

4

                TaskSeries s = (TaskSeries) this.data.get(i);↵

5

                if (t.getDescription().equals(description)) {↵

5

                if (s.getKey().equals(rowKey)) {↵

6

                    result = t;↵

6

                    result = i;↵

7

                    break;↵

7

                    break;↵

8

                }↵

8

                }↵

9

            }↵

9

            }↵

10

            return result;

10

            return result;

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