if (eFeature instanceof EReference && ((EReference)eFeature).isContainer()) { eSettingDelegate(eFeature).dynamicUnset(this, null, -1); } else { featureMap.setting(eFeature).unset(); }
if (eFeature instanceof EReference && ((EReference)eFeature).isContainer()) { eSettingDelegate(eFeature).dynamicUnset(this, null, -1); } else { featureMap.setting(eFeature).unset(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
Method name: void eDynamicUnset(EStructuralFeature) Method name: void eDynamicUnset(EStructuralFeature)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
1
if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
2
      {
2
      {
3
        eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
3
        eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
4
      }
4
      }
5
      else
5
      else
6
      {
6
      {
7
        featureMap.setting(eFeature).unset();
7
        featureMap.setting(eFeature).unset();
8
      }
8
      }
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 different classes having the same super class
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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
    1
    if (eFeature instanceof EReference && ((EReference)eFeature).isContainer())
    2
    eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
    2
    eSettingDelegate(eFeature).dynamicUnset(this, null, -1);
    else
    else
    3
    featureMap.setting(eFeature).unset();
    3
    featureMap.setting(eFeature).unset();
    3
    featureMap.setting(eFeature).unset();
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.util.DelegatingFeatureMaporg.eclipse.emf.ecore.util.BasicFeatureMapSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression featureMap cannot be unified with expression featureMap , because common superclass java.util.AbstractList<org.eclipse.emf.ecore.util.FeatureMap.Entry> does not declare member(s) public org.eclipse.emf.ecore.EStructuralFeature.Setting setting(org.eclipse.emf.ecore.EStructuralFeature)
    3
    featureMap.setting(eFeature).unset();
    Precondition Violations (1)
    Row Violation
    1Expression featureMap cannot be unified with expression featureMap , because common superclass java.util.AbstractList<org.eclipse.emf.ecore.util.FeatureMap.Entry> does not declare member(s) public org.eclipse.emf.ecore.EStructuralFeature.Setting setting(org.eclipse.emf.ecore.EStructuralFeature)