if (log.isInfoEnabled())
{
log.info("Skipping FK (" + fkName + ") - table " + ti.getSimpleName()
+ " seems to already have it defined.");
}
continue;
if (colDefs[i].isAutoIncrement()) {
if (s_log.isInfoEnabled()) {
s_log.info("insertRow: skipping auto-increment column "+
colDefs[i].getColumnName());
}
continue;
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/DataSetUpdateableTableModelImpl.java
|
Method name: Set getForeignKeySQL(SessionInfoProvider, ITableInfo, ArrayList)
|
|
Method name: String insertRow(Object[], ColumnDisplayDefinition[])
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
1 | if (log.isInfoEnabled())↵ | | 1 | if (↵
|
2 | {↵ | | |
|
3 | log.info("Skipping FK (" + fkName + ") - table " + ti.getSimpleName()↵ | | |
|
4 | + " seems to already have it defined.");↵ | | |
|
5 | }↵ | | |
|
6 | continue; | | 2 | colDefs[i].isAutoIncrement()) {↵
|
| | | 3 | if (s_log.isInfoEnabled()) {↵
|
| | | 4 | s_log.info("insertRow: skipping auto-increment column "+↵
|
| | | 5 | colDefs[i].getColumnName());↵
|
| | | 6 | }↵
|
| | | 7 | continue;↵
|
| | | 8 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 4.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | if (log.isInfoEnabled()) | | 14 | if (s_log.isInfoEnabled()) |
21 | log.info("Skipping FK (" + fkName + ") - table " + ti.getSimpleName() + " seems to already have it defined."); | | 15 | s_log.info("insertRow: skipping auto-increment column " + colDefs[i].getColumnName()); |
22 | continue; | | 16 | continue; |
Precondition Violations (3)
Row |
Violation |
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.dbcopy.util.DBUtil and net.sourceforge.squirrel_sql.client.session.DataSetUpdateableTableModelImpl do not have a common superclass |