Program: 53538
Project: 53538
Buggy source:
/** 
 * Translates and stitches (unifies) type ASTs into one connected graph.<br /> For normal monolithic compiles only types reachable from entry points are traversed. This speeds, saves memory trims unreferenced elements.<br /> Library compiles traverse all types that were supplied as source in the compilation state and no 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);
    }
  }
  if (!compilerContext.shouldCompileMonolithic()) {
    boolean errorStateBeforeForcedTraversal=errorsFound;
    Set<String> internalNames=ImmutableSet.copyOf(compiledClassesByInternalName.keySet());
    for (    String internalName : internalNames) {
      JDeclaredType type=internalFindType(internalName,internalNameBasedTypeLocator);
      if (type == null) {
        continue;
      }
      instantiate(type);
      for (      JField field : type.getFields()) {
        flowInto(field);
      }
      for (      JMethod method : type.getMethods()) {
        flowInto(method);
      }
    }
  }
 else {
    boolean savedErrorsFound=errorsFound;
    Set<String> internalNames=ImmutableSet.copyOf(compiledClassesByInternalName.keySet());
    for (    String internalName : internalNames) {
      JDeclaredType type=internalFindTypeViaLocator(internalName,internalNameBasedTypeLocator);
      if (type != null && (type.isJsType() || hasAnyExports(type))) {
        instantiate(type);
        for (        JField field : type.getFields()) {
          flowInto(field);
        }
        for (        JMethod method : type.getMethods()) {
          flowInto(method);
        }
      }
    }
    errorsFound=savedErrorsFound;
  }
  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 (compilerContext.getOptions().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();
  if (compilerContext.shouldCompileMonolithic()) {
    pruneDeadFieldsAndMethods();
  }
  computeOverrides();
  if (errorsFound) {
    throw new UnableToCompleteException();
  }
}

Fixed version (ground truth):
/** 
 * Translates and stitches (unifies) type ASTs into one connected graph.<br /> For normal monolithic compiles only types reachable from entry points are traversed. This speeds, saves memory trims unreferenced elements.<br /> Library compiles traverse all types that were supplied as source in the compilation state and no 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);
    }
  }
  if (!compilerContext.shouldCompileMonolithic()) {
    boolean errorStateBeforeForcedTraversal=errorsFound;
    Set<String> internalNames=ImmutableSet.copyOf(compiledClassesByInternalName.keySet());
    for (    String internalName : internalNames) {
      JDeclaredType type=internalFindType(internalName,internalNameBasedTypeLocator);
      if (type == null) {
        continue;
      }
      instantiate(type);
      for (      JField field : type.getFields()) {
        flowInto(field);
      }
      for (      JMethod method : type.getMethods()) {
        flowInto(method);
      }
    }
  }
 else   if (program.typeOracle.isInteropEnabled()) {
    boolean savedErrorsFound=errorsFound;
    Set<String> internalNames=ImmutableSet.copyOf(compiledClassesByInternalName.keySet());
    for (    String internalName : internalNames) {
      JDeclaredType type=internalFindTypeViaLocator(internalName,internalNameBasedTypeLocator);
      if (type != null && (isJsType(type) || hasAnyExports(type))) {
        instantiate(type);
        for (        JField field : type.getFields()) {
          flowInto(field);
        }
        for (        JMethod method : type.getMethods()) {
          flowInto(method);
        }
      }
    }
    errorsFound=savedErrorsFound;
  }
  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 (compilerContext.getOptions().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();
  if (compilerContext.shouldCompileMonolithic()) {
    pruneDeadFieldsAndMethods();
  }
  computeOverrides();
  if (errorsFound) {
    throw new UnableToCompleteException();
  }
}