EGenericType eGenericSuperType = i.next(); result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); if (i.hasNext()) { result.append(", "); }
ETypeParameter eTypeParameter = i.next(); result.append(ETypeParameterItemProvider.getText(eTypeParameter)); 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/EDataTypeItemProvider.java
Method name: String getText(Object) Method name: String getText(Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
EGenericType eGenericSuperType = i.next();
1
ETypeParameter eTypeParameter = i.next();
2
        result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
2
        result.append(ETypeParameterItemProvider.getText(eTypeParameter));
3
        if (i.hasNext())
3
        if (i.hasNext())
4
        {
4
        {
5
          result.append(", ");
5
          result.append(", ");
6
        }
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 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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                        
    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
    7
    ETypeParameter eTypeParameter = i.next();
                                                                                                                                              
    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
    8
    result.append(ETypeParameterItemProvider.getText(eTypeParameter));
    16
    EGenericType eGenericSuperType = i.next();
    16
    EGenericType eGenericSuperType = i.next();
    Preondition Violations
    Unmatched statement EGenericType eGenericSuperType=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                            
    17
    result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
    17
    result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
    Preondition Violations
    Unmatched statement result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                  
    18
    if (i.hasNext())
    18
    if (i.hasNext())
    9
    if (i.hasNext())
    Differences
    Expression1Expression2Difference
    java.util.Iteratorjava.util.IteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Iterator<org.eclipse.emf.ecore.EGenericType> of variable i does not match with type java.util.Iterator<org.eclipse.emf.ecore.ETypeParameter> of variable i
    • Make classes java.util.Iterator and java.util.Iterator extend a common superclass
    9
    if (i.hasNext())
    19
    result.append(", ");
    10
    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 eGenericSuperType=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(eGenericSuperType)); 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.EGenericType> of variable i does not match with type java.util.Iterator<org.eclipse.emf.ecore.ETypeParameter> of variable i