Program: 32510
Project: 32510
Buggy source:
/** 
 * Although   {@link EventList}s are not in general,   {@link BasicEventList} is{@link Serializable}. All of the   {@link ListEventListener}s that are themselves  {@link Serializable} will be serialized, but others will not. Note that thereis <strong>no</strong> easy way to access the  {@link ListEventListener}s of an   {@link EventList}, particularly after it has been serialized. <p>As of October 3, 2005, this is the wire format of serialized  {@link BasicEventList}s: <li>An <code>Object[]</code> containing each of the list's elements <li>A <code>ListEventListener[]</code> containing <strong>only</strong> the listeners that themselves implement   {@link Serializable}. Those that do not will not be serialized. Note that   {@link TransformedList}s such as   {@link FilterList} are not {@link Serializable} and will notbe serialized. <p>As of March 4, 2007, the wire format was extended to include: <li>the ListEventPublisher <li>the ReadWriteLock represented as a  {@link SerializedReadWriteLock}<p>The motivation for this is documented <a href="https://glazedlists.dev.java.net/issues/show_bug.cgi?id=398">here</a>. Serialization streams with the old format are still readable. Serialization streams with the new format are not downwards-compatible. 
 */
private void writeObject(ObjectOutputStream out) throws IOException {
  E[] elements=(E[])data.toArray(new Object[data.size()]);
  List<ListEventListener<E>> serializableListeners=new ArrayList<ListEventListener<E>>(1);
  for (Iterator<ListEventListener<E>> i=updates.getListEventListeners().iterator(); i.hasNext(); ) {
    ListEventListener<E> listener=i.next();
    if (!(listener instanceof Serializable))     continue;
    serializableListeners.add(listener);
  }
  ListEventListener[] listeners=serializableListeners.toArray(new ListEventListener[serializableListeners.size()]);
  out.writeObject(elements);
  out.writeObject(listeners);
  out.writeObject(getPublisher());
  out.writeObject(getReadWriteLock());
}

Fixed version (ground truth):
/** 
 * Although   {@link EventList}s are not in general,   {@link BasicEventList} is{@link Serializable}. All of the   {@link ListEventListener}s that are themselves  {@link Serializable} will be serialized, but others will not. Note that thereis <strong>no</strong> easy way to access the  {@link ListEventListener}s of an   {@link EventList}, particularly after it has been serialized. <p>As of October 3, 2005, this is the wire format of serialized  {@link BasicEventList}s: <li>An <code>Object[]</code> containing each of the list's elements <li>A <code>ListEventListener[]</code> containing <strong>only</strong> the listeners that themselves implement   {@link Serializable}. Those that do not will not be serialized. Note that   {@link TransformedList}s such as   {@link FilterList} are not {@link Serializable} and will notbe serialized. <p>As of March 4, 2007, the wire format was extended to include: <li>the ListEventPublisher <li>the ReadWriteLock represented as a  {@link SerializedReadWriteLock}<p>The motivation for this is documented <a href="https://glazedlists.dev.java.net/issues/show_bug.cgi?id=398">here</a>. Serialization streams with the old format are still readable. Serialization streams with the new format are not downwards-compatible.
 */
private void writeObject(ObjectOutputStream out) throws IOException {
  E[] elements=(E[])data.toArray(new Object[data.size()]);
  List<ListEventListener<E>> serializableListeners=new ArrayList<ListEventListener<E>>(1);
  for (Iterator<ListEventListener<E>> i=updates.getListEventListeners().iterator(); i.hasNext(); ) {
    ListEventListener<E> listener=i.next();
    if (!(listener instanceof Serializable))     continue;
    serializableListeners.add(listener);
  }
  ListEventListener[] listeners=serializableListeners.toArray(new ListEventListener[serializableListeners.size()]);
  out.writeObject(elements);
  out.writeObject(listeners);
  out.writeObject(getPublisher());
  out.writeObject(getReadWriteLock());
}