Program: 82989
Project: 82989
Buggy source:
/** 
 * Pull in types implicitly referenced through rebind answers.
 */
protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger,CompilationUnitDeclaration cud){
  Set dependentTypeNames=new HashSet();
  Map requestedTypes=new HashMap();
  FindDeferredBindingSitesVisitor v=new FindDeferredBindingSitesVisitor(requestedTypes);
  cud.traverse(v,cud.scope);
  for (Iterator iter=requestedTypes.keySet().iterator(); iter.hasNext(); ) {
    String reqType=(String)iter.next();
    DeferredBindingSite site=(DeferredBindingSite)requestedTypes.get(reqType);
    try {
      String[] resultTypes=rebindPermOracle.getAllPossibleRebindAnswers(getLogger(),reqType);
      for (int i=0; i < resultTypes.length; ++i) {
        String typeName=resultTypes[i];
        ReferenceBinding type=resolvePossiblyNestedType(typeName);
        if (type == null) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (!type.isClass()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isAbstract()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isNestedType() && !type.isStatic()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isLocalType()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        MethodBinding noArgCtor=type.getExactMethod("String_Node_Str".toCharArray(),TypeBinding.NoParameters,cud.scope);
        if (noArgCtor == null) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        dependentTypeNames.add(typeName);
      }
      Util.addAll(dependentTypeNames,resultTypes);
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + reqType + "String_Node_Str");
    }
  }
  return (String[])dependentTypeNames.toArray(Empty.STRINGS);
}

Fixed version (ground truth):
/** 
 * Pull in types implicitly referenced through rebind answers.
 */
protected String[] doFindAdditionalTypesUsingRebinds(TreeLogger logger,CompilationUnitDeclaration cud){
  Set dependentTypeNames=new HashSet();
  Map requestedTypes=new HashMap();
  FindDeferredBindingSitesVisitor v=new FindDeferredBindingSitesVisitor(requestedTypes);
  cud.traverse(v,cud.scope);
  for (Iterator iter=requestedTypes.keySet().iterator(); iter.hasNext(); ) {
    String reqType=(String)iter.next();
    DeferredBindingSite site=(DeferredBindingSite)requestedTypes.get(reqType);
    try {
      String[] resultTypes=rebindPermOracle.getAllPossibleRebindAnswers(logger,reqType);
      for (int i=0; i < resultTypes.length; ++i) {
        String typeName=resultTypes[i];
        ReferenceBinding type=resolvePossiblyNestedType(typeName);
        if (type == null) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (!type.isClass()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isAbstract()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isNestedType() && !type.isStatic()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        if (type.isLocalType()) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        MethodBinding noArgCtor=type.getExactMethod("String_Node_Str".toCharArray(),TypeBinding.NoParameters,cud.scope);
        if (noArgCtor == null) {
          FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + typeName + "String_Node_Str");
          continue;
        }
        dependentTypeNames.add(typeName);
      }
      Util.addAll(dependentTypeNames,resultTypes);
    }
 catch (    UnableToCompleteException e) {
      FindDeferredBindingSitesVisitor.reportRebindProblem(site,"String_Node_Str" + reqType + "String_Node_Str");
    }
  }
  return (String[])dependentTypeNames.toArray(Empty.STRINGS);
}