if (eOpposite == null) { if (isUnsettable()) { settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this); } else { settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this); } } else { if (isUnsettable()) { settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite); } }
if (eOpposite == null) { if (isUnsettable()) { settingDelegate = new InternalSettingDelegateSingleEObjectUnsettable((EClass)eType, this); } else { settingDelegate = new InternalSettingDelegateSingleEObject((EClass)eType, this); } } else { if (isUnsettable()) { settingDelegate = new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType, this, eOpposite); } else { settingDelegate = new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType, 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 (eOpposite == null)
1
if (eOpposite == null)
2
        {
2
        {
3
          if (isUnsettable())
3
          if (isUnsettable())
4
          {
4
          {
5
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
5
            settingDelegate = new InternalSettingDelegateSingleEObjectUnsettable((EClass)eType, this);
6
          }
6
          }
7
          else
7
          else
8
          {
8
          {
9
            settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
9
            settingDelegate = new InternalSettingDelegateSingleEObject((EClass)eType, this);
10
          }
10
          }
11
        }
11
        }
12
        else
12
        else
13
        {
13
        {
14
          if (isUnsettable())
14
          if (isUnsettable())
15
          {
15
          {
16
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);
16
            settingDelegate = new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType, this, eOpposite);
17
          }
17
          }
18
          else
18
          else
19
          {
19
          {
20
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);
20
            settingDelegate = new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType, this, eOpposite);
21
          }
21
          }
22
        }
22
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in the same method
Number of node comparisons29
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)23.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    145
    if (eOpposite == null)
    152
    if (eOpposite == null)
    146
    if (isUnsettable())
    153
    if (isUnsettable())
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    154
    settingDelegate = new InternalSettingDelegateSingleEObjectUnsettable((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingUnsettableorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectUnsettableSUBCLASS_TYPE_MISMATCH
    154
    settingDelegate = new InternalSettingDelegateSingleEObjectUnsettable((EClass)eType, this);
    else
    else
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    155
    settingDelegate = new InternalSettingDelegateSingleEObject((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectSUBCLASS_TYPE_MISMATCH
    155
    settingDelegate = new InternalSettingDelegateSingleEObject((EClass)eType, this);
    else
    else
    149
    if (isUnsettable())
    156
    if (isUnsettable())
    150
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);
    150
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);
    157
    settingDelegate = new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType, this, eOpposite);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettableorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectWithInverseUnsettableSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    157
    settingDelegate = new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType, this, eOpposite);
    else
    else
    151
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);
    151
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);
    158
    settingDelegate = new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType, this, eOpposite);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingWithInverseorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectWithInverseSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    158
    settingDelegate = new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType, this, eOpposite);
    Precondition Violations (4)
    Row Violation
    1Expression new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new InternalSettingDelegateSingleEObjectWithInverseUnsettable((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression new InternalSettingDelegateSingleEObjectWithInverse((EClass)eType,this,eOpposite) cannot be parameterized, because it has dependencies to/from statements that will be extracted