Program: 32705
Project: 32705
Buggy source:
public void listChanged(ListEvent listChanges){
  boolean inserts=false;
  boolean deletes=false;
  boolean wasEmpty=matcherEditorListeners.isEmpty();
  while (listChanges.next()) {
    int index=listChanges.getIndex();
    int type=listChanges.getType();
    if (type == ListEvent.INSERT) {
      MatcherEditor inserted=(MatcherEditor)matcherEditors.get(index);
      matcherEditorListeners.add(new DelegateMatcherEditorListener(inserted));
      inserts=true;
    }
 else     if (type == ListEvent.DELETE) {
      DelegateMatcherEditorListener listener=(DelegateMatcherEditorListener)matcherEditorListeners.remove(index);
      listener.stopListening();
      deletes=true;
    }
 else     if (type == ListEvent.UPDATE) {
      MatcherEditor updated=(MatcherEditor)matcherEditors.get(index);
      DelegateMatcherEditorListener listener=(DelegateMatcherEditorListener)matcherEditorListeners.remove(index);
      listener.setMatcherEditor(updated);
      inserts=true;
      deletes=true;
    }
  }
  boolean isEmpty=matcherEditorListeners.isEmpty();
  if (mode == AND) {
    if (inserts && deletes) {
      fireChanged(rebuildMatcher());
    }
 else     if (inserts) {
      fireConstrained(rebuildMatcher());
    }
 else     if (deletes) {
      if (isEmpty)       fireMatchAll();
 else       fireRelaxed(rebuildMatcher());
    }
  }
 else   if (mode == OR) {
    if (inserts && deletes) {
      fireChanged(rebuildMatcher());
    }
 else     if (inserts) {
      if (wasEmpty)       fireConstrained(rebuildMatcher());
 else       fireRelaxed(rebuildMatcher());
    }
 else     if (deletes) {
      if (isEmpty)       fireMatchAll();
 else       fireConstrained(rebuildMatcher());
    }
  }
 else {
    throw new IllegalStateException();
  }
}

Fixed version (ground truth):
public void listChanged(ListEvent listChanges){
  boolean inserts=false;
  boolean deletes=false;
  boolean wasEmpty=matcherEditorListeners.isEmpty();
  while (listChanges.next()) {
    int index=listChanges.getIndex();
    int type=listChanges.getType();
    if (type == ListEvent.INSERT) {
      MatcherEditor inserted=(MatcherEditor)matcherEditors.get(index);
      matcherEditorListeners.add(new DelegateMatcherEditorListener(inserted));
      inserts=true;
    }
 else     if (type == ListEvent.DELETE) {
      DelegateMatcherEditorListener listener=(DelegateMatcherEditorListener)matcherEditorListeners.remove(index);
      listener.stopListening();
      deletes=true;
    }
 else     if (type == ListEvent.UPDATE) {
      MatcherEditor updated=(MatcherEditor)matcherEditors.get(index);
      DelegateMatcherEditorListener listener=(DelegateMatcherEditorListener)matcherEditorListeners.get(index);
      listener.setMatcherEditor(updated);
      inserts=true;
      deletes=true;
    }
  }
  boolean isEmpty=matcherEditorListeners.isEmpty();
  if (mode == AND) {
    if (inserts && deletes) {
      fireChanged(rebuildMatcher());
    }
 else     if (inserts) {
      fireConstrained(rebuildMatcher());
    }
 else     if (deletes) {
      if (isEmpty)       fireMatchAll();
 else       fireRelaxed(rebuildMatcher());
    }
  }
 else   if (mode == OR) {
    if (inserts && deletes) {
      fireChanged(rebuildMatcher());
    }
 else     if (inserts) {
      if (wasEmpty)       fireConstrained(rebuildMatcher());
 else       fireRelaxed(rebuildMatcher());
    }
 else     if (deletes) {
      if (isEmpty)       fireMatchAll();
 else       fireConstrained(rebuildMatcher());
    }
  }
 else {
    throw new IllegalStateException();
  }
}