List<Object> enumerators = new ArrayList<Object>(); for (String enumerator : enumeration) { enumerators.add(EcoreUtil.createFromString(eDataType, enumerator)); } return enumerators;
Collection<Object> result = new ArrayList<Object>(); for (Command command : commandList) { result.addAll(command.getResult()); } return result;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ItemPropertyDescriptor.java File path: /emf-2.4.1/src/org/eclipse/emf/common/command/CompoundCommand.java
Method name: Collection getComboBoxObjects(Object) Method name: Collection getMergedResultCollection()
Number of AST nodes: 4 Number of AST nodes: 4
1
List<Object> enumerators = new ArrayList<Object>();
1
Collection<Object> result = new ArrayList<Object>();
2
        
3
    for (String enumerator : enumeration)
2
    for (
4
            {
5
              enumerators.add(EcoreUtil.createFromString(eDataType, enumerator));
6
            }
7
            return enumerators
3
Command command : commandList)
4
    {
5
      result.addAll(command.getResult());
6
    }
8
;
7
    return result;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons1