for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); ) { EGenericType eGenericSuperType = i.next(); result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); if (i.hasNext()) { result.append(", "); } }
for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); ) { EGenericType eException = i.next(); result.append(EGenericTypeItemProvider.getText(eException)); if (i.hasNext()) { result.append(", "); } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EClassItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EOperationItemProvider.java
Method name: String getText(Object) Method name: String getText(Object)
Number of AST nodes: 5 Number of AST nodes: 5
1
for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); )
1
for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )
2
      {
2
      {
3
        EGenericType eGenericSuperType = i.next();
3
        EGenericType eException = i.next();
4
        result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
4
        result.append(EGenericTypeItemProvider.getText(eException));
5
        if (i.hasNext())
5
        if (i.hasNext())
6
        {
6
        {
7
          result.append(", ");
7
          result.append(", ");
8
        }
8
        }
9
      }
9
      }
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {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)14.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    16
    EGenericType eGenericSuperType = i.next();
    16
    EGenericType eGenericSuperType = i.next();
    25
    EGenericType eException = i.next();
    Differences
    Expression1Expression2Difference
    eGenericSuperTypeeExceptionVARIABLE_NAME_MISMATCH
    25
    EGenericType eException = i.next();
    17
    result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
    17
    result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
    26
    result.append(EGenericTypeItemProvider.getText(eException));
    Differences
    Expression1Expression2Difference
    eGenericSuperTypeeExceptionVARIABLE_NAME_MISMATCH
    26
    result.append(EGenericTypeItemProvider.getText(eException));
    18
    if (i.hasNext())
    27
    if (i.hasNext())
    19
    result.append(", ");
    28
    result.append(", ");
    Precondition Violations (0)
    Row Violation