Program: 11261
Project: 11261
Buggy source:
/** 
 * Makes a temporary directory for use with unit tests. <p> When the unit test runs in a Maven context, the temporary directory will be created in the corresponding <i>target/</i> directory instead of <i>/tmp/</i>. </p>
 * @param prefix the prefix for the directory's name
 * @param forClass the class for context (to determine whether there's a<i>target/<i> directory)
 * @param suffix the suffix for the directory's name
 * @return the reference to the newly-created temporary directory
 * @throws IOException
 */
public static File createTemporaryDirectory(final String prefix,final Class<?> forClass,final String suffix) throws IOException {
  final URL directory=ClassUtils.getLocation(forClass);
  if (directory == null) {
    throw new IllegalArgumentException("String_Node_Str" + forClass);
  }
  if (!"String_Node_Str".equals(directory.getProtocol())) {
    throw new IllegalArgumentException("String_Node_Str" + directory);
  }
  final String path=directory.getPath();
  if (path == null)   throw new IllegalArgumentException("String_Node_Str");
  final File baseDirectory;
  if (path.endsWith("String_Node_Str")) {
    baseDirectory=new File(path).getParentFile();
  }
 else {
    baseDirectory=new File(path);
  }
  File file=new File(baseDirectory,prefix + suffix);
  if (file.isDirectory()) {
    if (!FileUtils.deleteRecursively(file)) {
      for (int i=-1; file.isDirectory(); i--) {
        file=new File(baseDirectory,prefix + i + suffix);
      }
    }
  }
 else   if (file.exists() && !file.delete()) {
    throw new IOException("String_Node_Str" + file);
  }
  if (!file.mkdir())   throw new IOException("String_Node_Str" + file);
  return file;
}

Fixed version (ground truth):
/** 
 * Makes a temporary directory for use with unit tests. <p> When the unit test runs in a Maven context, the temporary directory will be created in the corresponding   {@code target/} directory instead of{@code /tmp/}. </p>
 * @param prefix the prefix for the directory's name
 * @param forClass the class for context (to determine whether there's a{@code target/} directory)
 * @param suffix the suffix for the directory's name
 * @return the reference to the newly-created temporary directory
 * @throws IOException
 */
public static File createTemporaryDirectory(final String prefix,final Class<?> forClass,final String suffix) throws IOException {
  final URL directory=ClassUtils.getLocation(forClass);
  if (directory == null) {
    throw new IllegalArgumentException("String_Node_Str" + forClass);
  }
  if (!"String_Node_Str".equals(directory.getProtocol())) {
    throw new IllegalArgumentException("String_Node_Str" + directory);
  }
  final String path=directory.getPath();
  if (path == null)   throw new IllegalArgumentException("String_Node_Str");
  final File baseDirectory;
  if (path.endsWith("String_Node_Str")) {
    baseDirectory=new File(path).getParentFile();
  }
 else {
    baseDirectory=new File(path);
  }
  File file=new File(baseDirectory,prefix + suffix);
  if (file.isDirectory()) {
    if (!FileUtils.deleteRecursively(file)) {
      for (int i=-1; file.isDirectory(); i--) {
        file=new File(baseDirectory,prefix + i + suffix);
      }
    }
  }
 else   if (file.exists() && !file.delete()) {
    throw new IOException("String_Node_Str" + file);
  }
  if (!file.mkdir())   throw new IOException("String_Node_Str" + file);
  return file;
}