switch (featureID) { case XMLTypePackage.PROCESSING_INSTRUCTION__DATA: setData((String)newValue); return; case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET: setTarget((String)newValue); return; } eDynamicSet(featureID, newValue);
switch (featureID) { case MappingPackage.FUNCTION_PAIR__IN2OUT: setIn2out((EOperation)newValue); return; case MappingPackage.FUNCTION_PAIR__OUT2IN: setOut2in((EOperation)newValue); return; } super.eSet(featureID, newValue);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/impl/ProcessingInstructionImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/impl/FunctionPairImpl.java
Method name: void eSet(int, Object) Method name: void eSet(int, Object)
Number of AST nodes: 8 Number of AST nodes: 8
1
switch (featureID)
1
switch (featureID)
2
    {
2
    {
3
      case XMLTypePackage.PROCESSING_INSTRUCTION__DATA:
3
      case MappingPackage.
4
        setData((String
4
FUNCTION_PAIR__IN2OUT:
5
)newValue);
5
        setIn2out((EOperation)newValue);
6
        return;
6
        return;
7
      case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET:
7
      case MappingPackage.
8
        setTarget((String
8
FUNCTION_PAIR__OUT2IN:
9
)newValue);
9
        setOut2in((EOperation)newValue);
10
        return;
10
        return;
11
    }
11
    }
12
    eDynamicSet(featureID, newValue);
12
    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.1
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 fragment7
    Number of unmapped statements in the second code fragment7
    Time elapsed for statement mapping (ms)200.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                            
    1
    switch (featureID)
                                                                                              
    2
    case MappingPackage.FUNCTION_PAIR__IN2OUT:
                                                                          
    3
    setIn2out((EOperation)newValue);
    Preondition Violations
    Unmatched statement setIn2out((EOperation)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    setIn2out((EOperation)newValue);
                        
    4
    return;
    Preondition Violations
    Unmatched return;
    4
    return;
                                                                                              
    5
    case MappingPackage.FUNCTION_PAIR__OUT2IN:
                                                                          
    6
    setOut2in((EOperation)newValue);
    Preondition Violations
    Unmatched statement setOut2in((EOperation)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6
    setOut2in((EOperation)newValue);
                        
    7
    return;
    Preondition Violations
    Unmatched return;
    7
    return;
    1
    switch (featureID)
                                            
    2
    case XMLTypePackage.PROCESSING_INSTRUCTION__DATA:
                                                                                                            
    3
    setData((String)newValue);
    3
    setData((String)newValue);
    Preondition Violations
    Unmatched statement setData((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                              
    4
    return;
    4
    return;
    Preondition Violations
    Unmatched return;
                        
    5
    case XMLTypePackage.PROCESSING_INSTRUCTION__TARGET:
                                                                                                                
    6
    setTarget((String)newValue);
    6
    setTarget((String)newValue);
    Preondition Violations
    Unmatched statement setTarget((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                  
    7
    return;
    7
    return;
    Preondition Violations
    Unmatched return;
                        
    8
    eDynamicSet(featureID, newValue);
    8
    eDynamicSet(featureID, newValue);
    8
    super.eSet(featureID, newValue);
    Differences
    Expression1Expression2Difference
    eDynamicSet(featureID,newValue)super.eSet(featureID,newValue)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression eDynamicSet(featureID,newValue) is a void method call, and thus it cannot be parameterized
    Expression super.eSet(featureID,newValue) is a void method call, and thus it cannot be parameterized
    Super method call super.eSet(featureID,newValue); cannot be extracted from method
    8
    super.eSet(featureID, newValue);
    Precondition Violations (11)
    Row Violation
    1Unmatched statement setIn2out((EOperation)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return;
    3Unmatched statement setOut2in((EOperation)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched return;
    5Unmatched statement setData((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched return;
    7Unmatched statement setTarget((String)newValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8Unmatched return;
    9Expression eDynamicSet(featureID,newValue) is a void method call, and thus it cannot be parameterized
    10Expression super.eSet(featureID,newValue) is a void method call, and thus it cannot be parameterized
    11Super method call super.eSet(featureID,newValue); cannot be extracted from method