super.redo(); if (domain != null) { oldClipboard = domain.getClipboard(); domain.setClipboard(new ArrayList<Object>(command.getResult())); }
super.execute(); if (domain != null) { oldClipboard = domain.getClipboard(); domain.setClipboard(new ArrayList<Object>(command.getResult())); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/CutToClipboardCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/CutToClipboardCommand.java
Method name: void redo() Method name: void execute()
Number of AST nodes: 4 Number of AST nodes: 4
1
super.redo();
1
super.execute();
2
    if (domain != null)
2
    if (domain != null)
3
    {
3
    {
4
      oldClipboard = domain.getClipboard();
4
      oldClipboard = domain.getClipboard();
5
      domain.setClipboard(new ArrayList<Object>(command.getResult()));
5
      domain.setClipboard(new ArrayList<Object>(command.getResult()));
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.1
Clones locationClones are declared in the same class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super.redo();
    1
    super.redo();
    1
    super.execute();
    Differences
    Expression1Expression2Difference
    redoexecuteMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression super.redo() is a void method call, and thus it cannot be parameterized
    Expression super.execute() is a void method call, and thus it cannot be parameterized
    1
    super.execute();
    2
    if (domain != null)
    2
    if (domain != null)
    3
    oldClipboard = domain.getClipboard();
    3
    oldClipboard = domain.getClipboard();
    4
    domain.setClipboard(new ArrayList<Object>(command.getResult()));
    4
    domain.setClipboard(new ArrayList<Object>(command.getResult()));
    Precondition Violations (2)
    Row Violation
    1Expression super.redo() is a void method call, and thus it cannot be parameterized
    2Expression super.execute() is a void method call, and thus it cannot be parameterized