if (pageDiagnosticHandler == null) { pageDiagnosticHandler = new PageDiagnosticHandler(this); } pageDiagnosticHandler.handleDiagnostic(diagnostic, message, dialogTitle, dialogMessage);
if (diagnosticHandler == null) { diagnosticHandler = new ConverterUIUtil.DiagnosticHandler(); } diagnosticHandler.handleDiagnostic(diagnostic);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/converter/ui/contribution/base/ModelConverterPage.java File path: /emf-2.4.1/src/org/eclipse/emf/converter/ui/contribution/base/ModelConverterWizard.java
Method name: void handleDiagnostic(Diagnostic, String, String, String) Method name: void handleConvertDiagnostic(Diagnostic)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (pageDiagnosticHandler == null)
1
if (diagnosticHandler == null)
2
    {
2
      {
3
      pageDiagnosticHandler = new PageDiagnosticHandler(this);
3
        diagnosticHandler = new ConverterUIUtil.DiagnosticHandler();
4
    }
4
      }
5
    pageDiagnosticHandler.handleDiagnostic(diagnostic, message, dialogTitle, dialogMessage);
5
      diagnosticHandler.handleDiagnostic(diagnostic);
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 in different classes
Number of node comparisons5
  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)47.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (pageDiagnosticHandler == null)
    1
    if (pageDiagnosticHandler == null)
    2
    if (diagnosticHandler == null)
    Differences
    Expression1Expression2Difference
    pageDiagnosticHandlerdiagnosticHandlerVARIABLE_NAME_MISMATCH
    org.eclipse.emf.converter.ui.contribution.base.ModelConverterPage.PageDiagnosticHandlerorg.eclipse.emf.converter.util.ConverterUIUtil.DiagnosticHandlerSUBCLASS_TYPE_MISMATCH
    2
    if (diagnosticHandler == null)
    2
    pageDiagnosticHandler = new PageDiagnosticHandler(this);
    2
    pageDiagnosticHandler = new PageDiagnosticHandler(this);
    3
    diagnosticHandler = new ConverterUIUtil.DiagnosticHandler();
    Differences
    Expression1Expression2Difference
    pageDiagnosticHandlerdiagnosticHandlerVARIABLE_NAME_MISMATCH
    org.eclipse.emf.converter.ui.contribution.base.ModelConverterPage.PageDiagnosticHandlerorg.eclipse.emf.converter.util.ConverterUIUtil.DiagnosticHandlerSUBCLASS_TYPE_MISMATCH
    PageDiagnosticHandlerConverterUIUtil.DiagnosticHandlerTYPE_COMPATIBLE_REPLACEMENT
    new PageDiagnosticHandler(this)new ConverterUIUtil.DiagnosticHandler()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression pageDiagnosticHandler is a field being modified, and thus it cannot be parameterized
    Expression diagnosticHandler is a field being modified, and thus it cannot be parameterized
    3
    diagnosticHandler = new ConverterUIUtil.DiagnosticHandler();
    3
    pageDiagnosticHandler.handleDiagnostic(diagnostic, message, dialogTitle, dialogMessage);
    3
    pageDiagnosticHandler.handleDiagnostic(diagnostic, message, dialogTitle, dialogMessage);
    4
    diagnosticHandler.handleDiagnostic(diagnostic);
    Differences
    Expression1Expression2Difference
    pageDiagnosticHandlerdiagnosticHandlerVARIABLE_NAME_MISMATCH
    org.eclipse.emf.converter.ui.contribution.base.ModelConverterPage.PageDiagnosticHandlerorg.eclipse.emf.converter.util.ConverterUIUtil.DiagnosticHandlerSUBCLASS_TYPE_MISMATCH
    pageDiagnosticHandler.handleDiagnostic(diagnostic,message,dialogTitle,dialogMessage)diagnosticHandler.handleDiagnostic(diagnostic)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression pageDiagnosticHandler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression diagnosticHandler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pageDiagnosticHandler.handleDiagnostic(diagnostic,message,dialogTitle,dialogMessage) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression diagnosticHandler.handleDiagnostic(diagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pageDiagnosticHandler.handleDiagnostic(diagnostic,message,dialogTitle,dialogMessage) is a void method call, and thus it cannot be parameterized
    Expression diagnosticHandler.handleDiagnostic(diagnostic) is a void method call, and thus it cannot be parameterized
    4
    diagnosticHandler.handleDiagnostic(diagnostic);
    Precondition Violations (8)
    Row Violation
    1Expression pageDiagnosticHandler is a field being modified, and thus it cannot be parameterized
    2Expression diagnosticHandler is a field being modified, and thus it cannot be parameterized
    3Expression pageDiagnosticHandler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression diagnosticHandler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression pageDiagnosticHandler.handleDiagnostic(diagnostic,message,dialogTitle,dialogMessage) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression diagnosticHandler.handleDiagnostic(diagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression pageDiagnosticHandler.handleDiagnostic(diagnostic,message,dialogTitle,dialogMessage) is a void method call, and thus it cannot be parameterized
    8Expression diagnosticHandler.handleDiagnostic(diagnostic) is a void method call, and thus it cannot be parameterized