if (hasMarkers(resources.get(i), includeSubtypes, depth)) { return true; }
if (collection.contains(object)) { filteredResult.add(object); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/util/EditUIMarkerHelper.java File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingEList.java
Method name: boolean hasMarkers(Object, boolean, int) Method name: Collection getDuplicates(Collection)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (hasMarkers(resources.get(i), includeSubtypes, depth))
1
if (
2
        {
3
          return true
2
collection.contains(object))
3
        {
4
;
4
          filteredResult.add(object);
5
        }
5
        }
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.1
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1927.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (hasMarkers(resources.get(i), includeSubtypes, depth))
    5
    if (hasMarkers(resources.get(i), includeSubtypes, depth))
    5
    if (collection.contains(object))
    Differences
    Expression1Expression2Difference
    hasMarkerscontainsMETHOD_INVOCATION_NAME_MISMATCH
    hasMarkers(resources.get(i),includeSubtypes,depth)collection.contains(object)ARGUMENT_NUMBER_MISMATCH
    collectionMISSING_METHOD_INVOCATION_EXPRESSION
    5
    if (collection.contains(object))
                                                                
    6
    filteredResult.add(object);
    6
    return true;
    6
    return true;
    Preondition Violations
    Unmatched return true;
                                  
    Precondition Violations (1)
    Row Violation
    1Unmatched return true;