Program: 24966
Project: 24966
Buggy source:
@Override public KBPAnswerSourceObserver answerSourceObserver(final SystemOutputAnswerSource<TypeRoleFillerRealis> systemOutputSource,final AnswerKeyAnswerSource<TypeRoleFillerRealis> answerKeyAnswerSource){
  return new KBPAnswerSourceObserver(systemOutputSource,answerKeyAnswerSource){
    private final ProvenancedConfusionMatrix.Builder<TypeRoleFillerRealis> confusionMatrixBuilder=ProvenancedConfusionMatrix.builder();
    private final StringBuilder htmlOut=new StringBuilder();
    private final StringBuilder textOut=new StringBuilder();
    @Override public void start(){
      htmlOut.append(renderer.preamble());
    }
    @Override public void annotatedSelectedResponse(    final TypeRoleFillerRealis answerable,    final Response response,    final AssessedResponse annotationForSelected,    final Set<AssessedResponse> allAssessments){
      if (ResponseCorrect.apply(annotationForSelected)) {
        textOut.append("String_Node_Str");
        confusionMatrixBuilder.record(PRESENT,PRESENT,answerable);
      }
 else {
        textOut.append("String_Node_Str").append(annotationForSelected.assessment()).append("String_Node_Str");
        confusionMatrixBuilder.record(PRESENT,ABSENT,answerable);
        htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",response,systemOutputSource.systemOutput().score(response),annotationForSelected));
        if (any(allAssessments,ResponseCorrect)) {
          textOut.append("String_Node_Str").append(Iterables.find(allAssessments,ResponseCorrect)).append("String_Node_Str");
          confusionMatrixBuilder.record(ABSENT,PRESENT,answerable);
          htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",getFirst(allAssessments,null).response(),allAssessments));
        }
      }
    }
    @Override public void unannotatedSelectedResponse(    final TypeRoleFillerRealis answerable,    final Response unannotated){
      textOut.append("String_Node_Str").append(unannotated).append("String_Node_Str");
      confusionMatrixBuilder.record(PRESENT,ABSENT,answerable);
      htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",unannotated,ImmutableList.of(systemOutputSource.systemOutput().score(unannotated)),answerKey().answers(answerable)));
    }
    @Override public void annotationsOnlyNonEmpty(    final TypeRoleFillerRealis answerable,    final Set<AssessedResponse> annotatedResponses){
      if (any(annotatedResponses,ResponseCorrect)) {
        textOut.append("String_Node_Str").append(Iterables.find(annotatedResponses,ResponseCorrect)).append("String_Node_Str");
        confusionMatrixBuilder.record(ABSENT,PRESENT,answerable);
        htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",getFirst(annotatedResponses,null).response(),annotatedResponses));
      }
 else {
        textOut.append("String_Node_Str");
      }
    }
    @Override public void end(){
      final ProvenancedConfusionMatrix<TypeRoleFillerRealis> confusionMatrix=confusionMatrixBuilder.build();
      observeDocumentConfusionMatrix(confusionMatrix);
    }
    @Override public void writeDocumentOutput(    File directory) throws IOException {
      final StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str").append(name()).append("String_Node_Str");
      final ProvenancedConfusionMatrix<TypeRoleFillerRealis> confusionMatrix=confusionMatrixBuilder.build();
      final SummaryConfusionMatrix summaryConfusionMatrix=confusionMatrix.buildSummaryMatrix();
      sb.append(summaryConfusionMatrix.prettyPrint()).append("String_Node_Str");
      sb.append(confusionMatrix.prettyPrint()).append("String_Node_Str");
      Files.asCharSink(new File(directory,"String_Node_Str"),Charsets.UTF_8).write(sb.toString());
      final String html=htmlOut.toString();
      if (!html.isEmpty()) {
        Files.asCharSink(new File(directory,"String_Node_Str"),Charsets.UTF_8).write(html);
      }
    }
  }
;
}

Fixed version (ground truth):
@Override public KBPAnswerSourceObserver answerSourceObserver(final SystemOutputAnswerSource<TypeRoleFillerRealis> systemOutputSource,final AnswerKeyAnswerSource<TypeRoleFillerRealis> answerKeyAnswerSource){
  return new KBPAnswerSourceObserver(systemOutputSource,answerKeyAnswerSource){
    private final ProvenancedConfusionMatrix.Builder<TypeRoleFillerRealis> confusionMatrixBuilder=ProvenancedConfusionMatrix.builder();
    private final StringBuilder htmlOut=new StringBuilder();
    private final StringBuilder textOut=new StringBuilder();
    @Override public void start(){
      htmlOut.append(renderer.preamble());
    }
    @Override public void annotatedSelectedResponse(    final TypeRoleFillerRealis answerable,    final Response response,    final AssessedResponse annotationForSelected,    final Set<AssessedResponse> allAssessments){
      if (ResponseCorrect.apply(annotationForSelected)) {
        textOut.append("String_Node_Str");
        confusionMatrixBuilder.record(PRESENT,PRESENT,answerable);
      }
 else {
        textOut.append("String_Node_Str").append(annotationForSelected.assessment()).append("String_Node_Str");
        confusionMatrixBuilder.record(PRESENT,ABSENT,answerable);
        htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",response,systemOutputSource.systemOutput().score(response),annotationForSelected));
        checkForFalseNegative(answerable,allAssessments);
      }
    }
    private boolean checkForFalseNegative(    final TypeRoleFillerRealis answerable,    final Set<AssessedResponse> assessedResponses){
      if (any(assessedResponses,ResponseCorrect)) {
        textOut.append("String_Node_Str").append(Iterables.find(assessedResponses,ResponseCorrect)).append("String_Node_Str");
        confusionMatrixBuilder.record(ABSENT,PRESENT,answerable);
        htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",getFirst(assessedResponses,null).response(),assessedResponses));
        return true;
      }
 else {
        return false;
      }
    }
    @Override public void unannotatedSelectedResponse(    final TypeRoleFillerRealis answerable,    final Response unannotated,    Set<AssessedResponse> annotatedResponses){
      textOut.append("String_Node_Str").append(unannotated).append("String_Node_Str");
      confusionMatrixBuilder.record(PRESENT,ABSENT,answerable);
      htmlOut.append(renderer.vsAnnotated("String_Node_Str","String_Node_Str",unannotated,ImmutableList.of(systemOutputSource.systemOutput().score(unannotated)),answerKey().answers(answerable)));
      checkForFalseNegative(answerable,annotatedResponses);
    }
    @Override public void annotationsOnlyNonEmpty(    final TypeRoleFillerRealis answerable,    final Set<AssessedResponse> annotatedResponses){
      if (checkForFalseNegative(answerable,annotatedResponses)) {
      }
 else {
        textOut.append("String_Node_Str");
      }
    }
    @Override public void end(){
      final ProvenancedConfusionMatrix<TypeRoleFillerRealis> confusionMatrix=confusionMatrixBuilder.build();
      observeDocumentConfusionMatrix(confusionMatrix);
    }
    @Override public void writeDocumentOutput(    File directory) throws IOException {
      final StringBuilder sb=new StringBuilder();
      sb.append("String_Node_Str").append(name()).append("String_Node_Str");
      final ProvenancedConfusionMatrix<TypeRoleFillerRealis> confusionMatrix=confusionMatrixBuilder.build();
      final SummaryConfusionMatrix summaryConfusionMatrix=confusionMatrix.buildSummaryMatrix();
      sb.append(summaryConfusionMatrix.prettyPrint()).append("String_Node_Str");
      sb.append(confusionMatrix.prettyPrint()).append("String_Node_Str");
      Files.asCharSink(new File(directory,"String_Node_Str"),Charsets.UTF_8).write(sb.toString());
      final String html=htmlOut.toString();
      if (!html.isEmpty()) {
        Files.asCharSink(new File(directory,"String_Node_Str"),Charsets.UTF_8).write(html);
      }
    }
  }
;
}