for (Command command : commandList) { if (!command.canUndo()) { return false; } } return true;
for (Object replacement : collection) { if (!feature.getEType().isInstance(replacement)) { return false; } } return true;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/command/CompoundCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/ReplaceCommand.java
Method name: boolean canUndo() Method name: boolean prepare()
Number of AST nodes: 4 Number of AST nodes: 4
1
for (Command command : commandList)
1
for (
2
Object replacement : collection)
2
    {
3
      {
3
      if (!command.canUndo())
4
        if (!feature.getEType().isInstance(replacement))
4
      {
5
      
6
  {
5
        return false;
7
          return false;
6
      }
8
        }
7
    }
9
      }
8
    return true;
10
      return true;
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 having the same super class
Number of node comparisons1