for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue(); } } return null;
for (int i = 0; i < size; ++i) { EAnnotation eAnnotation = eAnnotationArray[i]; if (eAnnotation.getSource() == null) { return eAnnotation; } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EModelElementImpl.java
Method name: Object set(EStructuralFeature, int, Object) Method name: EAnnotation getEAnnotation(String)
Number of AST nodes: 5 Number of AST nodes: 4
1
for (int i = 0; i < size; ++i)
1
for (int i = 0; i < size; ++i)
2
      {
2
            {
3
        Entry entry = entries[i];
3
              EAnnotation eAnnotation = eAnnotationArray[i];
4
        if (validator.isValid(entry.getEStructuralFeature()))
4
              if (eAnnotation.getSource()
5
        {
5
 == null)
6
              {
6
          return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue();
7
                return 
8
eAnnotation;
7
        }
9
              }
8
      }
10
      
9
      return null;
11
      }
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 in different classes
Number of node comparisons1