Program: 178565
Project: 178565
Buggy source:
public void handleJob(final Message<File> message) throws IOException {
  final DepositDirectoryConfiguration depositDirectoryConfiguration=message.getHeaders().get(DIRECTORY_CONFIG_HEADER_NAME,DepositDirectoryConfiguration.class);
  final String applicationName=depositDirectoryConfiguration.getApplicationName();
  final File dataFile=message.getPayload();
  final File depositRootDirectory=dataFile.getParentFile().getParentFile();
  final File acceptedDirectory=new File(depositRootDirectory,Configuration.DEPOSIT_ACCEPTED_SUBDIR);
  final File acceptedFile=new File(acceptedDirectory,dataFile.getName());
  FileUtils.deleteQuietly(acceptedFile);
  FileUtils.moveFile(dataFile,acceptedFile);
  final Map<String,Serializable> meta=new HashMap<String,Serializable>();
  meta.put(DEPOSIT_ROOT_DIRECTORY_META_NAME,depositRootDirectory);
  meta.put(ORIGINAL_FILENAME_META_NAME,dataFile.getName());
  meta.put(INBOX_DIRECTORY_META_NAME,dataFile.getParent());
  final MultiFilesJob job=new MultiFilesJob(Source.DIRECTORY,applicationName,getUserName(),UUID.randomUUID(),(GregorianCalendar)GregorianCalendar.getInstance(),meta);
  try {
    if (FilenameUtils.isExtension(acceptedFile.getName().toLowerCase(),"String_Node_Str")) {
      MultiFilesJob.addZipFilesToJob(new FileInputStream(acceptedFile),job);
    }
 else {
      MultiFilesJob.addDataToJob(new MimetypesFileTypeMap().getContentType(acceptedFile),acceptedFile.getName(),new FileInputStream(acceptedFile),job);
    }
    final String jobConfigurationFileName=depositDirectoryConfiguration.getJobConfigurationFileName();
    if (StringUtils.isNotBlank(jobConfigurationFileName)) {
      final File jobConfigurationFile=getJobConfigurationFile(applicationName,jobConfigurationFileName);
      job.addFile(Constants.MULTIPLE_FILES_JOB_CONFIGURATION,new FileInputStream(jobConfigurationFile));
    }
    getMessageDispatcher().dispatch(job);
  }
 catch (  final Exception e) {
    final MultiFilesResult errorResult=job.buildErrorResult(e,getMessages());
    handleDirectoryResult(errorResult);
  }
}

Fixed version (ground truth):
public void handleJob(final Message<File> message) throws IOException {
  final DepositDirectoryConfiguration depositDirectoryConfiguration=message.getHeaders().get(DIRECTORY_CONFIG_HEADER_NAME,DepositDirectoryConfiguration.class);
  final String applicationName=depositDirectoryConfiguration.getApplicationName();
  final File dataFile=message.getPayload();
  final File depositRootDirectory=dataFile.getParentFile().getParentFile();
  final File acceptedDirectory=new File(depositRootDirectory,Configuration.DEPOSIT_ACCEPTED_SUBDIR);
  final File acceptedFile=new File(acceptedDirectory,dataFile.getName());
  FileUtils.deleteQuietly(acceptedFile);
  FileUtils.moveFile(dataFile,acceptedFile);
  final Map<String,Serializable> meta=new HashMap<String,Serializable>();
  meta.put(DEPOSIT_ROOT_DIRECTORY_META_NAME,depositRootDirectory);
  meta.put(ORIGINAL_FILENAME_META_NAME,dataFile.getName());
  meta.put(INBOX_DIRECTORY_META_NAME,dataFile.getParent());
  final MultiFilesJob job=new MultiFilesJob(Source.DIRECTORY,applicationName,getUserName(),UUID.randomUUID(),(GregorianCalendar)GregorianCalendar.getInstance(),meta);
  try {
    if (FilenameUtils.isExtension(acceptedFile.getName().toLowerCase(),"String_Node_Str")) {
      MultiFilesJob.addZipFilesToJob(new FileInputStream(acceptedFile),job);
    }
 else {
      MultiFilesJob.addDataToJob(new MimetypesFileTypeMap().getContentType(acceptedFile),acceptedFile.getName(),new FileInputStream(acceptedFile),job);
    }
    final String jobConfigurationFileName=depositDirectoryConfiguration.getJobConfigurationFileName();
    if (StringUtils.isNotBlank(jobConfigurationFileName)) {
      final File jobConfigurationFile=getJobConfigurationFile(applicationName,jobConfigurationFileName);
      job.addFile(Constants.MULTIPLE_FILES_JOB_CONFIGURATION,new FileInputStream(jobConfigurationFile));
    }
    getMessageDispatcher().dispatch(job);
  }
 catch (  final Exception e) {
    final MultiFilesResult errorResult=job.buildErrorResult(e,getMessages());
    handleResult(errorResult);
  }
}