File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/expanders/TableTypeExpander.java | File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/DropColumnCommand.java | |||
Method name: List
|
Method name: String[] generateSQLStatements()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i = 0; i < tables.length; ++i)↵ | 1 | for (int i = 0; i < columns.length; i++)↵ | |
2 | {↵ | 2 | {↵ | |
3 | ObjectTreeNode child = new ObjectTreeNode(session, tables[i]);↵ | 3 | TableColumnInfo info = columns[i];↵ | |
4 | child.setUserObj↵ | 4 | String columnName = info.getColumnName();↵ | |
5 | ect(getNodeDisplayText(stmt, tables[i]));↵ | 5 | result[i] = _dialect.get↵ | |
6 | childNodes.add(child);↵ | 6 | ColumnDropSQL(tableName, columnName, _qualifier, _sqlPrefs);↵ | |
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) | 1.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 26.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | for (int i = 0; i < tables.length; ++i) |
| 5 | for (int i = 0; i < columns.length; i++) | |||||||||||||||||||||||||||||||||
|
| 6 | TableColumnInfo info = columns[i]; | ||||||||||||||||||||||||||||||||||
|
| 7 | String columnName = info.getColumnName(); | ||||||||||||||||||||||||||||||||||
|
| 8 | result[i] = _dialect.getColumnDropSQL(tableName, columnName, _qualifier, _sqlPrefs); | ||||||||||||||||||||||||||||||||||
15 | ObjectTreeNode child = new ObjectTreeNode(session, tables[i]); |
| | ||||||||||||||||||||||||||||||||||
16 | child.setUserObject(getNodeDisplayText(stmt, tables[i])); |
| | ||||||||||||||||||||||||||||||||||
17 | childNodes.add(child); | |
Row | Violation |
---|---|
1 | Type int of variable tables.length does not match with type int of variable columns.length |
2 | Type int of variable tables.length does not match with type int of variable columns.length |
3 | Type net.sourceforge.squirrel_sql.fw.sql.ITableInfo[] of variable tables does not match with type int of variable columns.length |
4 | Type net.sourceforge.squirrel_sql.fw.sql.ITableInfo[] of variable tables does not match with type int of variable columns.length |
5 | Type int of variable tables.length does not match with type net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo[] of variable columns |
6 | Type int of variable tables.length does not match with type net.sourceforge.squirrel_sql.fw.sql.TableColumnInfo[] of variable columns |
7 | Unmatched statement String columnName=info.getColumnName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement result[i]=_dialect.getColumnDropSQL(tableName,columnName,_qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
9 | Unmatched statement result[i]=_dialect.getColumnDropSQL(tableName,columnName,_qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
10 | Unmatched statement ObjectTreeNode child=new ObjectTreeNode(session,tables[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
11 | Unmatched statement ObjectTreeNode child=new ObjectTreeNode(session,tables[i]); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
12 | Unmatched statement child.setUserObject(getNodeDisplayText(stmt,tables[i])); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
13 | Clone fragment #1 returns variables i , while Clone fragment #2 returns variables info, i |
14 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.expanders.TableTypeExpander and net.sourceforge.squirrel_sql.plugins.refactoring.commands.DropColumnCommand do not have a common superclass |