for (Diagnostic childDiagnostic : diagnostic.getChildren()) { eclipseResourcesUtil.createMarkers(resource, childDiagnostic); }
for (Diagnostic childDiagnostic : diagnostic.getChildren()) { createMarkers(childDiagnostic); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/ui/action/ValidateAction.java File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/MarkerHelper.java
Method name: void handleDiagnostic(Diagnostic) Method name: void createMarkers(Diagnostic)
Number of AST nodes: 2 Number of AST nodes: 2
1
for (Diagnostic childDiagnostic : diagnostic.getChildren())
1
for (Diagnostic childDiagnostic : diagnostic.getChildren())
2
          {
2
      
3
            eclipseResourcesUtil.
3
{
4
createMarkers(resource, childDiagnostic);
4
        createMarkers(childDiagnostic);
5
          }
5
      }
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.2
Clones locationClones are in different classes
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)6.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    30
    for (Diagnostic childDiagnostic : diagnostic.getChildren())
    4
    for (Diagnostic childDiagnostic : diagnostic.getChildren())
    31
    eclipseResourcesUtil.createMarkers(resource, childDiagnostic);
    31
    eclipseResourcesUtil.createMarkers(resource, childDiagnostic);
    5
    createMarkers(childDiagnostic);
    Differences
    Expression1Expression2Difference
    eclipseResourcesUtil.createMarkers(resource,childDiagnostic)createMarkers(childDiagnostic)ARGUMENT_NUMBER_MISMATCH
    eclipseResourcesUtilMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression eclipseResourcesUtil.createMarkers(resource,childDiagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createMarkers(childDiagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression eclipseResourcesUtil.createMarkers(resource,childDiagnostic) is a void method call, and thus it cannot be parameterized
    Expression createMarkers(childDiagnostic) is a void method call, and thus it cannot be parameterized
    5
    createMarkers(childDiagnostic);
    Precondition Violations (4)
    Row Violation
    1Expression eclipseResourcesUtil.createMarkers(resource,childDiagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression createMarkers(childDiagnostic) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression eclipseResourcesUtil.createMarkers(resource,childDiagnostic) is a void method call, and thus it cannot be parameterized
    4Expression createMarkers(childDiagnostic) is a void method call, and thus it cannot be parameterized