RoseNode node = nodes.get(i); if (key.equals(node.getKey())) { return node; }
EReference eReference = eAllReferences.get(i); if ("xmlns:prefix".equals(getName(eReference))) { return eReference; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseNode.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: RoseNode findNodeWithKey(String) Method name: EReference getXMLNSPrefixMapFeature(EClass)
Number of AST nodes: 3 Number of AST nodes: 3
1
RoseNode node = nodes.get(i);
1
EReference eReference = eAllReferences.get(i);
2
      if (key.equals(node.getKey()))
2
        if ("xmlns:prefix".equals(getName(eReference)))
3
      {
3
      
4
  {
4
        return node;
5
          return eReference;
5
      }
6
        }
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.2
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)3.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    RoseNode node = nodes.get(i);
    2
    RoseNode node = nodes.get(i);
    Preondition Violations
    Unmatched statement RoseNode node=nodes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                
                                                                                                  
    4
    EReference eReference = eAllReferences.get(i);
    Preondition Violations
    Unmatched statement EReference eReference=eAllReferences.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4
    EReference eReference = eAllReferences.get(i);
    3
    if (key.equals(node.getKey()))
    3
    if (key.equals(node.getKey()))
    5
    if ("xmlns:prefix".equals(getName(eReference)))
    Differences
    Expression1Expression2Difference
    getKeygetNameMETHOD_INVOCATION_NAME_MISMATCH
    node.getKey()getName(eReference)ARGUMENT_NUMBER_MISMATCH
    nodeMISSING_METHOD_INVOCATION_EXPRESSION
    key"xmlns:prefix"TYPE_COMPATIBLE_REPLACEMENT
    5
    if ("xmlns:prefix".equals(getName(eReference)))
    4
    return node;
    4
    return node;
    Preondition Violations
    Unmatched return node;
                                  
                                              
    6
    return eReference;
    Preondition Violations
    Unmatched return eReference;
    6
    return eReference;
    Precondition Violations (4)
    Row Violation
    1Unmatched statement RoseNode node=nodes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement EReference eReference=eAllReferences.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return node;
    4Unmatched return eReference;