1596-1-2

TimePeriodValue item = (TimePeriodValue) this.data.get(index); TimePeriodValue clone = (TimePeriodValue) item.clone(); try { copy.add(clone); } catch (SeriesException e) { System.err.println("Failed to add cloned item.");
XYDataItem item = (XYDataItem) this.data.get(index); XYDataItem clone = (XYDataItem) item.clone(); try { copy.add(clone); } catch (SeriesException e) { System.err.println("Unable to add cloned data item.");

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/TimePeriodValues.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

    TimePeriodValue item = (TimePeriodValue) this.data.get(index);↵

1

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

2

                    TimePeriodValue clone = (TimePeriodValue) item.clone();↵

2

                    XYDataItem clone = (XYDataItem) item.clone();↵

3

                    try {↵

3

                    try {↵

4

                        copy.add(clone);↵

4

                        copy.add(clone);↵

5

                    }↵

5

                    }↵

6

                    catch (SeriesException e) {↵

6

                    catch (SeriesException e) {↵

7

                        System.err.println("Failed to add cloned item.");↵

7

                        System.err.println("Unable to add cloned data item.");↵

8

8

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