File path: /jfreechart-1.0.10/src/org/jfree/data/DefaultKeyedValues2D.java | File path: /jfreechart-1.0.10/src/org/jfree/data/KeyedObjects2D.java | |||
Method name: void removeValue(Comparable, Comparable)
|
Method name: void removeObject(Comparable, Comparable)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; ↵ | 1 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; ↵ | |
2 | item++) {↵ | 2 | item++) {↵ | |
3 | row = (DefaultKeyedValues) this.rows.get(item);↵ | 3 | row = (KeyedObjects) this.rows.get(item);↵ | |
4 | int columnIndex = row.getIndex(columnKey);↵ | 4 | int colIndex = row.getIndex(columnKey);↵ | |
5 | if (columnIndex >= 0) {↵ | 5 | if (colIndex >= 0) {↵ | |
6 | row.removeValue(columnIndex);↵ | 6 | row.removeValue(colIndex);↵ | |
7 | }↵ | 7 | }↵ | |
8 | }↵ | 8 | }↵ | |
9 | this.columnKeys.remove(columnKey); | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 23 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 17.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) | 25 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) | ||||||||||||||||
21 | row = (DefaultKeyedValues)this.rows.get(item); |
| 26 | row = (KeyedObjects)this.rows.get(item); | |||||||||||||||
22 | int columnIndex = row.getIndex(columnKey); |
| 27 | int colIndex = row.getIndex(columnKey); | |||||||||||||||
23 | if (columnIndex >= 0) |
| 28 | if (colIndex >= 0) | |||||||||||||||
24 | row.removeValue(columnIndex); |
| 29 | row.removeValue(colIndex); | |||||||||||||||
25 | this.columnKeys.remove(columnKey); | 30 | this.columnKeys.remove(columnKey); |
Row | Violation |
---|---|
1 | Expression (DefaultKeyedValues)this.rows.get(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (KeyedObjects)this.rows.get(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression row cannot be unified with expression row , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public int getIndex(Comparable#RAW) |
4 | Expression row cannot be unified with expression row , because common superclass org.jfree.util.PublicCloneable does not declare member(s) public void removeValue(int) |