Program: 82730
Project: 82730
Buggy source:
public CompilingClassLoader(TreeLogger logger,ByteCodeCompiler compiler,TypeOracle typeOracle) throws UnableToCompleteException {
  super(null);
  this.logger=logger;
  this.compiler=compiler;
  this.typeOracle=typeOracle;
  setDefaultAssertionStatus(true);
  for (int i=0; i < CacheManager.BOOTSTRAP_CLASSES.length; i++) {
    Class<?> clazz=CacheManager.BOOTSTRAP_CLASSES[i];
    String className=clazz.getName();
    try {
      String path=clazz.getName().replace('.','/').concat("String_Node_Str");
      ClassLoader cl=Thread.currentThread().getContextClassLoader();
      URL url=cl.getResource(path);
      if (url != null) {
        byte classBytes[]=getClassBytesFromStream(url.openStream());
        String loc=url.toExternalForm();
        compiler.putClassBytes(logger,className,classBytes,loc);
      }
 else {
        logger.log(TreeLogger.ERROR,"String_Node_Str" + className + "String_Node_Str",null);
        throw new UnableToCompleteException();
      }
    }
 catch (    IOException e) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + className,e);
      throw new UnableToCompleteException();
    }
  }
  compiler.removeStaleByteCode(logger);
  JClassType jsoType=typeOracle.findType(JsValueGlue.JSO_CLASS);
  if (jsoType != null) {
    Set<JClassType> jsoTypes=new HashSet<JClassType>();
    JClassType[] jsoSubtypes=jsoType.getSubtypes();
    Collections.addAll(jsoTypes,jsoSubtypes);
    jsoTypes.add(jsoType);
    Set<String> jsoTypeNames=new HashSet<String>();
    for (    JClassType type : jsoTypes) {
      jsoTypeNames.add(getBinaryName(type));
    }
    MyInstanceMethodOracle mapper=new MyInstanceMethodOracle(jsoTypes,typeOracle.getJavaLangObject());
    classRewriter=new HostedModeClassRewriter(jsoTypeNames,mapper);
  }
 else {
    classRewriter=null;
  }
}

Fixed version (ground truth):
public CompilingClassLoader(TreeLogger logger,ByteCodeCompiler compiler,TypeOracle typeOracle,ShellJavaScriptHost javaScriptHost) throws UnableToCompleteException {
  super(null);
  this.logger=logger;
  this.compiler=compiler;
  this.typeOracle=typeOracle;
  this.shellJavaScriptHost=javaScriptHost;
  setDefaultAssertionStatus(true);
  for (  Class<?> clazz : CacheManager.BOOTSTRAP_CLASSES) {
    String className=clazz.getName();
    try {
      String path=clazz.getName().replace('.','/').concat("String_Node_Str");
      ClassLoader cl=Thread.currentThread().getContextClassLoader();
      URL url=cl.getResource(path);
      if (url != null) {
        byte classBytes[]=getClassBytesFromStream(url.openStream());
        String loc=url.toExternalForm();
        compiler.putClassBytes(logger,className,classBytes,loc);
      }
 else {
        logger.log(TreeLogger.ERROR,"String_Node_Str" + className + "String_Node_Str",null);
        throw new UnableToCompleteException();
      }
    }
 catch (    IOException e) {
      logger.log(TreeLogger.ERROR,"String_Node_Str" + className,e);
      throw new UnableToCompleteException();
    }
  }
  compiler.removeStaleByteCode(logger);
  JClassType jsoType=typeOracle.findType(JsValueGlue.JSO_CLASS);
  if (jsoType != null) {
    Set<JClassType> jsoTypes=new HashSet<JClassType>();
    JClassType[] jsoSubtypes=jsoType.getSubtypes();
    Collections.addAll(jsoTypes,jsoSubtypes);
    jsoTypes.add(jsoType);
    Set<String> jsoTypeNames=new HashSet<String>();
    for (    JClassType type : jsoTypes) {
      jsoTypeNames.add(getBinaryName(type));
    }
    MyInstanceMethodOracle mapper=new MyInstanceMethodOracle(jsoTypes,typeOracle.getJavaLangObject());
    classRewriter=new HostedModeClassRewriter(jsoTypeNames,mapper);
  }
 else {
    classRewriter=null;
  }
}