if (eGenericType == null) { ((EDataType)element).setInstanceClassName(eType.getInstanceClassName()); }
if (node == null) { return null; } root.addNode(node);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/builder/RoseEcoreBuilder.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/parser/RoseParser.java
Method name: void setETypeClassifier() Method name: RoseNode parseValue(String)
Number of AST nodes: 2 Number of AST nodes: 3
1
if (eGenericType == null)
1
if (node == null)
2
        {
2
      {
3
          ((EDataType)element).setInstanceClassName(eType.getInstanceClassName());
3
        
4
        }
4
return null;
5
      }
6
      root.addNode(node);
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 in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.3
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    91
    if (eGenericType == null)
    91
    if (eGenericType == null)
    25
    if (node == null)
    Differences
    Expression1Expression2Difference
    eGenericTypenodeVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EGenericTypeorg.eclipse.emf.importer.rose.parser.RoseNodeVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EGenericType of variable eGenericType does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable node
    • Make classes org.eclipse.emf.ecore.EGenericType and org.eclipse.emf.importer.rose.parser.RoseNode extend a common superclass
    25
    if (node == null)
                                    
    26
    return null;
    Preondition Violations
    Unmatched return null;
    26
    return null;
    92
    ((EDataType)element).setInstanceClassName(eType.getInstanceClassName());
                                                                                                                                                            
                                                  
    27
    root.addNode(node);
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.EGenericType of variable eGenericType does not match with type org.eclipse.emf.importer.rose.parser.RoseNode of variable node
    2Unmatched return null;