File path: /emf-2.4.1/src/org/eclipse/emf/mapping/presentation/MappingEditor.java | File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/AbstractOverrideableCommand.java | |||
Method name: void setFocus()
|
Method name: void execute()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (currentViewerPane != null)↵ | 1 | if (overrideCommand != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | currentViewerPane.setFocus();↵ | 3 | overrideCommand.execute();↵ | |
4 | }↵ | 4 | }↵ | |
5 | else↵ | 5 | else↵ | |
6 | {↵ | 6 | {↵ | |
7 | getControl(getActivePage()).setFocus();↵ | 7 | doExecute();↵ | |
8 | } | 8 |
| |
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) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (currentViewerPane != null) |
| 1 | if (overrideCommand != null) | ||||||||||||||
| 2 | overrideCommand.execute(); | ||||||||||||||||
2 | currentViewerPane.setFocus(); | | ||||||||||||||||
else | | |||||||||||||||||
| 3 | doExecute(); | ||||||||||||||||
3 | getControl(getActivePage()).setFocus(); | |
Row | Violation |
---|---|
1 | Type org.eclipse.emf.common.ui.ViewerPane of variable currentViewerPane does not match with type org.eclipse.emf.common.command.Command of variable overrideCommand |