if (overrideCommand != null) { overrideCommand.dispose(); } else { doDispose(); }
if (overrideCommand != null) { overrideCommand.execute(); } else { doExecute(); }
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 dispose() Method name: void execute()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (overrideCommand != null)
1
if (overrideCommand != null)
2
    {
2
    {
3
      overrideCommand.dispose();
3
      overrideCommand.execute();
4
    }
4
    }
5
    else
5
    else
6
    {
6
    {
7
      doDispose();
7
      doExecute();
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)48341.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (overrideCommand != null)
    1
    if (overrideCommand != null)
    2
    overrideCommand.dispose();
    2
    overrideCommand.dispose();
    2
    overrideCommand.execute();
    Differences
    Expression1Expression2Difference
    disposeexecuteMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression overrideCommand.dispose() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression overrideCommand.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression overrideCommand.dispose() is a void method call, and thus it cannot be parameterized
    Expression overrideCommand.execute() is a void method call, and thus it cannot be parameterized
    2
    overrideCommand.execute();
    else
    else
    3
    doDispose();
    3
    doDispose();
    3
    doExecute();
    Differences
    Expression1Expression2Difference
    doDisposedoExecuteMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression doDispose() is a void method call, and thus it cannot be parameterized
    Expression doExecute() is a void method call, and thus it cannot be parameterized
    3
    doExecute();
    Precondition Violations (6)
    Row Violation
    1Expression overrideCommand.dispose() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression overrideCommand.execute() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression overrideCommand.dispose() is a void method call, and thus it cannot be parameterized
    4Expression overrideCommand.execute() is a void method call, and thus it cannot be parameterized
    5Expression doDispose() is a void method call, and thus it cannot be parameterized
    6Expression doExecute() is a void method call, and thus it cannot be parameterized