Program: 85340
Project: 85340
Buggy source:
private void outputDava(){
  Chain<SootClass> appClasses=Scene.v().getApplicationClasses();
  String pathForBuild=null;
  ArrayList<String> decompiledClasses=new ArrayList<String>();
  Iterator<SootClass> classIt=appClasses.iterator();
  while (classIt.hasNext()) {
    SootClass s=(SootClass)classIt.next();
    OutputStream streamOut=null;
    PrintWriter writerOut=null;
    String fileName=SourceLocator.v().getFileNameFor(s,Options.v().output_format());
    decompiledClasses.add(fileName.substring(fileName.lastIndexOf('/') + 1));
    if (pathForBuild == null) {
      pathForBuild=fileName.substring(0,fileName.lastIndexOf('/') + 1);
    }
    if (Options.v().gzip())     fileName=fileName + "String_Node_Str";
    try {
      if (jarFile != null) {
        JarEntry entry=new JarEntry(fileName.replaceAll("String_Node_Str","String_Node_Str"));
        jarFile.putNextEntry(entry);
        streamOut=jarFile;
      }
 else {
        streamOut=new FileOutputStream(fileName);
      }
      if (Options.v().gzip())       streamOut=new GZIPOutputStream(streamOut);
      writerOut=new PrintWriter(new OutputStreamWriter(streamOut));
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str" + fileName,e);
    }
    G.v().out.print("String_Node_Str" + fileName + "String_Node_Str");
    G.v().out.flush();
    DavaPrinter.v().printTo(s,writerOut);
    G.v().out.println();
    G.v().out.flush();
{
      try {
        writerOut.flush();
        if (jarFile == null)         streamOut.close();
      }
 catch (      IOException e) {
        throw new CompilationDeathException("String_Node_Str" + fileName);
      }
    }
  }
  G.v().out.println();
  if (pathForBuild != null) {
    if (pathForBuild.endsWith("String_Node_Str"))     pathForBuild=pathForBuild.substring(0,pathForBuild.length() - 4);
    String fileName=pathForBuild + "String_Node_Str";
    try {
      OutputStream streamOut=new FileOutputStream(fileName);
      PrintWriter writerOut=new PrintWriter(new OutputStreamWriter(streamOut));
      DavaBuildFile.generate(writerOut,decompiledClasses);
      writerOut.flush();
      streamOut.close();
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str" + fileName,e);
    }
  }
}

Fixed version (ground truth):
private void outputDava(){
  Chain<SootClass> appClasses=Scene.v().getApplicationClasses();
  String pathForBuild=null;
  ArrayList<String> decompiledClasses=new ArrayList<String>();
  Iterator<SootClass> classIt=appClasses.iterator();
  while (classIt.hasNext()) {
    SootClass s=(SootClass)classIt.next();
    OutputStream streamOut=null;
    PrintWriter writerOut=null;
    String fileName=SourceLocator.v().getFileNameFor(s,Options.v().output_format());
    decompiledClasses.add(fileName.substring(fileName.lastIndexOf('/') + 1));
    if (pathForBuild == null) {
      pathForBuild=fileName.substring(0,fileName.lastIndexOf('/') + 1);
    }
    if (Options.v().gzip())     fileName=fileName + "String_Node_Str";
    try {
      if (jarFile != null) {
        JarEntry entry=new JarEntry(fileName.replace('\\','/'));
        jarFile.putNextEntry(entry);
        streamOut=jarFile;
      }
 else {
        streamOut=new FileOutputStream(fileName);
      }
      if (Options.v().gzip())       streamOut=new GZIPOutputStream(streamOut);
      writerOut=new PrintWriter(new OutputStreamWriter(streamOut));
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str" + fileName,e);
    }
    G.v().out.print("String_Node_Str" + fileName + "String_Node_Str");
    G.v().out.flush();
    DavaPrinter.v().printTo(s,writerOut);
    G.v().out.println();
    G.v().out.flush();
{
      try {
        writerOut.flush();
        if (jarFile == null)         streamOut.close();
      }
 catch (      IOException e) {
        throw new CompilationDeathException("String_Node_Str" + fileName);
      }
    }
  }
  G.v().out.println();
  if (pathForBuild != null) {
    if (pathForBuild.endsWith("String_Node_Str"))     pathForBuild=pathForBuild.substring(0,pathForBuild.length() - 4);
    String fileName=pathForBuild + "String_Node_Str";
    try {
      OutputStream streamOut=new FileOutputStream(fileName);
      PrintWriter writerOut=new PrintWriter(new OutputStreamWriter(streamOut));
      DavaBuildFile.generate(writerOut,decompiledClasses);
      writerOut.flush();
      streamOut.close();
    }
 catch (    IOException e) {
      throw new CompilationDeathException("String_Node_Str" + fileName,e);
    }
  }
}