10644-2-12

if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validate_UniqueID(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidLowerBound(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidType(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateEOperation_UniqueParameterNames(eOperation, diagnostics, context); if (result || diagnostics != null) result &= validateEOperation_UniqueTypeParameterNames(eOperation, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(eReference, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eReference, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidLowerBound(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidType(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEReference_SingleContainer(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEReference_ConsistentKeys(eReference, diagnostics, context);

Clone fragments detected by clone detection tool
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 validateEOperation(EOperation, DiagnosticChain, Map)` |  | Method name: `boolean validateEReference(EReference, DiagnosticChain, Map)`
Number of AST nodes: 24 |  | Number of AST nodes: 24

1

    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eOperation, diagnostics, context);↵

1

    if (result || diagnostics != null) result &= validate_UniqueID(eReference, diagnostics, context);↵

2

        if (result || diagnostics != null) result &= validate_EveryProxyResolves(eOperation, diagnostics, context);↵

2

        if (result || diagnostics != null) result &= validate_EveryKeyUnique(eReference, diagnostics, context);↵

3

        if (result || diagnostics != null) result &= validate_UniqueID(eOperation, diagnostics, context);↵

3

        if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);↵

4

        if (result || diagnostics != null) result &= validate_EveryKeyUnique(eOperation, diagnostics, context);↵

4

        if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eReference, diagnostics, context);↵

5

        if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eOperation, diagnostics, context);↵

5

        if (result || diagnostics != null) result &= validateETypedElement_ValidLowerBound(eReference, diagnostics, context);↵

6

        if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eOperation, diagnostics, context);↵

6

        if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eReference, diagnostics, context);↵

7

        if (result || diagnostics != null) result &= validateETypedElement_ValidLowerBound(eOperation, diagnostics, context);↵

7

        if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eReference, diagnostics, context);↵

8

        if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eOperation, diagnostics, context);↵

8

        if (result || diagnostics != null) result &= validateETypedElement_ValidType(eReference, diagnostics, context);↵

9

        if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eOperation, diagnostics, context);↵

9

        if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);↵

10

        if (result || diagnostics != null) result &= validateETypedElement_ValidType(eOperation, diagnostics, context);↵

10

        if (result || diagnostics != null) result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);↵

11

        if (result || diagnostics != null) result &= validateEOperation_UniqueParameterNames(eOperation, diagnostics, context);↵

11

        if (result || diagnostics != null) result &= validateEReference_SingleContainer(eReference, diagnostics, context);↵

12

        if (result || diagnostics != null) result &= validateEOperation_UniqueTypeParameterNames(eOperation, diagnostics, context);

12

        if (result || diagnostics != null) result &= validateEReference_ConsistentKeys(eReference, diagnostics, context);

See real code fragment |  | See real code fragment

Summary
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) | 8.2
Clones location | Clones are declared in the same class
Number of node comparisons | 378

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 12
   Number of unmapped statements in the first code fragment | 12
   Number of unmapped statements in the second code fragment | 12
   Time elapsed for statement mapping (ms) | 15.2
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   4

       if (result || diagnostics != null)

   8

       if (result || diagnostics != null)

   5

       result &= validate_EveryReferenceIsContained(eOperation, diagnostics, context);

   5 | result &= validate_EveryReferenceIsContained(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryReferenceIsContained(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   9 | result &= validate_UniqueID(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_UniqueID(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   9

       result &= validate_UniqueID(eReference, diagnostics, context);

   6

       if (result || diagnostics != null)

   10

       if (result || diagnostics != null)

   7

       result &= validate_EveryProxyResolves(eOperation, diagnostics, context);

   7 | result &= validate_EveryProxyResolves(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryProxyResolves(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   11 | result &= validate_EveryKeyUnique(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryKeyUnique(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   11

       result &= validate_EveryKeyUnique(eReference, diagnostics, context);

   8

       if (result || diagnostics != null)

   12

       if (result || diagnostics != null)

   9

       result &= validate_UniqueID(eOperation, diagnostics, context);

   9 | result &= validate_UniqueID(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_UniqueID(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   13 | result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryMapEntryUnique(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   13

       result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);

   10

       if (result || diagnostics != null)

   14

       if (result || diagnostics != null)

   11

       result &= validate_EveryKeyUnique(eOperation, diagnostics, context);

   11 | result &= validate_EveryKeyUnique(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryKeyUnique(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   15 | result &= validateENamedElement_WellFormedName(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateENamedElement_WellFormedName(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   15

       result &= validateENamedElement_WellFormedName(eReference, diagnostics, context);

   12

       if (result || diagnostics != null)

   16

       if (result || diagnostics != null)

   13

       result &= validate_EveryMapEntryUnique(eOperation, diagnostics, context);

   13 | result &= validate_EveryMapEntryUnique(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validate_EveryMapEntryUnique(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   17 | result &= validateETypedElement_ValidLowerBound(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidLowerBound(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   17

       result &= validateETypedElement_ValidLowerBound(eReference, diagnostics, context);

   14

       if (result || diagnostics != null)

   18

       if (result || diagnostics != null)

   15

       result &= validateENamedElement_WellFormedName(eOperation, diagnostics, context);

   15 | result &= validateENamedElement_WellFormedName(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateENamedElement_WellFormedName(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   19 | result &= validateETypedElement_ValidUpperBound(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidUpperBound(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   19

       result &= validateETypedElement_ValidUpperBound(eReference, diagnostics, context);

   16

       if (result || diagnostics != null)

   20

       if (result || diagnostics != null)

   17

       result &= validateETypedElement_ValidLowerBound(eOperation, diagnostics, context);

   17 | result &= validateETypedElement_ValidLowerBound(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidLowerBound(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   21 | result &= validateETypedElement_ConsistentBounds(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ConsistentBounds(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   21

       result &= validateETypedElement_ConsistentBounds(eReference, diagnostics, context);

   18

       if (result || diagnostics != null)

   22

       if (result || diagnostics != null)

   19

       result &= validateETypedElement_ValidUpperBound(eOperation, diagnostics, context);

   19 | result &= validateETypedElement_ValidUpperBound(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidUpperBound(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   23 | result &= validateETypedElement_ValidType(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidType(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   23

       result &= validateETypedElement_ValidType(eReference, diagnostics, context);

   20

       if (result || diagnostics != null)

   24

       if (result || diagnostics != null)

   21

       result &= validateETypedElement_ConsistentBounds(eOperation, diagnostics, context);

   21 | result &= validateETypedElement_ConsistentBounds(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ConsistentBounds(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   25 | result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEStructuralFeature_ValidDefaultValueLiteral(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   25

       result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);

   22

       if (result || diagnostics != null)

   26

       if (result || diagnostics != null)

   23

       result &= validateETypedElement_ValidType(eOperation, diagnostics, context);

   23 | result &= validateETypedElement_ValidType(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateETypedElement_ValidType(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   27 | result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEReference_ConsistentOpposite(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   27

       result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);

   24

       if (result || diagnostics != null)

   28

       if (result || diagnostics != null)

   25

       result &= validateEOperation_UniqueParameterNames(eOperation, diagnostics, context);

   25 | result &= validateEOperation_UniqueParameterNames(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEOperation_UniqueParameterNames(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   29 | result &= validateEReference_SingleContainer(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEReference_SingleContainer(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   29

       result &= validateEReference_SingleContainer(eReference, diagnostics, context);

   26

       if (result || diagnostics != null)

   30

       if (result || diagnostics != null)

   27

       result &= validateEOperation_UniqueTypeParameterNames(eOperation, diagnostics, context);

   27 | result &= validateEOperation_UniqueTypeParameterNames(eOperation, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEOperation_UniqueTypeParameterNames(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   31 | result &= validateEReference_ConsistentKeys(eReference, diagnostics, context);

   Preondition Violations
   Unmatched statement result&=validateEReference_ConsistentKeys(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted

   31

       result &= validateEReference_ConsistentKeys(eReference, diagnostics, context);

   Precondition Violations (24)
   Row | Violation
   --- | ---
   1 | Unmatched statement result&=validate_EveryReferenceIsContained(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   2 | Unmatched statement result&=validate_UniqueID(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   3 | Unmatched statement result&=validate_EveryProxyResolves(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   4 | Unmatched statement result&=validate_EveryKeyUnique(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   5 | Unmatched statement result&=validate_UniqueID(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   6 | Unmatched statement result&=validate_EveryMapEntryUnique(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   7 | Unmatched statement result&=validate_EveryKeyUnique(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   8 | Unmatched statement result&=validateENamedElement_WellFormedName(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   9 | Unmatched statement result&=validate_EveryMapEntryUnique(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   10 | Unmatched statement result&=validateETypedElement_ValidLowerBound(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   11 | Unmatched statement result&=validateENamedElement_WellFormedName(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   12 | Unmatched statement result&=validateETypedElement_ValidUpperBound(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   13 | Unmatched statement result&=validateETypedElement_ValidLowerBound(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   14 | Unmatched statement result&=validateETypedElement_ConsistentBounds(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   15 | Unmatched statement result&=validateETypedElement_ValidUpperBound(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   16 | Unmatched statement result&=validateETypedElement_ValidType(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   17 | Unmatched statement result&=validateETypedElement_ConsistentBounds(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   18 | Unmatched statement result&=validateEStructuralFeature_ValidDefaultValueLiteral(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   19 | Unmatched statement result&=validateETypedElement_ValidType(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   20 | Unmatched statement result&=validateEReference_ConsistentOpposite(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   21 | Unmatched statement result&=validateEOperation_UniqueParameterNames(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   22 | Unmatched statement result&=validateEReference_SingleContainer(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   23 | Unmatched statement result&=validateEOperation_UniqueTypeParameterNames(eOperation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
   24 | Unmatched statement result&=validateEReference_ConsistentKeys(eReference,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted