Program: 149145
Project: 149145
Buggy source:
protected void createCharacteristicsContent(FormToolkit toolkit,Composite charComposite){
  try {
    Label descriptionLabel=toolkit.createLabel(charComposite,"String_Node_Str",SWT.NULL);
    descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    descriptionText=toolkit.createText(charComposite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
    descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    descriptionText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    Label objectTypeLabel=toolkit.createLabel(charComposite,"String_Node_Str",SWT.NULL);
    objectTypeLabel.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,true,1,1));
    Composite typeComposite=toolkit.createComposite(charComposite);
    typeComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    GridLayout layout=new GridLayout(2,false);
    layout.marginLeft=0;
    layout.marginWidth=0;
    typeComposite.setLayout(layout);
    objectTypeText=toolkit.createText(typeComposite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
    objectTypeText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING,SWT.CENTER,false,false,1,1));
    ((GridData)objectTypeText.getLayoutData()).widthHint=300;
    objectTypeText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    xpathButton=toolkit.createButton(typeComposite,"String_Node_Str",SWT.PUSH);
    xpathButton.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
    xpathButton.setToolTipText("String_Node_Str");
    xpathButton.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        XpathSelectDialog xpathDialog;
        xpathDialog=new XpathSelectDialog(getSite().getShell(),treeParent,"String_Node_Str",getSite(),false,dataModelName);
        xpathDialog.setBlockOnOpen(true);
        xpathDialog.open();
        if (xpathDialog.getReturnCode() == Window.OK) {
          String xpath=xpathDialog.getXpath();
          int index=xpathDialog.getXpath().indexOf("String_Node_Str");
          if (index > 0) {
            xpath=xpathDialog.getXpath().substring(0,index);
          }
          objectTypeText.setText(xpath);
        }
      }
    }
);
    isSynchronousButton=toolkit.createButton(charComposite,"String_Node_Str",SWT.CHECK);
    isSynchronousButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    isSynchronousButton.addMouseListener(new MouseListener(){
      public void mouseUp(      MouseEvent e){
        markDirty();
      }
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
    }
);
    deactiveButton=toolkit.createButton(charComposite,"String_Node_Str",SWT.CHECK);
    deactiveButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    deactiveButton.addMouseListener(new MouseListener(){
      public void mouseUp(      MouseEvent e){
        markDirty();
      }
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
    }
);
    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();
        String helpPara="String_Node_Str";
        if (!"String_Node_Str".equals(serviceName) && !serviceName.equals(null))         helpPara=EInputTemplate.getXtentisObjexts().get(serviceName).getContent();
 else         helpPara="String_Node_Str";
        serviceParametersText.setText(helpPara);
        markDirty();
      }
    }
);
    if (version_greater_than_2_17_0) {
      WSServicesList list=Util.getPort(getXObject()).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++) {
          serviceNameCombo.add(sortedList[i]);
        }
      }
    }
    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 {
          XtentisPort port=Util.getPort(getXObject());
          WSServiceGetDocument document=port.getServiceDocument(new WSString(serviceNameCombo.getText().trim()));
          doc=document.getDocument();
          desc=document.getDescription();
        }
 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);
        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 serviceParametersLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
    serviceParametersLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
    serviceParametersText=toolkit.createText(serviceGroup,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
    serviceParametersText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,2,1));
    ((GridData)serviceParametersText.getLayoutData()).widthHint=200;
    ((GridData)serviceParametersText.getLayoutData()).heightHint=120;
    serviceParametersText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    Composite routingExpressionsGroup=this.getNewSectionComposite("String_Node_Str");
    routingExpressionsGroup.setLayout(new GridLayout(1,true));
    conditionsColumns[0].setColumnWidth(200);
    conditionsColumns[1].setColumnWidth(150);
    conditionsColumns[2].setColumnWidth(120);
    conditionsColumns[3].setColumnWidth(120);
    conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),toolkit,routingExpressionsGroup);
    conditionViewer.setMainPage(this);
    conditionViewer.create();
    ConditionWidget conditionWidget=new ConditionWidget(routingExpressionsGroup,toolkit,this);
    conditionText=conditionWidget.getConditionText();
    conditionText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (!refreshing)         markDirty();
      }
    }
);
    wrap.Wrap(this,conditionViewer);
    windowTarget=new DropTarget(this.getPartControl(),DND.DROP_MOVE);
    windowTarget.setTransfer(new Transfer[]{TextTransfer.getInstance()});
    windowTarget.addDropListener(new DCDropTargetListener());
    refreshData();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
protected void createCharacteristicsContent(FormToolkit toolkit,Composite charComposite){
  try {
    Label descriptionLabel=toolkit.createLabel(charComposite,"String_Node_Str",SWT.NULL);
    descriptionLabel.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    descriptionText=toolkit.createText(charComposite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
    descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    descriptionText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    Label objectTypeLabel=toolkit.createLabel(charComposite,"String_Node_Str",SWT.NULL);
    objectTypeLabel.setLayoutData(new GridData(SWT.BEGINNING,SWT.CENTER,false,true,1,1));
    Composite typeComposite=toolkit.createComposite(charComposite);
    typeComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    GridLayout layout=new GridLayout(2,false);
    layout.marginLeft=0;
    layout.marginWidth=0;
    typeComposite.setLayout(layout);
    objectTypeText=toolkit.createText(typeComposite,"String_Node_Str",SWT.BORDER | SWT.MULTI);
    objectTypeText.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING,SWT.CENTER,false,false,1,1));
    ((GridData)objectTypeText.getLayoutData()).widthHint=300;
    objectTypeText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    xpathButton=toolkit.createButton(typeComposite,"String_Node_Str",SWT.PUSH);
    xpathButton.setImage(ImageCache.getCreatedImage(EImage.DOTS_BUTTON.getPath()));
    xpathButton.setToolTipText("String_Node_Str");
    xpathButton.addSelectionListener(new SelectionListener(){
      public void widgetDefaultSelected(      SelectionEvent e){
      }
      public void widgetSelected(      SelectionEvent e){
        XpathSelectDialog xpathDialog;
        xpathDialog=new XpathSelectDialog(getSite().getShell(),treeParent,"String_Node_Str",getSite(),false,dataModelName);
        xpathDialog.setBlockOnOpen(true);
        xpathDialog.open();
        if (xpathDialog.getReturnCode() == Window.OK) {
          String xpath=xpathDialog.getXpath();
          int index=xpathDialog.getXpath().indexOf("String_Node_Str");
          if (index > 0) {
            xpath=xpathDialog.getXpath().substring(0,index);
          }
          objectTypeText.setText(xpath);
        }
      }
    }
);
    isSynchronousButton=toolkit.createButton(charComposite,"String_Node_Str",SWT.CHECK);
    isSynchronousButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    isSynchronousButton.addMouseListener(new MouseListener(){
      public void mouseUp(      MouseEvent e){
        markDirty();
      }
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
    }
);
    deactiveButton=toolkit.createButton(charComposite,"String_Node_Str",SWT.CHECK);
    deactiveButton.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,true,1,1));
    deactiveButton.addMouseListener(new MouseListener(){
      public void mouseUp(      MouseEvent e){
        markDirty();
      }
      public void mouseDoubleClick(      MouseEvent e){
      }
      public void mouseDown(      MouseEvent e){
      }
    }
);
    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();
        String helpPara="String_Node_Str";
        if (!"String_Node_Str".equals(serviceName) && !serviceName.equals(null))         helpPara=EInputTemplate.getXtentisObjexts().get(serviceName).getContent();
 else         helpPara="String_Node_Str";
        serviceParametersText.setText(helpPara);
        markDirty();
      }
    }
);
    if (version_greater_than_2_17_0) {
      WSServicesList list=Util.getPort(getXObject()).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++) {
          serviceNameCombo.add(sortedList[i]);
        }
      }
    }
    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 {
          XtentisPort port=Util.getPort(getXObject());
          WSServiceGetDocument document=port.getServiceDocument(new WSString(serviceNameCombo.getText().trim()));
          doc=document.getDocument();
          desc=document.getDescription();
        }
 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);
        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 serviceParametersLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
    serviceParametersLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
    serviceParametersText=toolkit.createText(serviceGroup,"String_Node_Str",SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
    serviceParametersText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false,2,1));
    ((GridData)serviceParametersText.getLayoutData()).widthHint=200;
    ((GridData)serviceParametersText.getLayoutData()).heightHint=120;
    serviceParametersText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirty();
      }
    }
);
    Composite routingExpressionsGroup=this.getNewSectionComposite("String_Node_Str");
    routingExpressionsGroup.setLayout(new GridLayout(1,true));
    conditionsColumns[0].setColumnWidth(200);
    conditionsColumns[1].setColumnWidth(150);
    conditionsColumns[2].setColumnWidth(120);
    conditionsColumns[3].setColumnWidth(120);
    conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),toolkit,routingExpressionsGroup);
    conditionViewer.setMainPage(this);
    conditionViewer.create();
    conditionViewer.setHeight(110);
    ConditionWidget conditionWidget=new ConditionWidget(routingExpressionsGroup,toolkit,this);
    conditionText=conditionWidget.getConditionText();
    conditionText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (!refreshing)         markDirty();
      }
    }
);
    wrap.Wrap(this,conditionViewer);
    windowTarget=new DropTarget(this.getPartControl(),DND.DROP_MOVE);
    windowTarget.setTransfer(new Transfer[]{TextTransfer.getInstance()});
    windowTarget.addDropListener(new DCDropTargetListener());
    refreshData();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}