if (rootValidator.validate(memberType, value, null, context)) { return true; }
if (isZipFile(file)) { return createZipImportOperation(projectDescriptor, file); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EObjectValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/common/ui/wizard/AbstractExampleInstallerWizard.java
Method name: boolean validate(EDataType, Object, DiagnosticChain, Map) Method name: ImportOperation createFileImportOperation(ProjectDescriptor)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (rootValidator.validate(memberType, value, null, context))
1
if (isZipFile(file))
2
          {
2
        {
3
            return true;
3
          return 
4
  
4
createZipImportOperation(projectDescriptor, file);
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.1
Clones locationClones are in different classes
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1784.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    55
    if (rootValidator.validate(memberType, value, null, context))
    55
    if (rootValidator.validate(memberType, value, null, context))
    8
    if (isZipFile(file))
    Differences
    Expression1Expression2Difference
    validateisZipFileMETHOD_INVOCATION_NAME_MISMATCH
    rootValidator.validate(memberType,value,null,context)isZipFile(file)ARGUMENT_NUMBER_MISMATCH
    rootValidatorMISSING_METHOD_INVOCATION_EXPRESSION
    8
    if (isZipFile(file))
                                                                                                                          
    9
    return createZipImportOperation(projectDescriptor, file);
    Preondition Violations
    Unmatched return createZipImportOperation(projectDescriptor,file);
    9
    return createZipImportOperation(projectDescriptor, file);
    56
    return true;
    56
    return true;
    Preondition Violations
    Unmatched return true;
                                    
    Precondition Violations (2)
    Row Violation
    1Unmatched return createZipImportOperation(projectDescriptor,file);
    2Unmatched return true;