Buggy code:
private static final Pattern PATTERN_DATE = Pattern . compile ( "([1-9][0-9]{3})-(0[1-9]|1[0-2])-([0-3][0-9])" ) ; private static final SimpleDateFormat FORMAT_DATE = new SimpleDateFormat ( "yyyy-MM-dd" ) ; private XmlBasedTestDataProvider xmlProvider ; private Map < String , Object > precalcOtherFields ; public StringEditorDialog ( Shell parentShell , ITestDataFieldValue fieldValue , ITestDataFieldMetadata fieldMetadata ) { } @ Override protected Control createDialogArea ( Composite parent ) { Composite client = ( ( Composite ) ( super . createDialogArea ( parent ) ) ) ; Composite c = new Composite ( client , SWT . NONE ) ; c . setLayoutData ( new GridData ( GridData . FILL_BOTH ) ) ; c . setLayout ( new GridLayout ( 1 , false ) ) ; btnPlainValue = new Button ( c , SWT . RADIO ) ; btnPlainValue . setText ( "Plain<seq2seq4repair_space>value:" ) ; plainValueControl = createPlainValueControl ( c ) ; GridData gd = new GridData ( GridData . FILL_HORIZONTAL ) ; gd . horizontalIndent = 16 + ( FieldDecorationRegistry . getDefault ( ) . getMaximumDecorationWidth ( ) ) ; gd . widthHint = 300 ; plainValueControl . setLayoutData ( gd ) ; btnScript = new Button ( c , SWT . RADIO ) ; btnScript . setText ( "Script<seq2seq4repair_space>result:" ) ; gd = new GridData ( SWT . LEFT , SWT . TOP , false , false ) ; gd . verticalIndent = 8 ; btnScript . setLayoutData ( gd ) ; Composite cpo = new Composite ( c , SWT . NONE ) ; cpo . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; cpo . setLayout ( new GridLayout ( 2 , false ) ) ; txtScript = new Text ( cpo , ( ( SWT . BORDER ) | ( SWT . LEFT ) ) ) ; gd = new GridData ( GridData . FILL_HORIZONTAL ) ; gd . horizontalIndent = 16 + ( FieldDecorationRegistry . getDefault ( ) . getMaximumDecorationWidth ( ) ) ; gd . widthHint = 300 ; txtScript . setLayoutData ( gd ) ; FieldDecoration fdec = FieldDecorationRegistry . getDefault ( ) . getFieldDecoration ( DEC_CONTENT_PROPOSAL ) ; ControlDecoration cdec = new ControlDecoration ( txtScript , ( ( SWT . TOP ) | ( SWT . LEFT ) ) ) ; cdec . setImage ( fdec . getImage ( ) ) ; cdec . setDescriptionText ( "Any<seq2seq4repair_space>ECMAScript<seq2seq4repair_space>expression<seq2seq4repair_space>is<seq2seq4repair_space>supported.<seq2seq4repair_space>Strg+Space<seq2seq4repair_space>for<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>available<seq2seq4repair_space>fields;<seq2seq4repair_space>click<seq2seq4repair_space>script<seq2seq4repair_space>button<seq2seq4repair_space>for<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>available<seq2seq4repair_space>functions." ) ; cdec . setShowOnlyOnFocus ( false ) ; JavaScriptContentProposalProvider . attachToComponent ( txtScript , jsVarsSource ) ; btnFunction = new Button ( cpo , SWT . PUSH ) ; btnFunction . setImage ( FUNCTION . getImage ( ) ) ; btnFunction . addSelectionListener ( new SelectionAdapter ( ) { @ Override public void widgetSelected ( SelectionEvent e ) { openFunctionDialog ( ) ; } } ) ; Label lbl = new Label ( c , SWT . LEFT ) ; lbl . setText ( "Preview:<seq2seq4repair_space>" ) ; if ( ( fieldMetadata . getFormatterPattern ( ) ) != null ) { lbl = new Label ( c , SWT . LEFT ) ; lbl . setText ( ( "<seq2seq4repair_space>Active<seq2seq4repair_space>format<seq2seq4repair_space>pattern:<seq2seq4repair_space>" + ( fieldMetadata . getFormatterPattern ( ) ) ) ) ; } Composite c1 = new Composite ( c , SWT . NONE ) ; FillLayout fl = new FillLayout ( ) ; fl . marginWidth = 25 ; c1 . setLayout ( fl ) ; c1 . setLayoutData ( new GridData ( GridData . FILL_HORIZONTAL ) ) ; cpo = new Composite ( c1 , SWT . BORDER ) ; gd = new GridData ( SWT . CENTER , SWT . END , true , false ) ; gd . widthHint = 240 ; gd . heightHint = 60 ; fl = new FillLayout ( ) ; fl . marginHeight = 20 ; cpo . setLayout ( fl ) ; lblPreview = new Label ( cpo , SWT . CENTER ) ; lblPreview . setText ( "This<seq2seq4repair_space>could<seq2seq4repair_space>be<seq2seq4repair_space>YOUR<seq2seq4repair_space>preview." ) ; SelectionAdapter selAdapter = new SelectionAdapter ( ) { @ Override public void widgetSelected ( SelectionEvent e ) { updateControlsEnabled ( ) ; updatePreview ( ) ; } } ; btnPlainValue . addSelectionListener ( selAdapter ) ; btnScript . addSelectionListener ( selAdapter ) ; btnPlainValue . setSelection ( ( ! ( fieldValue . isScript ( ) ) ) ) ; btnScript . setSelection ( fieldValue . isScript ( ) ) ; txtScript . addModifyListener ( new ModifyListener ( ) { @ Override public void modifyText ( ModifyEvent e ) { updatePreview ( ) ; } } ) ; String val = ( ( org . aludratest . eclipse . vde . model . IStringValue ) ( fieldValue . getFieldValue ( ) ) ) . getValue ( ) ; if ( ! ( fieldValue . isScript ( ) ) ) { setValueToPlainValueControl ( ( val == null ? "" : val ) ) ; } else { <START_BUG> txtScript . setText ( val ) ; <END_BUG> } updatePreview ( ) ; updateControlsEnabled ( ) ; getShell ( ) . setText ( "Edit<seq2seq4repair_space>field<seq2seq4repair_space>value" ) ; setTitle ( "Edit<seq2seq4repair_space>field<seq2seq4repair_space>value" ) ; setMessage ( "Set<seq2seq4repair_space>the<seq2seq4repair_space>value<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>field.<seq2seq4repair_space>Either<seq2seq4repair_space>enter<seq2seq4repair_space>or<seq2seq4repair_space>select<seq2seq4repair_space>a<seq2seq4repair_space>plain<seq2seq4repair_space>value,<seq2seq4repair_space>or<seq2seq4repair_space>use<seq2seq4repair_space>a<seq2seq4repair_space>script<seq2seq4repair_space>for<seq2seq4repair_space>dynamic<seq2seq4repair_space>field<seq2seq4repair_space>value<seq2seq4repair_space>calculation." ) ; return client ; } private Callable < Set < String > > jsVarsSource = new Callable < Set < String > > ( ) { @ Override public Set < String > call ( ) { } } ; private void updateControlsEnabled ( ) { } private void updatePreview ( ) { } private void openFunctionDialog ( ) { } @ Override protected void okPressed ( ) { } private Control createPlainValueControl ( Composite parent ) { } private void setValueToPlainValueControl ( String value ) { } private String getPlainValueFromControl ( ) { } private Date getDateFromPlainValueControl ( ) { } private String getFormattedPlainValueFromControl ( ) { } private String toTwoDigits ( int value ) { } private XmlBasedTestDataProvider createTestDataProvider ( ) { } private void calculateOtherFields ( ) { } private static void setVariableValueInObject ( Object object , String fieldName , Object value ) { } private static Locale toLocale ( String s ) { } }

Fix:
txtScript . setText ( ( val == null ? "" : val ) ) ;