Program: 148359
Project: 148359
Buggy source:
@Override protected void createCharacteristicsContent(FormToolkit toolkit,Composite charSection){
  Composite serviceGroup=this.getNewSectionComposite("String_Node_Str");
  serviceGroup.setLayout(new GridLayout(2,false));
  Label serviceNameLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
  serviceNameLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  Composite subPanel=toolkit.createComposite(serviceGroup);
  subPanel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,true,1,1));
  subPanel.setLayout(new GridLayout(2,false));
  serviceNameCombo=new Combo(subPanel,SWT.DROP_DOWN | SWT.SINGLE | SWT.READ_ONLY);
  serviceNameCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,true,1,1));
  ((GridData)serviceNameCombo.getLayoutData()).widthHint=300;
  serviceNameCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (refreshing)       return;
      String serviceName=serviceNameCombo.getText();
      try {
        if (serviceName != null && !"String_Node_Str".equals(serviceName)) {
          document=port.getServiceDocument(new WSString(serviceName.trim()));
          String documentConfigure=ServiceConfigrationMainPage.this.formartXml(document.getConfigure());
          serviceConfigurationsText.setText(documentConfigure);
          errorLabel.setText("String_Node_Str");
        }
      }
 catch (      RemoteException e1) {
        log.error(e1.getMessage(),e1);
      }
      markDirty();
    }
  }
);
  try {
    port=Util.getPort(getXObject());
    WSServicesList list=port.getServicesList(new WSGetServicesList("String_Node_Str"));
    WSServicesListItem[] items=list.getItem();
    if (items != null) {
      String[] sortedList=new String[items.length];
      for (int i=0; i < items.length; i++) {
        sortedList[i]=items[i].getJndiName();
      }
      Arrays.sort(sortedList);
      for (int i=0; i < sortedList.length; i++) {
        WSServiceGetDocument document=port.getServiceDocument(new WSString(sortedList[i].trim()));
        if (document.getConfigureSchema() == null || document.getConfigureSchema().length() == 0)         continue;
        serviceNameCombo.add(sortedList[i]);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  defultParameterBtn=toolkit.createButton(subPanel,"String_Node_Str",SWT.PUSH);
  defultParameterBtn.setImage(ImageCache.getCreatedImage(EImage.HELP_CONTENTS.getPath()));
  defultParameterBtn.setToolTipText("String_Node_Str");
  defultParameterBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  defultParameterBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      if (serviceNameCombo.getText().trim().length() == 0)       return;
      String doc="String_Node_Str";
      String desc="String_Node_Str";
      try {
        WSServiceGetDocument document=port.getServiceDocument(new WSString(serviceNameCombo.getText().trim()));
        desc=document.getDescription();
        doc=document.getDefaultConfig();
      }
 catch (      Exception e1) {
        doc="String_Node_Str";
      }
 finally {
        showUpDialog(desc,doc);
      }
    }
    private void showUpDialog(    String desc,    String doc){
      final PluginDetailsDialog dialog=new PluginDetailsDialog(getSite().getShell(),desc,doc,null,"String_Node_Str");
      dialog.addListener(new Listener(){
        public void handleEvent(        Event event){
          dialog.close();
        }
      }
);
      dialog.create();
      dialog.getShell().setText(serviceNameCombo.getText() + "String_Node_Str");
      dialog.setBlockOnOpen(true);
      dialog.open();
    }
  }
);
  Label serviceConfigurationsLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
  serviceConfigurationsLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
  serviceConfigurationsText=toolkit.createText(serviceGroup,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.V_SCROLL| SWT.WRAP);
  serviceConfigurationsText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,2,1));
  ((GridData)serviceConfigurationsText.getLayoutData()).widthHint=200;
  ((GridData)serviceConfigurationsText.getLayoutData()).heightHint=120;
  serviceConfigurationsText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (refreshing)       return;
      markDirtyWithoutCommit();
    }
  }
);
  checkButton=toolkit.createButton(serviceGroup,"String_Node_Str",SWT.NONE);
  checkButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      if (serviceNameCombo.getText().trim().length() == 0)       return;
      String msg="String_Node_Str";
      boolean isok=false;
      try {
        WSCheckServiceConfigResponse result=port.checkServiceConfiguration(new WSCheckServiceConfigRequest(serviceNameCombo.getText().trim(),serviceConfigurationsText.getText()));
        isok=result.getCheckResult();
        if (isok) {
          msg="String_Node_Str";
        }
 else {
          msg="String_Node_Str";
        }
      }
 catch (      RemoteException e1) {
        log.error(e1.getMessage(),e1);
        msg=e1.getLocalizedMessage();
      }
      errorLabel.setForeground(isok ? errorLabel.getDisplay().getSystemColor(SWT.COLOR_BLUE) : errorLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
      errorLabel.setText(msg);
    }
  }
);
  errorLabel=new Text(serviceGroup,SWT.WRAP);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,2);
  errorLabel.setLayoutData(gd);
}

Fixed version (ground truth):
@Override protected void createCharacteristicsContent(FormToolkit toolkit,Composite charSection){
  Composite serviceGroup=this.getNewSectionComposite("String_Node_Str");
  serviceGroup.setLayout(new GridLayout(2,false));
  Label serviceNameLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
  serviceNameLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,1,1));
  Composite subPanel=toolkit.createComposite(serviceGroup);
  subPanel.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,true,1,1));
  subPanel.setLayout(new GridLayout(2,false));
  serviceNameCombo=new Combo(subPanel,SWT.DROP_DOWN | SWT.SINGLE | SWT.READ_ONLY);
  serviceNameCombo.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,true,1,1));
  ((GridData)serviceNameCombo.getLayoutData()).widthHint=300;
  serviceNameCombo.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (refreshing)       return;
      String serviceName=serviceNameCombo.getText();
      try {
        if (serviceName != null && !"String_Node_Str".equals(serviceName)) {
          document=port.getServiceDocument(new WSString(serviceName.trim()));
          String documentConfigure=ServiceConfigrationMainPage.this.formartXml(document.getConfigure());
          serviceConfigurationsText.setText(documentConfigure);
          errorLabel.setText("String_Node_Str");
        }
      }
 catch (      RemoteException e1) {
        log.error(e1.getMessage(),e1);
      }
      markDirty();
    }
  }
);
  try {
    port=Util.getPort(getXObject());
    WSServicesList list=port.getServicesList(new WSGetServicesList("String_Node_Str"));
    WSServicesListItem[] items=list.getItem();
    if (items != null) {
      String[] sortedList=new String[items.length];
      for (int i=0; i < items.length; i++) {
        sortedList[i]=items[i].getJndiName();
      }
      Arrays.sort(sortedList);
      for (int i=0; i < sortedList.length; i++) {
        WSServiceGetDocument document=port.getServiceDocument(new WSString(sortedList[i].trim()));
        if (document.getConfigureSchema() == null || document.getConfigureSchema().length() == 0)         continue;
        serviceNameCombo.add(sortedList[i]);
      }
    }
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
  defultParameterBtn=toolkit.createButton(subPanel,"String_Node_Str",SWT.PUSH);
  defultParameterBtn.setImage(ImageCache.getCreatedImage(EImage.HELP_CONTENTS.getPath()));
  defultParameterBtn.setToolTipText("String_Node_Str");
  defultParameterBtn.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
  defultParameterBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    org.eclipse.swt.events.SelectionEvent e){
    }
    public void widgetSelected(    org.eclipse.swt.events.SelectionEvent e){
      if (serviceNameCombo.getText().trim().length() == 0)       return;
      String doc="String_Node_Str";
      String desc="String_Node_Str";
      try {
        WSServiceGetDocument document=port.getServiceDocument(new WSString(serviceNameCombo.getText().trim()));
        desc=document.getDescription();
        doc=document.getDefaultConfig();
      }
 catch (      Exception e1) {
        doc="String_Node_Str";
      }
 finally {
        showUpDialog(desc,doc);
      }
    }
    private void showUpDialog(    String desc,    String doc){
      final PluginDetailsDialog dialog=new PluginDetailsDialog(getSite().getShell(),desc,doc,null,"String_Node_Str");
      dialog.addListener(new Listener(){
        public void handleEvent(        Event event){
          dialog.close();
        }
      }
);
      dialog.create();
      dialog.getShell().setText(serviceNameCombo.getText() + "String_Node_Str");
      dialog.setBlockOnOpen(true);
      dialog.open();
    }
  }
);
  Label serviceConfigurationsLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
  serviceConfigurationsLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
  serviceConfigurationsText=toolkit.createText(serviceGroup,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.V_SCROLL| SWT.WRAP);
  serviceConfigurationsText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,2,1));
  ((GridData)serviceConfigurationsText.getLayoutData()).widthHint=200;
  ((GridData)serviceConfigurationsText.getLayoutData()).heightHint=120;
  serviceConfigurationsText.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      if (refreshing)       return;
      markDirtyWithoutCommit();
    }
  }
);
  checkButton=toolkit.createButton(serviceGroup,"String_Node_Str",SWT.NONE);
  checkButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String msg=getContentsCheckResult();
      boolean isok=msg.equals(CHECKMSG_SUCCESSFULCONN);
      errorLabel.setForeground(isok ? errorLabel.getDisplay().getSystemColor(SWT.COLOR_BLUE) : errorLabel.getDisplay().getSystemColor(SWT.COLOR_RED));
      errorLabel.setText(msg);
    }
  }
);
  errorLabel=new Text(serviceGroup,SWT.WRAP);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,2);
  errorLabel.setLayoutData(gd);
}