Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName(); if (nameDiagnostic.getSeverity() != Diagnostic.OK) { if (diagnostic.getSeverity() == Diagnostic.OK) { diagnostic = nameDiagnostic; } else { diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic); } }
Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName(); if (nameDiagnostic.getSeverity() != Diagnostic.OK) { if (diagnostic.getSeverity() == Diagnostic.OK) { diagnostic = nameDiagnostic; } else { diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic); } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/ui/RoseDetailPage.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/ui/contribution/base/ModelImporterDetailPage.java
Method name: void loadPathMapSymbols() Method name: void refreshModel(Monitor)
Number of AST nodes: 5 Number of AST nodes: 5
1
Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName();
1
Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName();
2
    if (nameDiagnostic.getSeverity() != Diagnostic.OK)
2
    if (nameDiagnostic.getSeverity() != Diagnostic.OK)
3
    {
3
    {
4
      if (diagnostic.getSeverity() == Diagnostic.OK)
4
      if (diagnostic.getSeverity() == Diagnostic.OK)
5
      {
5
      {
6
        diagnostic = nameDiagnostic;
6
        diagnostic = nameDiagnostic;
7
      }
7
      }
8
      else
8
      else
9
      {
9
      {
10
        diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
10
        diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
11
      }
11
      }
12
    }
12
    }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons11
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName();
    5
    Diagnostic nameDiagnostic = getRoseImporter().checkGenModelFileName();
    6
    Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName();
    Differences
    Expression1Expression2Difference
    getRoseImportergetModelImporterMETHOD_INVOCATION_NAME_MISMATCH
    6
    Diagnostic nameDiagnostic = getModelImporter().checkGenModelFileName();
    6
    if (nameDiagnostic.getSeverity() != Diagnostic.OK)
    7
    if (nameDiagnostic.getSeverity() != Diagnostic.OK)
    7
    if (diagnostic.getSeverity() == Diagnostic.OK)
    8
    if (diagnostic.getSeverity() == Diagnostic.OK)
    8
    diagnostic = nameDiagnostic;
    9
    diagnostic = nameDiagnostic;
    else
    else
    9
    diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
    10
    diagnostic = ConverterUtil.mergeDiagnostic(diagnostic, nameDiagnostic);
    Precondition Violations (0)
    Row Violation