File path: /sql12/plugins/refactoring/src/net/sourceforge/squirrel_sql/plugins/refactoring/actions/AbstractRefactoringAction.java | File path: /sql12/plugins/postgres/src/net/sourceforge/squirrel_sql/plugins/postgres/actions/AbstractObjectTreeAction.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 6 | |||
1 | if (_tree != null) {↵ | |||
1 | IDatabaseObjectInfo[] infos = _tree.getSelectedDatabaseObjects();↵ | 2 | IDatabaseObjectInfo[] infos = _tree.getSelectedDatabaseObjects();↵ | |
2 | ↵ | |||
3 | if (infos.length > 1 && !isMultipleObjectAction())↵ | 3 | if (infos.length > 1 && !isMultipleObjectAction())↵ | |
4 | {↵ | |||
5 | _s↵ | 4 | {↵ | |
6 | ession.showErrorMessage(getErrorMessage());↵ | 5 | _tree.getSession().showMessage(getErrorMessage());↵ | |
7 | } else↵ | |||
8 | {↵ | |||
9 | try↵ | |||
10 | {↵ | |||
11 | ↵ | |||
6 | } else {↵ | |||
7 | try {↵ | |||
12 | getCommand(infos).execute();↵ | 8 | getCommand(infos).execute();↵ | |
13 | ↵ | |||
14 | } catch (Exception e)↵ | 9 | } catch (Exception e)↵ | |
15 | {↵ | |||
16 | _s↵ | 10 | {↵ | |
17 | ession.showErrorMessage(e);↵ | 11 | _tree.getSession().showMessage(e);↵ | |
18 | }↵ | |||
19 | ↵ | |||
12 | }↵ | |||
13 | }↵ | |||
20 | } | 14 | } | |
See real code fragment | See real code fragment |
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) | 6.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
Number of mapped statements | 5 |
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) | 302.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | IDatabaseObjectInfo[] infos = _tree.getSelectedDatabaseObjects(); | 2 | IDatabaseObjectInfo[] infos = _tree.getSelectedDatabaseObjects(); | ||||||||||||||||||
3 | if (infos.length > 1 && !isMultipleObjectAction()) | 3 | if (infos.length > 1 && !isMultipleObjectAction()) | ||||||||||||||||||
4 | _session.showErrorMessage(getErrorMessage()); |
| 4 | _tree.getSession().showMessage(getErrorMessage()); | |||||||||||||||||
5 | try |
| 5 | try | |||||||||||||||||
6 | getCommand(infos).execute(); | 6 | getCommand(infos).execute(); |
Row | Violation |
---|---|
1 | Expression _session.showErrorMessage(getErrorMessage()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression _session.showErrorMessage(getErrorMessage()) is a void method call, and thus it cannot be parameterized |
3 | Expression _tree.getSession().showMessage(getErrorMessage()) is a void method call, and thus it cannot be parameterized |
4 | Expression _session.showErrorMessage(e) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression _tree.getSession().showMessage(e) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression _session.showErrorMessage(e) is a void method call, and thus it cannot be parameterized |
7 | Expression _tree.getSession().showMessage(e) is a void method call, and thus it cannot be parameterized |