XMLLoad xmlLoad = createXMLLoad(); if (options == null) { options = Collections.EMPTY_MAP; } xmlLoad.load(this, node, options);
XMLLoad xmlLoad = createXMLLoad(); if (options == null) { options = Collections.EMPTY_MAP; } xmlLoad.load(this, inputSource, options);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLResourceImpl.java
Method name: void doLoad(Node, Map) Method name: void doLoad(InputSource, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
XMLLoad xmlLoad = createXMLLoad();
1
XMLLoad xmlLoad = createXMLLoad();
2
    if (options == null)
2
    if (options == null)
3
    {
3
    {
4
      options = Collections.EMPTY_MAP;
4
      options = Collections.EMPTY_MAP;
5
    }
5
    }
6
    
7
    xmlLoad.load(this, node, options);
6
    xmlLoad.load(this, inputSource, options);
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 statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    XMLLoad xmlLoad = createXMLLoad();
    1
    XMLLoad xmlLoad = createXMLLoad();
    2
    if (options == null)
    2
    if (options == null)
    2
    if (options == null)
    Differences
    Expression1Expression2Difference
    java.util.Map<,>java.util.Map<,>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options
    • Make classes java.util.Map<,> and java.util.Map<,> extend a common superclass
    2
    if (options == null)
    3
    options = Collections.EMPTY_MAP;
    3
    options = Collections.EMPTY_MAP;
    4
    xmlLoad.load(this, node, options);
    4
    xmlLoad.load(this, node, options);
    4
    xmlLoad.load(this, inputSource, options);
    Differences
    Expression1Expression2Difference
    nodeinputSourceVARIABLE_NAME_MISMATCH
    org.w3c.dom.Nodeorg.xml.sax.InputSourceVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.w3c.dom.Node of variable node does not match with type org.xml.sax.InputSource of variable inputSource
    • Make classes org.w3c.dom.Node and org.xml.sax.InputSource extend a common superclass
    4
    xmlLoad.load(this, inputSource, options);
    Precondition Violations (2)
    Row Violation
    1Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options
    2Type org.w3c.dom.Node of variable node does not match with type org.xml.sax.InputSource of variable inputSource