if (result || theDiagnostics != null) { result &= validate_EveryProxyResolves(object, theDiagnostics, context); } if (result || theDiagnostics != null) { result &= validate_EveryReferenceIsContained(object, theDiagnostics, context); }
if (result || theDiagnostics != null) { result &= validate_EveryDataValueConforms(object, theDiagnostics, context); } if (result || theDiagnostics != null) { result &= validate_UniqueID(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_EveryProxyResolves(object, theDiagnostics, context);
3
      result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
4
    }
4
    }
5
    if (result || theDiagnostics != null)
5
    if (result || theDiagnostics != null)
6
    {
6
    {
7
      result &= validate_EveryReferenceIsContained(object, theDiagnostics, context);
7
      result &= validate_UniqueID(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)113.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (result || theDiagnostics != null)
    6
    if (result || theDiagnostics != null)
    3
    result &= validate_EveryProxyResolves(object, theDiagnostics, context);
    3
    result &= validate_EveryProxyResolves(object, theDiagnostics, context);
    7
    result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
    Differences
    Expression1Expression2Difference
    validate_EveryProxyResolvesvalidate_EveryDataValueConformsMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validate_EveryProxyResolves(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validate_EveryDataValueConforms(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7
    result &= validate_EveryDataValueConforms(object, theDiagnostics, context);
    4
    if (result || theDiagnostics != null)
    8
    if (result || theDiagnostics != null)
    5
    result &= validate_EveryReferenceIsContained(object, theDiagnostics, context);
    5
    result &= validate_EveryReferenceIsContained(object, theDiagnostics, context);
    9
    result &= validate_UniqueID(object, theDiagnostics, context);
    Differences
    Expression1Expression2Difference
    validate_EveryReferenceIsContainedvalidate_UniqueIDMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validate_EveryReferenceIsContained(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validate_UniqueID(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    result &= validate_UniqueID(object, theDiagnostics, context);
    Precondition Violations (4)
    Row Violation
    1Expression validate_EveryProxyResolves(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression validate_EveryDataValueConforms(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression validate_EveryReferenceIsContained(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression validate_UniqueID(object,theDiagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted