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 testRenameView(ISession)
|
Method name: void testDropConstraint(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try {↵ | 1 | try↵ | |
2 | ↵ | |||
2 | {↵ | |||
3 | dialect.getRenameViewSQL(oldViewName, newViewName, qual, ↵ | 3 | dialect.getDropConstraintSQL(tableName,↵ | |
4 | uniqueConstraintName,↵ | |||
5 | qualifier,↵ | |||
4 | prefs);↵ | 6 | prefs);↵ | |
5 | failDialect(dialect, "renaming a view");↵ | 7 | failDialect(dialect, "for dropping a constraint");↵ | |
6 | } catch (Exception e) {↵ | 8 | } catch (Exception e)↵ | |
7 | ↵ | |||
9 | {↵ | |||
8 | // this is expected↵ | 10 | // this is expected↵ | |
9 | System.err.println(e.getMessage());↵ | 11 | System.err.println(e.getMessage());↵ | |
10 | } | 12 | } | |
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.3 |
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
28 | try | 10 | try | |||||||||||
|
| 11 | dialect.getDropConstraintSQL(tableName, uniqueConstraintName, qualifier, prefs); | |||||||||||
29 | dialect.getRenameViewSQL(oldViewName, newViewName, qual, prefs); |
| | |||||||||||
30 | failDialect(dialect, "renaming a view"); |
| 12 | failDialect(dialect, "for dropping a constraint"); |
Row | Violation |
---|---|
1 | Unmatched statement dialect.getDropConstraintSQL(tableName,uniqueConstraintName,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.getRenameViewSQL(oldViewName,newViewName,qual,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 |