if (!_haveSession)
return;
if (_inRefresh)
return;
_inRefresh = true;
refreshData();
_inRefresh = false;
if (!_haveSession)
return;
if (_inRefresh)
return;
_inRefresh = true;
refreshData();
_inRefresh = false;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/gui/MonitorPanel.java
|
|
File path: /sql12/plugins/mssql/src/net/sourceforge/squirrel_sql/plugins/mssql/gui/MonitorPanel.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (!_haveSession)↵ | | 1 | if (!_haveSession)↵
|
2 | return;↵ | | 2 | return;↵
|
3 | if (_inRefresh)↵ | | 3 | if (_inRefresh)↵
|
4 | return;↵ | | 4 | return;↵
|
5 | _inRefresh = true;↵ | | 5 | _inRefresh = true;↵
|
6 | refreshData();↵ | | 6 | refreshData();↵
|
7 | _inRefresh = false; | | 7 | _inRefresh = false;
|
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 the same java file |
Number of node comparisons | 22 |
-
{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) | 1.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!_haveSession) | | 1 | if (!_haveSession) |
2 | | | 2 | |
3 | if (_inRefresh) | | 3 | if (_inRefresh) |
4 | | | 4 | |
5 | _inRefresh = true; | | 5 | _inRefresh = true; |
6 | refreshData(); | | 6 | refreshData(); |
7 | _inRefresh = false; | | 7 | _inRefresh = false; |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes and do not have a common superclass |