Program: 147965
Project: 147965
Buggy source:
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  Composite container=(Composite)super.createDialogArea(parent);
  GridLayout gl_container=new GridLayout(1,false);
  gl_container.marginRight=5;
  container.setLayout(gl_container);
  Group nameGroup=new Group(container,SWT.NONE);
  nameGroup.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  GridLayout gl_nameGroup=new GridLayout(1,false);
  nameGroup.setLayout(gl_nameGroup);
  nameGroup.setText(Messages.RepositoryViewFilterDialog_groupNamePattern);
  enableNameFilterBun=new Button(nameGroup,SWT.CHECK);
  enableNameFilterBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      namePatternTxt.setEnabled(enableNameFilterBun.getSelection());
    }
  }
);
  enableNameFilterBun.setText(Messages.RepositoryViewFilterDialog_enableNameFilter);
  namePatternTxt=new Text(nameGroup,SWT.BORDER);
  namePatternTxt.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  namePatternTxt.setSize(440,18);
  objectgroup=new Group(container,SWT.NONE);
  objectgroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  objectgroup.setText(Messages.RepositoryViewFilterDialog_groupServerObject);
  objectgroup.setLayout(new GridLayout(1,false));
  enableServerObjFilterBun=new Button(objectgroup,SWT.CHECK);
  enableServerObjFilterBun.setSize(183,16);
  enableServerObjFilterBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      enableServerObjFilterComposite(enableServerObjFilterBun.getSelection());
    }
  }
);
  enableServerObjFilterBun.setText(Messages.RepositoryViewFilterDialog_enableServerObjFilter);
  serverObjViewer=CheckboxTableViewer.newCheckList(objectgroup,SWT.BORDER | SWT.FULL_SELECTION);
  table=serverObjViewer.getTable();
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  table.setSize(441,121);
  enableAllBun=new Button(objectgroup,SWT.CHECK);
  enableAllBun.setSize(171,16);
  enableAllBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      boolean selected=enableAllBun.getSelection();
      enableAllBun.setSelection(selected);
      serverObjViewer.setAllChecked(selected);
      if (selected) {
        enabledConfigs.addAll(allConfigs);
      }
 else {
        enabledConfigs.clear();
      }
    }
  }
);
  enableAllBun.setText(Messages.RepositoryViewFilterDialog_enableAllServerObject);
  serverObjViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      IRepositoryNodeConfiguration config=(IRepositoryNodeConfiguration)event.getElement();
      if (event.getChecked()) {
        enabledConfigs.add(config);
      }
 else {
        enabledConfigs.remove(config);
      }
      solveProcTriCase();
      enableAllBun.setSelection(enabledConfigs.size() == allConfigs.size());
    }
  }
);
  serverObjViewer.setLabelProvider(new ServerObjectLabelProvider());
  serverObjViewer.setContentProvider(new ArrayContentProvider());
  Group lastServerGroup=new Group(container,SWT.NONE);
  lastServerGroup.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  lastServerGroup.setLayout(new GridLayout(3,false));
  lastServerGroup.setText(Messages.RepositoryViewFilterDialog_groupLastServer);
  enableLastServerFilterBun=new Button(lastServerGroup,SWT.CHECK);
  enableLastServerFilterBun.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,2,1));
  enableLastServerFilterBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      enableLastServerFilterComposite(enableLastServerFilterBun.getSelection());
    }
  }
);
  enableLastServerFilterBun.setText(Messages.RepositoryViewFilterDialog_enableLastServerFilter);
  enableLastServerFilterBun.setSelection(false);
  new Label(lastServerGroup,SWT.NONE);
  lastServerLabel=new Label(lastServerGroup,SWT.NONE);
  lastServerLabel.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lastServerLabel.setText(Messages.RepositoryViewFilterDialog_lblLastServer);
  serverNameTxt=new Text(lastServerGroup,SWT.BORDER | SWT.READ_ONLY);
  serverNameTxt.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  selServerBun=new Button(lastServerGroup,SWT.NONE);
  selServerBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      SelectServerDefDialog dlg=new SelectServerDefDialog(getShell());
      if (dlg.open() == IDialogConstants.OK_ID) {
        MDMServerDef def=dlg.getSelectedServerDef();
        serverNameTxt.setText(def.getName());
      }
    }
  }
);
  selServerBun.setText(Messages.RepositoryViewFilterDialog_btnSelectServer);
  getShell().setText(Messages.RepositoryViewFilterDialog_title);
  initServerObjectFilter();
  return container;
}

Fixed version (ground truth):
/** 
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent){
  Composite container=(Composite)super.createDialogArea(parent);
  GridLayout gl_container=new GridLayout(1,false);
  gl_container.marginRight=5;
  container.setLayout(gl_container);
  Group nameGroup=new Group(container,SWT.NONE);
  nameGroup.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  GridLayout gl_nameGroup=new GridLayout(1,false);
  nameGroup.setLayout(gl_nameGroup);
  nameGroup.setText(Messages.RepositoryViewFilterDialog_groupNamePattern);
  enableNameFilterBun=new Button(nameGroup,SWT.CHECK);
  enableNameFilterBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      namePatternTxt.setEnabled(enableNameFilterBun.getSelection());
    }
  }
);
  enableNameFilterBun.setText(Messages.RepositoryViewFilterDialog_enableNameFilter);
  namePatternTxt=new Text(nameGroup,SWT.BORDER);
  namePatternTxt.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  namePatternTxt.setSize(440,18);
  objectgroup=new Group(container,SWT.NONE);
  objectgroup.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  objectgroup.setText(Messages.RepositoryViewFilterDialog_groupServerObject);
  objectgroup.setLayout(new GridLayout(1,false));
  enableServerObjFilterBun=new Button(objectgroup,SWT.CHECK);
  enableServerObjFilterBun.setSize(183,16);
  enableServerObjFilterBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      enableServerObjFilterComposite(enableServerObjFilterBun.getSelection());
    }
  }
);
  enableServerObjFilterBun.setText(Messages.RepositoryViewFilterDialog_enableServerObjFilter);
  serverObjViewer=CheckboxTableViewer.newCheckList(objectgroup,SWT.BORDER | SWT.FULL_SELECTION);
  table=serverObjViewer.getTable();
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,1,1));
  table.setSize(441,121);
  enableAllBun=new Button(objectgroup,SWT.CHECK);
  enableAllBun.setSize(171,16);
  enableAllBun.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      boolean selected=enableAllBun.getSelection();
      enableAllBun.setSelection(selected);
      serverObjViewer.setAllChecked(selected);
      if (selected) {
        enabledConfigs.addAll(allConfigs);
      }
 else {
        enabledConfigs.clear();
      }
    }
  }
);
  enableAllBun.setText(Messages.RepositoryViewFilterDialog_enableAllServerObject);
  serverObjViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      IRepositoryViewObject config=(IRepositoryViewObject)event.getElement();
      if (event.getChecked()) {
        enabledConfigs.add(config);
      }
 else {
        enabledConfigs.remove(config);
      }
      solveProcTriCase();
      enableAllBun.setSelection(enabledConfigs.size() == allConfigs.size());
    }
  }
);
  serverObjViewer.setLabelProvider(new MDMRepositoryLabelProvider());
  serverObjViewer.setContentProvider(new ArrayContentProvider());
  Group lastServerGroup=new Group(container,SWT.NONE);
  lastServerGroup.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  lastServerGroup.setLayout(new GridLayout(3,false));
  lastServerGroup.setText(Messages.RepositoryViewFilterDialog_groupLastServer);
  enableLastServerFilterBun=new Button(lastServerGroup,SWT.CHECK);
  enableLastServerFilterBun.setLayoutData(new GridData(SWT.LEFT,SWT.CENTER,false,false,2,1));
  enableLastServerFilterBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      enableLastServerFilterComposite(enableLastServerFilterBun.getSelection());
    }
  }
);
  enableLastServerFilterBun.setText(Messages.RepositoryViewFilterDialog_enableLastServerFilter);
  enableLastServerFilterBun.setSelection(false);
  new Label(lastServerGroup,SWT.NONE);
  lastServerLabel=new Label(lastServerGroup,SWT.NONE);
  lastServerLabel.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER,false,false,1,1));
  lastServerLabel.setText(Messages.RepositoryViewFilterDialog_lblLastServer);
  serverNameTxt=new Text(lastServerGroup,SWT.BORDER | SWT.READ_ONLY);
  serverNameTxt.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,1,1));
  selServerBun=new Button(lastServerGroup,SWT.NONE);
  selServerBun.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      SelectServerDefDialog dlg=new SelectServerDefDialog(getShell());
      if (dlg.open() == IDialogConstants.OK_ID) {
        MDMServerDef def=dlg.getSelectedServerDef();
        serverNameTxt.setText(def.getName());
      }
    }
  }
);
  selServerBun.setText(Messages.RepositoryViewFilterDialog_btnSelectServer);
  getShell().setText(Messages.RepositoryViewFilterDialog_title);
  initServerObjectFilter();
  return container;
}