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 testAddUniqueConstraint(ISession)
|
Method name: void testInsertIntoSQL(ISession)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | try {↵ | 1 | try↵ | |
2 | ↵ | |||
2 | {↵ | |||
3 | dialect.getAddUniqueConstraintSQL(tableName,↵ | 3 | dialect.getInsertIntoSQL(t↵ | |
4 | uniqueConstraintName,↵ | |||
5 | columns,↵ | |||
6 | qualifier,↵ | 4 | estInsertIntoTable, columns, valuesPart, qualifier,↵ | |
7 | prefs);↵ | 5 | prefs);↵ | |
8 | failDialect(dialect, "for adding a unique constraint");↵ | 6 | failDialect(dialect, "for insert into statements");↵ | |
9 | } catch (Exception e) {↵ | 7 | } catch (Exception e)↵ | |
10 | ↵ | |||
8 | {↵ | |||
11 | // this is expected↵ | 9 | // this is expected↵ | |
12 | System.err.println(e.getMessage());↵ | 10 | System.err.println(e.getMessage());↵ | |
13 | } | 11 | } | |
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) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
14 | try | 15 | try | |||||||||||
15 | dialect.getAddUniqueConstraintSQL(tableName, uniqueConstraintName, columns, qualifier, prefs); |
| | |||||||||||
|
| 16 | dialect.getInsertIntoSQL(testInsertIntoTable, columns, valuesPart, qualifier, prefs); | |||||||||||
16 | failDialect(dialect, "for adding a unique constraint"); |
| 17 | failDialect(dialect, "for insert into statements"); |
Row | Violation |
---|---|
1 | Unmatched statement dialect.getAddUniqueConstraintSQL(tableName,uniqueConstraintName,columns,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.getInsertIntoSQL(testInsertIntoTable,columns,valuesPart,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 |