List<EAttribute> eAllAttributes = eClass.getEAllAttributes(); for (int i = 0, size = eAllAttributes.size(); i < size; ++i) { EAttribute eAttribute = eAllAttributes.get(i); if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE) { return eAttribute; } } break;
List<EStructuralFeature> allElements = getAllElements(eClass); for (int i = 0, size = allElements.size(); i < size; ++i) { EStructuralFeature result = allElements.get(i); if (matches(getWildcards(result), namespace)) { return result; } }
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: EAttribute getMixedFeature(EClass) Method name: EStructuralFeature getAffiliation(EClass, EStructuralFeature)
Number of AST nodes: 6 Number of AST nodes: 5
1
List<EAttribute> eAllAttributes = eClass.getEAllAttributes();
1
List<EStructuralFeature> allElements = getAllElements(eClass);
2
        for (int i = 0, size = eAllAttributes.size(); i < size; ++i)
2
          for (int i = 0, size = allElements.size(); i < size; ++i)
3
        {
3
          {
4
          EAttribute eAttribute = eAllAttributes.get(i);
4
            EStructuralFeature result = allElements.get(i);
5
          if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE)
5
            if (matches(getWildcards(result), namespace))
6
          {
6
            {
7
            return eAttribute;
7
              return result;
8
          }
8
    
9
        }
9
        }
10
        break;
10
          }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons1