if (result || theDiagnostics != null) { result &= validate_EveryDataValueConforms(object, theDiagnostics, context); } if (result || theDiagnostics != null) { result &= validate_UniqueID(object, theDiagnostics, context); }
if (result || theDiagnostics != null) { result &= validate_EveryKeyUnique(object, theDiagnostics, context); } if (result || theDiagnostics != null) { result &= validate_EveryMapEntryUnique(object, theDiagnostics, context); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java
Method name: boolean validate_EveryDefaultConstraint(EObject, DiagnosticChain, Map) Method name: boolean validate_EveryDefaultConstraint(EObject, DiagnosticChain, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (result || theDiagnostics != null)
1
if (result || theDiagnostics != null)
2
    {
2
    {
3
      result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
3
      result &= validate_EveryKeyUnique(object, theDiagnostics, context);
4
    }
4
    }
5
    if (result || theDiagnostics != null)
5
    if (result || theDiagnostics != null)
6
    {
6
    {
7
      result &= validate_UniqueID(object, theDiagnostics, context);
7
      result &= validate_EveryMapEntryUnique(object, theDiagnostics, context);
8
    }
8
    }
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)0.3
Clones locationClones are in the same method
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)137.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    if (result || theDiagnostics != null)
    10
    if (result || theDiagnostics != null)
    7
    result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
    7
    result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
    11
    result &= validate_EveryKeyUnique(object, theDiagnostics, context);
    Differences
    Expression1Expression2Difference
    validate_EveryDataValueConformsvalidate_EveryKeyUniqueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validate_EveryDataValueConforms(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validate_EveryKeyUnique(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    result &= validate_EveryKeyUnique(object, theDiagnostics, context);
    8
    if (result || theDiagnostics != null)
    12
    if (result || theDiagnostics != null)
    9
    result &= validate_UniqueID(object, theDiagnostics, context);
    9
    result &= validate_UniqueID(object, theDiagnostics, context);
    13
    result &= validate_EveryMapEntryUnique(object, theDiagnostics, context);
    Differences
    Expression1Expression2Difference
    validate_UniqueIDvalidate_EveryMapEntryUniqueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validate_UniqueID(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validate_EveryMapEntryUnique(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    result &= validate_EveryMapEntryUnique(object, theDiagnostics, context);
    Precondition Violations (4)
    Row Violation
    1Expression validate_EveryDataValueConforms(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression validate_EveryKeyUnique(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression validate_UniqueID(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression validate_EveryMapEntryUnique(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted