if (oldValue != null) { InternalEObject internalEObject = (InternalEObject)oldValue; notifications = internalEObject.eInverseRemove (owner, internalEObject.eClass().getFeatureID(inverseFeature), null, notifications); } if (newValue != null) { InternalEObject internalEObject = (InternalEObject)newValue; notifications = internalEObject.eInverseAdd (owner, internalEObject.eClass().getFeatureID(inverseFeature), null, notifications); }
if (oldValue != null) { if (hasInverse()) { InternalEObject internalEObject = (InternalEObject)oldValue; notifications = internalEObject.eInverseRemove (owner, internalEObject.eClass().getFeatureID(inverseFeature), null, notifications); } else if (isContainment()) { notifications = ((InternalEObject)oldValue).eInverseRemove (owner, InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature), null, notifications); } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java
Method name: void dynamicSet(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int, Object) Method name: void dynamicUnset(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (oldValue != null)
1
if (oldValue != null)
2
      
2
      {
3
    {
3
    
4
    
4
    if (hasInverse())
5
        {
5
        InternalEObject internalEObject = (InternalEObject)oldValue;
6
          InternalEObject internalEObject = (InternalEObject)oldValue;
6
            notifications = 
7
          notifications = 
7
              internalEObject.eInverseRemove
8
            internalEObject.eInverseRemove
8
                (owner,
9
              (owner,
9
                 internalEObject.eClass().getFeatureID(inverseFeature),
10
               internalEObject.eClass().getFeatureID(inverseFeature),
10
                 null,
11
               null,
11
                 notifications);
12
               notifications);
12
          }
13
        }
13
          if (newValue != null)
14
        else if (isContainment())
14
          {
15
        {
15
            InternalEObject internalEObject = (InternalEObject)newValue;
16
            notifications =
16
          notifications = 
17
              internalEObject.eInverseAdd
17
            ((InternalEObject)oldValue).eInverse
18
  
18
Remove
19
              (owner,
19
              (owner,
20
                 internalEObject.eClass().getFeatureID(inverseFeature),
20
               InternalEObject.EOPPOSITE_FEATURE_BASE - owner.eClass().getFeatureID(feature),
21
                 null,
21
               null,
22
                 notifications);
22
               notifications);
23
    
23
        }
24
      }
24
      }
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 comparisons4