XMLLoad xmlLoad = createXMLLoad(); if (options == null) { options = Collections.EMPTY_MAP; } xmlLoad.load(this, node, options);
XMLSave xmlSave = createXMLSave(); if (options == null) { options = Collections.EMPTY_MAP; } xmlSave.save(this, writer, 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 doSave(Writer, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
XMLLoad xmlLoad = createXMLLoad();
1
XMLSave xmlSave = createXMLSave();
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
    xmlSave.save(this, writer, 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 statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                          
    1
    XMLSave xmlSave = createXMLSave();
    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
    xmlSave.save(this, writer, options);
    4
    xmlLoad.load(this, node, options);
                                                                          
    Precondition Violations (1)
    Row Violation
    1Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options