FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature); for (int i = 0, size = delegateSize(); i < size; ++i) { Entry otherEntry = delegateGet(i); if (validator.isValid(otherEntry.getEStructuralFeature())) { throw new IllegalArgumentException("The multiplicity constraint is violated"); } }
FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature); for (int i = 0, size = delegateSize(); i < size; ++i) { Entry otherEntry = delegateGet(i); if (validator.isValid(otherEntry.getEStructuralFeature()) && i != index) { throw new IllegalArgumentException("The multiplicity constraint is violated"); } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
Method name: void add(int, Entry) Method name: Entry set(int, Entry)
Number of AST nodes: 5 Number of AST nodes: 5
1
FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature);
1
FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), entryFeature);
2
      for (int i = 0, size = delegateSize(); i < size; ++i)
2
      for (int i = 0, size = delegateSize(); i < size; ++i)
3
      {
3
      {
4
        Entry otherEntry = delegateGet(i);
4
        Entry otherEntry = delegateGet(i);
5
        if (validator.isValid(otherEntry.getEStructuralFeature()))
5
        if (validator.isValid(otherEntry.getEStructuralFeature()) && i != index)
6
        {
6
        {
7
          throw new IllegalArgumentException("The multiplicity constraint is violated");
7
          throw new IllegalArgumentException("The multiplicity constraint is violated");
8
        }
8
        }
9
      }
9
      }
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