Program: 110971
Project: 110971
Buggy source:
@VisibleForTesting public Iterable<Dependency> getDirectPrerequisiteDependenciesForIdeInfo(final EventHandler eventHandler,ConfiguredTarget ct,@Nullable final LoadingCache<Label,Target> targetCache,BuildConfigurationCollection configurations) throws InterruptedException {
  if (!(ct.getTarget() instanceof Rule)) {
    return ImmutableList.of();
  }
class SilentDependencyResolver extends DependencyResolver {
    @Override protected void invalidVisibilityReferenceHook(    TargetAndConfiguration node,    Label label){
    }
    @Override protected void invalidPackageGroupReferenceHook(    TargetAndConfiguration node,    Label label){
    }
    @Override protected Target getTarget(    Label label){
      if (targetCache == null) {
        try {
          return LoadedPackageProvider.Bridge.getLoadedTarget(skyframeExecutor.getPackageManager(),eventHandler,label);
        }
 catch (        NoSuchThingException e) {
          throw new IllegalStateException(e);
        }
      }
      try {
        return targetCache.get(label);
      }
 catch (      ExecutionException e) {
        throw new IllegalStateException(e);
      }
    }
  }
  DependencyResolver dependencyResolver=new SilentDependencyResolver();
  TargetAndConfiguration ctgNode=new TargetAndConfiguration(ct.getTarget(),ct.getConfiguration());
  try {
    return ImmutableSet.copyOf(dependencyResolver.dependentNodeMap(ctgNode,configurations.getHostConfiguration(),null,getConfigurableAttributeKeysForTesting(eventHandler,ctgNode)).values());
  }
 catch (  EvalException e) {
    throw new IllegalStateException(e);
  }
}

Fixed version (ground truth):
@VisibleForTesting public Iterable<Dependency> getDirectPrerequisiteDependenciesForIdeInfo(final EventHandler eventHandler,ConfiguredTarget ct,@Nullable final LoadingCache<Label,Target> targetCache,BuildConfigurationCollection configurations) throws InterruptedException {
  if (!(ct.getTarget() instanceof Rule)) {
    return ImmutableList.of();
  }
class SilentDependencyResolver extends DependencyResolver {
    @Override protected void invalidVisibilityReferenceHook(    TargetAndConfiguration node,    Label label){
    }
    @Override protected void invalidPackageGroupReferenceHook(    TargetAndConfiguration node,    Label label){
    }
    @Override protected void missingEdgeHook(    Target from,    Label to,    NoSuchThingException e){
    }
    @Override protected Target getTarget(    Label label){
      if (targetCache == null) {
        try {
          return LoadedPackageProvider.Bridge.getLoadedTarget(skyframeExecutor.getPackageManager(),eventHandler,label);
        }
 catch (        NoSuchThingException e) {
          throw new IllegalStateException(e);
        }
      }
      try {
        return targetCache.get(label);
      }
 catch (      ExecutionException e) {
        throw new IllegalStateException(e);
      }
    }
  }
  DependencyResolver dependencyResolver=new SilentDependencyResolver();
  TargetAndConfiguration ctgNode=new TargetAndConfiguration(ct.getTarget(),ct.getConfiguration());
  try {
    return ImmutableSet.copyOf(dependencyResolver.dependentNodeMap(ctgNode,configurations.getHostConfiguration(),null,getConfigurableAttributeKeysForTesting(eventHandler,ctgNode)).values());
  }
 catch (  EvalException e) {
    throw new IllegalStateException(e);
  }
}