Program: 82082
Project: 82082
Buggy source:
/** 
 * Pull in types implicitly referenced through rebind answers.
 */
@Override protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger,CompilationUnitDeclaration cud){
  Set<String> dependentTypeNames=new HashSet<String>();
  FindDeferredBindingSitesVisitor v=new FindDeferredBindingSitesVisitor();
  cud.traverse(v,cud.scope);
  Map<String,MessageSendSite> requestedTypes=v.getSites();
  Map<String,String[]> rebindAnswers=new HashMap<String,String[]>();
  boolean doFinish=false;
  for (  Map.Entry<String,MessageSendSite> entry : requestedTypes.entrySet()) {
    String reqType=entry.getKey();
    MessageSendSite site=entry.getValue();
    try {
      String[] resultTypes=rebindPermOracle.getAllPossibleRebindAnswers(logger,reqType);
      rebindAnswers.put(reqType,resultTypes);
      Collections.addAll(dependentTypeNames,resultTypes);
      doFinish=true;
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + reqType + "String_Node_Str");
      rebindAnswers.put(reqType,new String[0]);
    }
  }
  for (  MessageSendSite site : v.getRunAsyncSites()) {
    String resultType;
    try {
      resultType=fragmentLoaderCreator.create(logger);
      dependentTypeNames.add(resultType);
      doFinish=true;
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str");
    }
  }
  if (doFinish) {
    try {
      rebindPermOracle.getGeneratorContext().finish(logger);
    }
 catch (    UnableToCompleteException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
  }
  for (  Map.Entry<String,MessageSendSite> entry : requestedTypes.entrySet()) {
    String reqType=entry.getKey();
    MessageSendSite site=entry.getValue();
    String[] resultTypes=rebindAnswers.get(reqType);
    for (    String typeName : resultTypes) {
      checkRebindResultInstantiable(site,typeName);
    }
  }
  return dependentTypeNames.toArray(new String[dependentTypeNames.size()]);
}

Fixed version (ground truth):
/** 
 * Pull in types implicitly referenced through rebind answers.
 */
@Override protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger,CompilationUnitDeclaration cud){
  Set<String> dependentTypeNames=new LinkedHashSet<String>();
  FindDeferredBindingSitesVisitor v=new FindDeferredBindingSitesVisitor();
  cud.traverse(v,cud.scope);
  Map<String,MessageSendSite> requestedTypes=v.getSites();
  Map<String,String[]> rebindAnswers=new HashMap<String,String[]>();
  boolean doFinish=false;
  for (  Map.Entry<String,MessageSendSite> entry : requestedTypes.entrySet()) {
    String reqType=entry.getKey();
    MessageSendSite site=entry.getValue();
    try {
      String[] resultTypes=rebindPermOracle.getAllPossibleRebindAnswers(logger,reqType);
      rebindAnswers.put(reqType,resultTypes);
      Collections.addAll(dependentTypeNames,resultTypes);
      doFinish=true;
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + reqType + "String_Node_Str");
      rebindAnswers.put(reqType,new String[0]);
    }
  }
  for (  MessageSendSite site : v.getRunAsyncSites()) {
    String resultType;
    try {
      resultType=fragmentLoaderCreator.create(logger);
      dependentTypeNames.add(resultType);
      doFinish=true;
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str");
    }
  }
  if (doFinish) {
    try {
      rebindPermOracle.getGeneratorContext().finish(logger);
    }
 catch (    UnableToCompleteException e) {
      throw new RuntimeException("String_Node_Str",e);
    }
  }
  for (  Map.Entry<String,MessageSendSite> entry : requestedTypes.entrySet()) {
    String reqType=entry.getKey();
    MessageSendSite site=entry.getValue();
    String[] resultTypes=rebindAnswers.get(reqType);
    for (    String typeName : resultTypes) {
      checkRebindResultInstantiable(site,typeName);
    }
  }
  return dependentTypeNames.toArray(new String[dependentTypeNames.size()]);
}