File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java | |||
Method name: boolean validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map
|
Method name: boolean validateEReference_ConsistentOpposite(EReference, DiagnosticChain, Map
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if (diagnostics != null && !result)↵ | 1 | if (diagnostics != null && !result)↵ | |
2 | {↵ | 2 | {↵ | |
3 | diagnostics.add↵ | 3 | diagnostics.add↵ | |
4 | (createDiagnostic↵ | 4 | (createDiagnostic↵ | |
5 | (Diagnostic.ERROR,↵ | 5 | (Diagnostic.ERROR,↵ | |
6 | DIAGNOSTIC_SOURCE,↵ | 6 | DIAGNOSTIC_SOURCE,↵ | |
7 | CONSISTENT_OPPOSITE_BAD_TRANSIENT,↵ | 7 | CONSISTENT_OPPOSITE_BOTH_CONTAINMENT,↵ | |
8 | "_UI_EReferenceTransientOppositeNotTransient_diagnostic",↵ | 8 | "_UI_EReferenceOppositeBothContainment_diagnostic",↵ | |
9 | null,↵ | 9 | null,↵ | |
10 | new Object[] { eReference, eOpposite },↵ | 10 | new Object[] { eReference, eOpposite },↵ | |
11 | context));↵ | 11 | context));↵ | |
12 | } | 12 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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) | 5.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21 | if (diagnostics != null && !result) | 25 | if (diagnostics != null && !result) | ||||||||||||||
22 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, CONSISTENT_OPPOSITE_BAD_TRANSIENT, "_UI_EReferenceTransientOppositeNotTransient_diagnostic", null, new Object[] {eReference, eOpposite}, context)); |
| 26 | diagnostics.add(createDiagnostic(Diagnostic.ERROR, DIAGNOSTIC_SOURCE, CONSISTENT_OPPOSITE_BOTH_CONTAINMENT, "_UI_EReferenceOppositeBothContainment_diagnostic", null, new Object[] {eReference, eOpposite}, context)); |
Row | Violation |
---|