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);
helper.populateNameInfo(nameInfo, f); Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName()); attr.setNodeValue(idsString); ((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 saveEObjectMany(EObject, EStructuralFeature) Method name: void saveIDRefMany(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(string);
3
          attr.setNodeValue(idsString);      
4
          ((Element)currentNode).setAttributeNodeNS(attr);
4
          ((Element)currentNode).setAttributeNodeNS(attr);
5
          handler.recordValues(attr, o, f, values);
5
          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
    30
    helper.populateNameInfo(nameInfo, f);
    22
    helper.populateNameInfo(nameInfo, f);
    31
    Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
    23
    Attr attr = document.createAttributeNS(nameInfo.getNamespaceURI(), nameInfo.getQualifiedName());
    32
    attr.setNodeValue(string);
    32
    attr.setNodeValue(string);
    24
    attr.setNodeValue(idsString);
    Differences
    Expression1Expression2Difference
    stringidsStringVARIABLE_NAME_MISMATCH
    24
    attr.setNodeValue(idsString);
    33
    ((Element)currentNode).setAttributeNodeNS(attr);
    25
    ((Element)currentNode).setAttributeNodeNS(attr);
    34
    handler.recordValues(attr, o, f, values);
    34
    handler.recordValues(attr, o, f, values);
    26
    handler.recordValues(attr, o, f, values);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.ecore.util.InternalEList<>org.eclipse.emf.ecore.util.InternalEList<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.util.InternalEList<> of variable values does not match with type org.eclipse.emf.ecore.util.InternalEList<> of variable values
    • Make classes org.eclipse.emf.ecore.util.InternalEList<> and org.eclipse.emf.ecore.util.InternalEList<> extend a common superclass
    26
    handler.recordValues(attr, o, f, values);
    Precondition Violations (1)
    Row Violation
    1Type org.eclipse.emf.ecore.util.InternalEList<> of variable values does not match with type org.eclipse.emf.ecore.util.InternalEList<> of variable values