Program: 36475
Project: 36475
Buggy source:
public GridViewSkin(GridView<T,F> control){
  skin=new SkinDelegate(control);
  skin.flow.setId("String_Node_Str");
  skin.flow.setPannable(false);
  skin.flow.setVertical(true);
  skin.flow.setFocusTraversable(getSkinnable().isFocusTraversable());
  skin.flow.setCellFactory(f -> GridViewSkin.this.createCell());
  root=layHeaderTop(10,Pos.TOP_RIGHT,filterPane,skin.flow);
  filter=new Filter(control.type,control.itemsFiltered);
  updateGridViewItems();
  updateRowCount();
  skin.flow.addEventHandler(KEY_PRESSED,e -> {
    KeyCode c=e.getCode();
    if (c.isNavigationKey()) {
      if (control.selectOn.contains(SelectionOn.KEY_PRESSED)) {
        if (c == KeyCode.UP || c == KeyCode.KP_UP)         selectIfNoneOr(this::selectFirst,this::selectUp);
        if (c == KeyCode.DOWN || c == KeyCode.KP_DOWN)         selectIfNoneOr(this::selectFirst,this::selectDown);
        if (c == KeyCode.LEFT || c == KeyCode.KP_LEFT)         selectIfNoneOr(this::selectFirst,this::selectLeft);
        if (c == KeyCode.RIGHT || c == KeyCode.KP_RIGHT)         selectIfNoneOr(this::selectFirst,this::selectRight);
        if (c == KeyCode.PAGE_UP)         selectIfNoneOr(this::selectFirst,this::selectPageUp);
        if (c == KeyCode.PAGE_DOWN)         selectIfNoneOr(this::selectFirst,this::selectPageDown);
        if (c == KeyCode.HOME)         selectFirst();
        if (c == KeyCode.END)         selectLast();
      }
      e.consume();
    }
 else     if (c == ESCAPE && !e.isConsumed()) {
      if (selectedCI >= 0) {
        selectNone();
        e.consume();
      }
    }
  }
);
}

Fixed version (ground truth):
public GridViewSkin(GridView<T,F> control){
  skin=new SkinDelegate(control);
  skin.flow.setId("String_Node_Str");
  skin.flow.setPannable(false);
  skin.flow.setVertical(true);
  skin.flow.setFocusTraversable(getSkinnable().isFocusTraversable());
  skin.flow.setCellFactory(f -> GridViewSkin.this.createCell());
  control.focusedProperty().addListener((o,ov,nv) -> {
    if (nv)     getFlow().requestFocus();
  }
);
  root=layHeaderTop(10,Pos.TOP_RIGHT,filterPane,skin.flow);
  filter=new Filter(control.type,control.itemsFiltered);
  updateGridViewItems();
  updateRowCount();
  skin.flow.addEventHandler(KEY_PRESSED,e -> {
    KeyCode c=e.getCode();
    if (c.isNavigationKey()) {
      if (control.selectOn.contains(SelectionOn.KEY_PRESSED)) {
        if (c == KeyCode.UP || c == KeyCode.KP_UP)         selectIfNoneOr(this::selectFirst,this::selectUp);
        if (c == KeyCode.DOWN || c == KeyCode.KP_DOWN)         selectIfNoneOr(this::selectFirst,this::selectDown);
        if (c == KeyCode.LEFT || c == KeyCode.KP_LEFT)         selectIfNoneOr(this::selectFirst,this::selectLeft);
        if (c == KeyCode.RIGHT || c == KeyCode.KP_RIGHT)         selectIfNoneOr(this::selectFirst,this::selectRight);
        if (c == KeyCode.PAGE_UP)         selectIfNoneOr(this::selectFirst,this::selectPageUp);
        if (c == KeyCode.PAGE_DOWN)         selectIfNoneOr(this::selectFirst,this::selectPageDown);
        if (c == KeyCode.HOME)         selectFirst();
        if (c == KeyCode.END)         selectLast();
      }
      e.consume();
    }
 else     if (c == ESCAPE && !e.isConsumed()) {
      if (selectedCI >= 0) {
        selectNone();
        e.consume();
      }
    }
  }
);
}