Program: 86245
Project: 86245
Buggy source:
private static void generateNewPlot(TopsoilPlotType plotType,TopsoilTableController tableController,TopsoilTabPane tabs){
  NumberDataset dataset=tableController.getDataset();
  SimplePlotContext plotContext=new SimplePlotContext(dataset);
  Variable<Number> variable;
  VariableFormat<Number> format;
  for (int i=0; i < dataset.getFields().size(); i++) {
    variable=Variables.VARIABLE_LIST.get(i);
    if (variable == Variables.SIGMA_X) {
      format=tabs.getSelectedTab().getTabContent().getXUncertainty();
    }
 else     if (variable == Variables.SIGMA_Y) {
      format=tabs.getSelectedTab().getTabContent().getYUncertainty();
    }
 else {
      format=variable.getFormats().size() > 0 ? variable.getFormats().get(0) : null;
    }
    System.out.println("String_Node_Str" + variable.getName());
    System.out.println("String_Node_Str" + dataset.getFields().get(i).getName());
    System.out.println("String_Node_Str" + format.getName() + "String_Node_Str");
    plotContext.addBinding(variable,dataset.getFields().get(i),format);
  }
  List<Map<String,Object>> data=plotContext.getData();
  Plot plot=plotType.getPlot();
  plot.setData(data);
  Parent plotWindow=new PlotWindow(plot,plotType.getPropertiesPanel());
  Scene scene=new Scene(plotWindow,1200,800);
  Stage plotStage=new Stage();
  plotStage.setTitle(plotType.getName() + "String_Node_Str" + dataset.getName());
  plotStage.setOnCloseRequest(closeEvent -> tableController.getTable().removeOpenPlot(plotType));
  plotStage.setScene(scene);
  plotStage.show();
  PlotInformation plotInfo=new PlotInformation(plot,plotType);
  plotInfo.setVariableBindings(plotContext.getBindings());
  plotInfo.setStage(plotStage);
  tableController.getTable().addOpenPlot(plotInfo);
}

Fixed version (ground truth):
private static void generateNewPlot(TopsoilPlotType plotType,TopsoilTableController tableController,TopsoilTabPane tabs){
  NumberDataset dataset=tableController.getDataset();
  SimplePlotContext plotContext=new SimplePlotContext(dataset);
  Variable<Number> variable;
  VariableFormat<Number> format;
  for (int i=0; i < dataset.getFields().size(); i++) {
    variable=Variables.VARIABLE_LIST.get(i);
    if (variable == Variables.SIGMA_X) {
      format=tabs.getSelectedTab().getTabContent().getXUncertainty();
    }
 else     if (variable == Variables.SIGMA_Y) {
      format=tabs.getSelectedTab().getTabContent().getYUncertainty();
    }
 else {
      format=variable.getFormats().size() > 0 ? variable.getFormats().get(0) : null;
    }
    plotContext.addBinding(variable,dataset.getFields().get(i),format);
  }
  List<Map<String,Object>> data=plotContext.getData();
  Plot plot=plotType.getPlot();
  plot.setData(data);
  Parent plotWindow=new PlotWindow(plot,plotType.getPropertiesPanel());
  Scene scene=new Scene(plotWindow,1200,800);
  Stage plotStage=new Stage();
  plotStage.setTitle(plotType.getName() + "String_Node_Str" + dataset.getName());
  plotStage.setOnCloseRequest(closeEvent -> tableController.getTable().removeOpenPlot(plotType));
  plotStage.setScene(scene);
  plotStage.show();
  PlotInformation plotInfo=new PlotInformation(plot,plotType,plot.getProperties(),plotContext,plotStage);
  plotInfo.setVariableBindings(plotContext.getBindings());
  plotInfo.setStage(plotStage);
  tableController.getTable().addOpenPlot(plotInfo);
}