if (referencedGenPackageToInfoMap == null) { referencedGenPackageToInfoMap = new HashMap<GenPackage, ReferencedGenPackageConvertInfo>(); } return referencedGenPackageToInfoMap;
if (uriHandlers == null) { uriHandlers = new URIHandlerList(); } return uriHandlers;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/converter/ModelConverter.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ExtensibleURIConverterImpl.java
Method name: Map getReferencedGenPackageToInfoMap() Method name: EList getURIHandlers()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (referencedGenPackageToInfoMap == null)
1
if (
2
    {
3
      referencedGenPackageToInfoMap = new HashMap<GenPackage, ReferencedGenPackageConvertInfo>();
4
    }
5
    return referencedGenPackageToInfoMap
2
uriHandlers == null)
3
    {
4
      uriHandlers = new URIHandlerList();
5
    }
6
;
6
    return uriHandlers;
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
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (referencedGenPackageToInfoMap == null)
    1
    if (referencedGenPackageToInfoMap == null)
    1
    if (uriHandlers == null)
    Differences
    Expression1Expression2Difference
    referencedGenPackageToInfoMapuriHandlersVARIABLE_NAME_MISMATCH
    java.util.Maporg.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.URIHandlerListSUBCLASS_TYPE_MISMATCH
    1
    if (uriHandlers == null)
                                                                            
    2
    uriHandlers = new URIHandlerList();
    Preondition Violations
    Unmatched statement uriHandlers=new URIHandlerList(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    uriHandlers = new URIHandlerList();
    2
    referencedGenPackageToInfoMap = new HashMap<GenPackage, ReferencedGenPackageConvertInfo>();
    2
    referencedGenPackageToInfoMap = new HashMap<GenPackage, ReferencedGenPackageConvertInfo>();
    Preondition Violations
    Unmatched statement referencedGenPackageToInfoMap=new HashMap<GenPackage,ReferencedGenPackageConvertInfo>(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                          
    3
    return referencedGenPackageToInfoMap;
    3
    return referencedGenPackageToInfoMap;
    3
    return uriHandlers;
    Differences
    Expression1Expression2Difference
    referencedGenPackageToInfoMapuriHandlersVARIABLE_NAME_MISMATCH
    java.util.Maporg.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.URIHandlerListSUBCLASS_TYPE_MISMATCH
    3
    return uriHandlers;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement uriHandlers=new URIHandlerList(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement referencedGenPackageToInfoMap=new HashMap<GenPackage,ReferencedGenPackageConvertInfo>(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted