Program: 53296
Project: 53296
Buggy source:
@Test public void testExportDeps(){
  BuildRuleResolver ruleResolver=new BuildRuleResolver();
  BuildTarget libraryOneTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule libraryOne=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(libraryOneTarget).addSrc("String_Node_Str"));
  BuildTarget libraryTwoTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule libraryTwo=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(libraryTwoTarget).addSrc("String_Node_Str").addDep(BuildTargetFactory.newInstance("String_Node_Str")).setExportDeps(true));
  BuildTarget parentTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule parent=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(parentTarget).addSrc("String_Node_Str").addDep(BuildTargetFactory.newInstance("String_Node_Str")));
  assertEquals(ImmutableSetMultimap.builder().put(libraryOne,"String_Node_Str").build(),libraryOne.getOutputClasspathEntries());
  assertEquals(ImmutableSetMultimap.builder().put(libraryOne,"String_Node_Str").put(libraryTwo,"String_Node_Str").put(libraryTwo,"String_Node_Str").build(),libraryTwo.getOutputClasspathEntries());
  ImmutableSetMultimap.Builder<BuildRule,String> expected=ImmutableSetMultimap.builder();
  expected.put(parent,"String_Node_Str");
  expected.putAll(libraryTwo,"String_Node_Str","String_Node_Str");
  assertEquals(expected.build(),parent.getDeclaredClasspathEntries());
}

Fixed version (ground truth):
@Test public void testExportDeps(){
  BuildRuleResolver ruleResolver=new BuildRuleResolver();
  BuildTarget libraryOneTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule libraryOne=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(libraryOneTarget).addSrc("String_Node_Str"));
  BuildTarget libraryTwoTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule libraryTwo=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(libraryTwoTarget).addSrc("String_Node_Str").addDep(BuildTargetFactory.newInstance("String_Node_Str")).setExportDeps(true));
  BuildTarget parentTarget=BuildTargetFactory.newInstance("String_Node_Str");
  JavaLibraryRule parent=ruleResolver.buildAndAddToIndex(DefaultJavaLibraryRule.newJavaLibraryRuleBuilder(new FakeAbstractBuildRuleBuilderParams()).setBuildTarget(parentTarget).addSrc("String_Node_Str").addDep(BuildTargetFactory.newInstance("String_Node_Str")));
  assertEquals("String_Node_Str" + "String_Node_Str",ImmutableSetMultimap.builder().put(libraryOne,"String_Node_Str").build(),libraryOne.getOutputClasspathEntries());
  assertEquals("String_Node_Str" + "String_Node_Str",ImmutableSetMultimap.builder().put(libraryOne,"String_Node_Str").put(libraryTwo,"String_Node_Str").put(libraryTwo,"String_Node_Str").build(),libraryTwo.getOutputClasspathEntries());
  assertEquals("String_Node_Str" + "String_Node_Str",ImmutableSetMultimap.builder().put(libraryTwo,"String_Node_Str").put(libraryTwo,"String_Node_Str").build(),parent.getDeclaredClasspathEntries());
  assertEquals("String_Node_Str" + "String_Node_Str",ImmutableSetMultimap.builder().put(libraryOne,"String_Node_Str").put(libraryTwo,"String_Node_Str").put(libraryTwo,"String_Node_Str").put(parent,"String_Node_Str").build(),parent.getTransitiveClasspathEntries());
  assertEquals("String_Node_Str" + "String_Node_Str",ImmutableSetMultimap.builder().put(parent,"String_Node_Str").build(),parent.getOutputClasspathEntries());
}