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 gotoMarker(IMarker)
|
Method name: void gotoMarker(IMarker)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | try↵ | 1 | try↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (marker.getType().equals(EValidator.MARKER))↵ | 3 | if (marker.getType().equals(EValidator.MARKER))↵ | |
4 | {↵ | 4 | {↵ | |
5 | String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);↵ | 5 | String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null);↵ | |
6 | if (uriAttribute != null)↵ | 6 | if (uriAttribute != null)↵ | |
7 | {↵ | 7 | {↵ | |
8 | URI uri = URI.createURI(uriAttribute);↵ | 8 | URI uri = URI.createURI(uriAttribute);↵ | |
9 | EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);↵ | 9 | EObject eObject = editingDomain.getResourceSet().getEObject(uri, true);↵ | |
10 | if (eObject != null)↵ | 10 | if (eObject != null)↵ | |
11 | {↵ | 11 | {↵ | |
12 | setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));↵ | 12 | setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject)));↵ | |
13 | }↵ | 13 | }↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | }↵ | |
16 | }↵ | 16 | }↵ | |
17 | catch (CoreException exception)↵ | 17 | catch (CoreException exception)↵ | |
18 | {↵ | 18 | {↵ | |
19 | EcoreEditorPlugin.INSTANCE.log(exception);↵ | 19 | Ecore2XMLUIPlugin.INSTANCE.log(exception);↵ | |
20 | }↵ | 20 |
| |
21 | setSelectionToViewer(markerHelper.getTargetObjects(editingDomain, marker)); | |||
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.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 8 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | try |
| 1 | try | ||||||||||
3 | if (marker.getType().equals(EValidator.MARKER)) | 2 | if (marker.getType().equals(EValidator.MARKER)) | |||||||||||
4 | String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null); | 3 | String uriAttribute = marker.getAttribute(EValidator.URI_ATTRIBUTE, null); | |||||||||||
5 | if (uriAttribute != null) | 4 | if (uriAttribute != null) | |||||||||||
6 | URI uri = URI.createURI(uriAttribute); | 5 | URI uri = URI.createURI(uriAttribute); | |||||||||||
7 | EObject eObject = editingDomain.getResourceSet().getEObject(uri, true); | 6 | EObject eObject = editingDomain.getResourceSet().getEObject(uri, true); | |||||||||||
8 | if (eObject != null) | 7 | if (eObject != null) | |||||||||||
9 | setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject))); | 8 | setSelectionToViewer(Collections.singleton(editingDomain.getWrapper(eObject))); |
Row | Violation |
---|