102-1-2

if (dataClass == null) { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC_RESOLVE, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC, this, eOpposite); } } else { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_RESOLVE, dataClass, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE, dataClass, this, eOpposite); } }
if (dataClass == null) { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC_RESOLVE, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC, this, eOpposite); } } else { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE_RESOLVE, dataClass, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.CONTAINMENT_INVERSE, dataClass, this, eOpposite); } }

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: `EStructuralFeature.Internal.SettingDelegate getSettingDelegate()` |  | Method name: `EStructuralFeature.Internal.SettingDelegate getSettingDelegate()`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    if (dataClass == null)↵

1

    if (dataClass == null)↵

2

                  {↵

2

                  {↵

3

                    if (isResolveProxies())↵

3

                    if (isResolveProxies())↵

4

                    {↵

4

                    {↵

5

                      settingDelegate = ↵

5

                      settingDelegate = ↵

6

                        new InternalSettingDelegateMany↵

6

                        new InternalSettingDelegateMany↵

7

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC_RESOLVE, this, eOpposite);↵

7

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC_RESOLVE, this, eOpposite);↵

8

                    }   ↵

8

                    }↵

9

                    else↵

9

                    else↵

10

                    {↵

10

                    {↵

11

                      settingDelegate = ↵

11

                      settingDelegate = ↵

12

                        new InternalSettingDelegateMany↵

12

                        new InternalSettingDelegateMany↵

13

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC, this, eOpposite);↵

13

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC, this, eOpposite);↵

14

                    }   ↵

14

                    }↵

15

                  }↵

15

                  }↵

16

                  ↵

16

                  else↵

17

                  else↵

17

                  {↵

18

                  {↵

18

                    if (isResolveProxies())↵

19

                    if (isResolveProxies())↵

19

                    {↵

20

                    {↵

20

                      settingDelegate = ↵

21

                      settingDelegate = ↵

21

                        new InternalSettingDelegateMany↵

22

                        new InternalSettingDelegateMany↵

22

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_RESOLVE, dataClass, this, eOpposite);↵

23

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_RESOLVE, dataClass, this, eOpposite);↵

23

                    }↵

24

                    }↵

24

                    else↵

25

                    else↵

25

                    {↵

26

                    {↵

26

                      settingDelegate = ↵

27

                      settingDelegate = ↵

27

                        new InternalSettingDelegateMany↵

28

                        new InternalSettingDelegateMany↵

28

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE, dataClass, this, eOpposite);↵

29

                          (InternalSettingDelegateMany.CONTAINMENT_INVERSE, dataClass, this, eOpposite);↵

29

                    }↵

30

                    }↵

30

                  }

31

                  }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in the same method
Number of node comparisons | 29

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 7
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 2.7
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   35

       if (dataClass == null)

   35 | if (dataClass == null)
   42 | if (dataClass == null)

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   java.lang.Class<> | java.lang.Class<> | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
   - Make classes java.lang.Class<> and java.lang.Class<> extend a common superclass

   42

       if (dataClass == null)

   36

       if (isResolveProxies())

   43

       if (isResolveProxies())

   37

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC_RESOLVE, this, eOpposite);

   37 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC_RESOLVE, this, eOpposite);
   44 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC_RESOLVE, this, eOpposite);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC_RESOLVE | CONTAINMENT_INVERSE_DYNAMIC_RESOLVE | VARIABLE_NAME_MISMATCH

   44

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC_RESOLVE, this, eOpposite);

       else

       else

   38

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC, this, eOpposite);

   38 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC, this, eOpposite);
   45 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC, this, eOpposite);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CONTAINMENT_INVERSE_UNSETTABLE_DYNAMIC | CONTAINMENT_INVERSE_DYNAMIC | VARIABLE_NAME_MISMATCH

   45

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_DYNAMIC, this, eOpposite);

       else

       else

   39

       if (isResolveProxies())

   46

       if (isResolveProxies())

   40

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_RESOLVE, dataClass, this, eOpposite);

   40 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE_RESOLVE, dataClass, this, eOpposite);
   47 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_RESOLVE, dataClass, this, eOpposite);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CONTAINMENT_INVERSE_UNSETTABLE_RESOLVE | CONTAINMENT_INVERSE_RESOLVE | VARIABLE_NAME_MISMATCH
   java.lang.Class<> | java.lang.Class<> | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
   - Make classes java.lang.Class<> and java.lang.Class<> extend a common superclass

   47

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_RESOLVE, dataClass, this, eOpposite);

       else

       else

   41

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE, dataClass, this, eOpposite);

   41 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE_UNSETTABLE, dataClass, this, eOpposite);
   48 | settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE, dataClass, this, eOpposite);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   CONTAINMENT_INVERSE_UNSETTABLE | CONTAINMENT_INVERSE | VARIABLE_NAME_MISMATCH
   java.lang.Class<> | java.lang.Class<> | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
   - Make classes java.lang.Class<> and java.lang.Class<> extend a common superclass

   48

       settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.CONTAINMENT_INVERSE, dataClass, this, eOpposite);

   Precondition Violations (3)
   Row | Violation
   --- | ---
   1 | Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
   2 | Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
   3 | Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass