sbToAppend.append(" ");
sbToAppend.append(ci.pkCols.get(j));
if (j < ci.pkCols.size() - 1)
{
sbToAppend.append(",");
}
sbToAppend.append("\n");
sbToAppend.append(" ");
sbToAppend.append(ci.fkCols.get(j));
if (j < ci.fkCols.size() - 1)
{
sbToAppend.append(",");
}
sbToAppend.append("\n");
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/DialectUtils.java
|
|
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/DialectUtils.java
|
Method name: List createConstraints(ITableInfo, List, CreateScriptPreferences, ISQLDatabaseMetaData)
|
|
Method name: List createConstraints(ITableInfo, List, CreateScriptPreferences, ISQLDatabaseMetaData)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | sbToAppend.append(" ");↵ | | 1 | sbToAppend.append(" ");↵
|
2 | sbToAppend.append(ci.pkCols.get(j));↵ | | 2 | sbToAppend.append(ci.fkCols.get(j));↵
|
3 | if (j < ci.pkCols.size() - 1)↵ | | 3 | if (j < ci.fkCols.size() - 1)↵
|
4 | {↵ | | 4 | {↵
|
5 | sbToAppend.append(",");↵ | | 5 | sbToAppend.append(",");↵
|
6 | }↵ | | 6 | }↵
|
7 | sbToAppend.append("\n"); | | 7 | sbToAppend.append("\n");
|
See real code fragment |
|
See real code fragment |
Summary
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) | 1.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 6.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
38 | sbToAppend.append(" "); | | 27 | sbToAppend.append(" "); |
39 | sbToAppend.append(ci.pkCols.get(j)); | | 28 | sbToAppend.append(ci.fkCols.get(j)); |
40 | if (j < ci.pkCols.size() - 1) | | 29 | if (j < ci.fkCols.size() - 1) |
41 | | | 30 | |
42 | sbToAppend.append("\n"); | | 31 | sbToAppend.append("\n"); |
Precondition Violations (0)
Row |
Violation |