Program: 65311
Project: 65311
Buggy source:
private void createComboCellParameter(Composite parent,String label){
  ControlProvider.createLabel(parent,label);
  reportParamComposite=ControlProvider.getDefaultComposite(parent);
  linkToSalarParameter=new Combo(reportParamComposite,SWT.READ_ONLY);
  linkToSalarParameter.setLayoutData(ControlProvider.getGridDataWithHSpan(1));
  linkToSalarParameter.setItems(ParameterPageUtil.getLinkedReportParameterNames((OdaDataSetParameterHandle)structureHandle));
  linkToSalarParameter.setVisibleItemCount(30);
  linkToSalarParameter.select(Utility.findIndex(linkToSalarParameter.getItems(),((OdaDataSetParameterHandle)structureHandle).getParamName()));
  originalLinkToParamName=linkToSalarParameter.getText();
  linkToSalarParameter.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String originalLink=originalLinkToParamName;
      linkToSalarParameterChanged();
      originalLinkToParamName=linkToSalarParameter.getText();
      updateLinkedReportParameter(originalLink);
      if (linkToSalarParameter.isEnabled()) {
        validateSyntax();
      }
    }
  }
);
  SelectionAdapter listener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      updateStructureHandle();
      OdaDataSetParameterHandle dataSetParameterHandle=(OdaDataSetParameterHandle)structureHandle;
      String originalParamName=dataSetParameterHandle.getParamName();
      ParameterDialog dialog=null;
      ParameterHandle handle=ParameterPageUtil.getScalarParameter(linkToSalarParameter.getText(),false);
      boolean isCreateMode=true;
      if (handle == null) {
        handle=(ScalarParameterHandle)ElementProcessorFactory.createProcessor("String_Node_Str").createElement(null);
        dialog=new ParameterDialog(ParameterInputDialog.this.getParentShell(),Messages.getString("String_Node_Str"),false);
        if (dataSetParameterHandle != null) {
          executeLinkedReportParameterUpdate(handle,dataSetParameterHandle);
        }
        isCreateMode=true;
      }
 else {
        dialog=new ParameterDialog(ParameterInputDialog.this.getParentShell(),Messages.getString("String_Node_Str"),false);
        isCreateMode=false;
      }
      handle.addListener(new ScalarParameterListener());
      dialog.setInput(handle);
      if (dialog.open() == OK) {
        if (dialog.getResult() instanceof ParameterHandle) {
          ParameterHandle paramerHandle=(ParameterHandle)dialog.getResult();
          if (isCreateMode) {
            SlotHandle parameterSlotHandle=Utility.getReportModuleHandle().getParameters();
            try {
              parameterSlotHandle.add(paramerHandle);
              linkToSalarParameter.add(paramerHandle.getQualifiedName());
            }
 catch (            ContentException e) {
              ExceptionHandler.handle(e);
            }
catch (            NameException e) {
              ExceptionHandler.handle(e);
            }
          }
          linkToSalarParameter.setItems(ParameterPageUtil.getLinkedReportParameterNames((OdaDataSetParameterHandle)structureHandle));
          originalLinkToParamName=paramerHandle.getQualifiedName();
          linkToSalarParameter.select(Utility.findIndex(linkToSalarParameter.getItems(),paramerHandle.getQualifiedName()));
        }
      }
 else {
        dataSetParameterHandle.setParamName(originalParamName);
      }
    }
  }
;
  parameterButton=new Button(reportParamComposite,SWT.PUSH);
  parameterButton.setImage(ReportPlatformUIImages.getImage(IReportGraphicConstants.ICON_ELEMENT_PARAMETER));
  parameterButton.addSelectionListener(listener);
  checkParameterButtonTooltip();
}

Fixed version (ground truth):
private void createComboCellParameter(Composite parent,String label){
  ControlProvider.createLabel(parent,label);
  reportParamComposite=ControlProvider.getDefaultComposite(parent);
  linkToSalarParameter=new Combo(reportParamComposite,SWT.READ_ONLY);
  linkToSalarParameter.setLayoutData(ControlProvider.getGridDataWithHSpan(1));
  linkToSalarParameter.setItems(ParameterPageUtil.getLinkedReportParameterNames((OdaDataSetParameterHandle)structureHandle));
  linkToSalarParameter.setVisibleItemCount(30);
  linkToSalarParameter.select(Utility.findIndex(linkToSalarParameter.getItems(),((OdaDataSetParameterHandle)structureHandle).getParamName()));
  originalLinkToParamName=linkToSalarParameter.getText();
  linkToSalarParameter.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String originalLink=originalLinkToParamName;
      linkToSalarParameterChanged();
      originalLinkToParamName=linkToSalarParameter.getText();
      updateLinkedReportParameter(originalLink);
      if (linkToSalarParameter.isEnabled()) {
        validateSyntax();
      }
    }
  }
);
  SelectionAdapter listener=new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      updateStructureHandle();
      OdaDataSetParameterHandle dataSetParameterHandle=(OdaDataSetParameterHandle)structureHandle;
      String originalParamName=dataSetParameterHandle.getParamName();
      ParameterDialog dialog=null;
      ParameterHandle handle=ParameterPageUtil.getScalarParameter(linkToSalarParameter.getText(),false);
      boolean isCreateMode=true;
      if (handle == null) {
        handle=(ScalarParameterHandle)ElementProcessorFactory.createProcessor("String_Node_Str").createElement(null);
        dialog=new ParameterDialog(ParameterInputDialog.this.getParentShell(),Messages.getString("String_Node_Str"),false);
        if (dataSetParameterHandle != null) {
          executeLinkedReportParameterUpdate(handle,dataSetParameterHandle);
        }
        isCreateMode=true;
      }
 else {
        dialog=new ParameterDialog(ParameterInputDialog.this.getParentShell(),Messages.getString("String_Node_Str"),false);
        isCreateMode=false;
      }
      ScalarParameterListener scalarParameterListener=new ScalarParameterListener();
      handle.addListener(scalarParameterListener);
      dialog.setInput(handle);
      if (dialog.open() == OK) {
        if (dialog.getResult() instanceof ParameterHandle) {
          ParameterHandle paramerHandle=(ParameterHandle)dialog.getResult();
          if (isCreateMode) {
            SlotHandle parameterSlotHandle=Utility.getReportModuleHandle().getParameters();
            try {
              parameterSlotHandle.add(paramerHandle);
              linkToSalarParameter.add(paramerHandle.getQualifiedName());
            }
 catch (            ContentException e) {
              ExceptionHandler.handle(e);
            }
catch (            NameException e) {
              ExceptionHandler.handle(e);
            }
          }
          linkToSalarParameter.setItems(ParameterPageUtil.getLinkedReportParameterNames((OdaDataSetParameterHandle)structureHandle));
          originalLinkToParamName=paramerHandle.getQualifiedName();
          linkToSalarParameter.select(Utility.findIndex(linkToSalarParameter.getItems(),paramerHandle.getQualifiedName()));
        }
      }
 else {
        dataSetParameterHandle.setParamName(originalParamName);
      }
      handle.removeListener(scalarParameterListener);
    }
  }
;
  parameterButton=new Button(reportParamComposite,SWT.PUSH);
  parameterButton.setImage(ReportPlatformUIImages.getImage(IReportGraphicConstants.ICON_ELEMENT_PARAMETER));
  parameterButton.addSelectionListener(listener);
  checkParameterButtonTooltip();
}