1454-1-4

Mapping getNestedIn() { if (eContainerFeatureID != MappingPackage.MAPPING__NESTED_IN) return null; return (Mapping)eContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetNestedIn(Mapping newNestedIn, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newNestedIn, MappingPackage.MAPPING__NESTED_IN, msgs); return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setNestedIn(Mapping newNestedIn) { if (newNestedIn != eInternalContainer() || (eContainerFeatureID != MappingPackage.MAPPING__NESTED_IN && newNestedIn != null)) { if (EcoreUtil.isAncestor(this, newNestedIn)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newNestedIn != null) msgs = ((InternalEObject)newNestedIn).eInverseAdd(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs); msgs = basicSetNestedIn(newNestedIn, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING__NESTED_IN, newNestedIn, newNestedIn)); }
MappingHelper getNestedIn() { if (eContainerFeatureID != MappingPackage.MAPPING_HELPER__NESTED_IN) return null; return (MappingHelper)eContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetNestedIn(MappingHelper newNestedIn, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newNestedIn, MappingPackage.MAPPING_HELPER__NESTED_IN, msgs); return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setNestedIn(MappingHelper newNestedIn) { if (newNestedIn != eInternalContainer() || (eContainerFeatureID != MappingPackage.MAPPING_HELPER__NESTED_IN && newNestedIn != null)) { if (EcoreUtil.isAncestor(this, newNestedIn)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newNestedIn != null) msgs = ((InternalEObject)newNestedIn).eInverseAdd(this, MappingPackage.MAPPING_HELPER__NESTED, MappingHelper.class, msgs); msgs = basicSetNestedIn(newNestedIn, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING_HELPER__NESTED_IN, newNestedIn, newNestedIn)); }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingHelperImpl.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    Mapping getNestedIn()↵

1

    MappingHelper getNestedIn()↵

2

      {↵

2

      {↵

3

        if (eContainerFeatureID != MappingPackage.MAPPING__NESTED_IN) return null;↵

3

        if (eContainerFeatureID != MappingPackage.MAPPING_HELPER__NESTED_IN) return null;↵

4

        return (Mapping)eContainer();↵

4

        return (MappingHelper)eContainer();↵

5

      }↵

5

      }↵

6

      /**↵

6

      /**↵

7

       * <!-- begin-user-doc -->↵

7

       * <!-- begin-user-doc -->↵

8

       * <!-- end-user-doc -->↵

8

       * <!-- end-user-doc -->↵

9

       * @generated↵

9

       * @generated↵

10

       */↵

10

       */↵

11

      public NotificationChain basicSetNestedIn(Mapping newNestedIn, NotificationChain msgs)↵

11

      public NotificationChain basicSetNestedIn(MappingHelper newNestedIn, NotificationChain msgs)↵

12

      {↵

12

      {↵

13

        msgs = eBasicSetContainer((InternalEObject)newNestedIn, MappingPackage.MAPPING__NESTED_IN, msgs);↵

13

        msgs = eBasicSetContainer((InternalEObject)newNestedIn, MappingPackage.MAPPING_HELPER__NESTED_IN, msgs);↵

14

        return msgs;↵

14

        return msgs;↵

15

      }↵

15

      }↵

16

      /**↵

16

      /**↵

17

       * <!-- begin-user-doc -->↵

17

       * <!-- begin-user-doc -->↵

18

       * <!-- end-user-doc -->↵

18

       * <!-- end-user-doc -->↵

19

       * @generated↵

19

       * @generated↵

20

       */↵

20

       */↵

21

      public void setNestedIn(Mapping newNestedIn)↵

21

      public void setNestedIn(MappingHelper newNestedIn)↵

22

      {↵

22

      {↵

23

        if (newNestedIn != eInternalContainer() || (eContainerFeatureID != MappingPackage.MAPPING__NESTED_IN && newNestedIn != null))↵

23

        if (newNestedIn != eInternalContainer() || (eContainerFeatureID != MappingPackage.MAPPING_HELPER__NESTED_IN && newNestedIn != null))↵

24

        {↵

24

        {↵

25

          if (EcoreUtil.isAncestor(this, newNestedIn))↵

25

          if (EcoreUtil.isAncestor(this, newNestedIn))↵

26

            throw new IllegalArgumentException("Recursive containment not allowed for " + toString());↵

26

            throw new IllegalArgumentException("Recursive containment not allowed for " + toString());↵

27

          NotificationChain msgs = null;↵

27

          NotificationChain msgs = null;↵

28

          if (eInternalContainer() != null)↵

28

          if (eInternalContainer() != null)↵

29

            msgs = eBasicRemoveFromContainer(msgs);↵

29

            msgs = eBasicRemoveFromContainer(msgs);↵

30

          if (newNestedIn != null)↵

30

          if (newNestedIn != null)↵

31

            msgs = ((InternalEObject)newNestedIn).eInverseAdd(this, MappingPackage.MAPPING__NESTED, Mapping.class, msgs);↵

31

            msgs = ((InternalEObject)newNestedIn).eInverseAdd(this, MappingPackage.MAPPING_HELPER__NESTED, MappingHelper.class, msgs);↵

32

          msgs = basicSetNestedIn(newNestedIn, msgs);↵

32

          msgs = basicSetNestedIn(newNestedIn, msgs);↵

33

          if (msgs != null) msgs.dispatch();↵

33

          if (msgs != null) msgs.dispatch();↵

34

        }↵

34

        }↵

35

        else if (eNotificationRequired())↵

35

        else if (eNotificationRequired())↵

36

          eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING__NESTED_IN, newNestedIn, newNestedIn));↵

36

          eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.MAPPING_HELPER__NESTED_IN, newNestedIn, newNestedIn));↵

37

      }

37

      }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0