boolean result = validate_EveryMultiplicityConforms(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryProxyResolves(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_UniqueID(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryKeyUnique(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eAnnotation, diagnostics, context); if (result || diagnostics != null) result &= validateEAnnotation_WellFormedSourceURI(eAnnotation, diagnostics, context);
boolean result = validate_EveryMultiplicityConforms(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);
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 validateEAnnotation(EAnnotation, DiagnosticChain, Map) Method name: boolean validateEReference(EReference, DiagnosticChain, Map)
Number of AST nodes: 15 Number of AST nodes: 15
1
boolean result = validate_EveryMultiplicityConforms(eAnnotation, diagnostics, context);
1
boolean result = validate_EveryMultiplicityConforms(eReference, diagnostics, context);
2
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eAnnotation, diagnostics, context);
2
    if (result || diagnostics != null) result &= validate_EveryDataValueConforms(eReference, diagnostics, context);
3
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eAnnotation, diagnostics, context);
3
    if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(eReference, diagnostics, context);
4
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(eAnnotation, diagnostics, context);
4
    if (result || diagnostics != null) result &= validate_EveryProxyResolves(eReference, diagnostics, context);
5
    if (result || diagnostics != null) result &= validate_UniqueID(eAnnotation, diagnostics, context);
5
    if (result || diagnostics != null) result &= validate_UniqueID(eReference, diagnostics, context);
6
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(eAnnotation, diagnostics, context);
6
    if (result || diagnostics != null) result &= validate_EveryKeyUnique(eReference, diagnostics, context);
7
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eAnnotation, diagnostics, context);
7
    if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);
8
    if (result || diagnostics != null) result &= validateEAnnotation_WellFormedSourceURI(eAnnotation, diagnostics, context);
8
    if (result || diagnostics != null) result &= validateENamedElement_WellFormedName(eReference, 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)5.2
Clones locationClones are declared in the same class
Number of node comparisons134
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)530.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    boolean result = validate_EveryMultiplicityConforms(eAnnotation, diagnostics, context);
    1
    boolean result = validate_EveryMultiplicityConforms(eAnnotation, diagnostics, context);
    1
    boolean result = validate_EveryMultiplicityConforms(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    1
    boolean result = validate_EveryMultiplicityConforms(eReference, diagnostics, context);
    2
    if (result || diagnostics != null)
    2
    if (result || diagnostics != null)
    3
    result &= validate_EveryDataValueConforms(eAnnotation, diagnostics, context);
    3
    result &= validate_EveryDataValueConforms(eAnnotation, diagnostics, context);
    3
    result &= validate_EveryDataValueConforms(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    3
    result &= validate_EveryDataValueConforms(eReference, diagnostics, context);
    4
    if (result || diagnostics != null)
    4
    if (result || diagnostics != null)
    5
    result &= validate_EveryReferenceIsContained(eAnnotation, diagnostics, context);
    5
    result &= validate_EveryReferenceIsContained(eAnnotation, diagnostics, context);
    5
    result &= validate_EveryReferenceIsContained(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    5
    result &= validate_EveryReferenceIsContained(eReference, diagnostics, context);
    6
    if (result || diagnostics != null)
    6
    if (result || diagnostics != null)
    7
    result &= validate_EveryProxyResolves(eAnnotation, diagnostics, context);
    7
    result &= validate_EveryProxyResolves(eAnnotation, diagnostics, context);
    7
    result &= validate_EveryProxyResolves(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    7
    result &= validate_EveryProxyResolves(eReference, diagnostics, context);
    8
    if (result || diagnostics != null)
    8
    if (result || diagnostics != null)
    9
    result &= validate_UniqueID(eAnnotation, diagnostics, context);
    9
    result &= validate_UniqueID(eAnnotation, diagnostics, context);
    9
    result &= validate_UniqueID(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    9
    result &= validate_UniqueID(eReference, diagnostics, context);
    10
    if (result || diagnostics != null)
    10
    if (result || diagnostics != null)
    11
    result &= validate_EveryKeyUnique(eAnnotation, diagnostics, context);
    11
    result &= validate_EveryKeyUnique(eAnnotation, diagnostics, context);
    11
    result &= validate_EveryKeyUnique(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    11
    result &= validate_EveryKeyUnique(eReference, diagnostics, context);
    12
    if (result || diagnostics != null)
    12
    if (result || diagnostics != null)
    13
    result &= validate_EveryMapEntryUnique(eAnnotation, diagnostics, context);
    13
    result &= validate_EveryMapEntryUnique(eAnnotation, diagnostics, context);
    13
    result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    eAnnotationeReferenceVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EAnnotationorg.eclipse.emf.ecore.EReferenceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    • Make classes org.eclipse.emf.ecore.EAnnotation and org.eclipse.emf.ecore.EReference extend a common superclass
    13
    result &= validate_EveryMapEntryUnique(eReference, diagnostics, context);
    14
    if (result || diagnostics != null)
    14
    if (result || diagnostics != null)
                                                                                                                                                                      
    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);
    15
    result &= validateEAnnotation_WellFormedSourceURI(eAnnotation, diagnostics, context);
    15
    result &= validateEAnnotation_WellFormedSourceURI(eAnnotation, diagnostics, context);
    Preondition Violations
    Unmatched statement result&=validateEAnnotation_WellFormedSourceURI(eAnnotation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                              
    Precondition Violations (9)
    Row Violation
    1Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    2Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    3Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    4Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    5Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    6Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    7Type org.eclipse.emf.ecore.EAnnotation of variable eAnnotation does not match with type org.eclipse.emf.ecore.EReference of variable eReference
    8Unmatched 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
    9Unmatched statement result&=validateEAnnotation_WellFormedSourceURI(eAnnotation,diagnostics,context); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted