for (String sql : sqls) {
result.append(sql);
result.append("\n");
result.append(sep);
result.append("\n");
}
for (String sql : sqls) {
buf.append(sql);
buf.append(sep);
buf.append("\n");
}
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/tab/OracleSourceTab.java
|
Method name: String createTableScriptString(IDatabaseObjectInfo[])
|
|
Method name: void load(ISession, PreparedStatement)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | for (String sql : sqls) {↵ | | 1 | for (String sql : sqls) {↵
|
2 | result.append(sql);↵ | | 2 | buf.append(sql);↵
|
3 | result.append("\n");↵ | | 3 | ↵
|
4 | result.append(sep);↵ | | 4 | buf.append(sep);↵
|
5 | result.append("\n");↵ | | 5 | buf.append("\n");↵
|
6 | } | | 6 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 21 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 5.1 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
25 | for (String sql : sqls) | | 21 | for (String sql : sqls) |
26 | | | 22 | |
27 | | | 24 | |
28 | | | 23 | |
29 | | | | |
Precondition Violations (1)
Row |
Violation |
1 | 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.tab.OracleSourceTab.OracleSourcePanel do not have a common superclass |