Program: 148139
Project: 148139
Buggy source:
private void create(){
  Composite com=new Composite(parent,SWT.NONE);
  com.setLayout(getLayout(3));
  Group expressG=new Group(com,SWT.NONE);
  expressG.setText("String_Node_Str");
  expressG.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,3,2));
  expressG.setLayout(getLayout(1));
  Composite topCom=new Composite(expressG,0);
  Button clearBtn=new Button(topCom,SWT.PUSH);
  topCom.setLayout(getLayout(4));
  clearBtn.setText("String_Node_Str");
  clearBtn.setLayoutData(new GridData(SWT.RIGHT,SWT.FILL,false,false,1,1));
  clearBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      sourceViewer.setDocument(new Document("String_Node_Str"));
    }
  }
);
  org.eclipse.jface.text.Document doc=new org.eclipse.jface.text.Document(value);
  sourceViewer=new SourceViewer(expressG,new VerticalRuler(5),SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,6);
  gd.heightHint=150;
  sourceViewer.getControl().setLayoutData(gd);
  WidgetUtils.initRedoUndo(sourceViewer);
  sourceViewer.setDocument(doc);
  Composite bottomCom=new Composite(expressG,0);
  GridLayout ly=getLayout(4);
  bottomCom.setLayout(ly);
  Composite com1=new Composite(bottomCom,0);
  com1.setLayout(getLayout(4));
  String[] strs1={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String str : strs1) {
    final Button btn=new Button(com1,SWT.PUSH);
    btn.setText(str);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com2=new Composite(bottomCom,0);
  com2.setLayout(getLayout(4));
  String[] strs2={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String str : strs2) {
    final Button btn=new Button(com2,SWT.PUSH);
    btn.setText(str);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com3=new Composite(bottomCom,0);
  com3.setLayout(getLayout(4));
  String[] strs3={"String_Node_Str","String_Node_Str"};
  for (int i=0; i < strs3.length; i++) {
    final Button btn=new Button(com3,SWT.PUSH);
    btn.setText(strs3[i]);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com4=new Composite(bottomCom,0);
  com4.setLayout(getLayout(3));
  String[] strs4={"String_Node_Str","String_Node_Str"};
  for (int i=0; i < strs4.length; i++) {
    final Button btn=new Button(com4,SWT.PUSH);
    btn.setText(strs4[i]);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Button xpathButton=new Button(com4,SWT.PUSH);
  xpathButton.setText("String_Node_Str");
  xpathButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      XpathSelectDialog dlg=new XpathSelectDialog(parent.getShell(),treeParent,"String_Node_Str",ServerView.show().getSite(),false,null,isAbsoluteXPath);
      dlg.setConceptName(conceptName);
      dlg.setBlockOnOpen(true);
      dlg.open();
      if (dlg.getReturnCode() == Window.OK) {
        if (getTextWidget().getSelectionText().length() > 0)         getTextWidget().replaceTextRange(getTextWidget().getSelectionRanges()[0],getTextWidget().getSelectionRanges()[1],dlg.getXpath());
 else         insertText(dlg.getXpath());
      }
    }
  }
);
  Group categoryG=new Group(com,SWT.NONE);
  categoryG.setText("String_Node_Str");
  GridData gd1=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd1.heightHint=200;
  gd1.widthHint=140;
  categoryG.setLayoutData(gd1);
  categoryG.setLayout(getLayout(1));
  categoryList=new List(categoryG,SWT.BORDER | SWT.V_SCROLL);
  categoryList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  for (  XPathFunc c : categories) {
    categoryList.add(c.getCategory());
  }
  categoryList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      funcList.removeAll();
      String c=categoryList.getSelection()[0];
      for (      XPathFunc func : categories) {
        if (func.getCategory().equals(c)) {
          curfc=func;
          for (          KeyValue kv : func.getFuncs()) {
            funcList.add(kv.key);
          }
          break;
        }
      }
      if (funcList.getItems().length > 0) {
        funcList.select(0);
        helpTxt.setText(curfc.getFuncs().get(0).value);
      }
    }
  }
);
  Group functionG=new Group(com,SWT.NONE);
  functionG.setText("String_Node_Str");
  functionG.setLayout(getLayout(1));
  GridData gd3=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd3.widthHint=220;
  functionG.setLayoutData(gd3);
  funcList=new List(functionG,SWT.BORDER | SWT.V_SCROLL);
  funcList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  funcList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
      getTextWidget().setText(getText() + funcList.getItem(funcList.getSelectionIndex()));
    }
    public void widgetSelected(    SelectionEvent e){
      String c=funcList.getSelection()[0];
      for (      KeyValue kv : curfc.getFuncs()) {
        if (kv.key.equals(c)) {
          helpTxt.setText(kv.value);
          break;
        }
      }
    }
  }
);
  Group helpG=new Group(com,SWT.NONE);
  helpG.setText("String_Node_Str");
  helpG.setLayout(getLayout(1));
  helpG.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  helpTxt=new StyledText(helpG,SWT.BORDER | SWT.WRAP);
  GridData gd4=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd4.widthHint=210;
  helpTxt.setLayoutData(gd4);
}

Fixed version (ground truth):
private void create(){
  com=new Composite(parent,SWT.NONE);
  com.setLayout(getLayout(3));
  Group expressG=new Group(com,SWT.NONE);
  expressG.setText("String_Node_Str");
  expressG.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,3,2));
  expressG.setLayout(getLayout(1));
  Composite topCom=new Composite(expressG,0);
  Button clearBtn=new Button(topCom,SWT.PUSH);
  topCom.setLayout(getLayout(4));
  clearBtn.setText("String_Node_Str");
  clearBtn.setLayoutData(new GridData(SWT.RIGHT,SWT.FILL,false,false,1,1));
  clearBtn.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      sourceViewer.setDocument(new Document("String_Node_Str"));
    }
  }
);
  org.eclipse.jface.text.Document doc=new org.eclipse.jface.text.Document(value);
  sourceViewer=new SourceViewer(expressG,new VerticalRuler(5),SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
  GridData gd=new GridData(SWT.FILL,SWT.FILL,true,true,1,6);
  gd.heightHint=150;
  sourceViewer.getControl().setLayoutData(gd);
  WidgetUtils.initRedoUndo(sourceViewer);
  sourceViewer.setDocument(doc);
  Composite bottomCom=new Composite(expressG,0);
  GridLayout ly=getLayout(4);
  bottomCom.setLayout(ly);
  Composite com1=new Composite(bottomCom,0);
  com1.setLayout(getLayout(4));
  String[] strs1={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String str : strs1) {
    final Button btn=new Button(com1,SWT.PUSH);
    btn.setText(str);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com2=new Composite(bottomCom,0);
  com2.setLayout(getLayout(4));
  String[] strs2={"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String str : strs2) {
    final Button btn=new Button(com2,SWT.PUSH);
    btn.setText(str);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com3=new Composite(bottomCom,0);
  com3.setLayout(getLayout(4));
  String[] strs3={"String_Node_Str","String_Node_Str"};
  for (int i=0; i < strs3.length; i++) {
    final Button btn=new Button(com3,SWT.PUSH);
    btn.setText(strs3[i]);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Composite com4=new Composite(bottomCom,0);
  com4.setLayout(getLayout(3));
  String[] strs4={"String_Node_Str","String_Node_Str"};
  for (int i=0; i < strs4.length; i++) {
    final Button btn=new Button(com4,SWT.PUSH);
    btn.setText(strs4[i]);
    btn.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      SelectionEvent e){
        insertText(btn.getText());
      }
    }
);
  }
  Button xpathButton=new Button(com4,SWT.PUSH);
  xpathButton.setText("String_Node_Str");
  xpathButton.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      XpathSelectDialog dlg=new XpathSelectDialog(parent.getShell(),treeParent,"String_Node_Str",ServerView.show().getSite(),false,null,isAbsoluteXPath);
      dlg.setConceptName(conceptName);
      dlg.setBlockOnOpen(true);
      dlg.open();
      if (dlg.getReturnCode() == Window.OK) {
        if (getTextWidget().getSelectionText().length() > 0)         getTextWidget().replaceTextRange(getTextWidget().getSelectionRanges()[0],getTextWidget().getSelectionRanges()[1],dlg.getXpath());
 else         insertText(dlg.getXpath());
      }
    }
  }
);
  Group categoryG=new Group(com,SWT.NONE);
  categoryG.setText("String_Node_Str");
  GridData gd1=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd1.heightHint=200;
  gd1.widthHint=140;
  categoryG.setLayoutData(gd1);
  categoryG.setLayout(getLayout(1));
  categoryList=new List(categoryG,SWT.BORDER | SWT.V_SCROLL);
  categoryList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  for (  XPathFunc c : categories) {
    categoryList.add(c.getCategory());
  }
  categoryList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      funcList.removeAll();
      String c=categoryList.getSelection()[0];
      for (      XPathFunc func : categories) {
        if (func.getCategory().equals(c)) {
          curfc=func;
          for (          KeyValue kv : func.getFuncs()) {
            funcList.add(kv.key);
          }
          break;
        }
      }
      if (funcList.getItems().length > 0) {
        funcList.select(0);
        helpTxt.setText(curfc.getFuncs().get(0).value);
      }
    }
  }
);
  Group functionG=new Group(com,SWT.NONE);
  functionG.setText("String_Node_Str");
  functionG.setLayout(getLayout(1));
  GridData gd3=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd3.widthHint=220;
  functionG.setLayoutData(gd3);
  funcList=new List(functionG,SWT.BORDER | SWT.V_SCROLL);
  funcList.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  funcList.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
      getTextWidget().setText(getText() + funcList.getItem(funcList.getSelectionIndex()));
    }
    public void widgetSelected(    SelectionEvent e){
      String c=funcList.getSelection()[0];
      for (      KeyValue kv : curfc.getFuncs()) {
        if (kv.key.equals(c)) {
          helpTxt.setText(kv.value);
          break;
        }
      }
    }
  }
);
  Group helpG=new Group(com,SWT.NONE);
  helpG.setText("String_Node_Str");
  helpG.setLayout(getLayout(1));
  helpG.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  helpTxt=new StyledText(helpG,SWT.BORDER | SWT.WRAP);
  GridData gd4=new GridData(SWT.FILL,SWT.FILL,true,true,1,1);
  gd4.widthHint=210;
  helpTxt.setLayoutData(gd4);
}