Program: 72587
Project: 72587
Buggy source:
/** 
 * Write out the Jimple file. Sample option arguments: <code>-p wjtp.writeJimple1 outputDirectory:jimple1</code>
 * @see ClassWriter
 * @param phaseName The name of the phase, for example<code>wjtp.writeJimple2</code>.
 * @param options The options Map.  This method uses the<code>outdir</code> option to specify where the .jimple file should be written
 */
@Override protected void internalTransform(String phaseName,Map options){
  System.out.println("String_Node_Str" + phaseName + "String_Node_Str"+ options+ "String_Node_Str");
  String outputDirectory=PhaseOptions.getString(options,"String_Node_Str");
  for (Iterator classes=Scene.v().getApplicationClasses().iterator(); classes.hasNext(); ) {
    SootClass theClass=(SootClass)classes.next();
    String fileName;
    if (!outputDirectory.equals("String_Node_Str")) {
      File outputDirectoryFile=new File(outputDirectory);
      if (!outputDirectoryFile.isDirectory()) {
        if (!outputDirectoryFile.mkdirs()) {
          throw new RuntimeException("String_Node_Str" + outputDirectoryFile + "String_Node_Str");
        }
      }
      fileName=outputDirectory + System.getProperty("String_Node_Str");
    }
 else {
      fileName="String_Node_Str";
    }
    fileName+=theClass.getName() + "String_Node_Str";
    FileOutputStream streamOut=null;
    PrintWriter writerOut=null;
    try {
      streamOut=new FileOutputStream(fileName);
      writerOut=new PrintWriter(new EscapedWriter(new OutputStreamWriter(streamOut)));
      Printer printer=Printer.v();
      printer.setOption(Integer.MAX_VALUE);
      printer.printTo(theClass,new java.io.PrintWriter(writerOut));
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + "String_Node_Str" + fileName + "String_Node_Str"+ e);
    }
 finally {
      if (writerOut != null) {
        writerOut.close();
      }
      try {
        if (streamOut != null) {
          streamOut.close();
        }
      }
 catch (      IOException io) {
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Write out the Jimple file. Sample option arguments: <code>-p wjtp.writeJimple1 outputDirectory:jimple1</code>
 * @see ClassWriter
 * @param phaseName The name of the phase, for example<code>wjtp.writeJimple2</code>.
 * @param options The options Map.  This method uses the<code>outdir</code> option to specify where the .jimple file should be written
 */
@Override protected void internalTransform(String phaseName,Map options){
  System.out.println("String_Node_Str" + phaseName + "String_Node_Str"+ options+ "String_Node_Str");
  String outputDirectory=PhaseOptions.getString(options,"String_Node_Str");
  for (Iterator classes=Scene.v().getApplicationClasses().iterator(); classes.hasNext(); ) {
    SootClass theClass=(SootClass)classes.next();
    String fileName;
    if (!outputDirectory.equals("String_Node_Str")) {
      File outputDirectoryFile=new File(outputDirectory);
      if (!outputDirectoryFile.isDirectory()) {
        if (!outputDirectoryFile.mkdirs()) {
          throw new RuntimeException("String_Node_Str" + outputDirectoryFile + "String_Node_Str");
        }
      }
      fileName=outputDirectory + System.getProperty("String_Node_Str");
    }
 else {
      fileName="String_Node_Str";
    }
    fileName+=theClass.getName() + "String_Node_Str";
    FileOutputStream streamOut=null;
    PrintWriter writerOut=null;
    try {
      streamOut=new FileOutputStream(fileName);
      writerOut=new PrintWriter(new EscapedWriter(new OutputStreamWriter(streamOut,java.nio.charset.Charset.defaultCharset())));
      Printer printer=Printer.v();
      printer.setOption(Integer.MAX_VALUE);
      printer.printTo(theClass,new java.io.PrintWriter(writerOut));
    }
 catch (    Exception e) {
      System.out.println("String_Node_Str" + "String_Node_Str" + fileName + "String_Node_Str"+ e);
    }
 finally {
      if (writerOut != null) {
        writerOut.close();
      }
      try {
        if (streamOut != null) {
          streamOut.close();
        }
      }
 catch (      IOException io) {
      }
    }
  }
}