nus-yam/ex-repair huggingface dataset:
Program: 110477
Project: 110477
Buggy source:
@Override protected void onInputFormatChanged(MediaFormatHolder holder) throws ExoPlaybackException {
  super.onInputFormatChanged(holder);
  currentPixelWidthHeightRatio=holder.format.pixelWidthHeightRatio;
}

Fixed version (ground truth):
@Override protected void onInputFormatChanged(MediaFormatHolder holder) throws ExoPlaybackException {
  super.onInputFormatChanged(holder);
  currentPixelWidthHeightRatio=holder.format.pixelWidthHeightRatio == MediaFormat.NO_VALUE ? 1 : holder.format.pixelWidthHeightRatio;
}
Program: 110478
Project: 110478
Buggy source:
@Override protected final T doInBackground(String... data){
  try {
    contentId=data.length > 1 ? data[1] : null;
    String urlString=data[0];
    String inputEncoding=null;
    InputStream inputStream=null;
    try {
      Uri baseUri=Util.parseBaseUri(urlString);
      HttpURLConnection connection=configureHttpConnection(new URL(urlString));
      inputStream=connection.getInputStream();
      inputEncoding=connection.getContentEncoding();
      if (inputEncoding == null) {
        inputEncoding=C.UTF8_NAME;
      }
      return parser.parse(inputStream,inputEncoding,contentId,baseUri);
    }
  finally {
      if (inputStream != null) {
        inputStream.close();
      }
    }
  }
 catch (  Exception e) {
    exception=e;
    return null;
  }
}

Fixed version (ground truth):
@Override protected final T doInBackground(String... data){
  try {
    contentId=data.length > 1 ? data[1] : null;
    String urlString=data[0];
    String inputEncoding=null;
    InputStream inputStream=null;
    try {
      Uri baseUri=Util.parseBaseUri(urlString);
      HttpURLConnection connection=configureHttpConnection(new URL(urlString));
      inputStream=connection.getInputStream();
      inputEncoding=connection.getContentEncoding();
      return parser.parse(inputStream,inputEncoding,contentId,baseUri);
    }
  finally {
      if (inputStream != null) {
        inputStream.close();
      }
    }
  }
 catch (  Exception e) {
    exception=e;
    return null;
  }
}
Program: 110479
Project: 110479
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || getClass() != obj.getClass()) {
    return false;
  }
  MediaFormat other=(MediaFormat)obj;
  if (maxInputSize != other.maxInputSize || width != other.width || height != other.height || maxWidth != other.maxWidth || maxHeight != other.maxHeight || channelCount != other.channelCount || sampleRate != other.sampleRate || !Util.areEqual(mimeType,other.mimeType) || initializationData.size() != other.initializationData.size()) {
    return false;
  }
  for (int i=0; i < initializationData.size(); i++) {
    if (!Arrays.equals(initializationData.get(i),other.initializationData.get(i))) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
public boolean equals(MediaFormat other,boolean ignoreMaxDimensions){
  if (this == other) {
    return true;
  }
  if (other == null) {
    return false;
  }
  return equalsInternal(other,ignoreMaxDimensions);
}
Program: 110481
Project: 110481
Buggy source:
/** 
 * Seeks to the beginning of the chunk.
 */
public final void seekToStart(){
  seekTo(startTimeUs,false);
}

Fixed version (ground truth):
/** 
 * Seeks to the beginning of the chunk.
 */
public abstract void seekToStart();
Program: 110483
Project: 110483
Buggy source:
@Override public synchronized void onTransferEnd(){
  Assertions.checkState(streamCount > 0);
  long nowMs=clock.elapsedRealtime();
  int elapsedMs=(int)(nowMs - startTimeMs);
  if (elapsedMs > 0) {
    float bytesPerSecond=accumulator * 1000 / elapsedMs;
    slidingPercentile.addSample(computeWeight(accumulator),bytesPerSecond);
    float bandwidthEstimateFloat=slidingPercentile.getPercentile(0.5f);
    bandwidthEstimate=bandwidthEstimateFloat == Float.NaN ? NO_ESTIMATE : (long)bandwidthEstimateFloat;
    notifyBandwidthSample(elapsedMs,accumulator,bandwidthEstimate);
  }
  streamCount--;
  if (streamCount > 0) {
    startTimeMs=nowMs;
  }
  accumulator=0;
}

Fixed version (ground truth):
@Override public synchronized void onTransferEnd(){
  Assertions.checkState(streamCount > 0);
  long nowMs=clock.elapsedRealtime();
  int elapsedMs=(int)(nowMs - startTimeMs);
  if (elapsedMs > 0) {
    float bytesPerSecond=accumulator * 1000 / elapsedMs;
    slidingPercentile.addSample(computeWeight(accumulator),bytesPerSecond);
    float bandwidthEstimateFloat=slidingPercentile.getPercentile(0.5f);
    bandwidthEstimate=Float.isNaN(bandwidthEstimateFloat) ? NO_ESTIMATE : (long)bandwidthEstimateFloat;
    notifyBandwidthSample(elapsedMs,accumulator,bandwidthEstimate);
  }
  streamCount--;
  if (streamCount > 0) {
    startTimeMs=nowMs;
  }
  accumulator=0;
}
Program: 110484
Project: 110484
Buggy source:
public long getDuration(){
  return mAnimatorSet.getDuration();
}

Fixed version (ground truth):
public long getDuration(){
}
Program: 110485
Project: 110485
Buggy source:
@SuppressWarnings("String_Node_Str") private Channel acquireUploadChannel() throws InterruptedException {
  Promise<Channel> channelReady=eventLoop.next().newPromise();
  channelPool.acquire().addListener((  Future<Channel> channelAcquired) -> {
    if (!channelAcquired.isSuccess()) {
      channelReady.setFailure(channelAcquired.cause());
      return;
    }
    try {
      Channel ch=channelAcquired.getNow();
      ChannelPipeline p=ch.pipeline();
      p.addLast(new HttpResponseDecoder());
      p.addLast(new HttpObjectAggregator(10 * 1024));
      p.addLast(new HttpRequestEncoder());
      p.addLast(new ChunkedWriteHandler());
      p.addLast(new HttpUploadHandler(creds));
      channelReady.setSuccess(ch);
    }
 catch (    Throwable t) {
      channelReady.setFailure(t);
    }
  }
);
  try {
    return channelReady.get();
  }
 catch (  ExecutionException e) {
    PlatformDependent.throwException(e.getCause());
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private Channel acquireUploadChannel() throws InterruptedException {
  Promise<Channel> channelReady=eventLoop.next().newPromise();
  channelPool.acquire().addListener((  Future<Channel> channelAcquired) -> {
    if (!channelAcquired.isSuccess()) {
      channelReady.setFailure(channelAcquired.cause());
      return;
    }
    try {
      Channel ch=channelAcquired.getNow();
      ChannelPipeline p=ch.pipeline();
      p.addLast(new HttpResponseDecoder());
      p.addLast(new HttpObjectAggregator(10 * 1024));
      p.addLast(new HttpRequestEncoder());
      p.addLast(new ChunkedWriteHandler());
synchronized (credentialsLock) {
        p.addLast(new HttpUploadHandler(creds));
      }
      channelReady.setSuccess(ch);
    }
 catch (    Throwable t) {
      channelReady.setFailure(t);
    }
  }
);
  try {
    return channelReady.get();
  }
 catch (  ExecutionException e) {
    PlatformDependent.throwException(e.getCause());
    return null;
  }
}
Program: 110486
Project: 110486
Buggy source:
@SuppressWarnings("String_Node_Str") private Future<Channel> acquireDownloadChannel(){
  Promise<Channel> channelReady=eventLoop.next().newPromise();
  channelPool.acquire().addListener((  Future<Channel> channelAcquired) -> {
    if (!channelAcquired.isSuccess()) {
      channelReady.setFailure(channelAcquired.cause());
      return;
    }
    try {
      Channel ch=channelAcquired.getNow();
      ChannelPipeline p=ch.pipeline();
      ch.pipeline().addFirst("String_Node_Str",new ReadTimeoutHandler(timeoutMillis));
      p.addLast(new HttpClientCodec());
      p.addLast(new HttpDownloadHandler(creds));
      channelReady.setSuccess(ch);
    }
 catch (    Throwable t) {
      channelReady.setFailure(t);
    }
  }
);
  return channelReady;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private Future<Channel> acquireDownloadChannel(){
  Promise<Channel> channelReady=eventLoop.next().newPromise();
  channelPool.acquire().addListener((  Future<Channel> channelAcquired) -> {
    if (!channelAcquired.isSuccess()) {
      channelReady.setFailure(channelAcquired.cause());
      return;
    }
    try {
      Channel ch=channelAcquired.getNow();
      ChannelPipeline p=ch.pipeline();
      ch.pipeline().addFirst("String_Node_Str",new ReadTimeoutHandler(timeoutMillis));
      p.addLast(new HttpClientCodec());
synchronized (credentialsLock) {
        p.addLast(new HttpDownloadHandler(creds));
      }
      channelReady.setSuccess(ch);
    }
 catch (    Throwable t) {
      channelReady.setFailure(t);
    }
  }
);
  return channelReady;
}
Program: 110487
Project: 110487
Buggy source:
@Override public Thread newThread(final Runnable runnable){
  final Thread t=new Thread(null,runnable,"String_Node_Str" + threadInitNumber.getAndIncrement(),THREAD_STACK_SIZE);
  t.setDaemon(true);
  return t;
}

Fixed version (ground truth):
@Override public Thread newThread(final Runnable runnable){
  final Thread t=new Thread(null,runnable,"String_Node_Str" + threadInitNumber.getAndIncrement());
  t.setDaemon(true);
  return t;
}
Program: 110488
Project: 110488
Buggy source:
static QueryTaskFuture<Predicate<SkyKey>> getDTCSkyKeyPredicateFuture(SkyQueryEnvironment env,QueryExpression expression,QueryExpressionContext<Target> context,int processResultsBatchSize,int concurrencyLevel){
  QueryTaskFuture<ThreadSafeMutableSet<Target>> universeValueFuture=QueryUtil.evalAll(env,context,expression);
  Function<ThreadSafeMutableSet<Target>,QueryTaskFuture<Predicate<SkyKey>>> getTransitiveClosureAsyncFunction=universeValue -> {
    ThreadSafeAggregateAllSkyKeysCallback aggregateAllCallback=new ThreadSafeAggregateAllSkyKeysCallback(concurrencyLevel);
    return env.executeAsync(() -> {
      Callback<Target> visitorCallback=ParallelVisitor.createParallelVisitorCallback(new TransitiveTraversalValueDTCVisitor.Factory(env,env.createSkyKeyUniquifier(),processResultsBatchSize,aggregateAllCallback));
      visitorCallback.process(universeValue);
      return Predicates.in(aggregateAllCallback.getResult());
    }
);
  }
;
  return env.transformAsync(universeValueFuture,getTransitiveClosureAsyncFunction);
}

Fixed version (ground truth):
static QueryTaskFuture<Predicate<SkyKey>> getDTCSkyKeyPredicateFuture(SkyQueryEnvironment env,QueryExpression expression,QueryExpressionContext<Target> context,int processResultsBatchSize,int concurrencyLevel){
  QueryTaskFuture<ThreadSafeMutableSet<Target>> universeValueFuture=QueryUtil.evalAll(env,context,expression);
  Function<ThreadSafeMutableSet<Target>,QueryTaskFuture<Predicate<SkyKey>>> getTransitiveClosureAsyncFunction=universeValue -> {
    ThreadSafeAggregateAllSkyKeysCallback aggregateAllCallback=new ThreadSafeAggregateAllSkyKeysCallback(concurrencyLevel);
    return env.executeAsync(() -> {
      Callback<Target> visitorCallback=ParallelVisitor.createParallelVisitorCallback(new UnfilteredTransitiveTraversalValueDTCVisitor.Factory(env,env.createSkyKeyUniquifier(),processResultsBatchSize,aggregateAllCallback));
      visitorCallback.process(universeValue);
      return Predicates.in(aggregateAllCallback.getResult());
    }
);
  }
;
  return env.transformAsync(universeValueFuture,getTransitiveClosureAsyncFunction);
}
Program: 110489
Project: 110489
Buggy source:
static QueryTaskFuture<Void> getRdepsInUniverseUnboundedParallel(SkyQueryEnvironment env,QueryExpression expression,Predicate<SkyKey> universe,QueryExpressionContext<Target> context,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  return env.eval(expression,context,ParallelVisitor.createParallelVisitorCallback(new RdepsUnboundedVisitor.Factory(env,universe,callback,packageSemaphore)));
}

Fixed version (ground truth):
static QueryTaskFuture<Void> getRdepsInUniverseUnboundedParallel(SkyQueryEnvironment env,QueryExpression expression,Predicate<SkyKey> unfilteredUniverse,QueryExpressionContext<Target> context,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  return env.eval(expression,context,ParallelVisitor.createParallelVisitorCallback(new RdepsUnboundedVisitor.Factory(env,unfilteredUniverse,callback,packageSemaphore)));
}
Program: 110490
Project: 110490
Buggy source:
RdepsUnboundedVisitor(SkyQueryEnvironment env,Uniquifier<DepAndRdep> depAndRdepUniquifier,Uniquifier<SkyKey> validRdepUniquifier,Predicate<SkyKey> universe,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  super(env,callback,packageSemaphore);
  this.depAndRdepUniquifier=depAndRdepUniquifier;
  this.validRdepUniquifier=validRdepUniquifier;
  this.universe=universe;
}

Fixed version (ground truth):
RdepsUnboundedVisitor(SkyQueryEnvironment env,Uniquifier<DepAndRdep> depAndRdepUniquifier,Uniquifier<SkyKey> validRdepUniquifier,Predicate<SkyKey> unfilteredUniverse,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  super(env,callback,packageSemaphore);
  this.depAndRdepUniquifier=depAndRdepUniquifier;
  this.validRdepUniquifier=validRdepUniquifier;
  this.unfilteredUniverse=unfilteredUniverse;
}
Program: 110491
Project: 110491
Buggy source:
@Override protected Iterable<DepAndRdep> preprocessInitialVisit(Iterable<SkyKey> keys){
  return Iterables.transform(Iterables.filter(keys,k -> universe.apply(k)),key -> new DepAndRdep(null,key));
}

Fixed version (ground truth):
@Override protected Iterable<DepAndRdep> preprocessInitialVisit(Iterable<SkyKey> keys){
  return Iterables.transform(Iterables.filter(keys,k -> unfilteredUniverse.apply(k)),key -> new DepAndRdep(null,key));
}
Program: 110492
Project: 110492
Buggy source:
Factory(SkyQueryEnvironment env,Predicate<SkyKey> universe,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  this.env=env;
  this.universe=universe;
  this.depAndRdepUniquifier=new UniquifierImpl<>(depAndRdep -> depAndRdep);
  this.validRdepUniquifier=env.createSkyKeyUniquifier();
  this.callback=callback;
  this.packageSemaphore=packageSemaphore;
}

Fixed version (ground truth):
Factory(SkyQueryEnvironment env,Predicate<SkyKey> unfilteredUniverse,Callback<Target> callback,MultisetSemaphore<PackageIdentifier> packageSemaphore){
  this.env=env;
  this.unfilteredUniverse=unfilteredUniverse;
  this.depAndRdepUniquifier=new UniquifierImpl<>(depAndRdep -> depAndRdep);
  this.validRdepUniquifier=env.createSkyKeyUniquifier();
  this.callback=callback;
  this.packageSemaphore=packageSemaphore;
}
Program: 110493
Project: 110493
Buggy source:
@Override public ParallelVisitor<DepAndRdep,Target> create(){
  return new RdepsUnboundedVisitor(env,depAndRdepUniquifier,validRdepUniquifier,universe,callback,packageSemaphore);
}

Fixed version (ground truth):
@Override public ParallelVisitor<DepAndRdep,Target> create(){
  return new RdepsUnboundedVisitor(env,depAndRdepUniquifier,validRdepUniquifier,unfilteredUniverse,callback,packageSemaphore);
}
Program: 110495
Project: 110495
Buggy source:
@ThreadSafe @Override public QueryTaskFuture<Void> getRdepsUnboundedParallel(QueryExpression expression,QueryExpression universe,QueryExpressionContext<Target> context,Callback<Target> callback){
  return transformAsync(getUniverseDTCSkyKeyPredicateFuture(universe,context),universePredicate -> ParallelSkyQueryUtils.getRdepsInUniverseUnboundedParallel(this,expression,universePredicate,context,callback,packageSemaphore));
}

Fixed version (ground truth):
@ThreadSafe @Override public QueryTaskFuture<Void> getRdepsUnboundedParallel(QueryExpression expression,QueryExpression universe,QueryExpressionContext<Target> context,Callback<Target> callback){
  return transformAsync(getUnfilteredUniverseDTCSkyKeyPredicateFuture(universe,context),unfilteredUniversePredicate -> ParallelSkyQueryUtils.getRdepsInUniverseUnboundedParallel(this,expression,unfilteredUniversePredicate,context,callback,packageSemaphore));
}
Program: 110496
Project: 110496
Buggy source:
@ThreadSafe @Override public QueryTaskFuture<Void> getRdepsBoundedParallel(QueryExpression expression,int depth,QueryExpression universe,QueryExpressionContext<Target> context,Callback<Target> callback){
  return transformAsync(getUniverseDTCSkyKeyPredicateFuture(universe,context),universePredicate -> ParallelSkyQueryUtils.getRdepsInUniverseBoundedParallel(this,expression,depth,universePredicate,context,callback,packageSemaphore));
}

Fixed version (ground truth):
@ThreadSafe @Override public QueryTaskFuture<Void> getRdepsBoundedParallel(QueryExpression expression,int depth,QueryExpression universe,QueryExpressionContext<Target> context,Callback<Target> callback){
  return transformAsync(getUnfilteredUniverseDTCSkyKeyPredicateFuture(universe,context),universePredicate -> ParallelSkyQueryUtils.getRdepsInUniverseBoundedParallel(this,expression,depth,universePredicate,context,callback,packageSemaphore));
}
Program: 110497
Project: 110497
Buggy source:
@Test public void testWhitelist() throws Exception {
  SkylarkCcCommonTestHelper.createFiles(scratch,"String_Node_Str");
  AssertionError e=assertThrows(AssertionError.class,() -> getConfiguredTarget("String_Node_Str"));
  assertThat(e).hasMessageThat().contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testWhitelist() throws Exception {
  SkylarkCcCommonTestHelper.createFiles(scratch,"String_Node_Str");
  reporter.removeHandler(failFastHandler);
  getConfiguredTarget("String_Node_Str");
  assertContainsEvent("String_Node_Str");
}
Program: 110498
Project: 110498
Buggy source:
@Test public void testLibraryLinkerInputArtifactCategoryError() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("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","String_Node_Str","String_Node_Str","String_Node_Str");
  AssertionError e=assertThrows(AssertionError.class,() -> getConfiguredTarget("String_Node_Str"));
  assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testLibraryLinkerInputArtifactCategoryError() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("String_Node_Str","String_Node_Str");
  scratch.file("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","String_Node_Str","String_Node_Str","String_Node_Str");
  reporter.removeHandler(failFastHandler);
  getConfiguredTarget("String_Node_Str");
  assertContainsEvent("String_Node_Str" + "String_Node_Str");
}
Program: 110499
Project: 110499
Buggy source:
@Test public void testCcLinkingProviderParamsWithoutFlag() throws Exception {
  useConfiguration("String_Node_Str");
  setUpCcLinkingProviderParamsTest();
  AssertionError e=assertThrows(AssertionError.class,() -> getConfiguredTarget("String_Node_Str"));
  assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testCcLinkingProviderParamsWithoutFlag() throws Exception {
  useConfiguration("String_Node_Str");
  setUpCcLinkingProviderParamsTest();
  reporter.removeHandler(failFastHandler);
  getConfiguredTarget("String_Node_Str");
  assertContainsEvent("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
}
Program: 110500
Project: 110500
Buggy source:
@Test public void testEmptyCcLinkingInfoError() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("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");
  AssertionError e=assertThrows(AssertionError.class,() -> getConfiguredTarget("String_Node_Str"));
  assertThat(e).hasMessageThat().contains("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testEmptyCcLinkingInfoError() throws Exception {
  scratch.file("String_Node_Str","String_Node_Str","String_Node_Str");
  scratch.file("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");
  reporter.removeHandler(failFastHandler);
  getConfiguredTarget("String_Node_Str");
  assertContainsEvent("String_Node_Str");
}
Program: 110501
Project: 110501
Buggy source:
@ThreadCompatible private <T extends SkyValue>EvaluationResult<T> doMutatingEvaluation(ImmutableSet<SkyKey> skyKeys) throws InterruptedException, E {
  NodeEntry errorTransienceEntry=Iterables.getOnlyElement(graph.createIfAbsentBatch(null,Reason.PRE_OR_POST_EVALUATION,ImmutableList.of(ErrorTransienceValue.KEY)).values());
  if (!errorTransienceEntry.isDone()) {
    injectValues(ImmutableMap.of(ErrorTransienceValue.KEY,ErrorTransienceValue.INSTANCE),evaluatorContext.getGraphVersion(),graph,evaluatorContext.getProgressReceiver());
  }
  try {
    for (    Map.Entry<SkyKey,? extends NodeEntry> e : graph.createIfAbsentBatch(null,Reason.PRE_OR_POST_EVALUATION,skyKeys).entrySet()) {
      SkyKey skyKey=e.getKey();
      NodeEntry entry=e.getValue();
switch (entry.addReverseDepAndCheckIfDone(null)) {
case NEEDS_SCHEDULING:
        evaluatorContext.getVisitor().enqueueEvaluation(skyKey);
      break;
case DONE:
    informProgressReceiverThatValueIsDone(skyKey,entry);
  break;
case ALREADY_EVALUATING:
break;
default :
throw new IllegalStateException(entry + "String_Node_Str" + skyKey+ "String_Node_Str");
}
}
}
 catch (InterruptedException e) {
Thread.currentThread().interrupt();
evaluatorContext.getVisitor().waitForCompletion();
throw e;
}
return waitForCompletionAndConstructResult(skyKeys);
}

Fixed version (ground truth):
@ThreadCompatible private <T extends SkyValue>EvaluationResult<T> doMutatingEvaluation(ImmutableSet<SkyKey> skyKeys) throws InterruptedException, E {
  NodeEntry errorTransienceEntry=Iterables.getOnlyElement(graph.createIfAbsentBatch(null,Reason.PRE_OR_POST_EVALUATION,ImmutableList.of(ErrorTransienceValue.KEY)).values());
  if (!errorTransienceEntry.isDone()) {
    injectValues(ImmutableMap.of(ErrorTransienceValue.KEY,ErrorTransienceValue.INSTANCE),evaluatorContext.getGraphVersion(),graph,evaluatorContext.getProgressReceiver());
  }
  try {
    for (    Map.Entry<SkyKey,? extends NodeEntry> e : graph.createIfAbsentBatch(null,Reason.PRE_OR_POST_EVALUATION,skyKeys).entrySet()) {
      SkyKey skyKey=e.getKey();
      NodeEntry entry=e.getValue();
switch (entry.addReverseDepAndCheckIfDone(null)) {
case NEEDS_SCHEDULING:
        evaluatorContext.getVisitor().enqueueEvaluation(skyKey);
      break;
case DONE:
    informProgressReceiverThatValueIsDone(skyKey,entry);
  break;
case ALREADY_EVALUATING:
break;
default :
throw new IllegalStateException(entry + "String_Node_Str" + skyKey+ "String_Node_Str");
}
}
}
 catch (InterruptedException ie) {
Thread.currentThread().interrupt();
try {
evaluatorContext.getVisitor().waitForCompletion();
}
 catch (SchedulerException se) {
if (!(se.getCause() instanceof InterruptedException)) {
throw se;
}
}
throw ie;
}
return waitForCompletionAndConstructResult(skyKeys);
}
Program: 110502
Project: 110502
Buggy source:
@Override public Map<SkyKey,InMemoryNodeEntry> createIfAbsentBatch(@Nullable SkyKey requestor,Reason reason,Iterable<SkyKey> keys){
  ImmutableMap.Builder<SkyKey,InMemoryNodeEntry> builder=ImmutableMap.builder();
  for (  SkyKey key : keys) {
    builder.put(key,createIfAbsent(key));
  }
  return builder.build();
}

Fixed version (ground truth):
@Override public Map<SkyKey,NodeEntry> createIfAbsentBatch(@Nullable SkyKey requestor,Reason reason,Iterable<SkyKey> keys){
  ImmutableMap.Builder<SkyKey,NodeEntry> builder=ImmutableMap.builder();
  for (  SkyKey key : keys) {
    builder.put(key,createIfAbsent(key));
  }
  return builder.build();
}
Program: 110503
Project: 110503
Buggy source:
@Override public Map<SkyKey,SkyValue> getValues(){
  return Collections.unmodifiableMap(Maps.transformValues(nodeMap,new Function<InMemoryNodeEntry,SkyValue>(){
    @Override public SkyValue apply(    InMemoryNodeEntry entry){
      return entry.toValue();
    }
  }
));
}

Fixed version (ground truth):
@Override public Map<SkyKey,SkyValue> getValues(){
  return Collections.unmodifiableMap(Maps.transformValues(nodeMap,entry -> {
    try {
      return entry.toValue();
    }
 catch (    InterruptedException e) {
      throw new IllegalStateException(e);
    }
  }
));
}
Program: 110504
Project: 110504
Buggy source:
@Override public Map<SkyKey,SkyValue> getDoneValues(){
  return Collections.unmodifiableMap(Maps.filterValues(Maps.transformValues(nodeMap,new Function<InMemoryNodeEntry,SkyValue>(){
    @Override public SkyValue apply(    InMemoryNodeEntry entry){
      return entry.isDone() ? entry.getValue() : null;
    }
  }
),Predicates.notNull()));
}

Fixed version (ground truth):
@Override public Map<SkyKey,SkyValue> getDoneValues(){
  return Collections.unmodifiableMap(Maps.filterValues(Maps.transformValues(nodeMap,entry -> {
    if (!entry.isDone()) {
      return null;
    }
    try {
      return entry.getValue();
    }
 catch (    InterruptedException e) {
      throw new IllegalStateException(e);
    }
  }
),Predicates.notNull()));
}
Program: 110505
Project: 110505
Buggy source:
protected InMemoryNodeEntry createIfAbsent(SkyKey key){
  InMemoryNodeEntry newval=keepEdges ? new InMemoryNodeEntry() : new EdgelessInMemoryNodeEntry();
  InMemoryNodeEntry oldval=nodeMap.putIfAbsent(key,newval);
  return oldval == null ? newval : oldval;
}

Fixed version (ground truth):
protected NodeEntry createIfAbsent(SkyKey key){
  NodeEntry newval=newNodeEntry(key);
  NodeEntry oldval=nodeMap.putIfAbsent(key,newval);
  return oldval == null ? newval : oldval;
}
Program: 110506
Project: 110506
Buggy source:
@Override public Map<SkyKey,InMemoryNodeEntry> getAllValues(){
  return Collections.unmodifiableMap(nodeMap);
}

Fixed version (ground truth):
@Override public Map<SkyKey,NodeEntry> getAllValues(){
  return Collections.unmodifiableMap(nodeMap);
}
Program: 110507
Project: 110507
Buggy source:
@Override public Map<SkyKey,NodeEntry> getBatch(SkyKey requestor,Reason reason,Iterable<? extends SkyKey> keys){
  HashMap<SkyKey,NodeEntry> result=new HashMap<>();
  for (  SkyKey key : keys) {
    InMemoryNodeEntry entry=get(null,Reason.OTHER,key);
    if (entry != null) {
      result.put(key,entry);
    }
  }
  return result;
}

Fixed version (ground truth):
@Override public Map<SkyKey,NodeEntry> getBatch(SkyKey requestor,Reason reason,Iterable<? extends SkyKey> keys){
  HashMap<SkyKey,NodeEntry> result=new HashMap<>();
  for (  SkyKey key : keys) {
    NodeEntry entry=get(null,Reason.OTHER,key);
    if (entry != null) {
      result.put(key,entry);
    }
  }
  return result;
}
Program: 110508
Project: 110508
Buggy source:
@Override public InMemoryNodeEntry get(@Nullable SkyKey requestor,Reason reason,SkyKey skyKey){
  return nodeMap.get(skyKey);
}

Fixed version (ground truth):
@Override public NodeEntry get(@Nullable SkyKey requestor,Reason reason,SkyKey skyKey){
  return nodeMap.get(skyKey);
}
Program: 110511
Project: 110511
Buggy source:
/** 
 * Executes a   {@link Callable} retrying on exception thrown. 
 */
private void retryOnException(Callable<?> c) throws Exception {
  final int maxRetries=5;
  final long initialDelayMillis=0;
  final long delayMillis=1000;
  int tries=0;
  while (tries <= maxRetries) {
    try {
      acksReceivedSinceLastRetry.set(0);
      c.call();
      lastKnownError=null;
      return;
    }
 catch (    InterruptedException e) {
      throw e;
    }
catch (    Exception e) {
      if (acksReceivedSinceLastRetry.get() > 0) {
        logger.fine(String.format("String_Node_Str",acksReceivedSinceLastRetry.get()));
        tries=0;
      }
      tries++;
      lastKnownError=e;
      long sleepMillis;
      if (tries == 1) {
        sleepMillis=initialDelayMillis;
      }
 else {
        sleepMillis=(long)(delayMillis * Math.pow(1.6,tries));
      }
      String message=String.format("String_Node_Str",sleepMillis);
      logger.log(Level.INFO,message,lastKnownError);
      sleeper.sleepMillis(sleepMillis);
    }
  }
  Preconditions.checkNotNull(lastKnownError);
  throw lastKnownError;
}

Fixed version (ground truth):
/** 
 * Executes a   {@link Callable} retrying on exception thrown. 
 */
private void retryOnException(Callable<?> c) throws Exception {
  final int maxRetries=5;
  final long initialDelayMillis=0;
  final long delayMillis=1000;
  int tries=0;
  while (tries <= maxRetries) {
    try {
      acksReceivedSinceLastRetry.set(0);
      c.call();
      lastRetryError=null;
      return;
    }
 catch (    InterruptedException e) {
      throw e;
    }
catch (    LocalFileUploadException e) {
      throw (Exception)e.getCause();
    }
catch (    Exception e) {
      if (acksReceivedSinceLastRetry.get() > 0) {
        logger.fine(String.format("String_Node_Str",acksReceivedSinceLastRetry.get()));
        tries=0;
      }
      tries++;
      lastRetryError=e;
      long sleepMillis;
      if (tries == 1) {
        sleepMillis=initialDelayMillis;
      }
 else {
        sleepMillis=(long)(delayMillis * Math.pow(1.6,tries));
      }
      String message=String.format("String_Node_Str",sleepMillis);
      logger.log(Level.INFO,message,lastRetryError);
      sleeper.sleepMillis(sleepMillis);
    }
  }
  Preconditions.checkNotNull(lastRetryError);
  throw lastRetryError;
}
Program: 110512
Project: 110512
Buggy source:
@VisibleForTesting public BuildEventServiceTransport(BuildEventServiceClient besClient,Duration uploadTimeout,boolean publishLifecycleEvents,String buildRequestId,String invocationId,String command,ModuleEnvironment moduleEnvironment,Clock clock,BuildEventProtocolOptions protocolOptions,EventHandler commandLineReporter,@Nullable String projectId,Set<String> keywords,@Nullable String besResultsUrl,BuildEventArtifactUploader artifactUploader,Sleeper sleeper,boolean errorsShouldFailTheBuild){
  this.besClient=besClient;
  this.besProtoUtil=new BuildEventServiceProtoUtil(buildRequestId,invocationId,projectId,command,clock,keywords);
  this.publishLifecycleEvents=publishLifecycleEvents;
  this.moduleEnvironment=moduleEnvironment;
  this.commandLineReporter=commandLineReporter;
  this.pendingAck=new ConcurrentLinkedDeque<>();
  this.pendingSend=new LinkedBlockingDeque<>();
  this.uploaderExecutorService=listeningDecorator(Executors.newFixedThreadPool(2));
  this.protocolOptions=protocolOptions;
  this.invocationResult=UNKNOWN_STATUS;
  this.uploadTimeout=uploadTimeout;
  this.artifactUploader=artifactUploader;
  this.sleeper=sleeper;
  this.besResultsUrl=besResultsUrl;
  this.errorsShouldFailTheBuild=errorsShouldFailTheBuild;
}

Fixed version (ground truth):
@VisibleForTesting public BuildEventServiceTransport(BuildEventServiceClient besClient,Duration uploadTimeout,boolean publishLifecycleEvents,String buildRequestId,String invocationId,String command,ModuleEnvironment moduleEnvironment,Clock clock,BuildEventProtocolOptions protocolOptions,EventHandler commandLineReporter,@Nullable String projectId,Set<String> keywords,@Nullable String besResultsUrl,BuildEventArtifactUploader artifactUploader,Sleeper sleeper,boolean errorsShouldFailTheBuild){
  this.besClient=besClient;
  this.besProtoUtil=new BuildEventServiceProtoUtil(buildRequestId,invocationId,projectId,command,clock,keywords);
  this.publishLifecycleEvents=publishLifecycleEvents;
  this.moduleEnvironment=moduleEnvironment;
  this.commandLineReporter=commandLineReporter;
  this.pendingAck=new ConcurrentLinkedDeque<>();
  this.pendingSend=new LinkedBlockingDeque<>();
  this.uploaderExecutorService=listeningDecorator(Executors.newFixedThreadPool(2,new ThreadFactory(){
    private final AtomicInteger count=new AtomicInteger();
    @Override public Thread newThread(    Runnable r){
      return new Thread(r,"String_Node_Str" + count.incrementAndGet());
    }
  }
));
  this.protocolOptions=protocolOptions;
  this.invocationResult=UNKNOWN_STATUS;
  this.uploadTimeout=uploadTimeout;
  this.artifactUploader=artifactUploader;
  this.sleeper=sleeper;
  this.besResultsUrl=besResultsUrl;
  this.errorsShouldFailTheBuild=errorsShouldFailTheBuild;
}
Program: 110513
Project: 110513
Buggy source:
private void reportErrorAndFailBuild(Throwable t){
  String message=errorMessageFromException(t);
  if (errorsShouldFailTheBuild) {
    commandLineReporter.handle(Event.error(message));
    moduleEnvironment.exit(new AbruptExitException("String_Node_Str",ExitCode.PUBLISH_ERROR));
  }
 else {
    commandLineReporter.handle(Event.warn(message));
  }
}

Fixed version (ground truth):
protected void reportErrorAndFailBuild(Throwable t){
  String message=errorMessageFromException(t);
  if (errorsShouldFailTheBuild) {
    commandLineReporter.handle(Event.error(message));
    moduleEnvironment.exit(new AbruptExitException("String_Node_Str",ExitCode.PUBLISH_ERROR));
  }
 else {
    commandLineReporter.handle(Event.warn(message));
  }
}
Program: 110514
Project: 110514
Buggy source:
private String errorMessageFromException(Throwable t){
  String message;
  if (t instanceof TimeoutException) {
    message="String_Node_Str";
    Exception lastKnownError0=lastKnownError;
    if (lastKnownError0 != null) {
      message+="String_Node_Str";
      message+="String_Node_Str";
      message+=besClient.userReadableError(lastKnownError0);
      return message;
    }
    return message;
  }
 else   if (t instanceof ExecutionException) {
    message=format(UPLOAD_FAILED_MESSAGE,t.getCause() != null ? besClient.userReadableError(t.getCause()) : t.getMessage());
    return message;
  }
 else {
    message=format(UPLOAD_FAILED_MESSAGE,besClient.userReadableError(t));
    return message;
  }
}

Fixed version (ground truth):
private String errorMessageFromException(Throwable t){
  String message;
  if (t instanceof TimeoutException) {
    message="String_Node_Str";
    Exception lastRetryError0=lastRetryError;
    if (lastRetryError0 != null) {
      message+="String_Node_Str";
      message+="String_Node_Str";
      message+=besClient.userReadableError(lastRetryError0);
      return message;
    }
    return message;
  }
 else   if (t instanceof ExecutionException) {
    message=format(UPLOAD_FAILED_MESSAGE,t.getCause() != null ? besClient.userReadableError(t.getCause()) : t.getMessage());
    return message;
  }
 else {
    message=format(UPLOAD_FAILED_MESSAGE,besClient.userReadableError(t));
    return message;
  }
}
Program: 110517
Project: 110517
Buggy source:
@Test public void testWorkspaceMappings() throws Exception {
  helper.setSkylarkSemantics("String_Node_Str");
  helper.parse("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertMapping(helper,"String_Node_Str","String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testWorkspaceMappings() throws Exception {
  helper.setSkylarkSemantics("String_Node_Str");
  helper.parse("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertMapping(helper,"String_Node_Str","String_Node_Str","String_Node_Str");
  assertMapping(helper,"String_Node_Str","String_Node_Str","String_Node_Str");
}
Program: 110518
Project: 110518
Buggy source:
@Test public void testSimpleMapping() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  RepositoryName name=RepositoryName.create("String_Node_Str");
  SkyKey skyKey=RepositoryMappingValue.key(name);
  EvaluationResult<RepositoryMappingValue> result=eval(skyKey);
  assertThat(result.hasError()).isFalse();
  assertThatEvaluationResult(result).hasEntryThat(skyKey).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}

Fixed version (ground truth):
@Test public void testSimpleMapping() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  RepositoryName name=RepositoryName.create("String_Node_Str");
  SkyKey skyKey=RepositoryMappingValue.key(name);
  EvaluationResult<RepositoryMappingValue> result=eval(skyKey);
  assertThat(result.hasError()).isFalse();
  assertThatEvaluationResult(result).hasEntryThat(skyKey).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.MAIN,RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}
Program: 110519
Project: 110519
Buggy source:
@Test public void testRepositoryWithMultipleMappings() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  RepositoryName name=RepositoryName.create("String_Node_Str");
  SkyKey skyKey=RepositoryMappingValue.key(name);
  assertThatEvaluationResult(eval(skyKey)).hasEntryThat(skyKey).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}

Fixed version (ground truth):
@Test public void testRepositoryWithMultipleMappings() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  RepositoryName name=RepositoryName.create("String_Node_Str");
  SkyKey skyKey=RepositoryMappingValue.key(name);
  assertThatEvaluationResult(eval(skyKey)).hasEntryThat(skyKey).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.MAIN,RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}
Program: 110520
Project: 110520
Buggy source:
@Test public void testMultipleRepositoriesWithMapping() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("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","String_Node_Str");
  RepositoryName name1=RepositoryName.create("String_Node_Str");
  SkyKey skyKey1=RepositoryMappingValue.key(name1);
  RepositoryName name2=RepositoryName.create("String_Node_Str");
  SkyKey skyKey2=RepositoryMappingValue.key(name2);
  assertThatEvaluationResult(eval(skyKey1)).hasEntryThat(skyKey1).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
  assertThatEvaluationResult(eval(skyKey2)).hasEntryThat(skyKey2).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}

Fixed version (ground truth):
@Test public void testMultipleRepositoriesWithMapping() throws Exception {
  setSkylarkSemanticsOptions("String_Node_Str");
  scratch.overwriteFile("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","String_Node_Str");
  RepositoryName name1=RepositoryName.create("String_Node_Str");
  SkyKey skyKey1=RepositoryMappingValue.key(name1);
  RepositoryName name2=RepositoryName.create("String_Node_Str");
  SkyKey skyKey2=RepositoryMappingValue.key(name2);
  assertThatEvaluationResult(eval(skyKey1)).hasEntryThat(skyKey1).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.MAIN,RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
  assertThatEvaluationResult(eval(skyKey2)).hasEntryThat(skyKey2).isEqualTo(RepositoryMappingValue.withMapping(ImmutableMap.of(RepositoryName.create("String_Node_Str"),RepositoryName.MAIN,RepositoryName.create("String_Node_Str"),RepositoryName.create("String_Node_Str"))));
}
Program: 110521
Project: 110521
Buggy source:
public PerBuildSyscallCache build(){
  CacheBuilder<Object,Object> statCacheBuilder=CacheBuilder.newBuilder();
  if (maxStats != UNSET) {
    statCacheBuilder=statCacheBuilder.maximumSize(maxStats);
  }
  CacheBuilder<Object,Object> readdirCacheBuilder=CacheBuilder.newBuilder();
  if (maxReaddirs != UNSET) {
    readdirCacheBuilder=readdirCacheBuilder.maximumSize(maxStats);
  }
  if (concurrencyLevel != UNSET) {
    statCacheBuilder=statCacheBuilder.concurrencyLevel(concurrencyLevel);
    readdirCacheBuilder=readdirCacheBuilder.concurrencyLevel(concurrencyLevel);
  }
  return new PerBuildSyscallCache(statCacheBuilder.build(newStatLoader()),readdirCacheBuilder.build(newReaddirLoader()));
}

Fixed version (ground truth):
public PerBuildSyscallCache build(){
  CacheBuilder<Object,Object> statCacheBuilder=CacheBuilder.newBuilder();
  if (maxStats != UNSET) {
    statCacheBuilder=statCacheBuilder.maximumSize(maxStats);
  }
  CacheBuilder<Object,Object> readdirCacheBuilder=CacheBuilder.newBuilder();
  if (maxReaddirs != UNSET) {
    readdirCacheBuilder=readdirCacheBuilder.maximumSize(maxReaddirs);
  }
  if (concurrencyLevel != UNSET) {
    statCacheBuilder=statCacheBuilder.concurrencyLevel(concurrencyLevel);
    readdirCacheBuilder=readdirCacheBuilder.concurrencyLevel(concurrencyLevel);
  }
  return new PerBuildSyscallCache(statCacheBuilder.build(newStatLoader()),readdirCacheBuilder.build(newReaddirLoader()));
}
Program: 110522
Project: 110522
Buggy source:
/** 
 * Retrieves the fingerprint associated with the given NestedSet contents, or null if the given contents are not known.
 */
@Nullable public FingerprintComputationResult fingerprintForContents(Object[] contents){
  return contentsToFingerprint.getIfPresent(contents);
}

Fixed version (ground truth):
/** 
 * Retrieves the fingerprint associated with the given NestedSet contents, or null if the given contents are not known.
 */
@VisibleForTesting @Nullable FingerprintComputationResult fingerprintForContents(Object[] contents){
  return contentsToFingerprint.getIfPresent(contents);
}
Program: 110523
Project: 110523
Buggy source:
@VisibleForTesting public abstract ListenableFuture<Void> writeStatus();

Fixed version (ground truth):
@VisibleForTesting abstract ListenableFuture<Void> writeStatus();
Program: 110525
Project: 110525
Buggy source:
@VisibleForTesting public NestedSetStore(NestedSetStorageEndpoint nestedSetStorageEndpoint,NestedSetCache nestedSetCache,Executor executor){
  this.nestedSetStorageEndpoint=nestedSetStorageEndpoint;
  this.nestedSetCache=nestedSetCache;
  this.executor=executor;
}

Fixed version (ground truth):
@VisibleForTesting NestedSetStore(NestedSetStorageEndpoint nestedSetStorageEndpoint,NestedSetCache nestedSetCache,Executor executor){
  this.nestedSetStorageEndpoint=nestedSetStorageEndpoint;
  this.nestedSetCache=nestedSetCache;
  this.executor=executor;
}
Program: 110530
Project: 110530
Buggy source:
ActionFileSystem(FileSystem delegate,Path execRoot,String relativeOutputPath,ImmutableList<Root> sourceRoots,ActionInputMap inputArtifactData,Iterable<Artifact> allowedInputs,Iterable<Artifact> outputArtifacts){
  try (SilentCloseable c=Profiler.instance().profile(ProfilerTask.ACTION_FS_STAGING,"String_Node_Str")){
    this.delegate=delegate;
    this.execRootFragment=execRoot.asFragment();
    this.outputPathFragment=execRootFragment.getRelative(relativeOutputPath);
    this.sourceRoots=sourceRoots.stream().map(root -> root.asPath().asFragment()).collect(ImmutableList.toImmutableList());
    validateRoots();
    this.inputArtifactData=inputArtifactData;
    this.optionalInputs=new HashMap<>();
    for (    Artifact input : allowedInputs) {
      if (input.isSourceArtifact() || inputArtifactData.getMetadata(input) != null) {
        continue;
      }
      optionalInputs.computeIfAbsent(input.getExecPath(),unused -> new OptionalInputMetadata(input));
    }
    ImmutableMap<PathFragment,Artifact> outputsMapping=Streams.stream(outputArtifacts).collect(ImmutableMap.toImmutableMap(Artifact::getExecPath,a -> a));
    this.outputs=CacheBuilder.newBuilder().build(CacheLoader.from(path -> new OutputMetadata(outputsMapping.get(path))));
  }
 }

Fixed version (ground truth):
ActionFileSystem(FileSystem delegate,PathFragment execRoot,String relativeOutputPath,ImmutableList<Root> sourceRoots,ActionInputMap inputArtifactData,Iterable<Artifact> allowedInputs,Iterable<Artifact> outputArtifacts){
  try (SilentCloseable c=Profiler.instance().profile(ProfilerTask.ACTION_FS_STAGING,"String_Node_Str")){
    this.delegate=delegate;
    this.execRootFragment=execRoot;
    this.outputPathFragment=execRootFragment.getRelative(relativeOutputPath);
    this.sourceRoots=sourceRoots.stream().map(root -> root.asPath().asFragment()).collect(ImmutableList.toImmutableList());
    validateRoots();
    this.inputArtifactData=inputArtifactData;
    this.optionalInputs=new HashMap<>();
    for (    Artifact input : allowedInputs) {
      if (input.isSourceArtifact() || inputArtifactData.getMetadata(input) != null) {
        continue;
      }
      optionalInputs.computeIfAbsent(input.getExecPath(),unused -> new OptionalInputMetadata(input));
    }
    ImmutableMap<PathFragment,Artifact> outputsMapping=Streams.stream(outputArtifacts).collect(ImmutableMap.toImmutableMap(Artifact::getExecPath,a -> a));
    this.outputs=CacheBuilder.newBuilder().build(CacheLoader.from(path -> new OutputMetadata(outputsMapping.get(path))));
  }
 }
Program: 110531
Project: 110531
Buggy source:
@Override public void close() throws IOException {
  super.close();
  byte[] data=toByteArray();
  set(new InlineFileArtifactValue(data,Hashing.md5().hashBytes(data).asBytes()),true);
}

Fixed version (ground truth):
@Override public void close() throws IOException {
  flush();
  super.close();
}
Program: 110532
Project: 110532
Buggy source:
/** 
 * Callers are expected to close the returned stream. 
 */
public ByteArrayOutputStream getOutputStream(){
  Preconditions.checkState(metadata == null,"String_Node_Str",artifact);
  return new ByteArrayOutputStream(){
    @Override public void close() throws IOException {
      super.close();
      byte[] data=toByteArray();
      set(new InlineFileArtifactValue(data,Hashing.md5().hashBytes(data).asBytes()),true);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Callers are expected to close the returned stream. 
 */
public ByteArrayOutputStream getOutputStream(){
  Preconditions.checkState(metadata == null,"String_Node_Str",artifact);
  return new ByteArrayOutputStream(){
    @Override public void close() throws IOException {
      flush();
      super.close();
    }
    @Override public void flush() throws IOException {
      super.flush();
      byte[] data=toByteArray();
      set(new InlineFileArtifactValue(data,Hashing.md5().hashBytes(data).asBytes()),true);
    }
  }
;
}
Program: 110533
Project: 110533
Buggy source:
/** 
 * Unpauses the given thread if it is currently paused. Also unsets   {@link #pausingAllThreads}.
 */
@GuardedBy("String_Node_Str") private void resumeThread(ThreadState thread,SkylarkDebuggingProtos.Stepping stepping){
  PausedThreadState pausedState=thread.pausedState;
  if (pausedState == null) {
    return;
  }
  pausingAllThreads=false;
  thread.readyToPause=thread.debuggable.stepControl(DebugEventHelper.convertSteppingEnum(stepping));
  pausedState.semaphore.release();
  thread.pausedState=null;
}

Fixed version (ground truth):
/** 
 * Unpauses the given thread if it is currently paused. Also unsets   {@link #pausingAllThreads}.
 */
@GuardedBy("String_Node_Str") private void resumeThread(ThreadState thread,SkylarkDebuggingProtos.Stepping stepping){
  PausedThreadState pausedState=thread.pausedState;
  if (pausedState == null) {
    return;
  }
  pausingAllThreads=false;
  thread.readyToPause=thread.debuggable.stepControl(DebugEventHelper.convertSteppingEnum(stepping));
  thread.pausedState=null;
  pausedState.semaphore.release();
}