switch (featureID) { case Ecore2XMLPackage.XML_INFO__NAME: setName(NAME_EDEFAULT); return; case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE: setTargetNamespace(TARGET_NAMESPACE_EDEFAULT); return; case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION: setXMLRepresentation(XML_REPRESENTATION_EDEFAULT); 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/XMLInfoImpl.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_INFO__NAME:
3
      case 
4
        setName(NAME
4
MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
5
_EDEFAULT);
5
        setOutputReadOnly(OUTPUT_READ_ONLY_EDEFAULT);
6
        return;
6
        return;
7
      case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
7
      case 
8
        setTargetNamespace(TARGET_NAMESPACE
8
MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
9
_EDEFAULT);
9
        setTopToBottom(TOP_TO_BOTTOM_EDEFAULT);
10
        return;
10
        return;
11
      case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
11
      case 
12
        setXMLRepresentation(XML_REPRESENTATION
12
MappingPackage.MAPPING_ROOT__COMMAND_STACK:
13
_EDEFAULT);
13
        setCommandStack(COMMAND_STACK_EDEFAULT);
14
        return;
14
        return;
15
    }
15
    }
16
    super.eUnset(featureID);
16
    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 comparisons57
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.2
    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_INFO__NAME:
    2
    case Ecore2XMLPackage.XML_INFO__NAME:
    8
    case MappingPackage.MAPPING_ROOT__COMMAND_STACK:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_INFO__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
    setName(NAME_EDEFAULT);
    3
    setName(NAME_EDEFAULT);
    9
    setCommandStack(COMMAND_STACK_EDEFAULT);
    Differences
    Expression1Expression2Difference
    setNamesetCommandStackMETHOD_INVOCATION_NAME_MISMATCH
    NAME_EDEFAULTCOMMAND_STACK_EDEFAULTVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setName(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_INFO__TARGET_NAMESPACE:
    5
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
    5
    case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_INFO__TARGET_NAMESPACEMAPPING_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
    setTargetNamespace(TARGET_NAMESPACE_EDEFAULT);
                                                                                                      
    7
    return;
    7
    return;
    8
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    8
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
    2
    case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackageorg.eclipse.emf.mapping.MappingPackageVARIABLE_TYPE_MISMATCH
    XML_INFO__XML_REPRESENTATIONMAPPING_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
    setXMLRepresentation(XML_REPRESENTATION_EDEFAULT);
                                                                                                              
    10
    return;
    4
    return;
                                                                                        
    6
    setTopToBottom(TOP_TO_BOTTOM_EDEFAULT);
    11
    super.eUnset(featureID);
    11
    super.eUnset(featureID);
    Precondition Violations (5)
    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 setName(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
    5Type org.eclipse.emf.mapping.ecore2xml.Ecore2XMLPackage of variable Ecore2XMLPackage does not match with type org.eclipse.emf.mapping.MappingPackage of variable MappingPackage