try { markerHelper.createMarkers(diagnostic); } catch (CoreException exception) { Ecore2XMLUIPlugin.INSTANCE.log(exception); }
try { markerUtil.createMarkers(diagnostic); } catch (CoreException exception) { openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"), exception); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/editor/ProblemEditorPart.java
Method name: void updateProblemIndication() Method name: void createMarkers()
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
          {
2
        
3
  
3
{
4
          markerHelper.createMarkers(diagnostic);
4
          markerUtil.createMarkers(diagnostic);
5
          }
5
        }
6
          catch (CoreException exception)
6
        catch (CoreException exception)
7
          {
7
        {
8
            Ecore2XMLUIPlugin.INSTANCE.log(exception);
8
          openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"), exception);
9
          }
9
        }
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    23
    try
    23
    try
    4
    try
    Differences
    Expression1Expression2Difference
    logopenErrorDialogMETHOD_INVOCATION_NAME_MISMATCH
    Ecore2XMLUIPlugin.INSTANCE.log(exception)openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"),exception)ARGUMENT_NUMBER_MISMATCH
    Ecore2XMLUIPlugin.INSTANCEMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression Ecore2XMLUIPlugin.INSTANCE.log(exception) is a void method call, and thus it cannot be parameterized
    Expression openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"),exception) is a void method call, and thus it cannot be parameterized
    Expression Ecore2XMLUIPlugin.INSTANCE.log(exception) is a void method call, and thus it cannot be parameterized
    Expression openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"),exception) is a void method call, and thus it cannot be parameterized
    4
    try
    24
    markerHelper.createMarkers(diagnostic);
    24
    markerHelper.createMarkers(diagnostic);
    5
    markerUtil.createMarkers(diagnostic);
    Differences
    Expression1Expression2Difference
    org.eclipse.emf.common.util.BasicDiagnosticorg.eclipse.emf.common.util.DiagnosticVARIABLE_TYPE_MISMATCH
    markerHelpermarkerUtilVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.common.util.BasicDiagnostic of variable diagnostic does not match with type org.eclipse.emf.common.util.Diagnostic of variable diagnostic
    • Make classes org.eclipse.emf.common.util.BasicDiagnostic and org.eclipse.emf.common.util.Diagnostic extend a common superclass
    5
    markerUtil.createMarkers(diagnostic);
    Precondition Violations (5)
    Row Violation
    1Expression Ecore2XMLUIPlugin.INSTANCE.log(exception) is a void method call, and thus it cannot be parameterized
    2Expression openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"),exception) is a void method call, and thus it cannot be parameterized
    3Expression Ecore2XMLUIPlugin.INSTANCE.log(exception) is a void method call, and thus it cannot be parameterized
    4Expression openErrorDialog(CommonUIPlugin.getPlugin().getString("_UI_CreateMarkerError_message"),exception) is a void method call, and thus it cannot be parameterized
    5Type org.eclipse.emf.common.util.BasicDiagnostic of variable diagnostic does not match with type org.eclipse.emf.common.util.Diagnostic of variable diagnostic