File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableCopyUpdateStatementCommand.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/gui/action/TableCopyWhereStatementCommand.java | |||
Method name: void execute()
|
Method name: void execute()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | TableColumn col = _table.getColumnModel().getColumn(selCols[colIdx]);↵ | 1 | TableColumn col = _table.getColumnModel().getColumn(selCols[colIdx]);↵ | |
2 | ColumnDisplayDefinition colDef = null;↵ | 2 | ColumnDisplayDefinition colDef = null;↵ | |
3 | if(col instanceof ExtTableColumn)↵ | 3 | if(col instanceof ExtTableColumn)↵ | |
4 | {↵ | 4 | {↵ | |
5 | colDef = ((ExtTableColumn) col).getColumnDisplayDefinition();↵ | 5 | colDef = ((ExtTableColumn) col).getColumnDisplayDefinition();↵ | |
6 | }↵ | 6 | }↵ | |
7 | else↵ | 7 | else↵ | |
8 | {↵ | 8 | {↵ | |
9 | continue;↵ | 9 | continue;↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (firstCol)↵ | 11 | if(firstCol)↵ | |
12 | {↵ | 12 | {↵ | |
13 | firstCol = false;↵ | 13 | firstCol = false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | else↵ | 15 | else↵ | |
16 | {↵ | 16 | {↵ | |
17 | buf.append(",");↵ | 17 | buf.append(" AND ");↵ | |
18 | }↵ | 18 | }↵ | |
19 | final Object cellObj = _table.getValueAt(selRows[rowIdx], selCols[colIdx]);↵ | 19 | final Object cellObj = _table.getValueAt(selRows[rowIdx], selCols[colIdx]);↵ | |
20 | buf.append(colDef.getColumnName()).append(getData(colDef, cellObj, StatType.UPDATE)); | 20 | buf.append(colDef.getColumnName()).append(getData(colDef, cellObj, StatType.WHERE)); | |
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 in different classes having the same super class |
Number of node comparisons | 48 |
Number of mapped statements | 10 |
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) | 9.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | TableColumn col = _table.getColumnModel().getColumn(selCols[colIdx]); | 16 | TableColumn col = _table.getColumnModel().getColumn(selCols[colIdx]); | |||||||||||
12 | ColumnDisplayDefinition colDef = null; | 17 | ColumnDisplayDefinition colDef = null; | |||||||||||
13 | if (col instanceof ExtTableColumn) | 18 | if (col instanceof ExtTableColumn) | |||||||||||
14 | colDef = ((ExtTableColumn)col).getColumnDisplayDefinition(); | 19 | colDef = ((ExtTableColumn)col).getColumnDisplayDefinition(); | |||||||||||
else | else | |||||||||||||
15 | continue; |
| 20 | continue; | ||||||||||
16 | if (firstCol) | 21 | if (firstCol) | |||||||||||
17 | firstCol = false; | 22 | firstCol = false; | |||||||||||
else | else | |||||||||||||
18 | buf.append(","); |
| 23 | buf.append(" AND "); | ||||||||||
19 | final Object cellObj = _table.getValueAt(selRows[rowIdx], selCols[colIdx]); | 24 | final Object cellObj = _table.getValueAt(selRows[rowIdx], selCols[colIdx]); | |||||||||||
20 | buf.append(colDef.getColumnName()).append(getData(colDef, cellObj, StatType.UPDATE)); |
| 25 | buf.append(colDef.getColumnName()).append(getData(colDef, cellObj, StatType.WHERE)); |
Row | Violation |
---|---|
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |