if (result || diagnostics != null) result &= validateETypedElement_ValidType(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);
if (result || diagnostics != null) result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context); if (result || diagnostics != null) result &= validateEReference_SingleContainer(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 validateEReference(EReference, DiagnosticChain, Map) Method name: boolean validateEReference(EReference, DiagnosticChain, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (result || diagnostics != null) result &= validateETypedElement_ValidType(eReference, diagnostics, context);
1
if (result || diagnostics != null) result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);
2
    if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);
2
    if (result || diagnostics != null) result &= validateEReference_SingleContainer(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)0.4
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)595.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    if (result || diagnostics != null)
    26
    if (result || diagnostics != null)
    23
    result &= validateETypedElement_ValidType(eReference, diagnostics, context);
    23
    result &= validateETypedElement_ValidType(eReference, diagnostics, context);
    27
    result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    validateETypedElement_ValidTypevalidateEReference_ConsistentOppositeMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validateETypedElement_ValidType(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validateEReference_ConsistentOpposite(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27
    result &= validateEReference_ConsistentOpposite(eReference, diagnostics, context);
    24
    if (result || diagnostics != null)
    28
    if (result || diagnostics != null)
    25
    result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);
    25
    result &= validateEStructuralFeature_ValidDefaultValueLiteral(eReference, diagnostics, context);
    29
    result &= validateEReference_SingleContainer(eReference, diagnostics, context);
    Differences
    Expression1Expression2Difference
    validateEStructuralFeature_ValidDefaultValueLiteralvalidateEReference_SingleContainerMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validateEStructuralFeature_ValidDefaultValueLiteral(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validateEReference_SingleContainer(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29
    result &= validateEReference_SingleContainer(eReference, diagnostics, context);
    Precondition Violations (4)
    Row Violation
    1Expression validateETypedElement_ValidType(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression validateEReference_ConsistentOpposite(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression validateEStructuralFeature_ValidDefaultValueLiteral(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression validateEReference_SingleContainer(eReference,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted