Buggy code:
} return new StandardRelease ( tags . get ( ) , group . getValue ( ) , assumeExistence ) ; } return null ; } ) ; } } private static class CrossGroupCompatibilityDialogController extends WatcherDialogs . AbstractBeanDialogController < CrossGroupCompatibility > { @ FXML private TextField compatibleGroupTxtFld ; @ FXML private TextField sourceGroupTxtFld ; @ FXML private CheckBox symmetricCheckBox ; private CrossGroupCompatibilityDialogController ( CrossGroupCompatibility bean ) { } @ Override protected String buildTitle ( ) { } @ Override protected Node getDefaultFocusNode ( ) { } @ Override protected void initInputPaneControl ( ) { Group initialCompatibleGroup = null ; Group initialSourceGroup = null ; boolean initialSymmetric = false ; if ( ( bean ) == null ) { initialCompatibleGroup = null ; initialSourceGroup = null ; initialSymmetric = false ; } else { initialCompatibleGroup = bean . getCompatibleGroup ( ) ; initialSourceGroup = bean . getSourceGroup ( ) ; initialSymmetric = bean . isSymmetric ( ) ; } Property < Group > compatibleGroup = SubCentralFXUtil . groupPropertyForTextField ( compatibleGroupTxtFld , initialCompatibleGroup ) ; Property < Group > sourceGroup = SubCentralFXUtil . groupPropertyForTextField ( sourceGroupTxtFld , initialSourceGroup ) ; symmetricCheckBox . setSelected ( initialSymmetric ) ; Node applyButton = dialog . getDialogPane ( ) . lookupButton ( ButtonType . APPLY ) ; applyButton . disableProperty ( ) . bind ( new BooleanBinding ( ) { @ Override protected boolean computeValue ( ) { return ( ( ( compatibleGroup . getValue ( ) ) == null ) || ( ( sourceGroup . getValue ( ) ) == null ) ) || ( compatibleGroup . getValue ( ) . equals ( sourceGroup . getValue ( ) ) ) ; } } ) ; dialog . setResultConverter ( ( dialogButton ) -> { if ( dialogButton == ButtonType . APPLY ) { Group sourceGrp = sourceGroup . getValue ( ) ; Group compatibleGrp = compatibleGroup . getValue ( ) ; boolean symmetric = symmetricCheckBox . isSelected ( ) ; return new CrossGroupCompatibility ( sourceGrp , compatibleGrp , symmetric ) ; } return null ; } ) ; } } private static class SeriesNameStandardizerSettingEntryDialogController extends WatcherDialogs . AbstractBeanDialogController < SeriesNameStandardizerSettingEntry > { @ FXML private RadioButton literalRadioBtn ; @ FXML private RadioButton simplePatternRadioBtn ; @ FXML private RadioButton regexRadioBtn ; @ FXML private TextField namePatternTxtFld ; @ FXML private Label patternErrorLbl ; @ FXML private TextField nameReplacementTxtFld ; private SeriesNameStandardizerSettingEntryDialogController ( SeriesNameStandardizerSettingEntry bean ) { } @ Override protected String buildTitle ( ) { } @ Override protected Node getDefaultFocusNode ( ) { } @ Override protected void initInputPaneControl ( ) { ToggleGroup patternModeToggleGrp = new ToggleGroup ( ) ; patternModeToggleGrp . getToggles ( ) . setAll ( literalRadioBtn , simplePatternRadioBtn , regexRadioBtn ) ; Toggle initialPatternMode ; String initialNamePattern ; String initialNameReplacement ; if ( ( bean ) == null ) { initialPatternMode = literalRadioBtn ; initialNamePattern = null ; initialNameReplacement = null ; } else { switch ( bean . getNameUiPattern ( ) . getPatternMode ( ) ) { case LITERAL : initialPatternMode = literalRadioBtn ; break ; case SIMPLE : initialPatternMode = simplePatternRadioBtn ; break ; case REGEX : initialPatternMode = regexRadioBtn ; break ; default : initialPatternMode = literalRadioBtn ; } initialNamePattern = bean . getNameUiPattern ( ) . getPattern ( ) ; initialNameReplacement = bean . getValue ( ) . getNameReplacement ( ) ; } patternModeToggleGrp . selectToggle ( initialPatternMode ) ; namePatternTxtFld . setText ( initialNamePattern ) ; nameReplacementTxtFld . setText ( initialNameReplacement ) ; Binding < UiPattern > namePatternBinding = FXUtil . createUiPatternTextFieldBinding ( patternModeToggleGrp , literalRadioBtn , simplePatternRadioBtn , regexRadioBtn , namePatternTxtFld , patternErrorLbl ) ; Node applyButton = dialog . getDialogPane ( ) . lookupButton ( ButtonType . APPLY ) ; applyButton . disableProperty ( ) . bind ( new BooleanBinding ( ) { @ Override protected boolean computeValue ( ) { return ( ( namePatternBinding . getValue ( ) ) == null ) || ( StringUtils . isBlank ( nameReplacementTxtFld . getText ( ) ) ) ; } } ) ; dialog . setResultConverter ( ( dialogButton ) -> { if ( dialogButton == ButtonType . APPLY ) { <START_BUG> String nameReplacement = StringUtils . trimToNull ( namePatternTxtFld . getText ( ) ) ; <END_BUG> boolean enabled = ( ( bean ) == null ) ? true : bean . isEnabled ( ) ; return new SeriesNameStandardizerSettingEntry ( namePatternBinding . getValue ( ) , nameReplacement , enabled ) ; } return null ; } ) ; } } private static class ReleaseTagsStandardizerSettingEntryDialogController extends WatcherDialogs . AbstractBeanDialogController < ReleaseTagsStandardizerSettingEntry > { @ FXML private RadioButton containRadioBtn ; @ FXML private RadioButton equalRadioBtn ; @ FXML private TextField queryTagsTxtFld ; @ FXML private CheckBox ignoreOrderCheckBox ; @ FXML private RadioButton matchRadioBtn ; @ FXML private RadioButton completeRadioBtn ; @ FXML private TextField replacementTxtFld ; private ReleaseTagsStandardizerSettingEntryDialogController ( ReleaseTagsStandardizerSettingEntry bean ) { } @ Override protected String buildTitle ( ) { } @ Override protected Node getDefaultFocusNode ( ) { } @ Override protected void initInputPaneControl ( ) { ToggleGroup queryModeToggleGrp = new ToggleGroup ( ) ; queryModeToggleGrp . getToggles ( ) . addAll ( containRadioBtn , equalRadioBtn ) ; ToggleGroup replaceWithToggleGrp = new ToggleGroup ( ) ; replaceWithToggleGrp . getToggles ( ) . addAll ( matchRadioBtn , completeRadioBtn ) ; Toggle initialQueryModeToggle ; List < Tag > initialQueryTags ; boolean initialIgnoreOrder ; Toggle initialReplaceWithToggle ; if ( ( bean ) == null ) { initialQueryModeToggle = containRadioBtn ; initialQueryTags = ImmutableList . of ( ) ; initialIgnoreOrder = false ; initialReplaceWithToggle = matchRadioBtn ; } else { TagsReplacer replacer = bean . getValue ( ) . getReplacer ( ) ; switch ( replacer . getQueryMode ( ) ) { case CONTAIN : initialQueryModeToggle = containRadioBtn ; break ; case EQUAL : initialQueryModeToggle = equalRadioBtn ; break ; default : initialQueryModeToggle = containRadioBtn ; } initialQueryTags = replacer . getQueryTags ( ) ; initialIgnoreOrder = replacer . getIgnoreOrder ( ) ; switch ( replacer . getReplaceMode ( ) ) { case MATCHED_SEQUENCE : initialReplaceWithToggle = matchRadioBtn ;

Fix:
String nameReplacement = StringUtils . trimToNull ( nameReplacementTxtFld . getText ( ) ) ;