if (namespaceURI == null) { namespaceURI = ""; } String localName = element.getLocalName(); String qname = element.getNodeName();
if (namespaceURI == null) { namespaceURI = ""; } String localName = node.getLocalName(); String qname = node.getNodeName();
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLLoadImpl.java
Method name: void traverseElement(Element, AttributesProxy, DefaultHandler, LexicalHandler) Method name: void traverse(Node, AttributesProxy, DefaultHandler, LexicalHandler)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (namespaceURI == null)
1
if (namespaceURI == null)
2
    {
2
    
3
    {
3
      namespaceURI = "";
4
          namespaceURI = "";
4
    }
5
      
6
  }
5
    String localName = element.getLocalName();
7
        String localName = node.getLocalName();
6
    String qname = element.getNodeName();
8
        String qname = node.getNodeName();
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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    36
    if (namespaceURI == null)
    42
    if (namespaceURI == null)
    37
    namespaceURI = "";
    43
    namespaceURI = "";
    38
    String localName = element.getLocalName();
    38
    String localName = element.getLocalName();
    44
    String localName = node.getLocalName();
    Differences
    Expression1Expression2Difference
    elementnodeVARIABLE_NAME_MISMATCH
    org.w3c.dom.Elementorg.w3c.dom.NodeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.w3c.dom.Element of variable element does not match with type org.w3c.dom.Node of variable node
    • Make classes org.w3c.dom.Element and org.w3c.dom.Node extend a common superclass
    44
    String localName = node.getLocalName();
    39
    String qname = element.getNodeName();
    39
    String qname = element.getNodeName();
    45
    String qname = node.getNodeName();
    Differences
    Expression1Expression2Difference
    elementnodeVARIABLE_NAME_MISMATCH
    org.w3c.dom.Elementorg.w3c.dom.NodeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.w3c.dom.Element of variable element does not match with type org.w3c.dom.Node of variable node
    • Make classes org.w3c.dom.Element and org.w3c.dom.Node extend a common superclass
    45
    String qname = node.getNodeName();
    Precondition Violations (3)
    Row Violation
    1Type org.w3c.dom.Element of variable element does not match with type org.w3c.dom.Node of variable node
    2Type org.w3c.dom.Element of variable element does not match with type org.w3c.dom.Node of variable node
    3Clone fragment #1 returns variables namespaceURI, localName, qname , while Clone fragment #2 returns variables namespaceURI, localName, qname