if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eAttribute, diagnostics, context);
if (result || diagnostics != null) result &= validateETypedElement_ValidType(eAttribute, diagnostics, context); if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute, 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 validateEAttribute(EAttribute, DiagnosticChain, Map) Method name: boolean validateEAttribute(EAttribute, DiagnosticChain, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (result || diagnostics != null) result &= validateETypedElement_ValidUpperBound(eAttribute, diagnostics, context);
1
if (result || diagnostics != null) result &= validateETypedElement_ValidType(eAttribute, diagnostics, context);
2
    if (result || diagnostics != null) result &= validateETypedElement_ConsistentBounds(eAttribute, diagnostics, context);
2
    if (result || diagnostics != null) result &= validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute, 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)440.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    18
    if (result || diagnostics != null)
    22
    if (result || diagnostics != null)
    19
    result &= validateETypedElement_ValidUpperBound(eAttribute, diagnostics, context);
    19
    result &= validateETypedElement_ValidUpperBound(eAttribute, diagnostics, context);
    23
    result &= validateETypedElement_ValidType(eAttribute, diagnostics, context);
    Differences
    Expression1Expression2Difference
    validateETypedElement_ValidUpperBoundvalidateETypedElement_ValidTypeMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validateETypedElement_ValidUpperBound(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validateETypedElement_ValidType(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23
    result &= validateETypedElement_ValidType(eAttribute, diagnostics, context);
    20
    if (result || diagnostics != null)
    24
    if (result || diagnostics != null)
    21
    result &= validateETypedElement_ConsistentBounds(eAttribute, diagnostics, context);
    21
    result &= validateETypedElement_ConsistentBounds(eAttribute, diagnostics, context);
    25
    result &= validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute, diagnostics, context);
    Differences
    Expression1Expression2Difference
    validateETypedElement_ConsistentBoundsvalidateEStructuralFeature_ValidDefaultValueLiteralMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression validateETypedElement_ConsistentBounds(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25
    result &= validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute, diagnostics, context);
    Precondition Violations (4)
    Row Violation
    1Expression validateETypedElement_ValidUpperBound(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression validateETypedElement_ValidType(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression validateETypedElement_ConsistentBounds(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression validateEStructuralFeature_ValidDefaultValueLiteral(eAttribute,diagnostics,context) cannot be parameterized, because it has dependencies to/from statements that will be extracted