Program: 24918
Project: 24918
Buggy source:
private static void trueMain(String[] argv) throws IOException {
  if (argv.length != 1) {
    System.err.println(USAGE);
    System.exit(1);
  }
  final Parameters params=Parameters.loadSerifStyle(new File(argv[0]));
  final AnnotationStore argumentAnnotationStore=AssessmentSpecFormats.openAnnotationStore(params.getExistingDirectory("String_Node_Str"),AssessmentSpecFormats.Format.KBP2015);
  final Optional<LinkingStore> optLinkingAnnotationStore=getOptionalLinkingStore("String_Node_Str",params);
  final Optional<LinkingStore> optLinkingOut=getOptionalLinkingStore("String_Node_Str",params);
  checkArgument(optLinkingAnnotationStore.isPresent() == optLinkingOut.isPresent(),"String_Node_Str");
  final Multimap<Symbol,Symbol> typesToValidRoles=FileUtils.loadSymbolMultimap(Files.asCharSource(params.getExistingFile("String_Node_Str"),Charsets.UTF_8));
  if (optLinkingAnnotationStore.isPresent() && !argumentAnnotationStore.docIDs().containsAll(optLinkingAnnotationStore.get().docIDs())) {
    throw new RuntimeException("String_Node_Str");
  }
  final AnnotationStore outputArgumentStore=AssessmentSpecFormats.createAnnotationStore(params.getCreatableDirectory("String_Node_Str"),AssessmentSpecFormats.Format.KBP2015);
  int numDeletedTotal=0;
  for (  final Symbol docID : argumentAnnotationStore.docIDs()) {
    final AnswerKey original=argumentAnnotationStore.read(docID);
    final ResponseMapping toDelete=selectWhichToDelete(original,typesToValidRoles);
    outputArgumentStore.write(toDelete.apply(original));
    if (optLinkingAnnotationStore.isPresent()) {
      final Optional<ResponseLinking> originalLinking=optLinkingAnnotationStore.get().read(original);
      if (originalLinking.isPresent()) {
        optLinkingOut.get().write(toDelete.apply(originalLinking.get()));
      }
    }
  }
  argumentAnnotationStore.close();
  outputArgumentStore.close();
  if (optLinkingAnnotationStore.isPresent()) {
    optLinkingAnnotationStore.get().close();
    optLinkingOut.get().close();
  }
}

Fixed version (ground truth):
private static void trueMain(String[] argv) throws IOException {
  if (argv.length != 1) {
    System.err.println(USAGE);
    System.exit(1);
  }
  final Parameters params=Parameters.loadSerifStyle(new File(argv[0]));
  final AnnotationStore argumentAnnotationStore=AssessmentSpecFormats.openAnnotationStore(params.getExistingDirectory("String_Node_Str"),AssessmentSpecFormats.Format.KBP2015);
  final Optional<LinkingStore> optLinkingAnnotationStore=getOptionalLinkingStore("String_Node_Str",params);
  final Optional<LinkingStore> optLinkingOut=getOptionalLinkingStore("String_Node_Str",params);
  checkArgument(optLinkingAnnotationStore.isPresent() == optLinkingOut.isPresent(),"String_Node_Str");
  final Multimap<Symbol,Symbol> typesToValidRoles=loadTypesToValidRolesMap(params);
  if (optLinkingAnnotationStore.isPresent() && !argumentAnnotationStore.docIDs().containsAll(optLinkingAnnotationStore.get().docIDs())) {
    throw new RuntimeException("String_Node_Str");
  }
  final AnnotationStore outputArgumentStore=AssessmentSpecFormats.createAnnotationStore(params.getCreatableDirectory("String_Node_Str"),AssessmentSpecFormats.Format.KBP2015);
  int numDeletedTotal=0;
  for (  final Symbol docID : argumentAnnotationStore.docIDs()) {
    final AnswerKey original=argumentAnnotationStore.read(docID);
    final ResponseMapping toDelete=selectWhichToDelete(original,typesToValidRoles);
    outputArgumentStore.write(toDelete.apply(original));
    if (optLinkingAnnotationStore.isPresent()) {
      final Optional<ResponseLinking> originalLinking=optLinkingAnnotationStore.get().read(original);
      if (originalLinking.isPresent()) {
        optLinkingOut.get().write(toDelete.apply(originalLinking.get()));
      }
    }
  }
  argumentAnnotationStore.close();
  outputArgumentStore.close();
  if (optLinkingAnnotationStore.isPresent()) {
    optLinkingAnnotationStore.get().close();
    optLinkingOut.get().close();
  }
}