Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (entry.getEStructuralFeature() == feature) { return super.basicRemove(entry, notifications); } }
Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry otherEntry = entries[i]; if (otherEntry.equals(entry) && i != index) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } }
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: NotificationChain basicAdd(EStructuralFeature, Object, NotificationChain) Method name: Entry set(int, Entry)
Number of AST nodes: 5 Number of AST nodes: 5
1
Entry [] entries = (Entry[])data;
1
Entry [] entries = (Entry[])data;
2
      for (int i = 0; i < size; ++i)
2
        for (int i = 0; i < size; ++i)
3
      {
3
      
4
  {
4
        Entry entry = entries[i];
5
          Entry otherEntry = entries[i];
5
        if (entry.getEStructuralFeature() == feature)
6
          if (otherEntry.equals(entry) && i != index)
6
        {
7
          {
7
          return super.basicRemove(entry, notifications);
8
            throw new IllegalArgumentException("The 'no duplicates' constraint is violated");
8
        }
9
        
10
  }
9
      }
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 declared in the same class
Number of node comparisons1