Program: 53226
Project: 53226
Buggy source:
@Test public void shouldIncludeSettingsForWeakFrameworks() throws IOException {
  BuildRule rule=createBuildRuleWithDefaults(BuildTarget.builder("String_Node_Str","String_Node_Str").setFlavor(AppleLibraryDescription.DYNAMIC_LIBRARY).build(),ImmutableSortedSet.<BuildRule>of(),appleLibraryDescription,new Function<AppleNativeTargetDescriptionArg,AppleNativeTargetDescriptionArg>(){
    @Override public AppleNativeTargetDescriptionArg apply(    AppleNativeTargetDescriptionArg input){
      input.weakFrameworks=Optional.of(ImmutableSortedSet.of("String_Node_Str"));
      return input;
    }
  }
);
  ProjectGenerator projectGenerator=createProjectGeneratorForCombinedProject(ImmutableSet.of(rule),ImmutableSet.of(rule.getBuildTarget()));
  projectGenerator.createXcodeProjects();
  PBXProject generatedProject=projectGenerator.getGeneratedProject();
  PBXTarget target=assertTargetExistsAndReturnTarget(generatedProject,"String_Node_Str");
  PBXBuildPhase buildPhase=ProjectGeneratorTestUtils.getSingletonPhaseByType(target,PBXFrameworksBuildPhase.class);
  assertEquals(buildPhase.getFiles().size(),1);
  PBXBuildFile file=buildPhase.getFiles().get(0);
  assertTrue(file.getSettings().isPresent());
  NSDictionary settings=file.getSettings().get();
  assertEquals(settings.get("String_Node_Str"),new NSArray(new NSString("String_Node_Str")));
  PBXReference.SourceTree sourceTree=file.getFileRef().getSourceTree();
  String serialized="String_Node_Str" + sourceTree + "String_Node_Str"+ file.getFileRef().getPath();
  assertEquals(serialized,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void shouldIncludeSettingsForWeakFrameworks() throws IOException {
  BuildRule rule=createBuildRuleWithDefaults(BuildTarget.builder("String_Node_Str","String_Node_Str").setFlavor(AppleLibraryDescription.DYNAMIC_LIBRARY).build(),new BuildRuleResolver(),ImmutableSortedSet.<BuildRule>of(),appleLibraryDescription,new Function<AppleNativeTargetDescriptionArg,AppleNativeTargetDescriptionArg>(){
    @Override public AppleNativeTargetDescriptionArg apply(    AppleNativeTargetDescriptionArg input){
      input.weakFrameworks=Optional.of(ImmutableSortedSet.of("String_Node_Str"));
      return input;
    }
  }
);
  ProjectGenerator projectGenerator=createProjectGeneratorForCombinedProject(ImmutableSet.of(rule),ImmutableSet.of(rule.getBuildTarget()));
  projectGenerator.createXcodeProjects();
  PBXProject generatedProject=projectGenerator.getGeneratedProject();
  PBXTarget target=assertTargetExistsAndReturnTarget(generatedProject,"String_Node_Str");
  PBXBuildPhase buildPhase=ProjectGeneratorTestUtils.getSingletonPhaseByType(target,PBXFrameworksBuildPhase.class);
  assertEquals(buildPhase.getFiles().size(),1);
  PBXBuildFile file=buildPhase.getFiles().get(0);
  assertTrue(file.getSettings().isPresent());
  NSDictionary settings=file.getSettings().get();
  assertEquals(settings.get("String_Node_Str"),new NSArray(new NSString("String_Node_Str")));
  PBXReference.SourceTree sourceTree=file.getFileRef().getSourceTree();
  String serialized="String_Node_Str" + sourceTree + "String_Node_Str"+ file.getFileRef().getPath();
  assertEquals(serialized,"String_Node_Str");
}