Program: 53385
Project: 53385
Buggy source:
/** 
 * Main method to do Named Entity tagging.
 * @param inputStream the input stream containing the content to tag
 * @param outputStream the output stream providing the named entities
 * @throws IOException exception if problems in input or output streams
 */
public final void annotate(final InputStream inputStream,final OutputStream outputStream) throws IOException, JDOMException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(inputStream,"String_Node_Str"));
  BufferedWriter bwriter=new BufferedWriter(new OutputStreamWriter(outputStream,"String_Node_Str"));
  KAFDocument kaf=KAFDocument.createFromStream(breader);
  String paramFile=parsedArguments.getString("String_Node_Str");
  TrainingParameters params=InputOutputUtils.loadTrainingParameters(paramFile);
  String lang=null;
  if (params.getSettings().get("String_Node_Str") != null) {
    lang=params.getSettings().get("String_Node_Str");
    if (!kaf.getLang().equalsIgnoreCase(lang)) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    params.getSettings().put("String_Node_Str",kaf.getLang());
  }
  String lexer=parsedArguments.getString("String_Node_Str");
  KAFDocument.LinguisticProcessor newLp=kaf.addLinguisticProcessor("String_Node_Str","String_Node_Str" + lang + "String_Node_Str"+ paramFile,version);
  newLp.setBeginTimestamp();
  Properties properties=setAnnotateProperties(lexer);
  Annotate annotator=new Annotate(properties,params);
  annotator.annotateNEs(kaf);
  String outputFormatOption=InputOutputUtils.getOutputFormat(params);
  String kafToString=null;
  if (outputFormatOption.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2003(kaf);
  }
 else   if (outputFormatOption.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2002(kaf);
  }
 else {
    kafToString=annotator.annotateNEsToKAF(kaf);
  }
  newLp.setEndTimestamp();
  bwriter.write(kafToString);
  bwriter.close();
  breader.close();
}

Fixed version (ground truth):
/** 
 * Main method to do Named Entity tagging.
 * @param inputStream the input stream containing the content to tag
 * @param outputStream the output stream providing the named entities
 * @throws IOException exception if problems in input or output streams
 */
public final void annotate(final InputStream inputStream,final OutputStream outputStream) throws IOException, JDOMException {
  BufferedReader breader=new BufferedReader(new InputStreamReader(inputStream,"String_Node_Str"));
  BufferedWriter bwriter=new BufferedWriter(new OutputStreamWriter(outputStream,"String_Node_Str"));
  KAFDocument kaf=KAFDocument.createFromStream(breader);
  String paramFile=parsedArguments.getString("String_Node_Str");
  TrainingParameters params=InputOutputUtils.loadTrainingParameters(paramFile);
  String lang=null;
  if (params.getSettings().get("String_Node_Str") != null) {
    lang=params.getSettings().get("String_Node_Str");
    if (!kaf.getLang().equalsIgnoreCase(lang)) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    params.getSettings().put("String_Node_Str",kaf.getLang());
  }
  String lexer=parsedArguments.getString("String_Node_Str");
  KAFDocument.LinguisticProcessor newLp=kaf.addLinguisticProcessor("String_Node_Str","String_Node_Str" + lang + "String_Node_Str"+ paramFile,version);
  newLp.setBeginTimestamp();
  Properties properties=setAnnotateProperties(lexer);
  Annotate annotator=new Annotate(properties,params);
  annotator.annotateNEs(kaf);
  newLp.setEndTimestamp();
  String outputFormatOption=InputOutputUtils.getOutputFormat(params);
  String kafToString=null;
  if (outputFormatOption.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2003(kaf);
  }
 else   if (outputFormatOption.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2002(kaf);
  }
 else {
    kafToString=annotator.annotateNEsToKAF(kaf);
  }
  bwriter.write(kafToString);
  bwriter.close();
  breader.close();
}