Program: 70729
Project: 70729
Buggy source:
private int createValueListComposite(Composite parent){
  if (valueListComposite != null && !valueListComposite.isDisposed()) {
    return 0;
  }
  disposeComposites();
  valueListComposite=new Composite(parent,SWT.NONE);
  GridData gdata=new GridData(GridData.FILL_HORIZONTAL);
  gdata.horizontalSpan=4;
  valueListComposite.setLayoutData(gdata);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  valueListComposite.setLayout(layout);
  compositeList.add(valueListComposite);
  Group group=new Group(valueListComposite,SWT.NONE);
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint=118;
  data.horizontalSpan=3;
  data.horizontalIndent=0;
  data.grabExcessHorizontalSpace=true;
  group.setLayoutData(data);
  layout=new GridLayout();
  layout.numColumns=4;
  group.setLayout(layout);
  new Label(group,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  GridData expgd=new GridData();
  expgd.widthHint=100;
  addExpressionValue=new MultiValueCombo(group,SWT.NONE);
  addExpressionValue.setLayoutData(expgd);
  addBtn=new Button(group,SWT.PUSH);
  addBtn.setText(Messages.getString("String_Node_Str"));
  addBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(addBtn);
  addBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      String value=addExpressionValue.getText().trim();
      if (valueList.indexOf(value) < 0) {
        valueList.add(value);
        tableViewer.refresh();
        updateButtons();
        addExpressionValue.setFocus();
        addExpressionValue.setText("String_Node_Str");
      }
 else {
        addBtn.setEnabled(false);
      }
    }
  }
);
  new Label(group,SWT.NONE);
  int tableStyle=SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION;
  table=new Table(group,tableStyle);
  data=new GridData(GridData.FILL_BOTH);
  data.horizontalSpan=4;
  table.setLayoutData(data);
  table.setHeaderVisible(false);
  table.setLinesVisible(true);
  TableColumn column;
  int i;
  String[] columNames=new String[]{Messages.getString("String_Node_Str")};
  int[] columLength=new int[]{288};
  for (i=0; i < columNames.length; i++) {
    column=new TableColumn(table,SWT.NONE,i);
    column.setText(columNames[i]);
    column.setWidth(columLength[i]);
  }
  table.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      checkEditDelButtonStatus();
    }
  }
);
  table.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        delTableValue();
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  table.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      editTableValue();
    }
  }
);
  tableViewer=new TableViewer(table);
  tableViewer.setUseHashlookup(true);
  tableViewer.setColumnProperties(columNames);
  tableViewer.setLabelProvider(tableLableProvier);
  tableViewer.setContentProvider(tableContentProvider);
  Composite rightPart=new Composite(valueListComposite,SWT.NONE);
  data=new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_END);
  rightPart.setLayoutData(data);
  layout=new GridLayout();
  layout.makeColumnsEqualWidth=true;
  rightPart.setLayout(layout);
  editBtn=new Button(rightPart,SWT.PUSH);
  editBtn.setText(Messages.getString("String_Node_Str"));
  editBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(editBtn);
  editBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      editTableValue();
    }
  }
);
  delBtn=new Button(rightPart,SWT.PUSH);
  delBtn.setText(Messages.getString("String_Node_Str"));
  delBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(delBtn);
  delBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      delTableValue();
    }
  }
);
  delAllBtn=new Button(rightPart,SWT.PUSH);
  delAllBtn.setText(Messages.getString("String_Node_Str"));
  delAllBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(delAllBtn);
  delAllBtn.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(    SelectionEvent e){
    }
    public void widgetSelected(    SelectionEvent e){
      int count=valueList.size();
      if (count > 0) {
        valueList.clear();
        tableViewer.refresh();
        updateButtons();
      }
 else {
        delAllBtn.setEnabled(false);
      }
    }
  }
);
  addExpressionValue.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      checkAddButtonStatus();
      updateButtons();
    }
  }
);
  addExpressionValue.addSelectionListener(0,mAddSelValueAction);
  addExpressionValue.addSelectionListener(1,mAddExpValueAction);
  addExpressionValue.setItems(popupItems);
  parent.getParent().layout(true,true);
  if (parent.getShell() != null)   parent.getShell().pack();
  return 1;
}

Fixed version (ground truth):
private int createValueListComposite(Composite parent){
  if (valueListComposite != null && !valueListComposite.isDisposed()) {
    return 0;
  }
  disposeComposites();
  valueListComposite=new Composite(parent,SWT.NONE);
  GridData gdata=new GridData(GridData.FILL_HORIZONTAL);
  gdata.horizontalSpan=4;
  valueListComposite.setLayoutData(gdata);
  GridLayout layout=new GridLayout();
  layout.numColumns=4;
  valueListComposite.setLayout(layout);
  compositeList.add(valueListComposite);
  Group group=new Group(valueListComposite,SWT.NONE);
  GridData data=new GridData(GridData.FILL_HORIZONTAL);
  data.heightHint=118;
  data.horizontalSpan=3;
  data.horizontalIndent=0;
  data.grabExcessHorizontalSpace=true;
  group.setLayoutData(data);
  layout=new GridLayout();
  layout.numColumns=4;
  group.setLayout(layout);
  new Label(group,SWT.NONE).setText(Messages.getString("String_Node_Str"));
  GridData expgd=new GridData();
  expgd.widthHint=100;
  addExpressionValue=new MultiValueCombo(group,SWT.NONE);
  addExpressionValue.setLayoutData(expgd);
  addBtn=new Button(group,SWT.PUSH);
  addBtn.setText(Messages.getString("String_Node_Str"));
  addBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(addBtn);
  addBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      String value=addExpressionValue.getText().trim();
      if (valueList.indexOf(value) < 0) {
        valueList.add(value);
        tableViewer.refresh();
        updateButtons();
        addExpressionValue.setFocus();
        addExpressionValue.setText("String_Node_Str");
      }
 else {
        addBtn.setEnabled(false);
      }
    }
  }
);
  new Label(group,SWT.NONE);
  int tableStyle=SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION;
  table=new Table(group,tableStyle);
  data=new GridData(GridData.FILL_BOTH);
  data.horizontalSpan=4;
  table.setLayoutData(data);
  table.setHeaderVisible(false);
  table.setLinesVisible(true);
  TableColumn column;
  int i;
  String[] columNames=new String[]{Messages.getString("String_Node_Str")};
  int[] columLength=new int[]{288};
  for (i=0; i < columNames.length; i++) {
    column=new TableColumn(table,SWT.NONE,i);
    column.setText(columNames[i]);
    column.setWidth(columLength[i]);
  }
  table.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      checkEditDelButtonStatus();
    }
  }
);
  table.addKeyListener(new KeyListener(){
    public void keyPressed(    KeyEvent e){
      if (e.keyCode == SWT.DEL) {
        delTableValue();
      }
    }
    public void keyReleased(    KeyEvent e){
    }
  }
);
  table.addMouseListener(new MouseAdapter(){
    public void mouseDoubleClick(    MouseEvent e){
      editTableValue();
    }
  }
);
  tableViewer=new TableViewer(table);
  tableViewer.setUseHashlookup(true);
  tableViewer.setColumnProperties(columNames);
  tableViewer.setLabelProvider(tableLableProvier);
  tableViewer.setContentProvider(tableContentProvider);
  Composite rightPart=new Composite(valueListComposite,SWT.NONE);
  data=new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_END);
  rightPart.setLayoutData(data);
  layout=new GridLayout();
  layout.makeColumnsEqualWidth=true;
  rightPart.setLayout(layout);
  editBtn=new Button(rightPart,SWT.PUSH);
  editBtn.setText(Messages.getString("String_Node_Str"));
  editBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(editBtn);
  editBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      editTableValue();
    }
  }
);
  delBtn=new Button(rightPart,SWT.PUSH);
  delBtn.setText(Messages.getString("String_Node_Str"));
  delBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(delBtn);
  delBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      delTableValue();
    }
  }
);
  delAllBtn=new Button(rightPart,SWT.PUSH);
  delAllBtn.setText(Messages.getString("String_Node_Str"));
  delAllBtn.setToolTipText(Messages.getString("String_Node_Str"));
  setButtonLayoutData(delAllBtn);
  delAllBtn.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      int count=valueList.size();
      if (count > 0) {
        valueList.clear();
        tableViewer.refresh();
        updateButtons();
      }
 else {
        delAllBtn.setEnabled(false);
      }
    }
  }
);
  addExpressionValue.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      checkAddButtonStatus();
      updateButtons();
    }
  }
);
  addExpressionValue.addSelectionListener(0,mAddSelValueAction);
  addExpressionValue.addSelectionListener(1,mAddExpValueAction);
  addExpressionValue.setItems(popupItems);
  parent.getParent().layout(true,true);
  if (parent.getShell() != null)   parent.getShell().pack();
  return 1;
}