1185-1-2

T doSwitch(EObject theEObject) { return doSwitch(theEObject.eClass(), theEObject); } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ protected T doSwitch(EClass theEClass, EObject theEObject) { if (theEClass.eContainer() == modelPackage) { return doSwitch(theEClass.getClassifierID(), theEObject); } else { List<EClass> eSuperTypes = theEClass.getESuperTypes(); return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); } } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case Ecore2XMLPackage.XML_INFO: { XMLInfo xmlInfo = (XMLInfo)theEObject; T result = caseXMLInfo(xmlInfo); if (result == null) result = defaultCase(theEObject); return result; } case Ecore2XMLPackage.XML_MAP: { XMLMap xmlMap = (XMLMap)theEObject; T result = caseXMLMap(xmlMap); if (result == null) result = defaultCase(theEObject); return result; } case Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY: { @SuppressWarnings("unchecked") Map.Entry<ENamedElement, XMLInfo> eNamedElementToXMLInfoMapEntry = (Map.Entry<ENamedElement, XMLInfo>)theEObject; T result = caseENamedElementToXMLInfoMapEntry(eNamedElementToXMLInfoMapEntry); if (result == null) result = defaultCase(theEObject); return result; }
T doSwitch(EObject theEObject) { return doSwitch(theEObject.eClass(), theEObject); } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ protected T doSwitch(EClass theEClass, EObject theEObject) { if (theEClass.eContainer() == modelPackage) { return doSwitch(theEClass.getClassifierID(), theEObject); } else { List<EClass> eSuperTypes = theEClass.getESuperTypes(); return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); } } /** * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case ChangePackage.CHANGE_DESCRIPTION: { ChangeDescription changeDescription = (ChangeDescription)theEObject; T result = caseChangeDescription(changeDescription); if (result == null) result = defaultCase(theEObject); return result; } case ChangePackage.EOBJECT_TO_CHANGES_MAP_ENTRY: { @SuppressWarnings("unchecked") Map.Entry<EObject, EList<FeatureChange>> eObjectToChangesMapEntry = (Map.Entry<EObject, EList<FeatureChange>>)theEObject; T result = caseEObjectToChangesMapEntry(eObjectToChangesMapEntry); if (result == null) result = defaultCase(theEObject); return result; } case ChangePackage.FEATURE_CHANGE: { FeatureChange featureChange = (FeatureChange)theEObject; T result = caseFeatureChange(featureChange); if (result == null) result = defaultCase(theEObject); return result; }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/util/Ecore2XMLSwitch.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/util/ChangeSwitch.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    T doSwitch(EObject theEObject)↵

1

    T doSwitch(EObject theEObject)↵

2

      {↵

2

      {↵

3

        return doSwitch(theEObject.eClass(), theEObject);↵

3

        return doSwitch(theEObject.eClass(), theEObject);↵

4

      }↵

4

      }↵

5

      /**↵

5

      /**↵

6

       * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.↵

6

       * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.↵

7

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

7

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

8

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

8

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

9

       * @return the first non-null result returned by a <code>caseXXX</code> call.↵

9

       * @return the first non-null result returned by a <code>caseXXX</code> call.↵

10

       * @generated↵

10

       * @generated↵

11

       */↵

11

       */↵

12

      protected T doSwitch(EClass theEClass, EObject theEObject)↵

12

      protected T doSwitch(EClass theEClass, EObject theEObject)↵

13

      {↵

13

      {↵

14

        if (theEClass.eContainer() == modelPackage)↵

14

        if (theEClass.eContainer() == modelPackage)↵

15

        {↵

15

        {↵

16

          return doSwitch(theEClass.getClassifierID(), theEObject);↵

16

          return doSwitch(theEClass.getClassifierID(), theEObject);↵

17

        }↵

17

        }↵

18

        else↵

18

        else↵

19

        {↵

19

        {↵

20

          List<EClass> eSuperTypes = theEClass.getESuperTypes();↵

20

          List<EClass> eSuperTypes = theEClass.getESuperTypes();↵

21

          return↵

21

          return↵

22

            eSuperTypes.isEmpty() ?↵

22

            eSuperTypes.isEmpty() ?↵

23

              defaultCase(theEObject) :↵

23

              defaultCase(theEObject) :↵

24

              doSwitch(eSuperTypes.get(0), theEObject);↵

24

              doSwitch(eSuperTypes.get(0), theEObject);↵

25

        }↵

25

        }↵

26

      }↵

26

      }↵

27

      /**↵

27

      /**↵

28

       * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.↵

28

       * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.↵

29

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

29

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

30

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

30

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

31

       * @return the first non-null result returned by a <code>caseXXX</code> call.↵

31

       * @return the first non-null result returned by a <code>caseXXX</code> call.↵

32

       * @generated↵

32

       * @generated↵

33

       */↵

33

       */↵

34

      protected T doSwitch(int classifierID, EObject theEObject)↵

34

      protected T doSwitch(int classifierID, EObject theEObject)↵

35

      {↵

35

      {↵

36

        switch (classifierID)↵

36

        switch (classifierID)↵

37

        {↵

37

        {↵

38

          case Ecore2XMLPackage.XML_INFO:↵

38

          case ↵

39

          {↵

40

            XMLInfo xmlInfo = (XMLInfo↵

39

    ChangePackage.CHANGE_DESCRIPTION:↵

40

          {↵

41

    )theEObject;↵

41

            ChangeDescription changeDescription = (ChangeDescription)theEObject;↵

42

            T result = caseXMLInfo(xmlInfo);↵

42

            T result = caseChangeDescription(changeDescription);↵

43

            if (result == null) result = defaultCase(theEObject);↵

43

            if (result == null) result = defaultCase(theEObject);↵

44

            return result;↵

44

            return result;↵

45

          }↵

45

          }↵

46

          case Ecore2XMLPackage.XML_MAP:↵

46

          case ↵

47

          {↵

48

            XMLMap xmlMap = (XMLMap)theEObject;↵

49

            T result = caseXMLMap(xmlMap↵

47

    ChangePackage.EOBJECT_TO_CHANGES_MAP_ENTRY:↵

48

          {↵

49

            @SuppressWarnings("unchecked") Map.Entry<EObject, EList<FeatureChange>> eObjectToChangesMapEntry = (Map.Entry<EObject, EList<FeatureChange>>)theEObject;↵

50

    );↵

50

            T result = caseEObjectToChangesMapEntry(eObjectToChangesMapEntry);↵

51

            if (result == null) result = defaultCase(theEObject);↵

51

            if (result == null) result = defaultCase(theEObject);↵

52

            return result;↵

52

            return result;↵

53

          }↵

53

          }↵

54

          case Ecore2XMLPackage.ENAMED_ELEMENT_TO_XML_INFO_MAP_ENTRY:↵

54

          case ↵

55

          {↵

56

            @SuppressWarnings("unchecked") Map.Entry<ENamedElement, XMLInfo> eNamedElementToXMLInfoMapEntry = (Map.Entry<ENamedElement, XMLInfo>)theEObject;↵

57

            T result = caseENamedElementToXMLInfoMapEntry(eNamedElementToXMLInfoMapEntry↵

55

    ChangePackage.FEATURE_CHANGE:↵

56

          {↵

57

            FeatureChange featureChange = (FeatureChange)theEObject;↵

58

    );↵

58

            T result = caseFeatureChange(featureChange);↵

59

            if (result == null) result = defaultCase(theEObject);↵

59

            if (result == null) result = defaultCase(theEObject);↵

60

            return result;↵

60

            return result;↵

61

          }

61

          }

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