EClass documentRoot = getDocumentRoot(ePackage); if (documentRoot != null) { return getLocalElement(documentRoot, namespace, name); }
EClass documentRoot = getDocumentRoot(ePackage); if (documentRoot != null) { return getLocalAttribute(documentRoot, namespace, name); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: EStructuralFeature getElement(String, String) Method name: EStructuralFeature getAttribute(String, String)
Number of AST nodes: 3 Number of AST nodes: 3
1
EClass documentRoot = getDocumentRoot(ePackage);
1
EClass documentRoot = getDocumentRoot(ePackage);
2
      if (documentRoot != null)
2
      if (documentRoot != null)
3
      {
3
      {
4
        return getLocalElement(documentRoot, namespace, name);
4
        return getLocalAttribute(documentRoot, namespace, name);
5
      }
5
      }
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.1
Clones locationClones are declared in the same class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)91.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    EClass documentRoot = getDocumentRoot(ePackage);
    3
    EClass documentRoot = getDocumentRoot(ePackage);
    4
    if (documentRoot != null)
    4
    if (documentRoot != null)
    5
    return getLocalElement(documentRoot, namespace, name);
    5
    return getLocalElement(documentRoot, namespace, name);
    5
    return getLocalAttribute(documentRoot, namespace, name);
    Differences
    Expression1Expression2Difference
    getLocalElementgetLocalAttributeMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression getLocalElement(documentRoot,namespace,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression getLocalAttribute(documentRoot,namespace,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    return getLocalAttribute(documentRoot, namespace, name);
    Precondition Violations (2)
    Row Violation
    1Expression getLocalElement(documentRoot,namespace,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression getLocalAttribute(documentRoot,namespace,name) cannot be parameterized, because it has dependencies to/from statements that will be extracted