1045-5-6

public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } // fetch the series, remove the change listener, then remove the series. XYSeries ts = (XYSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged();
public void removeSeries(int series) { if ((series < 0) || (series >= getSeriesCount())) { throw new IllegalArgumentException("Series index out of bounds."); } YIntervalSeries ts = (YIntervalSeries) this.data.get(series); ts.removeChangeListener(this); this.data.remove(series); fireDatasetChanged();

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYSeriesCollection.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/YIntervalSeriesCollection.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public void removeSeries(int series) {↵

1

    public void removeSeries(int series) {↵

2

            if ((series < 0) || (series >= getSeriesCount())) {↵

2

            if ((series < 0) || (series >= getSeriesCount())) {↵

3

                throw new IllegalArgumentException("Series index out of bounds.");↵

3

                throw new IllegalArgumentException("Series index out of bounds.");↵

4

            }↵

4

            }↵

5

            // fetch the series, remove the change listener, then remove the series.↵

5

            ↵

6

            XYSeries ts = (XYSeries) this.data.get(series);↵

6

    YIntervalSeries ts = (YIntervalSeries) this.data.get(series);↵

7

            ts.removeChangeListener(this);↵

7

            ts.removeChangeListener(this);↵

8

            this.data.remove(series);↵

8

            this.data.remove(series);↵

9

            fireDatasetChanged();

9

            fireDatasetChanged();↵

10

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