Program: 21033
Project: 21033
Buggy source:
/** 
 * Recursive method used to find all classes in a given directory and subdirs.
 * @author DZone Snippts Section. http://snippets.dzone.com/posts/show/4831
 * @param directory
 * @param packageName
 * @return
 * @throws ClassNotFoundException
 */
private static List<Class<?>> findPlugins(URL directory,String packageName,ClassLoader classLoader) throws ClassNotFoundException {
  ArrayList<Class<?>> classes=new ArrayList<Class<?>>();
  File[] files=null;
  try {
    files=new File(directory.toURI().getPath()).listFiles();
  }
 catch (  Exception e) {
  }
  if (files == null) {
    try {
      String path=directory.toString().substring(4);
      String[] splitted=path.split("String_Node_Str");
      splitted[1]=splitted[1].substring(1);
      File file=new File(new URL(splitted[0]).toURI());
      JarInputStream jarFile=new JarInputStream(new FileInputStream(file));
      JarEntry e;
      while ((e=jarFile.getNextJarEntry()) != null) {
        if (e.getName().startsWith(splitted[1])) {
          Class<?> c=classLoader.loadClass(e.getName().substring(0,e.getName().length() - 6).replace("String_Node_Str","String_Node_Str"));
          if (c != null) {
            classes.add(c);
          }
        }
      }
    }
 catch (    Throwable e) {
      e.printStackTrace();
    }
  }
 else {
    for (    File file : files) {
      if (file.isDirectory()) {
        try {
          classes.addAll(findPlugins(file.toURI().toURL(),packageName + "String_Node_Str" + file.getName(),classLoader));
        }
 catch (        MalformedURLException e) {
          e.printStackTrace();
        }
      }
 else       if (file.getName().endsWith("String_Node_Str")) {
        Class<?> c=classLoader.loadClass(packageName + '.' + file.getName().substring(0,file.getName().length() - 6));
        classes.add(c);
      }
    }
  }
  return classes;
}

Fixed version (ground truth):
/** 
 * Recursive method used to find all classes in a given directory and subdirs.
 * @author DZone Snippts Section. http://snippets.dzone.com/posts/show/4831
 * @param directory
 * @param packageName
 * @return
 * @throws ClassNotFoundException
 */
private static List<Class<?>> findPlugins(URL directory,String packageName,ClassLoader classLoader) throws ClassNotFoundException {
  ArrayList<Class<?>> classes=new ArrayList<Class<?>>();
  File[] files=null;
  try {
    files=new File(directory.toURI().getPath()).listFiles();
  }
 catch (  Exception e) {
  }
  if (files == null) {
    try {
      String path=directory.toString().substring(4);
      String[] splitted=path.split("String_Node_Str");
      splitted[1]=splitted[1].substring(1);
      File file=new File(new URL(splitted[0]).toURI());
      JarInputStream jarFile=new JarInputStream(new FileInputStream(file));
      JarEntry e;
      while ((e=jarFile.getNextJarEntry()) != null) {
        if (e.getName().startsWith(splitted[1])) {
          Class<?> c=classLoader.loadClass(e.getName().substring(0,e.getName().length() - 6).replace("String_Node_Str","String_Node_Str"));
          if (c != null) {
            classes.add(c);
          }
        }
      }
    }
 catch (    Throwable e) {
      e.printStackTrace();
    }
  }
 else {
    for (    File file : files) {
      try {
        if (file.isDirectory()) {
          try {
            classes.addAll(findPlugins(file.toURI().toURL(),packageName + "String_Node_Str" + file.getName(),classLoader));
          }
 catch (          MalformedURLException e) {
            e.printStackTrace();
          }
        }
 else         if (file.getName().endsWith("String_Node_Str")) {
          Class<?> c=classLoader.loadClass(packageName + '.' + file.getName().substring(0,file.getName().length() - 6));
          classes.add(c);
        }
      }
 catch (      Throwable e) {
        e.printStackTrace();
      }
    }
  }
  return classes;
}