helper.populateNameInfo(nameInfo, f); Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); attr.setNodeValue(svalue); ((Element)currentNode).setAttributeNodeNS(attr); handler.recordValues(attr, o, f, value);
helper.populateNameInfo(nameInfo, f); Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); attr.setNodeValue(string); ((Element)currentNode).setAttributeNodeNS(attr); handler.recordValues(attr, o, f, values);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
Method name: void saveDataTypeSingle(EObject, EStructuralFeature) Method name: void saveEObjectMany(EObject, EStructuralFeature)
Number of AST nodes: 5 Number of AST nodes: 5
1
helper.populateNameInfo(nameInfo, f);
1
helper.populateNameInfo(nameInfo, f);
2
        Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
2
          Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
3
        attr.setNodeValue(svalue);    
3
          attr.setNodeValue(string);
4
  
4
  
5
        ((Element)currentNode).setAttributeNodeNS(attr);
5
        ((Element)currentNode).setAttributeNodeNS(attr);
6
        handler.recordValues(attr, o, f, value);
6
          handler.recordValues(attr, o, f, values);
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.0
Clones locationClones are declared in the same class
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    helper.populateNameInfo(nameInfo, f);
    30
    helper.populateNameInfo(nameInfo, f);
    7
    Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
    31
    Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
    8
    attr.setNodeValue(svalue);
    8
    attr.setNodeValue(svalue);
    32
    attr.setNodeValue(string);
    Differences
    Expression1Expression2Difference
    svaluestringVARIABLE_NAME_MISMATCH
    32
    attr.setNodeValue(string);
    9
    ((Element)currentNode).setAttributeNodeNS(attr);
    33
    ((Element)currentNode).setAttributeNodeNS(attr);
    10
    handler.recordValues(attr, o, f, value);
    10
    handler.recordValues(attr, o, f, value);
    34
    handler.recordValues(attr, o, f, values);
    Differences
    Expression1Expression2Difference
    valuevaluesVARIABLE_NAME_MISMATCH
    java.lang.Objectorg.eclipse.emf.ecore.util.InternalEList<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.Object of variable value does not match with type org.eclipse.emf.ecore.util.InternalEList<> of variable values
    • Make classes java.lang.Object and org.eclipse.emf.ecore.util.InternalEList<> extend a common superclass
    34
    handler.recordValues(attr, o, f, values);
    Precondition Violations (1)
    Row Violation
    1Type java.lang.Object of variable value does not match with type org.eclipse.emf.ecore.util.InternalEList<> of variable values