Entry entry = createEntry(feature, collection.iterator().next()); entryCollection.add(entry);
Entry entry = createEntry(feature, collection.iterator().next()); entryCollection.add(entry);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
Method name: boolean addAll(EStructuralFeature, Collection) Method name: boolean addAll(EStructuralFeature, Collection)
Number of AST nodes: 2 Number of AST nodes: 2
1
Entry entry = createEntry(feature, collection.iterator().next());
1
Entry entry = createEntry(feature, collection.iterator().next());
2
        entryCollection.add(entry);
2
        entryCollection.add(entry);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    29
    Entry entry = createEntry(feature, collection.iterator().next());
    29
    Entry entry = createEntry(feature, collection.iterator().next());
    28
    Entry entry = createEntry(feature, collection.iterator().next());
    Differences
    Expression1Expression2Difference
    VARIABLE_TYPE_MISMATCH
    java.util.Iterator<>java.util.Iterator<>VARIABLE_TYPE_MISMATCH
    java.util.Collection<>java.util.Collection<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type of variable collection.iterator().next() does not match with type of variable collection.iterator().next()
    • Make classes and extend a common superclass
    Type java.util.Iterator<> of variable collection.iterator() does not match with type java.util.Iterator<> of variable collection.iterator()
    • Make classes java.util.Iterator<> and java.util.Iterator<> extend a common superclass
    Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection
    • Make classes java.util.Collection<> and java.util.Collection<> extend a common superclass
    28
    Entry entry = createEntry(feature, collection.iterator().next());
    30
    entryCollection.add(entry);
    29
    entryCollection.add(entry);
    Precondition Violations (3)
    Row Violation
    1Type of variable collection.iterator().next() does not match with type of variable collection.iterator().next()
    2Type java.util.Iterator<> of variable collection.iterator() does not match with type java.util.Iterator<> of variable collection.iterator()
    3Type java.util.Collection<> of variable collection does not match with type java.util.Collection<> of variable collection