Buggy code:
public class CustomerOrderEditDialogController { @ FXML private TextField artNr ; @ FXML private TextField description ; @ FXML private TextField leer ; @ FXML private ChoiceBox < String > paymentStatus ; @ FXML private DatePicker date ; @ FXML private TextField singlePrice ; @ FXML private TextField amount ; @ FXML private TextField sumPrice ; @ FXML private TextField orderNr ; private Stage dialogStage ; private CustomerOrder customerOrder ; private boolean okClicked = false ; @ FXML private void initialize ( ) { } public void setDialogStage ( Stage dialogStage ) { } public CustomerOrder getCustomerOrder ( ) { } public void setCustomerOrder ( CustomerOrder customerOrder ) { } public boolean isOkClicked ( ) { } @ FXML private void handleOk ( ) { } @ FXML private void handleCancel ( ) { } private boolean isInputValid ( ) { String errorMessage = "" ; if ( ( ( amount . getText ( ) ) == null ) || ( ( amount . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Menge!\n" ; } else { try { Integer . parseInt ( amount . getText ( ) ) ; } catch ( NumberFormatException e ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Menge<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( date . getValue ( ) ) == null ) { errorMessage += "Kein<seq2seq4repair_space>gueltiges<seq2seq4repair_space>Datum!\n" ; } if ( ( ( description . getText ( ) ) == null ) || ( ( description . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Beschreibung!\n" ; } if ( ( ( artNr . getText ( ) ) == null ) || ( ( artNr . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Artikelnummer!\n" ; } else { try { Integer . parseInt ( artNr . getText ( ) ) ; } catch ( NumberFormatException e ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Artikelnummer<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( ( orderNr . getText ( ) ) == null ) || ( ( orderNr . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Ordernummer!\n" ; } else { try { Integer . parseInt ( orderNr . getText ( ) ) ; } catch ( NumberFormatException e ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>Ordernummer<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( ( singlePrice . getText ( ) ) == null ) || ( ( singlePrice . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Kein<seq2seq4repair_space>gueltiger<seq2seq4repair_space>Unitpreis!\n" ; } else { try { <START_BUG> Integer . parseInt ( singlePrice . getText ( ) ) ; <END_BUG> } catch ( NumberFormatException e ) { errorMessage += "Kein<seq2seq4repair_space>gueltiger<seq2seq4repair_space>Unitpreis<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( ( sumPrice . getText ( ) ) == null ) || ( ( sumPrice . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Kein<seq2seq4repair_space>gueltiger<seq2seq4repair_space>Gesamtpreis!\n" ; } else { try { Double . parseDouble ( sumPrice . getText ( ) ) ; } catch ( NumberFormatException e ) { errorMessage += "Kein<seq2seq4repair_space>gueltiger<seq2seq4repair_space>Gesamtpreis<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( ( leer . getText ( ) ) == null ) || ( ( leer . getText ( ) . length ( ) ) == 0 ) ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>leer!\n" ; } else { try { Integer . parseInt ( leer . getText ( ) ) ; } catch ( NumberFormatException e ) { errorMessage += "Keine<seq2seq4repair_space>gueltige<seq2seq4repair_space>leer<seq2seq4repair_space>(muss<seq2seq4repair_space>eine<seq2seq4repair_space>Zahl<seq2seq4repair_space>sein)!\n" ; } } if ( ( errorMessage . length ( ) ) == 0 ) { return true ; } else { Alert alert = new Alert ( Alert . AlertType . ERROR ) ; alert . setTitle ( "Error!" ) ; alert . setHeaderText ( "" ) ; alert . setContentText ( errorMessage ) ; alert . showAndWait ( ) ; return false ; } } }

Fix:
Double . parseDouble ( singlePrice . getText ( ) ) ;