File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java | |||
Method name: boolean validate_EveryProxyResolves(EObject, DiagnosticChain, Map
|
Method name: boolean validate_EveryReferenceIsContained(EObject, DiagnosticChain, Map
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | result = false;↵ | 1 | result = false;↵ | |
2 | if (diagnostics != null)↵ | 2 | if (diagnostics != null)↵ | |
3 | {↵ | 3 | ↵ | |
4 | {↵ | |||
4 | diagnostics.add↵ | 5 | diagnostics.add↵ | |
5 | (createDiagnostic↵ | 6 | (createDiagnostic↵ | |
6 | (Diagnostic.ERROR,↵ | 7 | (Diagnostic.ERROR,↵ | |
7 | DIAGNOSTIC_SOURCE,↵ | 8 | DIAGNOSTIC_SOURCE,↵ | |
8 | EOBJECT__EVERY_PROXY_RESOLVES,↵ | 9 | EOBJECT__EVERY_↵ | |
10 | REFERENCE_IS_CONTAINED,↵ | |||
9 | "_UI_UnresolvedProxy_diagnostic",↵ | 11 | "_UI_DanglingReference_diagnostic",↵ | |
10 | new Object []↵ | 12 | new Object []↵ | |
11 | {↵ | 13 | {↵ | |
12 | getFeatureLabel(i.feature(), context),↵ | 14 | getFeatureLabel(i.feature(), context),↵ | |
13 | getObjectLabel(eObject, context),↵ | 15 | getObjectLabel(eObject, context),↵ | |
14 | getObjectLabel(eCrossReferenceObject, context)↵ | 16 | getObjectLabel(eCrossReferenceObject, context)↵ | |
15 | },↵ | 17 | },↵ | |
16 | new Object [] { eObject, i.feature(), eCrossReferenceObject },↵ | 18 | new Object [] { eObject, i.feature(), eCrossReferenceObject },↵ | |
17 | context));↵ | 19 | context));↵ | |
18 | }↵ | 20 | }↵ | |
19 | else↵ | 21 | else↵ | |
20 | {↵ | 22 | {↵ | |
21 | break;↵ | 23 | break;↵ | |
22 | } | 24 | } | |
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 | 12 |
Number of mapped statements | 4 |
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) | 4.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | result = false; | 6 | result = false; | ||||||||||||||
6 | if (diagnostics != null) | 7 | if (diagnostics != null) | ||||||||||||||
7 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, EOBJECT__EVERY_PROXY_RESOLVES, "_UI_UnresolvedProxy_diagnostic", new Object[] {getFeatureLabel(i.feature(), context), getObjectLabel(eObject, context), getObjectLabel(eCrossReferenceObject, context)}, new Object[] {eObject, i.feature(), eCrossReferenceObject}, context)); |
| 8 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, EOBJECT__EVERY_REFERENCE_IS_CONTAINED, "_UI_DanglingReference_diagnostic", new Object[] {getFeatureLabel(i.feature(), context), getObjectLabel(eObject, context), getObjectLabel(eCrossReferenceObject, context)}, new Object[] {eObject, i.feature(), eCrossReferenceObject}, context)); | |||||||||||||
else | else | ||||||||||||||||
8 | break; |
| 9 | break; |
Row | Violation |
---|---|
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |