if (dataClass == null) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE_DYNAMIC, this); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE, dataClass, this); }
if (dataClass == null) { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.EOBJECT_RESOLVE_DYNAMIC, this); } else { settingDelegate = new InternalSettingDelegateMany (InternalSettingDelegateMany.EOBJECT_RESOLVE, dataClass, this); }
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: 3 Number of AST nodes: 3
1
if (dataClass == null)
1
if (dataClass == null)
2
              {
2
              {
3
                settingDelegate = 
3
                settingDelegate = 
4
                  new InternalSettingDelegateMany
4
                  new InternalSettingDelegateMany
5
                    (InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE_DYNAMIC, this);
5
                    (InternalSettingDelegateMany.EOBJECT_RESOLVE_DYNAMIC, this);
6
              }
6
              }
7
              else
7
              else
8
              {
8
              {
9
                settingDelegate = 
9
                settingDelegate = 
10
                  new InternalSettingDelegateMany
10
                  new InternalSettingDelegateMany
11
                    (InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE, dataClass, this);
11
                    (InternalSettingDelegateMany.EOBJECT_RESOLVE, dataClass, this);
12
              }
12
              }
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.2
Clones locationClones are in the same method
Number of node comparisons9
  1. {Non-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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    70
    if (dataClass == null)
    70
    if (dataClass == null)
    73
    if (dataClass == null)
    Differences
    Expression1Expression2Difference
    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
    73
    if (dataClass == null)
    71
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE_DYNAMIC, this);
    71
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE_DYNAMIC, this);
    74
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_DYNAMIC, this);
    Differences
    Expression1Expression2Difference
    EOBJECT_RESOLVE_UNSETTABLE_DYNAMICEOBJECT_RESOLVE_DYNAMICVARIABLE_NAME_MISMATCH
    74
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_DYNAMIC, this);
    else
    else
    72
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE, dataClass, this);
    72
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE_UNSETTABLE, dataClass, this);
    75
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE, dataClass, this);
    Differences
    Expression1Expression2Difference
    EOBJECT_RESOLVE_UNSETTABLEEOBJECT_RESOLVEVARIABLE_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
    75
    settingDelegate = new InternalSettingDelegateMany(InternalSettingDelegateMany.EOBJECT_RESOLVE, dataClass, this);
    Precondition Violations (2)
    Row Violation
    1Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass
    2Type java.lang.Class<> of variable dataClass does not match with type java.lang.Class<> of variable dataClass