Program: 62281
Project: 62281
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,2,5));
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      tableItemSelected();
    }
  }
);
  table.setLinesVisible(true);
  listener=new EditListener(table,true);
  table.addListener(SWT.MouseDown,listener);
  pageListener=new PagingListener(table,new ListPage(id,db,key));
  table.addListener(SWT.SetData,pageListener);
  TableColumn tblclmnNewColumn=new TableColumn(table,SWT.NONE);
  tblclmnNewColumn.setWidth(200);
  btnInsertHead=new Button(grpValues,SWT.NONE);
  btnInsertHead.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnInsertHead.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      InputDialog dialog=new InputDialog(shell.getParent().getShell(),RedisClient.i18nFile.getText(I18nFile.INSERTHEAD),RedisClient.i18nFile.getText(I18nFile.INPUTVALUES),"String_Node_Str",null);
      if (dialog.open() == InputDialog.OK) {
        String value=dialog.getValue();
        service.addHead(id,db,key,value);
        refresh();
      }
    }
  }
);
  btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD));
  btnAppendTail=new Button(grpValues,SWT.NONE);
  btnAppendTail.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnAppendTail.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      InputDialog dialog=new InputDialog(shell.getParent().getShell(),RedisClient.i18nFile.getText(I18nFile.APPENDTAIL),RedisClient.i18nFile.getText(I18nFile.INPUTVALUES),"String_Node_Str",null);
      if (dialog.open() == InputDialog.OK) {
        String value=dialog.getValue();
        service.addTail(id,db,key,value);
        pageListener.setCount();
        table.clear(table.getItemCount() - 1);
        table.setSelection(table.getItemCount() - 1);
        table.setSelection(-1);
        currentData.setItem(null);
        status=Status.Normal;
        statusChanged();
      }
    }
  }
);
  btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL));
  btnDeleteHead=new Button(grpValues,SWT.NONE);
  btnDeleteHead.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDeleteHead.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      service.removeFirst(id,db,key);
      refresh();
    }
  }
);
  btnDeleteHead.setText(RedisClient.i18nFile.getText(I18nFile.DELETEHEAD));
  btnDeleteTail=new Button(grpValues,SWT.NONE);
  btnDeleteTail.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDeleteTail.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      service.removeLast(id,db,key);
      pageListener.setCount();
      table.getItem(table.getItemCount() - 1);
      table.setSelection(table.getItemCount() - 1);
      table.setSelection(-1);
      currentData.setItem(null);
      status=Status.Normal;
      statusChanged();
    }
  }
);
  btnDeleteTail.setText(RedisClient.i18nFile.getText(I18nFile.DELETETAIL));
  btnApply=new Button(grpValues,SWT.NONE);
  btnApply.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] items=table.getSelection();
      service.setValue(id,db,key,table.getSelectionIndex(),items[0].getText());
      table.setSelection(-1);
      currentData.setItem(null);
      status=Status.Normal;
      statusChanged();
    }
  }
);
  btnApply.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  setApply(false);
  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 Update:
      table.setSelection(-1);
    status=Status.Normal;
  currentData.setItem(null);
statusChanged();
break;
case Updating:
currentData.reset();
status=Status.Update;
listener.clickRow(currentData.getItem(),0);
addModifyTextListener();
statusChanged();
break;
}
logger.info("String_Node_Str" + status);
}
}
);
btnCancel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnCancel.setEnabled(false);
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.setEnabled(true);
btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
new Label(grpValues,SWT.NONE);
new Label(grpValues,SWT.NONE);
new Label(grpValues,SWT.NONE);
}

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.setHeaderVisible(true);
  table.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,2,5));
  table.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      tableItemSelected();
    }
  }
);
  table.setLinesVisible(true);
  listener=new EditListener(table,true);
  table.addListener(SWT.MouseDown,listener);
  pageListener=new PagingListener(table,new ListPage(id,db,key));
  table.addListener(SWT.SetData,pageListener);
  tblclmnNewColumn=new TableColumn(table,SWT.NONE);
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  tblclmnNewColumn.setWidth(200);
  btnInsertHead=new Button(grpValues,SWT.NONE);
  btnInsertHead.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnInsertHead.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      InputDialog dialog=new InputDialog(shell.getParent().getShell(),RedisClient.i18nFile.getText(I18nFile.INSERTHEAD),RedisClient.i18nFile.getText(I18nFile.INPUTVALUES),"String_Node_Str",null);
      if (dialog.open() == InputDialog.OK) {
        String value=dialog.getValue();
        service.addHead(id,db,key,value);
        refresh();
      }
    }
  }
);
  btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD));
  btnAppendTail=new Button(grpValues,SWT.NONE);
  btnAppendTail.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnAppendTail.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      InputDialog dialog=new InputDialog(shell.getParent().getShell(),RedisClient.i18nFile.getText(I18nFile.APPENDTAIL),RedisClient.i18nFile.getText(I18nFile.INPUTVALUES),"String_Node_Str",null);
      if (dialog.open() == InputDialog.OK) {
        String value=dialog.getValue();
        service.addTail(id,db,key,value);
        pageListener.setCount();
        table.clear(table.getItemCount() - 1);
        table.setSelection(table.getItemCount() - 1);
        table.setSelection(-1);
        currentData.setItem(null);
        status=Status.Normal;
        statusChanged();
      }
    }
  }
);
  btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL));
  btnDeleteHead=new Button(grpValues,SWT.NONE);
  btnDeleteHead.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDeleteHead.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      service.removeFirst(id,db,key);
      refresh();
    }
  }
);
  btnDeleteHead.setText(RedisClient.i18nFile.getText(I18nFile.DELETEHEAD));
  btnDeleteTail=new Button(grpValues,SWT.NONE);
  btnDeleteTail.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  btnDeleteTail.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      service.removeLast(id,db,key);
      pageListener.setCount();
      table.getItem(table.getItemCount() - 1);
      table.setSelection(table.getItemCount() - 1);
      table.setSelection(-1);
      currentData.setItem(null);
      status=Status.Normal;
      statusChanged();
    }
  }
);
  btnDeleteTail.setText(RedisClient.i18nFile.getText(I18nFile.DELETETAIL));
  btnApply=new Button(grpValues,SWT.NONE);
  btnApply.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TableItem[] items=table.getSelection();
      service.setValue(id,db,key,table.getSelectionIndex(),items[0].getText());
      table.setSelection(-1);
      currentData.setItem(null);
      status=Status.Normal;
      statusChanged();
    }
  }
);
  btnApply.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
  setApply(false);
  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 Update:
      table.setSelection(-1);
    status=Status.Normal;
  currentData.setItem(null);
statusChanged();
break;
case Updating:
currentData.reset();
status=Status.Update;
listener.clickRow(currentData.getItem(),0);
addModifyTextListener();
statusChanged();
break;
}
logger.info("String_Node_Str" + status);
}
}
);
btnCancel.setLayoutData(new GridData(SWT.FILL,SWT.TOP,false,false,1,1));
btnCancel.setEnabled(false);
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.setEnabled(true);
btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
new Label(grpValues,SWT.NONE);
new Label(grpValues,SWT.NONE);
new Label(grpValues,SWT.NONE);
}