File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/presentation/Ecore2EcoreModelWizard.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLModelWizard.java | |||
Method name: boolean validatePage()
|
Method name: boolean validatePage()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (super.validatePage())↵ | 1 | if (super.validatePage())↵ | |
2 | {↵ | 2 | {↵ | |
3 | String extension = new Path(getFileName()).getFileExtension();↵ | 3 | String extension = new Path(getFileName()).getFileExtension();↵ | |
4 | if (extension == null || !FILE_EXTENSIONS.contains(extension))↵ | 4 | if (extension == null || !FILE_EXTENSIONS.contains(extension))↵ | |
5 | {↵ | 5 | {↵ | |
6 | String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";↵ | 6 | String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; //$NON-NLS-1$ //$NON-NLS-2$↵ | |
7 | setErrorMessage(Ecore2EcoreEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));↵ | 7 | setErrorMessage(Ecore2XMLUIPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));↵ | |
8 | return false;↵ | 8 | return false;↵ | |
9 | }↵ | 9 | }↵ | |
10 | return true;↵ | 10 | return true;↵ | |
11 | } | 11 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
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 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (super.validatePage()) | 1 | if (super.validatePage()) | |||||||||||
2 | String extension = new Path(getFileName()).getFileExtension(); | 2 | String extension = new Path(getFileName()).getFileExtension(); | |||||||||||
3 | if (extension == null || !FILE_EXTENSIONS.contains(extension)) | 3 | if (extension == null || !FILE_EXTENSIONS.contains(extension)) | |||||||||||
4 | String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; | 4 | String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; | |||||||||||
5 | setErrorMessage(Ecore2EcoreEditorPlugin.INSTANCE.getString(key, new Object[] {FORMATTED_FILE_EXTENSIONS})); |
| 5 | setErrorMessage(Ecore2XMLUIPlugin.INSTANCE.getString(key, new Object[] {FORMATTED_FILE_EXTENSIONS})); | ||||||||||
6 | return false; | 6 | return false; | |||||||||||
7 | return true; | 7 | return true; |
Row | Violation |
---|