File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/AddIndexCommand.java | File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/commands/AddSequenceCommand.java | |||
Method name: String[] generateSQLStatements()
|
Method name: String[] generateSQLStatements()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | DatabaseObjectQualifier qualifier =↵ | 1 | DatabaseObjectQualifier qualifier =↵ | |
2 | new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());↵ | 2 | new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName());↵ | |
3 | String result =↵ | 3 | String result =↵ | |
4 | _dialect.getCreateIndexSQL(customDialog.getIndexName(),↵ | 4 | _dialect.getCreateSequenceSQL(customDialog.getSequenceName(),↵ | |
5 | _info[0].getSimpleName(),↵ | 5 | customDialog.getIncrement(),↵ | |
6 | customDialog.getAccessMethod(),↵ | 6 | customDialog.getMinimum(),↵ | |
7 | customDialog.getIndexColumns(),↵ | 7 | customDialog.getMaximum(),↵ | |
8 | customDialog.isUniqueSet(),↵ | 8 | customDialog.getStart(),↵ | |
9 | customDialog.getTablespaceText(),↵ | 9 | customDialog.getCache(),↵ | |
10 | customDialog.getConstraints(),↵ | 10 | customDialog.isCycled(),↵ | |
11 | qualifier,↵ | 11 | qualifier,↵ | |
12 | _sqlPrefs);↵ | 12 | _sqlPrefs);↵ | |
13 | return new String[] { result }; | 13 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName()); | 1 | DatabaseObjectQualifier qualifier = new DatabaseObjectQualifier(_info[0].getCatalogName(), _info[0].getSchemaName()); | ||||
|
| 2 | String result = _dialect.getCreateSequenceSQL(customDialog.getSequenceName(), customDialog.getIncrement(), customDialog.getMinimum(), customDialog.getMaximum(), customDialog.getStart(), customDialog.getCache(), customDialog.isCycled(), qualifier, _sqlPrefs); | ||||
2 | String result = _dialect.getCreateIndexSQL(customDialog.getIndexName(), _info[0].getSimpleName(), customDialog.getAccessMethod(), customDialog.getIndexColumns(), customDialog.isUniqueSet(), customDialog.getTablespaceText(), customDialog.getConstraints(), qualifier, _sqlPrefs); |
| | ||||
3 | return new String[] {result}; | 3 | return new String[] {result}; |
Row | Violation |
---|---|
1 | Unmatched statement String result=_dialect.getCreateSequenceSQL(customDialog.getSequenceName(),customDialog.getIncrement(),customDialog.getMinimum(),customDialog.getMaximum(),customDialog.getStart(),customDialog.getCache(),customDialog.isCycled(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement String result=_dialect.getCreateIndexSQL(customDialog.getIndexName(),_info[0].getSimpleName(),customDialog.getAccessMethod(),customDialog.getIndexColumns(),customDialog.isUniqueSet(),customDialog.getTablespaceText(),customDialog.getConstraints(),qualifier,_sqlPrefs); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |