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> allAttributes = getAllAttributes(eClass); for (int i = 0, size = allAttributes.size(); i < size; ++i) { EStructuralFeature result = allAttributes.get(i); if (matches(getWildcards(result), namespace)) { return result; } } return null;
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 getAttributeWildcardAffiliation(EClass, String, String)
Number of AST nodes: 6 Number of AST nodes: 6
1
List<EAttribute> eAllAttributes = eClass.getEAllAttributes();
1
List<EStructuralFeature> allAttributes = getAllAttributes(
2
    
2
eClass);
3
    for (int i = 0, size = eAllAttributes.size(); i < size; ++i)
3
    for (int i = 0, size = allAttributes.size(); i < size; ++i)
4
        {
4
    
5
          EAttribute eAttribute
5
{
6
 = eAllAttributes.get(i);
6
      EStructuralFeature result = allAttributes.get(i);
7
          if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE)
7
      if (
8
    
8
matches(getWildcards(result), namespace))
9
      {
9
      {
10
            return eAttribute;
10
        return 
11
          }
12
   
11
result;
12
      }
13
     }
13
    }
14
    
15
    break;
14
    return null;
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