Program: 18011
Project: 18011
Buggy source:
public void dumpDoc(Integer docId,String... fields) throws Exception {
  SolrQueryRequest sr=req();
  IndexReader reader=sr.getSearcher().getTopReaderContext().reader();
  int[] docs;
  if (docId == null) {
    docs=new int[reader.numDocs()];
    for (int i=0; i < docs.length; i++) {
      docs[i]=i;
    }
  }
 else {
    docs=new int[]{docId};
  }
  DocReconstructor reconstructor=new DocReconstructor(reader);
  Reconstructed d;
  for (  Integer dd : docs) {
    d=reconstructor.reconstruct(dd);
    Set<String> fldMap=new HashSet<String>();
    for (    String f : fields) {
      fldMap.add(f);
    }
    System.out.println("String_Node_Str");
    Map<String,GrowableStringArray> rf=d.getReconstructedFields();
    for (    Entry<String,GrowableStringArray> es : rf.entrySet()) {
      String fld=es.getKey();
      if (fldMap.size() > 0 && !fldMap.contains(fld)) {
        continue;
      }
      System.out.println(fld);
      System.out.println(docToString(es.getValue(),"String_Node_Str"));
    }
    if (true)     continue;
    System.out.println("String_Node_Str");
    Map<String,IndexableField[]> sf=d.getStoredFields();
    for (    Entry<String,IndexableField[]> es : sf.entrySet()) {
      String fld=es.getKey();
      if (fldMap.size() > 0 && !fldMap.contains(fld)) {
        continue;
      }
      System.out.println(fld);
      IndexableField[] val=es.getValue();
      int j=0;
      for (      IndexableField v : val) {
        System.out.println("String_Node_Str" + j + "String_Node_Str"+ v.stringValue());
        j++;
      }
    }
  }
  sr.close();
}

Fixed version (ground truth):
public void dumpDoc(Integer docId,String... fields) throws Exception {
  SolrQueryRequest sr=req();
  IndexReader reader=sr.getSearcher().getTopReaderContext().reader();
  int[] docs;
  if (docId == null) {
    docs=new int[reader.numDocs()];
    for (int i=0; i < docs.length; i++) {
      docs[i]=i;
    }
  }
 else {
    docs=new int[]{docId};
  }
  DocReconstructor reconstructor=new DocReconstructor(reader,fields,10);
  Reconstructed d;
  for (  Integer dd : docs) {
    d=reconstructor.reconstruct(dd);
    Set<String> fldMap=new HashSet<String>();
    for (    String f : fields) {
      fldMap.add(f);
    }
    System.out.println("String_Node_Str" + dd);
    Map<String,GrowableStringArray> rf=d.getReconstructedFields();
    for (    Entry<String,GrowableStringArray> es : rf.entrySet()) {
      String fld=es.getKey();
      if (fldMap.size() > 0 && !fldMap.contains(fld)) {
        continue;
      }
      System.out.println(fld);
      System.out.println(docToString(es.getValue(),"String_Node_Str"));
    }
    if (true)     continue;
    System.out.println("String_Node_Str" + dd);
    Map<String,IndexableField[]> sf=d.getStoredFields();
    for (    Entry<String,IndexableField[]> es : sf.entrySet()) {
      String fld=es.getKey();
      if (fldMap.size() > 0 && !fldMap.contains(fld)) {
        continue;
      }
      System.out.println(fld);
      IndexableField[] val=es.getValue();
      int j=0;
      for (      IndexableField v : val) {
        System.out.println("String_Node_Str" + j + "String_Node_Str"+ v.stringValue());
        j++;
      }
    }
  }
  sr.close();
}