result.append("<"); for (Iterator<ETypeParameter> i = eDataType.getETypeParameters().iterator(); i.hasNext(); ) { ETypeParameter eTypeParameter = i.next(); result.append(ETypeParameterItemProvider.getText(eTypeParameter)); if (i.hasNext()) { result.append(", "); } } result.append(">");
result.append(" throws "); 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/EDataTypeItemProvider.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: 7 Number of AST nodes: 6
1
result.append("<");
1
result.append(" throws ");
2
      for (Iterator<ETypeParameter> i = eDataType.getETypeParameters().iterator(); i.hasNext(); )
2
      for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )
3
      {
3
      {
4
        ETypeParameter eTypeParameter = i.next();
4
        EGenericType eException = i.next();
5
        result.append(ETypeParameterItemProvider.getText(eTypeParameter));
5
        result.append(EGenericTypeItemProvider.getText(eException));
6
        if (i.hasNext())
6
        if (i.hasNext())
7
        {
7
        {
8
          result.append(", ");
8
          result.append(", ");
9
        }
9
        }
10
      }
10
      }
11
      result.append(">");
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 having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)5.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    ETypeParameter eTypeParameter = i.next();
    7
    ETypeParameter eTypeParameter = i.next();
    Preondition Violations
    Unmatched statement ETypeParameter eTypeParameter=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                        
    8
    result.append(ETypeParameterItemProvider.getText(eTypeParameter));
    8
    result.append(ETypeParameterItemProvider.getText(eTypeParameter));
    Preondition Violations
    Unmatched statement result.append(ETypeParameterItemProvider.getText(eTypeParameter)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                              
                                                                              
    25
    EGenericType eException = i.next();
    Preondition Violations
    Unmatched statement EGenericType eException=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    25
    EGenericType eException = i.next();
                                                                                                                                    
    26
    result.append(EGenericTypeItemProvider.getText(eException));
    Preondition Violations
    Unmatched statement result.append(EGenericTypeItemProvider.getText(eException)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    26
    result.append(EGenericTypeItemProvider.getText(eException));
    9
    if (i.hasNext())
    9
    if (i.hasNext())
    27
    if (i.hasNext())
    Differences
    Expression1Expression2Difference
    java.util.Iteratorjava.util.IteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Iterator<org.eclipse.emf.ecore.ETypeParameter> of variable i does not match with type java.util.Iterator<org.eclipse.emf.ecore.EGenericType> of variable i
    • Make classes java.util.Iterator and java.util.Iterator extend a common superclass
    27
    if (i.hasNext())
    10
    result.append(", ");
    28
    result.append(", ");
    Precondition Violations (5)
    Row Violation
    1Unmatched statement ETypeParameter eTypeParameter=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement result.append(ETypeParameterItemProvider.getText(eTypeParameter)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement EGenericType eException=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement result.append(EGenericTypeItemProvider.getText(eException)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Type java.util.Iterator<org.eclipse.emf.ecore.ETypeParameter> of variable i does not match with type java.util.Iterator<org.eclipse.emf.ecore.EGenericType> of variable i