EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType); if (baseType != null) { return EcoreUtil.createFromString(baseType, stringValue); } EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType); if (baseType != null) { return EcoreUtil.convertToString(baseType, objectValue); } EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EFactoryImpl.java
Method name: Object createFromString(EDataType, String) Method name: String convertToString(EDataType, Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType);
1
EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType);
2
    if (baseType != null)
2
    if (baseType != null)
3
    {
3
    {
4
      return EcoreUtil.createFromString(baseType, stringValue);
4
      return EcoreUtil.convertToString(baseType, objectValue);
5
    }
5
    }
6
    EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
6
    EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
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 declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType);
    3
    EDataType baseType = ExtendedMetaData.INSTANCE.getBaseType(eDataType);
    18
    if (baseType != null)
    4
    if (baseType != null)
                                                                                                                        
    5
    return EcoreUtil.convertToString(baseType, objectValue);
    Preondition Violations
    Unmatched statement return EcoreUtil.convertToString(baseType,objectValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return EcoreUtil.convertToString(baseType,objectValue);
    5
    return EcoreUtil.convertToString(baseType, objectValue);
    19
    return EcoreUtil.createFromString(baseType, stringValue);
    19
    return EcoreUtil.createFromString(baseType, stringValue);
    Preondition Violations
    Unmatched statement return EcoreUtil.createFromString(baseType,stringValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return EcoreUtil.createFromString(baseType,stringValue);
                                                                                                                            
    20
    EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
    6
    EDataType itemType = ExtendedMetaData.INSTANCE.getItemType(eDataType);
    Precondition Violations (5)
    Row Violation
    1Unmatched statement return EcoreUtil.convertToString(baseType,objectValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return EcoreUtil.convertToString(baseType,objectValue);
    3Unmatched statement return EcoreUtil.createFromString(baseType,stringValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched return EcoreUtil.createFromString(baseType,stringValue);
    5Clone fragment #1 returns variables baseType, itemType , while Clone fragment #2 returns variables baseType, itemType