Program: 76704
Project: 76704
Buggy source:
/** 
 * Creates the field area
 * @param parent the parent composite
 */
private void createFieldArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.widthHint=200;
  composite.setLayoutData(gd);
  new Label(composite,SWT.NONE).setText(GROUP_DLG_GROUP_NAME_LABEL);
  nameEditor=new Text(composite,SWT.SINGLE | SWT.BORDER);
  nameEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  new Label(composite,SWT.NONE).setText(GROUP_DLG_GROUP_KEY_LABEL);
  Composite keyArea=new Composite(composite,SWT.NONE);
  keyArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  keyArea.setLayout(UIUtil.createGridLayoutWithoutMargin(2,false));
  keyChooser=new Combo(keyArea,SWT.DROP_DOWN);
  keyChooser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  keyChooser.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!keyChooser.getText().trim().equals("String_Node_Str")) {
        resetInterval();
      }
    }
  }
);
  keyChooser.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      if (keyChooser.getSelectionIndex() != -1) {
        tocEditor.setText(DEUtil.getExpression(columnList.get(keyChooser.getSelectionIndex())));
      }
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  keyChooser.addFocusListener(new FocusAdapter(){
    public void focusLost(    FocusEvent e){
      String key=UIUtil.convertToModelString(keyChooser.getText(),true);
      if (key != null && keyChooser.indexOf(key) != -1) {
        String tocExp=DEUtil.getExpression(columnList.get(keyChooser.indexOf(key)));
        if (!tocEditor.getText().equals(tocExp)) {
          tocEditor.setText(tocExp);
          return;
        }
      }
    }
  }
);
  Button exprButton=new Button(keyArea,SWT.PUSH);
  exprButton.setText("String_Node_Str");
  exprButton.setToolTipText(Messages.getString("String_Node_Str"));
  exprButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      ExpressionBuilder expressionBuilder=new ExpressionBuilder(getKeyExpression());
      expressionBuilder.setExpressionProvier(new ExpressionProvider(inputGroup));
      if (expressionBuilder.open() == OK) {
        setKeyExpression(expressionBuilder.getResult().trim());
        keyChooser.setFocus();
      }
    }
  }
);
  Composite intervalArea=new Composite(composite,SWT.NONE);
  intervalArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalArea.setLayout(UIUtil.createGridLayoutWithoutMargin(2,false));
  Composite intervalTypeArea=new Composite(intervalArea,SWT.NONE);
  intervalTypeArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalTypeArea.setLayout(UIUtil.createGridLayoutWithoutMargin(1,false));
  Composite intervalRangeArea=new Composite(intervalArea,SWT.NONE);
  intervalRangeArea.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  intervalRangeArea.setLayout(UIUtil.createGridLayoutWithoutMargin(1,false));
  new Label(intervalTypeArea,SWT.NONE).setText(GROUP_DLG_GROUP_INTERVAL_LABEL);
  new Label(intervalRangeArea,SWT.NONE).setText(GROUP_DLG_GROUP_RANGE_LABEL);
  intervalType=new Combo(intervalTypeArea,SWT.READ_ONLY | SWT.DROP_DOWN);
  intervalType.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  for (int i=0; i < intervalChoices.length; i++) {
    intervalType.add(intervalChoices[i].getDisplayName());
  }
  intervalType.setData(intervalChoices);
  intervalType.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      intervalRange.setEnabled(intervalType.getSelectionIndex() != 0);
      intervalBaseButton.setEnabled(intervalType.getSelectionIndex() != 0 && (getColumnType() != String.class));
      intervalBaseText.setEnabled(intervalBaseButton.getEnabled() && intervalBaseButton.getSelection());
    }
  }
);
  intervalRange=new Text(intervalRangeArea,SWT.SINGLE | SWT.BORDER);
  intervalRange.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  intervalRange.addVerifyListener(new VerifyListener(){
    public void verifyText(    VerifyEvent event){
      if (event.text.length() <= 0) {
        return;
      }
      int beginIndex=Math.min(event.start,event.end);
      int endIndex=Math.max(event.start,event.end);
      String inputtedText=intervalRange.getText();
      String newString=inputtedText.substring(0,beginIndex);
      newString+=event.text;
      newString+=inputtedText.substring(endIndex);
      event.doit=false;
      try {
        double value=Double.parseDouble(newString);
        if (value >= 0) {
          event.doit=true;
        }
      }
 catch (      NumberFormatException e) {
        return;
      }
    }
  }
);
  intervalBaseButton=new Button(composite,SWT.CHECK);
  intervalBaseButton.setText(GROUP_DLG_INTERVAL_BASE_LABEL);
  intervalBaseButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalBaseButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      intervalBaseText.setEnabled(intervalBaseButton.getSelection());
    }
  }
);
  intervalBaseText=new Text(composite,SWT.SINGLE | SWT.BORDER);
  intervalBaseText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  hideDetail=new Button(composite,SWT.CHECK);
  hideDetail.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  hideDetail.setText(GROUP_DLG_HIDE_DETAIL);
}

Fixed version (ground truth):
/** 
 * Creates the field area
 * @param parent the parent composite
 */
private void createFieldArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout());
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.widthHint=200;
  composite.setLayoutData(gd);
  new Label(composite,SWT.NONE).setText(GROUP_DLG_GROUP_NAME_LABEL);
  nameEditor=new Text(composite,SWT.SINGLE | SWT.BORDER);
  nameEditor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  new Label(composite,SWT.NONE).setText(GROUP_DLG_GROUP_KEY_LABEL);
  Composite keyArea=new Composite(composite,SWT.NONE);
  keyArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  keyArea.setLayout(UIUtil.createGridLayoutWithoutMargin(2,false));
  keyChooser=new Combo(keyArea,SWT.DROP_DOWN);
  keyChooser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  keyChooser.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (!keyChooser.getText().trim().equals("String_Node_Str")) {
        resetInterval();
      }
    }
  }
);
  keyChooser.addSelectionListener(new SelectionListener(){
    public void widgetSelected(    SelectionEvent e){
      if (keyChooser.getSelectionIndex() != -1) {
        tocEditor.setText(DEUtil.getExpression(columnList.get(keyChooser.getSelectionIndex())));
      }
    }
    public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
  keyChooser.addFocusListener(new FocusAdapter(){
    public void focusLost(    FocusEvent e){
      String key=UIUtil.convertToModelString(keyChooser.getText(),true);
      if (key != null) {
        String tocExp=null;
        if (keyChooser.indexOf(key) != -1) {
          tocExp=DEUtil.getExpression(columnList.get(keyChooser.indexOf(key)));
        }
 else {
          for (int i=0; i < columnList.size(); i++) {
            if (key.equals(DEUtil.getExpression(columnList.get(i)))) {
              tocExp=DEUtil.getExpression(columnList.get(i));
              break;
            }
          }
        }
        if (!tocEditor.getText().equals(tocExp)) {
          tocEditor.setText(tocExp);
          return;
        }
      }
    }
  }
);
  Button exprButton=new Button(keyArea,SWT.PUSH);
  exprButton.setText("String_Node_Str");
  exprButton.setToolTipText(Messages.getString("String_Node_Str"));
  exprButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      ExpressionBuilder expressionBuilder=new ExpressionBuilder(getKeyExpression());
      expressionBuilder.setExpressionProvier(new ExpressionProvider(inputGroup));
      if (expressionBuilder.open() == OK) {
        setKeyExpression(expressionBuilder.getResult().trim());
        keyChooser.setFocus();
      }
    }
  }
);
  Composite intervalArea=new Composite(composite,SWT.NONE);
  intervalArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalArea.setLayout(UIUtil.createGridLayoutWithoutMargin(2,false));
  Composite intervalTypeArea=new Composite(intervalArea,SWT.NONE);
  intervalTypeArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalTypeArea.setLayout(UIUtil.createGridLayoutWithoutMargin(1,false));
  Composite intervalRangeArea=new Composite(intervalArea,SWT.NONE);
  intervalRangeArea.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  intervalRangeArea.setLayout(UIUtil.createGridLayoutWithoutMargin(1,false));
  new Label(intervalTypeArea,SWT.NONE).setText(GROUP_DLG_GROUP_INTERVAL_LABEL);
  new Label(intervalRangeArea,SWT.NONE).setText(GROUP_DLG_GROUP_RANGE_LABEL);
  intervalType=new Combo(intervalTypeArea,SWT.READ_ONLY | SWT.DROP_DOWN);
  intervalType.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  for (int i=0; i < intervalChoices.length; i++) {
    intervalType.add(intervalChoices[i].getDisplayName());
  }
  intervalType.setData(intervalChoices);
  intervalType.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      intervalRange.setEnabled(intervalType.getSelectionIndex() != 0);
      intervalBaseButton.setEnabled(intervalType.getSelectionIndex() != 0 && (getColumnType() != String.class));
      intervalBaseText.setEnabled(intervalBaseButton.getEnabled() && intervalBaseButton.getSelection());
    }
  }
);
  intervalRange=new Text(intervalRangeArea,SWT.SINGLE | SWT.BORDER);
  intervalRange.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
  intervalRange.addVerifyListener(new VerifyListener(){
    public void verifyText(    VerifyEvent event){
      if (event.text.length() <= 0) {
        return;
      }
      int beginIndex=Math.min(event.start,event.end);
      int endIndex=Math.max(event.start,event.end);
      String inputtedText=intervalRange.getText();
      String newString=inputtedText.substring(0,beginIndex);
      newString+=event.text;
      newString+=inputtedText.substring(endIndex);
      event.doit=false;
      try {
        double value=Double.parseDouble(newString);
        if (value >= 0) {
          event.doit=true;
        }
      }
 catch (      NumberFormatException e) {
        return;
      }
    }
  }
);
  intervalBaseButton=new Button(composite,SWT.CHECK);
  intervalBaseButton.setText(GROUP_DLG_INTERVAL_BASE_LABEL);
  intervalBaseButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  intervalBaseButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      intervalBaseText.setEnabled(intervalBaseButton.getSelection());
    }
  }
);
  intervalBaseText=new Text(composite,SWT.SINGLE | SWT.BORDER);
  intervalBaseText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  hideDetail=new Button(composite,SWT.CHECK);
  hideDetail.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  hideDetail.setText(GROUP_DLG_HIDE_DETAIL);
}