if (isUnsettable()) { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this); } else { settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this); } } else { if (isResolveProxies()) { settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this); } else { settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this); } }
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); } }
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 (isUnsettable())
1
if (
2
  
2
eOpposite == null)
3
        {
3
        {
4
            if (isResolveProxies())
4
          if (isUnsettable())
5
            {
5
          
6
  
6
{
7
            settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this);
7
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
8
            }
8
          
9
  
9
}
10
          else
10
          else
11
            {
11
          
12
  
12
{
13
            settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this);
13
            settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
14
            }
14
          
15
  
15
}
16
        }
16
        }
17
          else
17
        else
18
          {
18
        {
19
            if (isResolveProxies())
19
          if (isUnsettable())
20
            {
20
          
21
  
21
{
22
            settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this);
22
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);
23
            }
23
          }
24
            else
24
          else
25
            {
25
          
26
  
26
{
27
            settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this);
27
            settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);
28
            }
28
          
29
  
29
}
30
        }
30
        }
Summary
Number of common nesting structure subtrees2
Number of refactorable cases2
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons21
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    131
    if (isResolveProxies())
    131
    if (isResolveProxies())
    146
    if (isUnsettable())
    Differences
    Expression1Expression2Difference
    isResolveProxiesisUnsettableMETHOD_INVOCATION_NAME_MISMATCH
    146
    if (isUnsettable())
    132
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this);
    132
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this);
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectContainmentUnsettableResolvingorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingUnsettableSUBCLASS_TYPE_MISMATCH
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    else
    else
    133
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this);
    133
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this);
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectContainmentUnsettableorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingSUBCLASS_TYPE_MISMATCH
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    Precondition Violations (0)
    Row Violation
  2. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    134
    if (isResolveProxies())
    134
    if (isResolveProxies())
    146
    if (isUnsettable())
    Differences
    Expression1Expression2Difference
    isResolveProxiesisUnsettableMETHOD_INVOCATION_NAME_MISMATCH
    146
    if (isUnsettable())
    135
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this);
    135
    settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this);
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectContainmentResolvingorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingUnsettableSUBCLASS_TYPE_MISMATCH
    147
    settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
    else
    else
    136
    settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this);
    136
    settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this);
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectContainmentorg.eclipse.emf.ecore.impl.EStructuralFeatureImpl.InternalSettingDelegateSingleEObjectResolvingSUBCLASS_TYPE_MISMATCH
    148
    settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
    Precondition Violations (0)
    Row Violation