for (int index = start; index <= end; index++) { 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.");
for (int index = start; index <= end; index++) { 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
for (int index = start; index <= end; index++) {
1
for (int index = start; index <= end; index++) {
2
                TimePeriodValue item = (TimePeriodValue) this.data.get(index);
2
                XYDataItem item = (XYDataItem) this.data.get(index);
3
                TimePeriodValue clone = (TimePeriodValue) item.clone();
3
                XYDataItem clone = (XYDataItem) item.clone();
4
                try {
4
                try {
5
                    copy.add(clone);
5
                    copy.add(clone);
6
                }
6
                }
7
                catch (SeriesException e) {
7
                catch (SeriesException e) {
8
                    System.err.println("Failed to add cloned item.");
8
                    System.err.println("Unable to add cloned data item.");
9
                
9
                
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0