String id = EcoreUtil.getID(eObject); if (id != null) { map.put(id, eObject); }
String label = eTypeParameter.getName(); if (label != null) { result.append(label); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EGenericTypeImpl.java
Method name: void attachedHelper(EObject) Method name: void toString(StringBuilder)
Number of AST nodes: 3 Number of AST nodes: 3
1
String id = EcoreUtil.getID(eObject);
1
String label = eTypeParameter.getName();
2
      if (id != null)
2
      if (label != null)
3
      {
3
      {
4
        map.put(id, eObject);
4
        result.append(label);
5
      }
5
      }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons6
  1. {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)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    String id = EcoreUtil.getID(eObject);
                                                                                
                                                                                        
    25
    String label = eTypeParameter.getName();
    6
    if (id != null)
    6
    if (id != null)
    26
    if (label != null)
    Differences
    Expression1Expression2Difference
    idlabelVARIABLE_NAME_MISMATCH
    26
    if (label != null)
    7
    map.put(id, eObject);
                                                  
                                                      
    27
    result.append(label);
    Precondition Violations (0)
    Row Violation