File path: /sql12/test/external/net/sourceforge/squirrel_sql/fw/dialects/DialectExternalTest.java | File path: /sql12/test/external/net/sourceforge/squirrel_sql/fw/dialects/DialectExternalTest.java | |||
Method name: void testAlterDefaultValue(ISession)
|
Method name: void testAddColumnSQL(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try {↵ | 1 | try↵ | |
2 | ↵ | |||
2 | {↵ | |||
3 | dialect.getColumnDefaultAlterSQL(noDefaultValueVarcharCol, qualifier, prefs);↵ | 3 | dialect.getAddColumnSQL(addColumn, qualifier, prefs);↵ | |
4 | failDialect(dialect, "column default alter");↵ | 4 | failDialect(dialect, "↵ | |
5 | } catch (UnsupportedOperationException e) {↵ | |||
6 | ↵ | 5 | for adding a column");↵ | |
6 | } catch (Exception e)↵ | |||
7 | {↵ | |||
7 | // This is what we expect.↵ | 8 | // this is ↵ | |
8 | ↵ | 9 | expected↵ | |
9 | System.err.println(e.getMessage());↵ | 10 | System.err.println(e.getMessage());↵ | |
10 | } | 11 | } | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
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) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | try |
| 5 | try | ||||||||||||||||
|
| 6 | dialect.getAddColumnSQL(addColumn, qualifier, prefs); | |||||||||||||||||
14 | dialect.getColumnDefaultAlterSQL(noDefaultValueVarcharCol, qualifier, prefs); |
| | |||||||||||||||||
15 | failDialect(dialect, "column default alter"); |
| 7 | failDialect(dialect, "for adding a column"); |
Row | Violation |
---|---|
1 | Unmatched statement dialect.getAddColumnSQL(addColumn,qualifier,prefs); 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 |
2 | Unmatched statement dialect.getColumnDefaultAlterSQL(noDefaultValueVarcharCol,qualifier,prefs); 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 |