Program: 147988
Project: 147988
Buggy source:
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  Composite container1=(Composite)super.createDialogArea(parent);
  GridLayout gridLayout=(GridLayout)container1.getLayout();
  container1.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  gridLayout.numColumns=1;
  Label lblNewLabel_selserver=new Label(container1,SWT.NONE);
  lblNewLabel_selserver.setText(Messages.DeployAllDialog_label_selectserver);
  combo=new Combo(container1,SWT.DROP_DOWN | SWT.READ_ONLY);
  GridData data=new GridData(SWT.LEFT,SWT.TOP,false,false,1,2);
  data.widthHint=400;
  combo.setLayoutData(data);
  final List<MDMServerDef> serverDefs=new ArrayList<MDMServerDef>();
  List<IRepositoryViewObject> viewObjects=ServerDefService.getAllServerDefViewObjects();
  List<String> itemsLabel=new ArrayList<String>();
  for (  IRepositoryViewObject object : viewObjects) {
    if (object instanceof IRepositoryObject) {
      MDMServerDefItem mdmItem=getMDMItem((IRepositoryViewObject)object);
      if (mdmItem != null) {
        MDMServerDef serverDef=mdmItem.getServerDef();
        String label=serverDef.getName() + "String_Node_Str" + serverDef.getHost()+ "String_Node_Str";
        itemsLabel.add(label);
        serverDefs.add(serverDef);
      }
    }
  }
  int size=itemsLabel.size();
  combo.setItems((String[])itemsLabel.toArray(new String[size]));
  combo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      theServerDef=serverDefs.get(combo.getSelectionIndex());
    }
  }
);
  if (comboServerName != null && comboServerName.trim().length() > 0) {
    for (int index=0; index < serverDefs.size(); index++) {
      if (serverDefs.get(index).getName().equals(comboServerName)) {
        combo.select(index);
        theServerDef=serverDefs.get(index);
      }
    }
  }
 else {
    if (serverDefs.size() > 0) {
      combo.select(0);
      theServerDef=serverDefs.get(0);
    }
  }
  Composite container=new Composite(container1,SWT.BORDER);
  container.setLayout(new GridLayout(2,false));
  container.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  Label lblNewLabel=new Label(container,SWT.NONE);
  lblNewLabel.setText(Messages.DeployAllDialog_label);
  new Label(container,SWT.NONE);
  IRepositoryViewObject[] theInput=(IRepositoryViewObject[])input;
  theInput=getNewInput();
  restoreDeleteObjectsTreeView(theInput);
  treeViewer=new RepositoryViewObjectCheckedWidget(container,theInput,changedViewObjs);
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
    }
  }
);
  treeViewer.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,2));
  Button selAllButton=new Button(container,SWT.NONE);
  selAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      treeViewer.selectAll(true);
    }
  }
);
  selAllButton.setText(Messages.DeployAllDialog_selectAll);
  Button deselAllBun=new Button(container,SWT.NONE);
  deselAllBun.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false,1,1));
  deselAllBun.setText(Messages.DeployAllDialog_deselectAll);
  deselAllBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      treeViewer.selectAll(false);
    }
  }
);
  return container;
}

Fixed version (ground truth):
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  Composite container1=(Composite)super.createDialogArea(parent);
  GridLayout gridLayout=(GridLayout)container1.getLayout();
  container1.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  gridLayout.numColumns=1;
  Label lblNewLabel_selserver=new Label(container1,SWT.NONE);
  lblNewLabel_selserver.setText(Messages.DeployAllDialog_label_selectserver);
  combo=new Combo(container1,SWT.DROP_DOWN | SWT.READ_ONLY);
  GridData data=new GridData(SWT.LEFT,SWT.TOP,false,false,1,2);
  data.widthHint=400;
  combo.setLayoutData(data);
  final List<MDMServerDef> serverDefs=new ArrayList<MDMServerDef>();
  List<IRepositoryViewObject> viewObjects=ServerDefService.getAllServerDefViewObjects();
  List<String> itemsLabel=new ArrayList<String>();
  for (  IRepositoryViewObject object : viewObjects) {
    if (object instanceof IRepositoryObject) {
      MDMServerDefItem mdmItem=getMDMItem((IRepositoryViewObject)object);
      if (mdmItem != null) {
        MDMServerDef serverDef=mdmItem.getServerDef();
        String label=serverDef.getName() + "String_Node_Str" + serverDef.getHost()+ "String_Node_Str";
        itemsLabel.add(label);
        serverDefs.add(serverDef);
      }
    }
  }
  int size=itemsLabel.size();
  combo.setItems((String[])itemsLabel.toArray(new String[size]));
  combo.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      theServerDef=serverDefs.get(combo.getSelectionIndex());
    }
  }
);
  if (comboServerName != null && comboServerName.trim().length() > 0) {
    for (int index=0; index < serverDefs.size(); index++) {
      if (serverDefs.get(index).getName().equals(comboServerName)) {
        combo.select(index);
        theServerDef=serverDefs.get(index);
      }
    }
  }
 else {
    if (serverDefs.size() > 0) {
      combo.select(0);
      theServerDef=serverDefs.get(0);
    }
  }
  Composite container=new Composite(container1,SWT.BORDER);
  container.setLayout(new GridLayout(2,false));
  container.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  Label lblNewLabel=new Label(container,SWT.NONE);
  lblNewLabel.setText(Messages.DeployAllDialog_label);
  new Label(container,SWT.NONE);
  restoreDeleteObjectsTreeView((IRepositoryViewObject[])input);
  treeViewer=new RepositoryViewObjectCheckedWidget(container,input,changedViewObjs);
  treeViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
    }
  }
);
  treeViewer.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,2));
  Button selAllButton=new Button(container,SWT.NONE);
  selAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      treeViewer.selectAll(true);
    }
  }
);
  selAllButton.setText(Messages.DeployAllDialog_selectAll);
  Button deselAllBun=new Button(container,SWT.NONE);
  deselAllBun.setLayoutData(new GridData(SWT.LEFT,SWT.TOP,false,false,1,1));
  deselAllBun.setText(Messages.DeployAllDialog_deselectAll);
  deselAllBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      treeViewer.selectAll(false);
    }
  }
);
  return container;
}