Program: 88185
Project: 88185
Buggy source:
/** 
 * Takes all JAR files that are contained in this program's JAR file and extracts them to the system's temp directory.
 * @return The file names of the extracted temporary files.
 * @throws IOException Thrown, if the extraction process failed.
 */
public File[] extractContainedLibaries() throws IOException {
  Random rnd=new Random();
  try {
    final JarFile jar=new JarFile(jarFile);
    final List<JarEntry> containedJarFileEntries=new ArrayList<JarEntry>();
    Enumeration<JarEntry> entries=jar.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      String name=entry.getName();
      if (name.length() > 8 && name.startsWith("String_Node_Str") && name.endsWith("String_Node_Str")) {
        containedJarFileEntries.add(entry);
      }
    }
    if (containedJarFileEntries.isEmpty()) {
      return null;
    }
    this.extractedTempLibraries=new File[containedJarFileEntries.size()];
    for (int i=0; i < this.extractedTempLibraries.length; i++) {
      final JarEntry entry=containedJarFileEntries.get(i);
      String name=entry.getName();
      name=name.replace(File.separatorChar,'_');
      File tempFile=File.createTempFile(String.valueOf(Math.abs(rnd.nextInt()) + "String_Node_Str"),entry.getName());
      this.extractedTempLibraries[i]=tempFile;
      OutputStream out=null;
      InputStream in=null;
      try {
        out=new FileOutputStream(tempFile);
        in=new BufferedInputStream(jar.getInputStream(entry));
        byte[] buffer=new byte[1024];
        int numRead=0;
        while ((numRead=in.read(buffer)) != -1) {
          out.write(buffer,0,numRead);
        }
      }
  finally {
        if (out != null) {
          out.close();
        }
        if (in != null) {
          in.close();
        }
      }
    }
    return this.extractedTempLibraries;
  }
 catch (  IOException ioex) {
    throw ioex;
  }
catch (  Throwable t) {
    throw new IOException("String_Node_Str",t);
  }
}

Fixed version (ground truth):
/** 
 * Takes all JAR files that are contained in this program's JAR file and extracts them to the system's temp directory.
 * @return The file names of the extracted temporary files.
 * @throws IOException Thrown, if the extraction process failed.
 */
public File[] extractContainedLibaries() throws IOException {
  Random rnd=new Random();
  try {
    final JarFile jar=new JarFile(jarFile);
    final List<JarEntry> containedJarFileEntries=new ArrayList<JarEntry>();
    Enumeration<JarEntry> entries=jar.entries();
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      String name=entry.getName();
      if (name.length() > 8 && name.startsWith("String_Node_Str") && name.endsWith("String_Node_Str")) {
        containedJarFileEntries.add(entry);
      }
    }
    if (containedJarFileEntries.isEmpty()) {
      return null;
    }
    this.extractedTempLibraries=new File[containedJarFileEntries.size()];
    for (int i=0; i < this.extractedTempLibraries.length; i++) {
      final JarEntry entry=containedJarFileEntries.get(i);
      String name=entry.getName();
      name=name.replace(File.separatorChar,'_');
      File tempFile=File.createTempFile(String.valueOf(Math.abs(rnd.nextInt()) + "String_Node_Str"),name);
      this.extractedTempLibraries[i]=tempFile;
      OutputStream out=null;
      InputStream in=null;
      try {
        out=new FileOutputStream(tempFile);
        in=new BufferedInputStream(jar.getInputStream(entry));
        byte[] buffer=new byte[1024];
        int numRead=0;
        while ((numRead=in.read(buffer)) != -1) {
          out.write(buffer,0,numRead);
        }
      }
  finally {
        if (out != null) {
          out.close();
        }
        if (in != null) {
          in.close();
        }
      }
    }
    return this.extractedTempLibraries;
  }
 catch (  IOException ioex) {
    throw ioex;
  }
catch (  Throwable t) {
    throw new IOException("String_Node_Str",t);
  }
}