File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/completions/SQLSelectStatement.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/completions/SQLModifyingStatement.java | |||
Method name: Completion getCompletion(int)
|
Method name: Completion getCompletion(int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if(offset >= fieldAreas[i][FA_START] && offset <= fieldAreas[i][FA_END]) {↵ | 1 | if(↵ | |
2 | ↵ | 2 | position >= updateListStart && position <= updateListEnd) {↵ | |
3 | SQLColumn col = new SQLColumn(this, offset, offset);↵ | 3 | SQLColumn col = new SQLColumn(this, ↵ | |
4 | ↵ | 4 | position);↵ | |
5 | col.setRepeatable(false);↵ | 5 | col.setRepeatable(false);↵ | |
6 | return col;↵ | 6 | return col;↵ | |
7 | } | 7 |
| |
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 having the same super class |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
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) | 5.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9 | if (offset >= fieldAreas[i][FA_START] && offset <= fieldAreas[i][FA_END]) |
| 3 | if (position >= updateListStart && position <= updateListEnd) | |||||||||||||||||||
10 | SQLColumn col = new SQLColumn(this, offset, offset); |
| 4 | SQLColumn col = new SQLColumn(this, position); | |||||||||||||||||||
11 | col.setRepeatable(false); | 5 | col.setRepeatable(false); | ||||||||||||||||||||
12 | return col; | 6 | return col; |
Row | Violation |
---|---|
1 | Expression new SQLColumn(this,offset,offset) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression new SQLColumn(this,position) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Not all possible execution flows end in a return statement |