Program: 69038
Project: 69038
Buggy source:
private void createCurrencySettingPart(Composite parent){
  Group setting;
  if (isFormStyle) {
    setting=FormWidgetFactory.getInstance().createGroup(parent,"String_Node_Str");
  }
 else {
    setting=new Group(parent,SWT.NONE);
  }
  setting.setText(LABEL_CURRENCY_SETTINGS_GROUP);
  setting.setLayoutData(createGridData4Part());
  GridLayout layout=new GridLayout(2,false);
  layout.marginHeight=4;
  layout.verticalSpacing=5;
  setting.setLayout(layout);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_DECIMAL_PLACES);
  cPlacesChoice=new XCombo(setting,false,isFormStyle);
  ;
  cPlacesChoice.setItems(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  cPlacesChoice.setLayoutData(data);
  cPlacesChoice.addSelectionListener(mySelectionListener);
  cPlacesChoice.addModifyListener(myModifyListener);
  cPlacesChoice.addFocusListener(myFocusListener);
  cPlacesChoice.select(2);
  cUseSep=FormWidgetFactory.getInstance().createButton(setting,SWT.CHECK,isFormStyle);
  cUseSep.setText(LABEL_USE_1000S_SEPARATOR);
  data=new GridData();
  data.horizontalSpan=2;
  cUseSep.setLayoutData(data);
  cUseSep.addSelectionListener(mySelectionListener);
  cUseSpace=FormWidgetFactory.getInstance().createButton(setting,SWT.CHECK,isFormStyle);
  cUseSpace.setText(LABEL_USE_SYMBOL_SPACE);
  data=new GridData();
  data.horizontalSpan=2;
  cUseSpace.setLayoutData(data);
  cUseSpace.addSelectionListener(mySelectionListener);
  cUseSpace.setEnabled(false);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_CURRENCY_SYMBOL);
  cSymbolChoice=new XCombo(setting,true,isFormStyle);
  ;
  cSymbolChoice.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  cSymbolChoice.setItems(FormatCurrencyNumPattern.BUILT_IN_SYMBOLS);
  cSymbolChoice.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      if (cSymbolChoice.getSelectionIndex() == 0) {
        cSymPosChoice.deselectAll();
        cSymPosChoice.setEnabled(false);
        cUseSpace.setEnabled(false);
      }
 else {
        if (!cSymPosChoice.isEnabled()) {
          cSymPosChoice.setEnabled(true);
          cSymPosChoice.select(1);
        }
        cUseSpace.setEnabled(true);
      }
      updatePreview();
      notifyFormatChange();
    }
  }
);
  cSymbolChoice.select(0);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_SYMBOL_POSITION);
  cSymPosChoice=new XCombo(setting,true,isFormStyle);
  cSymPosChoice.setItems(new String[]{FormatNumberPattern.SYMBOL_POSITION_AFTER,FormatNumberPattern.SYMBOL_POSITION_BEFORE});
  cSymPosChoice.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  cSymPosChoice.addSelectionListener(mySelectionListener);
  cSymPosChoice.setEnabled(false);
  Label label=FormWidgetFactory.getInstance().createLabel(setting,isFormStyle);
  label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  label.setText(LABEL_NEGATIVE_NUMBERS);
  if (isFormStyle) {
    cNegNumChoice=FormWidgetFactory.getInstance().createList(setting,SWT.SINGLE);
  }
 else {
    cNegNumChoice=new List(setting,SWT.SINGLE | SWT.BORDER);
  }
  cNegNumChoice.add("String_Node_Str" + DEFAULT_PREVIEW_TEXT);
  cNegNumChoice.add("String_Node_Str" + DEFAULT_PREVIEW_TEXT + "String_Node_Str");
  data=new GridData(GridData.FILL_BOTH);
  cNegNumChoice.setLayoutData(data);
  cNegNumChoice.addSelectionListener(mySelectionListener);
  cNegNumChoice.select(0);
}

Fixed version (ground truth):
private void createCurrencySettingPart(Composite parent){
  Group setting;
  if (isFormStyle) {
    setting=FormWidgetFactory.getInstance().createGroup(parent,"String_Node_Str");
  }
 else {
    setting=new Group(parent,SWT.NONE);
  }
  setting.setText(LABEL_CURRENCY_SETTINGS_GROUP);
  setting.setLayoutData(createGridData4Part());
  GridLayout layout=new GridLayout(2,false);
  layout.marginHeight=4;
  layout.verticalSpacing=5;
  setting.setLayout(layout);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_DECIMAL_PLACES);
  cPlacesChoice=new XCombo(setting,false,isFormStyle);
  ;
  cPlacesChoice.setItems(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"});
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  cPlacesChoice.setLayoutData(data);
  cPlacesChoice.addSelectionListener(mySelectionListener);
  cPlacesChoice.addModifyListener(myModifyListener);
  cPlacesChoice.addFocusListener(myFocusListener);
  cPlacesChoice.select(2);
  cUseSep=FormWidgetFactory.getInstance().createButton(setting,SWT.CHECK,isFormStyle);
  cUseSep.setText(LABEL_USE_1000S_SEPARATOR);
  data=new GridData();
  data.horizontalSpan=2;
  cUseSep.setLayoutData(data);
  cUseSep.addSelectionListener(mySelectionListener);
  cUseSpace=FormWidgetFactory.getInstance().createButton(setting,SWT.CHECK,isFormStyle);
  cUseSpace.setText(LABEL_USE_SYMBOL_SPACE);
  data=new GridData();
  data.horizontalSpan=2;
  cUseSpace.setLayoutData(data);
  cUseSpace.addSelectionListener(mySelectionListener);
  cUseSpace.setEnabled(false);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_CURRENCY_SYMBOL);
  cSymbolChoice=new XCombo(setting,true,isFormStyle);
  ;
  cSymbolChoice.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  cSymbolChoice.setItems(FormatCurrencyNumPattern.BUILT_IN_SYMBOLS);
  cSymbolChoice.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      if (cSymbolChoice.getSelectionIndex() == 0) {
        cSymPosChoice.deselectAll();
        cSymPosChoice.setEnabled(false);
        cUseSpace.setEnabled(false);
      }
 else {
        if (!cSymPosChoice.isEnabled()) {
          cSymPosChoice.setEnabled(true);
          String defaultPosition=FormatCurrencyNumPattern.getDefaultSymbolPosition(getLocale());
          if (defaultPosition != null) {
            cSymPosChoice.setText(defaultPosition);
          }
 else {
            cSymPosChoice.select(1);
          }
        }
        if (!cUseSpace.isEnabled()) {
          cUseSpace.setEnabled(true);
          boolean defaultUseSpace=FormatCurrencyNumPattern.getDefaultUsingSymbolSpace(getLocale());
          cUseSpace.setSelection(defaultUseSpace);
        }
      }
      updatePreview();
      notifyFormatChange();
    }
  }
);
  cSymbolChoice.select(0);
  FormWidgetFactory.getInstance().createLabel(setting,isFormStyle).setText(LABEL_SYMBOL_POSITION);
  cSymPosChoice=new XCombo(setting,true,isFormStyle);
  cSymPosChoice.setItems(new String[]{FormatNumberPattern.SYMBOL_POSITION_AFTER,FormatNumberPattern.SYMBOL_POSITION_BEFORE});
  cSymPosChoice.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  cSymPosChoice.addSelectionListener(mySelectionListener);
  cSymPosChoice.setEnabled(false);
  Label label=FormWidgetFactory.getInstance().createLabel(setting,isFormStyle);
  label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  label.setText(LABEL_NEGATIVE_NUMBERS);
  if (isFormStyle) {
    cNegNumChoice=FormWidgetFactory.getInstance().createList(setting,SWT.SINGLE);
  }
 else {
    cNegNumChoice=new List(setting,SWT.SINGLE | SWT.BORDER);
  }
  cNegNumChoice.add("String_Node_Str" + DEFAULT_PREVIEW_TEXT);
  cNegNumChoice.add("String_Node_Str" + DEFAULT_PREVIEW_TEXT + "String_Node_Str");
  data=new GridData(GridData.FILL_BOTH);
  cNegNumChoice.setLayoutData(data);
  cNegNumChoice.addSelectionListener(mySelectionListener);
  cNegNumChoice.select(0);
}