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 testDropPrimaryKey(ISession, String)
|
Method name: void testAlterColumnlength(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try↵ | 1 | try↵ | |
2 | {↵ | |||
3 | dialect.getDropPrimaryKeySQL(pkName, tableName↵ | 2 | {↵ | |
4 | , qualifier, prefs);↵ | 3 | dialect.getColumnTypeAlterSQL(thirdCol, thirdColLonger, qualifier, prefs);↵ | |
5 | failDialect(dialect, "dropping a primary key");↵ | 4 | failDialect(dialect, "altering column type");↵ | |
6 | } catch (UnsupportedOperationException e) {↵ | 5 | } catch (UnsupportedOperationException e) {↵ | |
7 | // this is expected↵ | 6 | // this is expected↵ | |
8 | System.err.println(e.getMessage());↵ | 7 | System.err.println(e.getMessage());↵ | |
9 | } | 8 |
| |
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.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) | 1.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | try | 10 | try | |||||||||||
|
| 11 | dialect.getColumnTypeAlterSQL(thirdCol, thirdColLonger, qualifier, prefs); | |||||||||||
11 | dialect.getDropPrimaryKeySQL(pkName, tableName, qualifier, prefs); |
| | |||||||||||
12 | failDialect(dialect, "dropping a primary key"); |
| 12 | failDialect(dialect, "altering column type"); |
Row | Violation |
---|---|
1 | Unmatched statement dialect.getColumnTypeAlterSQL(thirdCol,thirdColLonger,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.getDropPrimaryKeySQL(pkName,tableName,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 |