Program: 148323
Project: 148323
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;
        markDirtyWithoutCommit();
      }
    }
);
    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;
        markDirtyWithoutCommit();
      }
    }
);
    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){
        markDirtyWithoutCommit();
      }
      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){
        markDirtyWithoutCommit();
      }
      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))         if (EInputTemplate.getXtentisObjexts().get(serviceName) != null)         helpPara=EInputTemplate.getXtentisObjexts().get(serviceName).getContent();
 else         helpPara="String_Node_Str";
        refreshParameterEditor(serviceName);
        serviceParametersEditor.setContent(XmlUtil.formatXmlSource(helpPara));
        markDirtyWithoutCommit();
        initParamterProposal(serviceNameCombo.getText());
      }
    }
);
    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,"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 serviceParametersLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
    serviceParametersLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
    serviceParametersEditor=new ExtensibleContentEditor(serviceGroup,SWT.BORDER | SWT.MULTI | SWT.WRAP,EXCONTENTEDITOR_ID);
    GridData gdServiceParameter=new GridData(SWT.FILL,SWT.FILL,true,true,2,1);
    gdServiceParameter.heightHint=200;
    serviceParametersEditor.setLayoutData(gdServiceParameter);
    parameterEditorListener=new ParameterEditorListener();
    Composite routingExpressionsGroup=this.getNewSectionComposite("String_Node_Str");
    routingExpressionsGroup.setLayout(new GridLayout(1,true));
    conditionsColumns[0].setColumnWidth(250);
    conditionsColumns[1].setColumnWidth(150);
    conditionsColumns[2].setColumnWidth(250);
    conditionsColumns[3].setColumnWidth(120);
    conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),toolkit,routingExpressionsGroup);
    conditionViewer.setXpath(true);
    conditionViewer.setMainPage(this);
    conditionViewer.setAddMulti(true);
    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)         markDirtyWithoutCommit();
      }
    }
);
    wrap.Wrap(this,conditionViewer);
    windowTarget=new DropTarget(this.getPartControl(),DND.DROP_MOVE);
    windowTarget.setTransfer(new Transfer[]{TextTransfer.getInstance()});
    windowTarget.addDropListener(new DCDropTargetListener());
    refreshData();
    conditionText.addFocusListener(new FocusListener(){
      public void focusLost(      FocusEvent e){
      }
      public void focusGained(      FocusEvent e){
        initConditionProposal();
      }
    }
);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}

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);
    descriptionText.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
    descriptionText.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
        if (refreshing)         return;
        markDirtyWithoutCommit();
      }
    }
);
    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);
    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;
        markDirtyWithoutCommit();
      }
    }
);
    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){
        markDirtyWithoutCommit();
      }
      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){
        markDirtyWithoutCommit();
      }
      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))         if (EInputTemplate.getXtentisObjexts().get(serviceName) != null)         helpPara=EInputTemplate.getXtentisObjexts().get(serviceName).getContent();
 else         helpPara="String_Node_Str";
        refreshParameterEditor(serviceName);
        serviceParametersEditor.setContent(XmlUtil.formatXmlSource(helpPara));
        markDirtyWithoutCommit();
        initParamterProposal(serviceNameCombo.getText());
      }
    }
);
    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,"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 serviceParametersLabel=toolkit.createLabel(serviceGroup,"String_Node_Str",SWT.NULL);
    serviceParametersLabel.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,false,true,2,1));
    serviceParametersEditor=new ExtensibleContentEditor(serviceGroup,SWT.BORDER | SWT.MULTI | SWT.WRAP,EXCONTENTEDITOR_ID);
    GridData gdServiceParameter=new GridData(SWT.FILL,SWT.FILL,true,true,2,1);
    gdServiceParameter.heightHint=200;
    serviceParametersEditor.setLayoutData(gdServiceParameter);
    parameterEditorListener=new ParameterEditorListener();
    Composite routingExpressionsGroup=this.getNewSectionComposite("String_Node_Str");
    routingExpressionsGroup.setLayout(new GridLayout(1,true));
    conditionsColumns[0].setColumnWidth(250);
    conditionsColumns[1].setColumnWidth(150);
    conditionsColumns[2].setColumnWidth(250);
    conditionsColumns[3].setColumnWidth(120);
    conditionViewer=new TisTableViewer(Arrays.asList(conditionsColumns),toolkit,routingExpressionsGroup);
    conditionViewer.setXpath(true);
    conditionViewer.setMainPage(this);
    conditionViewer.setAddMulti(true);
    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)         markDirtyWithoutCommit();
      }
    }
);
    wrap.Wrap(this,conditionViewer);
    windowTarget=new DropTarget(this.getPartControl(),DND.DROP_MOVE);
    windowTarget.setTransfer(new Transfer[]{TextTransfer.getInstance()});
    windowTarget.addDropListener(new DCDropTargetListener());
    refreshData();
    conditionText.addFocusListener(new FocusListener(){
      public void focusLost(      FocusEvent e){
      }
      public void focusGained(      FocusEvent e){
        initConditionProposal();
      }
    }
);
  }
 catch (  Exception e) {
    log.error(e.getMessage(),e);
  }
}