Program: 66282
Project: 66282
Buggy source:
private void handleCalculationSelectEvent(){
  Control[] children=calculationComposite.getChildren();
  for (int i=0; i < children.length; i++) {
    children[i].dispose();
  }
  ITimeFunction function=getTimeFunctionByIndex(calculationType.getSelectionIndex());
  if (function == null) {
    ((GridData)calculationComposite.getLayoutData()).heightHint=0;
    ((GridData)calculationComposite.getLayoutData()).exclude=true;
  }
 else {
    calculationParamsMap.clear();
    List<IArgumentInfo> infos=function.getArguments();
    if (infos == null || infos.size() == 0) {
      ((GridData)calculationComposite.getLayoutData()).heightHint=0;
    }
 else {
      ((GridData)calculationComposite.getLayoutData()).exclude=false;
      ((GridData)calculationComposite.getLayoutData()).heightHint=SWT.DEFAULT;
      int width=0;
      if (calculationComposite.getParent().getLayout() instanceof GridLayout) {
        Control[] controls=calculationComposite.getParent().getChildren();
        for (int i=0; i < controls.length; i++) {
          if (controls[i] instanceof Label && ((GridData)controls[i].getLayoutData()).horizontalSpan == 1) {
            int labelWidth=controls[i].getBounds().width - controls[i].getBorderWidth() * 2;
            if (labelWidth > width)             width=labelWidth;
          }
        }
      }
      for (int i=0; i < infos.size(); i++) {
        final String name=infos.get(i).getName();
        Label lblParam=new Label(calculationComposite,SWT.NONE);
        lblParam.setText(infos.get(i).getName() + "String_Node_Str");
        GridData gd=new GridData();
        gd.widthHint=lblParam.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
        if (gd.widthHint < width)         gd.widthHint=width;
        lblParam.setLayoutData(gd);
        final List<Period_Type> types=infos.get(i).getPeriodChoices();
        if (types != null && types.size() > 0) {
          final Combo cmbDataField=new Combo(calculationComposite,SWT.BORDER | SWT.READ_ONLY);
          cmbDataField.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).span(3,1).create());
          cmbDataField.setVisibleItemCount(30);
          initCalculationDataFields(cmbDataField,name,types);
          cmbDataField.addModifyListener(new ModifyListener(){
            public void modifyText(            ModifyEvent e){
              modifyDialogContent();
              validate();
              calculationParamsValueMap.put(name,cmbDataField.getText());
            }
          }
);
          calculationParamsMap.put(name,cmbDataField);
        }
 else {
          final Text txtParam=new Text(calculationComposite,SWT.BORDER);
          initCalculationTextFild(txtParam,name);
          txtParam.addModifyListener(new ModifyListener(){
            public void modifyText(            ModifyEvent e){
              modifyDialogContent();
              validate();
              calculationParamsValueMap.put(name,txtParam.getText());
            }
          }
);
          GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
          gridData.horizontalIndent=0;
          gridData.horizontalSpan=2;
          txtParam.setLayoutData(gridData);
          createExpressionButton(calculationComposite,txtParam);
          calculationParamsMap.put(name,txtParam);
        }
      }
    }
    List<IArgumentInfo> infos1=function.getArguments();
  }
  composite.layout(true,true);
  setContentSize(composite);
}

Fixed version (ground truth):
private void handleCalculationSelectEvent(){
  Control[] children=calculationComposite.getChildren();
  for (int i=0; i < children.length; i++) {
    children[i].dispose();
  }
  ITimeFunction function=getTimeFunctionByIndex(calculationType.getSelectionIndex());
  if (function == null) {
    ((GridData)calculationComposite.getLayoutData()).heightHint=0;
    ((GridData)calculationComposite.getLayoutData()).exclude=true;
  }
 else {
    calculationParamsMap.clear();
    List<IArgumentInfo> infos=function.getArguments();
    if (infos == null || infos.size() == 0) {
      ((GridData)calculationComposite.getLayoutData()).heightHint=0;
    }
 else {
      ((GridData)calculationComposite.getLayoutData()).exclude=false;
      ((GridData)calculationComposite.getLayoutData()).heightHint=SWT.DEFAULT;
      int width=0;
      if (calculationComposite.getParent().getLayout() instanceof GridLayout) {
        Control[] controls=calculationComposite.getParent().getChildren();
        for (int i=0; i < controls.length; i++) {
          if (controls[i] instanceof Label && ((GridData)controls[i].getLayoutData()).horizontalSpan == 1) {
            int labelWidth=controls[i].getBounds().width - controls[i].getBorderWidth() * 2;
            if (labelWidth > width)             width=labelWidth;
          }
        }
      }
      for (int i=0; i < infos.size(); i++) {
        final String name=infos.get(i).getName();
        Label lblParam=new Label(calculationComposite,SWT.NONE);
        lblParam.setText(infos.get(i).getDisplayName() + "String_Node_Str");
        GridData gd=new GridData();
        gd.widthHint=lblParam.computeSize(SWT.DEFAULT,SWT.DEFAULT).x;
        if (gd.widthHint < width)         gd.widthHint=width;
        lblParam.setLayoutData(gd);
        final List<Period_Type> types=infos.get(i).getPeriodChoices();
        if (types != null && types.size() > 0) {
          final Combo cmbDataField=new Combo(calculationComposite,SWT.BORDER | SWT.READ_ONLY);
          cmbDataField.setLayoutData(GridDataFactory.fillDefaults().grab(true,false).span(3,1).create());
          cmbDataField.setVisibleItemCount(30);
          initCalculationDataFields(cmbDataField,name,types);
          cmbDataField.addModifyListener(new ModifyListener(){
            public void modifyText(            ModifyEvent e){
              modifyDialogContent();
              validate();
              calculationParamsValueMap.put(name,cmbDataField.getText());
            }
          }
);
          calculationParamsMap.put(name,cmbDataField);
        }
 else {
          final Text txtParam=new Text(calculationComposite,SWT.BORDER);
          initCalculationTextFild(txtParam,name);
          txtParam.addModifyListener(new ModifyListener(){
            public void modifyText(            ModifyEvent e){
              modifyDialogContent();
              validate();
              calculationParamsValueMap.put(name,txtParam.getText());
            }
          }
);
          GridData gridData=new GridData(GridData.FILL_HORIZONTAL);
          gridData.horizontalIndent=0;
          gridData.horizontalSpan=2;
          txtParam.setLayoutData(gridData);
          createExpressionButton(calculationComposite,txtParam);
          calculationParamsMap.put(name,txtParam);
        }
      }
    }
    List<IArgumentInfo> infos1=function.getArguments();
  }
  composite.layout(true,true);
  setContentSize(composite);
}