newDetails.add(_schemaDetails[j]);
found = true;
break;
_sessionWindows.removeWindow(sessionSheets[i]);
WindowManager.this.selectFrontWindow();
break;
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/SchemaTableModel.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/WindowManager.java
|
Method name: void updateSchemas(String[])
|
|
Method name: void widgetClosed(WidgetEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | newDetails.add(_schemaDetails[j]);↵ | | 1 | _sessionWindows.removeWindow(sessionSheets[i]);↵
|
2 | found = true;↵ | | 2 | ↵
|
| | | 3 | WindowManager.this.selectFrontWindow();↵
|
3 | break; | | 4 | break;
|
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 | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | newDetails.add(_schemaDetails[j]); | | | |
7 | found = true; | | | |
| | | 9 | _sessionWindows.removeWindow(sessionSheets[i]); |
| | | 10 | WindowManager.this.selectFrontWindow(); |
8 | break; | | 11 | break; |
Precondition Violations (3)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.aliasproperties.SchemaTableModel and net.sourceforge.squirrel_sql.client.gui.WindowManager.SessionWindowListener do not have a common superclass |