Program: 29824
Project: 29824
Buggy source:
/** 
 * Given a class loader, check for ServletContainerInitializer implementations in any JAR file in the classpath
 * @param cl The ClassLoader to be used to find JAR files
 * @return Iterable over all ServletContainerInitializers that were found
 */
public static Iterable<ServletContainerInitializer> getServletContainerInitializers(Map<String,String> webFragmentMap,List<Object> absoluteOrderingList,boolean hasOthers,ClassLoader cl){
  if ((absoluteOrderingList != null) && !hasOthers) {
    if (!(cl instanceof URLClassLoader)) {
      log.log(Level.WARNING,"String_Node_Str",cl.getClass().getCanonicalName());
      return null;
    }
    URLClassLoader webAppCl=(URLClassLoader)cl;
    List<URL> newClassLoaderUrlList=new ArrayList<URL>();
    for (    URL classLoaderUrl : webAppCl.getURLs()) {
      if (!"String_Node_Str".equals(classLoaderUrl.getProtocol())) {
        continue;
      }
      File file=new File(classLoaderUrl.getFile());
      try {
        file=file.getCanonicalFile();
      }
 catch (      IOException e) {
      }
      if (!file.exists()) {
        continue;
      }
      String path=file.getAbsolutePath();
      if (!path.endsWith("String_Node_Str")) {
        continue;
      }
      if (!isFragmentMissingFromAbsoluteOrdering(file.getName(),webFragmentMap,absoluteOrderingList)) {
        newClassLoaderUrlList.add(classLoaderUrl);
      }
    }
    URL[] urlsForNewClassLoader=new URL[newClassLoaderUrlList.size()];
    cl=new URLClassLoader(newClassLoaderUrlList.toArray(urlsForNewClassLoader),webAppCl.getParent());
  }
  return ServiceLoader.load(ServletContainerInitializer.class,cl);
}

Fixed version (ground truth):
/** 
 * Given a class loader, check for ServletContainerInitializer implementations in any JAR file in the classpath
 * @param cl The ClassLoader to be used to find JAR files
 * @return Iterable over all ServletContainerInitializers that were found
 */
public static Iterable<ServletContainerInitializer> getServletContainerInitializers(Map<String,String> webFragmentMap,List<Object> absoluteOrderingList,boolean hasOthers,ClassLoader cl){
  if ((absoluteOrderingList != null) && !hasOthers) {
    if (!(cl instanceof URLClassLoader)) {
      log.log(Level.WARNING,"String_Node_Str",cl.getClass().getCanonicalName());
      return null;
    }
    final URLClassLoader webAppCl=(URLClassLoader)cl;
    List<URL> newClassLoaderUrlList=new ArrayList<URL>();
    for (    URL classLoaderUrl : webAppCl.getURLs()) {
      if (!"String_Node_Str".equals(classLoaderUrl.getProtocol())) {
        continue;
      }
      File file=new File(classLoaderUrl.getFile());
      try {
        file=file.getCanonicalFile();
      }
 catch (      IOException e) {
      }
      if (!file.exists()) {
        continue;
      }
      String path=file.getAbsolutePath();
      if (!path.endsWith("String_Node_Str")) {
        continue;
      }
      if (!isFragmentMissingFromAbsoluteOrdering(file.getName(),webFragmentMap,absoluteOrderingList)) {
        newClassLoaderUrlList.add(classLoaderUrl);
      }
    }
    URL[] urlsForNewClassLoader=new URL[newClassLoaderUrlList.size()];
    final URL[] urlArray=newClassLoaderUrlList.toArray(urlsForNewClassLoader);
    cl=AccessController.doPrivileged(new PrivilegedAction<URLClassLoader>(){
      @Override public URLClassLoader run(){
        return new URLClassLoader(urlArray,webAppCl.getParent());
      }
    }
);
  }
  return ServiceLoader.load(ServletContainerInitializer.class,cl);
}