Program: 110550
Project: 110550
Buggy source:
@Override public ConfiguredTarget create(RuleContext ruleContext) throws InterruptedException, RuleErrorException, ActionConflictException {
  ruleContext.checkSrcsSamePackage(true);
  JavaSemantics javaSemantics=createJavaSemantics();
  AndroidSemantics androidSemantics=createAndroidSemantics();
  createAndroidMigrationSemantics().validateRuleContext(ruleContext);
  AndroidLocalTestConfiguration androidLocalTestConfiguration=ruleContext.getFragment(AndroidLocalTestConfiguration.class);
  final JavaCommon javaCommon=new JavaCommon(ruleContext,javaSemantics);
  JavaTargetAttributes.Builder attributesBuilder=javaCommon.initCommon();
  final ResourceApk resourceApk;
  if (AndroidResources.decoupleDataProcessing(ruleContext)) {
    StampedAndroidManifest manifest=StampedAndroidManifest.from(ruleContext,androidSemantics).mergeWithDeps(ruleContext);
    resourceApk=ProcessedAndroidData.processLocalTestDataFrom(ruleContext,manifest).generateRClass(ruleContext);
  }
 else {
    ResourceDependencies resourceDependencies=ResourceDependencies.fromRuleDeps(ruleContext,false);
    ApplicationManifest applicationManifest=getApplicationManifest(ruleContext,androidSemantics,resourceDependencies);
    resourceApk=applicationManifest.packBinaryWithDataAndResources(ruleContext,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_APK),resourceDependencies,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_R_TXT),ResourceFilterFactory.fromRuleContext(ruleContext),ImmutableList.of(),false,ProguardHelper.getProguardConfigArtifact(ruleContext,"String_Node_Str"),null,false,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_PROCESSED_MANIFEST),ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_ZIP),DataBinding.isEnabled(ruleContext) ? DataBinding.getLayoutInfoFile(ruleContext) : null,null,null);
    attributesBuilder.addRuntimeClassPathEntry(resourceApk.getResourceJavaClassJar());
  }
  NestedSet<Artifact> excludedRuntimeArtifacts=getLibraryResourceJars(ruleContext);
  attributesBuilder.addExcludedArtifacts(excludedRuntimeArtifacts);
  String name="String_Node_Str" + ruleContext.getRule().getName() + "String_Node_Str";
  Artifact propertiesFile=ruleContext.getGenfilesArtifact(name);
  String resourcesLocation=resourceApk.getValidatedResources().getMergedResources().getRunfilesPathString();
  Template template=Template.forResource(AndroidLocalTestBase.class,"String_Node_Str");
  List<Substitution> substitutions=new ArrayList<>();
  substitutions.add(Substitution.of("String_Node_Str",resourceApk.getManifest().getRunfilesPathString()));
  substitutions.add(Substitution.of("String_Node_Str","String_Node_Str" + resourcesLocation + "String_Node_Str"));
  substitutions.add(Substitution.of("String_Node_Str","String_Node_Str" + resourcesLocation + "String_Node_Str"));
  substitutions.add(Substitution.of("String_Node_Str",resourceApk.getValidatedResources().getJavaPackage()));
  boolean generateBinaryResources=androidLocalTestConfiguration.useAndroidLocalTestBinaryResources();
  if (generateBinaryResources) {
    substitutions.add(Substitution.of("String_Node_Str",resourceApk.getArtifact().getRunfilesPathString()));
  }
  ruleContext.registerAction(new TemplateExpansionAction(ruleContext.getActionOwner(),propertiesFile,template,substitutions,false));
  attributesBuilder.addResource(PathFragment.create("String_Node_Str"),propertiesFile);
  String testClass=getAndCheckTestClass(ruleContext,ImmutableList.copyOf(attributesBuilder.getSourceFiles()));
  getAndCheckTestSupport(ruleContext);
  javaSemantics.checkForProtoLibraryAndJavaProtoLibraryOnSameProto(ruleContext,javaCommon);
  if (ruleContext.hasErrors()) {
    return null;
  }
  Artifact srcJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_SOURCE_JAR);
  JavaSourceJarsProvider.Builder javaSourceJarsProviderBuilder=JavaSourceJarsProvider.builder().addSourceJar(srcJar).addAllTransitiveSourceJars(javaCommon.collectTransitiveSourceJars(srcJar));
  Artifact classJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_CLASS_JAR);
  JavaRuleOutputJarsProvider.Builder javaRuleOutputJarsProviderBuilder=JavaRuleOutputJarsProvider.builder().addOutputJar(classJar,classJar,srcJar == null ? ImmutableList.<Artifact>of() : ImmutableList.of(srcJar));
  JavaCompilationArtifacts.Builder javaArtifactsBuilder=new JavaCompilationArtifacts.Builder();
  JavaCompilationHelper helper=getJavaCompilationHelperWithDependencies(ruleContext,javaSemantics,javaCommon,attributesBuilder);
  Artifact instrumentationMetadata=helper.createInstrumentationMetadata(classJar,javaArtifactsBuilder);
  Artifact executable;
  if (OS.getCurrent() == OS.WINDOWS && ruleContext.getConfiguration().enableWindowsExeLauncher()) {
    executable=ruleContext.getImplicitOutputArtifact(ruleContext.getTarget().getName() + "String_Node_Str");
  }
 else {
    executable=ruleContext.createOutputArtifact();
  }
  NestedSetBuilder<Artifact> filesToBuildBuilder=NestedSetBuilder.<Artifact>stableOrder().add(classJar).add(executable);
  GeneratedExtensionRegistryProvider generatedExtensionRegistryProvider=javaSemantics.createGeneratedExtensionRegistry(ruleContext,javaCommon,filesToBuildBuilder,javaArtifactsBuilder,javaRuleOutputJarsProviderBuilder,javaSourceJarsProviderBuilder);
  String mainClass=getMainClass(ruleContext,javaSemantics,helper,executable,instrumentationMetadata,javaArtifactsBuilder,attributesBuilder);
  addJavaClassJarToArtifactsBuilder(javaArtifactsBuilder,helper.getAttributes(),classJar);
  Artifact manifestProtoOutput=helper.createManifestProtoOutput(classJar);
  Artifact genClassJar=null;
  Artifact genSourceJar=null;
  if (helper.usesAnnotationProcessing()) {
    genClassJar=helper.createGenJar(classJar);
    genSourceJar=helper.createGensrcJar(classJar);
    helper.createGenJarAction(classJar,manifestProtoOutput,genClassJar);
  }
  Artifact outputDepsProtoArtifact=helper.createOutputDepsProtoArtifact(classJar,javaArtifactsBuilder);
  javaRuleOutputJarsProviderBuilder.setJdeps(outputDepsProtoArtifact);
  helper.createCompileAction(classJar,manifestProtoOutput,genSourceJar,outputDepsProtoArtifact,instrumentationMetadata,null);
  helper.createSourceJarAction(srcJar,genSourceJar);
  setUpJavaCommon(javaCommon,helper,javaArtifactsBuilder.build());
  Artifact launcher=JavaHelper.launcherArtifactForTarget(javaSemantics,ruleContext);
  String javaExecutable;
  if (javaSemantics.isJavaExecutableSubstitution()) {
    javaExecutable=JavaCommon.getJavaBinSubstitution(ruleContext,launcher);
  }
 else {
    javaExecutable=JavaCommon.getJavaExecutableForStub(ruleContext,launcher);
  }
  javaSemantics.createStubAction(ruleContext,javaCommon,getJvmFlags(ruleContext,testClass),executable,mainClass,javaExecutable);
  Artifact oneVersionOutputArtifact=null;
  JavaConfiguration javaConfig=ruleContext.getFragment(JavaConfiguration.class);
  OneVersionEnforcementLevel oneVersionEnforcementLevel=javaConfig.oneVersionEnforcementLevel();
  boolean doOneVersionEnforcement=oneVersionEnforcementLevel != OneVersionEnforcementLevel.OFF && javaConfig.enforceOneVersionOnJavaTests();
  JavaToolchainProvider javaToolchain=JavaToolchainProvider.from(ruleContext);
  if (doOneVersionEnforcement) {
    oneVersionOutputArtifact=OneVersionCheckActionBuilder.newBuilder().withEnforcementLevel(oneVersionEnforcementLevel).outputArtifact(ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_ONE_VERSION_ARTIFACT)).useToolchain(javaToolchain).checkJars(NestedSetBuilder.fromNestedSet(helper.getAttributes().getRuntimeClassPath()).add(classJar).build()).build(ruleContext);
  }
  NestedSet<Artifact> filesToBuild=filesToBuildBuilder.build();
  Runfiles defaultRunfiles=collectDefaultRunfiles(ruleContext,javaCommon,filesToBuild,resourceApk.getManifest(),resourceApk.getResourceJavaClassJar(),resourceApk.getValidatedResources().getMergedResources(),generateBinaryResources ? resourceApk : null);
  RunfilesSupport runfilesSupport=RunfilesSupport.withExecutable(ruleContext,defaultRunfiles,executable);
  Artifact deployJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_DEPLOY_JAR);
  new DeployArchiveBuilder(javaSemantics,ruleContext).setOutputJar(deployJar).setJavaStartClass(mainClass).setDeployManifestLines(ImmutableList.<String>of()).setAttributes(helper.getAttributes()).addRuntimeJars(javaCommon.getJavaCompilationArtifacts().getRuntimeJars()).setIncludeBuildData(true).setRunfilesMiddleman(runfilesSupport.getRunfilesMiddleman()).setCompression(COMPRESSED).setLauncher(launcher).setOneVersionEnforcementLevel(doOneVersionEnforcement ? oneVersionEnforcementLevel : OneVersionEnforcementLevel.OFF,javaToolchain.getOneVersionWhitelist()).build();
  JavaSourceJarsProvider sourceJarsProvider=javaSourceJarsProviderBuilder.build();
  NestedSet<Artifact> transitiveSourceJars=sourceJarsProvider.getTransitiveSourceJars();
  RuleConfiguredTargetBuilder builder=new RuleConfiguredTargetBuilder(ruleContext);
  if (generatedExtensionRegistryProvider != null) {
    builder.addProvider(GeneratedExtensionRegistryProvider.class,generatedExtensionRegistryProvider);
  }
  JavaRuleOutputJarsProvider ruleOutputJarsProvider=javaRuleOutputJarsProviderBuilder.build();
  JavaInfo.Builder javaInfoBuilder=JavaInfo.Builder.create();
  javaCommon.addTransitiveInfoProviders(builder,javaInfoBuilder,filesToBuild,classJar);
  javaCommon.addGenJarsProvider(builder,javaInfoBuilder,genClassJar,genSourceJar);
  AndroidFeatureFlagSetProvider.getAndValidateFlagMapFromRuleContext(ruleContext);
  if (oneVersionOutputArtifact != null) {
    builder.addOutputGroup(OutputGroupInfo.HIDDEN_TOP_LEVEL,oneVersionOutputArtifact);
  }
  NestedSet<Artifact> extraFilesToRun=NestedSetBuilder.create(Order.STABLE_ORDER,runfilesSupport.getRunfilesMiddleman());
  JavaInfo javaInfo=javaInfoBuilder.addProvider(JavaSourceJarsProvider.class,sourceJarsProvider).addProvider(JavaRuleOutputJarsProvider.class,ruleOutputJarsProvider).build();
  return builder.setFilesToBuild(filesToBuild).addSkylarkTransitiveInfo(JavaSkylarkApiProvider.NAME,JavaSkylarkApiProvider.fromRuleContext()).addNativeDeclaredProvider(javaInfo).addProvider(RunfilesProvider.class,RunfilesProvider.withData(defaultRunfiles,new Runfiles.Builder(ruleContext.getWorkspaceName()).merge(runfilesSupport).build())).addFilesToRun(extraFilesToRun).setRunfilesSupport(runfilesSupport,executable).addProvider(JavaRuntimeClasspathProvider.class,new JavaRuntimeClasspathProvider(javaCommon.getRuntimeClasspath())).addProvider(JavaPrimaryClassProvider.class,new JavaPrimaryClassProvider(testClass)).addProvider(JavaSourceInfoProvider.class,JavaSourceInfoProvider.fromJavaTargetAttributes(helper.getAttributes(),javaSemantics)).addOutputGroup(JavaSemantics.SOURCE_JARS_OUTPUT_GROUP,transitiveSourceJars).build();
}

Fixed version (ground truth):
@Override public ConfiguredTarget create(RuleContext ruleContext) throws InterruptedException, RuleErrorException, ActionConflictException {
  ruleContext.checkSrcsSamePackage(true);
  JavaSemantics javaSemantics=createJavaSemantics();
  AndroidSemantics androidSemantics=createAndroidSemantics();
  createAndroidMigrationSemantics().validateRuleContext(ruleContext);
  AndroidLocalTestConfiguration androidLocalTestConfiguration=ruleContext.getFragment(AndroidLocalTestConfiguration.class);
  final JavaCommon javaCommon=new JavaCommon(ruleContext,javaSemantics);
  JavaTargetAttributes.Builder attributesBuilder=javaCommon.initCommon();
  final ResourceApk resourceApk;
  if (AndroidResources.decoupleDataProcessing(ruleContext)) {
    StampedAndroidManifest manifest=StampedAndroidManifest.from(ruleContext,androidSemantics).mergeWithDeps(ruleContext);
    resourceApk=ProcessedAndroidData.processLocalTestDataFrom(ruleContext,manifest).generateRClass(ruleContext);
  }
 else {
    ResourceDependencies resourceDependencies=ResourceDependencies.fromRuleDeps(ruleContext,false);
    ApplicationManifest applicationManifest=getApplicationManifest(ruleContext,androidSemantics,resourceDependencies);
    resourceApk=applicationManifest.packBinaryWithDataAndResources(ruleContext,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_APK),resourceDependencies,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_R_TXT),ResourceFilterFactory.fromRuleContext(ruleContext),ImmutableList.of(),false,ProguardHelper.getProguardConfigArtifact(ruleContext,"String_Node_Str"),null,false,ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_PROCESSED_MANIFEST),ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_ZIP),DataBinding.isEnabled(ruleContext) ? DataBinding.getLayoutInfoFile(ruleContext) : null,null,null);
  }
  attributesBuilder.addRuntimeClassPathEntry(resourceApk.getResourceJavaClassJar());
  NestedSet<Artifact> excludedRuntimeArtifacts=getLibraryResourceJars(ruleContext);
  attributesBuilder.addExcludedArtifacts(excludedRuntimeArtifacts);
  String name="String_Node_Str" + ruleContext.getRule().getName() + "String_Node_Str";
  Artifact propertiesFile=ruleContext.getGenfilesArtifact(name);
  String resourcesLocation=resourceApk.getValidatedResources().getMergedResources().getRunfilesPathString();
  Template template=Template.forResource(AndroidLocalTestBase.class,"String_Node_Str");
  List<Substitution> substitutions=new ArrayList<>();
  substitutions.add(Substitution.of("String_Node_Str",resourceApk.getManifest().getRunfilesPathString()));
  substitutions.add(Substitution.of("String_Node_Str","String_Node_Str" + resourcesLocation + "String_Node_Str"));
  substitutions.add(Substitution.of("String_Node_Str","String_Node_Str" + resourcesLocation + "String_Node_Str"));
  substitutions.add(Substitution.of("String_Node_Str",resourceApk.getValidatedResources().getJavaPackage()));
  boolean generateBinaryResources=androidLocalTestConfiguration.useAndroidLocalTestBinaryResources();
  if (generateBinaryResources) {
    substitutions.add(Substitution.of("String_Node_Str",resourceApk.getArtifact().getRunfilesPathString()));
  }
  ruleContext.registerAction(new TemplateExpansionAction(ruleContext.getActionOwner(),propertiesFile,template,substitutions,false));
  attributesBuilder.addResource(PathFragment.create("String_Node_Str"),propertiesFile);
  String testClass=getAndCheckTestClass(ruleContext,ImmutableList.copyOf(attributesBuilder.getSourceFiles()));
  getAndCheckTestSupport(ruleContext);
  javaSemantics.checkForProtoLibraryAndJavaProtoLibraryOnSameProto(ruleContext,javaCommon);
  if (ruleContext.hasErrors()) {
    return null;
  }
  Artifact srcJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_SOURCE_JAR);
  JavaSourceJarsProvider.Builder javaSourceJarsProviderBuilder=JavaSourceJarsProvider.builder().addSourceJar(srcJar).addAllTransitiveSourceJars(javaCommon.collectTransitiveSourceJars(srcJar));
  Artifact classJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_CLASS_JAR);
  JavaRuleOutputJarsProvider.Builder javaRuleOutputJarsProviderBuilder=JavaRuleOutputJarsProvider.builder().addOutputJar(classJar,classJar,srcJar == null ? ImmutableList.<Artifact>of() : ImmutableList.of(srcJar));
  JavaCompilationArtifacts.Builder javaArtifactsBuilder=new JavaCompilationArtifacts.Builder();
  JavaCompilationHelper helper=getJavaCompilationHelperWithDependencies(ruleContext,javaSemantics,javaCommon,attributesBuilder);
  Artifact instrumentationMetadata=helper.createInstrumentationMetadata(classJar,javaArtifactsBuilder);
  Artifact executable;
  if (OS.getCurrent() == OS.WINDOWS && ruleContext.getConfiguration().enableWindowsExeLauncher()) {
    executable=ruleContext.getImplicitOutputArtifact(ruleContext.getTarget().getName() + "String_Node_Str");
  }
 else {
    executable=ruleContext.createOutputArtifact();
  }
  NestedSetBuilder<Artifact> filesToBuildBuilder=NestedSetBuilder.<Artifact>stableOrder().add(classJar).add(executable);
  GeneratedExtensionRegistryProvider generatedExtensionRegistryProvider=javaSemantics.createGeneratedExtensionRegistry(ruleContext,javaCommon,filesToBuildBuilder,javaArtifactsBuilder,javaRuleOutputJarsProviderBuilder,javaSourceJarsProviderBuilder);
  String mainClass=getMainClass(ruleContext,javaSemantics,helper,executable,instrumentationMetadata,javaArtifactsBuilder,attributesBuilder);
  addJavaClassJarToArtifactsBuilder(javaArtifactsBuilder,helper.getAttributes(),classJar);
  Artifact manifestProtoOutput=helper.createManifestProtoOutput(classJar);
  Artifact genClassJar=null;
  Artifact genSourceJar=null;
  if (helper.usesAnnotationProcessing()) {
    genClassJar=helper.createGenJar(classJar);
    genSourceJar=helper.createGensrcJar(classJar);
    helper.createGenJarAction(classJar,manifestProtoOutput,genClassJar);
  }
  Artifact outputDepsProtoArtifact=helper.createOutputDepsProtoArtifact(classJar,javaArtifactsBuilder);
  javaRuleOutputJarsProviderBuilder.setJdeps(outputDepsProtoArtifact);
  helper.createCompileAction(classJar,manifestProtoOutput,genSourceJar,outputDepsProtoArtifact,instrumentationMetadata,null);
  helper.createSourceJarAction(srcJar,genSourceJar);
  setUpJavaCommon(javaCommon,helper,javaArtifactsBuilder.build());
  Artifact launcher=JavaHelper.launcherArtifactForTarget(javaSemantics,ruleContext);
  String javaExecutable;
  if (javaSemantics.isJavaExecutableSubstitution()) {
    javaExecutable=JavaCommon.getJavaBinSubstitution(ruleContext,launcher);
  }
 else {
    javaExecutable=JavaCommon.getJavaExecutableForStub(ruleContext,launcher);
  }
  javaSemantics.createStubAction(ruleContext,javaCommon,getJvmFlags(ruleContext,testClass),executable,mainClass,javaExecutable);
  Artifact oneVersionOutputArtifact=null;
  JavaConfiguration javaConfig=ruleContext.getFragment(JavaConfiguration.class);
  OneVersionEnforcementLevel oneVersionEnforcementLevel=javaConfig.oneVersionEnforcementLevel();
  boolean doOneVersionEnforcement=oneVersionEnforcementLevel != OneVersionEnforcementLevel.OFF && javaConfig.enforceOneVersionOnJavaTests();
  JavaToolchainProvider javaToolchain=JavaToolchainProvider.from(ruleContext);
  if (doOneVersionEnforcement) {
    oneVersionOutputArtifact=OneVersionCheckActionBuilder.newBuilder().withEnforcementLevel(oneVersionEnforcementLevel).outputArtifact(ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_ONE_VERSION_ARTIFACT)).useToolchain(javaToolchain).checkJars(NestedSetBuilder.fromNestedSet(helper.getAttributes().getRuntimeClassPath()).add(classJar).build()).build(ruleContext);
  }
  NestedSet<Artifact> filesToBuild=filesToBuildBuilder.build();
  Runfiles defaultRunfiles=collectDefaultRunfiles(ruleContext,javaCommon,filesToBuild,resourceApk.getManifest(),resourceApk.getResourceJavaClassJar(),resourceApk.getValidatedResources().getMergedResources(),generateBinaryResources ? resourceApk : null);
  RunfilesSupport runfilesSupport=RunfilesSupport.withExecutable(ruleContext,defaultRunfiles,executable);
  Artifact deployJar=ruleContext.getImplicitOutputArtifact(JavaSemantics.JAVA_BINARY_DEPLOY_JAR);
  new DeployArchiveBuilder(javaSemantics,ruleContext).setOutputJar(deployJar).setJavaStartClass(mainClass).setDeployManifestLines(ImmutableList.<String>of()).setAttributes(helper.getAttributes()).addRuntimeJars(javaCommon.getJavaCompilationArtifacts().getRuntimeJars()).setIncludeBuildData(true).setRunfilesMiddleman(runfilesSupport.getRunfilesMiddleman()).setCompression(COMPRESSED).setLauncher(launcher).setOneVersionEnforcementLevel(doOneVersionEnforcement ? oneVersionEnforcementLevel : OneVersionEnforcementLevel.OFF,javaToolchain.getOneVersionWhitelist()).build();
  JavaSourceJarsProvider sourceJarsProvider=javaSourceJarsProviderBuilder.build();
  NestedSet<Artifact> transitiveSourceJars=sourceJarsProvider.getTransitiveSourceJars();
  RuleConfiguredTargetBuilder builder=new RuleConfiguredTargetBuilder(ruleContext);
  if (generatedExtensionRegistryProvider != null) {
    builder.addProvider(GeneratedExtensionRegistryProvider.class,generatedExtensionRegistryProvider);
  }
  JavaRuleOutputJarsProvider ruleOutputJarsProvider=javaRuleOutputJarsProviderBuilder.build();
  JavaInfo.Builder javaInfoBuilder=JavaInfo.Builder.create();
  javaCommon.addTransitiveInfoProviders(builder,javaInfoBuilder,filesToBuild,classJar);
  javaCommon.addGenJarsProvider(builder,javaInfoBuilder,genClassJar,genSourceJar);
  AndroidFeatureFlagSetProvider.getAndValidateFlagMapFromRuleContext(ruleContext);
  if (oneVersionOutputArtifact != null) {
    builder.addOutputGroup(OutputGroupInfo.HIDDEN_TOP_LEVEL,oneVersionOutputArtifact);
  }
  NestedSet<Artifact> extraFilesToRun=NestedSetBuilder.create(Order.STABLE_ORDER,runfilesSupport.getRunfilesMiddleman());
  JavaInfo javaInfo=javaInfoBuilder.addProvider(JavaSourceJarsProvider.class,sourceJarsProvider).addProvider(JavaRuleOutputJarsProvider.class,ruleOutputJarsProvider).build();
  return builder.setFilesToBuild(filesToBuild).addSkylarkTransitiveInfo(JavaSkylarkApiProvider.NAME,JavaSkylarkApiProvider.fromRuleContext()).addNativeDeclaredProvider(javaInfo).addProvider(RunfilesProvider.class,RunfilesProvider.withData(defaultRunfiles,new Runfiles.Builder(ruleContext.getWorkspaceName()).merge(runfilesSupport).build())).addFilesToRun(extraFilesToRun).setRunfilesSupport(runfilesSupport,executable).addProvider(JavaRuntimeClasspathProvider.class,new JavaRuntimeClasspathProvider(javaCommon.getRuntimeClasspath())).addProvider(JavaPrimaryClassProvider.class,new JavaPrimaryClassProvider(testClass)).addProvider(JavaSourceInfoProvider.class,JavaSourceInfoProvider.fromJavaTargetAttributes(helper.getAttributes(),javaSemantics)).addOutputGroup(JavaSemantics.SOURCE_JARS_OUTPUT_GROUP,transitiveSourceJars).build();
}