File path: /jfreechart-1.0.10/src/org/jfree/data/category/CategoryToPieDataset.java | File path: /jfreechart-1.0.10/src/org/jfree/data/category/CategoryToPieDataset.java | |||
Method name: int getItemCount()
|
Method name: List getKeys()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (this.source != null) {↵ | 1 | if (this.source != null) {↵ | |
2 | if (this.extract == TableOrder.BY_ROW) {↵ | 2 | if (this.extract == TableOrder.BY_ROW) {↵ | |
3 | result = this.source.getColumnCount();↵ | 3 | result = this.source.getColumnKeys();↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if (this.extract == TableOrder.BY_COLUMN) {↵ | 5 | else if (this.extract == TableOrder.BY_COLUMN) {↵ | |
6 | result = this.source.getRowCount();↵ | 6 | result = this.source.getRowKeys();↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 14 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
2 | if (this.source != null) | 2 | if (this.source != null) | ||||
3 | if (this.extract == TableOrder.BY_ROW) | 3 | if (this.extract == TableOrder.BY_ROW) | ||||
|
| 4 | result = this.source.getColumnKeys(); | ||||
4 | result = this.source.getColumnCount(); |
| | ||||
5 | else if (this.extract == TableOrder.BY_COLUMN) | 5 | else if (this.extract == TableOrder.BY_COLUMN) | ||||
|
| 6 | result = this.source.getRowKeys(); | ||||
6 | result = this.source.getRowCount(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement result=this.source.getColumnKeys(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement result=this.source.getColumnCount(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement result=this.source.getRowKeys(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement result=this.source.getRowCount(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |