Program: 17131
Project: 17131
Buggy source:
private File downloadPDB(String pdbId){
  if ((path == null) || (path.equals("String_Node_Str"))) {
    String property="String_Node_Str";
    String tempdir=System.getProperty(property);
    if (!(tempdir.endsWith(lineSplit)))     tempdir=tempdir + lineSplit;
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str" + tempdir);
    path=tempdir;
  }
  File tempFile;
  if (pdbDirectorySplit) {
    String middle=pdbId.substring(1,3).toLowerCase();
    String dir=path + lineSplit + middle;
    File directoryCheck=new File(dir);
    if (!directoryCheck.exists()) {
      directoryCheck.mkdir();
    }
    tempFile=new File(dir + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  }
 else {
    tempFile=new File(path + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  }
  String serverName=System.getProperty(PDB_FILE_SERVER_PROPERTY);
  if (serverName == null)   serverName=DEFAULT_PDB_FILE_SERVER;
  String ftp=String.format("String_Node_Str",serverName,pdbId.toLowerCase());
  System.out.println("String_Node_Str" + ftp);
  System.out.println("String_Node_Str" + tempFile);
  try {
    URL url=new URL(ftp);
    InputStream conn=new GZIPInputStream(url.openStream());
    FileOutputStream outPut=new FileOutputStream(tempFile);
    GZIPOutputStream gzOutPut=new GZIPOutputStream(outPut);
    PrintWriter pw=new PrintWriter(gzOutPut);
    BufferedReader fileBuffer=new BufferedReader(new InputStreamReader(conn));
    String line;
    while ((line=fileBuffer.readLine()) != null) {
      pw.println(line);
    }
    pw.flush();
    pw.close();
    outPut.close();
    conn.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return tempFile;
}

Fixed version (ground truth):
private File downloadPDB(String pdbId){
  if ((path == null) || (path.equals("String_Node_Str"))) {
    String property="String_Node_Str";
    String tempdir=System.getProperty(property);
    if (!(tempdir.endsWith(lineSplit)))     tempdir=tempdir + lineSplit;
    System.err.println("String_Node_Str");
    System.err.println("String_Node_Str" + tempdir);
    path=tempdir;
  }
  File tempFile;
  if (pdbDirectorySplit) {
    String middle=pdbId.substring(1,3).toLowerCase();
    String dir=path + lineSplit + middle;
    File directoryCheck=new File(dir);
    if (!directoryCheck.exists()) {
      directoryCheck.mkdir();
    }
    tempFile=new File(dir + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  }
 else {
    tempFile=new File(path + lineSplit + "String_Node_Str"+ pdbId.toLowerCase()+ "String_Node_Str");
  }
  String serverName=System.getProperty(PDB_FILE_SERVER_PROPERTY);
  if (serverName == null)   serverName=DEFAULT_PDB_FILE_SERVER;
  String ftp=String.format("String_Node_Str",serverName,pdbId.toLowerCase());
  System.out.println("String_Node_Str" + ftp);
  System.out.println("String_Node_Str" + tempFile);
  try {
    URL url=new URL(ftp);
    InputStream uStream=url.openStream();
    InputStream conn=new GZIPInputStream(uStream);
    FileOutputStream outPut=new FileOutputStream(tempFile);
    GZIPOutputStream gzOutPut=new GZIPOutputStream(outPut);
    PrintWriter pw=new PrintWriter(gzOutPut);
    BufferedReader fileBuffer=new BufferedReader(new InputStreamReader(conn));
    String line;
    while ((line=fileBuffer.readLine()) != null) {
      pw.println(line);
    }
    pw.flush();
    pw.close();
    outPut.close();
    conn.close();
    uStream.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return tempFile;
}