333-2-7

for (int i = 0; i < this.domainAxes.size(); i++) { CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i); if (axis != null) { axis.removeChangeListener(this); } } this.domainAxes.clear(); fireChangeEvent();
for (int i = 0; i < this.seriesList.size(); i++) { MatrixSeries series = (MatrixSeries) this.seriesList.get(i); series.removeChangeListener(this); } // Remove all the series from the collection and notify listeners. this.seriesList.clear(); fireDatasetChanged();

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CategoryPlot.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/MatrixSeriesCollection.java
Method name: `void clearDomainAxes()` |  | Method name: `void removeAllSeries()`
Number of AST nodes: 6 |  | Number of AST nodes: 5

1

    for (int i = 0; i < this.domainAxes.size(); i++) {↵

1

    for (int i = 0; i < this.seriesList.size(); i++) {↵

2

                CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);↵

2

                MatrixSeries series = (Mat↵

3

                if (axis != null) {↵

4

                    axi↵

3

    rixSeries) this.seriesList.get(i);↵

5

    s.removeChangeListener(this);↵

4

                series.removeChangeListener(this);↵

6

            ↵

5

            }↵

7

        }↵

6

        ↵

8

            }↵

7

        // Remove all the series from the collection and notify listeners.↵

9

            this.domainAxes.clear();↵

8

            this.seriesList.clear();↵

10

            fireChangeEvent();

9

            fireDatasetChanged();

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