Program: 110778
Project: 110778
Buggy source:
private static ResourceApk shrinkResources(RuleContext ruleContext,ResourceApk resourceApk,ImmutableList<Artifact> proguardSpecs,ProguardOutput proguardOutput,NestedSetBuilder<Artifact> filesBuilder) throws InterruptedException {
  if (LocalResourceContainer.definesAndroidResources(ruleContext.attributes()) && !proguardSpecs.isEmpty()) {
    Artifact apk=new ResourceShrinkerActionBuilder(ruleContext).setResourceApkOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_SHRUNK_APK)).setShrunkResourcesOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_SHRUNK_ZIP)).setLogOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCE_SHRINKER_LOG)).withResourceFiles(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_ZIP)).withShrunkJar(proguardOutput.getOutputJar()).withProguardMapping(proguardOutput.getMapping()).withPrimary(resourceApk.getPrimaryResource()).withDependencies(resourceApk.getResourceDependencies()).setConfigurationFilters(ResourceConfigurationFilter.fromRuleContext(ruleContext)).setUncompressedExtensions(ruleContext.getTokenizedStringListAttr("String_Node_Str")).build();
    filesBuilder.add(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCE_SHRINKER_LOG));
    return new ResourceApk(apk,resourceApk.getResourceJavaSrcJar(),resourceApk.getResourceJavaClassJar(),resourceApk.getResourceDependencies(),resourceApk.getPrimaryResource(),resourceApk.getManifest(),resourceApk.getResourceProguardConfig(),resourceApk.getMainDexProguardConfig(),resourceApk.isLegacy());
  }
  return resourceApk;
}

Fixed version (ground truth):
private static ResourceApk shrinkResources(RuleContext ruleContext,ResourceApk resourceApk,ImmutableList<Artifact> proguardSpecs,ProguardOutput proguardOutput,NestedSetBuilder<Artifact> filesBuilder) throws InterruptedException {
  if (LocalResourceContainer.definesAndroidResources(ruleContext.attributes()) && !proguardSpecs.isEmpty()) {
    Artifact apk=new ResourceShrinkerActionBuilder(ruleContext).setResourceApkOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_SHRUNK_APK)).setShrunkResourcesOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_SHRUNK_ZIP)).setLogOut(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCE_SHRINKER_LOG)).withResourceFiles(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_ZIP)).withShrunkJar(proguardOutput.getOutputJar()).withProguardMapping(proguardOutput.getMapping()).withPrimary(resourceApk.getPrimaryResource()).withDependencies(resourceApk.getResourceDependencies()).setResourceFilter(ResourceFilter.fromRuleContext(ruleContext)).setUncompressedExtensions(ruleContext.getTokenizedStringListAttr("String_Node_Str")).build();
    filesBuilder.add(ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCE_SHRINKER_LOG));
    return new ResourceApk(apk,resourceApk.getResourceJavaSrcJar(),resourceApk.getResourceJavaClassJar(),resourceApk.getResourceDependencies(),resourceApk.getPrimaryResource(),resourceApk.getManifest(),resourceApk.getResourceProguardConfig(),resourceApk.getMainDexProguardConfig(),resourceApk.isLegacy());
  }
  return resourceApk;
}