Program: 62264
Project: 62264
Buggy source:
/** 
 * @wbp.parser.entryPoint
 */
@Override protected void initData(Composite dataComposite){
  grpValues=new Group(dataComposite,SWT.NONE);
  grpValues.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,4,1));
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  grpValues.setLayout(new GridLayout(4,false));
  table=new Table(grpValues,SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI| SWT.VIRTUAL);
  ;
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,3,5));
  table.setHeaderVisible(true);
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      tableItemSelected();
    }
  }
);
  table.setLinesVisible(true);
  table.addListener(SWT.MouseDown,new EditListener(table,false));
  editListener=new EditListener(table,true);
  pageListener=new PagingListener(table,new ZSetPage(id,db,key));
  table.addListener(SWT.SetData,pageListener);
  tblclmnNewColumn=new TableColumn(table,SWT.NONE);
  tblclmnNewColumn.setWidth(88);
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.SCORE));
  tblclmnMember=new TableColumn(table,SWT.NONE);
  tblclmnMember.setWidth(164);
  tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER));
  btnAdd=new Button(grpValues,SWT.NONE);
  btnAdd.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnAdd.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      table.addListener(SWT.MouseDown,editListener);
      table.removeListener(SWT.SetData,pageListener);
      pageListener=new PagingListener(table,new ZSetPage(id,db,key),true);
      table.addListener(SWT.SetData,pageListener);
      table.clearAll();
      TableItem item=table.getItem(0);
      table.setSelection(item);
      item.setText(new String[]{"String_Node_Str","String_Node_Str"});
      editListener.clickRow(item,0);
      addModifyTextListener();
      currentItem=item;
      status=Status.Add;
      statusChanged();
    }
  }
);
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete=new Button(grpValues,SWT.NONE);
  btnDelete.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDelete.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (table.getSelectionCount() > 0) {
        String[] members=new String[table.getSelectionCount()];
        int i=0;
        TableItem[] items=table.getSelection();
        for (        TableItem item : items) {
          members[i++]=item.getText(1);
        }
        service.removeMembers(id,db,key,members);
        for (        TableItem item : items) {
          item.dispose();
        }
        table.setSelection(-1);
        currentItem=null;
        btnDelete.setEnabled(false);
      }
    }
  }
);
  btnDelete.setEnabled(false);
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  btnApply=new Button(grpValues,SWT.NONE);
  btnApply.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      add();
    }
  }
);
  setApply(false);
  btnApply.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
  btnCancel=new Button(grpValues,SWT.NONE);
  btnCancel.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
switch (status) {
case Normal:
        break;
case Add:
      refresh();
    status=Status.Normal;
  currentItem=null;
statusChanged();
break;
case Adding:
refresh();
status=Status.Normal;
currentItem=null;
statusChanged();
break;
}
logger.info("String_Node_Str" + status);
}
}
);
btnCancel.setEnabled(false);
btnCancel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL));
btnRefresh=new Button(grpValues,SWT.NONE);
btnRefresh.addSelectionListener(new SelectionAdapter(){
@Override public void widgetSelected(SelectionEvent e){
refresh();
}
}
);
btnRefresh.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
}

Fixed version (ground truth):
/** 
 * @wbp.parser.entryPoint
 */
@Override protected void initData(Composite dataComposite){
  grpValues=new Group(dataComposite,SWT.NONE);
  grpValues.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,4,1));
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  grpValues.setLayout(new GridLayout(4,false));
  table=new Table(grpValues,SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI| SWT.VIRTUAL);
  ;
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,3,5));
  table.setHeaderVisible(true);
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      tableItemSelected();
    }
  }
);
  table.setLinesVisible(true);
  table.addListener(SWT.MouseDown,new EditListener(table,false));
  editListener=new EditListener(table,true);
  pageListener=new PagingListener(table,new ZSetPage(id,db,key));
  table.addListener(SWT.SetData,pageListener);
  tblclmnNewColumn=new TableColumn(table,SWT.NONE);
  tblclmnNewColumn.setWidth(88);
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.SCORE));
  tblclmnMember=new TableColumn(table,SWT.NONE);
  tblclmnMember.setWidth(164);
  tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.MEMBER));
  btnAdd=new Button(grpValues,SWT.NONE);
  btnAdd.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnAdd.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      table.addListener(SWT.MouseDown,editListener);
      table.removeListener(SWT.SetData,pageListener);
      pageListener=new PagingListener(table,new ZSetPage(id,db,key),true);
      table.addListener(SWT.SetData,pageListener);
      table.clearAll();
      TableItem item=table.getItem(0);
      table.setSelection(item);
      item.setText(new String[]{"String_Node_Str","String_Node_Str"});
      editListener.clickRow(item,0);
      addModifyTextListener();
      currentItem=item;
      status=Status.Add;
      statusChanged();
    }
  }
);
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete=new Button(grpValues,SWT.NONE);
  btnDelete.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDelete.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      if (table.getSelectionCount() > 0) {
        String[] members=new String[table.getSelectionCount()];
        int i=0;
        TableItem[] items=table.getSelection();
        for (        TableItem item : items) {
          members[i++]=item.getText(1);
        }
        service.removeMembers(id,db,key,members);
        for (        TableItem item : items) {
          item.dispose();
        }
        table.setSelection(-1);
        currentItem=null;
        btnDelete.setEnabled(false);
      }
    }
  }
);
  btnDelete.setEnabled(false);
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  btnApply=new Button(grpValues,SWT.NONE);
  btnApply.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      add();
    }
  }
);
  setApply(false);
  btnApply.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
  btnCancel=new Button(grpValues,SWT.NONE);
  btnCancel.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
switch (status) {
case Normal:
        break;
case Add:
      refresh();
    status=Status.Normal;
  currentItem=null;
statusChanged();
break;
case Adding:
refresh();
status=Status.Normal;
currentItem=null;
statusChanged();
break;
}
}
}
);
btnCancel.setEnabled(false);
btnCancel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL));
btnRefresh=new Button(grpValues,SWT.NONE);
btnRefresh.addSelectionListener(new SelectionAdapter(){
@Override public void widgetSelected(SelectionEvent e){
refresh();
}
}
);
btnRefresh.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
}