nus-yam/ex-repair huggingface dataset:
Program: 110996
Project: 110996
Buggy source:
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (parsingMode != PYTHON) {
    reportError(lexer.createLocation(start,token.right),"String_Node_Str" + blockToken + "String_Node_Str"+ "String_Node_Str");
  }
  expect(TokenKind.COLON);
  skipSuite();
}

Fixed version (ground truth):
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (parsingMode != PYTHON) {
    String msg=ILLEGAL_BLOCK_KEYWORDS.containsKey(blockToken.kind) ? String.format("String_Node_Str",ILLEGAL_BLOCK_KEYWORDS.get(blockToken.kind)) : "String_Node_Str";
    reportError(lexer.createLocation(start,token.right),String.format("String_Node_Str",blockToken,msg));
  }
  expect(TokenKind.COLON);
  skipSuite();
}
Program: 110997
Project: 110997
Buggy source:
@Override public ActionExecutionException toActionExecutionException(String messagePrefix,boolean verboseFailures,Action action){
  if (verboseFailures) {
    return new ActionExecutionException(messagePrefix + "String_Node_Str" + getMessage(),this,action,isCatastrophic());
  }
 else {
    return new ActionExecutionException(messagePrefix + "String_Node_Str" + getMessage(),action,isCatastrophic());
  }
}

Fixed version (ground truth):
@Override public ActionExecutionException toActionExecutionException(String messagePrefix,boolean verboseFailures,Action action){
  if (verboseFailures) {
    return new ActionExecutionException(messagePrefix + "String_Node_Str" + getMessage()+ "String_Node_Str",this,action,isCatastrophic());
  }
 else {
    return new ActionExecutionException(messagePrefix + "String_Node_Str" + getMessage()+ "String_Node_Str",action,isCatastrophic());
  }
}
Program: 110998
Project: 110998
Buggy source:
/** 
 * Generates an empty manifest for a rule that does not directly specify resources. <p><strong>Note:</strong> This generated manifest can then be used as the primary manifest when merging with dependencies.
 * @return the generated ApplicationManifest
 */
public static ApplicationManifest generatedManifest(RuleContext ruleContext){
  Artifact generatedManifest=ruleContext.getUniqueDirectoryArtifact(ruleContext.getRule().getName() + "String_Node_Str",new PathFragment("String_Node_Str"),ruleContext.getBinOrGenfilesDirectory());
  String manifestPackage;
  if (ruleContext.attributes().isAttributeValueExplicitlySpecified("String_Node_Str")) {
    manifestPackage=ruleContext.attributes().get("String_Node_Str",Type.STRING);
  }
 else {
    manifestPackage=JavaUtil.getJavaFullClassname(ruleContext.getRule().getPackage().getNameFragment());
  }
  String contents=Joiner.on("String_Node_Str").join("String_Node_Str","String_Node_Str","String_Node_Str" + manifestPackage + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  ruleContext.getAnalysisEnvironment().registerAction(new FileWriteAction(ruleContext.getActionOwner(),generatedManifest,contents,false));
  return new ApplicationManifest(generatedManifest);
}

Fixed version (ground truth):
/** 
 * Generates an empty manifest for a rule that does not directly specify resources. <p><strong>Note:</strong> This generated manifest can then be used as the primary manifest when merging with dependencies.
 * @return the generated ApplicationManifest
 */
public static ApplicationManifest generatedManifest(RuleContext ruleContext){
  Artifact generatedManifest=ruleContext.getUniqueDirectoryArtifact(ruleContext.getRule().getName() + "String_Node_Str",new PathFragment("String_Node_Str"),ruleContext.getBinOrGenfilesDirectory());
  String manifestPackage=AndroidCommon.getJavaPackage(ruleContext);
  String contents=Joiner.on("String_Node_Str").join("String_Node_Str","String_Node_Str","String_Node_Str" + manifestPackage + "String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  ruleContext.getAnalysisEnvironment().registerAction(new FileWriteAction(ruleContext.getActionOwner(),generatedManifest,contents,false));
  return new ApplicationManifest(generatedManifest);
}
Program: 111003
Project: 111003
Buggy source:
private void parseStatement(List<Statement> list,boolean isTopLevel){
  if (token.kind == TokenKind.DEF && parsingMode == SKYLARK) {
    if (!isTopLevel) {
      reportError(lexer.createLocation(token.left,token.right),"String_Node_Str");
    }
    parseFunctionDefStatement(list);
  }
 else   if (token.kind == TokenKind.IF && parsingMode == SKYLARK) {
    list.add(parseIfStatement());
  }
 else   if (token.kind == TokenKind.FOR && parsingMode == SKYLARK) {
    if (isTopLevel) {
      reportError(lexer.createLocation(token.left,token.right),"String_Node_Str");
    }
    parseForStatement(list);
  }
 else   if (token.kind == TokenKind.IF || token.kind == TokenKind.ELSE || token.kind == TokenKind.FOR || token.kind == TokenKind.CLASS || token.kind == TokenKind.DEF || token.kind == TokenKind.TRY) {
    skipBlock();
  }
 else {
    parseSimpleStatement(list);
  }
}

Fixed version (ground truth):
private void parseStatement(List<Statement> list,boolean isTopLevel){
  if (token.kind == TokenKind.DEF && parsingMode == SKYLARK) {
    if (!isTopLevel) {
      reportError(lexer.createLocation(token.left,token.right),"String_Node_Str");
    }
    parseFunctionDefStatement(list);
  }
 else   if (token.kind == TokenKind.IF && parsingMode == SKYLARK) {
    list.add(parseIfStatement());
  }
 else   if (token.kind == TokenKind.FOR && parsingMode == SKYLARK) {
    if (isTopLevel) {
      reportError(lexer.createLocation(token.left,token.right),"String_Node_Str");
    }
    parseForStatement(list);
  }
 else   if (BLOCK_STARTING_SET.contains(token.kind)) {
    skipBlock();
  }
 else {
    parseSimpleStatement(list);
  }
}
Program: 111004
Project: 111004
Buggy source:
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (parsingMode == BUILD) {
    reportError(lexer.createLocation(start,token.right),"String_Node_Str" + blockToken + "String_Node_Str"+ "String_Node_Str");
  }
  expect(TokenKind.COLON);
  skipSuite();
}

Fixed version (ground truth):
private void skipBlock(){
  int start=token.left;
  Token blockToken=token;
  syncTo(EnumSet.of(TokenKind.COLON,TokenKind.EOF));
  if (parsingMode != PYTHON) {
    reportError(lexer.createLocation(start,token.right),"String_Node_Str" + blockToken + "String_Node_Str"+ "String_Node_Str");
  }
  expect(TokenKind.COLON);
  skipSuite();
}
Program: 111005
Project: 111005
Buggy source:
private Object invokeJavaMethod(Object obj,Class<?> objClass,String methodName,List<Object> args,boolean hasKwArgs) throws EvalException {
  MethodDescriptor matchingMethod=null;
  List<MethodDescriptor> methods=getMethods(objClass,methodName,args.size(),getLocation());
  if (methods != null) {
    if (hasKwArgs) {
      throw new EvalException(func.getLocation(),String.format("String_Node_Str" + "String_Node_Str",func.getName(),EvalUtils.getDataTypeNameFromClass(objClass)));
    }
    for (    MethodDescriptor method : methods) {
      Class<?>[] params=method.getMethod().getParameterTypes();
      int i=0;
      boolean matching=true;
      for (      Class<?> param : params) {
        if (!param.isAssignableFrom(args.get(i).getClass())) {
          matching=false;
          break;
        }
        i++;
      }
      if (matching) {
        if (matchingMethod == null) {
          matchingMethod=method;
        }
 else {
          throw new EvalException(func.getLocation(),"String_Node_Str" + formatMethod(methodName,args) + "String_Node_Str"+ EvalUtils.getDataTypeNameFromClass(objClass));
        }
      }
    }
  }
  if (matchingMethod != null && !matchingMethod.getAnnotation().structField()) {
    return callMethod(matchingMethod,methodName,obj,args.toArray(),getLocation());
  }
 else {
    throw new EvalException(getLocation(),"String_Node_Str" + formatMethod(methodName,args) + "String_Node_Str"+ EvalUtils.getDataTypeNameFromClass(objClass));
  }
}

Fixed version (ground truth):
private Object invokeJavaMethod(Object obj,Class<?> objClass,String methodName,List<Object> args,boolean hasKwArgs) throws EvalException {
  MethodDescriptor matchingMethod=null;
  List<MethodDescriptor> methods=getMethods(objClass,methodName,args.size(),getLocation());
  if (methods != null) {
    if (hasKwArgs) {
      throw new EvalException(func.getLocation(),String.format("String_Node_Str" + "String_Node_Str",func.getName(),EvalUtils.getDataTypeNameFromClass(objClass)));
    }
    for (    MethodDescriptor method : methods) {
      Class<?>[] params=method.getMethod().getParameterTypes();
      int i=0;
      boolean matching=true;
      for (      Class<?> param : params) {
        if (!param.isAssignableFrom(args.get(i).getClass())) {
          matching=false;
          break;
        }
        i++;
      }
      if (matching) {
        if (matchingMethod == null) {
          matchingMethod=method;
        }
 else {
          throw new EvalException(func.getLocation(),String.format("String_Node_Str",EvalUtils.getDataTypeNameFromClass(objClass),formatMethod(args)));
        }
      }
    }
  }
  if (matchingMethod != null && !matchingMethod.getAnnotation().structField()) {
    return callMethod(matchingMethod,methodName,obj,args.toArray(),getLocation());
  }
 else {
    throw new EvalException(getLocation(),String.format("String_Node_Str",EvalUtils.getDataTypeNameFromClass(objClass),formatMethod(args)));
  }
}
Program: 111006
Project: 111006
Buggy source:
private String formatMethod(String methodName,List<Object> args){
  StringBuilder sb=new StringBuilder();
  sb.append(methodName).append("String_Node_Str");
  boolean first=true;
  for (  Object obj : args) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(EvalUtils.getDataTypeName(obj));
    first=false;
  }
  return sb.append("String_Node_Str").toString();
}

Fixed version (ground truth):
private String formatMethod(List<Object> args){
  StringBuilder sb=new StringBuilder();
  sb.append(functionName()).append("String_Node_Str");
  boolean first=true;
  for (  Object obj : args) {
    if (!first) {
      sb.append("String_Node_Str");
    }
    sb.append(EvalUtils.getDataTypeName(obj));
    first=false;
  }
  return sb.append("String_Node_Str").toString();
}
Program: 111007
Project: 111007
Buggy source:
private String functionName(){
  String name=func.getName();
  if (name.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (name.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str" + name + "String_Node_Str";
  }
}

Fixed version (ground truth):
private String functionName(){
  String name=func.getName();
  if (name.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (name.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str" + name;
  }
}
Program: 111008
Project: 111008
Buggy source:
/** 
 * Entry-point to parser that parses a build file with comments.  All errors encountered during parsing are reported via "reporter".  Enable Skylark extensions that are not part of the core BUILD language.
 */
public static ParseResult parseFileForSkylark(Lexer lexer,EventHandler eventHandler,CachingPackageLocator locator,ValidationEnvironment validationEnvironment){
  Parser parser=new Parser(lexer,eventHandler,locator,SKYLARK);
  List<Statement> statements=parser.parseFileInput();
  boolean hasSemanticalErrors=false;
  try {
    validationEnvironment.validateAst(statements);
  }
 catch (  EvalException e) {
    if (!e.isDueToIncompleteAST()) {
      eventHandler.handle(Event.error(e.getLocation(),e.getMessage()));
    }
    hasSemanticalErrors=true;
  }
  return new ParseResult(statements,parser.comments,parser.errorsCount > 0 || lexer.containsErrors() || hasSemanticalErrors);
}

Fixed version (ground truth):
/** 
 * Entry-point to parser that parses a build file with comments.  All errors encountered during parsing are reported via "reporter".  Enable Skylark extensions that are not part of the core BUILD language.
 */
public static ParseResult parseFileForSkylark(Lexer lexer,EventHandler eventHandler,CachingPackageLocator locator,@Nullable ValidationEnvironment validationEnvironment){
  Parser parser=new Parser(lexer,eventHandler,locator,SKYLARK);
  List<Statement> statements=parser.parseFileInput();
  boolean hasSemanticalErrors=false;
  try {
    if (validationEnvironment != null) {
      validationEnvironment.validateAst(statements);
    }
  }
 catch (  EvalException e) {
    if (!e.isDueToIncompleteAST()) {
      eventHandler.handle(Event.error(e.getLocation(),e.getMessage()));
    }
    hasSemanticalErrors=true;
  }
  return new ParseResult(statements,parser.comments,parser.errorsCount > 0 || lexer.containsErrors() || hasSemanticalErrors);
}
Program: 111010
Project: 111010
Buggy source:
/** 
 * The debug symbol bundle file which contains debug symbols generated by dsymutil.
 */
public Artifact dsymBundle(){
  return appendExtension(TMP_DSYM_BUNDLE_SUFFIX);
}

Fixed version (ground truth):
/** 
 * The zipped debug symbol bundle file which contains debug symbols generated by dsymutil.
 */
public Artifact dsymBundle(){
  return appendExtension(TMP_DSYM_BUNDLE_SUFFIX);
}
Program: 111012
Project: 111012
Buggy source:
private Map<String,BaseFunction> getNamespaceFunctions(Class<?> nameSpace){
  if (disabledNameSpaces.contains(nameSpace) || (parent != null && parent.disabledNameSpaces.contains(nameSpace))) {
    return null;
  }
  Environment topLevel=this;
  while (topLevel.parent != null) {
    topLevel=topLevel.parent;
  }
  return topLevel.functions.get(nameSpace);
}

Fixed version (ground truth):
private Map<String,BaseFunction> getNamespaceFunctions(Class<?> nameSpace){
  nameSpace=getCanonicalRepresentation(nameSpace);
  if (disabledNameSpaces.contains(nameSpace) || (parent != null && parent.disabledNameSpaces.contains(nameSpace))) {
    return null;
  }
  Environment topLevel=this;
  while (topLevel.parent != null) {
    topLevel=topLevel.parent;
  }
  return topLevel.functions.get(nameSpace);
}
Program: 111013
Project: 111013
Buggy source:
/** 
 * Registers a function with namespace to this global environment.
 */
public void registerFunction(Class<?> nameSpace,String name,BaseFunction function){
  Preconditions.checkArgument(parent == null);
  if (!functions.containsKey(nameSpace)) {
    functions.put(nameSpace,new HashMap<String,BaseFunction>());
  }
  functions.get(nameSpace).put(name,function);
}

Fixed version (ground truth):
/** 
 * Registers a function with namespace to this global environment.
 */
public void registerFunction(Class<?> nameSpace,String name,BaseFunction function){
  nameSpace=getCanonicalRepresentation(nameSpace);
  Preconditions.checkArgument(parent == null);
  if (!functions.containsKey(nameSpace)) {
    functions.put(nameSpace,new HashMap<String,BaseFunction>());
  }
  functions.get(nameSpace).put(name,function);
}
Program: 111014
Project: 111014
Buggy source:
/** 
 * Adds a handler to this reporter.
 */
public synchronized void addHandler(EventHandler handler){
  handlers.add(handler);
}

Fixed version (ground truth):
/** 
 * Adds a handler to this reporter.
 */
public synchronized void addHandler(EventHandler handler){
  Preconditions.checkNotNull(handler);
  handlers.add(handler);
}
Program: 111018
Project: 111018
Buggy source:
/** 
 * Returns a map containing entries that should be added to the merged plist. These are usually generated by Xcode automatically during the build process.
 */
public static Map<String,NSObject> automaticEntries(Collection<String> targetedDeviceFamily,Platform platform,String sdkVersion,String minimumOsVersion){
  ImmutableMap.Builder<String,NSObject> result=new ImmutableMap.Builder<>();
  List<Integer> uiDeviceFamily=FluentIterable.from(targetedDeviceFamily).transform(Maps.asConverter(DEVICE_FAMILIES)).toSortedList(Ordering.natural());
  result.put("String_Node_Str",NSObject.wrap(uiDeviceFamily.toArray()));
  result.put("String_Node_Str",NSObject.wrap(platform.getLowerCaseNameInPlist()));
  result.put("String_Node_Str",NSObject.wrap(platform.getLowerCaseNameInPlist() + sdkVersion));
  result.put("String_Node_Str",new NSArray(NSObject.wrap(platform.getNameInPlist())));
  result.put("String_Node_Str",NSObject.wrap(minimumOsVersion));
  return result.build();
}

Fixed version (ground truth):
/** 
 * Returns a map containing entries that should be added to the merged plist. These are usually generated by Xcode automatically during the build process.
 */
public static Map<String,NSObject> automaticEntries(Collection<String> targetedDeviceFamily,Platform platform,String sdkVersion,String minimumOsVersion){
  ImmutableMap.Builder<String,NSObject> result=new ImmutableMap.Builder<>();
  List<Integer> uiDeviceFamily=FluentIterable.from(targetedDeviceFamily).transform(Maps.asConverter(DEVICE_FAMILIES)).toSortedList(Ordering.natural());
  result.put("String_Node_Str",NSObject.wrap(uiDeviceFamily.toArray()));
  result.put("String_Node_Str",NSObject.wrap(platform.getLowerCaseNameInPlist()));
  result.put("String_Node_Str",NSObject.wrap(platform.getLowerCaseNameInPlist() + sdkVersion));
  result.put("String_Node_Str",new NSArray(NSObject.wrap(platform.getNameInPlist())));
  result.put("String_Node_Str",NSObject.wrap(minimumOsVersion));
  result.put("String_Node_Str",NSObject.wrap("String_Node_Str"));
  result.put("String_Node_Str",NSObject.wrap("String_Node_Str"));
  result.put("String_Node_Str",NSObject.wrap("String_Node_Str"));
  result.put("String_Node_Str",NSObject.wrap("String_Node_Str"));
  return result.build();
}
Program: 111019
Project: 111019
Buggy source:
/** 
 * Generates final merged Plist file and PkgInfo file in the specified locations, and includes the "automatic" entries in the Plist.
 */
public static PlistMerging from(List<Path> sourceFiles,Map<String,NSObject> automaticEntries,Map<String,String> substitutions,KeysToRemoveIfEmptyString keysToRemoveIfEmptyString) throws IOException {
  NSDictionary merged=PlistMerging.merge(sourceFiles);
  Set<String> conflictingEntries=Sets.intersection(automaticEntries.keySet(),merged.keySet());
  Preconditions.checkArgument(conflictingEntries.isEmpty(),"String_Node_Str" + "String_Node_Str",conflictingEntries);
  merged.putAll(automaticEntries);
  for (  Map.Entry<String,NSObject> entry : merged.entrySet()) {
    if (entry.getValue().toJavaObject() instanceof String) {
      String newValue=substituteEnvironmentVariable(substitutions,(String)entry.getValue().toJavaObject());
      merged.put(entry.getKey(),newValue);
    }
  }
  for (  String key : keysToRemoveIfEmptyString) {
    if (Equaling.of(Mapping.of(merged,key),Optional.<NSObject>of(new NSString("String_Node_Str")))) {
      merged.remove(key);
    }
  }
  return new PlistMerging(merged);
}

Fixed version (ground truth):
/** 
 * Generates final merged Plist file and PkgInfo file in the specified locations, and includes the "automatic" entries in the Plist.
 */
public static PlistMerging from(List<Path> sourceFiles,Map<String,NSObject> automaticEntries,Map<String,String> substitutions,KeysToRemoveIfEmptyString keysToRemoveIfEmptyString) throws IOException {
  NSDictionary merged=PlistMerging.merge(sourceFiles);
  Set<String> conflictingEntries=Sets.difference(Sets.intersection(automaticEntries.keySet(),merged.keySet()),ImmutableSet.of("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"));
  Preconditions.checkArgument(conflictingEntries.isEmpty(),"String_Node_Str" + "String_Node_Str",conflictingEntries);
  merged.putAll(automaticEntries);
  for (  Map.Entry<String,NSObject> entry : merged.entrySet()) {
    if (entry.getValue().toJavaObject() instanceof String) {
      String newValue=substituteEnvironmentVariable(substitutions,(String)entry.getValue().toJavaObject());
      merged.put(entry.getKey(),newValue);
    }
  }
  for (  String key : keysToRemoveIfEmptyString) {
    if (Equaling.of(Mapping.of(merged,key),Optional.<NSObject>of(new NSString("String_Node_Str")))) {
      merged.remove(key);
    }
  }
  return new PlistMerging(merged);
}
Program: 111023
Project: 111023
Buggy source:
/** 
 * This test validates that the md5sum() method returns hashes that match the official test vectors specified in RFC 1321, The MD5 Message-Digest Algorithm.
 * @throws Exception
 */
@Test public void testValidateMd5Sum() throws Exception {
  HashMap<String,String> testVectors=new HashMap<>();
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  testVectors.put("String_Node_Str","String_Node_Str");
  for (  String testInput : testVectors.keySet()) {
    FileSystemUtils.writeContentAsLatin1(testFile,testInput);
    HashCode result=FilesystemUtils.md5sum(testFile.getPathString());
    assertThat(testVectors).containsEntry(testInput,result.toString());
  }
}

Fixed version (ground truth):
/** 
 * This test validates that the md5sum() method returns hashes that match the official test vectors specified in RFC 1321, The MD5 Message-Digest Algorithm.
 * @throws Exception
 */
@Test public void testValidateMd5Sum() throws Exception {
  ImmutableMap<String,String> testVectors=ImmutableMap.<String,String>builder().put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").put("String_Node_Str","String_Node_Str").build();
  for (  String testInput : testVectors.keySet()) {
    FileSystemUtils.writeContentAsLatin1(testFile,testInput);
    HashCode result=FilesystemUtils.md5sum(testFile.getPathString());
    assertThat(testVectors).containsEntry(testInput,result.toString());
  }
}
Program: 111024
Project: 111024
Buggy source:
@Before public void setUp() throws Exception {
  testFS=new UnixFileSystem();
  workingDir=testFS.getPath(new File(TestUtils.tmpDir()).getCanonicalPath());
  testFile=workingDir.getRelative("String_Node_Str");
  FileSystemUtils.createEmptyFile(testFile);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  testFS=new UnixFileSystem();
  workingDir=testFS.getPath(new File(TestUtils.tmpDir()).getCanonicalPath());
  testFile=workingDir.getRelative("String_Node_Str");
}
Program: 111025
Project: 111025
Buggy source:
public void afterExecution(Action action,Token token,MetadataHandler metadataHandler) throws IOException {
  Preconditions.checkArgument(token != null);
  String key=token.cacheKey;
  if (actionCache.get(key) != null) {
    return;
  }
  ActionCache.Entry entry=actionCache.createEntry(action.getKey());
  for (  Artifact output : action.getOutputs()) {
    String execPath=output.getExecPathString();
    if (!key.equals(execPath)) {
      actionCache.remove(key);
    }
    if (!metadataHandler.artifactOmitted(output)) {
      Metadata metadata=metadataHandler.getMetadata(output);
      Preconditions.checkState(metadata != null);
      entry.addFile(output.getExecPath(),metadata);
    }
  }
  for (  Artifact input : action.getInputs()) {
    entry.addFile(input.getExecPath(),metadataHandler.getMetadataMaybe(input));
  }
  entry.getFileDigest();
  actionCache.put(key,entry);
}

Fixed version (ground truth):
public void afterExecution(Action action,Token token,MetadataHandler metadataHandler) throws IOException {
  Preconditions.checkArgument(token != null);
  String key=token.cacheKey;
  if (actionCache.get(key) != null) {
    return;
  }
  ActionCache.Entry entry=actionCache.createEntry(action.getKey());
  for (  Artifact output : action.getOutputs()) {
    String execPath=output.getExecPathString();
    if (!key.equals(execPath)) {
      actionCache.remove(execPath);
    }
    if (!metadataHandler.artifactOmitted(output)) {
      Metadata metadata=metadataHandler.getMetadata(output);
      Preconditions.checkState(metadata != null);
      entry.addFile(output.getExecPath(),metadata);
    }
  }
  for (  Artifact input : action.getInputs()) {
    entry.addFile(input.getExecPath(),metadataHandler.getMetadataMaybe(input));
  }
  entry.getFileDigest();
  actionCache.put(key,entry);
}
Program: 111026
Project: 111026
Buggy source:
private static Artifact getStubDex(RuleContext ruleContext,JavaSemantics javaSemantics,AndroidSemantics androidSemantics,AndroidTools tools){
  JavaCompilationArgs dep=ruleContext.getPrerequisite("String_Node_Str",Mode.TARGET).getProvider(JavaCompilationArgsProvider.class).getJavaCompilationArgs();
  JavaTargetAttributes attributes=new JavaTargetAttributes.Builder(javaSemantics).addRuntimeClassPathEntries(dep.getRuntimeJars()).build();
  Artifact stubDeployJar=getDxArtifact(ruleContext,"String_Node_Str");
  new DeployArchiveBuilder(javaSemantics,ruleContext).setOutputJar(stubDeployJar).setAttributes(attributes).build();
  Artifact stubDex=getDxArtifact(ruleContext,"String_Node_Str");
  AndroidCommon.createDexAction(ruleContext,androidSemantics,tools,stubDeployJar,stubDex,ImmutableList.<String>of(),false,null);
  return stubDex;
}

Fixed version (ground truth):
private static Artifact getStubDex(RuleContext ruleContext,JavaSemantics javaSemantics,AndroidSemantics androidSemantics,AndroidTools tools,boolean split){
  JavaCompilationArgs dep=ruleContext.getPrerequisite(split ? "String_Node_Str" : "String_Node_Str",Mode.TARGET).getProvider(JavaCompilationArgsProvider.class).getJavaCompilationArgs();
  JavaTargetAttributes attributes=new JavaTargetAttributes.Builder(javaSemantics).addRuntimeClassPathEntries(dep.getRuntimeJars()).build();
  Artifact stubDeployJar=getDxArtifact(ruleContext,split ? "String_Node_Str" : "String_Node_Str");
  new DeployArchiveBuilder(javaSemantics,ruleContext).setOutputJar(stubDeployJar).setAttributes(attributes).build();
  Artifact stubDex=getDxArtifact(ruleContext,split ? "String_Node_Str" : "String_Node_Str");
  AndroidCommon.createDexAction(ruleContext,androidSemantics,tools,stubDeployJar,stubDex,ImmutableList.<String>of(),false,null);
  return stubDex;
}
Program: 111028
Project: 111028
Buggy source:
/** 
 * Prepares a compilation run and sets everything up so that the source files in the build request can be compiled. Invokes compileSources to do the actual compilation.
 * @param build A JavaLibraryBuildRequest request object describing what tocompile
 * @param err PrintWriter for logging any diagnostic output
 */
public void compileJavaLibrary(final JavaLibraryBuildRequest build,final OutputStream err) throws IOException {
  prepareSourceCompilation(build);
  final String[] message={null};
  final JavacRunner javacRunner=new JavacRunnerImpl(build.getPlugins());
  runWithLargeStack(new Runnable(){
    @Override public void run(){
      try {
        internalCompileJavaLibrary(build,javacRunner,err);
      }
 catch (      JavacException e) {
        message[0]=e.getMessage();
      }
catch (      Exception e) {
        e.printStackTrace();
        message[0]="String_Node_Str" + e.getMessage();
      }
    }
  }
,4L * 1024 * 1024);
  if (message[0] != null) {
    throw new IOException("String_Node_Str" + message[0]);
  }
}

Fixed version (ground truth):
/** 
 * Prepares a compilation run and sets everything up so that the source files in the build request can be compiled. Invokes compileSources to do the actual compilation.
 * @param build A JavaLibraryBuildRequest request object describing what tocompile
 * @param err PrintWriter for logging any diagnostic output
 */
public void compileJavaLibrary(final JavaLibraryBuildRequest build,final OutputStream err) throws IOException {
  prepareSourceCompilation(build);
  final String[] message={null};
  final JavacRunner javacRunner=new JavacRunnerImpl(build.getPlugins());
  runWithLargeStack(new Runnable(){
    @Override public void run(){
      try {
        internalCompileJavaLibrary(build,javacRunner,err);
      }
 catch (      JavacException e) {
        message[0]=e.getMessage();
      }
catch (      Exception e) {
        message[0]=Throwables.getStackTraceAsString(e);
      }
    }
  }
,4L * 1024 * 1024);
  if (message[0] != null) {
    throw new IOException("String_Node_Str" + message[0]);
  }
}
Program: 111029
Project: 111029
Buggy source:
private static int processRequest(List<String> args){
  try {
    JavaLibraryBuildRequest build=parse(args);
    AbstractJavaBuilder builder=build.getDependencyModule().reduceClasspath() ? new ReducedClasspathJavaLibraryBuilder() : new SimpleJavaLibraryBuilder();
    builder.run(build,System.err);
  }
 catch (  IOException|InvalidCommandLineException e) {
    System.err.println(CMDNAME + "String_Node_Str" + e.getMessage());
    return 1;
  }
  return 0;
}

Fixed version (ground truth):
private static int processRequest(List<String> args){
  try {
    JavaLibraryBuildRequest build=parse(args);
    AbstractJavaBuilder builder=build.getDependencyModule().reduceClasspath() ? new ReducedClasspathJavaLibraryBuilder() : new SimpleJavaLibraryBuilder();
    builder.run(build,System.err);
  }
 catch (  InvalidCommandLineException e) {
    System.err.println(CMDNAME + "String_Node_Str" + e.getMessage());
    return 1;
  }
catch (  IOException e) {
    e.printStackTrace();
    return 1;
  }
  return 0;
}
Program: 111030
Project: 111030
Buggy source:
/** 
 * A simple way to create Jar file using the JarCreator class.
 */
public static void main(String[] args){
  if (args.length < 1) {
    System.err.println("String_Node_Str");
    System.exit(1);
  }
  String output=args[0];
  JarCreator createJar=new JarCreator(output);
  for (int i=1; i < args.length; i++) {
    createJar.addDirectory(args[i]);
  }
  createJar.setCompression(true);
  createJar.setNormalize(true);
  createJar.setVerbose(true);
  long start=System.currentTimeMillis();
  try {
    createJar.execute();
  }
 catch (  IOException e) {
    e.printStackTrace();
    System.err.println(e.getMessage());
    System.exit(1);
  }
  long stop=System.currentTimeMillis();
  System.err.println((stop - start) + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * A simple way to create Jar file using the JarCreator class.
 */
public static void main(String[] args){
  if (args.length < 1) {
    System.err.println("String_Node_Str");
    System.exit(1);
  }
  String output=args[0];
  JarCreator createJar=new JarCreator(output);
  for (int i=1; i < args.length; i++) {
    createJar.addDirectory(args[i]);
  }
  createJar.setCompression(true);
  createJar.setNormalize(true);
  createJar.setVerbose(true);
  long start=System.currentTimeMillis();
  try {
    createJar.execute();
  }
 catch (  IOException e) {
    e.printStackTrace();
    System.exit(1);
  }
  long stop=System.currentTimeMillis();
  System.err.println((stop - start) + "String_Node_Str");
}
Program: 111031
Project: 111031
Buggy source:
@Override public ResourceSet estimateResourceConsumption(Executor executor){
  SpawnActionContext context=getContext(executor);
  if (context.isRemotable(getMnemonic(),true)) {
    return ResourceSet.ZERO;
  }
  return LOCAL_RESOURCES;
}

Fixed version (ground truth):
@Override public ResourceSet estimateResourceConsumption(Executor executor){
  if (getContext(executor).isRemotable(getMnemonic(),true)) {
    return ResourceSet.ZERO;
  }
  return LOCAL_RESOURCES;
}
Program: 111032
Project: 111032
Buggy source:
/** 
 * Gets the name of the target that produced the given jar artifact. When specifying jars directly in the "srcs" attribute of a rule (mostly for third_party libraries), there is no generating action, so we just return the jar name in label form.
 */
private static Label getTargetName(Artifact jar){
  return Preconditions.checkNotNull(jar.getOwner(),jar);
}

Fixed version (ground truth):
/** 
 * Gets the name of the target that produced the given jar artifact. <p>When specifying jars directly in the "srcs" attribute of a rule (mostly for third_party libraries), there is no generating action, so we just return the jar name in label form.
 */
private static Label getTargetName(Artifact jar){
  return Preconditions.checkNotNull(jar.getOwner(),jar);
}
Program: 111033
Project: 111033
Buggy source:
@Override @ThreadCompatible public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  Executor executor=actionExecutionContext.getExecutor();
  try {
    List<ActionInput> outputs=new ArrayList<>();
    outputs.addAll(getOutputs());
    PathFragment classDirectory=getClassDirectory();
    outputs.addAll(semantics.getExtraJavaCompileOutputs(classDirectory));
    outputs.add(ActionInputHelper.fromPath(classDirectory.getChild("String_Node_Str").getPathString()));
    try {
      Path classDirectoryPath=executor.getExecRoot().getRelative(getClassDirectory());
      FileSystemUtils.createDirectoryAndParents(classDirectoryPath);
    }
 catch (    IOException e) {
      throw new EnvironmentalExecException(e.getMessage());
    }
    final ImmutableList<ActionInput> finalOutputs=ImmutableList.copyOf(outputs);
    Spawn spawn=new BaseSpawn(getCommand(),ImmutableMap.<String,String>of(),ImmutableMap.<String,String>of(),this,LOCAL_RESOURCES){
      @Override public Collection<? extends ActionInput> getOutputFiles(){
        return finalOutputs;
      }
    }
;
    executor.getSpawnActionContext(getMnemonic()).exec(spawn,actionExecutionContext);
  }
 catch (  ExecException e) {
    throw e.toActionExecutionException("String_Node_Str" + getOwner().getLabel() + "String_Node_Str",executor.getVerboseFailures(),this);
  }
}

Fixed version (ground truth):
@Override @ThreadCompatible public void execute(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  Executor executor=actionExecutionContext.getExecutor();
  try {
    List<ActionInput> outputs=new ArrayList<>();
    outputs.addAll(getOutputs());
    PathFragment classDirectory=getClassDirectory();
    outputs.addAll(semantics.getExtraJavaCompileOutputs(classDirectory));
    outputs.add(ActionInputHelper.fromPath(classDirectory.getChild("String_Node_Str").getPathString()));
    try {
      Path classDirectoryPath=executor.getExecRoot().getRelative(getClassDirectory());
      FileSystemUtils.createDirectoryAndParents(classDirectoryPath);
    }
 catch (    IOException e) {
      throw new EnvironmentalExecException(e.getMessage());
    }
    final ImmutableList<ActionInput> finalOutputs=ImmutableList.copyOf(outputs);
    Spawn spawn=new BaseSpawn(getCommand(),ImmutableMap.<String,String>of(),ImmutableMap.<String,String>of(),this,LOCAL_RESOURCES){
      @Override public Collection<? extends ActionInput> getOutputFiles(){
        return finalOutputs;
      }
    }
;
    getContext(executor).exec(spawn,actionExecutionContext);
  }
 catch (  ExecException e) {
    throw e.toActionExecutionException("String_Node_Str" + getOwner().getLabel() + "String_Node_Str",executor.getVerboseFailures(),this);
  }
}
Program: 111034
Project: 111034
Buggy source:
/** 
 * Returns a map from spawn action mnemonics created by this module to the name of the implementation of   {@code SpawnActionContext} that the module wants to use for executingit. <p>If a spawn action is executed whose mnemonic maps to the empty string or is not present in the map at all, the choice of the implementation is left to Blaze.
 */
Map<String,String> getSpawnActionContexts();

Fixed version (ground truth):
/** 
 * Returns a map from spawn action mnemonics created by this module to the name of the implementation of   {@code SpawnActionContext} that the module wants to use for executingit. <p>If a spawn action is executed whose mnemonic maps to the empty string or is not present in the map at all, the choice of the implementation is left to Blaze. <p>Matching on mnemonics is done case-insensitively so it is recommended that any implementation of this method makes sure that no two keys that refer to the same mnemonic are present in the returned map. The easiest way to assure this is to use a map created using {@code new TreeMap<>(String.CASE_INSENSITIVE_ORDER)}.
 */
Map<String,String> getSpawnActionContexts();
Program: 111035
Project: 111035
Buggy source:
@Override public Map<String,String> getSpawnActionContexts(){
  Map<String,String> contexts=new HashMap<>();
  contexts.put("String_Node_Str",options.genruleStrategy);
  for (  Map.Entry<String,String> strategy : options.strategy) {
    String strategyName=strategy.getValue();
    if (strategyName.equals("String_Node_Str")) {
      strategyName="String_Node_Str";
    }
    contexts.put(strategy.getKey(),strategyName);
  }
  contexts.put("String_Node_Str",options.spawnStrategy);
  return ImmutableMap.copyOf(contexts);
}

Fixed version (ground truth):
@Override public Map<String,String> getSpawnActionContexts(){
  Map<String,String> contexts=new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
  contexts.put("String_Node_Str",options.genruleStrategy);
  for (  Map.Entry<String,String> strategy : options.strategy) {
    String strategyName=strategy.getValue();
    if (strategyName.equals("String_Node_Str")) {
      strategyName="String_Node_Str";
    }
    contexts.put(strategy.getKey(),strategyName);
  }
  contexts.put("String_Node_Str",options.spawnStrategy);
  return ImmutableMap.copyOf(contexts);
}
Program: 111036
Project: 111036
Buggy source:
public MavenDownloader(String name,AttributeMap mapper,Path outputDirectory){
  this.name=name;
  this.groupId=mapper.get("String_Node_Str",Type.STRING);
  this.artifactId=mapper.get("String_Node_Str",Type.STRING);
  this.version=mapper.get("String_Node_Str",Type.STRING);
  this.outputDirectory=outputDirectory;
  if (mapper.has("String_Node_Str",Type.STRING)) {
    this.sha1=mapper.get("String_Node_Str",Type.STRING);
  }
 else {
    this.sha1=null;
  }
  if (mapper.has("String_Node_Str",Type.STRING)) {
    this.repositories=ImmutableList.of(new RemoteRepository.Builder("String_Node_Str","String_Node_Str",mapper.get("String_Node_Str",Type.STRING)).build());
  }
 else   if (mapper.has("String_Node_Str",Type.STRING_LIST)) {
    this.repositories=Lists.newArrayList();
    for (    String repositoryUrl : mapper.get("String_Node_Str",Type.STRING_LIST)) {
      this.repositories.add(new RemoteRepository.Builder("String_Node_Str" + repositories.size(),"String_Node_Str",repositoryUrl).build());
    }
  }
 else {
    this.repositories=Lists.newArrayList();
    this.repositories.add(new RemoteRepository.Builder("String_Node_Str","String_Node_Str",MAVEN_CENTRAL_URL).build());
  }
}

Fixed version (ground truth):
public MavenDownloader(String name,AttributeMap mapper,Path outputDirectory){
  this.name=name;
  this.groupId=mapper.get("String_Node_Str",Type.STRING);
  this.artifactId=mapper.get("String_Node_Str",Type.STRING);
  this.version=mapper.get("String_Node_Str",Type.STRING);
  this.outputDirectory=outputDirectory;
  if (mapper.has("String_Node_Str",Type.STRING)) {
    this.sha1=mapper.get("String_Node_Str",Type.STRING);
  }
 else {
    this.sha1=null;
  }
  if (mapper.has("String_Node_Str",Type.STRING) && !mapper.get("String_Node_Str",Type.STRING).isEmpty()) {
    this.repositories=ImmutableList.of(new RemoteRepository.Builder("String_Node_Str","String_Node_Str",mapper.get("String_Node_Str",Type.STRING)).build());
  }
 else   if (mapper.has("String_Node_Str",Type.STRING_LIST) && !mapper.get("String_Node_Str",Type.STRING_LIST).isEmpty()) {
    this.repositories=Lists.newArrayList();
    for (    String repositoryUrl : mapper.get("String_Node_Str",Type.STRING_LIST)) {
      this.repositories.add(new RemoteRepository.Builder("String_Node_Str" + repositories.size(),"String_Node_Str",repositoryUrl).build());
    }
  }
 else {
    this.repositories=Lists.newArrayList();
    this.repositories.add(new RemoteRepository.Builder("String_Node_Str","String_Node_Str",MAVEN_CENTRAL_URL).build());
  }
}
Program: 111037
Project: 111037
Buggy source:
private CommandLine ibActionsCommandLine(String archiveRoot,Artifact zipOutput,Artifact storyboardInput){
  CustomCommandLine.Builder commandLine=CustomCommandLine.builder().addPath(zipOutput.getExecPath()).add(archiveRoot).addPath(ObjcRuleClasses.IBTOOL).add("String_Node_Str").add(bundling.getMinimumOsVersion());
  for (  TargetDeviceFamily targetDeviceFamily : attributes.families()) {
    commandLine.add("String_Node_Str").add(targetDeviceFamily.name().toLowerCase(Locale.US));
  }
  return commandLine.addPath(storyboardInput.getExecPath()).build();
}

Fixed version (ground truth):
private CommandLine ibActionsCommandLine(String archiveRoot,Artifact zipOutput,Artifact storyboardInput){
  CustomCommandLine.Builder commandLine=CustomCommandLine.builder().addPath(zipOutput.getExecPath()).add(archiveRoot).addPath(ObjcRuleClasses.IBTOOL).add("String_Node_Str").add(bundling.getMinimumOsVersion()).add("String_Node_Str").add(ruleContext.getLabel().getName());
  for (  TargetDeviceFamily targetDeviceFamily : attributes.families()) {
    commandLine.add("String_Node_Str").add(targetDeviceFamily.name().toLowerCase(Locale.US));
  }
  return commandLine.addPath(storyboardInput.getExecPath()).build();
}
Program: 111038
Project: 111038
Buggy source:
private void registerConvertXibsActions(ObjcProvider objcProvider){
  IntermediateArtifacts intermediateArtifacts=ObjcRuleClasses.intermediateArtifacts(ruleContext);
  for (  Artifact original : objcProvider.get(ObjcProvider.XIB)) {
    Artifact zipOutput=intermediateArtifacts.compiledXibFileZip(original);
    String archiveRoot=BundleableFile.flatBundlePath(FileSystemUtils.replaceExtension(original.getExecPath(),"String_Node_Str"));
    ruleContext.registerAction(ObjcRuleClasses.spawnJavaOnDarwinActionBuilder(attributes.ibtoolzipDeployJar()).setMnemonic("String_Node_Str").setCommandLine(CustomCommandLine.builder().addPath(zipOutput.getExecPath()).add(archiveRoot).addPath(ObjcRuleClasses.IBTOOL).add("String_Node_Str").add(bundling.getMinimumOsVersion()).addPath(original.getExecPath()).build()).addOutput(zipOutput).addInput(original).build(ruleContext));
  }
}

Fixed version (ground truth):
private void registerConvertXibsActions(ObjcProvider objcProvider){
  IntermediateArtifacts intermediateArtifacts=ObjcRuleClasses.intermediateArtifacts(ruleContext);
  for (  Artifact original : objcProvider.get(ObjcProvider.XIB)) {
    Artifact zipOutput=intermediateArtifacts.compiledXibFileZip(original);
    String archiveRoot=BundleableFile.flatBundlePath(FileSystemUtils.replaceExtension(original.getExecPath(),"String_Node_Str"));
    ruleContext.registerAction(ObjcRuleClasses.spawnJavaOnDarwinActionBuilder(attributes.ibtoolzipDeployJar()).setMnemonic("String_Node_Str").setCommandLine(ibActionsCommandLine(archiveRoot,zipOutput,original)).addOutput(zipOutput).addInput(original).build(ruleContext));
  }
}
Program: 111039
Project: 111039
Buggy source:
@Override public Iterable<String> subCommand(Arguments args,String outputDirectory){
  return new ImmutableList.Builder<String>().add(args.subtoolCmd()).add("String_Node_Str").add(outputDirectory).addAll(Iterables.transform(args.subtoolExtraArgs(),CANONICAL_PATH)).build();
}

Fixed version (ground truth):
@Override public Iterable<String> subCommand(Arguments args,String outputDirectory){
  return new ImmutableList.Builder<String>().add(args.subtoolCmd()).add("String_Node_Str").add(outputDirectory).addAll(Iterables.transform(args.subtoolExtraArgs(),Wrappers.CANONICALIZE_IF_PATH)).build();
}
Program: 111040
Project: 111040
Buggy source:
@Override public Iterable<String> subCommand(Arguments args,String outputDirectory){
  return new ImmutableList.Builder<String>().add(args.subtoolCmd()).add("String_Node_Str").add(outputDirectory).addAll(args.subtoolExtraArgs()).build();
}

Fixed version (ground truth):
@Override public Iterable<String> subCommand(Arguments args,String outputDirectory){
  return new ImmutableList.Builder<String>().add(args.subtoolCmd()).add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").add("String_Node_Str").add(Wrappers.CANONICALIZE_IF_PATH.apply(outputDirectory)).addAll(Iterables.transform(args.subtoolExtraArgs(),Wrappers.CANONICALIZE_IF_PATH)).build();
}
Program: 111043
Project: 111043
Buggy source:
/** 
 * Recalculates this action's live input collection, including sources, middlemen.
 * @throws ActionExecutionException iff any errors happen during update.
 */
@VisibleForTesting @ThreadCompatible public final void updateActionInputs(Path execRoot,ArtifactResolver artifactResolver,CppCompileActionContext.Reply reply) throws ActionExecutionException {
  if (!cppConfiguration.shouldScanIncludes()) {
    return;
  }
  inputsKnown=false;
  NestedSetBuilder<Artifact> inputs=NestedSetBuilder.stableOrder();
  Profiler.instance().startTask(ProfilerTask.ACTION_UPDATE,this);
  try {
    inputs.addTransitive(mandatoryInputs);
    if (optionalSourceFile != null) {
      inputs.add(optionalSourceFile);
    }
    inputs.addAll(context.getCompilationPrerequisites());
    populateActionInputs(execRoot,artifactResolver,reply,inputs);
    inputsKnown=true;
  }
  finally {
    Profiler.instance().completeTask(ProfilerTask.ACTION_UPDATE);
synchronized (this) {
      setInputs(inputs.build());
    }
  }
}

Fixed version (ground truth):
/** 
 * Recalculates this action's live input collection, including sources, middlemen.
 * @throws ActionExecutionException iff any errors happen during update.
 */
@VisibleForTesting @ThreadCompatible public final synchronized void updateActionInputs(Path execRoot,ArtifactResolver artifactResolver,CppCompileActionContext.Reply reply) throws ActionExecutionException {
  if (!cppConfiguration.shouldScanIncludes()) {
    return;
  }
  inputsKnown=false;
  NestedSetBuilder<Artifact> inputs=NestedSetBuilder.stableOrder();
  Profiler.instance().startTask(ProfilerTask.ACTION_UPDATE,this);
  try {
    inputs.addTransitive(mandatoryInputs);
    if (optionalSourceFile != null) {
      inputs.add(optionalSourceFile);
    }
    inputs.addAll(context.getCompilationPrerequisites());
    populateActionInputs(execRoot,artifactResolver,reply,inputs);
    inputsKnown=true;
  }
  finally {
    Profiler.instance().completeTask(ProfilerTask.ACTION_UPDATE);
synchronized (this) {
      setInputs(inputs.build());
    }
  }
}
Program: 111044
Project: 111044
Buggy source:
@Override public boolean inputsKnown(){
  return inputsKnown;
}

Fixed version (ground truth):
@Override public synchronized boolean inputsKnown(){
  return inputsKnown;
}
Program: 111045
Project: 111045
Buggy source:
@Override public boolean inputsKnown(){
  return inputsKnown;
}

Fixed version (ground truth):
@Override public synchronized boolean inputsKnown(){
  return inputsKnown;
}
Program: 111046
Project: 111046
Buggy source:
@Nullable @Override public Collection<Artifact> discoverInputs(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  Preconditions.checkState(discoversInputs(),this);
  if (getContext(actionExecutionContext.getExecutor()).isRemotable(getMnemonic(),isRemotable())) {
    if (shadowedAction.discoversInputs() && shadowedAction instanceof AbstractAction) {
      Iterable<Artifact> additionalInputs=((AbstractAction)shadowedAction).getInputFilesForExtraAction(actionExecutionContext);
      updateInputs(additionalInputs);
      return ImmutableSet.copyOf(additionalInputs);
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable @Override public Collection<Artifact> discoverInputs(ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException {
  Preconditions.checkState(discoversInputs(),this);
  if (getContext(actionExecutionContext.getExecutor()).isRemotable(getMnemonic(),isRemotable())) {
    if (shadowedAction.discoversInputs() && shadowedAction instanceof AbstractAction) {
      Iterable<Artifact> additionalInputs=((AbstractAction)shadowedAction).getInputFilesForExtraAction(actionExecutionContext);
      updateExtraActionInputs(additionalInputs);
      return ImmutableSet.copyOf(additionalInputs);
    }
  }
  return null;
}