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 testAlterColumnComment(ISession)
|
Method name: void testDropColumn(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try {↵ | 1 | try {↵ | |
2 | alterColumnComment(session, firstCol);↵ | 2 | dropColumn(session, dropCol);↵ | |
3 | failDialect(dialect, "column comment alter");↵ | 3 | failDialect(dialect, "dropping a column");↵ | |
4 | } catch (UnsupportedOperationException e) {↵ | 4 | } catch (UnsupportedOperationException e) {↵ | |
5 | // this is expected↵ | 5 | // This is what we expect↵ | |
6 | System.err.println(e.getMessage());↵ | 6 | System.err.println(e.getMessage());↵ | |
7 | } | 7 |
| |
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 | 3 |
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) | 2.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | try | 4 | try | ||||||||||||||||||
12 | alterColumnComment(session, firstCol); |
| 5 | dropColumn(session, dropCol); | |||||||||||||||||
13 | failDialect(dialect, "column comment alter"); |
| 6 | failDialect(dialect, "dropping a column"); |
Row | Violation |
---|---|
1 | Expression alterColumnComment(session,firstCol) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression dropColumn(session,dropCol) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression alterColumnComment(session,firstCol) is a void method call, and thus it cannot be parameterized |
4 | Expression dropColumn(session,dropCol) is a void method call, and thus it cannot be parameterized |