switch (featureID) { case Ecore2XMLPackage.XML_MAP__ID_ATTRIBUTE_NAME: setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT); return; case Ecore2XMLPackage.XML_MAP__ECORE_TO_XML_INFO: getEcoreToXMLInfo().clear(); return; case Ecore2XMLPackage.XML_MAP__NO_NAMESPACE_PACKAGE: setNoNamespacePackage((EPackage)null); return; } super.eUnset(featureID);
switch (featureID) { case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY: setOutputReadOnly(OUTPUT_READ_ONLY_EDEFAULT); return; case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM: setTopToBottom(TOP_TO_BOTTOM_EDEFAULT); return; case MappingPackage.MAPPING_ROOT__COMMAND_STACK: setCommandStack(COMMAND_STACK_EDEFAULT); return; } super.eUnset(featureID);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/XMLMapImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/MappingRootImpl.java
Method name: void eUnset(int) Method name: void eUnset(int)
Number of AST nodes: 11 Number of AST nodes: 11
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case Ecore2XMLPackage.XML_MAP__ID_ATTRIBUTE_NAME:
3
      case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
4
        setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT);
4
        setOutputReadOnly(OUTPUT_READ_ONLY_EDEFAULT);
5
        return;
5
        return;
6
      case Ecore2XMLPackage.XML_MAP__ECORE_TO_XML_INFO:
6
      case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
7
        getEcoreToXMLInfo().clear();
7
        setTopToBottom(TOP_TO_BOTTOM_EDEFAULT);
8
        return;
8
        return;
9
      case Ecore2XMLPackage.XML_MAP__NO_NAMESPACE_PACKAGE:
9
      case 
10
        setNoNamespacePackage((EPackage)null
10
MappingPackage.MAPPING_ROOT__COMMAND_STACK:
11
);
11
        setCommandStack(COMMAND_STACK_EDEFAULT);
12
        return;
12
        return;
13
    }
13
    }
14
    super.eUnset(featureID);
14
    super.eUnset(featureID);
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons56
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    switch (featureID)
    1
    switch (featureID)
                                                                                                    
    3
    setOutputReadOnly(OUTPUT_READ_ONLY_EDEFAULT);
    2
    case Ecore2XMLPackage.XML_MAP__ID_ATTRIBUTE_NAME:
    2
    case Ecore2XMLPackage.XML_MAP__ID_ATTRIBUTE_NAME:
    8
    case MappingPackage.MAPPING_ROOT__COMMAND_STACK:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_MAP__ID_ATTRIBUTE_NAMEMAPPING_ROOT__COMMAND_STACKVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.mapping.MappingPackage extend a common superclass
    8
    case MappingPackage.MAPPING_ROOT__COMMAND_STACK:
    3
    setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT);
    3
    setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT);
    9
    setCommandStack(COMMAND_STACK_EDEFAULT);
    Differences
    Expression1Expression2Difference
    setIDAttributeNamesetCommandStackMETHOD_INVOCATION_NAME_MISMATCH
    ID_ATTRIBUTE_NAME_EDEFAULTCOMMAND_STACK_EDEFAULTVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT) is a void method call, and thus it cannot be parameterized
    Expression setCommandStack(COMMAND_STACK_EDEFAULT) is a void method call, and thus it cannot be parameterized
    9
    setCommandStack(COMMAND_STACK_EDEFAULT);
    4
    return;
    10
    return;
    5
    case Ecore2XMLPackage.XML_MAP__ECORE_TO_XML_INFO:
    5
    case Ecore2XMLPackage.XML_MAP__ECORE_TO_XML_INFO:
    5
    case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_MAP__ECORE_TO_XML_INFOMAPPING_ROOT__TOP_TO_BOTTOMVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.mapping.MappingPackage extend a common superclass
    5
    case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
    6
    getEcoreToXMLInfo().clear();
    6
    getEcoreToXMLInfo().clear();
    6
    setTopToBottom(TOP_TO_BOTTOM_EDEFAULT);
    Differences
    Expression1Expression2Difference
    clearsetTopToBottomMETHOD_INVOCATION_NAME_MISMATCH
    getEcoreToXMLInfo().clear()setTopToBottom(TOP_TO_BOTTOM_EDEFAULT)ARGUMENT_NUMBER_MISMATCH
    getEcoreToXMLInfo()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression getEcoreToXMLInfo().clear() is a void method call, and thus it cannot be parameterized
    Expression setTopToBottom(TOP_TO_BOTTOM_EDEFAULT) is a void method call, and thus it cannot be parameterized
    Expression getEcoreToXMLInfo().clear() is a void method call, and thus it cannot be parameterized
    Expression setTopToBottom(TOP_TO_BOTTOM_EDEFAULT) is a void method call, and thus it cannot be parameterized
    6
    setTopToBottom(TOP_TO_BOTTOM_EDEFAULT);
    7
    return;
    7
    return;
    8
    case Ecore2XMLPackage.XML_MAP__NO_NAMESPACE_PACKAGE:
    8
    case Ecore2XMLPackage.XML_MAP__NO_NAMESPACE_PACKAGE:
    2
    case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_MAP__NO_NAMESPACE_PACKAGEMAPPING_ROOT__OUTPUT_READ_ONLYVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    • Make classes org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage and org.eclipse.emf.mapping.MappingPackage extend a common superclass
    2
    case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
    9
    setNoNamespacePackage((EPackage)null);
                                                                                      
    10
    return;
    4
    return;
    11
    super.eUnset(featureID);
    11
    super.eUnset(featureID);
    Precondition Violations (9)
    Row Violation
    1Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    2Expression setIDAttributeName(ID_ATTRIBUTE_NAME_EDEFAULT) is a void method call, and thus it cannot be parameterized
    3Expression setCommandStack(COMMAND_STACK_EDEFAULT) is a void method call, and thus it cannot be parameterized
    4Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage
    5Expression getEcoreToXMLInfo().clear() is a void method call, and thus it cannot be parameterized
    6Expression setTopToBottom(TOP_TO_BOTTOM_EDEFAULT) is a void method call, and thus it cannot be parameterized
    7Expression getEcoreToXMLInfo().clear() is a void method call, and thus it cannot be parameterized
    8Expression setTopToBottom(TOP_TO_BOTTOM_EDEFAULT) is a void method call, and thus it cannot be parameterized
    9Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage