Program: 77931
Project: 77931
Buggy source:
@FXML private void initialize(){
  tableLogo.setEditable(true);
  colLogoID.setCellValueFactory(new PropertyValueFactory<Profile.PairLogoRelativeRectangle,Integer>("String_Node_Str"));
  colLogoName.setCellValueFactory(new PropertyValueFactory<Profile.PairLogoRelativeRectangle,Logo>("String_Node_Str"));
  colLogoName.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String>,ObservableValue<String>>(){
    public ObservableValue<String> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String> p){
      String newLabel="String_Node_Str";
      if (p.getValue().getLogo() != null)       newLabel=p.getValue().getLogo().getLabel();
      return new ReadOnlyObjectWrapper(newLabel);
    }
  }
);
  colLogoName.setCellFactory(TextFieldTableCell.forTableColumn());
  colLogoName.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,String>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,String> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (t.getNewValue().compareTo("String_Node_Str") != 0) {
          if (p.getLogo() == null) {
            Logo newLogo=pservice.addLogo(new Logo(t.getNewValue(),"String_Node_Str"));
            p.setLogo(newLogo);
          }
 else           p.getLogo().setLabel(t.getNewValue());
          LOGGER.info("String_Node_Str" + p.getLogo().getId() + "String_Node_Str"+ p.getLogo().getLabel()+ "String_Node_Str"+ p.getLogo().getPath());
          pservice.editLogo(p.getLogo());
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoX.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getX());
    }
  }
);
  colLogoX.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoX.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setX(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoY.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getY());
    }
  }
);
  colLogoY.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoY.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setY(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoBreite.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getWidth());
    }
  }
);
  colLogoBreite.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoBreite.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setWidth(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoHoehe.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getHeight());
    }
  }
);
  colLogoHoehe.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoHoehe.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setHeight(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoLogo.setStyle("String_Node_Str");
  colLogoLogo.setSortable(false);
  colLogoLogo.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String>,ObservableValue<String>>(){
    public ObservableValue<String> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String> p){
      String logoPath="String_Node_Str";
      if (p.getValue().getLogo() != null)       logoPath=p.getValue().getLogo().getPath();
      return new ReadOnlyObjectWrapper(logoPath);
    }
  }
);
  colLogoLogo.setCellFactory(new Callback<TableColumn,TableCell>(){
    @Override public TableCell call(    TableColumn p){
      return new LogoImgCell(logoList,pservice,imageHandler,windowManager.getStage());
    }
  }
);
  colLogoAktion.setStyle("String_Node_Str");
  colLogoAktion.setSortable(false);
  colLogoAktion.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Boolean>,ObservableValue<Boolean>>(){
    @Override public ObservableValue<Boolean> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Boolean> p){
      return new SimpleBooleanProperty(p.getValue() != null);
    }
  }
);
  colLogoAktion.setCellFactory(new Callback<TableColumn<Profile.PairLogoRelativeRectangle,Boolean>,TableCell<Profile.PairLogoRelativeRectangle,Boolean>>(){
    @Override public TableCell<Profile.PairLogoRelativeRectangle,Boolean> call(    TableColumn<Profile.PairLogoRelativeRectangle,Boolean> p){
      return new LogoButtonCell(logoList,pservice,windowManager.getStage(),selectedProfile.getId());
    }
  }
);
  tableLogo.getSelectionModel().selectedItemProperty().addListener((obs,oldSelection,newSelection) -> {
    if (newSelection != null) {
      Profile.PairLogoRelativeRectangle selectedLogo=(Profile.PairLogoRelativeRectangle)newSelection;
      LOGGER.info("String_Node_Str" + selectedLogo.getLogo().getPath());
      this.selectedLogo=selectedLogo;
      if (!selectedLogo.getLogo().getPath().isEmpty() && !selectedLogo.getLogo().getPath().equals("String_Node_Str") && new File(selectedLogo.getLogo().getPath()).isFile()) {
        try {
          int width=Integer.parseInt(txPreviewWidth.getText());
          int height=Integer.parseInt(txPreviewHeight.getText());
          Image image=SwingFXUtils.toFXImage(logoService.getPreviewForLogo(selectedLogo.getLogo(),selectedLogo.getRelativeRectangle(),width,height),null);
          previewLogo.setImage(image);
        }
 catch (        NumberFormatException e) {
          LOGGER.error("String_Node_Str");
        }
catch (        ServiceException e) {
          LOGGER.error("String_Node_Str");
        }
      }
 else       LOGGER.info("String_Node_Str");
    }
  }
);
  txPreviewHeight.textProperty().addListener((observable,oldValue,newValue) -> {
    changePreviewSize(newValue,0);
  }
);
  txPreviewWidth.textProperty().addListener((observable,oldValue,newValue) -> {
    changePreviewSize(newValue,1);
  }
);
}

Fixed version (ground truth):
@FXML private void initialize(){
  tableLogo.setEditable(true);
  colLogoID.setCellValueFactory(new PropertyValueFactory<Profile.PairLogoRelativeRectangle,Integer>("String_Node_Str"));
  colLogoName.setCellValueFactory(new PropertyValueFactory<Profile.PairLogoRelativeRectangle,Logo>("String_Node_Str"));
  colLogoName.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String>,ObservableValue<String>>(){
    public ObservableValue<String> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String> p){
      String newLabel="String_Node_Str";
      if (p.getValue().getLogo() != null)       newLabel=p.getValue().getLogo().getLabel();
      return new ReadOnlyObjectWrapper(newLabel);
    }
  }
);
  colLogoName.setCellFactory(TextFieldTableCell.forTableColumn());
  colLogoName.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,String>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,String> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (t.getNewValue().compareTo("String_Node_Str") != 0) {
          if (p.getLogo() == null) {
            Logo newLogo=pservice.addLogo(new Logo(t.getNewValue(),"String_Node_Str"));
            p.setLogo(newLogo);
          }
 else           p.getLogo().setLabel(t.getNewValue());
          LOGGER.info("String_Node_Str" + p.getLogo().getId() + "String_Node_Str"+ p.getLogo().getLabel()+ "String_Node_Str"+ p.getLogo().getPath());
          pservice.editLogo(p.getLogo());
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoX.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getX());
    }
  }
);
  colLogoX.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoX.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setX(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
          changePreviewSize(txPreviewHeight.getText(),0);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoY.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getY());
    }
  }
);
  colLogoY.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoY.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setY(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
          changePreviewSize(txPreviewHeight.getText(),0);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoBreite.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getWidth());
    }
  }
);
  colLogoBreite.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoBreite.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setWidth(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
          changePreviewSize(txPreviewHeight.getText(),0);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoHoehe.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double>,ObservableValue<Double>>(){
    public ObservableValue<Double> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Double> p){
      return new ReadOnlyObjectWrapper(p.getValue().getRelativeRectangle().getHeight());
    }
  }
);
  colLogoHoehe.setCellFactory(TextFieldTableCell.forTableColumn(new Double2String("String_Node_Str")));
  colLogoHoehe.setOnEditCommit(new EventHandler<TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double>>(){
    @Override public void handle(    TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
      try {
        Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
        if (!t.getNewValue().isNaN()) {
          p.getRelativeRectangle().setHeight(t.getNewValue());
          pservice.editPairLogoRelativeRectangle(p);
          changePreviewSize(txPreviewHeight.getText(),0);
        }
 else {
          refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
        }
      }
 catch (      ServiceException e) {
        try {
          refreshTableProfiles(pservice.getAllProfiles());
        }
 catch (        ServiceException e1) {
          LOGGER.error("String_Node_Str",e1);
        }
      }
    }
  }
);
  colLogoLogo.setStyle("String_Node_Str");
  colLogoLogo.setSortable(false);
  colLogoLogo.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String>,ObservableValue<String>>(){
    public ObservableValue<String> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,String> p){
      String logoPath="String_Node_Str";
      if (p.getValue().getLogo() != null)       logoPath=p.getValue().getLogo().getPath();
      return new ReadOnlyObjectWrapper(logoPath);
    }
  }
);
  colLogoLogo.setCellFactory(new Callback<TableColumn,TableCell>(){
    @Override public TableCell call(    TableColumn p){
      return new LogoImgCell(logoList,pservice,imageHandler,windowManager.getStage());
    }
  }
);
  colLogoAktion.setStyle("String_Node_Str");
  colLogoAktion.setSortable(false);
  colLogoAktion.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Boolean>,ObservableValue<Boolean>>(){
    @Override public ObservableValue<Boolean> call(    TableColumn.CellDataFeatures<Profile.PairLogoRelativeRectangle,Boolean> p){
      return new SimpleBooleanProperty(p.getValue() != null);
    }
  }
);
  colLogoAktion.setCellFactory(new Callback<TableColumn<Profile.PairLogoRelativeRectangle,Boolean>,TableCell<Profile.PairLogoRelativeRectangle,Boolean>>(){
    @Override public TableCell<Profile.PairLogoRelativeRectangle,Boolean> call(    TableColumn<Profile.PairLogoRelativeRectangle,Boolean> p){
      return new LogoButtonCell(logoList,pservice,windowManager.getStage(),selectedProfile.getId());
    }
  }
);
  tableLogo.getSelectionModel().selectedItemProperty().addListener((obs,oldSelection,newSelection) -> {
    if (newSelection != null) {
      Profile.PairLogoRelativeRectangle selectedLogo=(Profile.PairLogoRelativeRectangle)newSelection;
      LOGGER.info("String_Node_Str" + selectedLogo.getLogo().getPath());
      this.selectedLogo=selectedLogo;
      if (!selectedLogo.getLogo().getPath().isEmpty() && !selectedLogo.getLogo().getPath().equals("String_Node_Str") && new File(selectedLogo.getLogo().getPath()).isFile()) {
        try {
          int width=Integer.parseInt(txPreviewWidth.getText());
          int height=Integer.parseInt(txPreviewHeight.getText());
          Image image=SwingFXUtils.toFXImage(logoService.getPreviewForLogo(selectedLogo.getLogo(),selectedLogo.getRelativeRectangle(),width,height),null);
          previewLogo.setImage(image);
        }
 catch (        NumberFormatException e) {
          LOGGER.error("String_Node_Str");
        }
catch (        ServiceException e) {
          LOGGER.error("String_Node_Str");
        }
      }
 else       LOGGER.info("String_Node_Str");
    }
  }
);
  txPreviewHeight.textProperty().addListener((observable,oldValue,newValue) -> {
    changePreviewSize(newValue,0);
  }
);
  txPreviewWidth.textProperty().addListener((observable,oldValue,newValue) -> {
    changePreviewSize(newValue,1);
  }
);
}