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 testDropConstraint(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try↵ | 1 | try↵ | |
2 | {↵ | 2 | {↵ | |
3 | dialect.getDropPrimaryKeySQL(pkName, tableName, ↵ | 3 | dialect.getDropConstraintSQL(tableName,↵ | |
4 | uniqueConstraintName,↵ | |||
4 | qualifier, ↵ | 5 | qualifier,↵ | |
5 | prefs);↵ | 6 | prefs);↵ | |
6 | failDialect(dialect, "dropping a primary key");↵ | 7 | failDialect(dialect, "for dropping a ↵ | |
7 | } catch (UnsupportedOperationException e) {↵ | |||
8 | ↵ | 8 | constraint");↵ | |
9 | } catch (Exception e)↵ | |||
10 | {↵ | |||
9 | // this is expected↵ | 11 | // this is expected↵ | |
10 | System.err.println(e.getMessage());↵ | 12 | System.err.println(e.getMessage());↵ | |
11 | } | 13 | } | |
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.5 |
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) | 1639.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | try |
| 10 | try | ||||||||||||||||||||
11 | dialect.getDropPrimaryKeySQL(pkName, tableName, qualifier, prefs); |
| 11 | dialect.getDropConstraintSQL(tableName, uniqueConstraintName, qualifier, prefs); | ||||||||||||||||||||
12 | failDialect(dialect, "dropping a primary key"); |
| 12 | failDialect(dialect, "for dropping a constraint"); |
Row | Violation |
---|---|
1 | Expression dialect.getDropPrimaryKeySQL(pkName,tableName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression dialect.getDropConstraintSQL(tableName,uniqueConstraintName,qualifier,prefs) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression dialect.getDropPrimaryKeySQL(pkName,tableName,qualifier,prefs) is a void method call, and thus it cannot be parameterized |
4 | Expression dialect.getDropConstraintSQL(tableName,uniqueConstraintName,qualifier,prefs) is a void method call, and thus it cannot be parameterized |