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: 7 | Number of AST nodes: 7 | |||
1 | if (allNull) {↵ | 1 | if (allNull) {↵ | |
2 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; ↵ | 2 | for (int item = 0, itemCount = this.rows.size(); item < itemCount; ↵ | |
3 | item++) {↵ | 3 | item++) {↵ | |
4 | row = (DefaultKeyedValues) this.rows.get(item);↵ | 4 | row = (KeyedObjects) this.rows.get(item);↵ | |
5 | int columnIndex = row.getIndex(columnKey);↵ | 5 | int colIndex = row.getIndex(columnKey);↵ | |
6 | if (columnIndex >= 0) {↵ | 6 | if (colIndex >= 0) {↵ | |
7 | row.removeValue(columnIndex);↵ | 7 | row.removeValue(colIndex);↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | this.columnKeys.remove(columnKey);↵ | 10 | this.columnKeys.remove(columnKey);↵ | |
11 | } | 11 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 18 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19 | if (allNull) | 24 | if (allNull) | |||||||||||
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); |
| | |||||||||||
22 | int columnIndex = row.getIndex(columnKey); |
| | |||||||||||
|
| 26 | row = (KeyedObjects)this.rows.get(item); | |||||||||||
|
| 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 | Unmatched statement row=(DefaultKeyedValues)this.rows.get(item); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement int columnIndex=row.getIndex(columnKey); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement row=(KeyedObjects)this.rows.get(item); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement int colIndex=row.getIndex(columnKey); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement row.removeValue(columnIndex); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement row.removeValue(colIndex); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |