Program: 62430
Project: 62430
Buggy source:
public MyTab createTab(){
  MyTab tab=new MyTab();
  tab.setOnClosed(event -> {
    this.keepClosedTab(tab);
  }
);
  tab.selectedProperty().addListener((observableValue,before,after) -> {
    if (after) {
      if (Objects.nonNull(current.currentWebView())) {
        WebEngine webEngine=current.currentEngine();
        Worker.State state=webEngine.getLoadWorker().getState();
        if (state == Worker.State.SUCCEEDED)         webEngine.executeScript("String_Node_Str");
      }
    }
  }
);
  MenuItem menuItem0=new MenuItem("String_Node_Str");
  menuItem0.setOnAction(actionEvent -> {
    this.keepClosedTab(tab);
    controller.getTabPane().getTabs().remove(tab);
  }
);
  MenuItem menuItem1=new MenuItem("String_Node_Str");
  menuItem1.setOnAction(actionEvent -> {
    ObservableList<Tab> tabs=controller.getTabPane().getTabs();
    if (tabs.size() > 0)     tabs.forEach(this::keepClosedTab);
    tabs.clear();
  }
);
  MenuItem menuItem2=new MenuItem("String_Node_Str");
  menuItem2.setOnAction(actionEvent -> {
    List<Tab> blackList=new ArrayList<>();
    blackList.addAll(controller.getTabPane().getTabs());
    blackList.remove(tab);
    controller.getTabPane().getTabs().removeAll(blackList);
    if (blackList.size() > 0)     blackList.forEach(this::keepClosedTab);
  }
);
  MenuItem menuItem3=new MenuItem("String_Node_Str");
  menuItem3.setOnAction(actionEvent -> {
    ObservableList<Tab> tabs=controller.getTabPane().getTabs();
    Predicate<Tab> filter=pTab -> !((Label)pTab.getGraphic()).getText().contains("String_Node_Str");
    List<Tab> collect=tabs.stream().filter(filter).collect(Collectors.toList());
    if (collect.size() > 0)     collect.forEach(this::keepClosedTab);
    tabs.removeAll(collect);
  }
);
  MenuItem menuItem4=new MenuItem("String_Node_Str");
  menuItem4.setOnAction(actionEvent -> {
    TabPane tabPane=controller.getTabPane();
    if (tabPane.getSelectionModel().isSelected(tabPane.getTabs().size() - 1))     tabPane.getSelectionModel().selectFirst();
 else     tabPane.getSelectionModel().selectNext();
  }
);
  MenuItem menuItem5=new MenuItem("String_Node_Str");
  menuItem5.setOnAction(actionEvent -> {
    SingleSelectionModel<Tab> selectionModel=controller.getTabPane().getSelectionModel();
    if (selectionModel.isSelected(0))     selectionModel.selectLast();
 else     selectionModel.selectPrevious();
  }
);
  MenuItem menuItem6=new MenuItem("String_Node_Str");
  menuItem6.setOnAction(actionEvent -> {
    if (closedPaths.size() > 0) {
      int index=closedPaths.size() - 1;
      closedPaths.get(index).filter(pathResolver::isAsciidoc).ifPresent(this::addTab);
      closedPaths.get(index).filter(pathResolver::isImage).ifPresent(this::addImageTab);
      closedPaths.remove(index);
    }
  }
);
  MenuItem menuItem7=new MenuItem("String_Node_Str");
  menuItem7.setOnAction(event -> {
    current.currentPath().ifPresent(path -> {
      controller.getHostServices().showDocument(path.getParent().toUri().toString());
    }
);
  }
);
  MenuItem menuItem8=new MenuItem("String_Node_Str");
  menuItem8.setOnAction(controller::newDoc);
  ContextMenu contextMenu=new ContextMenu();
  contextMenu.getItems().addAll(menuItem0,menuItem1,menuItem2,menuItem3,new SeparatorMenuItem(),menuItem4,menuItem5,menuItem6,new SeparatorMenuItem(),menuItem7,menuItem8);
  tab.contextMenuProperty().setValue(contextMenu);
  Label label=new Label();
  tab.setGraphic(label);
  label.setOnMouseClicked(mouseEvent -> {
    if (mouseEvent.getButton().equals(MouseButton.SECONDARY)) {
      controller.getTabPane().getSelectionModel().select(tab);
    }
 else     if (mouseEvent.getClickCount() > 1) {
      SplitPane splitPane=controller.getSplitPane();
      if (splitPane.getDividerPositions()[0] > 0.1)       splitPane.setDividerPositions(0,1);
 else       splitPane.setDividerPositions(0.18,0.60);
    }
  }
);
  return tab;
}

Fixed version (ground truth):
public MyTab createTab(){
  MyTab tab=new MyTab();
  tab.setOnClosed(event -> {
    this.keepClosedTab(tab);
  }
);
  tab.selectedProperty().addListener((observableValue,before,after) -> {
    if (after) {
      if (Objects.nonNull(current.currentWebView())) {
        WebEngine webEngine=current.currentEngine();
        Worker.State state=webEngine.getLoadWorker().getState();
        if (state == Worker.State.SUCCEEDED)         controller.textListener(current.currentEditorSelection());
      }
    }
  }
);
  MenuItem menuItem0=new MenuItem("String_Node_Str");
  menuItem0.setOnAction(actionEvent -> {
    this.keepClosedTab(tab);
    controller.getTabPane().getTabs().remove(tab);
  }
);
  MenuItem menuItem1=new MenuItem("String_Node_Str");
  menuItem1.setOnAction(actionEvent -> {
    ObservableList<Tab> tabs=controller.getTabPane().getTabs();
    if (tabs.size() > 0)     tabs.forEach(this::keepClosedTab);
    tabs.clear();
  }
);
  MenuItem menuItem2=new MenuItem("String_Node_Str");
  menuItem2.setOnAction(actionEvent -> {
    List<Tab> blackList=new ArrayList<>();
    blackList.addAll(controller.getTabPane().getTabs());
    blackList.remove(tab);
    controller.getTabPane().getTabs().removeAll(blackList);
    if (blackList.size() > 0)     blackList.forEach(this::keepClosedTab);
  }
);
  MenuItem menuItem3=new MenuItem("String_Node_Str");
  menuItem3.setOnAction(actionEvent -> {
    ObservableList<Tab> tabs=controller.getTabPane().getTabs();
    Predicate<Tab> filter=pTab -> !((Label)pTab.getGraphic()).getText().contains("String_Node_Str");
    List<Tab> collect=tabs.stream().filter(filter).collect(Collectors.toList());
    if (collect.size() > 0)     collect.forEach(this::keepClosedTab);
    tabs.removeAll(collect);
  }
);
  MenuItem menuItem4=new MenuItem("String_Node_Str");
  menuItem4.setOnAction(actionEvent -> {
    TabPane tabPane=controller.getTabPane();
    if (tabPane.getSelectionModel().isSelected(tabPane.getTabs().size() - 1))     tabPane.getSelectionModel().selectFirst();
 else     tabPane.getSelectionModel().selectNext();
  }
);
  MenuItem menuItem5=new MenuItem("String_Node_Str");
  menuItem5.setOnAction(actionEvent -> {
    SingleSelectionModel<Tab> selectionModel=controller.getTabPane().getSelectionModel();
    if (selectionModel.isSelected(0))     selectionModel.selectLast();
 else     selectionModel.selectPrevious();
  }
);
  MenuItem menuItem6=new MenuItem("String_Node_Str");
  menuItem6.setOnAction(actionEvent -> {
    if (closedPaths.size() > 0) {
      int index=closedPaths.size() - 1;
      closedPaths.get(index).filter(pathResolver::isAsciidoc).ifPresent(this::addTab);
      closedPaths.get(index).filter(pathResolver::isImage).ifPresent(this::addImageTab);
      closedPaths.remove(index);
    }
  }
);
  MenuItem menuItem7=new MenuItem("String_Node_Str");
  menuItem7.setOnAction(event -> {
    current.currentPath().ifPresent(path -> {
      controller.getHostServices().showDocument(path.getParent().toUri().toString());
    }
);
  }
);
  MenuItem menuItem8=new MenuItem("String_Node_Str");
  menuItem8.setOnAction(controller::newDoc);
  ContextMenu contextMenu=new ContextMenu();
  contextMenu.getItems().addAll(menuItem0,menuItem1,menuItem2,menuItem3,new SeparatorMenuItem(),menuItem4,menuItem5,menuItem6,new SeparatorMenuItem(),menuItem7,menuItem8);
  tab.contextMenuProperty().setValue(contextMenu);
  Label label=new Label();
  tab.setGraphic(label);
  label.setOnMouseClicked(mouseEvent -> {
    if (mouseEvent.getButton().equals(MouseButton.SECONDARY)) {
      controller.getTabPane().getSelectionModel().select(tab);
    }
 else     if (mouseEvent.getClickCount() > 1) {
      SplitPane splitPane=controller.getSplitPane();
      if (splitPane.getDividerPositions()[0] > 0.1)       splitPane.setDividerPositions(0,1);
 else       splitPane.setDividerPositions(0.18,0.60);
    }
  }
);
  return tab;
}