if (!_session.isfinishedLoading())
{
return;
}
if (withEvents)
{
fireWidgetClosing();
}
dispose();
if (withEvents)
{
fireWidgetClosed();
}
if (!_session.isfinishedLoading())
{
return;
}
if (withEvents)
{
fireWidgetClosing();
}
dispose();
if (withEvents)
{
fireWidgetClosed();
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/SessionTabWidget.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/desktopcontainer/SessionDialogWidget.java
|
Method name: void closeFrame(boolean)
|
|
Method name: void closeFrame(boolean)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (!_session.isfinishedLoading())↵ | | 1 | if (!_session.isfinishedLoading())↵
|
2 | {↵ | | 2 | {↵
|
3 | return;↵ | | 3 | return;↵
|
4 | }↵ | | 4 | }↵
|
5 | if (withEvents)↵ | | 5 | if (withEvents)↵
|
6 | {↵ | | 6 | {↵
|
7 | fireWidgetClosing();↵ | | 7 | fireWidgetClosing();↵
|
8 | }↵ | | 8 | }↵
|
9 | dispose();↵ | | 9 | dispose();↵
|
|
10 | if (withEvents)↵ | | 10 | if (withEvents)↵
|
11 | {↵ | | 11 | {↵
|
12 | fireWidgetClosed();↵ | | 12 | fireWidgetClosed();↵
|
13 | } | | 13 | }
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 28 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 11.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!_session.isfinishedLoading()) | | 1 | if (!_session.isfinishedLoading()) |
2 | | | 2 | |
3 | if (withEvents) | | 3 | if (withEvents) |
4 | | | 4 | |
5 | dispose(); | | 5 | dispose(); |
6 | if (withEvents) | | 6 | if (withEvents) |
7 | | | 7 | |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.desktopcontainer.SessionTabWidget and net.sourceforge.squirrel_sql.client.gui.desktopcontainer.SessionDialogWidget do not have a common superclass |