if (overrideCommand != null) { overrideCommand.redo(); } else { doRedo(); }
if (overrideCommand != null) { overrideCommand.undo(); } else { doUndo(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/AbstractOverrideableCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/command/AbstractOverrideableCommand.java
Method name: void redo() Method name: void undo()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (overrideCommand != null)
1
if (overrideCommand != null)
2
    {
2
    {
3
      overrideCommand.redo();
3
      overrideCommand.undo();
4
    }
4
    }
5
    else
5
    else
6
    {
6
    {
7
      doRedo();
7
      doUndo();
8
    }
8
    }
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)13544.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (overrideCommand != null)
    1
    if (overrideCommand != null)
    2
    overrideCommand.redo();
    2
    overrideCommand.redo();
    2
    overrideCommand.undo();
    Differences
    Expression1Expression2Difference
    redoundoMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression overrideCommand.redo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression overrideCommand.undo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression overrideCommand.redo() is a void method call, and thus it cannot be parameterized
    Expression overrideCommand.undo() is a void method call, and thus it cannot be parameterized
    2
    overrideCommand.undo();
    else
    else
    3
    doRedo();
    3
    doRedo();
    3
    doUndo();
    Differences
    Expression1Expression2Difference
    doRedodoUndoMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression doRedo() is a void method call, and thus it cannot be parameterized
    Expression doUndo() is a void method call, and thus it cannot be parameterized
    3
    doUndo();
    Precondition Violations (6)
    Row Violation
    1Expression overrideCommand.redo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression overrideCommand.undo() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression overrideCommand.redo() is a void method call, and thus it cannot be parameterized
    4Expression overrideCommand.undo() is a void method call, and thus it cannot be parameterized
    5Expression doRedo() is a void method call, and thus it cannot be parameterized
    6Expression doUndo() is a void method call, and thus it cannot be parameterized