1098-1-3

Number result = null; int row = getRowIndex(rowKey); TaskSeries series = (TaskSeries) this.data.get(row); Task task = series.get(columnKey.toString()); if (task != null) { result = task.getPercentComplete(); } return result;
TimeSeries result = null; Iterator iterator = this.data.iterator(); while (iterator.hasNext()) { TimeSeries series = (TimeSeries) iterator.next(); Comparable k = series.getKey(); if (k != null && k.equals(key)) { result = series; } } return result;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/gantt/TaskSeriesCollection.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/time/TimeSeriesCollection.java
Method name: `Number getPercentComplete(Comparable, Comparable)` |  | Method name: `TimeSeries getSeries(Comparable)`
Number of AST nodes: 7 |  | Number of AST nodes: 8

1

    Number result = null;↵

1

    TimeSeries result = null;↵

2

            int row = getRowIndex(rowKey);↵

2

            Iterator iterator = this.data.iterator();↵

3

            while (iterator.hasNext()) {↵

3

            TaskSeries series = (TaskSeries) this.data.get(row);↵

4

                TimeSeries series = (TimeSeries) ↵

4

            Task task = series.get(columnKey.toString());↵

5

    iterator.next();↵

6

                Comparable k = series.getKey();↵

5

            if (task != null) {↵

7

                if (k != null && k.equals(key)) {↵

6

                result = task.getPercentComplete();↵

8

                    result = series;↵

9

                }↵

7

            }↵

10

            }↵

8

            return result;

11

            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 having the same super class
Number of node comparisons | 1