10644-4-7

if (result || diagnostics != null) result &= validate_EveryProxyResolves(eReference, 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 &= validate_EveryDataValueConforms(eReference, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eReference, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eReference, 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);

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 validateEReference(EReference, 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_EveryDataValueConforms(eReference, diagnostics, context);↵

2

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

1

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

3

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

2

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

4

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

3

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

5

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

4

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

6

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

5

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

7

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

6

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

8

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

7

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

9

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

8

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

10

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

9

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

11

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

10

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

12

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

11

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

12

        if (result || diagnostics != null) result &= validateEReference_SingleContainer(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.1
Clones location | Clones are in the same method
Number of node comparisons | 378

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 24
   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) | 17586.4
   Clone type | Type 2

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

   6

       if (result || diagnostics != null)

   6

       if (result || diagnostics != null)

   7

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

   7

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

   8

       if (result || diagnostics != null)

   8

       if (result || diagnostics != null)

   9

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

   9

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

   10

       if (result || diagnostics != null)

   10

       if (result || diagnostics != null)

   11

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

   11

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

   12

       if (result || diagnostics != null)

   12

       if (result || diagnostics != null)

   13

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

   13

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

   14

       if (result || diagnostics != null)

   14

       if (result || diagnostics != null)

   15

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

   15

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

   16

       if (result || diagnostics != null)

   16

       if (result || diagnostics != null)

   17

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

   17

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

   18

       if (result || diagnostics != null)

   18

       if (result || diagnostics != null)

   19

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

   19

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

   20

       if (result || diagnostics != null)

   20

       if (result || diagnostics != null)

   21

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

   21

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

   22

       if (result || diagnostics != null)

   22

       if (result || diagnostics != null)

   23

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

   23

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

   24

       if (result || diagnostics != null)

   24

       if (result || diagnostics != null)

   25

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

   25

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

   26

       if (result || diagnostics != null)

   4

       if (result || diagnostics != null)

   27

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEReference_ConsistentOpposite | validate_EveryReferenceIsContained | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression validateEReference_ConsistentOpposite(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression validate_EveryReferenceIsContained(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   5

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

   28

       if (result || diagnostics != null)

   2

       if (result || diagnostics != null)

   29

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   validateEReference_SingleContainer | validate_EveryDataValueConforms | METHOD_INVOCATION_NAME_MISMATCH

   Preondition Violations
   Expression validateEReference_SingleContainer(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression validate_EveryDataValueConforms(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   3

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

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression validateEReference_ConsistentOpposite(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression validate_EveryReferenceIsContained(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression validateEReference_SingleContainer(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression validate_EveryDataValueConforms(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted