for (int i = 0; i < this.domainAxes.size(); i++) { CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i); if (xAxis != null) { CategoryAxis clonedAxis = (CategoryAxis) xAxis.clone(); clone.setDomainAxis(i, clonedAxis); } }
for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) { row = (DefaultKeyedValues) this.rows.get(item); int columnIndex = row.getIndex(columnKey); if (columnIndex >= 0) { row.removeValue(columnIndex); } }
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/DefaultKeyedValues2D.java
Method name: Object clone() Method name: void removeValue(Comparable, Comparable)
Number of AST nodes: 5 Number of AST nodes: 5
1
for (int i = 0; i < this.domainAxes.size(); i
1
for (int item = 0, itemCount = this.rows.size(); item < itemCount; 
2
++) {
2
                 item++) {
3
            CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
3
                row = (DefaultKeyedValues) this.rows.get(item);
4
            if (xAxis != null) {
4
            
5
                CategoryAxis clonedAxis = (CategoryAxis) xAxis.clone();
6
                clone.setDomainAxis(i, clonedAxis
5
    int columnIndex = row.getIndex(columnKey);
6
                if (columnIndex >= 0) {
7
);
7
                    row.removeValue(columnIndex);
8
            }
8
            
9
    }
9
        }
10
            }
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.2
Clones locationClones are in different classes
Number of node comparisons1