File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/IngresDialectExt.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/IngresDialectExt.java | |||
Method name: String[] getAlterSequenceSQL(String, String, String, String, String, String, boolean, DatabaseObjectQualifier, SqlGenerationPreferences)
|
Method name: String getCreateSequenceSQL(String, String, String, String, String, String, boolean, DatabaseObjectQualifier, SqlGenerationPreferences)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | StringTemplate st = new StringTemplate(ST_ALTER_SEQUENCE_STYLE_TWO);↵ | 1 | StringTemplate st = new StringTemplate(ST_CREATE_SEQUENCE_STYLE_TWO);↵ | |
2 | OptionalSqlClause incClause = new OptionalSqlClause(DialectUtils.INCREMENT_BY_CLAUSE, increment);↵ | 2 | OptionalSqlClause incClause = new OptionalSqlClause(DialectUtils.INCREMENT_BY_CLAUSE, increment);↵ | |
3 | OptionalSqlClause minClause = new OptionalSqlClause(DialectUtils.MINVALUE_CLAUSE, minimum);↵ | 3 | OptionalSqlClause minClause = new OptionalSqlClause(DialectUtils.MINVALUE_CLAUSE, minimum);↵ | |
4 | OptionalSqlClause maxClause = new OptionalSqlClause(DialectUtils.MAXVALUE_CLAUSE, maximum);↵ | 4 | OptionalSqlClause maxClause = new OptionalSqlClause(DialectUtils.MAXVALUE_CLAUSE, maximum);↵ | |
5 | OptionalSqlClause cacheClause = new OptionalSqlClause(DialectUtils.CACHE_CLAUSE, cache);↵ | 5 | OptionalSqlClause cacheClause = new OptionalSqlClause(DialectUtils.CACHE_CLAUSE, cache);↵ | |
6 | HashMap<String, String> valuesMap =↵ | 6 | HashMap<String, String> valuesMap =↵ | |
7 | DialectUtils.getValuesMap(ST_SEQUENCE_NAME_KEY,↵ | 7 | DialectUtils.getValuesMap(ST_SEQUENCE_NAME_KEY,↵ | |
8 | sequenceName,↵ | 8 | sequenceName,↵ | |
9 | ST_INCREMENT_KEY,↵ | 9 | ST_INCREMENT_KEY,↵ | |
10 | incClause,↵ | 10 | incClause,↵ | |
11 | ST_MINIMUM_KEY,↵ | 11 | ST_MINIMUM_KEY,↵ | |
12 | minClause,↵ | 12 | minClause,↵ | |
13 | ST_MAXIMUM_KEY,↵ | 13 | ST_MAXIMUM_KEY,↵ | |
14 | maxClause,↵ | 14 | maxClause,↵ | |
15 | ST_CACHE_KEY,↵ | 15 | ST_CACHE_KEY,↵ | |
16 | cacheClause);↵ | 16 | cacheClause);↵ | |
17 | if (cycle)↵ | 17 | if (cycle)↵ | |
18 | {↵ | 18 | {↵ | |
19 | valuesMap.put(ST_CYCLE_KEY, "CYCLE");↵ | 19 | valuesMap.put(ST_CYCLE_KEY, "CYCLE");↵ | |
20 | }↵ | 20 | }↵ | |
21 | return new String[] { DialectUtils.bindTemplateAttributes(this, st, valuesMap, qualifier, prefs) }; | 21 | return DialectUtils.getCreateSequenceSQL(st, valuesMap, qualifier, prefs, this); | |
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 23 |
Number of mapped statements | 8 |
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) | 5.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | StringTemplate st = new StringTemplate(ST_ALTER_SEQUENCE_STYLE_TWO); |
| 1 | StringTemplate st = new StringTemplate(ST_CREATE_SEQUENCE_STYLE_TWO); | ||||||||||
2 | OptionalSqlClause incClause = new OptionalSqlClause(DialectUtils.INCREMENT_BY_CLAUSE, increment); | 2 | OptionalSqlClause incClause = new OptionalSqlClause(DialectUtils.INCREMENT_BY_CLAUSE, increment); | |||||||||||
3 | OptionalSqlClause minClause = new OptionalSqlClause(DialectUtils.MINVALUE_CLAUSE, minimum); | 3 | OptionalSqlClause minClause = new OptionalSqlClause(DialectUtils.MINVALUE_CLAUSE, minimum); | |||||||||||
4 | OptionalSqlClause maxClause = new OptionalSqlClause(DialectUtils.MAXVALUE_CLAUSE, maximum); | 4 | OptionalSqlClause maxClause = new OptionalSqlClause(DialectUtils.MAXVALUE_CLAUSE, maximum); | |||||||||||
5 | OptionalSqlClause cacheClause = new OptionalSqlClause(DialectUtils.CACHE_CLAUSE, cache); | 5 | OptionalSqlClause cacheClause = new OptionalSqlClause(DialectUtils.CACHE_CLAUSE, cache); | |||||||||||
6 | HashMap<String, String> valuesMap = DialectUtils.getValuesMap(ST_SEQUENCE_NAME_KEY, sequenceName, ST_INCREMENT_KEY, incClause, ST_MINIMUM_KEY, minClause, ST_MAXIMUM_KEY, maxClause, ST_CACHE_KEY, cacheClause); | 6 | HashMap<String, String> valuesMap = DialectUtils.getValuesMap(ST_SEQUENCE_NAME_KEY, sequenceName, ST_INCREMENT_KEY, incClause, ST_MINIMUM_KEY, minClause, ST_MAXIMUM_KEY, maxClause, ST_CACHE_KEY, cacheClause); | |||||||||||
7 | if (cycle) | 7 | if (cycle) | |||||||||||
8 | valuesMap.put(ST_CYCLE_KEY, "CYCLE"); | 8 | valuesMap.put(ST_CYCLE_KEY, "CYCLE"); | |||||||||||
|
| 9 | return DialectUtils.getCreateSequenceSQL(st, valuesMap, qualifier, prefs, this); | |||||||||||
9 | return new String[] {DialectUtils.bindTemplateAttributes(this, st, valuesMap, qualifier, prefs)}; |
| |
Row | Violation |
---|---|
1 | Unmatched statement return DialectUtils.getCreateSequenceSQL(st,valuesMap,qualifier,prefs,this); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched return DialectUtils.getCreateSequenceSQL(st,valuesMap,qualifier,prefs,this); |
3 | Unmatched statement return new String[]{DialectUtils.bindTemplateAttributes(this,st,valuesMap,qualifier,prefs)}; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched return new String[]{DialectUtils.bindTemplateAttributes(this,st,valuesMap,qualifier,prefs)}; |
5 | Clone fragment #1 returns variables st, valuesMap , while Clone fragment #2 returns variables st, valuesMap |