if (_session != null) {
try {
getCommand().execute();
} catch (Exception e) {
_session.showMessage(e);
}
}
if (_panel != null) {
try {
getCommand().execute();
} catch (Exception e) {
_panel.getSession().showMessage(e);
}
}
Clone fragments detected by clone detection tool
File path: /sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/actions/AbstractSessionAction.java
|
|
File path: /sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/actions/AbstractSQLPanelAction.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (_session != null) {↵ | | 1 | if (_panel != null) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | getCommand().execute();↵ | | 3 | getCommand().execute();↵
|
4 | } catch (Exception e) {↵ | | 4 | } catch (Exception e) {↵
|
5 | _session.showMessage(e);↵ | | 5 | _panel.getSession().showMessage(e);↵
|
6 | }↵ | | 6 | }↵
|
7 | } | | 7 | }
|
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) | 5.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
-
{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) | 58.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (_session != null) | | 1 | if (_panel != null) |
2 | | | 2 | |
3 | | | 3 | |
Precondition Violations (1)
Row |
Violation |
1 | Type net.sourceforge.squirrel_sql.client.session.ISession of variable _session does not match with type net.sourceforge.squirrel_sql.client.session.ISQLPanelAPI of variable _panel |