Program: 53376
Project: 53376
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 model=parsedArguments.getString("String_Node_Str");
  String outputFormat=parsedArguments.getString("String_Node_Str");
  String lexer=parsedArguments.getString("String_Node_Str");
  String oepc=parsedArguments.getString("String_Node_Str");
  String dictTag=parsedArguments.getString("String_Node_Str");
  String dictPath=parsedArguments.getString("String_Node_Str");
  String lang=null;
  if (parsedArguments.getString("String_Node_Str") != null) {
    lang=parsedArguments.getString("String_Node_Str");
    if (!kaf.getLang().equalsIgnoreCase(lang)) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    lang=kaf.getLang();
  }
  Properties properties=setAnnotateProperties(model,lang,lexer,oepc,dictTag,dictPath);
  KAFDocument.LinguisticProcessor newLp=kaf.addLinguisticProcessor("String_Node_Str","String_Node_Str" + Files.getNameWithoutExtension(model),version + "String_Node_Str" + commit);
  newLp.setBeginTimestamp();
  Annotate annotator=new Annotate(properties);
  annotator.annotateNEs(kaf);
  newLp.setEndTimestamp();
  String kafToString=null;
  if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2003(kaf);
  }
 else   if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2002(kaf);
  }
 else   if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToOpenNLP(kaf);
  }
 else {
    kafToString=annotator.annotateNEsToKAF(kaf);
  }
  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 model=parsedArguments.getString("String_Node_Str");
  String outputFormat=parsedArguments.getString("String_Node_Str");
  String lexer=parsedArguments.getString("String_Node_Str");
  String dictTag=parsedArguments.getString("String_Node_Str");
  String dictPath=parsedArguments.getString("String_Node_Str");
  String lang=null;
  if (parsedArguments.getString("String_Node_Str") != null) {
    lang=parsedArguments.getString("String_Node_Str");
    if (!kaf.getLang().equalsIgnoreCase(lang)) {
      System.err.println("String_Node_Str");
      System.exit(1);
    }
  }
 else {
    lang=kaf.getLang();
  }
  Properties properties=setAnnotateProperties(model,lang,lexer,dictTag,dictPath);
  KAFDocument.LinguisticProcessor newLp=kaf.addLinguisticProcessor("String_Node_Str","String_Node_Str" + Files.getNameWithoutExtension(model),version + "String_Node_Str" + commit);
  newLp.setBeginTimestamp();
  Annotate annotator=new Annotate(properties);
  annotator.annotateNEs(kaf);
  newLp.setEndTimestamp();
  String kafToString=null;
  if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2003(kaf);
  }
 else   if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToCoNLL2002(kaf);
  }
 else   if (outputFormat.equalsIgnoreCase("String_Node_Str")) {
    kafToString=annotator.annotateNEsToOpenNLP(kaf);
  }
 else {
    kafToString=annotator.annotateNEsToKAF(kaf);
  }
  bwriter.write(kafToString);
  bwriter.close();
  breader.close();
}