Program: 36594
Project: 36594
Buggy source:
/** 
 * @param main_field field that will denote main column. Must not be null.Also initializes  {@link #searchField}.
 * @param main_field be chosen as main and default search field
 * @param backing_list
 */
public FilteredTable(F main_field,ObservableList<T> backing_list){
  super((Class<F>)main_field.getClass());
  searchField=main_field;
  allitems=backing_list;
  filtereditems=new FilteredList<>(allitems);
  sortedItems=new SortedList<>(filtereditems);
  itemsPredicate=filtereditems.predicateProperty();
  setItems(sortedItems);
  sortedItems.comparatorProperty().bind(comparatorProperty());
  VBox.setVgrow(this,ALWAYS);
  items_info.bind(this);
  sizeOf(menuAdd.getItems(),size -> menuAdd.setDisable(size == 0));
  sizeOf(menuRemove.getItems(),size -> menuRemove.setDisable(size == 0));
  sizeOf(menuSelected.getItems(),size -> menuSelected.setDisable(size == 0));
  sizeOf(menuOrder.getItems(),size -> menuOrder.setDisable(size == 0));
  filterPane=new TableFilterGenerator(filtereditems,main_field);
  filterPane.getNode().setVisible(false);
  filterPane.getNode().addEventFilter(KEY_PRESSED,e -> {
    if (e.getCode() == ESCAPE) {
      if (filterPane.isEmpty())       filterVisible.set(false);
 else       filterPane.clear();
      e.consume();
    }
    if (e.getCode() == F && e.isShortcutDown()) {
      filterVisible.set(false);
      requestFocus();
    }
  }
);
  addEventHandler(KEY_PRESSED,e -> {
    if (e.getCode() == F && e.isShortcutDown()) {
      filterVisible.set(!filterVisible.get());
      if (!filterVisible.get())       requestFocus();
      return;
    }
    if (e.isAltDown() || e.isControlDown() || e.isShiftDown())     return;
    KeyCode k=e.getCode();
    if (k == ESCAPE) {
      if (filterPane.isEmpty())       filterVisible.set(false);
 else       filterPane.clear();
      e.consume();
    }
    if (k.isDigitKey() || k.isLetterKey()) {
      String st=e.getText().toLowerCase();
      long now=System.currentTimeMillis();
      boolean append=scrolFTime == -1 || now - scrolFTime < scrolFTimeMax.toMillis();
      scrolFtext=append ? scrolFtext + st : st;
      scrolFTime=now;
      search(scrolFtext);
    }
  }
);
  addEventFilter(KEY_PRESSED,e -> {
    if (e.getCode() == ESCAPE && !scrolFtext.isEmpty()) {
      searchEnd();
      e.consume();
    }
  }
);
  addEventFilter(Event.ANY,e -> updateSearchStyles());
  changesOf(getItems()).subscribe(c -> updateSearchStyles());
  changesOf(filtereditems.predicateProperty()).subscribe(c -> resizeIndexColumn());
  changesOf(allitems).subscribe(c -> resizeIndexColumn());
  footerVisible.set(true);
}

Fixed version (ground truth):
/** 
 * @param main_field field that will denote main column. Must not be null.Also initializes  {@link #searchField}.
 * @param main_field be chosen as main and default search field
 * @param backing_list
 */
public FilteredTable(F main_field,ObservableList<T> backing_list){
  super((Class<F>)main_field.getClass());
  searchField=main_field;
  allitems=backing_list;
  filtereditems=new FilteredList<>(allitems);
  sortedItems=new SortedList<>(filtereditems);
  itemsPredicate=filtereditems.predicateProperty();
  setItems(sortedItems);
  sortedItems.comparatorProperty().bind(comparatorProperty());
  VBox.setVgrow(this,ALWAYS);
  items_info.bind(this);
  sizeOf(menuAdd.getItems(),size -> menuAdd.setDisable(size == 0));
  sizeOf(menuRemove.getItems(),size -> menuRemove.setDisable(size == 0));
  sizeOf(menuSelected.getItems(),size -> menuSelected.setDisable(size == 0));
  sizeOf(menuOrder.getItems(),size -> menuOrder.setDisable(size == 0));
  filterPane=new TableFilterGenerator(filtereditems,main_field);
  filterPane.getNode().setVisible(false);
  filterPane.getNode().addEventFilter(KEY_PRESSED,e -> {
    if (e.getCode() == ESCAPE) {
      if (filterPane.isEmpty())       filterVisible.set(false);
 else       filterPane.clear();
      e.consume();
    }
    if (e.getCode() == F && e.isShortcutDown()) {
      filterVisible.set(false);
      requestFocus();
    }
  }
);
  addEventHandler(KEY_PRESSED,e -> {
    if (e.getCode() == F && e.isShortcutDown()) {
      filterVisible.set(!filterVisible.get());
      if (!filterVisible.get())       requestFocus();
      return;
    }
    if (e.isAltDown() || e.isControlDown() || e.isShiftDown())     return;
    KeyCode k=e.getCode();
    if (k == ESCAPE) {
      if (filterPane.isEmpty())       filterVisible.set(false);
 else       filterPane.clear();
      e.consume();
    }
    if (k.isDigitKey() || k.isLetterKey()) {
      String st=e.getText().toLowerCase();
      long now=System.currentTimeMillis();
      boolean append=scrolFTime == -1 || now - scrolFTime < scrolFTimeMax.toMillis();
      scrolFtext=append ? scrolFtext + st : st;
      scrolFTime=now;
      search(scrolFtext);
    }
  }
);
  addEventFilter(KEY_PRESSED,e -> {
    if (e.getCode() == ESCAPE && !scrolFtext.isEmpty()) {
      searchEnd();
      e.consume();
    }
  }
);
  addEventFilter(Event.ANY,e -> updateSearchStyles());
  changesOf(getItems()).subscribe(c -> updateSearchStyles());
  changesOf(getItems()).subscribe(c -> resizeIndexColumn());
  footerVisible.set(true);
}