Program: 103780
Project: 103780
Buggy source:
public boolean dispatchKeyEvent(KeyEvent e){
  if (!isFocused() || e.getID() != KeyEvent.KEY_PRESSED)   return false;
  TreeContactList contactList=getContactListPanel().getContactList();
  if (searchField.isFocusOwner() && (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_PAGE_UP || e.getKeyCode() == KeyEvent.VK_PAGE_DOWN || e.getKeyCode() == KeyEvent.VK_HOME || e.getKeyCode() == KeyEvent.VK_END)) {
    contactList.selectFirstContact();
    contactList.requestFocus();
    return false;
  }
  if (contactList.isFocusOwner() && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
    contactList.removeSelectionRows(contactList.getSelectionRows());
    if (searchField.getText() != null) {
      searchField.requestFocus();
    }
    return false;
  }
  TreePath selectionPath=contactList.getSelectionPath();
  if (e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_ESCAPE || e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_RIGHT || e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_PAGE_UP || e.getKeyCode() == KeyEvent.VK_PAGE_DOWN || e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_CONTROL || e.getKeyCode() == KeyEvent.VK_ALT || e.getKeyCode() == KeyEvent.VK_SHIFT || e.getKeyCode() == KeyEvent.VK_META || e.getKeyCode() == KeyEvent.VK_TAB || e.getKeyCode() == KeyEvent.VK_SPACE || e.getKeyCode() == KeyEvent.VK_F1 || e.getKeyCode() == KeyEvent.VK_F2 || e.getKeyCode() == KeyEvent.VK_F3 || e.getKeyCode() == KeyEvent.VK_F4 || e.getKeyCode() == KeyEvent.VK_F5 || e.getKeyCode() == KeyEvent.VK_F6 || e.getKeyCode() == KeyEvent.VK_F7 || e.getKeyCode() == KeyEvent.VK_F8 || e.getKeyCode() == KeyEvent.VK_F9 || e.getKeyCode() == KeyEvent.VK_F10 || e.getKeyCode() == KeyEvent.VK_F11 || e.getKeyCode() == KeyEvent.VK_F12 || (selectionPath != null && selectionPath.getLastPathComponent() instanceof GroupNode && (e.getKeyChar() == '+' || e.getKeyChar() == '-'))) {
    return false;
  }
  if (!searchField.isFocusOwner()) {
    String searchText="String_Node_Str";
    if (searchField.getText() != null)     searchText+=searchField.getText() + e.getKeyChar();
 else     searchText+=e.getKeyChar();
    searchField.setText(searchText);
    searchField.requestFocus();
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean dispatchKeyEvent(KeyEvent e){
  if (!isFocused() || e.getID() != KeyEvent.KEY_PRESSED)   return false;
  TreeContactList contactList=getContactListPanel().getContactList();
  if (searchField.isFocusOwner() && (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN || e.getKeyCode() == KeyEvent.VK_PAGE_UP || e.getKeyCode() == KeyEvent.VK_PAGE_DOWN || e.getKeyCode() == KeyEvent.VK_HOME || e.getKeyCode() == KeyEvent.VK_END)) {
    contactList.selectFirstContact();
    contactList.requestFocus();
    return false;
  }
  if (contactList.isFocusOwner() && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
    contactList.removeSelectionRows(contactList.getSelectionRows());
    if (searchField.getText() != null) {
      searchField.requestFocus();
    }
    return false;
  }
  TreePath selectionPath=contactList.getSelectionPath();
  if (e.getKeyChar() == KeyEvent.CHAR_UNDEFINED || e.getKeyCode() == KeyEvent.VK_ENTER || e.getKeyCode() == KeyEvent.VK_BACK_SPACE || e.getKeyCode() == KeyEvent.VK_TAB || e.getKeyCode() == KeyEvent.VK_SPACE || (selectionPath != null && selectionPath.getLastPathComponent() instanceof GroupNode && (e.getKeyChar() == '+' || e.getKeyChar() == '-'))) {
    return false;
  }
  if (!searchField.isFocusOwner()) {
    String searchText="String_Node_Str";
    if (searchField.getText() != null)     searchText+=searchField.getText() + e.getKeyChar();
 else     searchText+=e.getKeyChar();
    searchField.setText(searchText);
    searchField.requestFocus();
    return true;
  }
  return false;
}