Program: 81633
Project: 81633
Buggy source:
/** 
 * For normal compilation, only translate and stitch types reachable from entry points. This reduces memory and improves compile speed. Any unreachable elements are pruned.
 */
public void exec(TreeLogger logger) throws UnableToCompleteException {
  this.logger=logger;
  for (  JMethod entryMethod : program.getEntryMethods()) {
    flowInto(entryMethod);
  }
  for (  JClassType type : program.codeGenTypes) {
    for (    JMethod method : type.getMethods()) {
      flowInto(method);
    }
  }
  instantiate(program.getTypeJavaLangString());
  flowInto(program.getIndexedMethod("String_Node_Str"));
  mapApi(program.getTypeJavaLangString());
  flowInto(methodMap.get("String_Node_Str"));
  flowInto(program.getIndexedMethod("String_Node_Str"));
  AutoboxUtils autoboxUtils=new AutoboxUtils(program);
  for (  JMethod method : autoboxUtils.getBoxMethods()) {
    flowInto(method);
  }
  for (  JMethod method : autoboxUtils.getUnboxMethods()) {
    flowInto(method);
  }
  if (options.isRunAsyncEnabled()) {
    flowInto(program.getIndexedMethod("String_Node_Str"));
    flowInto(program.getIndexedMethod("String_Node_Str"));
  }
  staticInitialize(program.getTypeClassLiteralHolder());
  for (  JMethod method : program.getTypeJavaLangClass().getMethods()) {
    if (method.isStatic() && method.getName().startsWith("String_Node_Str")) {
      flowInto(method);
    }
  }
  mainLoop();
  for (Iterator<JDeclaredType> it=program.getDeclaredTypes().iterator(); it.hasNext(); ) {
    JDeclaredType type=it.next();
    boolean isInstantiated=instantiatedTypes.contains(type);
    for (int i=0; i < type.getFields().size(); ++i) {
      JField field=type.getFields().get(i);
      if (!liveFieldsAndMethods.contains(field) || (!field.isStatic() && !isInstantiated)) {
        type.removeField(i);
        --i;
      }
    }
    JMethod clinit=type.getClinitMethod();
    if (!liveFieldsAndMethods.contains(clinit)) {
      clinit.setBody(new JMethodBody(SourceOrigin.UNKNOWN));
    }
    for (int i=1; i < type.getMethods().size(); ++i) {
      JMethod method=type.getMethods().get(i);
      if (!liveFieldsAndMethods.contains(method) || (!method.isStatic() && !isInstantiated)) {
        type.removeMethod(i);
        --i;
      }
    }
  }
  computeOverrides();
  if (errorsFound) {
    throw new UnableToCompleteException();
  }
}

Fixed version (ground truth):
/** 
 * For normal compilation, only translate and stitch types reachable from entry points. This reduces memory and improves compile speed. Any unreachable elements are pruned.
 */
public void exec() throws UnableToCompleteException {
  for (  JMethod entryMethod : program.getEntryMethods()) {
    flowInto(entryMethod);
  }
  for (  JClassType type : program.codeGenTypes) {
    for (    JMethod method : type.getMethods()) {
      flowInto(method);
    }
  }
  instantiate(program.getTypeJavaLangString());
  flowInto(program.getIndexedMethod("String_Node_Str"));
  mapApi(program.getTypeJavaLangString());
  flowInto(methodMap.get("String_Node_Str"));
  flowInto(program.getIndexedMethod("String_Node_Str"));
  AutoboxUtils autoboxUtils=new AutoboxUtils(program);
  for (  JMethod method : autoboxUtils.getBoxMethods()) {
    flowInto(method);
  }
  for (  JMethod method : autoboxUtils.getUnboxMethods()) {
    flowInto(method);
  }
  if (options.isRunAsyncEnabled()) {
    flowInto(program.getIndexedMethod("String_Node_Str"));
    flowInto(program.getIndexedMethod("String_Node_Str"));
  }
  staticInitialize(program.getTypeClassLiteralHolder());
  for (  JMethod method : program.getTypeJavaLangClass().getMethods()) {
    if (method.isStatic() && method.getName().startsWith("String_Node_Str")) {
      flowInto(method);
    }
  }
  mainLoop();
  for (Iterator<JDeclaredType> it=program.getDeclaredTypes().iterator(); it.hasNext(); ) {
    JDeclaredType type=it.next();
    boolean isInstantiated=instantiatedTypes.contains(type);
    for (int i=0; i < type.getFields().size(); ++i) {
      JField field=type.getFields().get(i);
      if (!liveFieldsAndMethods.contains(field) || (!field.isStatic() && !isInstantiated)) {
        type.removeField(i);
        --i;
      }
    }
    JMethod clinit=type.getClinitMethod();
    if (!liveFieldsAndMethods.contains(clinit)) {
      clinit.setBody(new JMethodBody(SourceOrigin.UNKNOWN));
    }
    for (int i=1; i < type.getMethods().size(); ++i) {
      JMethod method=type.getMethods().get(i);
      if (!liveFieldsAndMethods.contains(method) || (!method.isStatic() && !isInstantiated)) {
        type.removeMethod(i);
        --i;
      }
    }
  }
  computeOverrides();
  if (errorsFound) {
    throw new UnableToCompleteException();
  }
}