nus-yam/ex-repair huggingface dataset:
Program: 110896
Project: 110896
Buggy source:
@Override public ConfiguredAspect create(ConfiguredTarget base,RuleContext ruleContext,AspectParameters parameters) throws InterruptedException {
  ConfiguredAspect.Builder aspectBuilder=new ConfiguredAspect.Builder(NAME,ruleContext);
  ObjcConfiguration objcConfiguration=ruleContext.getFragment(ObjcConfiguration.class);
  if (!objcConfiguration.experimentalAutoTopLevelUnionObjCProtos()) {
    return aspectBuilder.build();
  }
  ObjcProtoProvider.Builder aspectObjcProtoProvider=new ObjcProtoProvider.Builder();
  Iterable<ObjcProtoProvider> depObjcProtoProviders=ruleContext.getPrerequisites("String_Node_Str",Mode.TARGET,ObjcProtoProvider.class);
  aspectObjcProtoProvider.addTransitive(depObjcProtoProviders);
  if (ruleContext.attributes().has(ObjcProtoLibraryRule.PORTABLE_PROTO_FILTERS_ATTR,LABEL_LIST)) {
    aspectObjcProtoProvider.addPortableProtoFilters(PrerequisiteArtifacts.nestedSet(ruleContext,ObjcProtoLibraryRule.PORTABLE_PROTO_FILTERS_ATTR,Mode.HOST));
    Iterable<ProtoSourcesProvider> protoProviders=ruleContext.getPrerequisites("String_Node_Str",Mode.TARGET,ProtoSourcesProvider.class);
    for (    ProtoSourcesProvider protoProvider : protoProviders) {
      aspectObjcProtoProvider.addProtoSources(protoProvider.getTransitiveProtoSources());
    }
  }
  if (!aspectObjcProtoProvider.isEmpty()) {
    aspectBuilder.addProvider(ObjcProtoProvider.class,aspectObjcProtoProvider.build());
  }
  return aspectBuilder.build();
}

Fixed version (ground truth):
@Override public ConfiguredAspect create(ConfiguredTarget base,RuleContext ruleContext,AspectParameters parameters) throws InterruptedException {
  ConfiguredAspect.Builder aspectBuilder=new ConfiguredAspect.Builder(NAME,ruleContext);
  ObjcConfiguration objcConfiguration=ruleContext.getFragment(ObjcConfiguration.class);
  if (!objcConfiguration.experimentalAutoTopLevelUnionObjCProtos()) {
    return aspectBuilder.build();
  }
  ObjcProtoProvider.Builder aspectObjcProtoProvider=new ObjcProtoProvider.Builder();
  if (ruleContext.attributes().has("String_Node_Str",BuildType.LABEL_LIST)) {
    Iterable<ObjcProtoProvider> depObjcProtoProviders=ruleContext.getPrerequisites("String_Node_Str",Mode.TARGET,ObjcProtoProvider.class);
    aspectObjcProtoProvider.addTransitive(depObjcProtoProviders);
  }
  if (ruleContext.attributes().isAttributeValueExplicitlySpecified(ObjcProtoLibraryRule.PORTABLE_PROTO_FILTERS_ATTR)) {
    aspectObjcProtoProvider.addPortableProtoFilters(PrerequisiteArtifacts.nestedSet(ruleContext,ObjcProtoLibraryRule.PORTABLE_PROTO_FILTERS_ATTR,Mode.HOST));
    Iterable<ProtoSourcesProvider> protoProviders=ruleContext.getPrerequisites("String_Node_Str",Mode.TARGET,ProtoSourcesProvider.class);
    for (    ProtoSourcesProvider protoProvider : protoProviders) {
      aspectObjcProtoProvider.addProtoSources(protoProvider.getTransitiveProtoSources());
    }
  }
  if (!aspectObjcProtoProvider.isEmpty()) {
    aspectBuilder.addProvider(ObjcProtoProvider.class,aspectObjcProtoProvider.build());
  }
  return aspectBuilder.build();
}
Program: 110897
Project: 110897
Buggy source:
/** 
 * Queries if the node is done and adds the given key as a reverse dependency. The return code indicates whether a) the node is done, b) the reverse dependency is the first one, so the node needs to be scheduled, or c) the reverse dependency was added, and the node does not need to be scheduled. <p>This method <b>must</b> be called before any processing of the entry. This encourages callers to check that the entry is ready to be processed. <p>Adding the dependency and checking if the node needs to be scheduled is an atomic operation to avoid a race where two threads work on two nodes, where one depends on the other (b depends on a). In that case, we need to ensure that b is re-scheduled exactly once when a is done. However, a may complete first, in which case b has to re-schedule itself. Also see   {@link #setValue}. <p>If the parameter is   {@code null}, then no reverse dependency is added, but we still check if the node needs to be scheduled.
 */
@ThreadSafe DependencyState addReverseDepAndCheckIfDone(@Nullable SkyKey reverseDep);

Fixed version (ground truth):
/** 
 * Queries if the node is done and adds the given key as a reverse dependency. The return code indicates whether a) the node is done, b) the reverse dependency is the first one, so the node needs to be scheduled, or c) the reverse dependency was added, and the node does not need to be scheduled. <p>This method <b>must</b> be called before any processing of the entry. This encourages callers to check that the entry is ready to be processed. <p>Adding the dependency and checking if the node needs to be scheduled is an atomic operation to avoid a race where two threads work on two nodes, where one depends on the other (b depends on a). In that case, we need to ensure that b is re-scheduled exactly once when a is done. However, a may complete first, in which case b has to re-schedule itself. Also see   {@link #setValue}. <p>If the parameter is   {@code null}, then no reverse dependency is added, but we still check if the node needs to be scheduled. <p>If   {@code reverseDep} is a rebuilding dirty entry that was already a reverse dep of thisentry, then  {@link #checkIfDoneForDirtyReverseDep} must be called instead.
 */
@ThreadSafe DependencyState addReverseDepAndCheckIfDone(@Nullable SkyKey reverseDep);
Program: 110899
Project: 110899
Buggy source:
/** 
 * Returns the path formed by appending the relative or absolute string  {@code path} to this path.<p>If the given path string is absolute, the current path will be ignored; otherwise, they will be combined. Up-level references ("..") cause the preceding path segment to be elided. <p>This is a purely syntactic operation, i.e. it does no I/O, it does not validate the existence of any path, nor resolve symbolic links.
 */
public Path getRelative(String path){
  if ((path.length() == 0) || (path.equals("String_Node_Str"))) {
    return this;
  }
 else   if (path.equals("String_Node_Str")) {
    return parent == null ? this : parent;
  }
 else   if ((path.indexOf('/') != -1)) {
    return getRelative(new PathFragment(path));
  }
 else {
    return getCachedChildPath(path);
  }
}

Fixed version (ground truth):
/** 
 * Returns the path formed by appending the relative or absolute string  {@code path} to this path.<p>If the given path string is absolute, the current path will be ignored; otherwise, they will be combined. Up-level references ("..") cause the preceding path segment to be elided. <p>This is a purely syntactic operation, i.e. it does no I/O, it does not validate the existence of any path, nor resolve symbolic links.
 */
public Path getRelative(String path){
  if ((path.length() == 0) || (path.equals("String_Node_Str"))) {
    return this;
  }
 else   if (path.equals("String_Node_Str")) {
    return parent == null ? this : parent;
  }
 else   if (path.indexOf('/') != -1) {
    return getRelative(new PathFragment(path));
  }
 else   if (path.indexOf(PathFragment.EXTRA_SEPARATOR_CHAR) != -1) {
    return getRelative(new PathFragment(path));
  }
 else {
    return getCachedChildPath(path);
  }
}
Program: 110900
Project: 110900
Buggy source:
@Override protected String computeKey(){
  Fingerprint f=new Fingerprint();
  f.addString(GUID);
  f.addInt(privateHeaders.size());
  for (  Artifact artifact : privateHeaders) {
    f.addPath(artifact.getRootRelativePath());
  }
  f.addInt(publicHeaders.size());
  for (  Artifact artifact : publicHeaders) {
    f.addPath(artifact.getRootRelativePath());
  }
  f.addInt(dependencies.size());
  for (  CppModuleMap dep : dependencies) {
    f.addPath(dep.getArtifact().getExecPath());
  }
  f.addInt(additionalExportedHeaders.size());
  for (  PathFragment path : additionalExportedHeaders) {
    f.addPath(path);
  }
  f.addPath(cppModuleMap.getArtifact().getExecPath());
  f.addString(cppModuleMap.getName());
  f.addBoolean(moduleMapHomeIsCwd);
  f.addBoolean(compiledModule);
  f.addBoolean(generateSubmodules);
  f.addBoolean(externDependencies);
  return f.hexDigestAndReset();
}

Fixed version (ground truth):
@Override protected String computeKey(){
  Fingerprint f=new Fingerprint();
  f.addString(GUID);
  f.addInt(privateHeaders.size());
  for (  Artifact artifact : privateHeaders) {
    f.addPath(artifact.getExecPath());
  }
  f.addInt(publicHeaders.size());
  for (  Artifact artifact : publicHeaders) {
    f.addPath(artifact.getExecPath());
  }
  f.addInt(dependencies.size());
  for (  CppModuleMap dep : dependencies) {
    f.addPath(dep.getArtifact().getExecPath());
  }
  f.addInt(additionalExportedHeaders.size());
  for (  PathFragment path : additionalExportedHeaders) {
    f.addPath(path);
  }
  f.addPath(cppModuleMap.getArtifact().getExecPath());
  f.addString(cppModuleMap.getName());
  f.addBoolean(moduleMapHomeIsCwd);
  f.addBoolean(compiledModule);
  f.addBoolean(generateSubmodules);
  f.addBoolean(externDependencies);
  return f.hexDigestAndReset();
}
Program: 110901
Project: 110901
Buggy source:
private void runFindAllRules(String pattern) throws Exception {
  assertThat(parseList(pattern)).containsExactlyElementsIn(Sets.union(rulesBeneathFoo,rulesBeneathOtherrules));
  assertNoEvents();
  eventCollector.clear();
}

Fixed version (ground truth):
private void runFindAllRules(String pattern) throws Exception {
  assertThat(parseList(pattern)).containsExactlyElementsIn(ImmutableSet.builder().addAll(rulesBeneathFoo).addAll(rulesBeneathOtherrules).addAll(rulesInTopLevelPackage).build());
  assertNoEvents();
  eventCollector.clear();
}
Program: 110902
Project: 110902
Buggy source:
private void runFindAllTargets(String pattern) throws Exception {
  assertThat(parseList(pattern)).containsExactlyElementsIn(Sets.union(targetsBeneathFoo,targetsInOtherrules));
  assertNoEvents();
  eventCollector.clear();
}

Fixed version (ground truth):
private void runFindAllTargets(String pattern) throws Exception {
  assertThat(parseList(pattern)).containsExactlyElementsIn(ImmutableSet.builder().addAll(targetsBeneathFoo).addAll(targetsInOtherrules).addAll(targetsInTopLevelPackage).build());
  assertNoEvents();
  eventCollector.clear();
}
Program: 110903
Project: 110903
Buggy source:
@Test public void testFindAllRulesRecursivelyWithExperimental() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  assertThat(parseList("String_Node_Str")).containsExactlyElementsIn(Sets.union(rulesBeneathFoo,rulesBeneathOtherrules));
  assertNoEvents();
}

Fixed version (ground truth):
@Test public void testFindAllRulesRecursivelyWithExperimental() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  assertThat(parseList("String_Node_Str")).containsExactlyElementsIn(ImmutableSet.builder().addAll(rulesBeneathFoo).addAll(rulesBeneathOtherrules).addAll(rulesInTopLevelPackage).build());
  assertNoEvents();
}
Program: 110906
Project: 110906
Buggy source:
private void init() throws InterruptedException {
  EvaluationResult<SkyValue> result;
  try (AutoProfiler p=AutoProfiler.logged("String_Node_Str",LOG)){
    result=graphFactory.prepareAndGet(universeScope,parserPrefix,loadingPhaseThreads,eventHandler);
  }
   graph=result.getWalkableGraph();
  SkyKey universeKey=graphFactory.getUniverseKey(universeScope,parserPrefix);
  universeTargetPatternKeys=PrepareDepsOfPatternsFunction.getTargetPatternKeys(PrepareDepsOfPatternsFunction.getSkyKeys(universeKey,eventHandler));
  Collection<SkyValue> values=result.values();
  if (!values.isEmpty()) {
    Preconditions.checkState(values.size() == 1,"String_Node_Str" + "String_Node_Str",universeScope,values.size());
    Preconditions.checkNotNull(result.get(universeKey),result);
  }
 else {
    boolean foundCycle=!Iterables.isEmpty(result.getError().getCycleInfo());
    Preconditions.checkState(foundCycle,"String_Node_Str",universeScope,result.getError());
  }
}

Fixed version (ground truth):
private void init() throws InterruptedException {
  EvaluationResult<SkyValue> result;
  try (AutoProfiler p=AutoProfiler.logged("String_Node_Str",LOG)){
    result=graphFactory.prepareAndGet(universeScope,parserPrefix,loadingPhaseThreads,eventHandler);
  }
   graph=result.getWalkableGraph();
  blacklistPatterns=Preconditions.checkNotNull((BlacklistedPackagePrefixesValue)graph.getValue(BlacklistedPackagePrefixesValue.key())).getPatterns();
  SkyKey universeKey=graphFactory.getUniverseKey(universeScope,parserPrefix);
  universeTargetPatternKeys=PrepareDepsOfPatternsFunction.getTargetPatternKeys(PrepareDepsOfPatternsFunction.getSkyKeys(universeKey,eventHandler));
  Collection<SkyValue> values=result.values();
  if (!values.isEmpty()) {
    Preconditions.checkState(values.size() == 1,"String_Node_Str" + "String_Node_Str",universeScope,values.size());
    Preconditions.checkNotNull(result.get(universeKey),result);
  }
 else {
    boolean foundCycle=!Iterables.isEmpty(result.getError().getCycleInfo());
    Preconditions.checkState(foundCycle,"String_Node_Str",universeScope,result.getError());
  }
}
Program: 110907
Project: 110907
Buggy source:
@Nullable @Override public SkyValue compute(SkyKey key,Environment env) throws SkyFunctionException, InterruptedException {
  TargetPatternValue.TargetPatternKey patternKey=((TargetPatternValue.TargetPatternKey)key.argument());
  Preconditions.checkState(patternKey.getPolicy().equals(FilteringPolicies.NO_FILTER),patternKey.getPolicy());
  try {
    TargetPattern parsedPattern=patternKey.getParsedPattern();
    DepsOfPatternPreparer preparer=new DepsOfPatternPreparer(env,pkgPath.get());
    ImmutableSet<PathFragment> excludedSubdirectories=patternKey.getExcludedSubdirectories();
    parsedPattern.eval(preparer,excludedSubdirectories,NullCallback.<Void>instance(),RuntimeException.class);
  }
 catch (  TargetParsingException e) {
    throw new PrepareDepsOfPatternFunctionException(e);
  }
catch (  MissingDepException e) {
    return null;
  }
  return PrepareDepsOfPatternValue.INSTANCE;
}

Fixed version (ground truth):
@Nullable @Override public SkyValue compute(SkyKey key,Environment env) throws SkyFunctionException, InterruptedException {
  TargetPatternValue.TargetPatternKey patternKey=((TargetPatternValue.TargetPatternKey)key.argument());
  Preconditions.checkState(patternKey.getPolicy().equals(FilteringPolicies.NO_FILTER),patternKey.getPolicy());
  TargetPattern parsedPattern=patternKey.getParsedPattern();
  BlacklistedPackagePrefixesValue blacklist=(BlacklistedPackagePrefixesValue)env.getValue(BlacklistedPackagePrefixesValue.key());
  if (blacklist == null) {
    return null;
  }
  ImmutableSet<PathFragment> subdirectoriesToExclude=patternKey.getAllSubdirectoriesToExclude(blacklist.getPatterns());
  DepsOfPatternPreparer preparer=new DepsOfPatternPreparer(env,pkgPath.get());
  try {
    parsedPattern.eval(preparer,subdirectoriesToExclude,NullCallback.<Void>instance(),RuntimeException.class);
  }
 catch (  TargetParsingException e) {
    throw new PrepareDepsOfPatternFunctionException(e);
  }
catch (  MissingDepException e) {
    return null;
  }
  return PrepareDepsOfPatternValue.INSTANCE;
}
Program: 110909
Project: 110909
Buggy source:
private SequencedSkyframeExecutor(EvaluatorSupplier evaluatorSupplier,PackageFactory pkgFactory,BlazeDirectories directories,BinTools binTools,Factory workspaceStatusActionFactory,ImmutableList<BuildInfoFactory> buildInfoFactories,Iterable<? extends DiffAwareness.Factory> diffAwarenessFactories,Predicate<PathFragment> allowedMissingInputs,Preprocessor.Factory.Supplier preprocessorFactorySupplier,ImmutableMap<SkyFunctionName,SkyFunction> extraSkyFunctions,ImmutableList<PrecomputedValue.Injected> extraPrecomputedValues,Iterable<SkyValueDirtinessChecker> customDirtinessCheckers){
  super(evaluatorSupplier,pkgFactory,directories,binTools,workspaceStatusActionFactory,buildInfoFactories,allowedMissingInputs,preprocessorFactorySupplier,extraSkyFunctions,extraPrecomputedValues,false);
  this.diffAwarenessManager=new DiffAwarenessManager(diffAwarenessFactories);
  this.customDirtinessCheckers=customDirtinessCheckers;
}

Fixed version (ground truth):
private SequencedSkyframeExecutor(EvaluatorSupplier evaluatorSupplier,PackageFactory pkgFactory,BlazeDirectories directories,BinTools binTools,Factory workspaceStatusActionFactory,ImmutableList<BuildInfoFactory> buildInfoFactories,Iterable<? extends DiffAwareness.Factory> diffAwarenessFactories,Predicate<PathFragment> allowedMissingInputs,Preprocessor.Factory.Supplier preprocessorFactorySupplier,ImmutableMap<SkyFunctionName,SkyFunction> extraSkyFunctions,ImmutableList<PrecomputedValue.Injected> extraPrecomputedValues,Iterable<SkyValueDirtinessChecker> customDirtinessCheckers,PathFragment blacklistedPackagePrefixesFile){
  super(evaluatorSupplier,pkgFactory,directories,binTools,workspaceStatusActionFactory,buildInfoFactories,allowedMissingInputs,preprocessorFactorySupplier,extraSkyFunctions,extraPrecomputedValues,false,blacklistedPackagePrefixesFile);
  this.diffAwarenessManager=new DiffAwarenessManager(diffAwarenessFactories);
  this.customDirtinessCheckers=customDirtinessCheckers;
}
Program: 110910
Project: 110910
Buggy source:
@VisibleForTesting public static SequencedSkyframeExecutor create(PackageFactory pkgFactory,BlazeDirectories directories,BinTools binTools,WorkspaceStatusAction.Factory workspaceStatusActionFactory,ImmutableList<BuildInfoFactory> buildInfoFactories,Iterable<? extends DiffAwareness.Factory> diffAwarenessFactories){
  return create(pkgFactory,directories,binTools,workspaceStatusActionFactory,buildInfoFactories,diffAwarenessFactories,Predicates.<PathFragment>alwaysFalse(),Preprocessor.Factory.Supplier.NullSupplier.INSTANCE,ImmutableMap.<SkyFunctionName,SkyFunction>of(),ImmutableList.<PrecomputedValue.Injected>of(),ImmutableList.<SkyValueDirtinessChecker>of());
}

Fixed version (ground truth):
@VisibleForTesting public static SequencedSkyframeExecutor create(PackageFactory pkgFactory,BlazeDirectories directories,BinTools binTools,WorkspaceStatusAction.Factory workspaceStatusActionFactory,ImmutableList<BuildInfoFactory> buildInfoFactories,Iterable<? extends DiffAwareness.Factory> diffAwarenessFactories,PathFragment blacklistedPackagePrefixesFile){
  return create(pkgFactory,directories,binTools,workspaceStatusActionFactory,buildInfoFactories,diffAwarenessFactories,Predicates.<PathFragment>alwaysFalse(),Preprocessor.Factory.Supplier.NullSupplier.INSTANCE,ImmutableMap.<SkyFunctionName,SkyFunction>of(),ImmutableList.<PrecomputedValue.Injected>of(),ImmutableList.<SkyValueDirtinessChecker>of(),blacklistedPackagePrefixesFile);
}
Program: 110912
Project: 110912
Buggy source:
protected PathFragment getBlacklistedPackagePrefixesFile(){
  return PathFragment.EMPTY_FRAGMENT;
}

Fixed version (ground truth):
@VisibleForTesting public PathFragment getBlacklistedPackagePrefixesFile(){
  return blacklistedPackagePrefixesFile;
}
Program: 110913
Project: 110913
Buggy source:
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (parsingMode != PYTHON) {
    String msg=ILLEGAL_BLOCK_KEYWORDS.containsKey(blockToken.kind) ? String.format("String_Node_Str",ILLEGAL_BLOCK_KEYWORDS.get(blockToken.kind)) : "String_Node_Str";
    reportError(lexer.createLocation(start,token.right),String.format("String_Node_Str",blockToken,msg));
  }
  expect(TokenKind.COLON);
  skipSuite();
}

Fixed version (ground truth):
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (blockToken.kind == TokenKind.ELSE && parsingMode == SKYLARK) {
    reportError(lexer.createLocation(blockToken.left,blockToken.right),"String_Node_Str");
  }
 else   if (parsingMode != PYTHON) {
    String msg=ILLEGAL_BLOCK_KEYWORDS.containsKey(blockToken.kind) ? String.format("String_Node_Str",ILLEGAL_BLOCK_KEYWORDS.get(blockToken.kind)) : "String_Node_Str";
    reportError(lexer.createLocation(start,token.right),String.format("String_Node_Str",blockToken,msg));
  }
  expect(TokenKind.COLON);
  skipSuite();
}
Program: 110915
Project: 110915
Buggy source:
private static void logException(Throwable exception,List<String> args,String... values){
  String preamble=exception instanceof OutOfMemoryError ? "String_Node_Str" : "String_Node_Str";
  LoggingUtil.logToRemote(Level.SEVERE,preamble + Joiner.on(' ').join(args),exception,values);
}

Fixed version (ground truth):
private static void logException(Throwable exception,List<String> args,String... values){
  String preamble=Constants.PRODUCT_NAME + (exception instanceof OutOfMemoryError ? "String_Node_Str" : "String_Node_Str");
  LoggingUtil.logToRemote(Level.SEVERE,preamble + Joiner.on(' ').join(args),exception,values);
}
Program: 110916
Project: 110916
Buggy source:
private static void printThrowableTo(OutErr outErr,Throwable e){
  PrintStream err=new PrintStream(outErr.getErrorStream());
  e.printStackTrace(err);
  err.flush();
  LOG.log(Level.SEVERE,"String_Node_Str",e);
}

Fixed version (ground truth):
private static void printThrowableTo(OutErr outErr,Throwable e){
  PrintStream err=new PrintStream(outErr.getErrorStream());
  e.printStackTrace(err);
  err.flush();
  LOG.log(Level.SEVERE,Constants.PRODUCT_NAME + "String_Node_Str",e);
}
Program: 110917
Project: 110917
Buggy source:
private static void logCrash(Throwable throwable,String... args){
  BugReport.sendBugReport(throwable,Arrays.asList(args));
  BugReport.printBug(OutErr.SYSTEM_OUT_ERR,throwable);
  System.err.println("String_Node_Str");
  throwable.printStackTrace();
}

Fixed version (ground truth):
private static void logCrash(Throwable throwable,String... args){
  BugReport.sendBugReport(throwable,Arrays.asList(args));
  BugReport.printBug(OutErr.SYSTEM_OUT_ERR,throwable);
  System.err.println(Constants.PRODUCT_NAME + "String_Node_Str");
  throwable.printStackTrace();
}
Program: 110918
Project: 110918
Buggy source:
/** 
 * Print user-helpful information about the bug/crash to the output.
 * @param outErr where to write the output
 * @param e the exception thrown
 */
public static void printBug(OutErr outErr,Throwable e){
  if (e instanceof OutOfMemoryError) {
    outErr.printErr(e.getMessage() + "String_Node_Str" + "String_Node_Str");
  }
 else {
    printThrowableTo(outErr,e);
  }
}

Fixed version (ground truth):
/** 
 * Print user-helpful information about the bug/crash to the output.
 * @param outErr where to write the output
 * @param e the exception thrown
 */
public static void printBug(OutErr outErr,Throwable e){
  if (e instanceof OutOfMemoryError) {
    outErr.printErr(e.getMessage() + "String_Node_Str" + Constants.PRODUCT_NAME+ "String_Node_Str");
  }
 else {
    printThrowableTo(outErr,e);
  }
}
Program: 110920
Project: 110920
Buggy source:
@Subscribe public void buildCompleteEvent(BuildCompleteEvent event){
  BuildResult result=event.getResult();
  if (result.wasCatastrophe()) {
    blazeHalted=true;
  }
 else   if (result.skippedTargetsBecauseOfEarlierFailure()) {
    skippedTestsBecauseOfEarlierFailure=true;
  }
  buildComplete(result.getActualTargets(),result.getSuccessfulTargets());
}

Fixed version (ground truth):
@Subscribe public void buildCompleteEvent(BuildCompleteEvent event){
  BuildResult result=event.getResult();
  if (result.wasCatastrophe()) {
    blazeHalted=true;
  }
  buildComplete(result.getActualTargets(),result.getSuccessfulTargets());
}
Program: 110921
Project: 110921
Buggy source:
private void targetFailure(LabelAndConfiguration label){
  TestSummary finalSummary;
synchronized (summaryLock) {
    if (!remainingRuns.containsKey(label)) {
      return;
    }
    TestSummary.Builder summary=summaries.get(label);
    if (summary == null) {
      return;
    }
    finalSummary=analyzer.markUnbuilt(summary,blazeHalted,skippedTestsBecauseOfEarlierFailure).build();
    remainingRuns.removeAll(label);
  }
  eventBus.post(finalSummary);
}

Fixed version (ground truth):
private void targetFailure(LabelAndConfiguration label){
  TestSummary finalSummary;
synchronized (summaryLock) {
    if (!remainingRuns.containsKey(label)) {
      return;
    }
    TestSummary.Builder summary=summaries.get(label);
    if (summary == null) {
      return;
    }
    finalSummary=analyzer.markUnbuilt(summary,blazeHalted).build();
    remainingRuns.removeAll(label);
  }
  eventBus.post(finalSummary);
}
Program: 110922
Project: 110922
Buggy source:
TestSummary.Builder markUnbuilt(TestSummary.Builder summary,boolean blazeHalted,boolean stopOnFirstFailure){
  BlazeTestStatus runStatus=blazeHalted ? BlazeTestStatus.BLAZE_HALTED_BEFORE_TESTING : (executionOptions.testCheckUpToDate || stopOnFirstFailure ? BlazeTestStatus.NO_STATUS : BlazeTestStatus.FAILED_TO_BUILD);
  return summary.setStatus(runStatus);
}

Fixed version (ground truth):
TestSummary.Builder markUnbuilt(TestSummary.Builder summary,boolean blazeHalted){
  BlazeTestStatus runStatus=blazeHalted ? BlazeTestStatus.BLAZE_HALTED_BEFORE_TESTING : (executionOptions.testCheckUpToDate || skipTargetsOnFailure ? BlazeTestStatus.NO_STATUS : BlazeTestStatus.FAILED_TO_BUILD);
  return summary.setStatus(runStatus);
}
Program: 110923
Project: 110923
Buggy source:
/** 
 * @param summaryOptions Parsed test summarization options.
 * @param executionOptions Parsed build/test execution options.
 * @param eventBus For reporting failed to build and cached tests.
 */
public TestResultAnalyzer(Path execRoot,TestSummaryOptions summaryOptions,ExecutionOptions executionOptions,EventBus eventBus){
  this.execRoot=execRoot;
  this.summaryOptions=summaryOptions;
  this.executionOptions=executionOptions;
  this.eventBus=eventBus;
}

Fixed version (ground truth):
/** 
 * @param summaryOptions Parsed test summarization options.
 * @param executionOptions Parsed build/test execution options.
 * @param eventBus For reporting failed to build and cached tests.
 */
public TestResultAnalyzer(Path execRoot,TestSummaryOptions summaryOptions,ExecutionOptions executionOptions,EventBus eventBus){
  this.execRoot=execRoot;
  this.summaryOptions=summaryOptions;
  this.executionOptions=executionOptions;
  this.eventBus=eventBus;
  eventBus.register(this);
}
Program: 110924
Project: 110924
Buggy source:
private TestSummary.Builder markIncomplete(TestSummary.Builder summaryBuilder){
  TestSummary summary=summaryBuilder.peek();
  BlazeTestStatus status=summary.getStatus();
  if (status != BlazeTestStatus.NO_STATUS) {
    status=aggregateStatus(status,BlazeTestStatus.INCOMPLETE);
  }
  return summaryBuilder.setStatus(status);
}

Fixed version (ground truth):
private TestSummary.Builder markIncomplete(TestSummary.Builder summaryBuilder){
  TestSummary summary=summaryBuilder.peek();
  BlazeTestStatus status=summary.getStatus();
  if (skipTargetsOnFailure) {
    status=BlazeTestStatus.NO_STATUS;
  }
 else   if (status != BlazeTestStatus.NO_STATUS) {
    status=aggregateStatus(status,BlazeTestStatus.INCOMPLETE);
  }
  return summaryBuilder.setStatus(status);
}
Program: 110925
Project: 110925
Buggy source:
/** 
 * Returns the names of all the packages under a given directory.
 * @param directory a {@link RootedPath} specifying the directory to search
 * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath  {@code directory}, specifying transitive subdirectories to exclude
 */
Iterable<PathFragment> getPackagesUnderDirectory(RepositoryName repository,PathFragment directory,ImmutableSet<PathFragment> excludedSubdirectories);

Fixed version (ground truth):
/** 
 * Returns the names of all the packages under a given directory. <p>Packages returned by this method and passed into  {@link #bulkGetPackages(EventHandler,Iterable)} are expected to return successful{@link Package} values.
 * @param directory a {@link RootedPath} specifying the directory to search
 * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath  {@code directory}, specifying transitive subdirectories to exclude
 */
Iterable<PathFragment> getPackagesUnderDirectory(RepositoryName repository,PathFragment directory,ImmutableSet<PathFragment> excludedSubdirectories);
Program: 110926
Project: 110926
Buggy source:
@Override public Map<PackageIdentifier,Package> bulkGetPackages(EventHandler eventHandler,Iterable<PackageIdentifier> pkgIds) throws NoSuchPackageException {
  Set<SkyKey> pkgKeys=ImmutableSet.copyOf(PackageValue.keys(pkgIds));
  ImmutableMap.Builder<PackageIdentifier,Package> pkgResults=ImmutableMap.builder();
  Map<SkyKey,SkyValue> packages=graph.getSuccessfulValues(pkgKeys);
  for (  PackageIdentifier pkgId : pkgIds) {
    PackageValue pkgValue=(PackageValue)packages.get(PackageValue.key(pkgId));
    pkgResults.put(pkgId,Preconditions.checkNotNull(pkgValue.getPackage(),pkgId));
  }
  SetView<SkyKey> unknownKeys=Sets.difference(pkgKeys,packages.keySet());
  for (  Map.Entry<SkyKey,Exception> missingOrExceptionEntry : graph.getMissingAndExceptions(unknownKeys).entrySet()) {
    PackageIdentifier pkgIdentifier=(PackageIdentifier)missingOrExceptionEntry.getKey().argument();
    Exception exception=missingOrExceptionEntry.getValue();
    if (exception == null) {
      throw new BuildFileNotFoundException(pkgIdentifier,"String_Node_Str");
    }
    Throwables.propagateIfInstanceOf(exception,NoSuchPackageException.class);
    Throwables.propagate(exception);
  }
  return pkgResults.build();
}

Fixed version (ground truth):
@Override public Map<PackageIdentifier,Package> bulkGetPackages(EventHandler eventHandler,Iterable<PackageIdentifier> pkgIds) throws NoSuchPackageException {
  Set<SkyKey> pkgKeys=ImmutableSet.copyOf(PackageValue.keys(pkgIds));
  ImmutableMap.Builder<PackageIdentifier,Package> pkgResults=ImmutableMap.builder();
  Map<SkyKey,SkyValue> packages=graph.getSuccessfulValues(pkgKeys);
  for (  Map.Entry<SkyKey,SkyValue> pkgEntry : packages.entrySet()) {
    PackageIdentifier pkgId=(PackageIdentifier)pkgEntry.getKey().argument();
    PackageValue pkgValue=(PackageValue)pkgEntry.getValue();
    pkgResults.put(pkgId,Preconditions.checkNotNull(pkgValue.getPackage(),pkgId));
  }
  SetView<SkyKey> unknownKeys=Sets.difference(pkgKeys,packages.keySet());
  for (  Map.Entry<SkyKey,Exception> missingOrExceptionEntry : graph.getMissingAndExceptions(unknownKeys).entrySet()) {
    PackageIdentifier pkgIdentifier=(PackageIdentifier)missingOrExceptionEntry.getKey().argument();
    Exception exception=missingOrExceptionEntry.getValue();
    if (exception == null) {
      throw new BuildFileNotFoundException(pkgIdentifier,"String_Node_Str");
    }
    Throwables.propagateIfInstanceOf(exception,NoSuchPackageException.class);
    Throwables.propagate(exception);
  }
  return pkgResults.build();
}
Program: 110927
Project: 110927
Buggy source:
private Map<PackageIdentifier,ResolvedTargets<Target>> bulkGetTargetsInPackage(String originalPattern,Iterable<PackageIdentifier> pkgIds,FilteringPolicy policy) throws TargetParsingException, InterruptedException {
  try {
    Map<PackageIdentifier,Package> pkgs=bulkGetPackages(pkgIds);
    ImmutableMap.Builder<PackageIdentifier,ResolvedTargets<Target>> result=ImmutableMap.builder();
    for (    PackageIdentifier pkgId : pkgIds) {
      Package pkg=pkgs.get(pkgId);
      result.put(pkgId,TargetPatternResolverUtil.resolvePackageTargets(pkg,policy));
    }
    return result.build();
  }
 catch (  NoSuchThingException e) {
    String message=TargetPatternResolverUtil.getParsingErrorMessage(e.getMessage(),originalPattern);
    throw new TargetParsingException(message,e);
  }
}

Fixed version (ground truth):
private Map<PackageIdentifier,ResolvedTargets<Target>> bulkGetTargetsInPackage(String originalPattern,Iterable<PackageIdentifier> pkgIds,FilteringPolicy policy) throws TargetParsingException, InterruptedException {
  try {
    Map<PackageIdentifier,Package> pkgs=bulkGetPackages(pkgIds);
    if (pkgs.size() != Iterables.size(pkgIds)) {
      throw new IllegalStateException("String_Node_Str" + Sets.difference(ImmutableSet.copyOf(pkgIds),pkgs.keySet()));
    }
    ImmutableMap.Builder<PackageIdentifier,ResolvedTargets<Target>> result=ImmutableMap.builder();
    for (    PackageIdentifier pkgId : pkgIds) {
      Package pkg=pkgs.get(pkgId);
      result.put(pkgId,TargetPatternResolverUtil.resolvePackageTargets(pkg,policy));
    }
    return result.build();
  }
 catch (  NoSuchThingException e) {
    String message=TargetPatternResolverUtil.getParsingErrorMessage(e.getMessage(),originalPattern);
    throw new IllegalStateException("String_Node_Str" + message,e);
  }
}
Program: 110928
Project: 110928
Buggy source:
@ThreadSafe public static SkyKey key(BuildOptions buildOptions,Class<? extends Fragment> fragmentType,RuleClassProvider ruleClassProvider){
  BuildOptions optionsKey=buildOptions.get(BuildConfiguration.Options.class).useDynamicConfigurations ? buildOptions.trim(BuildConfiguration.getOptionsClasses(ImmutableList.<Class<? extends BuildConfiguration.Fragment>>of(fragmentType),ruleClassProvider)) : buildOptions;
  return new SkyKey(SkyFunctions.CONFIGURATION_FRAGMENT,new ConfigurationFragmentKey(optionsKey,fragmentType));
}

Fixed version (ground truth):
@ThreadSafe public static SkyKey key(BuildOptions buildOptions,Class<? extends Fragment> fragmentType,RuleClassProvider ruleClassProvider){
  BuildOptions optionsKey=buildOptions.trim(BuildConfiguration.getOptionsClasses(ImmutableList.<Class<? extends BuildConfiguration.Fragment>>of(fragmentType),ruleClassProvider));
  return new SkyKey(SkyFunctions.CONFIGURATION_FRAGMENT,new ConfigurationFragmentKey(optionsKey,fragmentType));
}
Program: 110930
Project: 110930
Buggy source:
public static HttpConnection createAndConnect(URL url) throws IOException {
  int retries=MAX_REDIRECTS;
  Proxy proxy=createProxyIfNeeded(url.getProtocol());
  do {
    HttpURLConnection connection=(HttpURLConnection)url.openConnection(proxy);
    try {
      connection.connect();
    }
 catch (    IllegalArgumentException e) {
      throw new IOException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
    }
    int statusCode=connection.getResponseCode();
switch (statusCode) {
case HttpURLConnection.HTTP_OK:
      return new HttpConnection(connection.getInputStream(),parseContentLength(connection));
case HttpURLConnection.HTTP_MOVED_PERM:
case HttpURLConnection.HTTP_MOVED_TEMP:
    url=tryGetLocation(statusCode,connection);
  connection.disconnect();
break;
case -1:
throw new IOException("String_Node_Str");
default :
throw new IOException(String.format("String_Node_Str",connection.getResponseCode(),connection.getResponseMessage(),readBody(connection)));
}
}
 while (retries-- > 0);
throw new IOException("String_Node_Str" + MAX_REDIRECTS + "String_Node_Str");
}

Fixed version (ground truth):
public static HttpConnection createAndConnect(URL url) throws IOException {
  int retries=MAX_REDIRECTS;
  Proxy proxy=ProxyHelper.createProxyIfNeeded(url.toString());
  do {
    HttpURLConnection connection=(HttpURLConnection)url.openConnection(proxy);
    try {
      connection.connect();
    }
 catch (    IllegalArgumentException e) {
      throw new IOException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
    }
    int statusCode=connection.getResponseCode();
switch (statusCode) {
case HttpURLConnection.HTTP_OK:
      return new HttpConnection(connection.getInputStream(),parseContentLength(connection));
case HttpURLConnection.HTTP_MOVED_PERM:
case HttpURLConnection.HTTP_MOVED_TEMP:
    url=tryGetLocation(statusCode,connection);
  connection.disconnect();
break;
case -1:
throw new IOException("String_Node_Str");
default :
throw new IOException(String.format("String_Node_Str",connection.getResponseCode(),connection.getResponseMessage(),readBody(connection)));
}
}
 while (retries-- > 0);
throw new IOException("String_Node_Str" + MAX_REDIRECTS + "String_Node_Str");
}
Program: 110932
Project: 110932
Buggy source:
@Override public void visitMethodDef(JCMethodDecl tree){
  if (tree.body == null) {
    return;
  }
  tree.body.stats=com.sun.tools.javac.util.List.nil();
}

Fixed version (ground truth):
@Override public void visitMethodDef(JCMethodDecl tree){
  if (tree.body == null) {
    return;
  }
  if (tree.getReturnType() == null && delegatingConstructor(tree.body.stats)) {
    tree.body.stats=com.sun.tools.javac.util.List.of(tree.body.stats.get(0));
    return;
  }
  tree.body.stats=com.sun.tools.javac.util.List.nil();
}
Program: 110933
Project: 110933
Buggy source:
@Override public int hashCode(){
  return Objects.hash(targetPatterns,compileOneDependency,buildTestsOnly,determineTests,testFilter);
}

Fixed version (ground truth):
@Override public int hashCode(){
  return Objects.hash(targetPatterns,offset,compileOneDependency,buildTestsOnly,determineTests,testFilter);
}
Program: 110934
Project: 110934
Buggy source:
public TargetPatternList(ImmutableList<String> targetPatterns,String offset,boolean compileOneDependency,boolean buildTestsOnly,boolean determineTests,TestFilter testFilter){
  this.targetPatterns=targetPatterns;
  this.offset=offset;
  this.compileOneDependency=compileOneDependency;
  this.buildTestsOnly=buildTestsOnly;
  this.determineTests=determineTests;
  this.testFilter=testFilter;
}

Fixed version (ground truth):
public TargetPatternList(ImmutableList<String> targetPatterns,String offset,boolean compileOneDependency,boolean buildTestsOnly,boolean determineTests,@Nullable TestFilter testFilter){
  this.targetPatterns=Preconditions.checkNotNull(targetPatterns);
  this.offset=Preconditions.checkNotNull(offset);
  this.compileOneDependency=compileOneDependency;
  this.buildTestsOnly=buildTestsOnly;
  this.determineTests=determineTests;
  this.testFilter=testFilter;
  if (buildTestsOnly || determineTests) {
    Preconditions.checkNotNull(testFilter);
  }
}
Program: 110935
Project: 110935
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof TargetPatternList)) {
    return false;
  }
  TargetPatternList other=(TargetPatternList)obj;
  return other.targetPatterns.equals(this.targetPatterns) && other.compileOneDependency == compileOneDependency && other.buildTestsOnly == buildTestsOnly && other.determineTests == determineTests && other.testFilter.equals(testFilter);
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (!(obj instanceof TargetPatternList)) {
    return false;
  }
  TargetPatternList other=(TargetPatternList)obj;
  return other.targetPatterns.equals(this.targetPatterns) && other.offset.equals(this.offset) && other.compileOneDependency == compileOneDependency && other.buildTestsOnly == buildTestsOnly && other.determineTests == determineTests && Objects.equals(other.testFilter,testFilter);
}
Program: 110936
Project: 110936
Buggy source:
@Override public String toString(){
  return targetPatterns.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder result=new StringBuilder();
  result.append(targetPatterns);
  if (!offset.isEmpty()) {
    result.append("String_Node_Str").append(offset);
  }
  result.append(compileOneDependency ? "String_Node_Str" : "String_Node_Str");
  result.append(buildTestsOnly ? "String_Node_Str" : "String_Node_Str");
  result.append(determineTests ? "String_Node_Str" : "String_Node_Str");
  result.append(testFilter != null ? testFilter : "String_Node_Str");
  return result.toString();
}
Program: 110937
Project: 110937
Buggy source:
/** 
 * Create a target pattern phase value key. 
 */
@ThreadSafe public static SkyKey key(ImmutableList<String> targetPatterns,String offset,boolean compileOneDependency,boolean buildTestsOnly,boolean determineTests,TestFilter testFilter){
  return new SkyKey(SkyFunctions.TARGET_PATTERN_PHASE,new TargetPatternList(targetPatterns,offset,compileOneDependency,buildTestsOnly,determineTests,testFilter));
}

Fixed version (ground truth):
/** 
 * Create a target pattern phase value key. 
 */
@ThreadSafe public static SkyKey key(ImmutableList<String> targetPatterns,String offset,boolean compileOneDependency,boolean buildTestsOnly,boolean determineTests,@Nullable TestFilter testFilter){
  return new SkyKey(SkyFunctions.TARGET_PATTERN_PHASE,new TargetPatternList(targetPatterns,offset,compileOneDependency,buildTestsOnly,determineTests,testFilter));
}
Program: 110939
Project: 110939
Buggy source:
private ImmutableSet<Target> filterErrorFreeTargets(EventHandler eventHandler,EventBus eventBus,TransitivePackageLoader pkgLoader,Collection<Target> targetsToLoad,ListMultimap<String,Label> labelsToLoadUnconditionally) throws LoadingFailedException {
  Multimap<Label,Label> rootCauses=pkgLoader.getRootCauses();
  for (  Map.Entry<String,Label> entry : labelsToLoadUnconditionally.entries()) {
    if (rootCauses.containsKey(entry.getValue())) {
      throw new LoadingFailedException("String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
    }
  }
  for (  Map.Entry<Label,Label> entry : rootCauses.entries()) {
    eventBus.post(new LoadingFailureEvent(entry.getKey(),entry.getValue()));
  }
  LoadedPackageProvider.Bridge bridge=new LoadedPackageProvider.Bridge(packageManager,eventHandler);
  return ImmutableSet.copyOf(Sets.difference(ImmutableSet.copyOf(targetsToLoad),getTargetsForLabels(bridge,rootCauses.keySet())));
}

Fixed version (ground truth):
private ImmutableSet<Target> filterErrorFreeTargets(EventHandler eventHandler,EventBus eventBus,TransitivePackageLoader pkgLoader,Collection<Target> targetsToLoad,ListMultimap<String,Label> labelsToLoadUnconditionally) throws LoadingFailedException {
  Multimap<Label,Label> rootCauses=pkgLoader.getRootCauses();
  for (  Map.Entry<String,Label> entry : labelsToLoadUnconditionally.entries()) {
    Label label=entry.getValue();
    if (rootCauses.containsKey(label)) {
      throw new LoadingFailedException(String.format("String_Node_Str",entry.getKey(),label));
    }
  }
  for (  Map.Entry<Label,Label> entry : rootCauses.entries()) {
    eventBus.post(new LoadingFailureEvent(entry.getKey(),entry.getValue()));
  }
  LoadedPackageProvider.Bridge bridge=new LoadedPackageProvider.Bridge(packageManager,eventHandler);
  return ImmutableSet.copyOf(Sets.difference(ImmutableSet.copyOf(targetsToLoad),getTargetsForLabels(bridge,rootCauses.keySet())));
}
Program: 110940
Project: 110940
Buggy source:
@Nullable private BuildConfiguration createConfiguration(Cache<String,BuildConfiguration> cache,EventHandler originalEventListener,PackageProviderForConfigurations loadedPackageProvider,BuildOptions buildOptions,String cpuOverride) throws InvalidConfigurationException {
  StoredEventHandler errorEventListener=new StoredEventHandler();
  if (cpuOverride != null) {
    buildOptions=buildOptions.clone();
    buildOptions.get(BuildConfiguration.Options.class).cpu=cpuOverride;
  }
  BuildConfiguration targetConfig=configurationFactory.get().createConfigurations(cache,loadedPackageProvider,buildOptions,errorEventListener);
  if (targetConfig == null) {
    return null;
  }
  errorEventListener.replayOn(originalEventListener);
  if (errorEventListener.hasErrors()) {
    throw new InvalidConfigurationException("String_Node_Str");
  }
  return targetConfig;
}

Fixed version (ground truth):
@Nullable private BuildConfiguration createConfiguration(Cache<String,BuildConfiguration> cache,EventHandler originalEventListener,PackageProviderForConfigurations loadedPackageProvider,BuildOptions buildOptions,String cpuOverride) throws InvalidConfigurationException {
  ErrorSensingEventHandler eventHandler=new ErrorSensingEventHandler(originalEventListener);
  if (cpuOverride != null) {
    buildOptions=buildOptions.clone();
    buildOptions.get(BuildConfiguration.Options.class).cpu=cpuOverride;
  }
  BuildConfiguration targetConfig=configurationFactory.get().createConfigurations(cache,loadedPackageProvider,buildOptions,eventHandler);
  if (targetConfig == null) {
    return null;
  }
  if (eventHandler.hasErrors()) {
    throw new InvalidConfigurationException("String_Node_Str");
  }
  return targetConfig;
}
Program: 110942
Project: 110942
Buggy source:
public SkyframeAnalysisResult(ImmutableList<ConfiguredTarget> configuredTargets,WalkableGraph walkableGraph,ImmutableList<AspectValue> aspects,ImmutableMap<PackageIdentifier,Path> packageRoots){
  this.configuredTargets=configuredTargets;
  this.walkableGraph=walkableGraph;
  this.aspects=aspects;
  this.packageRoots=packageRoots;
}

Fixed version (ground truth):
public SkyframeAnalysisResult(boolean hasError,ImmutableList<ConfiguredTarget> configuredTargets,WalkableGraph walkableGraph,ImmutableList<AspectValue> aspects,ImmutableMap<PackageIdentifier,Path> packageRoots){
  this.hasError=hasError;
  this.configuredTargets=configuredTargets;
  this.walkableGraph=walkableGraph;
  this.aspects=aspects;
  this.packageRoots=packageRoots;
}
Program: 110943
Project: 110943
Buggy source:
@Nullable @Override public SkyValue compute(SkyKey skyKey,Environment env) throws LoadSkylarkAspectFunctionException, InterruptedException {
  SkylarkAspectLoadingKey aspectLoadingKey=(SkylarkAspectLoadingKey)skyKey.argument();
  String skylarkValueName=aspectLoadingKey.getSkylarkValueName();
  PathFragment extensionFile=aspectLoadingKey.getExtensionFile();
  ImmutableMap<PathFragment,Label> labelLookupMap;
  try {
    labelLookupMap=SkylarkImportLookupFunction.labelsForAbsoluteImports(ImmutableSet.of(extensionFile),env);
  }
 catch (  SkylarkImportFailedException e) {
    env.getListener().handle(Event.error(e.getMessage()));
    throw new LoadSkylarkAspectFunctionException(new AspectCreationException(e.getMessage()),skyKey);
  }
  if (labelLookupMap == null) {
    return null;
  }
  SkylarkAspect skylarkAspect=null;
  try {
    skylarkAspect=AspectFunction.loadSkylarkAspect(env,labelLookupMap.get(extensionFile),skylarkValueName);
  }
 catch (  AspectCreationException e) {
    throw new LoadSkylarkAspectFunctionException(e,skyKey);
  }
  if (skylarkAspect == null) {
    return null;
  }
  SkyKey aspectKey=AspectValue.key(aspectLoadingKey.getTargetLabel(),aspectLoadingKey.getTargetConfiguration(),skylarkAspect.getAspectClass(),AspectParameters.EMPTY);
  return env.getValue(aspectKey);
}

Fixed version (ground truth):
@Nullable @Override public SkyValue compute(SkyKey skyKey,Environment env) throws LoadSkylarkAspectFunctionException, InterruptedException {
  SkylarkAspectLoadingKey aspectLoadingKey=(SkylarkAspectLoadingKey)skyKey.argument();
  String skylarkValueName=aspectLoadingKey.getSkylarkValueName();
  PathFragment extensionFile=aspectLoadingKey.getExtensionFile();
  ImmutableMap<PathFragment,Label> labelLookupMap;
  try {
    labelLookupMap=SkylarkImportLookupFunction.labelsForAbsoluteImports(ImmutableSet.of(extensionFile),env);
  }
 catch (  SkylarkImportFailedException e) {
    env.getListener().handle(Event.error(e.getMessage()));
    throw new LoadSkylarkAspectFunctionException(new AspectCreationException(e.getMessage()));
  }
  if (labelLookupMap == null) {
    return null;
  }
  SkylarkAspect skylarkAspect=null;
  try {
    skylarkAspect=AspectFunction.loadSkylarkAspect(env,labelLookupMap.get(extensionFile),skylarkValueName);
  }
 catch (  AspectCreationException e) {
    throw new LoadSkylarkAspectFunctionException(e);
  }
  if (skylarkAspect == null) {
    return null;
  }
  SkyKey aspectKey=AspectValue.key(aspectLoadingKey.getTargetLabel(),aspectLoadingKey.getTargetConfiguration(),skylarkAspect.getAspectClass(),AspectParameters.EMPTY);
  return env.getValue(aspectKey);
}
Program: 110944
Project: 110944
Buggy source:
public LoadSkylarkAspectFunctionException(AspectCreationException cause,SkyKey childKey){
  super(cause,childKey);
}

Fixed version (ground truth):
public LoadSkylarkAspectFunctionException(AspectCreationException cause){
  super(cause,Transience.PERSISTENT);
}