File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/MySQLDialectExt.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/InformixDialectExt.java | |||
Method name: String[] getUpdateSQL(String, String[], String[], String[], String[], String[], DatabaseObjectQualifier, SqlGenerationPreferences)
|
Method name: String[] getUpdateSQL(String, String[], String[], String[], String[], String[], DatabaseObjectQualifier, SqlGenerationPreferences)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | String templateStr = "";↵ | 1 | String templateStr = "";↵ | |
2 | ↵ | |||
2 | if (fromTables != null)↵ | 3 | if (fromTables != null)↵ | |
3 | {↵ | 4 | {↵ | |
4 | templateStr = ST_UPDATE_CORRELATED_QUERY_STYLE_TWO;↵ | 5 | templateStr = ST_UPDATE_CORRELATED_QUERY_STYLE_TWO;↵ | |
5 | }↵ | 6 | }↵ | |
6 | else↵ | 7 | else↵ | |
7 | {↵ | 8 | {↵ | |
8 | templateStr = ST_UPDATE_STYLE_ONE;↵ | 9 | templateStr = ST_UPDATE_STYLE_ONE;↵ | |
9 | }↵ | 10 | }↵ | |
11 | ↵ | |||
10 | final StringTemplate st = new StringTemplate(templateStr);↵ | 12 | StringTemplate st = new StringTemplate(templateStr);↵ | |
11 | return DialectUtils.getUpdateSQL(st, tableName, ↵ | 13 | return DialectUtils.getUpdateSQL(st, tableName,↵ | |
12 | setColumns, ↵ | 14 | setColumns,↵ | |
13 | setValues, ↵ | 15 | setValues,↵ | |
14 | fromTables, ↵ | 16 | fromTables,↵ | |
15 | whereColumns,↵ | 17 | whereColumns,↵ | |
16 | whereValues, ↵ | 18 | whereValues,↵ | |
17 | qualifier, ↵ | 19 | qualifier,↵ | |
18 | prefs, ↵ | 20 | prefs,↵ | |
19 | this); | 21 | this); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
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) | 4.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | String templateStr = ""; | 1 | String templateStr = ""; | ||||
2 | if (fromTables != null) | 2 | if (fromTables != null) | ||||
3 | templateStr = ST_UPDATE_CORRELATED_QUERY_STYLE_TWO; | 3 | templateStr = ST_UPDATE_CORRELATED_QUERY_STYLE_TWO; | ||||
else | else | ||||||
4 | templateStr = ST_UPDATE_STYLE_ONE; | 4 | templateStr = ST_UPDATE_STYLE_ONE; | ||||
|
| 5 | StringTemplate st = new StringTemplate(templateStr); | ||||
5 | final StringTemplate st = new StringTemplate(templateStr); |
| | ||||
6 | return DialectUtils.getUpdateSQL(st, tableName, setColumns, setValues, fromTables, whereColumns, whereValues, qualifier, prefs, this); | 6 | return DialectUtils.getUpdateSQL(st, tableName, setColumns, setValues, fromTables, whereColumns, whereValues, qualifier, prefs, this); |
Row | Violation |
---|---|
1 | Unmatched statement StringTemplate st=new StringTemplate(templateStr); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement final StringTemplate st=new StringTemplate(templateStr); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |