Program: 110577
Project: 110577
Buggy source:
public ResourceApk packIncrementalBinaryWithDataAndResources(RuleContext ruleContext,Artifact resourceApk,ResourceDependencies resourceDeps,List<String> uncompressedExtensions,boolean crunchPng,Artifact proguardCfg) throws InterruptedException, RuleErrorException {
  AndroidResources resources=AndroidResources.from(ruleContext,"String_Node_Str");
  ResourceFilterFactory resourceFilterFactory=ResourceFilterFactory.fromRuleContext(ruleContext);
  ResourceFilter resourceFilter=resourceFilterFactory.getResourceFilter(ruleContext,resourceDeps,resources);
  resources=resources.filterLocalResources(resourceFilter);
  resourceDeps=resourceDeps.filter(resourceFilter);
  ResourceContainer resourceContainer=ResourceContainer.builderFromRule(ruleContext).setApk(resourceApk).setManifest(getManifest()).setAssets(AndroidAssets.from(ruleContext)).setResources(resources).build();
  ResourceContainer processed=new AndroidResourcesProcessorBuilder(ruleContext).setLibrary(false).setApkOut(resourceContainer.getApk()).setResourceFilterFactory(resourceFilterFactory).setUncompressedExtensions(uncompressedExtensions).setCrunchPng(crunchPng).setJavaPackage(resourceContainer.getJavaPackage()).setDebug(ruleContext.getConfiguration().getCompilationMode() != CompilationMode.OPT).withPrimary(resourceContainer).withDependencies(resourceDeps).setProguardOut(proguardCfg).setApplicationId(manifestValues.get("String_Node_Str")).setVersionCode(manifestValues.get("String_Node_Str")).setVersionName(manifestValues.get("String_Node_Str")).setThrowOnResourceConflict(ruleContext.getConfiguration().getFragment(AndroidConfiguration.class).throwOnResourceConflict()).setPackageUnderTest(null).build(ruleContext);
  return new ResourceApk(resourceContainer.getApk(),processed.getJavaSourceJar(),processed.getJavaClassJar(),resourceDeps,processed,processed.getManifest(),proguardCfg,null);
}

Fixed version (ground truth):
public ResourceApk packIncrementalBinaryWithDataAndResources(RuleContext ruleContext,Artifact resourceApk,ResourceDependencies resourceDeps,List<String> uncompressedExtensions,boolean crunchPng,Artifact proguardCfg) throws InterruptedException, RuleErrorException {
  AndroidResources resources=AndroidResources.from(ruleContext,"String_Node_Str");
  ResourceFilterFactory resourceFilterFactory=ResourceFilterFactory.fromRuleContext(ruleContext);
  ResourceFilter resourceFilter=resourceFilterFactory.getResourceFilter(ruleContext,resourceDeps,resources);
  resources=resources.filterLocalResources(ruleContext,resourceFilter);
  resourceDeps=resourceDeps.filter(ruleContext,resourceFilter);
  ResourceContainer resourceContainer=ResourceContainer.builderFromRule(ruleContext).setApk(resourceApk).setManifest(getManifest()).setAssets(AndroidAssets.from(ruleContext)).setResources(resources).build();
  ResourceContainer processed=new AndroidResourcesProcessorBuilder(ruleContext).setLibrary(false).setApkOut(resourceContainer.getApk()).setResourceFilterFactory(resourceFilterFactory).setUncompressedExtensions(uncompressedExtensions).setCrunchPng(crunchPng).setJavaPackage(resourceContainer.getJavaPackage()).setDebug(ruleContext.getConfiguration().getCompilationMode() != CompilationMode.OPT).withPrimary(resourceContainer).withDependencies(resourceDeps).setProguardOut(proguardCfg).setApplicationId(manifestValues.get("String_Node_Str")).setVersionCode(manifestValues.get("String_Node_Str")).setVersionName(manifestValues.get("String_Node_Str")).setThrowOnResourceConflict(ruleContext.getConfiguration().getFragment(AndroidConfiguration.class).throwOnResourceConflict()).setPackageUnderTest(null).build(ruleContext);
  return new ResourceApk(resourceContainer.getApk(),processed.getJavaSourceJar(),processed.getJavaClassJar(),resourceDeps,processed,processed.getManifest(),proguardCfg,null);
}