switch (featureID) { case Ecore2XMLPackage.XML_INFO__NAME: setName((String)newValue); return; case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE: setTargetNamespace((String)newValue); return; case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION: setXMLRepresentation(((Integer)newValue).intValue()); return; } super.eSet(featureID, newValue);
switch (featureID) { case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY: setOutputReadOnly(((Boolean)newValue).booleanValue()); return; case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM: setTopToBottom(((Boolean)newValue).booleanValue()); return; case MappingPackage.MAPPING_ROOT__COMMAND_STACK: setCommandStack((String)newValue); return; } super.eSet(featureID, newValue);
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 eSet(int, Object) Method name: void eSet(int, Object)
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((String)newValue
4
MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
5
);
5
        setOutputReadOnly(((Boolean)newValue).booleanValue());
6
        return;
6
        return;
7
      case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
7
      case 
8
        setTargetNamespace((String)newValue
8
MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
9
);
9
        setTopToBottom(((Boolean)newValue).booleanValue());
10
        return;
10
        return;
11
      case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
11
      case 
12
        setXMLRepresentation(((Integer)newValue).intValue()
12
MappingPackage.MAPPING_ROOT__COMMAND_STACK:
13
);
13
        setCommandStack((String)newValue);
14
        return;
14
        return;
15
    }
15
    }
16
    super.eSet(featureID, newValue);
16
    super.eSet(featureID, newValue);
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 comparisons2
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment10
    Number of unmapped statements in the second code fragment10
    Time elapsed for statement mapping (ms)2.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                            
    1
    switch (featureID)
                                                                                                                
    2
    case MappingPackage.MAPPING_ROOT__OUTPUT_READ_ONLY:
                                                                                                                      
    3
    setOutputReadOnly(((Boolean)newValue).booleanValue());
    Preondition Violations
    Unmatched statement setOutputReadOnly(((Boolean)newValue).booleanValue()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    setOutputReadOnly(((Boolean)newValue).booleanValue());
                        
    4
    return;
    Preondition Violations
    Unmatched return;
    4
    return;
                                                                                                          
    5
    case MappingPackage.MAPPING_ROOT__TOP_TO_BOTTOM:
                                                                                                                
    6
    setTopToBottom(((Boolean)newValue).booleanValue());
    Preondition Violations
    Unmatched statement setTopToBottom(((Boolean)newValue).booleanValue()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6
    setTopToBottom(((Boolean)newValue).booleanValue());
                        
    7
    return;
    Preondition Violations
    Unmatched return;
    7
    return;
                                                                                                          
    8
    case MappingPackage.MAPPING_ROOT__COMMAND_STACK:
                                                                              
    9
    setCommandStack((String)newValue);
    Preondition Violations
    Unmatched statement setCommandStack((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    9
    setCommandStack((String)newValue);
                          
    10
    return;
    Preondition Violations
    Unmatched return;
    10
    return;
    1
    switch (featureID)
                                            
    2
    case Ecore2XMLPackage.XML_INFO__NAME:
                                                                                    
    3
    setName((String)newValue);
                                                              
    4
    return;
    4
    return;
    Preondition Violations
    Unmatched return;
                        
    5
    case Ecore2XMLPackage.XML_INFO__TARGET_NAMESPACE:
                                                                                                            
    6
    setTargetNamespace((String)newValue);
                                                                                    
    7
    return;
    7
    return;
    Preondition Violations
    Unmatched return;
                        
    8
    case Ecore2XMLPackage.XML_INFO__XML_REPRESENTATION:
                                                                                                                
    9
    setXMLRepresentation(((Integer)newValue).intValue());
                                                                                                                    
    10
    return;
    10
    return;
    Preondition Violations
    Unmatched return;
                          
    11
    super.eSet(featureID, newValue);
    11
    super.eSet(featureID, newValue);
    11
    super.eSet(featureID, newValue);
    Preondition Violations
    Super method call super.eSet(featureID,newValue); cannot be extracted from method
    Super method call super.eSet(featureID,newValue); cannot be extracted from method
    11
    super.eSet(featureID, newValue);
    Precondition Violations (11)
    Row Violation
    1Unmatched statement setOutputReadOnly(((Boolean)newValue).booleanValue()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return;
    3Unmatched statement setTopToBottom(((Boolean)newValue).booleanValue()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched return;
    5Unmatched statement setCommandStack((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched return;
    7Unmatched return;
    8Unmatched return;
    9Unmatched return;
    10Super method call super.eSet(featureID,newValue); cannot be extracted from method
    11Super method call super.eSet(featureID,newValue); cannot be extracted from method