nus-yam/ex-repair huggingface dataset:
Program: 110656
Project: 110656
Buggy source:
/** 
 * Returns the names of all the packages under a given directory. <p>Packages returned by this method and passed into   {@link #bulkGetPackages(Iterable)} areexpected to return successful  {@link Package} values.
 * @param eventHandler any errors emitted during package lookup and loading for {@code directory}and non-excluded directories beneath it will be reported here
 * @param directory a {@link RootedPath} specifying the directory to search
 * @param blacklistedSubdirectories a set of {@link PathFragment}s, all of which are beneath  {@code directory}, specifying transitive subdirectories to that have been blacklisted
 * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath   {@code directory}, specifying transitive subdirectories to exclude
 */
Iterable<PathFragment> getPackagesUnderDirectory(ExtendedEventHandler eventHandler,RepositoryName repository,PathFragment directory,ImmutableSet<PathFragment> blacklistedSubdirectories,ImmutableSet<PathFragment> excludedSubdirectories) throws InterruptedException ;

Fixed version (ground truth):
/** 
 * Returns the names of all the packages under a given directory. <p>Packages returned by this method and passed into   {@link #bulkGetPackages(Iterable)} areexpected to return successful  {@link Package} values.
 * @param eventHandler any errors emitted during package lookup and loading for {@code directory}and non-excluded directories beneath it will be reported here
 * @param directory a {@link RootedPath} specifying the directory to search
 * @param blacklistedSubdirectories a set of {@link PathFragment}s, all of which are beneath  {@code directory} (not necessarily strictly), specifying transitive subdirectories thathave been blacklisted
 * @param excludedSubdirectories a set of {@link PathFragment}s, all of which are beneath   {@code directory} (not necessarily strictly), specifying transitive subdirectories to exclude
 */
Iterable<PathFragment> getPackagesUnderDirectory(ExtendedEventHandler eventHandler,RepositoryName repository,PathFragment directory,ImmutableSet<PathFragment> blacklistedSubdirectories,ImmutableSet<PathFragment> excludedSubdirectories) throws InterruptedException ;
Program: 110661
Project: 110661
Buggy source:
@Before public void createConstraints() 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","String_Node_Str","String_Node_Str","String_Node_Str");
  setting=ConstraintSettingInfo.create(makeLabel("String_Node_Str"));
  linuxConstraint=ConstraintValueInfo.create(setting,makeLabel("String_Node_Str"));
  macConstraint=ConstraintValueInfo.create(setting,makeLabel("String_Node_Str"));
  linuxPlatform=PlatformInfo.builder().setLabel(makeLabel("String_Node_Str")).addConstraint(linuxConstraint).build();
  macPlatform=PlatformInfo.builder().setLabel(makeLabel("String_Node_Str")).addConstraint(macConstraint).build();
}

Fixed version (ground truth):
@Before public void createConstraints() 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","String_Node_Str","String_Node_Str","String_Node_Str");
  setting=ConstraintSettingInfo.create(makeLabel("String_Node_Str"));
  linuxConstraint=ConstraintValueInfo.create(setting,makeLabel("String_Node_Str"));
  macConstraint=ConstraintValueInfo.create(setting,makeLabel("String_Node_Str"));
  linuxPlatform=PlatformInfo.builder().setLabel(makeLabel("String_Node_Str")).addConstraint(linuxConstraint).build();
  macPlatform=PlatformInfo.builder().setLabel(makeLabel("String_Node_Str")).addConstraint(macConstraint).build();
}
Program: 110663
Project: 110663
Buggy source:
static SkylarkList<Object> callGlob(@Nullable PackageContext originalContext,Object include,Object exclude,boolean excludeDirs,FuncallExpression ast,Environment env) throws EvalException, ConversionException, InterruptedException {
  PackageContext context;
  if (originalContext == null) {
    context=getContext(env,ast);
  }
 else {
    context=originalContext;
  }
  List<String> includes=Type.STRING_LIST.convert(include,"String_Node_Str");
  List<String> excludes=Type.STRING_LIST.convert(exclude,"String_Node_Str");
  List<String> matches;
  try {
    Globber.Token globToken=context.globber.runAsync(includes,excludes,excludeDirs);
    matches=context.globber.fetch(globToken);
  }
 catch (  IOException e) {
    String errorMessage="String_Node_Str" + Joiner.on("String_Node_Str").join(includes) + "String_Node_Str"+ e.getMessage();
    context.eventHandler.handle(Event.error(ast.getLocation(),errorMessage));
    context.pkgBuilder.setIOExceptionAndMessage(e,errorMessage);
    matches=ImmutableList.of();
  }
catch (  BadGlobException e) {
    throw new EvalException(ast.getLocation(),e.getMessage());
  }
  GlobList<String> globList=GlobList.captureResults(includes,excludes,matches);
  return new MutableList<>(globList,env);
}

Fixed version (ground truth):
static SkylarkList<Object> callGlob(@Nullable PackageContext originalContext,Object include,Object exclude,boolean excludeDirs,FuncallExpression ast,Environment env) throws EvalException, ConversionException, InterruptedException {
  PackageContext context;
  if (originalContext == null) {
    context=getContext(env,ast);
  }
 else {
    context=originalContext;
  }
  List<String> includes=Type.STRING_LIST.convert(include,"String_Node_Str");
  List<String> excludes=Type.STRING_LIST.convert(exclude,"String_Node_Str");
  List<String> matches;
  try {
    Globber.Token globToken=context.globber.runAsync(includes,excludes,excludeDirs);
    matches=context.globber.fetch(globToken);
  }
 catch (  IOException e) {
    String errorMessage="String_Node_Str" + Joiner.on("String_Node_Str").join(includes) + "String_Node_Str"+ e.getMessage();
    context.eventHandler.handle(Event.error(ast.getLocation(),errorMessage));
    context.pkgBuilder.setIOExceptionAndMessage(e,errorMessage);
    matches=ImmutableList.of();
  }
catch (  BadGlobException e) {
    throw new EvalException(ast.getLocation(),e.getMessage());
  }
  GlobList<String> globList=GlobList.captureResults(includes,excludes,matches);
  return MutableList.copyOf(env,globList);
}
Program: 110664
Project: 110664
Buggy source:
@Override public Object getResult(Environment env) throws EvalException {
  return new MutableList<>(result,env);
}

Fixed version (ground truth):
@Override public Object getResult(Environment env) throws EvalException {
  return MutableList.copyOf(env,result);
}
Program: 110665
Project: 110665
Buggy source:
public MutableList<?> invoke(SkylarkList<?> args,Location loc,Environment env) throws EvalException {
  Iterator<?>[] iterators=new Iterator<?>[args.size()];
  for (int i=0; i < args.size(); i++) {
    iterators[i]=EvalUtils.toIterable(args.get(i),loc,env).iterator();
  }
  List<Tuple<?>> result=new ArrayList<>();
  boolean allHasNext;
  do {
    allHasNext=!args.isEmpty();
    List<Object> elem=Lists.newArrayListWithExpectedSize(args.size());
    for (    Iterator<?> iterator : iterators) {
      if (iterator.hasNext()) {
        elem.add(iterator.next());
      }
 else {
        allHasNext=false;
      }
    }
    if (allHasNext) {
      result.add(Tuple.copyOf(elem));
    }
  }
 while (allHasNext);
  return new MutableList<>(result,env);
}

Fixed version (ground truth):
public MutableList<?> invoke(SkylarkList<?> args,Location loc,Environment env) throws EvalException {
  Iterator<?>[] iterators=new Iterator<?>[args.size()];
  for (int i=0; i < args.size(); i++) {
    iterators[i]=EvalUtils.toIterable(args.get(i),loc,env).iterator();
  }
  List<Tuple<?>> result=new ArrayList<>();
  boolean allHasNext;
  do {
    allHasNext=!args.isEmpty();
    List<Object> elem=Lists.newArrayListWithExpectedSize(args.size());
    for (    Iterator<?> iterator : iterators) {
      if (iterator.hasNext()) {
        elem.add(iterator.next());
      }
 else {
        allHasNext=false;
      }
    }
    if (allHasNext) {
      result.add(Tuple.copyOf(elem));
    }
  }
 while (allHasNext);
  return MutableList.copyOf(env,result);
}
Program: 110666
Project: 110666
Buggy source:
/** 
 * Splits the given string into a list of words, using   {@code separator} as a delimiter.<p>At most  {@code maxSplits} will be performed, going from right to left.
 * @param input The input string.
 * @param separator The separator string.
 * @param maxSplits The maximum number of splits. Negative values mean unlimited splits.
 * @return A list of words
 * @throws IllegalArgumentException
 */
private static MutableList<String> stringRSplit(String input,String separator,int maxSplits,Environment env){
  if (separator.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (maxSplits <= 0) {
    maxSplits=Integer.MAX_VALUE;
  }
  LinkedList<String> result=new LinkedList<>();
  String[] parts=input.split(Pattern.quote(separator),-1);
  int sepLen=separator.length();
  int remainingLength=input.length();
  int splitsSoFar=0;
  for (int pos=parts.length - 1; (pos >= 0) && (splitsSoFar < maxSplits); --pos) {
    String current=parts[pos];
    result.addFirst(current);
    ++splitsSoFar;
    remainingLength-=sepLen + current.length();
  }
  if (splitsSoFar == maxSplits && remainingLength >= 0) {
    result.addFirst(input.substring(0,remainingLength));
  }
  return new MutableList<>(result,env);
}

Fixed version (ground truth):
/** 
 * Splits the given string into a list of words, using   {@code separator} as a delimiter.<p>At most  {@code maxSplits} will be performed, going from right to left.
 * @param input The input string.
 * @param separator The separator string.
 * @param maxSplits The maximum number of splits. Negative values mean unlimited splits.
 * @return A list of words
 * @throws IllegalArgumentException
 */
private static MutableList<String> stringRSplit(String input,String separator,int maxSplits,Environment env){
  if (separator.isEmpty()) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (maxSplits <= 0) {
    maxSplits=Integer.MAX_VALUE;
  }
  LinkedList<String> result=new LinkedList<>();
  String[] parts=input.split(Pattern.quote(separator),-1);
  int sepLen=separator.length();
  int remainingLength=input.length();
  int splitsSoFar=0;
  for (int pos=parts.length - 1; (pos >= 0) && (splitsSoFar < maxSplits); --pos) {
    String current=parts[pos];
    result.addFirst(current);
    ++splitsSoFar;
    remainingLength-=sepLen + current.length();
  }
  if (splitsSoFar == maxSplits && remainingLength >= 0) {
    result.addFirst(input.substring(0,remainingLength));
  }
  return MutableList.copyOf(env,result);
}
Program: 110667
Project: 110667
Buggy source:
/** 
 * Constructs from the given items and the   {@link Mutability} belonging to the given {@link Environment}. If   {@code env} is null, the list is immutable.
 * @deprecated prefer using {@link #copyOf}
 */
@Deprecated public MutableList(Iterable<? extends E> contents,@Nullable Environment env){
  this(contents,0,env == null ? null : env.mutability());
}

Fixed version (ground truth):
private MutableList(Iterable<? extends E> contents,@Nullable Mutability mutability){
  this(contents,0,mutability);
}
Program: 110668
Project: 110668
Buggy source:
/** 
 * Converts an object to a Skylark-compatible type if possible.
 */
public static Object convertToSkylark(Object object,@Nullable Environment env){
  if (object instanceof List && !(object instanceof SkylarkList)) {
    return new MutableList<>((List<?>)object,env);
  }
  if (object instanceof SkylarkValue) {
    return object;
  }
  if (object instanceof Map) {
    return SkylarkDict.<Object,Object>copyOf(env,(Map<?,?>)object);
  }
  return object;
}

Fixed version (ground truth):
/** 
 * Converts an object to a Skylark-compatible type if possible.
 */
public static Object convertToSkylark(Object object,@Nullable Environment env){
  if (object instanceof List && !(object instanceof SkylarkList)) {
    return MutableList.copyOf(env,(List<?>)object);
  }
  if (object instanceof SkylarkValue) {
    return object;
  }
  if (object instanceof Map) {
    return SkylarkDict.<Object,Object>copyOf(env,(Map<?,?>)object);
  }
  return object;
}
Program: 110669
Project: 110669
Buggy source:
@Test public void testSkylarkTypeEquivalence() throws Exception {
  Class<?> emptyTupleClass=Tuple.empty().getClass();
  Class<?> tupleClass=Tuple.of(1,"String_Node_Str","String_Node_Str").getClass();
  Class<?> mutableListClass=new MutableList<>(Tuple.of(1,2,3),env).getClass();
  assertThat(SkylarkType.of(mutableListClass)).isEqualTo(SkylarkType.LIST);
  assertThat(SkylarkType.of(emptyTupleClass)).isEqualTo(SkylarkType.TUPLE);
  assertThat(SkylarkType.of(tupleClass)).isEqualTo(SkylarkType.TUPLE);
  assertThat(SkylarkType.TUPLE).isNotEqualTo(SkylarkType.LIST);
  try {
    SkylarkType.of(ClassObject.class);
    throw new Exception("String_Node_Str");
  }
 catch (  Exception e) {
    assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str");
  }
  assertThat(SkylarkType.of(Artifact.SpecialArtifact.class)).isEqualTo(SkylarkType.of(Artifact.class));
  assertThat(SkylarkType.of(RuleConfiguredTarget.class)).isNotEqualTo(SkylarkType.of(Info.class));
}

Fixed version (ground truth):
@Test public void testSkylarkTypeEquivalence() throws Exception {
  Class<?> emptyTupleClass=Tuple.empty().getClass();
  Class<?> tupleClass=Tuple.of(1,"String_Node_Str","String_Node_Str").getClass();
  Class<?> mutableListClass=MutableList.copyOf(env,Tuple.of(1,2,3)).getClass();
  assertThat(SkylarkType.of(mutableListClass)).isEqualTo(SkylarkType.LIST);
  assertThat(SkylarkType.of(emptyTupleClass)).isEqualTo(SkylarkType.TUPLE);
  assertThat(SkylarkType.of(tupleClass)).isEqualTo(SkylarkType.TUPLE);
  assertThat(SkylarkType.TUPLE).isNotEqualTo(SkylarkType.LIST);
  try {
    SkylarkType.of(ClassObject.class);
    throw new Exception("String_Node_Str");
  }
 catch (  Exception e) {
    assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str");
  }
  assertThat(SkylarkType.of(Artifact.SpecialArtifact.class)).isEqualTo(SkylarkType.of(Artifact.class));
  assertThat(SkylarkType.of(RuleConfiguredTarget.class)).isNotEqualTo(SkylarkType.of(Info.class));
}
Program: 110670
Project: 110670
Buggy source:
@Test public void testGetSkylarkType() throws Exception {
  Class<?> emptyTupleClass=Tuple.empty().getClass();
  Class<?> tupleClass=Tuple.of(1,"String_Node_Str","String_Node_Str").getClass();
  Class<?> mutableListClass=new MutableList<>(Tuple.of(1,2,3),env).getClass();
  assertThat(EvalUtils.getSkylarkType(mutableListClass)).isEqualTo(MutableList.class);
  assertThat(MutableList.class.isAnnotationPresent(SkylarkModule.class)).isTrue();
  assertThat(EvalUtils.getSkylarkType(emptyTupleClass)).isEqualTo(Tuple.class);
  assertThat(EvalUtils.getSkylarkType(tupleClass)).isEqualTo(Tuple.class);
  assertThat(EvalUtils.getSkylarkType(Info.class)).isEqualTo(Info.class);
  try {
    EvalUtils.getSkylarkType(ClassObject.class);
    throw new Exception("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testGetSkylarkType() throws Exception {
  Class<?> emptyTupleClass=Tuple.empty().getClass();
  Class<?> tupleClass=Tuple.of(1,"String_Node_Str","String_Node_Str").getClass();
  Class<?> mutableListClass=MutableList.copyOf(env,Tuple.of(1,2,3)).getClass();
  assertThat(EvalUtils.getSkylarkType(mutableListClass)).isEqualTo(MutableList.class);
  assertThat(MutableList.class.isAnnotationPresent(SkylarkModule.class)).isTrue();
  assertThat(EvalUtils.getSkylarkType(emptyTupleClass)).isEqualTo(Tuple.class);
  assertThat(EvalUtils.getSkylarkType(tupleClass)).isEqualTo(Tuple.class);
  assertThat(EvalUtils.getSkylarkType(Info.class)).isEqualTo(Info.class);
  try {
    EvalUtils.getSkylarkType(ClassObject.class);
    throw new Exception("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
    assertThat(e).hasMessageThat().contains("String_Node_Str" + "String_Node_Str");
  }
}
Program: 110671
Project: 110671
Buggy source:
private void updateClientEnv(List<Map.Entry<String,String>> clientEnvList){
  Preconditions.checkState(clientEnv.isEmpty());
  Collection<Map.Entry<String,String>> env=clientEnvList;
  for (  Map.Entry<String,String> entry : env) {
    clientEnv.put(entry.getKey(),entry.getValue());
  }
  if (commandId == null) {
    commandId=getFromEnvOrGenerate("String_Node_Str");
  }
  if (buildRequestId == null) {
    buildRequestId=getFromEnvOrGenerate("String_Node_Str");
  }
  setCommandIdInCrashData();
}

Fixed version (ground truth):
private void updateClientEnv(List<Map.Entry<String,String>> clientEnvList){
  Preconditions.checkState(clientEnv.isEmpty());
  Collection<Map.Entry<String,String>> env=clientEnvList;
  for (  Map.Entry<String,String> entry : env) {
    clientEnv.put(entry.getKey(),entry.getValue());
  }
  if (commandId == null) {
    commandId=getUuidFromEnvOrGenerate("String_Node_Str");
  }
  if (buildRequestId == null) {
    buildRequestId=getFromEnvOrGenerate("String_Node_Str");
  }
  setCommandIdInCrashData();
}
Program: 110672
Project: 110672
Buggy source:
/** 
 * Returns the UUID that Blaze uses to identify everything logged from the current build request.
 */
public UUID getBuildRequestId(){
  return Preconditions.checkNotNull(buildRequestId);
}

Fixed version (ground truth):
/** 
 * Returns the ID that Blaze uses to identify everything logged from the current build request. TODO(olaola): this should be a UUID, but some existing clients still use arbitrary strings.
 */
public String getBuildRequestId(){
  return Preconditions.checkNotNull(buildRequestId);
}
Program: 110673
Project: 110673
Buggy source:
private UUID getFromEnvOrGenerate(String varName){
  String uuidString=clientEnv.getOrDefault(varName,"String_Node_Str");
  if (!uuidString.isEmpty()) {
    try {
      return UUID.fromString(uuidString);
    }
 catch (    IllegalArgumentException e) {
    }
  }
  return UUID.randomUUID();
}

Fixed version (ground truth):
private String getFromEnvOrGenerate(String varName){
  String id=clientEnv.getOrDefault(varName,"String_Node_Str");
  if (id.isEmpty()) {
    id=UUID.randomUUID().toString();
  }
  return id;
}
Program: 110674
Project: 110674
Buggy source:
/** 
 * Executes the given callable in a loop, retrying on retryable errors, as defined by the current backoff/retry policy. Will raise the last encountered retriable error, or the first non-retriable error. <p>This method never throws   {@link StatusRuntimeException} even if the passed-in Callable does.
 * @param c The callable to execute.
 */
public <T>T execute(Callable<T> c) throws InterruptedException, IOException {
  Backoff backoff=backoffSupplier.get();
  while (true) {
    try {
      return c.call();
    }
 catch (    PassThroughException e) {
      throw (StatusRuntimeException)e.getCause();
    }
catch (    RetryException e) {
      throw e;
    }
catch (    StatusException|StatusRuntimeException e) {
      Status st=Status.fromThrowable(e);
      long delay=backoff.nextDelayMillis();
      if (st.getCode() == Status.Code.CANCELLED && Thread.currentThread().isInterrupted()) {
        Thread.currentThread().interrupt();
        throw new InterruptedException();
      }
      if (delay < 0 || !isRetriable.apply(st)) {
        throw new RetryException(st.asRuntimeException(),backoff.getRetryAttempts());
      }
      sleep(delay);
    }
catch (    Exception e) {
      Throwables.throwIfUnchecked(e);
      Throwables.throwIfInstanceOf(e,IOException.class);
      Throwables.throwIfInstanceOf(e,InterruptedException.class);
      throw new RetryException(e,backoff.getRetryAttempts());
    }
  }
}

Fixed version (ground truth):
/** 
 * Executes the given callable in a loop, retrying on retryable errors, as defined by the current backoff/retry policy. Will raise the last encountered retriable error, or the first non-retriable error. <p>This method never throws   {@link StatusRuntimeException} even if the passed-in Callable does.
 * @param c The callable to execute.
 */
public <T>T execute(Callable<T> c) throws InterruptedException, IOException {
  Backoff backoff=backoffSupplier.get();
  while (true) {
    try {
      return c.call();
    }
 catch (    PassThroughException e) {
      throw (StatusRuntimeException)e.getCause();
    }
catch (    RetryException e) {
      throw e;
    }
catch (    StatusException|StatusRuntimeException e) {
      Status st=Status.fromThrowable(e);
      int attempts=backoff.getRetryAttempts();
      long delay=backoff.nextDelayMillis();
      if (st.getCode() == Status.Code.CANCELLED && Thread.currentThread().isInterrupted()) {
        Thread.currentThread().interrupt();
        throw new InterruptedException();
      }
      if (delay < 0 || !isRetriable.apply(st)) {
        throw new RetryException(st.asRuntimeException(),attempts);
      }
      sleep(delay);
    }
catch (    Exception e) {
      Throwables.throwIfUnchecked(e);
      Throwables.throwIfInstanceOf(e,IOException.class);
      Throwables.throwIfInstanceOf(e,InterruptedException.class);
      throw new RetryException(e,backoff.getRetryAttempts());
    }
  }
}
Program: 110676
Project: 110676
Buggy source:
/** 
 * Creates SymlinkTreeAction instance.
 * @param owner action owner
 * @param inputManifest the input runfiles manifest
 * @param artifactMiddleman the middleman artifact representing all the files the symlinkspoint to (on Windows we need to know if the target of a "symlink" is a directory or a file so we need to build it before)
 * @param outputManifest the generated symlink tree manifest(must have "MANIFEST" base name). Symlink tree root will be set to the artifact's parent directory.
 * @param filesetTree true if this is fileset symlink tree,
 * @param enableRunfiles true is the actual symlink tree needs to be created.
 */
public SymlinkTreeAction(ActionOwner owner,Artifact inputManifest,@Nullable Artifact artifactMiddleman,Artifact outputManifest,boolean filesetTree,ImmutableMap<String,String> shellEnvironment,boolean enableRunfiles){
  super(owner,computeInputs(inputManifest,artifactMiddleman),ImmutableList.of(outputManifest));
  Preconditions.checkArgument(outputManifest.getPath().getBaseName().equals("String_Node_Str"));
  this.inputManifest=inputManifest;
  this.outputManifest=outputManifest;
  this.filesetTree=filesetTree;
  this.shellEnviroment=shellEnvironment;
  this.enableRunfiles=enableRunfiles;
}

Fixed version (ground truth):
/** 
 * Creates SymlinkTreeAction instance.
 * @param owner action owner
 * @param inputManifest the input runfiles manifest
 * @param artifactMiddleman the middleman artifact representing all the files the symlinkspoint to (on Windows we need to know if the target of a "symlink" is a directory or a file so we need to build it before)
 * @param outputManifest the generated symlink tree manifest(must have "MANIFEST" base name). Symlink tree root will be set to the artifact's parent directory.
 * @param filesetTree true if this is fileset symlink tree,
 * @param enableRunfiles true is the actual symlink tree needs to be created.
 */
public SymlinkTreeAction(ActionOwner owner,Artifact inputManifest,@Nullable Artifact artifactMiddleman,Artifact outputManifest,boolean filesetTree,ImmutableMap<String,String> shellEnvironment,boolean enableRunfiles){
  super(owner,computeInputs(inputManifest,artifactMiddleman),ImmutableList.of(outputManifest));
  Preconditions.checkArgument(outputManifest.getPath().getBaseName().equals("String_Node_Str"));
  this.inputManifest=inputManifest;
  this.outputManifest=outputManifest;
  this.filesetTree=filesetTree;
  this.shellEnvironment=shellEnvironment;
  this.enableRunfiles=enableRunfiles;
}
Program: 110677
Project: 110677
Buggy source:
@Override public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  actionExecutionContext.getContext(SymlinkTreeActionContext.class).createSymlinks(this,actionExecutionContext,shellEnviroment,enableRunfiles);
}

Fixed version (ground truth):
@Override public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  actionExecutionContext.getContext(SymlinkTreeActionContext.class).createSymlinks(this,actionExecutionContext,shellEnvironment,enableRunfiles);
}
Program: 110678
Project: 110678
Buggy source:
/** 
 * Returns true if the linking of this target is used for a native dependecy library.
 */
public boolean isNativeDeps(){
  return this.isNativeDeps;
}

Fixed version (ground truth):
/** 
 * Returns true if the linking of this target is used for a native dependency library.
 */
public boolean isNativeDeps(){
  return this.isNativeDeps;
}
Program: 110679
Project: 110679
Buggy source:
@Test public void testAndroidSplitTransitionWithInvalidCpu() 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","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","String_Node_Str","String_Node_Str");
  BazelMockAndroidSupport.setupNdk(mockToolsConfig);
  useConfiguration("String_Node_Str","String_Node_Str");
  try {
    getConfiguredTarget("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  AssertionError e) {
    assertThat(e.getMessage()).contains("String_Node_Str");
  }
}

Fixed version (ground truth):
@Test public void testAndroidSplitTransitionWithInvalidCpu() 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","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","String_Node_Str","String_Node_Str");
  BazelMockAndroidSupport.setupNdk(mockToolsConfig);
  useConfiguration("String_Node_Str","String_Node_Str");
  AssertionError noToolchainError=expectThrows(AssertionError.class,() -> getConfiguredTarget("String_Node_Str"));
  assertThat(noToolchainError).hasMessageThat().contains("String_Node_Str");
}
Program: 110680
Project: 110680
Buggy source:
/** 
 * Returns the *cached* short hostname (computed at most once per the lifetime of a server). Can take seconds to complete when the cache is cold.
 */
public static String getCachedShortHostName(){
  if (hostname == null) {
synchronized (NetUtil.class) {
      if (hostname == null) {
        hostname=computeShortHostName();
      }
    }
  }
  return computeShortHostName();
}

Fixed version (ground truth):
/** 
 * Returns the *cached* short hostname (computed at most once per the lifetime of a server). Can take seconds to complete when the cache is cold.
 */
public static String getCachedShortHostName(){
  if (hostname == null) {
synchronized (NetUtil.class) {
      if (hostname == null) {
        hostname=computeShortHostName();
      }
    }
  }
  return hostname;
}
Program: 110681
Project: 110681
Buggy source:
@Nullable public ActionAnalysisMetadata getGeneratingAction(Artifact artifact){
  return generatingActions.get(artifact);
}

Fixed version (ground truth):
@Nullable @Override public ActionAnalysisMetadata getGeneratingAction(Artifact artifact){
  return generatingActions.get(artifact);
}
Program: 110682
Project: 110682
Buggy source:
/** 
 * Returns true iff this is a source Artifact as determined by its path and root relationships. Note that this will report all Artifacts in the output tree, including in the include symlink tree, as non-source.
 */
@SkylarkCallable(name="String_Node_Str",structField=true,doc="String_Node_Str") public final boolean isSourceArtifact(){
  return execPath == rootRelativePath;
}

Fixed version (ground truth):
/** 
 * Returns true iff this is a source Artifact as determined by its path and root relationships. Note that this will report all Artifacts in the output tree, including in the include symlink tree, as non-source.
 */
@SkylarkCallable(name="String_Node_Str",structField=true,doc="String_Node_Str") @SuppressWarnings("String_Node_Str") public final boolean isSourceArtifact(){
  return execPath == rootRelativePath;
}
Program: 110684
Project: 110684
Buggy source:
@Override public void initializeRuleClasses(ConfiguredRuleClassProvider.Builder builder){
  for (  Entry<String,RepositoryFunction> handler : repositoryHandlers.entrySet()) {
    RuleDefinition ruleDefinition;
    try {
      ruleDefinition=handler.getValue().getRuleDefinition().newInstance();
    }
 catch (    IllegalAccessException|InstantiationException e) {
      throw new IllegalStateException(e);
    }
    builder.addRuleDefinition(ruleDefinition);
  }
  builder.addSkylarkModule(SkylarkRepositoryModule.class);
}

Fixed version (ground truth):
@Override public void initializeRuleClasses(ConfiguredRuleClassProvider.Builder builder){
  for (  Entry<String,RepositoryFunction> handler : repositoryHandlers.entrySet()) {
    RuleDefinition ruleDefinition;
    try {
      ruleDefinition=handler.getValue().getRuleDefinition().getDeclaredConstructor().newInstance();
    }
 catch (    IllegalAccessException|InstantiationException|NoSuchMethodException|InvocationTargetException e) {
      throw new IllegalStateException(e);
    }
    builder.addRuleDefinition(ruleDefinition);
  }
  builder.addSkylarkModule(SkylarkRepositoryModule.class);
}
Program: 110685
Project: 110685
Buggy source:
@Override public boolean equals(Object other){
  return this == other || other instanceof DecompressorValue && directory.equals(((DecompressorValue)other).directory);
}

Fixed version (ground truth):
@Override public boolean equals(Object other){
  return this == other || (other instanceof DecompressorValue && directory.equals(((DecompressorValue)other).directory));
}
Program: 110686
Project: 110686
Buggy source:
private static NdkRelease getNdkRelease(Path directory,Environment env) throws RepositoryFunctionException, InterruptedException {
  Path releaseFilePath=directory.getRelative("String_Node_Str");
  if (!releaseFilePath.exists()) {
    releaseFilePath=directory.getRelative("String_Node_Str");
  }
  SkyKey releaseFileKey=FileValue.key(RootedPath.toRootedPath(directory,releaseFilePath));
  String releaseFileContent;
  try {
    env.getValueOrThrow(releaseFileKey,IOException.class,FileSymlinkException.class,InconsistentFilesystemException.class);
    releaseFileContent=new String(FileSystemUtils.readContent(releaseFilePath));
  }
 catch (  IOException|FileSymlinkException|InconsistentFilesystemException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + releaseFilePath.getBaseName() + "String_Node_Str"+ e.getMessage()),Transience.PERSISTENT);
  }
  return NdkRelease.create(releaseFileContent.trim());
}

Fixed version (ground truth):
private static NdkRelease getNdkRelease(Path directory,Environment env) throws RepositoryFunctionException, InterruptedException {
  Path releaseFilePath=directory.getRelative("String_Node_Str");
  if (!releaseFilePath.exists()) {
    releaseFilePath=directory.getRelative("String_Node_Str");
  }
  SkyKey releaseFileKey=FileValue.key(RootedPath.toRootedPath(directory,releaseFilePath));
  String releaseFileContent;
  try {
    env.getValueOrThrow(releaseFileKey,IOException.class,FileSymlinkException.class,InconsistentFilesystemException.class);
    releaseFileContent=new String(FileSystemUtils.readContent(releaseFilePath),StandardCharsets.UTF_8);
  }
 catch (  IOException|FileSymlinkException|InconsistentFilesystemException e) {
    throw new RepositoryFunctionException(new IOException("String_Node_Str" + releaseFilePath.getBaseName() + "String_Node_Str"+ e.getMessage()),Transience.PERSISTENT);
  }
  return NdkRelease.create(releaseFileContent.trim());
}
Program: 110687
Project: 110687
Buggy source:
@Override public ConfiguredTarget create(RuleContext ruleContext) throws RuleErrorException {
  ImmutableList<Artifact> srcs=ruleContext.getPrerequisiteArtifacts("String_Node_Str",Mode.TARGET).list();
  if (srcs.size() != 1) {
    ruleContext.attributeError("String_Node_Str","String_Node_Str");
    return null;
  }
  Artifact symlink=ruleContext.createOutputArtifact();
  Artifact src=srcs.get(0);
  ruleContext.registerAction(new ExecutableSymlinkAction(ruleContext.getActionOwner(),src,symlink));
  NestedSetBuilder<Artifact> filesToBuildBuilder=NestedSetBuilder.<Artifact>stableOrder().add(src).add(symlink);
  Runfiles.Builder runfilesBuilder=new Runfiles.Builder(ruleContext.getWorkspaceName(),ruleContext.getConfiguration().legacyExternalRunfiles());
  Artifact mainExecutable=(OS.getCurrent() == OS.WINDOWS) ? launcherForWindows(ruleContext,symlink,src) : symlink;
  if (symlink != mainExecutable) {
    filesToBuildBuilder.add(mainExecutable);
    runfilesBuilder.addArtifact(symlink);
  }
  NestedSet<Artifact> filesToBuild=filesToBuildBuilder.build();
  Runfiles runfiles=runfilesBuilder.addTransitiveArtifacts(filesToBuild).addRunfiles(ruleContext,RunfilesProvider.DEFAULT_RUNFILES).build();
  RunfilesSupport runfilesSupport=RunfilesSupport.withExecutable(ruleContext,runfiles,mainExecutable);
  return new RuleConfiguredTargetBuilder(ruleContext).setFilesToBuild(filesToBuild).setRunfilesSupport(runfilesSupport,mainExecutable).addProvider(RunfilesProvider.class,RunfilesProvider.simple(runfiles)).build();
}

Fixed version (ground truth):
@Override public ConfiguredTarget create(RuleContext ruleContext) throws RuleErrorException {
  ImmutableList<Artifact> srcs=ruleContext.getPrerequisiteArtifacts("String_Node_Str",Mode.TARGET).list();
  if (srcs.size() != 1) {
    ruleContext.attributeError("String_Node_Str","String_Node_Str");
    return null;
  }
  Artifact symlink=ruleContext.createOutputArtifact();
  Artifact src=srcs.get(0);
  ruleContext.registerAction(new ExecutableSymlinkAction(ruleContext.getActionOwner(),src,symlink));
  NestedSetBuilder<Artifact> filesToBuildBuilder=NestedSetBuilder.<Artifact>stableOrder().add(src).add(symlink);
  Runfiles.Builder runfilesBuilder=new Runfiles.Builder(ruleContext.getWorkspaceName(),ruleContext.getConfiguration().legacyExternalRunfiles());
  Artifact mainExecutable=(OS.getCurrent() == OS.WINDOWS) ? launcherForWindows(ruleContext,symlink,src) : symlink;
  if (!symlink.equals(mainExecutable)) {
    filesToBuildBuilder.add(mainExecutable);
    runfilesBuilder.addArtifact(symlink);
  }
  NestedSet<Artifact> filesToBuild=filesToBuildBuilder.build();
  Runfiles runfiles=runfilesBuilder.addTransitiveArtifacts(filesToBuild).addRunfiles(ruleContext,RunfilesProvider.DEFAULT_RUNFILES).build();
  RunfilesSupport runfilesSupport=RunfilesSupport.withExecutable(ruleContext,runfiles,mainExecutable);
  return new RuleConfiguredTargetBuilder(ruleContext).setFilesToBuild(filesToBuild).setRunfilesSupport(runfilesSupport,mainExecutable).addProvider(RunfilesProvider.class,RunfilesProvider.simple(runfiles)).build();
}
Program: 110688
Project: 110688
Buggy source:
public Collection<BuildEventId> getChildrenEvents(){
  return event.getChildrenEvents();
}

Fixed version (ground truth):
@Override public Collection<BuildEventId> getChildrenEvents(){
  return event.getChildrenEvents();
}
Program: 110689
Project: 110689
Buggy source:
public BuildEventId getEventId(){
  return event.getEventId();
}

Fixed version (ground truth):
@Override public BuildEventId getEventId(){
  return event.getEventId();
}
Program: 110690
Project: 110690
Buggy source:
public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters converters){
  return BuildEventStreamProtos.BuildEvent.newBuilder(event.asStreamProto(converters)).setLastMessage(true).build();
}

Fixed version (ground truth):
@Override public BuildEventStreamProtos.BuildEvent asStreamProto(BuildEventConverters converters){
  return BuildEventStreamProtos.BuildEvent.newBuilder(event.asStreamProto(converters)).setLastMessage(true).build();
}
Program: 110691
Project: 110691
Buggy source:
@Override public synchronized void sendBuildEvent(BuildEvent event,final ArtifactGroupNamer namer){
  BuildEventConverters converters=new BuildEventConverters(){
    @Override public PathConverter pathConverter(){
      return pathConverter;
    }
    @Override public ArtifactGroupNamer artifactGroupNamer(){
      return namer;
    }
  }
;
  String protoJsonRepresentation;
  try {
    protoJsonRepresentation=JsonFormat.printer().omittingInsignificantWhitespace().print(event.asStreamProto(converters)) + "String_Node_Str";
  }
 catch (  InvalidProtocolBufferException e) {
    protoJsonRepresentation="String_Node_Str";
  }
  writeData(protoJsonRepresentation.getBytes());
}

Fixed version (ground truth):
@Override public synchronized void sendBuildEvent(BuildEvent event,final ArtifactGroupNamer namer){
  BuildEventConverters converters=new BuildEventConverters(){
    @Override public PathConverter pathConverter(){
      return pathConverter;
    }
    @Override public ArtifactGroupNamer artifactGroupNamer(){
      return namer;
    }
  }
;
  String protoJsonRepresentation;
  try {
    protoJsonRepresentation=JsonFormat.printer().omittingInsignificantWhitespace().print(event.asStreamProto(converters)) + "String_Node_Str";
  }
 catch (  InvalidProtocolBufferException e) {
    protoJsonRepresentation="String_Node_Str";
  }
  writeData(protoJsonRepresentation.getBytes(StandardCharsets.UTF_8));
}
Program: 110692
Project: 110692
Buggy source:
@Override public synchronized void sendBuildEvent(BuildEvent event,final ArtifactGroupNamer namer){
  BuildEventConverters converters=new BuildEventConverters(){
    @Override public PathConverter pathConverter(){
      return pathConverter;
    }
    @Override public ArtifactGroupNamer artifactGroupNamer(){
      return namer;
    }
  }
;
  String protoTextRepresentation=TextFormat.printToString(event.asStreamProto(converters));
  String line="String_Node_Str" + protoTextRepresentation + "String_Node_Str";
  writeData(line.getBytes());
}

Fixed version (ground truth):
@Override public synchronized void sendBuildEvent(BuildEvent event,final ArtifactGroupNamer namer){
  BuildEventConverters converters=new BuildEventConverters(){
    @Override public PathConverter pathConverter(){
      return pathConverter;
    }
    @Override public ArtifactGroupNamer artifactGroupNamer(){
      return namer;
    }
  }
;
  String protoTextRepresentation=TextFormat.printToString(event.asStreamProto(converters));
  String line="String_Node_Str" + protoTextRepresentation + "String_Node_Str";
  writeData(line.getBytes(StandardCharsets.UTF_8));
}
Program: 110693
Project: 110693
Buggy source:
ActionExecutionInactivityWatchdog.InactivityMonitor createInactivityMonitor(final ActionExecutionStatusReporter statusReporter){
  return new ActionExecutionInactivityWatchdog.InactivityMonitor(){
    @Override public boolean hasStarted(){
      return !enqueuedActions.isEmpty();
    }
    @Override public int getPending(){
      return statusReporter.getCount();
    }
    @Override public int waitForNextCompletion(    int timeoutMilliseconds) throws InterruptedException {
synchronized (activityIndicator) {
        int before=completedActions.size();
        long startTime=BlazeClock.instance().currentTimeMillis();
        while (true) {
          activityIndicator.wait(timeoutMilliseconds);
          int completed=completedActions.size() - before;
          long now=0;
          if (completed > 0 || (startTime + timeoutMilliseconds) <= (now=BlazeClock.instance().currentTimeMillis())) {
            return completed;
          }
 else {
            timeoutMilliseconds-=now - startTime;
            startTime=now;
          }
        }
      }
    }
  }
;
}

Fixed version (ground truth):
ActionExecutionInactivityWatchdog.InactivityMonitor createInactivityMonitor(final ActionExecutionStatusReporter statusReporter){
  return new ActionExecutionInactivityWatchdog.InactivityMonitor(){
    @Override public boolean hasStarted(){
      return !enqueuedActions.isEmpty();
    }
    @Override public int getPending(){
      return statusReporter.getCount();
    }
    @Override public int waitForNextCompletion(    int timeoutMilliseconds) throws InterruptedException {
      long rest=timeoutMilliseconds;
synchronized (activityIndicator) {
        int before=completedActions.size();
        long startTime=BlazeClock.instance().currentTimeMillis();
        while (true) {
          activityIndicator.wait(rest);
          int completed=completedActions.size() - before;
          long now=0;
          if (completed > 0 || (startTime + rest) <= (now=BlazeClock.instance().currentTimeMillis())) {
            return completed;
          }
 else {
            rest-=now - startTime;
            startTime=now;
          }
        }
      }
    }
  }
;
}
Program: 110694
Project: 110694
Buggy source:
@Override public int waitForNextCompletion(int timeoutMilliseconds) throws InterruptedException {
synchronized (activityIndicator) {
    int before=completedActions.size();
    long startTime=BlazeClock.instance().currentTimeMillis();
    while (true) {
      activityIndicator.wait(timeoutMilliseconds);
      int completed=completedActions.size() - before;
      long now=0;
      if (completed > 0 || (startTime + timeoutMilliseconds) <= (now=BlazeClock.instance().currentTimeMillis())) {
        return completed;
      }
 else {
        timeoutMilliseconds-=now - startTime;
        startTime=now;
      }
    }
  }
}

Fixed version (ground truth):
@Override public int waitForNextCompletion(int timeoutMilliseconds) throws InterruptedException {
  long rest=timeoutMilliseconds;
synchronized (activityIndicator) {
    int before=completedActions.size();
    long startTime=BlazeClock.instance().currentTimeMillis();
    while (true) {
      activityIndicator.wait(rest);
      int completed=completedActions.size() - before;
      long now=0;
      if (completed > 0 || (startTime + rest) <= (now=BlazeClock.instance().currentTimeMillis())) {
        return completed;
      }
 else {
        rest-=now - startTime;
        startTime=now;
      }
    }
  }
}
Program: 110695
Project: 110695
Buggy source:
private ExplanationHandler(OutputStream log,String optionsDescription){
  this.log=new PrintWriter(log);
  this.log.println("String_Node_Str" + optionsDescription);
}

Fixed version (ground truth):
private ExplanationHandler(OutputStream log,String optionsDescription){
  this.log=new PrintWriter(new OutputStreamWriter(log,StandardCharsets.UTF_8));
  this.log.println("String_Node_Str" + optionsDescription);
}
Program: 110696
Project: 110696
Buggy source:
/** 
 * See partition(Collection, Comparator).
 */
public static <T>Collection<Set<T>> partition(Collection<T> elements,final EquivalenceRelation<T> equivalenceRelation){
  return partition(elements,(Comparator<T>)equivalenceRelation::compare);
}

Fixed version (ground truth):
/** 
 * See partition(Collection, Comparator).
 */
public static <T>Collection<Set<T>> partition(Collection<T> elements,final EquivalenceRelation<T> equivalenceRelation){
  return partitionWithComparator(elements,(Comparator<T>)equivalenceRelation::compare);
}
Program: 110697
Project: 110697
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  ImmutableSharedKeyMap<?,?> that=(ImmutableSharedKeyMap<?,?>)o;
  return offsetTable == that.offsetTable && Arrays.equals(values,that.values);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  ImmutableSharedKeyMap<?,?> that=(ImmutableSharedKeyMap<?,?>)o;
  return offsetTable == that.offsetTable && Arrays.equals(values,that.values);
}
Program: 110698
Project: 110698
Buggy source:
/** 
 * Perform a depth-first traversal of   {@code children}, tracking visited arrays in   {@code sets} and visited leaves in {@code members}.  We also record which edges were taken in   {@code this.memo} starting at {@code pos}. Returns the final value of   {@code pos}.
 */
private int walk(CompactHashSet<Object> sets,CompactHashSet<E> members,Object[] children,int pos){
  for (  Object child : children) {
    if ((pos >> 3) >= memo.length) {
      memo=Arrays.copyOf(memo,memo.length * 2);
    }
    if (child instanceof Object[]) {
      if (sets.add(child)) {
        int prepos=pos;
        int presize=members.size();
        pos=walk(sets,members,(Object[])child,pos + 1);
        if (presize < members.size()) {
          memo[prepos >> 3]|=1 << (prepos & 7);
        }
 else {
          pos=prepos + 1;
        }
      }
 else {
        ++pos;
      }
    }
 else {
      if (members.add((E)child)) {
        memo[pos >> 3]|=1 << (pos & 7);
      }
      ++pos;
    }
  }
  return pos;
}

Fixed version (ground truth):
/** 
 * Perform a depth-first traversal of   {@code children}, tracking visited arrays in   {@code sets} and visited leaves in {@code members}.  We also record which edges were taken in   {@code this.memo} starting at {@code pos}. Returns the final value of   {@code pos}.
 */
private int walk(CompactHashSet<Object> sets,CompactHashSet<E> members,Object[] children,int pos){
  for (  Object child : children) {
    if ((pos >> 3) >= memo.length) {
      memo=Arrays.copyOf(memo,memo.length * 2);
    }
    if (child instanceof Object[]) {
      if (sets.add(child)) {
        int prepos=pos;
        int presize=members.size();
        pos=walk(sets,members,(Object[])child,pos + 1);
        if (presize < members.size()) {
          memo[prepos >> 3]|=(byte)(1 << (prepos & 7));
        }
 else {
          pos=prepos + 1;
        }
      }
 else {
        ++pos;
      }
    }
 else {
      if (members.add((E)child)) {
        memo[pos >> 3]|=(byte)(1 << (pos & 7));
      }
      ++pos;
    }
  }
  return pos;
}
Program: 110699
Project: 110699
Buggy source:
public boolean isLicenseSpecified(){
  return license != null && license != License.NO_LICENSE;
}

Fixed version (ground truth):
public boolean isLicenseSpecified(){
  return license != null && license.isSpecified();
}
Program: 110700
Project: 110700
Buggy source:
/** 
 * A simple equals implementation leveraging the support built into Set that delegates to its contents.
 */
@Override public boolean equals(Object o){
  return o == this || o instanceof License && ((License)o).licenseTypes.equals(this.licenseTypes) && ((License)o).exceptions.equals(this.exceptions);
}

Fixed version (ground truth):
/** 
 * A simple equals implementation leveraging the support built into Set that delegates to its contents.
 */
@Override public boolean equals(Object o){
  return o == this || (o instanceof License && ((License)o).licenseTypes.equals(this.licenseTypes) && ((License)o).exceptions.equals(this.exceptions));
}