boolean result = validate_EveryMultiplicityConforms(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_UniqueID(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eStructuralFeature, diagnostics, context); if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eStructuralFeature, diagnostics, context);
boolean result = validate_EveryMultiplicityConforms(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_UniqueID(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eTypeParameter, diagnostics, context); if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eTypeParameter, 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 validateEStructuralFeature(EStructuralFeature, DiagnosticChain, Map) Method name: boolean validateETypeParameter(ETypeParameter, DiagnosticChain, Map)
Number of AST nodes: 15 Number of AST nodes: 15
1
boolean result = validate_EveryMultiplicityConforms(eStructuralFeature, diagnostics, context);
1
boolean result = validate_EveryMultiplicityConforms(eTypeParameter, diagnostics, context);
2
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eStructuralFeature, diagnostics, context);
2
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eTypeParameter, diagnostics, context);
3
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eStructuralFeature, diagnostics, context);
3
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eTypeParameter, diagnostics, context);
4
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(eStructuralFeature, diagnostics, context);
4
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(eTypeParameter, diagnostics, context);
5
    if (result || diagnostics != null) result &= validate_UniqueID(eStructuralFeature, diagnostics, context);
5
    if (result || diagnostics != null) result &= validate_UniqueID(eTypeParameter, diagnostics, context);
6
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(eStructuralFeature, diagnostics, context);
6
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(eTypeParameter, diagnostics, context);
7
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eStructuralFeature, diagnostics, context);
7
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eTypeParameter, diagnostics, context);
8
    if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eStructuralFeature, diagnostics, context);
8
    if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eTypeParameter, diagnostics, context);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)3.2
Clones locationClones are declared in the same class
Number of node comparisons134
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements15
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)462.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    boolean result = validate_EveryMultiplicityConforms(eStructuralFeature, diagnostics, context);
    1
    boolean result = validate_EveryMultiplicityConforms(eStructuralFeature, diagnostics, context);
    1
    boolean result = validate_EveryMultiplicityConforms(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    1
    boolean result = validate_EveryMultiplicityConforms(eTypeParameter, diagnostics, context);
    2
    if (result || diagnostics != null)
    2
    if (result || diagnostics != null)
    3
    result &= validate_EveryDataValueConforms(eStructuralFeature, diagnostics, context);
    3
    result &= validate_EveryDataValueConforms(eStructuralFeature, diagnostics, context);
    3
    result &= validate_EveryDataValueConforms(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    3
    result &= validate_EveryDataValueConforms(eTypeParameter, diagnostics, context);
    4
    if (result || diagnostics != null)
    4
    if (result || diagnostics != null)
    5
    result &= validate_EveryReferenceIsContained(eStructuralFeature, diagnostics, context);
    5
    result &= validate_EveryReferenceIsContained(eStructuralFeature, diagnostics, context);
    5
    result &= validate_EveryReferenceIsContained(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    5
    result &= validate_EveryReferenceIsContained(eTypeParameter, diagnostics, context);
    6
    if (result || diagnostics != null)
    6
    if (result || diagnostics != null)
    7
    result &= validate_EveryProxyResolves(eStructuralFeature, diagnostics, context);
    7
    result &= validate_EveryProxyResolves(eStructuralFeature, diagnostics, context);
    7
    result &= validate_EveryProxyResolves(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    7
    result &= validate_EveryProxyResolves(eTypeParameter, diagnostics, context);
    8
    if (result || diagnostics != null)
    8
    if (result || diagnostics != null)
    9
    result &= validate_UniqueID(eStructuralFeature, diagnostics, context);
    9
    result &= validate_UniqueID(eStructuralFeature, diagnostics, context);
    9
    result &= validate_UniqueID(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    9
    result &= validate_UniqueID(eTypeParameter, diagnostics, context);
    10
    if (result || diagnostics != null)
    10
    if (result || diagnostics != null)
    11
    result &= validate_EveryKeyUnique(eStructuralFeature, diagnostics, context);
    11
    result &= validate_EveryKeyUnique(eStructuralFeature, diagnostics, context);
    11
    result &= validate_EveryKeyUnique(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    11
    result &= validate_EveryKeyUnique(eTypeParameter, diagnostics, context);
    12
    if (result || diagnostics != null)
    12
    if (result || diagnostics != null)
    13
    result &= validate_EveryMapEntryUnique(eStructuralFeature, diagnostics, context);
    13
    result &= validate_EveryMapEntryUnique(eStructuralFeature, diagnostics, context);
    13
    result &= validate_EveryMapEntryUnique(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    13
    result &= validate_EveryMapEntryUnique(eTypeParameter, diagnostics, context);
    14
    if (result || diagnostics != null)
    14
    if (result || diagnostics != null)
    15
    result &= validateENamedElement_WellFormedName(eStructuralFeature, diagnostics, context);
    15
    result &= validateENamedElement_WellFormedName(eStructuralFeature, diagnostics, context);
    15
    result &= validateENamedElement_WellFormedName(eTypeParameter, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eStructuralFeatureeTypeParameterVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EStructuralFeatureorg.eclipse.emf.ecore.ETypeParameterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    • Make classes org.eclipse.emf.ecore.EStructuralFeature and org.eclipse.emf.ecore.ETypeParameter extend a common superclass
    15
    result &= validateENamedElement_WellFormedName(eTypeParameter, diagnostics, context);
    Precondition Violations (8)
    Row Violation
    1Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    2Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    3Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    4Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    5Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    6Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    7Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter
    8Type org.eclipse.emf.ecore.EStructuralFeature of variable eStructuralFeature does not match with type org.eclipse.emf.ecore.ETypeParameter of variable eTypeParameter