Program: 141170
Project: 141170
Buggy source:
public static void addTranslatorFields(final InputStream is,int fieldToTranslate,final Translator translator,final TranslatorOutputFormat of) throws IOException {
  if (is == null)   throw new NullPointerException("String_Node_Str");
  if (translator == null)   throw new NullPointerException("String_Node_Str");
  if (of == null)   throw new NullPointerException("String_Node_Str");
  String[] translatorFieldnames=translator.getFields();
  final int n=translatorFieldnames.length;
  final BufferedReader reader=new BufferedReader(new InputStreamReader(is));
  String line;
  boolean first=true;
  while ((line=reader.readLine()) != null) {
    final String[] fields=line.split("String_Node_Str");
    if (first) {
      for (int i=0; i < fields.length; i++)       of.addHeaderField(fields[i]);
      for (int i=0; i < n; i++)       of.addHeaderField(translatorFieldnames[i]);
      first=false;
    }
 else {
      of.newLine();
      for (int i=0; i < fields.length; i++)       try {
        of.writeDouble(Double.parseDouble(fields[i]));
      }
 catch (      NumberFormatException e) {
        of.writeText(fields[i]);
      }
      for (int i=0; i < n; i++) {
        final String field=translatorFieldnames[i];
        final String valueToTranslate=fields[fieldToTranslate];
        final String value;
        if (field == null)         value=null;
 else         value=translator.translateField(valueToTranslate,field);
        String link;
        if (value == null || !translator.isLinkInfo(field))         link=null;
 else         link=translator.getLinkInfo(value,field);
        if (value == null)         of.writeEmpty();
 else {
          if (link == null)           of.writeText(value);
 else           of.writeLink(value,link);
        }
      }
    }
  }
  reader.close();
  of.close();
}

Fixed version (ground truth):
public static void addTranslatorFields(final InputStream is,int fieldToTranslate,final Translator translator,final TranslatorOutputFormat of) throws IOException {
  if (is == null)   throw new NullPointerException("String_Node_Str");
  if (translator == null)   throw new NullPointerException("String_Node_Str");
  if (of == null)   throw new NullPointerException("String_Node_Str");
  String[] translatorFieldnames=translator.getFields();
  final int n=translatorFieldnames.length;
  final BufferedReader reader=new BufferedReader(new InputStreamReader(is,Globals.DEFAULT_CHARSET));
  String line;
  boolean first=true;
  while ((line=reader.readLine()) != null) {
    final String[] fields=line.split("String_Node_Str");
    if (first) {
      for (int i=0; i < fields.length; i++)       of.addHeaderField(fields[i]);
      for (int i=0; i < n; i++)       of.addHeaderField(translatorFieldnames[i]);
      first=false;
    }
 else {
      of.newLine();
      for (int i=0; i < fields.length; i++)       try {
        of.writeDouble(Double.parseDouble(fields[i]));
      }
 catch (      NumberFormatException e) {
        of.writeText(fields[i]);
      }
      for (int i=0; i < n; i++) {
        final String field=translatorFieldnames[i];
        final String valueToTranslate=fields[fieldToTranslate];
        final String value;
        if (field == null)         value=null;
 else         value=translator.translateField(valueToTranslate,field);
        String link;
        if (value == null || !translator.isLinkInfo(field))         link=null;
 else         link=translator.getLinkInfo(value,field);
        if (value == null)         of.writeEmpty();
 else {
          if (link == null)           of.writeText(value);
 else           of.writeLink(value,link);
        }
      }
    }
  }
  reader.close();
  of.close();
}