Program: 28310
Project: 28310
Buggy source:
public ClassLoader getClassLoader(final ClassLoader parent,DeploymentContext context){
  ASURLClassLoader cloader=AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>(){
    @Override public ASURLClassLoader run(){
      return new ASURLClassLoader(parent);
    }
  }
);
  try {
    String compatProp=context.getAppProps().getProperty(DeploymentProperties.COMPATIBILITY);
    if (compatProp == null) {
      GFEjbJarXMLParser gfEjbJarXMLParser=new GFEjbJarXMLParser(context.getSource());
      compatProp=gfEjbJarXMLParser.getCompatibilityValue();
      if (compatProp != null) {
        context.getAppProps().put(DeploymentProperties.COMPATIBILITY,compatProp);
      }
    }
    if (compatProp == null) {
      SunEjbJarXMLParser sunEjbJarXMLParser=new SunEjbJarXMLParser(context.getSourceDir());
      compatProp=sunEjbJarXMLParser.getCompatibilityValue();
      if (compatProp != null) {
        context.getAppProps().put(DeploymentProperties.COMPATIBILITY,compatProp);
      }
    }
    if (compatProp != null && compatProp.equals("String_Node_Str")) {
      List<URL> moduleRootLibraries=ASClassLoaderUtil.getURLsAsList(null,new File[]{context.getSourceDir()},true);
      for (      URL url : moduleRootLibraries) {
        cloader.addURL(url);
      }
    }
    cloader.addURL(context.getSource().getURI().toURL());
    cloader.addURL(context.getScratchDir("String_Node_Str").toURI().toURL());
    for (    URL url : getManifestLibraries(context)) {
      cloader.addURL(url);
    }
    try {
      final DeploymentContext dc=context;
      final ClassLoader cl=cloader;
      AccessController.doPrivileged(new PermsArchiveDelegate.SetPermissionsAction(SMGlobalPolicyUtil.CommponentType.ejb,dc,cl));
    }
 catch (    PrivilegedActionException e) {
      throw (SecurityException)e.getException();
    }
  }
 catch (  Exception e) {
    _logger.log(Level.SEVERE,e.getMessage());
    throw new RuntimeException(e);
  }
  return cloader;
}

Fixed version (ground truth):
public ClassLoader getClassLoader(final ClassLoader parent,DeploymentContext context){
  ASURLClassLoader cloader=AccessController.doPrivileged(new PrivilegedAction<ASURLClassLoader>(){
    @Override public ASURLClassLoader run(){
      return new ASURLClassLoader(parent);
    }
  }
);
  try {
    String compatProp=context.getAppProps().getProperty(DeploymentProperties.COMPATIBILITY);
    if (compatProp == null) {
      GFEjbJarXMLParser gfEjbJarXMLParser=new GFEjbJarXMLParser(context.getSource());
      compatProp=gfEjbJarXMLParser.getCompatibilityValue();
      if (compatProp != null) {
        context.getAppProps().put(DeploymentProperties.COMPATIBILITY,compatProp);
      }
    }
    if (compatProp == null) {
      SunEjbJarXMLParser sunEjbJarXMLParser=new SunEjbJarXMLParser(context.getSourceDir());
      compatProp=sunEjbJarXMLParser.getCompatibilityValue();
      if (compatProp != null) {
        context.getAppProps().put(DeploymentProperties.COMPATIBILITY,compatProp);
      }
    }
    if (compatProp != null && compatProp.equals("String_Node_Str")) {
      List<URL> moduleRootLibraries=ASClassLoaderUtil.getURLsAsList(null,new File[]{context.getSourceDir()},true);
      for (      URL url : moduleRootLibraries) {
        cloader.addURL(url);
      }
    }
    cloader.addURL(context.getSource().getURI().toURL());
    cloader.addURL(context.getScratchDir("String_Node_Str").toURI().toURL());
    for (    URL url : getManifestLibraries(context)) {
      cloader.addURL(url);
    }
    try {
      final DeploymentContext dc=context;
      final ClassLoader cl=cloader;
      AccessController.doPrivileged(new PermsArchiveDelegate.SetPermissionsAction(SMGlobalPolicyUtil.CommponentType.ejb,dc,cl));
    }
 catch (    PrivilegedActionException e) {
      throw new SecurityException(e.getException());
    }
  }
 catch (  Exception e) {
    _logger.log(Level.SEVERE,e.getMessage());
    throw new RuntimeException(e);
  }
  return cloader;
}