Program: 25875
Project: 25875
Buggy source:
/** 
 * This is a temporary method to import and commit a file. TODO use a list of steps.
 * @param file
 */
private void importAndCommitFile(CrawlFile file){
  LOG.info("String_Node_Str" + file);
  File localFile;
  Properties metadata;
  try {
    localFile=createLocalFile(file,"String_Node_Str");
    FileUtil.createDirsForFile(localFile);
    FileContent content=file.getContent();
    FileOutputStream fos=new FileOutputStream(localFile);
    IOUtils.copy(content.getInputStream(),fos);
    fos.close();
    metadata=new Properties();
    metadata.addLong("String_Node_Str",content.getSize());
    metadata.addLong("String_Node_Str",content.getLastModifiedTime());
    okFilesCount++;
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + file,e);
  }
  try {
    FileInputStream is=new FileInputStream(localFile);
    String checksum=DigestUtils.md5Hex(is);
    is.close();
    metadata.addString("String_Node_Str",checksum);
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + localFile,e);
  }
  File outputFile=createLocalFile(file,"String_Node_Str");
  Importer importer=new Importer(crawlerConfig.getImporterConfig());
  try {
    importer.importDocument(localFile,null,outputFile,metadata,file.getURL().toString());
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + file,e);
  }
  ICommitter committer=crawlerConfig.getCommitter();
  if (committer != null) {
    committer.queueAdd(file.toString(),outputFile,metadata);
  }
  if (!crawlerConfig.isKeepDownloads()) {
    LOG.debug("String_Node_Str" + localFile);
    FileUtils.deleteQuietly(localFile);
    deleteDownloadDirIfReady();
  }
}

Fixed version (ground truth):
/** 
 * This is a temporary method to import and commit a file. TODO use a list of steps.
 * @param file
 */
private void importAndCommitFile(CrawlFile file){
  LOG.info("String_Node_Str" + file);
  File localFile;
  Properties metadata;
  try {
    localFile=createLocalFile(file,"String_Node_Str");
    FileUtil.createDirsForFile(localFile);
    FileContent content=file.getContent();
    FileOutputStream fos=new FileOutputStream(localFile);
    IOUtils.copy(content.getInputStream(),fos);
    fos.close();
    metadata=new Properties();
    metadata.addLong("String_Node_Str",content.getSize());
    metadata.addLong("String_Node_Str",content.getLastModifiedTime());
    okFilesCount++;
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + file,e);
  }
  try {
    FileInputStream is=new FileInputStream(localFile);
    String checksum=DigestUtils.md5Hex(is);
    is.close();
    metadata.addString("String_Node_Str",checksum);
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + localFile,e);
  }
  File outputFile=createLocalFile(file,"String_Node_Str");
  Importer importer=new Importer(crawlerConfig.getImporterConfig());
  try {
    importer.importDocument(localFile,null,outputFile,metadata,file.getName().toString());
  }
 catch (  IOException e) {
    throw new FilesystemCollectorException("String_Node_Str" + file,e);
  }
  ICommitter committer=crawlerConfig.getCommitter();
  if (committer != null) {
    committer.queueAdd(file.toString(),outputFile,metadata);
  }
  if (!crawlerConfig.isKeepDownloads()) {
    LOG.debug("String_Node_Str" + localFile);
    FileUtils.deleteQuietly(localFile);
    deleteDownloadDirIfReady();
  }
}