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 testDropView(ISession)
|
Method name: void testDropSequence(ISession)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 3 | |||
1 | if (!dialect.supportsDropView()) {↵ | |||
2 | try {↵ | 1 | try {↵ | |
3 | dialect.getDropViewSQL(viewName, false, qualifier, prefs);↵ | 2 | dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs);↵ | |
4 | failDialect(dialect, "dropping a view");↵ | 3 | failDialect(dialect, "for dropping a sequence");↵ | |
5 | } catch (Exception e) {↵ | 4 | } catch (Exception e) {↵ | |
6 | // this is expected↵ | 5 | // this is expected↵ | |
7 | System.err.println(e.getMessage());↵ | 6 | System.err.println(e.getMessage());↵ | |
8 | }↵ | |||
9 | } | 7 |
| |
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 | 9 |
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) | 10.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | try | 9 | try | ||||||||||||||||||
15 | dialect.getDropViewSQL(viewName, false, qualifier, prefs); |
| 10 | dialect.getDropSequenceSQL(testSequenceName, false, qualifier, prefs); | |||||||||||||||||
16 | failDialect(dialect, "dropping a view"); |
| 11 | failDialect(dialect, "for dropping a sequence"); |
Row | Violation |
---|---|
1 | Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression dialect.getDropViewSQL(viewName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized |
4 | Expression dialect.getDropSequenceSQL(testSequenceName,false,qualifier,prefs) is a void method call, and thus it cannot be parameterized |