File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/CommonHibernateDialect.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/SybaseDialectExt.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_ONE;↵ | 5 | templateStr = ST_UPDATE_CORRELATED_QUERY_STYLE_TWO;↵ | |
5 | } else↵ | 6 | } else↵ | |
6 | {↵ | 7 | {↵ | |
7 | templateStr = ST_UPDATE_STYLE_ONE;↵ | 8 | templateStr = ST_UPDATE_STYLE_ONE;↵ | |
8 | }↵ | 9 | }↵ | |
10 | ↵ | |||
9 | StringTemplate st = new StringTemplate(templateStr);↵ | 11 | StringTemplate st = new StringTemplate(templateStr);↵ | |
12 | ↵ | |||
10 | return DialectUtils.getUpdateSQL(st,↵ | 13 | return DialectUtils.getUpdateSQL(st,↵ | |
11 | tableName,↵ | 14 | tableName,↵ | |
12 | setColumns,↵ | 15 | setColumns,↵ | |
13 | setValues,↵ | 16 | setValues,↵ | |
14 | fromTables,↵ | 17 | fromTables,↵ | |
15 | whereColumns,↵ | 18 | whereColumns,↵ | |
16 | whereValues,↵ | 19 | whereValues,↵ | |
17 | qualifier,↵ | 20 | qualifier,↵ | |
18 | prefs,↵ | 21 | prefs,↵ | |
19 | this); | 22 |
| |
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 | 14 |
Number of mapped statements | 6 |
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) | 3.9 |
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_ONE; |
| 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 | 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 |
---|