Program: 110627
Project: 110627
Buggy source:
private ImmutableMap<SkyFunctionName,SkyFunction> skyFunctions(PackageFactory pkgFactory){
  ConfiguredRuleClassProvider ruleClassProvider=(ConfiguredRuleClassProvider)pkgFactory.getRuleClassProvider();
  Semaphore cpuBoundSemaphore=new Semaphore(ResourceUsage.getAvailableProcessors());
  ImmutableMap.Builder<SkyFunctionName,SkyFunction> map=ImmutableMap.builder();
  map.put(SkyFunctions.PRECOMPUTED,new PrecomputedFunction());
  map.put(SkyFunctions.CLIENT_ENVIRONMENT_VARIABLE,new ClientEnvironmentFunction(clientEnv));
  map.put(SkyFunctions.ACTION_ENVIRONMENT_VARIABLE,new ActionEnvironmentFunction());
  map.put(SkyFunctions.FILE_STATE,new FileStateFunction(tsgm,externalFilesHelper));
  map.put(SkyFunctions.DIRECTORY_LISTING_STATE,new DirectoryListingStateFunction(externalFilesHelper));
  map.put(SkyFunctions.FILE_SYMLINK_CYCLE_UNIQUENESS,new FileSymlinkCycleUniquenessFunction());
  map.put(SkyFunctions.FILE_SYMLINK_INFINITE_EXPANSION_UNIQUENESS,new FileSymlinkInfiniteExpansionUniquenessFunction());
  map.put(SkyFunctions.FILE,new FileFunction(pkgLocator));
  map.put(SkyFunctions.DIRECTORY_LISTING,new DirectoryListingFunction());
  map.put(SkyFunctions.PACKAGE_LOOKUP,new PackageLookupFunction(deletedPackages,crossRepositoryLabelViolationStrategy,buildFilesByPriority));
  map.put(SkyFunctions.CONTAINING_PACKAGE_LOOKUP,new ContainingPackageLookupFunction());
  map.put(SkyFunctions.AST_FILE_LOOKUP,new ASTFileLookupFunction(ruleClassProvider));
  map.put(SkyFunctions.SKYLARK_IMPORTS_LOOKUP,newSkylarkImportLookupFunction(ruleClassProvider,pkgFactory));
  map.put(SkyFunctions.GLOB,newGlobFunction());
  map.put(SkyFunctions.TARGET_PATTERN,new TargetPatternFunction(pkgLocator));
  map.put(SkyFunctions.PREPARE_DEPS_OF_PATTERNS,new PrepareDepsOfPatternsFunction());
  map.put(SkyFunctions.PREPARE_DEPS_OF_PATTERN,new PrepareDepsOfPatternFunction(pkgLocator));
  map.put(SkyFunctions.PREPARE_DEPS_OF_TARGETS_UNDER_DIRECTORY,new PrepareDepsOfTargetsUnderDirectoryFunction(directories));
  map.put(SkyFunctions.COLLECT_TARGETS_IN_PACKAGE,new CollectTargetsInPackageFunction());
  map.put(SkyFunctions.COLLECT_PACKAGES_UNDER_DIRECTORY,new CollectPackagesUnderDirectoryFunction(directories));
  map.put(SkyFunctions.BLACKLISTED_PACKAGE_PREFIXES,new BlacklistedPackagePrefixesFunction(hardcodedBlacklistedPackagePrefixes,additionalBlacklistedPackagePrefixesFile));
  map.put(SkyFunctions.TESTS_IN_SUITE,new TestsInSuiteFunction());
  map.put(SkyFunctions.TEST_SUITE_EXPANSION,new TestSuiteExpansionFunction());
  map.put(SkyFunctions.TARGET_PATTERN_PHASE,new TargetPatternPhaseFunction(pkgLocator));
  map.put(SkyFunctions.RECURSIVE_PKG,new RecursivePkgFunction(directories));
  map.put(SkyFunctions.PACKAGE,newPackageFunction(pkgFactory,packageManager,showLoadingProgress,packageFunctionCache,astCache,numPackagesLoaded,ruleClassProvider,packageProgress));
  map.put(SkyFunctions.PACKAGE_ERROR,new PackageErrorFunction());
  map.put(SkyFunctions.TARGET_MARKER,new TargetMarkerFunction());
  map.put(SkyFunctions.TRANSITIVE_TARGET,new TransitiveTargetFunction(ruleClassProvider));
  map.put(Label.TRANSITIVE_TRAVERSAL,new TransitiveTraversalFunction());
  map.put(SkyFunctions.CONFIGURED_TARGET,new ConfiguredTargetFunction(new BuildViewProvider(),ruleClassProvider,cpuBoundSemaphore,removeActionsAfterEvaluation,shouldStoreTransitivePackagesInLoadingAndAnalysis()));
  map.put(SkyFunctions.ASPECT,new AspectFunction(new BuildViewProvider(),ruleClassProvider,removeActionsAfterEvaluation,shouldStoreTransitivePackagesInLoadingAndAnalysis()));
  map.put(SkyFunctions.LOAD_SKYLARK_ASPECT,new ToplevelSkylarkAspectFunction());
  map.put(SkyFunctions.POST_CONFIGURED_TARGET,new PostConfiguredTargetFunction(new BuildViewProvider(),ruleClassProvider));
  map.put(SkyFunctions.BUILD_CONFIGURATION,new BuildConfigurationFunction(directories,ruleClassProvider));
  map.put(SkyFunctions.CONFIGURATION_FRAGMENT,new ConfigurationFragmentFunction(configurationFragments,ruleClassProvider,directories));
  map.put(SkyFunctions.WORKSPACE_NAME,new WorkspaceNameFunction());
  map.put(SkyFunctions.WORKSPACE_AST,new WorkspaceASTFunction(ruleClassProvider));
  map.put(SkyFunctions.WORKSPACE_FILE,new WorkspaceFileFunction(ruleClassProvider,pkgFactory,directories));
  map.put(SkyFunctions.EXTERNAL_PACKAGE,new ExternalPackageFunction());
  map.put(SkyFunctions.TARGET_COMPLETION,CompletionFunction.targetCompletionFunction());
  map.put(SkyFunctions.ASPECT_COMPLETION,CompletionFunction.aspectCompletionFunction());
  map.put(SkyFunctions.TEST_COMPLETION,new TestCompletionFunction());
  map.put(SkyFunctions.ARTIFACT,new ArtifactFunction());
  map.put(SkyFunctions.BUILD_INFO_COLLECTION,new BuildInfoCollectionFunction(actionKeyContext,artifactFactory,buildInfoFactories,removeActionsAfterEvaluation));
  map.put(SkyFunctions.BUILD_INFO,new WorkspaceStatusFunction(actionKeyContext,removeActionsAfterEvaluation,this::makeWorkspaceStatusAction));
  map.put(SkyFunctions.COVERAGE_REPORT,new CoverageReportFunction(actionKeyContext,removeActionsAfterEvaluation));
  ActionExecutionFunction actionExecutionFunction=new ActionExecutionFunction(skyframeActionExecutor,tsgm);
  map.put(SkyFunctions.ACTION_EXECUTION,actionExecutionFunction);
  this.actionExecutionFunction=actionExecutionFunction;
  map.put(SkyFunctions.RECURSIVE_FILESYSTEM_TRAVERSAL,new RecursiveFilesystemTraversalFunction());
  map.put(SkyFunctions.FILESET_ENTRY,new FilesetEntryFunction());
  map.put(SkyFunctions.ACTION_TEMPLATE_EXPANSION,new ActionTemplateExpansionFunction(actionKeyContext,removeActionsAfterEvaluation));
  map.put(SkyFunctions.LOCAL_REPOSITORY_LOOKUP,new LocalRepositoryLookupFunction());
  map.put(SkyFunctions.REGISTERED_EXECUTION_PLATFORMS,new RegisteredExecutionPlatformsFunction());
  map.put(SkyFunctions.REGISTERED_TOOLCHAINS,new RegisteredToolchainsFunction());
  map.put(SkyFunctions.TOOLCHAIN_RESOLUTION,new ToolchainResolutionFunction());
  map.putAll(extraSkyFunctions);
  return map.build();
}

Fixed version (ground truth):
private ImmutableMap<SkyFunctionName,SkyFunction> skyFunctions(PackageFactory pkgFactory){
  ConfiguredRuleClassProvider ruleClassProvider=(ConfiguredRuleClassProvider)pkgFactory.getRuleClassProvider();
  Semaphore cpuBoundSemaphore=new Semaphore(ResourceUsage.getAvailableProcessors());
  ImmutableMap.Builder<SkyFunctionName,SkyFunction> map=ImmutableMap.builder();
  map.put(SkyFunctions.PRECOMPUTED,new PrecomputedFunction());
  map.put(SkyFunctions.CLIENT_ENVIRONMENT_VARIABLE,new ClientEnvironmentFunction(clientEnv));
  map.put(SkyFunctions.ACTION_ENVIRONMENT_VARIABLE,new ActionEnvironmentFunction());
  map.put(SkyFunctions.FILE_STATE,new FileStateFunction(tsgm,externalFilesHelper));
  map.put(SkyFunctions.DIRECTORY_LISTING_STATE,new DirectoryListingStateFunction(externalFilesHelper));
  map.put(SkyFunctions.FILE_SYMLINK_CYCLE_UNIQUENESS,new FileSymlinkCycleUniquenessFunction());
  map.put(SkyFunctions.FILE_SYMLINK_INFINITE_EXPANSION_UNIQUENESS,new FileSymlinkInfiniteExpansionUniquenessFunction());
  map.put(SkyFunctions.FILE,new FileFunction(pkgLocator));
  map.put(SkyFunctions.DIRECTORY_LISTING,new DirectoryListingFunction());
  map.put(SkyFunctions.PACKAGE_LOOKUP,new PackageLookupFunction(deletedPackages,crossRepositoryLabelViolationStrategy,buildFilesByPriority));
  map.put(SkyFunctions.CONTAINING_PACKAGE_LOOKUP,new ContainingPackageLookupFunction());
  map.put(SkyFunctions.AST_FILE_LOOKUP,new ASTFileLookupFunction(ruleClassProvider));
  map.put(SkyFunctions.SKYLARK_IMPORTS_LOOKUP,newSkylarkImportLookupFunction(ruleClassProvider,pkgFactory));
  map.put(SkyFunctions.GLOB,newGlobFunction());
  map.put(SkyFunctions.TARGET_PATTERN,new TargetPatternFunction(pkgLocator));
  map.put(SkyFunctions.PREPARE_DEPS_OF_PATTERNS,new PrepareDepsOfPatternsFunction());
  map.put(SkyFunctions.PREPARE_DEPS_OF_PATTERN,new PrepareDepsOfPatternFunction(pkgLocator));
  map.put(SkyFunctions.PREPARE_DEPS_OF_TARGETS_UNDER_DIRECTORY,new PrepareDepsOfTargetsUnderDirectoryFunction(directories));
  map.put(SkyFunctions.COLLECT_TARGETS_IN_PACKAGE,new CollectTargetsInPackageFunction());
  map.put(SkyFunctions.COLLECT_PACKAGES_UNDER_DIRECTORY,new CollectPackagesUnderDirectoryFunction(directories));
  map.put(SkyFunctions.BLACKLISTED_PACKAGE_PREFIXES,new BlacklistedPackagePrefixesFunction(hardcodedBlacklistedPackagePrefixes,additionalBlacklistedPackagePrefixesFile));
  map.put(SkyFunctions.TESTS_IN_SUITE,new TestsInSuiteFunction());
  map.put(SkyFunctions.TEST_SUITE_EXPANSION,new TestSuiteExpansionFunction());
  map.put(SkyFunctions.TARGET_PATTERN_PHASE,new TargetPatternPhaseFunction(pkgLocator));
  map.put(SkyFunctions.RECURSIVE_PKG,new RecursivePkgFunction(directories));
  map.put(SkyFunctions.PACKAGE,newPackageFunction(pkgFactory,packageManager,showLoadingProgress,packageFunctionCache,astCache,numPackagesLoaded,ruleClassProvider,packageProgress));
  map.put(SkyFunctions.PACKAGE_ERROR,new PackageErrorFunction());
  map.put(SkyFunctions.TARGET_MARKER,new TargetMarkerFunction());
  map.put(SkyFunctions.TARGET_PATTERN_ERROR,new TargetPatternErrorFunction());
  map.put(SkyFunctions.TRANSITIVE_TARGET,new TransitiveTargetFunction(ruleClassProvider));
  map.put(Label.TRANSITIVE_TRAVERSAL,new TransitiveTraversalFunction());
  map.put(SkyFunctions.CONFIGURED_TARGET,new ConfiguredTargetFunction(new BuildViewProvider(),ruleClassProvider,cpuBoundSemaphore,removeActionsAfterEvaluation,shouldStoreTransitivePackagesInLoadingAndAnalysis()));
  map.put(SkyFunctions.ASPECT,new AspectFunction(new BuildViewProvider(),ruleClassProvider,removeActionsAfterEvaluation,shouldStoreTransitivePackagesInLoadingAndAnalysis()));
  map.put(SkyFunctions.LOAD_SKYLARK_ASPECT,new ToplevelSkylarkAspectFunction());
  map.put(SkyFunctions.POST_CONFIGURED_TARGET,new PostConfiguredTargetFunction(new BuildViewProvider(),ruleClassProvider));
  map.put(SkyFunctions.BUILD_CONFIGURATION,new BuildConfigurationFunction(directories,ruleClassProvider));
  map.put(SkyFunctions.CONFIGURATION_FRAGMENT,new ConfigurationFragmentFunction(configurationFragments,ruleClassProvider,directories));
  map.put(SkyFunctions.WORKSPACE_NAME,new WorkspaceNameFunction());
  map.put(SkyFunctions.WORKSPACE_AST,new WorkspaceASTFunction(ruleClassProvider));
  map.put(SkyFunctions.WORKSPACE_FILE,new WorkspaceFileFunction(ruleClassProvider,pkgFactory,directories));
  map.put(SkyFunctions.EXTERNAL_PACKAGE,new ExternalPackageFunction());
  map.put(SkyFunctions.TARGET_COMPLETION,CompletionFunction.targetCompletionFunction());
  map.put(SkyFunctions.ASPECT_COMPLETION,CompletionFunction.aspectCompletionFunction());
  map.put(SkyFunctions.TEST_COMPLETION,new TestCompletionFunction());
  map.put(SkyFunctions.ARTIFACT,new ArtifactFunction());
  map.put(SkyFunctions.BUILD_INFO_COLLECTION,new BuildInfoCollectionFunction(actionKeyContext,artifactFactory,buildInfoFactories,removeActionsAfterEvaluation));
  map.put(SkyFunctions.BUILD_INFO,new WorkspaceStatusFunction(actionKeyContext,removeActionsAfterEvaluation,this::makeWorkspaceStatusAction));
  map.put(SkyFunctions.COVERAGE_REPORT,new CoverageReportFunction(actionKeyContext,removeActionsAfterEvaluation));
  ActionExecutionFunction actionExecutionFunction=new ActionExecutionFunction(skyframeActionExecutor,tsgm);
  map.put(SkyFunctions.ACTION_EXECUTION,actionExecutionFunction);
  this.actionExecutionFunction=actionExecutionFunction;
  map.put(SkyFunctions.RECURSIVE_FILESYSTEM_TRAVERSAL,new RecursiveFilesystemTraversalFunction());
  map.put(SkyFunctions.FILESET_ENTRY,new FilesetEntryFunction());
  map.put(SkyFunctions.ACTION_TEMPLATE_EXPANSION,new ActionTemplateExpansionFunction(actionKeyContext,removeActionsAfterEvaluation));
  map.put(SkyFunctions.LOCAL_REPOSITORY_LOOKUP,new LocalRepositoryLookupFunction());
  map.put(SkyFunctions.REGISTERED_EXECUTION_PLATFORMS,new RegisteredExecutionPlatformsFunction());
  map.put(SkyFunctions.REGISTERED_TOOLCHAINS,new RegisteredToolchainsFunction());
  map.put(SkyFunctions.TOOLCHAIN_RESOLUTION,new ToolchainResolutionFunction());
  map.putAll(extraSkyFunctions);
  return map.build();
}