Program: 82961
Project: 82961
Buggy source:
/** 
 * Loads a SerializationPolicy from an input stream.
 * @param inputStream stream to load from
 * @return a {@link SerializationPolicy} loaded from the input stream
 * @throws IOException if an error occurs while reading the stream
 * @throws ParseException if the input stream is not properly formatted
 * @throws ClassNotFoundException if a class specified in the serializationpolicy cannot be loaded
 */
public static SerializationPolicy loadFromStream(InputStream inputStream) throws IOException, ParseException, ClassNotFoundException {
  if (inputStream == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Map<Class<?>,Boolean> whitelist=new HashMap<Class<?>,Boolean>();
  InputStreamReader isr=new InputStreamReader(inputStream,SERIALIZATION_POLICY_FILE_ENCODING);
  BufferedReader br=new BufferedReader(isr);
  String line=br.readLine();
  int lineNum=1;
  while (line != null) {
    line=line.trim();
    if (line.length() > 0) {
      String[] components=line.split("String_Node_Str");
      if (components.length != 2) {
        throw new ParseException(FORMAT_ERROR_MESSAGE,lineNum);
      }
      String binaryTypeName=components[0].trim();
      String instantiable=components[1].trim();
      if (binaryTypeName.length() == 0 || instantiable.length() == 0) {
        throw new ParseException(FORMAT_ERROR_MESSAGE,lineNum);
      }
      ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
      Class<?> clazz=Class.forName(binaryTypeName,false,contextClassLoader);
      whitelist.put(clazz,Boolean.valueOf(instantiable));
    }
    line=br.readLine();
    lineNum++;
  }
  return new StandardSerializationPolicy(whitelist);
}

Fixed version (ground truth):
/** 
 * Loads a SerializationPolicy from an input stream and optionally record any  {@link ClassNotFoundException}s.
 * @param inputStream stream to load the SerializationPolicy from.
 * @param classNotFoundExceptions if not <code>null</code>, all of the{@link ClassNotFoundException}s thrown while loading this serialization policy will be added to this list
 * @return a {@link SerializationPolicy} loaded from the input stream.
 * @throws IOException if an error occurs while reading the stream
 * @throws ParseException if the input stream is not properly formatted
 */
public static SerializationPolicy loadFromStream(InputStream inputStream,List<ClassNotFoundException> classNotFoundExceptions) throws IOException, ParseException {
  if (inputStream == null) {
    throw new NullPointerException("String_Node_Str");
  }
  Map<Class<?>,Boolean> whitelist=new HashMap<Class<?>,Boolean>();
  InputStreamReader isr=new InputStreamReader(inputStream,SERIALIZATION_POLICY_FILE_ENCODING);
  BufferedReader br=new BufferedReader(isr);
  String line=br.readLine();
  int lineNum=1;
  while (line != null) {
    line=line.trim();
    if (line.length() > 0) {
      String[] components=line.split("String_Node_Str");
      if (components.length != 2) {
        throw new ParseException(FORMAT_ERROR_MESSAGE,lineNum);
      }
      String binaryTypeName=components[0].trim();
      String instantiable=components[1].trim();
      if (binaryTypeName.length() == 0 || instantiable.length() == 0) {
        throw new ParseException(FORMAT_ERROR_MESSAGE,lineNum);
      }
      ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
      try {
        Class<?> clazz=Class.forName(binaryTypeName,false,contextClassLoader);
        whitelist.put(clazz,Boolean.valueOf(instantiable));
      }
 catch (      ClassNotFoundException ex) {
        if (classNotFoundExceptions != null) {
          classNotFoundExceptions.add(ex);
        }
      }
    }
    line=br.readLine();
    lineNum++;
  }
  return new StandardSerializationPolicy(whitelist);
}