for (IItemPropertyDescriptor itemPropertyDescriptor : getPropertyDescriptors(object)) { if (propertyId.equals(itemPropertyDescriptor.getId(object)) || propertyId.equals(itemPropertyDescriptor.getFeature(object))) { return itemPropertyDescriptor; } } return null;
for (EReference eReference : getChildrenReferences(object)) { // If this object is compatible with this reference... // if (isValidValue(object, child, eReference)) { return eReference; } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemProviderAdapter.java
Method name: IItemPropertyDescriptor getPropertyDescriptor(Object, Object) Method name: EReference getChildReference(Object, Object)
Number of AST nodes: 4 Number of AST nodes: 3
1
for (IItemPropertyDescriptor itemPropertyDescriptor : getPropertyDescriptors(object))
1
for (EReference eReference : getChildrenReferences(object))
2
    {
2
      {
3
      if (propertyId.equals(itemPropertyDescriptor.getId(object)) || propertyId.equals(itemPropertyDescriptor.getFeature(object)
3
        // If this object is compatible with this reference...
4
        //
4
))
5
        if (isValidValue(object, child, eReference))
5
      {
6
      
7
  {
6
        return itemPropertyDescriptor;
8
          return eReference;
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 declared in the same class
Number of node comparisons1