File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java | |||
Method name: void createModelGen()
|
Method name: void createModel()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | URI resourceURI = EditUIUtil.getURI(getEditorInput());↵ | 1 | URI resourceURI = EditUIUtil.getURI(getEditorInput());↵ | |
2 | Exception exception = null;↵ | 2 | Exception exception = null;↵ | |
3 | Resource resource = null;↵ | 3 | Resource resource = null;↵ | |
4 | try↵ | 4 | try↵ | |
5 | {↵ | 5 | {↵ | |
6 | // Load the resource through the editing domain.↵ | 6 | // Load the resource through the editing domain.↵ | |
7 | //↵ | 7 | //↵ | |
8 | resource = editingDomain.getResourceSet().getResource(resourceURI, true);↵ | 8 | resource = editingDomain.getResourceSet().getResource(resourceURI, true);↵ | |
9 | }↵ | 9 | }↵ | |
10 | catch (Exception e)↵ | 10 | catch (Exception e)↵ | |
11 | {↵ | 11 | {↵ | |
12 | exception = e;↵ | 12 | exception = e;↵ | |
13 | resource = editingDomain.getResourceSet().getResource(resourceURI, false);↵ | 13 | resource = editingDomain.getResourceSet().getResource(resourceURI, false);↵ | |
14 | }↵ | 14 | }↵ | |
15 | Diagnostic diagnostic = analyzeResourceProblems(resource, exception);↵ | 15 | Diagnostic diagnostic = analyzeResourceProblems(resource, exception);↵ | |
16 | if (diagnostic.getSeverity() != Diagnostic.OK)↵ | 16 | if (diagnostic.getSeverity() != Diagnostic.OK)↵ | |
17 | {↵ | 17 | {↵ | |
18 | resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));↵ | 18 | resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));↵ | |
19 | }↵ | 19 | }↵ | |
20 | editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); | 20 |
| |
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.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 26 |
Number of mapped statements | 9 |
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.7 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | URI resourceURI = EditUIUtil.getURI(getEditorInput()); | 1 | URI resourceURI = EditUIUtil.getURI(getEditorInput()); | |
2 | Exception exception = null; | 2 | Exception exception = null; | |
3 | Resource resource = null; | 3 | Resource resource = null; | |
4 | try | 4 | try | |
5 | resource = editingDomain.getResourceSet().getResource(resourceURI, true); | 5 | resource = editingDomain.getResourceSet().getResource(resourceURI, true); | |
6 | Diagnostic diagnostic = analyzeResourceProblems(resource, exception); | 6 | Diagnostic diagnostic = analyzeResourceProblems(resource, exception); | |
7 | if (diagnostic.getSeverity() != Diagnostic.OK) | 7 | if (diagnostic.getSeverity() != Diagnostic.OK) | |
8 | resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); | 8 | resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); | |
9 | editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); | 9 | editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); |
Row | Violation |
---|