super.addNotify();
// if (!_hasBeenVisible && value == true)
if (!_hasBeenVisible)
{
_hasBeenVisible = true;
// _msgSplit.setDividerLocation(0.9d);
// _msgSplit.setResizeWeight(1.0);
// Done this late so that plugins have time to register expanders
// with the object tree prior to it being built.
// getSession().getObjectTreeAPI(_app.getDummyAppPlugin()).refreshTree();
_mainTabPane.getObjectTreePanel().refreshTree();
}
super.addNotify();
if (!_hasBeenVisible)
{
_hasBeenVisible = true;
// Done this late so that plugins have time to register expanders
// with the object tree prior to it being built.
_objTreePanel.refreshTree();
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/session/SessionPanel.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/session/ObjectTreeInternalFrame.java
|
Method name: void addNotify()
|
|
Method name: void addNotify()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | super.addNotify();↵ | | 1 | super.addNotify();↵
|
2 | // if (!_hasBeenVisible && value == true)↵ | | |
|
3 | if (!_hasBeenVisible)↵ | | 2 | if (!_hasBeenVisible)↵
|
4 | {↵ | | 3 | {↵
|
5 | _hasBeenVisible = true;↵ | | 4 | _hasBeenVisible = true;↵
|
6 | // _msgSplit.setDividerLocation(0.9d);↵ | | |
|
7 | // _msgSplit.setResizeWeight(1.0);↵ | | |
|
|
8 | // Done this late so that plugins have time to register expanders↵ | | 5 | // Done this late so that plugins have time to register expanders↵
|
9 | // with the object tree prior to it being built.↵ | | 6 | // with the object tree prior to it being built.↵
|
10 | // getSession().getObjectTreeAPI(_app.getDummyAppPlugin()).refreshTree();↵ | | 7 | ↵
|
11 | _mainTabPane.getObjectTreePanel().refreshTree();↵ | | 8 | _objTreePanel.refreshTree();↵
|
12 | } | | 9 | }
|
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 | 10 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 20.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super.addNotify(); | | 1 | super.addNotify(); |
2 | if (!_hasBeenVisible) | | 2 | if (!_hasBeenVisible) |
3 | | | 3 | |
4 | _mainTabPane.getObjectTreePanel().refreshTree(); | | 4 | _objTreePanel.refreshTree(); |
Precondition Violations (3)
Row |
Violation |
1 | Super method call super.addNotify(); cannot be extracted from method |
2 | Super method call super.addNotify(); cannot be extracted from method |
3 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.session.SessionPanel and net.sourceforge.squirrel_sql.client.gui.session.ObjectTreeInternalFrame do not have a common superclass |