Program: 110529
Project: 110529
Buggy source:
@Override public SkyValue compute(SkyKey skyKey,Environment env) throws ActionExecutionFunctionException, InterruptedException {
  ActionLookupData actionLookupData=(ActionLookupData)skyKey.argument();
  ActionLookupValue actionLookupValue=(ActionLookupValue)env.getValue(actionLookupData.getActionLookupKey());
  int actionIndex=actionLookupData.getActionIndex();
  Action action=actionLookupValue.getAction(actionIndex);
  skyframeActionExecutor.noteActionEvaluationStarted(actionLookupData,action);
  if ((action.isVolatile() && !(action instanceof SkyframeAwareAction)) || action instanceof NotifyOnActionCacheHit) {
    PrecomputedValue.BUILD_ID.get(env);
  }
  Map<SkyKey,SkyValue> clientEnvLookup=env.getValues(Iterables.transform(action.getClientEnvironmentVariables(),ClientEnvironmentFunction::key));
  if (env.valuesMissing()) {
    return null;
  }
  Map<String,String> clientEnv=new HashMap<>();
  for (  Map.Entry<SkyKey,SkyValue> entry : clientEnvLookup.entrySet()) {
    ClientEnvironmentValue envValue=(ClientEnvironmentValue)entry.getValue();
    if (envValue.getValue() != null) {
      clientEnv.put((String)entry.getKey().argument(),envValue.getValue());
    }
  }
  boolean sharedActionAlreadyRan=skyframeActionExecutor.probeActionExecution(action);
  ContinuationState state;
  if (action.discoversInputs()) {
    state=getState(action);
  }
 else {
    state=new ContinuationState();
  }
  if (!state.hasCollectedInputs()) {
    state.allInputs=collectInputs(action,env);
    if (state.allInputs == null) {
      return null;
    }
  }
 else   if (state.allInputs.keysRequested != null) {
    env.getValues(state.allInputs.keysRequested);
    Preconditions.checkState(!env.valuesMissing(),"String_Node_Str",action,state);
  }
  Pair<ActionInputMap,Map<Artifact,Collection<Artifact>>> checkedInputs=null;
  try {
    Map<SkyKey,ValueOrException2<MissingInputFileException,ActionExecutionException>> inputDeps=env.getValuesOrThrow(toKeys(state.allInputs.getAllInputs(),action.discoversInputs() ? action.getMandatoryInputs() : null),MissingInputFileException.class,ActionExecutionException.class);
    if (!sharedActionAlreadyRan && !state.hasArtifactData()) {
      checkedInputs=checkInputs(env,action,inputDeps);
    }
  }
 catch (  ActionExecutionException e) {
    stateMap.remove(action);
    throw new ActionExecutionFunctionException(e);
  }
  if (env.valuesMissing()) {
    return null;
  }
  try {
    establishSkyframeDependencies(env,action);
  }
 catch (  ActionExecutionException e) {
    throw new ActionExecutionFunctionException(e);
  }
  if (env.valuesMissing()) {
    return null;
  }
  if (checkedInputs != null) {
    Preconditions.checkState(!state.hasArtifactData(),"String_Node_Str",state,action);
    state.inputArtifactData=checkedInputs.first;
    state.expandedArtifacts=checkedInputs.second;
    if (skyframeActionExecutor.usesActionFileSystem()) {
      Iterable<Artifact> optionalInputs;
      if (action.discoversInputs()) {
        if (action instanceof IncludeScannable) {
          optionalInputs=((IncludeScannable)action).getDeclaredIncludeSrcs();
        }
 else {
          optionalInputs=action.getAllowedDerivedInputs();
        }
      }
 else {
        optionalInputs=ImmutableList.of();
      }
      state.actionFileSystem=new ActionFileSystem(skyframeActionExecutor.getExecutorFileSystem(),skyframeActionExecutor.getExecRoot(),directories.getRelativeOutputPath(),skyframeActionExecutor.getSourceRoots(),checkedInputs.first,optionalInputs,action.getOutputs());
    }
  }
  ActionExecutionValue result;
  try {
    result=checkCacheAndExecuteIfNeeded(action,state,env,clientEnv,actionLookupData,sharedActionAlreadyRan);
  }
 catch (  ActionExecutionException e) {
    stateMap.remove(action);
    throw new ActionExecutionFunctionException(new AlreadyReportedActionExecutionException(e));
  }
  if (env.valuesMissing()) {
    Preconditions.checkState(stateMap.containsKey(action),action);
    return null;
  }
  stateMap.remove(action);
  actionLookupValue.actionEvaluated(actionIndex,action);
  return result;
}

Fixed version (ground truth):
@Override public SkyValue compute(SkyKey skyKey,Environment env) throws ActionExecutionFunctionException, InterruptedException {
  ActionLookupData actionLookupData=(ActionLookupData)skyKey.argument();
  ActionLookupValue actionLookupValue=(ActionLookupValue)env.getValue(actionLookupData.getActionLookupKey());
  int actionIndex=actionLookupData.getActionIndex();
  Action action=actionLookupValue.getAction(actionIndex);
  skyframeActionExecutor.noteActionEvaluationStarted(actionLookupData,action);
  if ((action.isVolatile() && !(action instanceof SkyframeAwareAction)) || action instanceof NotifyOnActionCacheHit) {
    PrecomputedValue.BUILD_ID.get(env);
  }
  Map<SkyKey,SkyValue> clientEnvLookup=env.getValues(Iterables.transform(action.getClientEnvironmentVariables(),ClientEnvironmentFunction::key));
  if (env.valuesMissing()) {
    return null;
  }
  Map<String,String> clientEnv=new HashMap<>();
  for (  Map.Entry<SkyKey,SkyValue> entry : clientEnvLookup.entrySet()) {
    ClientEnvironmentValue envValue=(ClientEnvironmentValue)entry.getValue();
    if (envValue.getValue() != null) {
      clientEnv.put((String)entry.getKey().argument(),envValue.getValue());
    }
  }
  boolean sharedActionAlreadyRan=skyframeActionExecutor.probeActionExecution(action);
  ContinuationState state;
  if (action.discoversInputs()) {
    state=getState(action);
  }
 else {
    state=new ContinuationState();
  }
  if (!state.hasCollectedInputs()) {
    state.allInputs=collectInputs(action,env);
    if (state.allInputs == null) {
      return null;
    }
  }
 else   if (state.allInputs.keysRequested != null) {
    env.getValues(state.allInputs.keysRequested);
    Preconditions.checkState(!env.valuesMissing(),"String_Node_Str",action,state);
  }
  Pair<ActionInputMap,Map<Artifact,Collection<Artifact>>> checkedInputs=null;
  try {
    Map<SkyKey,ValueOrException2<MissingInputFileException,ActionExecutionException>> inputDeps=env.getValuesOrThrow(toKeys(state.allInputs.getAllInputs(),action.discoversInputs() ? action.getMandatoryInputs() : null),MissingInputFileException.class,ActionExecutionException.class);
    if (!sharedActionAlreadyRan && !state.hasArtifactData()) {
      checkedInputs=checkInputs(env,action,inputDeps);
    }
  }
 catch (  ActionExecutionException e) {
    stateMap.remove(action);
    throw new ActionExecutionFunctionException(e);
  }
  if (env.valuesMissing()) {
    return null;
  }
  try {
    establishSkyframeDependencies(env,action);
  }
 catch (  ActionExecutionException e) {
    throw new ActionExecutionFunctionException(e);
  }
  if (env.valuesMissing()) {
    return null;
  }
  if (checkedInputs != null) {
    Preconditions.checkState(!state.hasArtifactData(),"String_Node_Str",state,action);
    state.inputArtifactData=checkedInputs.first;
    state.expandedArtifacts=checkedInputs.second;
    if (skyframeActionExecutor.usesActionFileSystem()) {
      Iterable<Artifact> optionalInputs;
      if (action.discoversInputs()) {
        if (action instanceof IncludeScannable) {
          optionalInputs=((IncludeScannable)action).getDeclaredIncludeSrcs();
        }
 else {
          optionalInputs=action.getAllowedDerivedInputs();
        }
      }
 else {
        optionalInputs=ImmutableList.of();
      }
      state.actionFileSystem=new ActionFileSystem(skyframeActionExecutor.getExecutorFileSystem(),skyframeActionExecutor.getExecRoot().asFragment(),directories.getRelativeOutputPath(),skyframeActionExecutor.getSourceRoots(),checkedInputs.first,optionalInputs,action.getOutputs());
    }
  }
  ActionExecutionValue result;
  try {
    result=checkCacheAndExecuteIfNeeded(action,state,env,clientEnv,actionLookupData,sharedActionAlreadyRan);
  }
 catch (  ActionExecutionException e) {
    stateMap.remove(action);
    throw new ActionExecutionFunctionException(new AlreadyReportedActionExecutionException(e));
  }
  if (env.valuesMissing()) {
    Preconditions.checkState(stateMap.containsKey(action),action);
    return null;
  }
  stateMap.remove(action);
  actionLookupValue.actionEvaluated(actionIndex,action);
  return result;
}