File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/WorkspaceResourceDialog.java | File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/dialogs/WorkspaceResourceDialog.java | |||
Method name: IContainer[] openFolderSelection(Shell, String, String, boolean, Object[], List
|
Method name: IFile[] openFileSelection(Shell, String, String, boolean, Object[], List
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (viewerFilters != null)↵ | 1 | if (viewerFilters != null)↵ | |
2 | {↵ | 2 | {↵ | |
3 | for (ViewerFilter viewerFilter : viewerFilters)↵ | 3 | for (ViewerFilter viewerFilter : viewerFilters)↵ | |
4 | {↵ | 4 | {↵ | |
5 | dialog.addFilter(viewerFilter);↵ | 5 | dialog.addFilter(viewerFilter);↵ | |
6 | }↵ | 6 | }↵ | |
7 | }↵ | 7 | }↵ | |
8 | if (initialSelection != null)↵ | 8 | if (initialSelection != null)↵ | |
9 | {↵ | 9 | {↵ | |
10 | dialog.setInitialSelections(initialSelection);↵ | 10 | dialog.setInitialSelections(initialSelection);↵ | |
11 | }↵ | 11 | }↵ | |
12 | dialog.loadContents();↵ | 12 | dialog.loadContents();↵ | |
13 | return dialog.open() == Window.OK ? dialog.getSelectedContainers() : new IContainer [0]; | 13 | return dialog.open() == Window.OK ? dialog.getSelectedFiles() : new IFile [0]; | |
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 declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
7 | if (viewerFilters != null) | 6 | if (viewerFilters != null) | ||||
8 | for (ViewerFilter viewerFilter : viewerFilters) | 7 | for (ViewerFilter viewerFilter : viewerFilters) | ||||
9 | dialog.addFilter(viewerFilter); | 8 | dialog.addFilter(viewerFilter); | ||||
10 | if (initialSelection != null) | 9 | if (initialSelection != null) | ||||
11 | dialog.setInitialSelections(initialSelection); | 10 | dialog.setInitialSelections(initialSelection); | ||||
12 | dialog.loadContents(); | 11 | dialog.loadContents(); | ||||
|
| 12 | return dialog.open() == Window.OK ? dialog.getSelectedFiles() : new IFile[0]; | ||||
13 | return dialog.open() == Window.OK ? dialog.getSelectedContainers() : new IContainer[0]; |
| |
Row | Violation |
---|---|
1 | Unmatched return dialog.open() == Window.OK ? dialog.getSelectedFiles() : new IFile[0]; |
2 | Unmatched return dialog.open() == Window.OK ? dialog.getSelectedContainers() : new IContainer[0]; |