10644-2-5

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_EveryReferenceIsContained(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validate_UniqueID(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidLowerBound(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ValidType(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateEAttribute_ConsistentTransient(eAttribute, 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 validateEAttribute(EAttribute, 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_EveryReferenceIsContained(eAttribute, diagnostics, context);↵

2

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

2

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

3

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

3

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

4

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

4

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

5

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

5

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

6

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

6

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

7

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

7

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

8

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

8

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

9

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

9

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

10

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

10

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

11

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

11

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

12

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

12

        if (result || diagnostics != null) result &= validateEAttribute_ConsistentTransient(eAttribute, 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) | 7.9
Clones location | Clones are declared in the same class
Number of node comparisons | 378

1. {Non-refactorable}

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

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

   4

       if (result || diagnostics != null)

   4

       if (result || diagnostics != null)

   5

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   5

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

   6

       if (result || diagnostics != null)

   6

       if (result || diagnostics != null)

   7

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   7

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

   8

       if (result || diagnostics != null)

   8

       if (result || diagnostics != null)

   9

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   9

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

   10

       if (result || diagnostics != null)

   10

       if (result || diagnostics != null)

   11

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   11

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

   12

       if (result || diagnostics != null)

   12

       if (result || diagnostics != null)

   13

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   13

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

   14

       if (result || diagnostics != null)

   14

       if (result || diagnostics != null)

   15

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   15

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

   16

       if (result || diagnostics != null)

   16

       if (result || diagnostics != null)

   17

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   17

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

   18

       if (result || diagnostics != null)

   18

       if (result || diagnostics != null)

   19

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   19

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

   20

       if (result || diagnostics != null)

   20

       if (result || diagnostics != null)

   21

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   21

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

   22

       if (result || diagnostics != null)

   22

       if (result || diagnostics != null)

   23

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

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

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   eOperation | eAttribute | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EOperation | org.eclipse.emf.ecore.EAttribute | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   - Make classes org.eclipse.emf.ecore.EOperation and org.eclipse.emf.ecore.EAttribute extend a common superclass

   23

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

   24

       if (result || diagnostics != null)

   24

       if (result || diagnostics != null)

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

   Preondition Violations
   Unmatched statement result&=validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute,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(eAttribute, diagnostics, context);

   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

   26

       if (result || diagnostics != null)

   26

       if (result || diagnostics != null)

   27 | result &= validateEAttribute_ConsistentTransient(eAttribute, diagnostics, context);

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

   27

       result &= validateEAttribute_ConsistentTransient(eAttribute, diagnostics, context);

   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

   Precondition Violations (14)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   2 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   3 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   4 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   5 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   6 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   7 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   8 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   9 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   10 | Type org.eclipse.emf.ecore.EOperation of variable eOperation does not match with type org.eclipse.emf.ecore.EAttribute of variable eAttribute
   11 | Unmatched statement result&=validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute,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&=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
   13 | Unmatched statement result&=validateEAttribute_ConsistentTransient(eAttribute,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&=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