for (String sql : sqls) {
result.append(sql);
result.append("\n");
result.append(sep);
result.append("\n");
}
collector.append(next);
collector.append(";");
continue;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/sqlscript/src/net/sourceforge/squirrel_sql/plugins/sqlscript/table_script/CreateTableScriptCommand.java
|
|
File path: /sql12/plugins/oracle/src/net/sourceforge/squirrel_sql/plugins/oracle/tokenizer/OracleQueryTokenizer.java
|
Method name: String createTableScriptString(IDatabaseObjectInfo[])
|
|
Method name: void joinFragments(Pattern, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 3
|
|
1 | for (String sql : sqls) {↵ | | |
|
2 | result.append(sql);↵ | | |
|
3 | result↵ | | 1 | collector.append(next);↵
|
4 | .append("\n");↵ | | 2 | collector.append(";");↵
|
5 | result.append(sep);↵ | | |
|
6 | result.append("\n");↵ | | |
|
7 | } | | 3 | continue;
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
26 | result.append(sql); | | 23 | collector.append(next); |
27 | result.append("\n"); | | 24 | collector.append(";"); |
| | | 25 | continue; |
28 | result.append(sep); | | | |
29 | result.append("\n"); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched continue; |
2 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.sqlscript.table_script.CreateTableScriptCommand and net.sourceforge.squirrel_sql.plugins.oracle.tokenizer.OracleQueryTokenizer do not have a common superclass |