Program: 111002
Project: 111002
Buggy source:
/** 
 * Computes the direct dependencies of a node in the configured target graph (a configured target or an aspect). <p>Returns null if Skyframe hasn't evaluated the required dependencies yet. In this case, the caller should also return null to Skyframe.
 * @param env the Skyframe environment
 * @param resolver The dependency resolver
 * @param ctgValue The label and the configuration of the node
 * @param aspectDefinition the aspect of the node (if null, the node is a configured target,otherwise it's an aspect)
 * @param aspectParameters additional parameters for aspect construction
 * @param configConditions the configuration conditions for evaluating the attributes of the node
 * @param ruleClassProvider rule class provider for determining the right configuration fragmentsto apply to deps
 * @param hostConfiguration the host configuration. There's a noticeable performance hit frominstantiating this on demand for every dependency that wants it, so it's best to compute the host configuration as early as possible and pass this reference to all consumers without involving Skyframe.
 * @return an attribute -&gt; direct dependency multimap
 */
@Nullable static ListMultimap<Attribute,ConfiguredTarget> computeDependencies(Environment env,SkyframeDependencyResolver resolver,TargetAndConfiguration ctgValue,AspectDefinition aspectDefinition,AspectParameters aspectParameters,Set<ConfigMatchingProvider> configConditions,RuleClassProvider ruleClassProvider,BuildConfiguration hostConfiguration,NestedSetBuilder<Package> transitivePackages) throws DependencyEvaluationException {
  ListMultimap<Attribute,Dependency> depValueNames;
  try {
    depValueNames=resolver.dependentNodeMap(ctgValue,hostConfiguration,aspectDefinition,aspectParameters,configConditions);
  }
 catch (  EvalException e) {
    env.getListener().handle(Event.error(e.getLocation(),e.getMessage()));
    throw new DependencyEvaluationException(new ConfiguredValueCreationException(e.print()));
  }
  if (ctgValue.getConfiguration() != null && ctgValue.getConfiguration().useDynamicConfigurations()) {
    depValueNames=trimConfigurations(env,ctgValue,depValueNames,hostConfiguration,ruleClassProvider);
    if (depValueNames == null) {
      return null;
    }
  }
  Map<SkyKey,ConfiguredTarget> depValues=resolveConfiguredTargetDependencies(env,depValueNames.values(),ctgValue.getTarget(),transitivePackages);
  if (depValues == null) {
    return null;
  }
  ListMultimap<SkyKey,Aspect> depAspects=resolveAspectDependencies(env,depValues,depValueNames.values(),transitivePackages);
  if (depAspects == null) {
    return null;
  }
  return mergeAspects(depValueNames,depValues,depAspects);
}

Fixed version (ground truth):
/** 
 * Computes the direct dependencies of a node in the configured target graph (a configured target or an aspect). <p>Returns null if Skyframe hasn't evaluated the required dependencies yet. In this case, the caller should also return null to Skyframe.
 * @param env the Skyframe environment
 * @param resolver The dependency resolver
 * @param ctgValue The label and the configuration of the node
 * @param aspectDefinition the aspect of the node (if null, the node is a configured target,otherwise it's an aspect)
 * @param aspectParameters additional parameters for aspect construction
 * @param configConditions the configuration conditions for evaluating the attributes of the node
 * @param ruleClassProvider rule class provider for determining the right configuration fragmentsto apply to deps
 * @param hostConfiguration the host configuration. There's a noticeable performance hit frominstantiating this on demand for every dependency that wants it, so it's best to compute the host configuration as early as possible and pass this reference to all consumers without involving Skyframe.
 * @return an attribute -&gt; direct dependency multimap
 */
@Nullable static ListMultimap<Attribute,ConfiguredTarget> computeDependencies(Environment env,SkyframeDependencyResolver resolver,TargetAndConfiguration ctgValue,AspectDefinition aspectDefinition,AspectParameters aspectParameters,Set<ConfigMatchingProvider> configConditions,RuleClassProvider ruleClassProvider,BuildConfiguration hostConfiguration,NestedSetBuilder<Package> transitivePackages) throws DependencyEvaluationException, AspectCreationException {
  ListMultimap<Attribute,Dependency> depValueNames;
  try {
    depValueNames=resolver.dependentNodeMap(ctgValue,hostConfiguration,aspectDefinition,aspectParameters,configConditions);
  }
 catch (  EvalException e) {
    env.getListener().handle(Event.error(e.getLocation(),e.getMessage()));
    throw new DependencyEvaluationException(new ConfiguredValueCreationException(e.print()));
  }
  if (ctgValue.getConfiguration() != null && ctgValue.getConfiguration().useDynamicConfigurations()) {
    depValueNames=trimConfigurations(env,ctgValue,depValueNames,hostConfiguration,ruleClassProvider);
    if (depValueNames == null) {
      return null;
    }
  }
  Map<SkyKey,ConfiguredTarget> depValues=resolveConfiguredTargetDependencies(env,depValueNames.values(),ctgValue.getTarget(),transitivePackages);
  if (depValues == null) {
    return null;
  }
  ListMultimap<SkyKey,Aspect> depAspects=resolveAspectDependencies(env,depValues,depValueNames.values(),transitivePackages);
  if (depAspects == null) {
    return null;
  }
  return mergeAspects(depValueNames,depValues,depAspects);
}