EStructuralFeature result = allAttributes.get(i); if (matches(getWildcards(result), namespace)) { return result; }
EReference eReference = eAllReferences.get(i); if ("xsi:schemaLocation".equals(getName(eReference))) { return eReference; }
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 getAttributeWildcardAffiliation(EClass, String, String) Method name: EReference getXSISchemaLocationMapFeature(EClass)
Number of AST nodes: 3 Number of AST nodes: 3
1
EStructuralFeature result = allAttributes.get(i);
1
EReference eReference = eAllReferences.get(i);
2
      if (matches(getWildcards(result), namespace))
2
        if ("xsi:schemaLocation".equals(getName(eReference)))
3
      {
3
        {
4
        return result;
4
          return 
5
eReference;
5
      }
6
        }
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 declared in the same class
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)9.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    EStructuralFeature result = allAttributes.get(i);
    3
    EStructuralFeature result = allAttributes.get(i);
    Preondition Violations
    Unmatched statement EStructuralFeature result=allAttributes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                        
                                                                                                  
    4
    EReference eReference = eAllReferences.get(i);
    Preondition Violations
    Unmatched statement EReference eReference=eAllReferences.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    EReference eReference = eAllReferences.get(i);
    4
    if (matches(getWildcards(result), namespace))
    4
    if (matches(getWildcards(result), namespace))
    5
    if ("xsi:schemaLocation".equals(getName(eReference)))
    Differences
    Expression1Expression2Difference
    matchesequalsMETHOD_INVOCATION_NAME_MISMATCH
    matches(getWildcards(result),namespace)"xsi:schemaLocation".equals(getName(eReference))ARGUMENT_NUMBER_MISMATCH
    "xsi:schemaLocation"MISSING_METHOD_INVOCATION_EXPRESSION
    5
    if ("xsi:schemaLocation".equals(getName(eReference)))
    5
    return result;
    5
    return result;
    Preondition Violations
    Unmatched return result;
                                      
                                              
    6
    return eReference;
    Preondition Violations
    Unmatched return eReference;
    6
    return eReference;
    Precondition Violations (4)
    Row Violation
    1Unmatched statement EStructuralFeature result=allAttributes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement EReference eReference=eAllReferences.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return result;
    4Unmatched return eReference;