Program: 143585
Project: 143585
Buggy source:
@Override public void setSelectedItem(Object anObject){
  Object oldSelection=selectedItemReminder;
  if (oldSelection == null || !oldSelection.equals(anObject)) {
    if (anObject != null && !isEditable()) {
      boolean found=false;
      if (anObject instanceof Date && format instanceof StateFullSimpleDateFormat) {
        StateFullSimpleDateFormat sfsd=(StateFullSimpleDateFormat)format;
        String selectedFormat=sfsd.format(anObject);
        for (int i=0; i < dataModel.getSize(); i++) {
          try {
            Object element=dataModel.getElementAt(i);
            if (!(element instanceof Date))             continue;
            String elementFormat=sfsd.format(element);
            if (selectedFormat.equals(elementFormat)) {
              found=true;
              break;
            }
          }
 catch (          RuntimeException e) {
            Debug.error(e);
          }
        }
      }
 else {
        if (dataModel instanceof ComboModelListModelWrapper) {
          found=((ComboModelListModelWrapper)dataModel).indexOf(anObject) != -1;
        }
 else         for (int i=0; i < dataModel.getSize(); i++) {
          if (anObject.equals(dataModel.getElementAt(i))) {
            found=true;
            break;
          }
        }
      }
      if (!found) {
        return;
      }
    }
    selectingItem=true;
    dataModel.setSelectedItem(anObject);
    selectingItem=false;
    if (selectedItemReminder != dataModel.getSelectedItem()) {
      selectedItemChanged();
    }
  }
  fireActionEvent();
}

Fixed version (ground truth):
@Override public void setSelectedItem(Object anObject){
  Object oldSelection=selectedItemReminder;
  if (oldSelection == null || !oldSelection.equals(anObject)) {
    if (IValueList.SEPARATOR.equals(anObject)) {
      getEditor().setItem(oldSelection);
      return;
    }
    if (anObject != null && !isEditable()) {
      boolean found=false;
      if (anObject instanceof Date && format instanceof StateFullSimpleDateFormat) {
        StateFullSimpleDateFormat sfsd=(StateFullSimpleDateFormat)format;
        String selectedFormat=sfsd.format(anObject);
        for (int i=0; i < dataModel.getSize(); i++) {
          try {
            Object element=dataModel.getElementAt(i);
            if (!(element instanceof Date))             continue;
            String elementFormat=sfsd.format(element);
            if (selectedFormat.equals(elementFormat)) {
              found=true;
              break;
            }
          }
 catch (          RuntimeException e) {
            Debug.error(e);
          }
        }
      }
 else {
        if (dataModel instanceof ComboModelListModelWrapper) {
          found=((ComboModelListModelWrapper)dataModel).indexOf(anObject) != -1;
        }
 else         for (int i=0; i < dataModel.getSize(); i++) {
          if (anObject.equals(dataModel.getElementAt(i))) {
            found=true;
            break;
          }
        }
      }
      if (!found) {
        return;
      }
    }
    selectingItem=true;
    dataModel.setSelectedItem(anObject);
    selectingItem=false;
    if (selectedItemReminder != dataModel.getSelectedItem()) {
      selectedItemChanged();
    }
  }
  fireActionEvent();
}