File path: /sql12/test/mockobjects/net/sourceforge/squirrel_sql/mo/sql/MockResultSetMetaData.java | File path: /sql12/test/mockobjects/net/sourceforge/squirrel_sql/mo/sql/MockResultSetMetaData.java | |||
Method name: String getColumnTypeName(int)
|
Method name: int getPrecision(int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | int idx = arg0 - 1; ↵ | 1 | int idx = arg0 - 1; ↵ | |
2 | if (_infos == null || _infos.length <= 0 || idx >= _infos.length) {↵ | 2 | if (_infos == null || _infos.length <= 0 || idx >= _infos.length) {↵ | |
3 | return null;↵ | 3 | return 0;↵ | |
4 | }↵ | 4 | }↵ | |
5 | return _infos[idx].getTypeName(); | 5 | return _infos[arg0].getColumnSize(); | |
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 declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 2 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | int idx = arg0 - 1; | 1 | int idx = arg0 - 1; | |||||
2 | if (_infos == null || _infos.length <= 0 || idx >= _infos.length) | 2 | if (_infos == null || _infos.length <= 0 || idx >= _infos.length) | |||||
|
| 3 | return 0; | |||||
3 | return null; |
| | |||||
|
| 4 | return _infos[arg0].getColumnSize(); | |||||
4 | return _infos[idx].getTypeName(); |
| |
Row | Violation |
---|---|
1 | Unmatched return 0; |
2 | Unmatched return null; |
3 | Unmatched return _infos[arg0].getColumnSize(); |
4 | Unmatched statement return _infos[idx].getTypeName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched return _infos[idx].getTypeName(); |
6 | Clone fragment #1 returns variables idx , while Clone fragment #2 returns variables |