for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (object.equals(entry.getValue())) { remove(i); return true; } } }
for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (entry.getValue() == null) { remove(i); return true; } } }
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/util/BasicFeatureMap.java
Method name: boolean remove(EStructuralFeature, Object) Method name: boolean remove(EStructuralFeature, Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
for (int i = 0; i < size; ++i)
1
for (int i = 0; i < size; ++i)
2
      {
2
      {
3
        Entry entry = entries[i];
3
        Entry entry = entries[i];
4
        if (validator.isValid(entry.getEStructuralFeature()))
4
        if (validator.isValid(entry.getEStructuralFeature()))
5
        {
5
        {
6
          if (object.equals(entry.getValue()))
6
          if (entry.getValue() == null)
7
          {
7
          {
8
            remove(i);
8
            remove(i);
9
            return true;
9
            return true;
10
          }
10
          }
11
        }
11
        }
12
      }
12
      }
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 the same method
Number of node comparisons1