Program: 20774
Project: 20774
Buggy source:
public void extract(){
  try {
    for (    ISimpleInArchiveItem item : inArchive.getSimpleInterface().getArchiveItems()) {
      final File extractTo=new File(archive.getExtractTo().getAbsoluteFile() + File.separator + item.getPath());
      if (item.getSize() == 0) {
        continue;
      }
      if (!extractTo.exists()) {
        if ((!extractTo.getParentFile().exists() && !extractTo.getParentFile().mkdirs()) || !extractTo.createNewFile()) {
          archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CREATE_ERROR);
          return;
        }
      }
 else {
        if (archive.isOverwriteFiles()) {
          if (!extractTo.delete()) {
            archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
            return;
          }
        }
 else {
          con.getArchiv().setExtracted(con.getArchiv().getExtracted() + item.getSize());
          continue;
        }
      }
      MultiCallback call=new MultiCallback(extractTo,con,item.getCRC() > 0 ? true : false);
      ExtractOperationResult res;
      if (item.isEncrypted()) {
        res=item.extractSlow(call,archive.getPassword());
      }
 else {
        res=item.extractSlow(call);
      }
      if (item.getSize() != extractTo.length()) {
        for (        DownloadLink link : getAffectedDownloadLinkFromArchvieFiles(item.getPath())) {
          archive.addCrcError(link);
        }
        archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CRC_ERROR);
        return;
      }
      if (res != ExtractOperationResult.OK) {
        archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
        return;
      }
      postprocessing.add(extractTo.getAbsolutePath());
    }
  }
 catch (  SevenZipException e) {
    archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
    return;
  }
catch (  IOException e) {
    e.printStackTrace();
    archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CREATE_ERROR);
    return;
  }
  archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_SUCCESS);
}

Fixed version (ground truth):
public void extract(){
  try {
    for (    ISimpleInArchiveItem item : inArchive.getSimpleInterface().getArchiveItems()) {
      final File extractTo=new File(archive.getExtractTo().getAbsoluteFile() + File.separator + item.getPath());
      if (item.getSize() == 0) {
        continue;
      }
      if (!extractTo.exists()) {
        if ((!extractTo.getParentFile().exists() && !extractTo.getParentFile().mkdirs()) || !extractTo.createNewFile()) {
          archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CREATE_ERROR);
          return;
        }
      }
 else {
        if (archive.isOverwriteFiles()) {
          if (!extractTo.delete()) {
            archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
            return;
          }
        }
 else {
          con.getArchiv().setExtracted(con.getArchiv().getExtracted() + item.getSize());
          continue;
        }
      }
      MultiCallback call=new MultiCallback(extractTo,this,item.getCRC() > 0 ? true : false);
      ExtractOperationResult res;
      if (item.isEncrypted()) {
        res=item.extractSlow(call,archive.getPassword());
      }
 else {
        res=item.extractSlow(call);
      }
      updatedisplay();
      if (item.getSize() != extractTo.length()) {
        for (        DownloadLink link : getAffectedDownloadLinkFromArchvieFiles(item.getPath())) {
          archive.addCrcError(link);
        }
        archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CRC_ERROR);
        return;
      }
      if (res != ExtractOperationResult.OK) {
        archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
        return;
      }
      postprocessing.add(extractTo.getAbsolutePath());
    }
  }
 catch (  SevenZipException e) {
    archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_FATAL_ERROR);
    return;
  }
catch (  IOException e) {
    e.printStackTrace();
    archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_CREATE_ERROR);
    return;
  }
  archive.setExitCode(ExtractionControllerConstants.EXIT_CODE_SUCCESS);
}