nus-yam/ex-repair huggingface dataset:
Program: 110945
Project: 110945
Buggy source:
/** 
 * Tests that rules with configurable attributes can be accessed through   {@link com.google.devtools.build.lib.skyframe.PostConfiguredTargetFunction}. This is a regression test for a Bazel crash.
 */
@Test public void testPostProcessedConfigurableAttributes() throws Exception {
  reporter.removeHandler(failFastHandler);
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  AnalysisResult result=update(defaultFlags().with(Flag.KEEP_GOING),"String_Node_Str","String_Node_Str");
  assertContainsEvent("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Tests that rules with configurable attributes can be accessed through   {@link com.google.devtools.build.lib.skyframe.PostConfiguredTargetFunction}. This is a regression test for a Bazel crash.
 */
@Test public void testPostProcessedConfigurableAttributes() throws Exception {
  reporter.removeHandler(failFastHandler);
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  AnalysisResult result=update(defaultFlags().with(Flag.KEEP_GOING),"String_Node_Str","String_Node_Str");
  assertThat(result.hasError()).isTrue();
  assertContainsEvent("String_Node_Str");
}
Program: 110946
Project: 110946
Buggy source:
@Test public void topLevelAspectIsNotAnAspect() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}

Fixed version (ground truth):
@Test public void topLevelAspectIsNotAnAspect() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}
Program: 110947
Project: 110947
Buggy source:
@Test public void topLevelAspectDoesNotExist2() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Test public void topLevelAspectDoesNotExist2() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str");
}
Program: 110948
Project: 110948
Buggy source:
@Test public void topLevelAspectDoesNotExist() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}

Fixed version (ground truth):
@Test public void topLevelAspectDoesNotExist() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}
Program: 110949
Project: 110949
Buggy source:
@Test public void testAspectFailingOrphanArtifacts() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testAspectFailingOrphanArtifacts() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 110950
Project: 110950
Buggy source:
@Test public void topLevelAspectDoesNotExistNoBuildFile() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Test public void topLevelAspectDoesNotExistNoBuildFile() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}
Program: 110951
Project: 110951
Buggy source:
@Test public void testAspectFailingReturnsUnsafeObject() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testAspectFailingReturnsUnsafeObject() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 110952
Project: 110952
Buggy source:
@Test public void testAspectFailingExecution() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testAspectFailingExecution() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 110953
Project: 110953
Buggy source:
private ConfiguredTarget getConfiguredTargetForAspectFragment(String fullFieldName,String fragments,String hostFragments,String ruleFragments,String ruleHostFragments) throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str" + fullFieldName + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + fragments + "String_Node_Str","String_Node_Str" + hostFragments + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + ruleFragments + "String_Node_Str","String_Node_Str" + ruleHostFragments + "String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
  return getConfiguredTarget("String_Node_Str");
}

Fixed version (ground truth):
private ConfiguredTarget getConfiguredTargetForAspectFragment(String fullFieldName,String fragments,String hostFragments,String ruleFragments,String ruleHostFragments) throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str" + fullFieldName + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + fragments + "String_Node_Str","String_Node_Str" + hostFragments + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + ruleFragments + "String_Node_Str","String_Node_Str" + ruleHostFragments + "String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
  if (result.hasError()) {
    assertThat(keepGoing()).isTrue();
    throw new ViewCreationFailedException("String_Node_Str");
  }
  return getConfiguredTarget("String_Node_Str");
}
Program: 110954
Project: 110954
Buggy source:
@Test public void testAspectFailingReturnsNotAStruct() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    fail();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testAspectFailingReturnsNotAStruct() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  try {
    AnalysisResult result=update(ImmutableList.of("String_Node_Str"),"String_Node_Str");
    assertThat(keepGoing()).isTrue();
    assertThat(result.hasError()).isTrue();
  }
 catch (  ViewCreationFailedException e) {
  }
  assertContainsEvent("String_Node_Str");
}
Program: 110955
Project: 110955
Buggy source:
/** 
 * Process the Skyframe update, taking into account the keepGoing setting. <p>Returns false if the update() failed, but we should continue. Returns true on success. Throws on fail-fast failures.
 */
private static boolean processResult(EventHandler eventHandler,EvaluationResult<?> result,boolean keepGoing,SkyframeExecutor skyframeExecutor) throws BuildFailedException, TestExecException {
  if (result.hasError()) {
    boolean hasCycles=false;
    for (    Map.Entry<SkyKey,ErrorInfo> entry : result.errorMap().entrySet()) {
      Iterable<CycleInfo> cycles=entry.getValue().getCycleInfo();
      skyframeExecutor.reportCycles(eventHandler,cycles,entry.getKey());
      hasCycles|=!Iterables.isEmpty(cycles);
    }
    boolean hasCatastrophe=resultHasCatastrophicError(result);
    if (keepGoing && !hasCatastrophe) {
      return false;
    }
    if (hasCycles || result.errorMap().isEmpty()) {
      if (result.getCatastrophe() != null) {
        rethrow(result.getCatastrophe());
      }
      throw new BuildFailedException(null,hasCatastrophe);
    }
 else {
      rethrow(Preconditions.checkNotNull(result.getError().getException()));
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Process the Skyframe update, taking into account the keepGoing setting. <p>Returns false if the update() failed, but we should continue. Returns true on success. Throws on fail-fast failures.
 */
private static boolean processResult(EventHandler eventHandler,EvaluationResult<?> result,boolean keepGoing,SkyframeExecutor skyframeExecutor) throws BuildFailedException, TestExecException {
  if (result.hasError()) {
    for (    Map.Entry<SkyKey,ErrorInfo> entry : result.errorMap().entrySet()) {
      Iterable<CycleInfo> cycles=entry.getValue().getCycleInfo();
      skyframeExecutor.reportCycles(eventHandler,cycles,entry.getKey());
    }
    if (result.getCatastrophe() != null) {
      rethrow(result.getCatastrophe());
    }
    if (keepGoing) {
      return false;
    }
    ErrorInfo errorInfo=Preconditions.checkNotNull(result.getError(),result);
    Exception exception=errorInfo.getException();
    if (exception == null) {
      Preconditions.checkState(!Iterables.isEmpty(errorInfo.getCycleInfo()),errorInfo);
      throw new BuildFailedException(null,false);
    }
 else {
      rethrow(exception);
    }
  }
  return true;
}
Program: 110956
Project: 110956
Buggy source:
/** 
 * Constructor for the "completed" case. Used only by   {@link Builder}.
 */
private EvaluationResult(Map<SkyKey,T> result,Map<SkyKey,ErrorInfo> errorMap,boolean hasError,@Nullable Exception catastrophe,@Nullable WalkableGraph walkableGraph){
  Preconditions.checkState(errorMap.isEmpty() || hasError,"String_Node_Str",result,errorMap);
  this.resultMap=Preconditions.checkNotNull(result);
  this.errorMap=Preconditions.checkNotNull(errorMap);
  this.hasError=hasError;
  this.catastrophe=catastrophe;
  this.walkableGraph=walkableGraph;
}

Fixed version (ground truth):
/** 
 * Constructor for the "completed" case. Used only by   {@link Builder}.
 */
private EvaluationResult(Map<SkyKey,T> result,Map<SkyKey,ErrorInfo> errorMap,@Nullable Exception catastrophe,@Nullable WalkableGraph walkableGraph){
  this.resultMap=Preconditions.checkNotNull(result);
  this.errorMap=Preconditions.checkNotNull(errorMap);
  this.catastrophe=catastrophe;
  this.walkableGraph=walkableGraph;
}
Program: 110957
Project: 110957
Buggy source:
public EvaluationResult<T> build(){
  return new EvaluationResult<>(result,errors,hasError,catastrophe,walkableGraph);
}

Fixed version (ground truth):
public EvaluationResult<T> build(){
  return new EvaluationResult<>(result,errors,catastrophe,walkableGraph);
}
Program: 110958
Project: 110958
Buggy source:
public Builder<T> mergeFrom(EvaluationResult<T> otherResult){
  result.putAll(otherResult.resultMap);
  errors.putAll(otherResult.errorMap);
  hasError|=otherResult.hasError;
  catastrophe=otherResult.catastrophe;
  return this;
}

Fixed version (ground truth):
public Builder<T> mergeFrom(EvaluationResult<T> otherResult){
  result.putAll(otherResult.resultMap);
  errors.putAll(otherResult.errorMap);
  catastrophe=otherResult.catastrophe;
  return this;
}
Program: 110959
Project: 110959
Buggy source:
@Override public String toString(){
  return MoreObjects.toStringHelper(this).add("String_Node_Str",hasError).add("String_Node_Str",errorMap).add("String_Node_Str",resultMap).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return MoreObjects.toStringHelper(this).add("String_Node_Str",catastrophe).add("String_Node_Str",errorMap).add("String_Node_Str",resultMap).toString();
}
Program: 110960
Project: 110960
Buggy source:
/** 
 * @return Whether or not the eval successfully evaluated all requested values. Note that thismay return true even if all values returned are available in get(). This happens if a top-level value depends transitively on some value that recovered from a  {@link SkyFunctionException}.
 */
public boolean hasError(){
  return hasError;
}

Fixed version (ground truth):
/** 
 * @return Whether or not the eval successfully evaluated all requested values. True iff{@link #getCatastrophe} or {@link #getError} returns non-null.
 */
public boolean hasError(){
  return catastrophe != null || !errorMap.isEmpty();
}
Program: 110962
Project: 110962
Buggy source:
private WalkableGraph getGraphFromPatternsEvaluation(ImmutableList<String> patternSequence,boolean successExpected,boolean keepGoing) throws InterruptedException {
  SkyKey independentTarget=PrepareDepsOfPatternsValue.key(patternSequence,"String_Node_Str");
  ImmutableList<SkyKey> singletonTargetPattern=ImmutableList.of(independentTarget);
  EvaluationResult<SkyValue> evaluationResult=getSkyframeExecutor().getDriverForTesting().evaluate(singletonTargetPattern,keepGoing,LOADING_PHASE_THREADS,eventCollector);
  if (successExpected) {
    assertFalse(evaluationResult.hasError());
  }
 else {
    assertTrue(evaluationResult.hasError());
  }
  return Preconditions.checkNotNull(evaluationResult.getWalkableGraph());
}

Fixed version (ground truth):
private WalkableGraph getGraphFromPatternsEvaluation(ImmutableList<String> patternSequence,boolean keepGoing) throws InterruptedException {
  SkyKey independentTarget=PrepareDepsOfPatternsValue.key(patternSequence,"String_Node_Str");
  ImmutableList<SkyKey> singletonTargetPattern=ImmutableList.of(independentTarget);
  EvaluationResult<SkyValue> evaluationResult=getSkyframeExecutor().getDriverForTesting().evaluate(singletonTargetPattern,keepGoing,LOADING_PHASE_THREADS,eventCollector);
  assertThatEvaluationResult(evaluationResult).hasNoError();
  return Preconditions.checkNotNull(evaluationResult.getWalkableGraph());
}
Program: 110963
Project: 110963
Buggy source:
@Test public void testDependencyTraversalNoSuchPackageException() throws Exception {
  createFooWithDependencyOnMissingBarPackage();
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,false);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")),true);
  Exception e=assertException(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertThat(e).isInstanceOf(NoSuchPackageException.class);
}

Fixed version (ground truth):
@Test public void testDependencyTraversalNoSuchPackageException() throws Exception {
  createFooWithDependencyOnMissingBarPackage();
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")),true);
  Exception e=assertException(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertThat(e).isInstanceOf(NoSuchPackageException.class);
}
Program: 110964
Project: 110964
Buggy source:
private void parsingProblem(boolean keepGoing) throws Exception {
  createFooAndFoo2(false);
  String bogusPattern="String_Node_Str";
  ImmutableList<String> patternSequence=ImmutableList.of(bogusPattern,"String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,true,keepGoing);
  assertContainsEvent("String_Node_Str" + bogusPattern + "String_Node_Str");
  assertTrue(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}

Fixed version (ground truth):
private void parsingProblem(boolean keepGoing) throws Exception {
  createFooAndFoo2(false);
  String bogusPattern="String_Node_Str";
  ImmutableList<String> patternSequence=ImmutableList.of(bogusPattern,"String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,keepGoing);
  assertContainsEvent("String_Node_Str" + bogusPattern + "String_Node_Str");
  assertTrue(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}
Program: 110965
Project: 110965
Buggy source:
@Test public void testFunctionLoadsTargetAndNotUnspecifiedTargets() throws Exception {
  createFooAndFoo2(false);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,true);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertFalse(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}

Fixed version (ground truth):
@Test public void testFunctionLoadsTargetAndNotUnspecifiedTargets() throws Exception {
  createFooAndFoo2(false);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertFalse(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}
Program: 110966
Project: 110966
Buggy source:
@Test public void testFunctionLoadsTargetDependencies() throws Exception {
  createFooAndFoo2(true);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,true);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
@Test public void testFunctionLoadsTargetDependencies() throws Exception {
  createFooAndFoo2(true);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
}
Program: 110967
Project: 110967
Buggy source:
@Test public void testFunctionExpandsTargetPatterns() throws Exception {
  createFooAndFoo2(false);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,true);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
}

Fixed version (ground truth):
@Test public void testFunctionExpandsTargetPatterns() throws Exception {
  createFooAndFoo2(false);
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
}
Program: 110968
Project: 110968
Buggy source:
@Test public void testDependencyTraversalNoSuchTargetException() throws Exception {
  createFooWithDependencyOnBarPackageWithMissingTarget();
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,false);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")),true);
  Exception e=assertException(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertThat(e).isInstanceOf(NoSuchTargetException.class);
}

Fixed version (ground truth):
@Test public void testDependencyTraversalNoSuchTargetException() throws Exception {
  createFooWithDependencyOnBarPackageWithMissingTarget();
  ImmutableList<String> patternSequence=ImmutableList.of("String_Node_Str");
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertValidValue(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")),true);
  Exception e=assertException(walkableGraph,getKeyForLabel(Label.create("String_Node_Str","String_Node_Str")));
  assertThat(e).isInstanceOf(NoSuchTargetException.class);
}
Program: 110969
Project: 110969
Buggy source:
@Test public void testTargetParsingException() throws Exception {
  String nonexistentTarget="String_Node_Str";
  ImmutableList<String> patternSequence=ImmutableList.of(nonexistentTarget);
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence,false);
  assertFalse(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}

Fixed version (ground truth):
@Test public void testTargetParsingException() throws Exception {
  String nonexistentTarget="String_Node_Str";
  ImmutableList<String> patternSequence=ImmutableList.of(nonexistentTarget);
  WalkableGraph walkableGraph=getGraphFromPatternsEvaluation(patternSequence);
  assertFalse(walkableGraph.exists(getKeyForLabel(Label.create("String_Node_Str","String_Node_Str"))));
}
Program: 110970
Project: 110970
Buggy source:
@Override protected void invalidPackageGroupReferenceHook(TargetAndConfiguration node,Label label){
}

Fixed version (ground truth):
@Override protected void invalidPackageGroupReferenceHook(TargetAndConfiguration node,Label label){
  throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
}
Program: 110972
Project: 110972
Buggy source:
@Override protected void invalidVisibilityReferenceHook(TargetAndConfiguration node,Label label){
}

Fixed version (ground truth):
@Override protected void invalidVisibilityReferenceHook(TargetAndConfiguration node,Label label){
  throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
}
Program: 110973
Project: 110973
Buggy source:
@VisibleForTesting public ListMultimap<Attribute,Dependency> getDirectPrerequisiteDependenciesForTesting(final EventHandler eventHandler,ConfiguredTarget ct,BuildConfigurationCollection configurations) throws EvalException, InterruptedException {
  if (!(ct.getTarget() instanceof Rule)) {
    return ArrayListMultimap.create();
  }
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) throws NoSuchThingException {
      return LoadedPackageProvider.Bridge.getLoadedTarget(skyframeExecutor.getPackageManager(),eventHandler,label);
    }
  }
  DependencyResolver dependencyResolver=new SilentDependencyResolver();
  TargetAndConfiguration ctgNode=new TargetAndConfiguration(ct.getTarget(),ct.getConfiguration());
  return dependencyResolver.dependentNodeMap(ctgNode,configurations.getHostConfiguration(),null,getConfigurableAttributeKeysForTesting(eventHandler,ctgNode));
}

Fixed version (ground truth):
@VisibleForTesting public ListMultimap<Attribute,Dependency> getDirectPrerequisiteDependenciesForTesting(final EventHandler eventHandler,ConfiguredTarget ct,BuildConfigurationCollection configurations) throws EvalException, InterruptedException {
  if (!(ct.getTarget() instanceof Rule)) {
    return ArrayListMultimap.create();
  }
class SilentDependencyResolver extends DependencyResolver {
    @Override protected void invalidVisibilityReferenceHook(    TargetAndConfiguration node,    Label label){
      throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
    }
    @Override protected void invalidPackageGroupReferenceHook(    TargetAndConfiguration node,    Label label){
      throw new RuntimeException("String_Node_Str" + label + "String_Node_Str");
    }
    @Override protected void missingEdgeHook(    Target from,    Label to,    NoSuchThingException e){
      throw new RuntimeException("String_Node_Str" + from.getLabel() + "String_Node_Str"+ to+ "String_Node_Str"+ e.getMessage(),e);
    }
    @Override protected Target getTarget(    Label label) throws NoSuchThingException {
      return LoadedPackageProvider.Bridge.getLoadedTarget(skyframeExecutor.getPackageManager(),eventHandler,label);
    }
  }
  DependencyResolver dependencyResolver=new SilentDependencyResolver();
  TargetAndConfiguration ctgNode=new TargetAndConfiguration(ct.getTarget(),ct.getConfiguration());
  return dependencyResolver.dependentNodeMap(ctgNode,configurations.getHostConfiguration(),null,getConfigurableAttributeKeysForTesting(eventHandler,ctgNode));
}
Program: 110975
Project: 110975
Buggy source:
/** 
 * Converts the given multimap of attributes to labels into a multi map of attributes to  {@link Dependency} objects using the proper configuration transition for each attribute.
 * @throws IllegalArgumentException if the {@code node} does not refer to a {@link Rule} instance
 */
public final Collection<Dependency> resolveRuleLabels(TargetAndConfiguration node,ListMultimap<Attribute,LabelAndConfiguration> labelMap){
  Preconditions.checkArgument(node.getTarget() instanceof Rule);
  Rule rule=(Rule)node.getTarget();
  ListMultimap<Attribute,Dependency> outgoingEdges=ArrayListMultimap.create();
  visitRule(rule,labelMap,outgoingEdges);
  return outgoingEdges.values();
}

Fixed version (ground truth):
/** 
 * Converts the given multimap of attributes to labels into a multi map of attributes to  {@link Dependency} objects using the proper configuration transition for each attribute.
 * @throws IllegalArgumentException if the {@code node} does not refer to a {@link Rule} instance
 */
public final Collection<Dependency> resolveRuleLabels(TargetAndConfiguration node,ListMultimap<Attribute,LabelAndConfiguration> labelMap,NestedSetBuilder<Label> rootCauses){
  Preconditions.checkArgument(node.getTarget() instanceof Rule);
  Rule rule=(Rule)node.getTarget();
  ListMultimap<Attribute,Dependency> outgoingEdges=ArrayListMultimap.create();
  visitRule(rule,labelMap,rootCauses,outgoingEdges);
  return outgoingEdges.values();
}
Program: 110976
Project: 110976
Buggy source:
private void visitRule(Rule rule,Aspect aspect,ListMultimap<Attribute,LabelAndConfiguration> labelMap,ListMultimap<Attribute,Dependency> outgoingEdges){
  Preconditions.checkNotNull(labelMap);
  for (  Map.Entry<Attribute,Collection<LabelAndConfiguration>> entry : labelMap.asMap().entrySet()) {
    Attribute attribute=entry.getKey();
    for (    LabelAndConfiguration dep : entry.getValue()) {
      Label label=dep.getLabel();
      BuildConfiguration config=dep.getConfiguration();
      Target toTarget;
      try {
        toTarget=getTarget(label);
      }
 catch (      NoSuchThingException e) {
        throw new IllegalStateException("String_Node_Str" + label + "String_Node_Str"+ rule+ "String_Node_Str"+ attribute.getName());
      }
      if (toTarget == null) {
        continue;
      }
      BuildConfiguration.TransitionApplier transitionApplier=config.getTransitionApplier();
      if (config.useDynamicConfigurations() && config.isHostConfiguration() && !BuildConfiguration.usesNullConfiguration(toTarget)) {
        transitionApplier.applyTransition(Attribute.ConfigurationTransition.HOST);
      }
 else {
        config.evaluateTransition(rule,attribute,toTarget,transitionApplier);
      }
      for (      Dependency dependency : transitionApplier.getDependencies(label,requiredAspects(aspect,attribute,toTarget,rule))) {
        outgoingEdges.put(entry.getKey(),dependency);
      }
    }
  }
}

Fixed version (ground truth):
private void visitRule(Rule rule,Aspect aspect,ListMultimap<Attribute,LabelAndConfiguration> labelMap,NestedSetBuilder<Label> rootCauses,ListMultimap<Attribute,Dependency> outgoingEdges){
  Preconditions.checkNotNull(labelMap);
  for (  Map.Entry<Attribute,Collection<LabelAndConfiguration>> entry : labelMap.asMap().entrySet()) {
    Attribute attribute=entry.getKey();
    for (    LabelAndConfiguration dep : entry.getValue()) {
      Label label=dep.getLabel();
      BuildConfiguration config=dep.getConfiguration();
      Target toTarget=getTarget(rule,label,rootCauses);
      if (toTarget == null) {
        continue;
      }
      BuildConfiguration.TransitionApplier transitionApplier=config.getTransitionApplier();
      if (config.useDynamicConfigurations() && config.isHostConfiguration() && !BuildConfiguration.usesNullConfiguration(toTarget)) {
        transitionApplier.applyTransition(Attribute.ConfigurationTransition.HOST);
      }
 else {
        config.evaluateTransition(rule,attribute,toTarget,transitionApplier);
      }
      for (      Dependency dependency : transitionApplier.getDependencies(label,requiredAspects(aspect,attribute,toTarget,rule))) {
        outgoingEdges.put(entry.getKey(),dependency);
      }
    }
  }
}
Program: 110977
Project: 110977
Buggy source:
private void visitPackageGroup(TargetAndConfiguration node,PackageGroup packageGroup,Collection<Dependency> outgoingEdges){
  for (  Label label : packageGroup.getIncludes()) {
    try {
      Target target=getTarget(label);
      if (target == null) {
        return;
      }
      if (!(target instanceof PackageGroup)) {
        invalidPackageGroupReferenceHook(node,label);
        continue;
      }
      outgoingEdges.add(Dependency.withNullConfiguration(label));
    }
 catch (    NoSuchThingException e) {
    }
  }
}

Fixed version (ground truth):
private void visitPackageGroup(TargetAndConfiguration node,PackageGroup packageGroup,NestedSetBuilder<Label> rootCauses,Collection<Dependency> outgoingEdges){
  for (  Label label : packageGroup.getIncludes()) {
    Target target=getTarget(packageGroup,label,rootCauses);
    if (target == null) {
      continue;
    }
    if (!(target instanceof PackageGroup)) {
      invalidPackageGroupReferenceHook(node,label);
      continue;
    }
    outgoingEdges.add(Dependency.withNullConfiguration(label));
  }
}
Program: 110978
Project: 110978
Buggy source:
private void visitTargetVisibility(TargetAndConfiguration node,Collection<Dependency> outgoingEdges){
  for (  Label label : node.getTarget().getVisibility().getDependencyLabels()) {
    try {
      Target visibilityTarget=getTarget(label);
      if (visibilityTarget == null) {
        return;
      }
      if (!(visibilityTarget instanceof PackageGroup)) {
        invalidVisibilityReferenceHook(node,label);
        continue;
      }
      outgoingEdges.add(Dependency.withNullConfiguration(label));
    }
 catch (    NoSuchThingException e) {
    }
  }
}

Fixed version (ground truth):
private void visitTargetVisibility(TargetAndConfiguration node,NestedSetBuilder<Label> rootCauses,Collection<Dependency> outgoingEdges){
  Target target=node.getTarget();
  for (  Label label : target.getVisibility().getDependencyLabels()) {
    Target visibilityTarget=getTarget(target,label,rootCauses);
    if (visibilityTarget == null) {
      continue;
    }
    if (!(visibilityTarget instanceof PackageGroup)) {
      invalidVisibilityReferenceHook(node,label);
      continue;
    }
    outgoingEdges.add(Dependency.withNullConfiguration(label));
  }
}
Program: 110980
Project: 110980
Buggy source:
public AspectCreationException(String message){
  this(message,null);
}

Fixed version (ground truth):
public AspectCreationException(String message){
  this(message,(Label)null);
}
Program: 110981
Project: 110981
Buggy source:
/** 
 * Load Skylark aspect from an extension file. Is to be called from a SkyFunction.
 * @return {@code null} if dependencies cannot be satisfied.
 */
@Nullable public static SkylarkAspect loadSkylarkAspect(Environment env,Label extensionLabel,String skylarkValueName) throws ConversionException {
  SkyKey importFileKey=SkylarkImportLookupValue.key(extensionLabel,false);
  SkylarkImportLookupValue skylarkImportLookupValue=(SkylarkImportLookupValue)env.getValue(importFileKey);
  if (skylarkImportLookupValue == null) {
    return null;
  }
  Object skylarkValue=skylarkImportLookupValue.getEnvironmentExtension().get(skylarkValueName);
  if (!(skylarkValue instanceof SkylarkAspect)) {
    throw new ConversionException(skylarkValueName + "String_Node_Str" + extensionLabel.toString()+ "String_Node_Str");
  }
  return (SkylarkAspect)skylarkValue;
}

Fixed version (ground truth):
/** 
 * Load Skylark aspect from an extension file. Is to be called from a SkyFunction.
 * @return {@code null} if dependencies cannot be satisfied.
 */
@Nullable public static SkylarkAspect loadSkylarkAspect(Environment env,Label extensionLabel,String skylarkValueName) throws ConversionException, SkylarkImportFailedException {
  SkyKey importFileKey=SkylarkImportLookupValue.key(extensionLabel,false);
  SkylarkImportLookupValue skylarkImportLookupValue=(SkylarkImportLookupValue)env.getValueOrThrow(importFileKey,SkylarkImportFailedException.class);
  if (skylarkImportLookupValue == null) {
    return null;
  }
  Object skylarkValue=skylarkImportLookupValue.getEnvironmentExtension().get(skylarkValueName);
  if (!(skylarkValue instanceof SkylarkAspect)) {
    throw new ConversionException(skylarkValueName + "String_Node_Str" + extensionLabel.toString()+ "String_Node_Str");
  }
  return (SkylarkAspect)skylarkValue;
}
Program: 110983
Project: 110983
Buggy source:
private static void assertSaneAnalysisError(ErrorInfo errorInfo,SkyKey key){
  Throwable cause=errorInfo.getException();
  if (cause != null) {
    Preconditions.checkState(cause instanceof ConfiguredValueCreationException || cause instanceof AspectCreationException || cause instanceof ActionConflictException,"String_Node_Str",key,errorInfo);
  }
}

Fixed version (ground truth):
private static void assertSaneAnalysisError(ErrorInfo errorInfo,SkyKey key){
  Throwable cause=errorInfo.getException();
  if (cause != null) {
    Preconditions.checkState(cause instanceof ConfiguredValueCreationException || cause instanceof ActionConflictException || cause instanceof AspectCreationException|| cause instanceof SkylarkImportFailedException,"String_Node_Str",key,errorInfo);
  }
}
Program: 110984
Project: 110984
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) {
    throw new LoadSkylarkAspectFunctionException(e,skyKey);
  }
  if (labelLookupMap == null) {
    return null;
  }
  SkylarkAspect skylarkAspect=null;
  try {
    skylarkAspect=AspectFunction.loadSkylarkAspect(env,labelLookupMap.get(extensionFile),skylarkValueName);
  }
 catch (  ConversionException 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(e,skyKey);
  }
  if (labelLookupMap == null) {
    return null;
  }
  SkylarkAspect skylarkAspect=null;
  try {
    skylarkAspect=AspectFunction.loadSkylarkAspect(env,labelLookupMap.get(extensionFile),skylarkValueName);
  }
 catch (  SkylarkImportFailedException e) {
    env.getListener().handle(Event.error(e.getMessage()));
    throw new LoadSkylarkAspectFunctionException(new AspectCreationException(e.getMessage()),skyKey);
  }
catch (  ConversionException e) {
    env.getListener().handle(Event.error(e.getMessage()));
    throw new LoadSkylarkAspectFunctionException(new AspectCreationException(e.getMessage()),skyKey);
  }
  if (skylarkAspect == null) {
    return null;
  }
  SkyKey aspectKey=AspectValue.key(aspectLoadingKey.getTargetLabel(),aspectLoadingKey.getTargetConfiguration(),skylarkAspect.getAspectClass(),AspectParameters.EMPTY);
  return env.getValue(aspectKey);
}
Program: 110985
Project: 110985
Buggy source:
/** 
 * Returns the STL prerequisite of the rule. <p>If rule has an implicit $stl attribute returns STL version set on the command line or if not set, the value of the $stl attribute. Returns  {@code null} otherwise.
 */
private static Label getStl(Rule rule,BuildConfiguration original){
  Label stl=null;
  if (rule.getRuleClassObject().hasAttr("String_Node_Str",BuildType.LABEL)) {
    Label stlConfigLabel=original.getFragment(CppConfiguration.class).getStl();
    Label stlRuleLabel=RawAttributeMapper.of(rule).get("String_Node_Str",BuildType.LABEL);
    if (stlConfigLabel == null) {
      stl=stlRuleLabel;
    }
 else     if (!stlConfigLabel.equals(rule.getLabel()) && stlRuleLabel != null) {
      stl=stlConfigLabel;
    }
  }
  return stl;
}

Fixed version (ground truth):
/** 
 * Returns the STL prerequisite of the rule. <p>If rule has an implicit $stl_default attribute returns STL version set on the command line or if not set, the value of the $stl_default attribute. Returns  {@code null} otherwise.
 */
private static Label getStl(Rule rule,BuildConfiguration original){
  Label stl=null;
  if (rule.getRuleClassObject().hasAttr("String_Node_Str",BuildType.LABEL)) {
    Label stlConfigLabel=original.getFragment(CppConfiguration.class).getStl();
    Label stlRuleLabel=RawAttributeMapper.of(rule).get("String_Node_Str",BuildType.LABEL);
    if (stlConfigLabel == null) {
      stl=stlRuleLabel;
    }
 else     if (!stlConfigLabel.equals(rule.getLabel()) && stlRuleLabel != null) {
      stl=stlConfigLabel;
    }
  }
  return stl;
}
Program: 110989
Project: 110989
Buggy source:
/** 
 * Stores an output symlink unless it's excluded or would overwrite an existing one. 
 */
private static void maybeStoreSymlink(PathFragment linkName,PathFragment linkTarget,String metadata,PathFragment destPath,Set<String> exclusions,Map<PathFragment,FilesetOutputSymlink> result){
  if (!exclusions.contains(linkName.getPathString())) {
    linkName=destPath.getRelative(linkName);
    if (!result.containsKey(linkName)) {
      result.put(linkName,new FilesetOutputSymlink(linkName,linkTarget,metadata));
    }
  }
}

Fixed version (ground truth):
/** 
 * Stores an output symlink unless it's excluded or would overwrite an existing one. 
 */
private static void maybeStoreSymlink(PathFragment linkName,PathFragment linkTarget,String metadata,PathFragment destPath,Map<PathFragment,FilesetOutputSymlink> result){
  linkName=destPath.getRelative(linkName);
  if (!result.containsKey(linkName)) {
    result.put(linkName,new FilesetOutputSymlink(linkName,linkTarget,metadata));
  }
}
Program: 110990
Project: 110990
Buggy source:
public DanglingSymlinkException(String path,String unresolvedLink){
  super("String_Node_Str" + path + "String_Node_Str");
  Preconditions.checkArgument(path != null && !path.isEmpty());
  Preconditions.checkArgument(unresolvedLink != null && !unresolvedLink.isEmpty());
  this.path=path;
  this.unresolvedLink=unresolvedLink;
}

Fixed version (ground truth):
public DanglingSymlinkException(String path,String unresolvedLink){
  super(String.format("String_Node_Str",path,unresolvedLink));
  Preconditions.checkArgument(path != null && !path.isEmpty());
  Preconditions.checkArgument(unresolvedLink != null && !unresolvedLink.isEmpty());
  this.path=path;
  this.unresolvedLink=unresolvedLink;
}
Program: 110991
Project: 110991
Buggy source:
/** 
 * Construct the BuildStartingEvent.
 * @param request the build request.
 */
public BuildCompleteEvent(BuildRequest request,BuildResult result){
  this.result=result;
}

Fixed version (ground truth):
/** 
 * Construct the BuildCompleteEvent.
 * @param request the build request.
 */
public BuildCompleteEvent(BuildRequest request,BuildResult result){
  this.result=result;
}
Program: 110992
Project: 110992
Buggy source:
private void registerConvertStringsActions(ObjcProvider objcProvider){
  IntermediateArtifacts intermediateArtifacts=ObjcRuleClasses.intermediateArtifacts(ruleContext);
  for (  Artifact strings : objcProvider.get(ObjcProvider.STRINGS)) {
    Artifact bundled=intermediateArtifacts.convertedStringsFile(strings);
    ruleContext.registerAction(ObjcRuleClasses.spawnOnDarwinActionBuilder(ruleContext).setMnemonic("String_Node_Str").setExecutable(XCRUN).setCommandLine(CustomCommandLine.builder().add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").addExecPath("String_Node_Str",bundled).add("String_Node_Str").addPath(strings.getExecPath()).build()).addInput(strings).addOutput(bundled).build(ruleContext));
  }
}

Fixed version (ground truth):
private void registerConvertStringsActions(ObjcProvider objcProvider){
  IntermediateArtifacts intermediateArtifacts=ObjcRuleClasses.intermediateArtifacts(ruleContext);
  for (  Artifact strings : objcProvider.get(ObjcProvider.STRINGS)) {
    Artifact bundled=intermediateArtifacts.convertedStringsFile(strings);
    ruleContext.registerAction(ObjcRuleClasses.spawnOnDarwinActionBuilder(ruleContext).setMnemonic("String_Node_Str").setExecutable(new PathFragment("String_Node_Str")).setCommandLine(CustomCommandLine.builder().add("String_Node_Str").add("String_Node_Str").addExecPath("String_Node_Str",bundled).add("String_Node_Str").addPath(strings.getExecPath()).build()).addInput(strings).addOutput(bundled).build(ruleContext));
  }
}
Program: 110993
Project: 110993
Buggy source:
@Nullable public Fragment getSkylarkFragment(String name,ConfigurationTransition config){
  Class<? extends Fragment> fragmentClass=getConfiguration().getSkylarkFragmentByName(name);
  if (fragmentClass == null) {
    return null;
  }
  return getFragment(fragmentClass,name,String.format("String_Node_Str" + "String_Node_Str",(config == ConfigurationTransition.HOST) ? "String_Node_Str" : "String_Node_Str",name),config);
}

Fixed version (ground truth):
@Nullable public Fragment getSkylarkFragment(String name,ConfigurationTransition config){
  Class<? extends Fragment> fragmentClass=getConfiguration(config).getSkylarkFragmentByName(name);
  if (fragmentClass == null) {
    return null;
  }
  return getFragment(fragmentClass,name,String.format("String_Node_Str" + "String_Node_Str",(config == ConfigurationTransition.HOST) ? "String_Node_Str" : "String_Node_Str",name),config);
}
Program: 110995
Project: 110995
Buggy source:
Directory(RootedPath path){
  super(FileType.DIRECTORY,Optional.of(path),Optional.of(FileStateValue.DIRECTORY_FILE_STATE_NODE));
}

Fixed version (ground truth):
Directory(RootedPath path){
  super(FileType.DIRECTORY,Optional.of(path),Optional.<FileStateValue>of(FileStateValue.DIRECTORY_FILE_STATE_NODE));
}