2033-2-3

boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch that delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected MappingSwitch<Adapter> modelSwitch = new MappingSwitch<Adapter>() { @Override public Adapter caseMappingHelper(MappingHelper object) { return createMappingHelperAdapter(); } @Override public Adapter caseMapping(Mapping object) { return createMappingAdapter(); } @Override public Adapter caseTypeConverter(TypeConverter object) { return createTypeConverterAdapter(); } @Override public Adapter caseFunctionPair(FunctionPair object) { return createFunctionPairAdapter(); } @Override public Adapter caseFunctionNamePair(FunctionNamePair object) { return createFunctionNamePairAdapter(); } @Override public Adapter caseMappingStrategy(MappingStrategy object) { return createMappingStrategyAdapter(); }
boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch that delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected EcoreSwitch<Adapter> modelSwitch = new EcoreSwitch<Adapter>() { @Override public Adapter caseEAttribute(EAttribute object) { return createEAttributeAdapter(); } @Override public Adapter caseEAnnotation(EAnnotation object) { return createEAnnotationAdapter(); } @Override public Adapter caseEClass(EClass object) { return createEClassAdapter(); } @Override public Adapter caseEClassifier(EClassifier object) { return createEClassifierAdapter(); } @Override public Adapter caseEDataType(EDataType object) { return createEDataTypeAdapter(); } @Override public Adapter caseEEnum(EEnum object) { return createEEnumAdapter(); }

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

1

    boolean isFactoryForType(Object object)↵

1

    boolean isFactoryForType(Object object)↵

2

      {↵

2

      {↵

3

        if (object == modelPackage)↵

3

        if (object == modelPackage)↵

4

        {↵

4

        {↵

5

          return true;↵

5

          return true;↵

6

        }↵

6

        }↵

7

        if (object instanceof EObject)↵

7

        if (object instanceof EObject)↵

8

        {↵

8

        {↵

9

          return ((EObject)object).eClass().getEPackage() == modelPackage;↵

9

          return ((EObject)object).eClass().getEPackage() == modelPackage;↵

10

        }↵

10

        }↵

11

        return false;↵

11

        return false;↵

12

      }↵

12

      }↵

13

      /**↵

13

      /**↵

14

       * The switch that delegates to the <code>createXXX</code> methods.↵

14

       * The switch that delegates to the <code>createXXX</code> methods.↵

15

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

15

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

16

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

16

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

17

       * @generated↵

17

       * @generated↵

18

       */↵

18

       */↵

19

      protected MappingSwitch<Adapter> modelSwitch =↵

19

      protected EcoreSwitch<Adapter> modelSwitch =↵

20

        new MappingSwitch<Adapter>()↵

20

        new EcoreSwitch<Adapter>()↵

21

        {↵

21

        {↵

22

          @Override↵

22

          @Override↵

23

          public Adapter caseMappingHelper(MappingHelper object)↵

23

          public Adapter caseEAttribute(EAttribute object)↵

24

          {↵

24

          {↵

25

            return createMappingHelperAdapter();↵

25

            return createEAttributeAdapter();↵

26

          }↵

26

          }↵

27

          @Override↵

27

          @Override↵

28

          public Adapter caseMapping(Mapping object)↵

28

          public Adapter caseEAnnotation(EAnnotation object)↵

29

          {↵

29

          {↵

30

            return createMappingAdapter();↵

30

            return createEAnnotationAdapter();↵

31

          }↵

31

          }↵

32

          @Override↵

32

          @Override↵

33

          public Adapter caseTypeConverter(TypeConverter object)↵

33

          public Adapter caseEClass(EClass object)↵

34

          {↵

34

          {↵

35

            return createTypeConverterAdapter();↵

35

            return createEClassAdapter();↵

36

          }↵

36

          }↵

37

          @Override↵

37

          @Override↵

38

          public Adapter caseFunctionPair(FunctionPair object)↵

38

          public Adapter caseEClassifier(EClassifier object)↵

39

          {↵

39

          {↵

40

            return createFunctionPairAdapter();↵

40

            return createEClassifierAdapter();↵

41

          }↵

41

          }↵

42

          @Override↵

42

          @Override↵

43

          public Adapter caseFunctionNamePair(FunctionNamePair object)↵

43

          public Adapter caseEDataType(EDataType object)↵

44

          {↵

44

          {↵

45

            return createFunctionNamePairAdapter();↵

45

            return createEDataTypeAdapter();↵

46

          }↵

46

          }↵

47

          @Override↵

47

          @Override↵

48

          public Adapter caseMappingStrategy(MappingStrategy object)↵

48

          public Adapter caseEEnum(EEnum object)↵

49

          {↵

49

          {↵

50

            return createMappingStrategyAdapter();↵

50

            return createEEnumAdapter();↵

51

          }

51

          }

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