nus-yam/ex-repair huggingface dataset:
Program: 62232
Project: 62232
Buggy source:
@Override public RedisVersion getSupportVersion(){
  return RedisVersion.REDIS_2_4;
}

Fixed version (ground truth):
@Override public RedisVersion getSupportVersion(){
  if (headTail && exist)   return RedisVersion.REDIS_1_0;
 else   if (headTail && !exist)   return RedisVersion.REDIS_2_2;
 else   if (!headTail && exist)   return RedisVersion.REDIS_1_0;
 else   return RedisVersion.REDIS_2_2;
}
Program: 62233
Project: 62233
Buggy source:
public void add(int id,int db,String key,Map<String,String> values,int ttl){
  AddHash command=new AddHash(id,db,key,values);
  command.execute();
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
}

Fixed version (ground truth):
public void add(int id,int db,String key,Map<String,String> values,int ttl){
  AddHash command=new AddHash(id,db,key,values);
  command.execute();
  if (ttl != -1) {
    Expire command1=new Expire(id,db,key,ttl);
    command1.execute();
  }
}
Program: 62234
Project: 62234
Buggy source:
public void add(int id,int db,String key,List<String> values,boolean headTail,boolean exist,int ttl){
  AddList command=new AddList(id,db,key,values,headTail,exist);
  command.execute();
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
}

Fixed version (ground truth):
public void add(int id,int db,String key,List<String> values,boolean headTail,boolean exist,int ttl){
  AddList command=new AddList(id,db,key,values,headTail,exist);
  command.execute();
  if (ttl != -1) {
    Expire command1=new Expire(id,db,key,ttl);
    command1.execute();
  }
}
Program: 62235
Project: 62235
Buggy source:
public long add(int id,int db,String key,Set<String> values,int ttl){
  AddSet command=(AddSet)new AddSetFactory(id,db,key,values).getCommand();
  command.execute();
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
  return command.getSize();
}

Fixed version (ground truth):
public long add(int id,int db,String key,Set<String> values,int ttl){
  AddSet command=(AddSet)new AddSetFactory(id,db,key,values).getCommand();
  command.execute();
  if (ttl != -1) {
    Expire command1=new Expire(id,db,key,ttl);
    command1.execute();
  }
  return command.getSize();
}
Program: 62236
Project: 62236
Buggy source:
public void add(int id,int db,String key,Map<String,Double> values,int ttl){
  AddZSet command=(AddZSet)new AddZSetFactory(id,db,key,values).getCommand();
  command.execute();
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
}

Fixed version (ground truth):
public void add(int id,int db,String key,Map<String,Double> values,int ttl){
  AddZSet command=(AddZSet)new AddZSetFactory(id,db,key,values).getCommand();
  command.execute();
  if (ttl != -1) {
    Expire command1=new Expire(id,db,key,ttl);
    command1.execute();
  }
}
Program: 62237
Project: 62237
Buggy source:
@Override public Result parse(String head,BufferedReader reader) throws IOException {
  int replys=Integer.parseInt(head.substring(1,head.length()));
  if (replys == -1)   throw new NullReplyException("String_Node_Str");
  String result="String_Node_Str";
  for (int i=0; i < replys; i++) {
    String subHead=reader.readLine();
    ProtocolParser parser=ProtocolParser.getParser(subHead);
    result+=parser.parse(subHead,reader).getResult();
    result+="String_Node_Str";
  }
  return new Result(result,ResultType.MultiBulk);
}

Fixed version (ground truth):
@Override public Result parse(String head,BufferedReader reader) throws IOException {
  int replys=Integer.parseInt(head.substring(1,head.length()));
  if (replys == -1)   throw new NullReplyException("String_Node_Str");
  String result="String_Node_Str";
  for (int i=0; i < replys; i++) {
    String subHead=reader.readLine();
    ReplyParser parser=ReplyParser.getParser(subHead);
    result+=parser.parse(subHead,reader).getResult();
    result+="String_Node_Str";
  }
  return new Result(result,ResultType.MultiBulk);
}
Program: 62238
Project: 62238
Buggy source:
public Result execute(String command) throws IOException {
  String[] parameters=command.trim().replaceAll("String_Node_Str","String_Node_Str").split("String_Node_Str");
  int number=parameters.length;
  String cmd="String_Node_Str" + number + NEWLINE;
  for (  String parameter : parameters) {
    cmd+="String_Node_Str";
    cmd+=parameter.length();
    cmd+=NEWLINE;
    cmd+=parameter;
    cmd+=NEWLINE;
  }
  writer.write(cmd);
  writer.flush();
  String head=reader.readLine();
  ProtocolParser parser=ProtocolParser.getParser(head);
  return parser.parse(head,reader);
}

Fixed version (ground truth):
public Result execute(String command) throws IOException {
  Pattern pattern=Pattern.compile("String_Node_Str");
  Matcher matcher=pattern.matcher(command.trim());
  int number=0;
  String cmd="String_Node_Str";
  String parameter;
  while (matcher.find()) {
    parameter=matcher.group();
    if (parameter.charAt(0) == '"') {
      int index=parameter.lastIndexOf('"');
      parameter=parameter.substring(1,index);
    }
    cmd+="String_Node_Str";
    cmd+=parameter.length();
    cmd+=NEWLINE;
    cmd+=parameter;
    cmd+=NEWLINE;
    number++;
  }
  String cmdStr="String_Node_Str" + number + NEWLINE+ cmd;
  writer.write(cmdStr);
  writer.flush();
  String head=reader.readLine();
  ReplyParser parser=ReplyParser.getParser(head);
  return parser.parse(head,reader);
}
Program: 62239
Project: 62239
Buggy source:
public Result execute(String command) throws IOException {
  Pattern pattern=Pattern.compile("String_Node_Str");
  Matcher matcher=pattern.matcher(command.trim());
  int number=0;
  String cmd="String_Node_Str";
  String parameter;
  while (matcher.find()) {
    parameter=matcher.group();
    if (parameter.charAt(0) == '"') {
      int index=parameter.lastIndexOf('"');
      parameter=parameter.substring(1,index);
    }
    cmd+="String_Node_Str";
    cmd+=parameter.length();
    cmd+=NEWLINE;
    cmd+=parameter;
    cmd+=NEWLINE;
    number++;
  }
  String cmdStr1="String_Node_Str" + number + NEWLINE+ cmd;
  String cmdStr=cmdStr1;
  writer.write(cmdStr);
  writer.flush();
  String head=reader.readLine();
  ReplyParser parser=ReplyParser.getParser(head);
  return parser.parse(head,reader);
}

Fixed version (ground truth):
public Result execute(String command) throws IOException {
  Pattern pattern=Pattern.compile("String_Node_Str");
  Matcher matcher=pattern.matcher(command.trim());
  int number=0;
  String cmd="String_Node_Str";
  String parameter;
  while (matcher.find()) {
    parameter=matcher.group();
    if (parameter.charAt(0) == '"') {
      int index=parameter.lastIndexOf('"');
      if (index == 0)       throw new RuntimeException(RedisClient.i18nFile.getText(I18nFile.CMDEXCEPTION));
      parameter=parameter.substring(1,index);
    }
    cmd+="String_Node_Str";
    cmd+=parameter.length();
    cmd+=NEWLINE;
    cmd+=parameter;
    cmd+=NEWLINE;
    number++;
  }
  String cmdStr1="String_Node_Str" + number + NEWLINE+ cmd;
  String cmdStr=cmdStr1;
  writer.write(cmdStr);
  writer.flush();
  String head=reader.readLine();
  ReplyParser parser=ReplyParser.getParser(head);
  return parser.parse(head,reader);
}
Program: 62240
Project: 62240
Buggy source:
public void widgetDisposed(DisposeEvent e){
  DataContent dataContent=(DataContent)tbtmNewItem.getData();
  openDataContent.remove(dataContent);
  tbtmNewItem.dispose();
  logger.info("String_Node_Str");
}

Fixed version (ground truth):
public void widgetDisposed(DisposeEvent e){
  DataContent dataContent=(DataContent)tbtmNewItem.getData();
  openDataContent.remove(dataContent);
  tbtmNewItem.dispose();
}
Program: 62242
Project: 62242
Buggy source:
@Override public void mouseDoubleClick(MouseEvent e){
  logger.debug("String_Node_Str");
  TreeItem[] treeItems=tree.getSelection();
  Point point=new Point(e.x,e.y);
  TableItem selectedItem=table.getItem(point);
  if (selectedItem != null) {
    NodeType type=(NodeType)selectedItem.getData(NODE_TYPE);
    if (type == NodeType.CONTAINER || type == NodeType.DATABASE || type == NodeType.SERVER) {
      boolean find=false;
      for (      TreeItem treeItem : treeItems[0].getItems()) {
        String treeText=treeItem.getText();
        String tableText=selectedItem.getText(0);
        if (treeText.equals(tableText)) {
          find=true;
          if (type == NodeType.CONTAINER || type == NodeType.DATABASE)           dbContainerTreeItemSelected(treeItem,false);
 else           if (type == NodeType.SERVER)           serverTreeItemSelected(treeItem,false);
          history.add(treeItem);
          btnBackward.setEnabled(true);
          btnForward.setEnabled(false);
          break;
        }
      }
      if (!find)       MessageDialog.openInformation(shell,i18nFile.getText(I18nFile.INFORMATION),i18nFile.getText(I18nFile.NEWKEYFOUND) + text.getText());
    }
 else {
      dataProperties();
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent e){
  TreeItem[] treeItems=tree.getSelection();
  Point point=new Point(e.x,e.y);
  TableItem selectedItem=table.getItem(point);
  if (selectedItem != null) {
    NodeType type=(NodeType)selectedItem.getData(NODE_TYPE);
    if (type == NodeType.CONTAINER || type == NodeType.DATABASE || type == NodeType.SERVER) {
      boolean find=false;
      for (      TreeItem treeItem : treeItems[0].getItems()) {
        String treeText=treeItem.getText();
        String tableText=selectedItem.getText(0);
        if (treeText.equals(tableText)) {
          find=true;
          if (type == NodeType.CONTAINER || type == NodeType.DATABASE)           dbContainerTreeItemSelected(treeItem,false);
 else           if (type == NodeType.SERVER)           serverTreeItemSelected(treeItem,false);
          history.add(treeItem);
          btnBackward.setEnabled(true);
          btnForward.setEnabled(false);
          break;
        }
      }
      if (!find)       MessageDialog.openInformation(shell,i18nFile.getText(I18nFile.INFORMATION),i18nFile.getText(I18nFile.NEWKEYFOUND) + text.getText());
    }
 else {
      dataProperties();
    }
  }
}
Program: 62243
Project: 62243
Buggy source:
private void selectTreeItem(){
  logger.debug("String_Node_Str");
  TreeItem[] items=tree.getSelection();
  if ((itemsSelected[0] instanceof TreeItem && items[0] != itemsSelected[0])) {
    history.add(items[0]);
    btnBackward.setEnabled(true);
    btnForward.setEnabled(false);
  }
 else   if (itemsSelected[0] instanceof TableItem && items[0] != treeItemSelected) {
    history.add(items[0]);
    btnBackward.setEnabled(true);
    btnForward.setEnabled(false);
  }
  treeItemSelected(false);
}

Fixed version (ground truth):
private void selectTreeItem(){
  TreeItem[] items=tree.getSelection();
  if ((itemsSelected[0] instanceof TreeItem && items[0] != itemsSelected[0])) {
    history.add(items[0]);
    btnBackward.setEnabled(true);
    btnForward.setEnabled(false);
  }
 else   if (itemsSelected[0] instanceof TableItem && items[0] != treeItemSelected) {
    history.add(items[0]);
    btnBackward.setEnabled(true);
    btnForward.setEnabled(false);
  }
  treeItemSelected(false);
}
Program: 62245
Project: 62245
Buggy source:
private void tableItemSelected(){
  logger.debug("String_Node_Str");
  TableItem[] items=table.getSelection();
  if (items.length == 1) {
    itemsSelected=items;
    TreeItem[] treeItems=tree.getSelection();
    treeItemSelected=treeItems[0];
    NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
      serverItemSelected();
    break;
case DATABASE:
case CONTAINER:
  dbContainerItemSelected(items[0]);
break;
default :
dataItemSelected();
break;
}
}
 else if (items.length > 1) {
NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
itemsSelected=items;
TreeItem[] treeItems=tree.getSelection();
treeItemSelected=treeItems[0];
serverItemsSelected();
break;
case DATABASE:
for (TableItem item : items) {
if (item != itemsSelected[0]) {
itemsSelected[0]=item;
table.setSelection(item);
break;
}
}
break;
default :
itemsSelected=items;
TreeItem[] treeItems1=tree.getSelection();
treeItemSelected=treeItems1[0];
containerItemsSelected();
break;
}
}
 else {
TreeItem[] treeItems=tree.getSelection();
itemsSelected=treeItems;
NodeType type=(NodeType)itemsSelected[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
serverItemSelected();
break;
case DATABASE:
case CONTAINER:
dbContainerItemSelected(itemsSelected[0]);
break;
default :
dataItemSelected();
break;
}
}
}

Fixed version (ground truth):
private void tableItemSelected(){
  TableItem[] items=table.getSelection();
  if (items.length == 1) {
    itemsSelected=items;
    TreeItem[] treeItems=tree.getSelection();
    treeItemSelected=treeItems[0];
    NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
      serverItemSelected();
    break;
case DATABASE:
case CONTAINER:
  dbContainerItemSelected(items[0]);
break;
default :
dataItemSelected();
break;
}
}
 else if (items.length > 1) {
NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
itemsSelected=items;
TreeItem[] treeItems=tree.getSelection();
treeItemSelected=treeItems[0];
serverItemsSelected();
break;
case DATABASE:
for (TableItem item : items) {
if (item != itemsSelected[0]) {
itemsSelected[0]=item;
table.setSelection(item);
break;
}
}
break;
default :
itemsSelected=items;
TreeItem[] treeItems1=tree.getSelection();
treeItemSelected=treeItems1[0];
containerItemsSelected();
break;
}
}
 else {
TreeItem[] treeItems=tree.getSelection();
itemsSelected=treeItems;
NodeType type=(NodeType)itemsSelected[0].getData(NODE_TYPE);
switch (type) {
case SERVER:
serverItemSelected();
break;
case DATABASE:
case CONTAINER:
dbContainerItemSelected(itemsSelected[0]);
break;
default :
dataItemSelected();
break;
}
}
}
Program: 62246
Project: 62246
Buggy source:
@Override protected void createContents(){
  super.createContents();
  text_3.setText(server.getName());
  text_3.selectAll();
  text_3.setFocus();
  text_4.setText(server.getHost());
  text_4.selectAll();
  text_5.setText(server.getPort());
  text_5.selectAll();
  text_6.setText(server.getPassword());
  text_6.selectAll();
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  text_3.setText(server.getName());
  text_3.selectAll();
  text_3.setFocus();
  text_4.setText(server.getHost());
  text_4.selectAll();
  text_5.setText(server.getPort());
  text_5.selectAll();
  if (server.getPassword() != null) {
    text_6.setText(server.getPassword());
    text_6.selectAll();
  }
}
Program: 62247
Project: 62247
Buggy source:
@Override protected void initData(Composite dataComposite){
  Label label=new Label(dataComposite,SWT.NONE);
  label.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  text_value=new Text(dataComposite,SWT.BORDER);
  text_value.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,false,3,1));
}

Fixed version (ground truth):
@Override protected void initData(Composite dataComposite){
  Label label=new Label(dataComposite,SWT.NONE);
  label.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  text_value=new Text(dataComposite,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL| SWT.MULTI);
  text_value.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true,3,1));
}
Program: 62249
Project: 62249
Buggy source:
private Command getCommand(String cmd){
  if (cmd.trim().equalsIgnoreCase("String_Node_Str"))   return new QuitCmd(this,cmd);
 else   return new Command(this,cmd);
}

Fixed version (ground truth):
private Command getCommand(String cmd){
  String[] strs=cmd.trim().split("String_Node_Str");
  if (strs[0].equalsIgnoreCase("String_Node_Str"))   return new QuitCmd(this,cmd);
 else   return new Command(this,cmd);
}
Program: 62250
Project: 62250
Buggy source:
public I18nFile(){
  propertyFile=getClass().getResource("String_Node_Str").getFile();
  try {
    properties=getProperty(propertyFile);
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public I18nFile(){
  propertyFile=getClass().getResourceAsStream("String_Node_Str");
  try {
    properties=getProperty(propertyFile);
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getLocalizedMessage());
  }
}
Program: 62251
Project: 62251
Buggy source:
protected static Properties getProperty(String propertyFile) throws IOException {
  Properties props=new Properties();
  File file=new File(propertyFile);
  if (!file.exists())   file.createNewFile();
  InputStream is;
  try {
    is=new BufferedInputStream(new FileInputStream(propertyFile));
  }
 catch (  FileNotFoundException e) {
    throw new IllegalArgumentException();
  }
  props.load(is);
  is.close();
  return props;
}

Fixed version (ground truth):
protected static Properties getProperty(InputStream is) throws IOException {
  Properties props=new Properties();
  props.load(is);
  is.close();
  return props;
}
Program: 62252
Project: 62252
Buggy source:
public void handleEvent(final Event e){
switch (e.type) {
case SWT.FocusOut:
    logger.info("String_Node_Str");
  item.setText(column,text.getText());
text.dispose();
break;
case SWT.Traverse:
switch (e.detail) {
case SWT.TRAVERSE_RETURN:
item.setText(column,text.getText());
case SWT.TRAVERSE_ESCAPE:
text.dispose();
e.doit=false;
}
break;
}
}

Fixed version (ground truth):
public void handleEvent(final Event e){
switch (e.type) {
case SWT.FocusOut:
    item.setText(column,text.getText());
  text.dispose();
break;
case SWT.Traverse:
switch (e.detail) {
case SWT.TRAVERSE_RETURN:
item.setText(column,text.getText());
case SWT.TRAVERSE_ESCAPE:
text.dispose();
e.doit=false;
}
break;
}
}
Program: 62253
Project: 62253
Buggy source:
public void clickRow(final TableItem item,final int column){
  logger.info("String_Node_Str");
  text=new Text(table,SWT.NONE);
  text.setEditable(edit);
  Listener textListener=new Listener(){
    public void handleEvent(    final Event e){
switch (e.type) {
case SWT.FocusOut:
        logger.info("String_Node_Str");
      item.setText(column,text.getText());
    text.dispose();
  break;
case SWT.Traverse:
switch (e.detail) {
case SWT.TRAVERSE_RETURN:
  item.setText(column,text.getText());
case SWT.TRAVERSE_ESCAPE:
text.dispose();
e.doit=false;
}
break;
}
}
}
;
text.addListener(SWT.FocusOut,textListener);
text.addListener(SWT.Traverse,textListener);
editor.setEditor(text,item,column);
text.setText(item.getText(column));
text.selectAll();
text.setFocus();
beginEdit();
}

Fixed version (ground truth):
public void clickRow(final TableItem item,final int column){
  text=new Text(table,SWT.NONE);
  text.setEditable(edit);
  Listener textListener=new Listener(){
    public void handleEvent(    final Event e){
switch (e.type) {
case SWT.FocusOut:
        item.setText(column,text.getText());
      text.dispose();
    break;
case SWT.Traverse:
switch (e.detail) {
case SWT.TRAVERSE_RETURN:
    item.setText(column,text.getText());
case SWT.TRAVERSE_ESCAPE:
  text.dispose();
e.doit=false;
}
break;
}
}
}
;
text.addListener(SWT.FocusOut,textListener);
text.addListener(SWT.Traverse,textListener);
editor.setEditor(text,item,column);
text.setText(item.getText(column));
text.selectAll();
text.setFocus();
beginEdit();
}
Program: 62254
Project: 62254
Buggy source:
@Override public void handleEvent(Event event){
  logger.info("String_Node_Str");
  TableItem item=(TableItem)event.item;
  setPage(table.indexOf(item));
}

Fixed version (ground truth):
@Override public void handleEvent(Event event){
  TableItem item=(TableItem)event.item;
  setPage(table.indexOf(item));
}
Program: 62255
Project: 62255
Buggy source:
public PagingListener(Table table,IPage page,boolean addHead){
  this.table=table;
  this.page=page;
  this.addHead=addHead;
  logger.info("String_Node_Str" + addHead);
  if (!addHead) {
    this.count=(int)page.getCount();
  }
 else {
    this.count=(int)page.getCount() + 1;
  }
  this.table.setItemCount(count);
}

Fixed version (ground truth):
public PagingListener(Table table,IPage page,boolean addHead){
  this.table=table;
  this.page=page;
  this.addHead=addHead;
  if (!addHead) {
    this.count=(int)page.getCount();
  }
 else {
    this.count=(int)page.getCount() + 1;
  }
  this.table.setItemCount(count);
}
Program: 62256
Project: 62256
Buggy source:
private void add(){
  TableItem item=new TableItem(table,SWT.NONE,0);
  table.setSelection(item);
  listener.clickRow(item,0);
  currentStatus=Status.Add;
  currentData.setItem(item);
  addModifyTextListener();
  logger.info("String_Node_Str" + currentStatus);
  statusChanged();
}

Fixed version (ground truth):
private void add(){
  TableItem item=new TableItem(table,SWT.NONE,0);
  table.setSelection(item);
  listener.clickRow(item,0);
  currentStatus=Status.Add;
  currentData.setItem(item);
  addModifyTextListener();
  statusChanged();
}
Program: 62257
Project: 62257
Buggy source:
private void addModifyTextListener(){
  Text editor=listener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (currentStatus) {
case Normal:
          break;
case Add:
        currentStatus=Status.Adding;
      statusChanged();
    break;
case Adding:
  break;
case Edit:
currentStatus=Status.Editing;
statusChanged();
break;
case Editing:
break;
}
logger.info("String_Node_Str" + currentStatus);
}
}
);
}
}

Fixed version (ground truth):
private void addModifyTextListener(){
  Text editor=listener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (currentStatus) {
case Normal:
          break;
case Add:
        currentStatus=Status.Adding;
      statusChanged();
    break;
case Adding:
  break;
case Edit:
currentStatus=Status.Editing;
statusChanged();
break;
case Editing:
break;
}
}
}
);
}
}
Program: 62258
Project: 62258
Buggy source:
public void modifyText(ModifyEvent e){
switch (currentStatus) {
case Normal:
    break;
case Add:
  currentStatus=Status.Adding;
statusChanged();
break;
case Adding:
break;
case Edit:
currentStatus=Status.Editing;
statusChanged();
break;
case Editing:
break;
}
logger.info("String_Node_Str" + currentStatus);
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
switch (currentStatus) {
case Normal:
    break;
case Add:
  currentStatus=Status.Adding;
statusChanged();
break;
case Adding:
break;
case Edit:
currentStatus=Status.Editing;
statusChanged();
break;
case Editing:
break;
}
}
Program: 62259
Project: 62259
Buggy source:
protected void tableItemSelected(){
  logger.info("String_Node_Str");
  addModifyTextListener();
  TableItem[] items=table.getSelection();
  if (items.length > 0 && currentData.isItemChanged(items[0])) {
switch (currentStatus) {
case Normal:
      currentStatus=Status.Edit;
    statusChanged();
  break;
case Add:
currentData.getItem().dispose();
currentStatus=Status.Edit;
statusChanged();
break;
case Adding:
currentData.getItem().dispose();
currentStatus=Status.Edit;
statusChanged();
break;
case Edit:
break;
case Editing:
currentData.reset();
currentStatus=Status.Edit;
statusChanged();
break;
}
currentData.setItem(items[0]);
logger.info("String_Node_Str" + currentStatus);
}
}

Fixed version (ground truth):
protected void tableItemSelected(){
  addModifyTextListener();
  TableItem[] items=table.getSelection();
  if (items.length > 0 && currentData.isItemChanged(items[0])) {
switch (currentStatus) {
case Normal:
      currentStatus=Status.Edit;
    statusChanged();
  break;
case Add:
currentData.getItem().dispose();
currentStatus=Status.Edit;
statusChanged();
break;
case Adding:
currentData.getItem().dispose();
currentStatus=Status.Edit;
statusChanged();
break;
case Edit:
break;
case Editing:
currentData.reset();
currentStatus=Status.Edit;
statusChanged();
break;
}
currentData.setItem(items[0]);
}
}
Program: 62260
Project: 62260
Buggy source:
public void statusChanged(){
switch (currentStatus) {
case Normal:
    btnAdd.setEnabled(true);
  btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(false);
btnRefresh.setEnabled(true);
break;
case Add:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(true);
break;
case Adding:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
case Edit:
btnAdd.setEnabled(true);
btnDelete.setEnabled(true);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(true);
break;
case Editing:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
}
logger.info("String_Node_Str" + currentStatus);
}

Fixed version (ground truth):
public void statusChanged(){
switch (currentStatus) {
case Normal:
    btnAdd.setEnabled(true);
  btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(false);
btnRefresh.setEnabled(true);
break;
case Add:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(true);
break;
case Adding:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
case Edit:
btnAdd.setEnabled(true);
btnDelete.setEnabled(true);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(true);
break;
case Editing:
btnAdd.setEnabled(false);
btnDelete.setEnabled(true);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
}
}
Program: 62262
Project: 62262
Buggy source:
public void modifyText(ModifyEvent e){
switch (status) {
case Normal:
    break;
case Update:
  status=Status.Updating;
statusChanged();
break;
case Updating:
break;
}
logger.info("String_Node_Str" + status);
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
switch (status) {
case Normal:
    break;
case Update:
  status=Status.Updating;
statusChanged();
break;
case Updating:
break;
}
}
Program: 62263
Project: 62263
Buggy source:
private void addModifyTextListener(){
  editor=listener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (status) {
case Normal:
          break;
case Update:
        status=Status.Updating;
      statusChanged();
    break;
case Updating:
  break;
}
logger.info("String_Node_Str" + status);
}
}
);
}
}

Fixed version (ground truth):
private void addModifyTextListener(){
  editor=listener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (status) {
case Normal:
          break;
case Update:
        status=Status.Updating;
      statusChanged();
    break;
case Updating:
  break;
}
}
}
);
}
}
Program: 62265
Project: 62265
Buggy source:
public void modifyText(ModifyEvent e){
switch (status) {
case Normal:
    break;
case Add:
  status=Status.Adding;
statusChanged();
break;
case Adding:
break;
}
logger.info("String_Node_Str" + status);
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
switch (status) {
case Normal:
    break;
case Add:
  status=Status.Adding;
statusChanged();
break;
case Adding:
break;
}
}
Program: 62266
Project: 62266
Buggy source:
private void addModifyTextListener(){
  editor=editListener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (status) {
case Normal:
          break;
case Add:
        status=Status.Adding;
      statusChanged();
    break;
case Adding:
  break;
}
logger.info("String_Node_Str" + status);
}
}
);
}
}

Fixed version (ground truth):
private void addModifyTextListener(){
  editor=editListener.getText();
  if (!editor.isDisposed()) {
    editor.addModifyListener(new ModifyListener(){
      public void modifyText(      ModifyEvent e){
switch (status) {
case Normal:
          break;
case Add:
        status=Status.Adding;
      statusChanged();
    break;
case Adding:
  break;
}
}
}
);
}
}
Program: 62267
Project: 62267
Buggy source:
protected void tableItemSelected(){
  TableItem[] items=table.getSelection();
  if (status != Status.Normal)   addModifyTextListener();
  logger.info("String_Node_Str" + status);
  if (items.length > 0 && currentItem != items[0]) {
switch (status) {
case Normal:
      break;
case Add:
    refresh();
  editListener.getText().dispose();
break;
case Adding:
add();
editListener.getText().dispose();
break;
}
currentItem=items[0];
status=Status.Normal;
logger.info("String_Node_Str" + status);
}
statusChanged();
}

Fixed version (ground truth):
protected void tableItemSelected(){
  TableItem[] items=table.getSelection();
  if (status != Status.Normal)   addModifyTextListener();
  if (items.length > 0 && currentItem != items[0]) {
switch (status) {
case Normal:
      break;
case Add:
    refresh();
  editListener.getText().dispose();
break;
case Adding:
add();
editListener.getText().dispose();
break;
}
currentItem=items[0];
status=Status.Normal;
}
statusChanged();
}
Program: 62268
Project: 62268
Buggy source:
public void statusChanged(){
switch (status) {
case Normal:
    btnAdd.setEnabled(true);
  if (table.getSelectionCount() > 0)   btnDelete.setEnabled(true);
 else   btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(false);
btnRefresh.setEnabled(true);
break;
case Add:
btnAdd.setEnabled(false);
btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
case Adding:
btnAdd.setEnabled(false);
btnDelete.setEnabled(false);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
}
logger.info("String_Node_Str" + status);
}

Fixed version (ground truth):
public void statusChanged(){
switch (status) {
case Normal:
    btnAdd.setEnabled(true);
  if (table.getSelectionCount() > 0)   btnDelete.setEnabled(true);
 else   btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(false);
btnRefresh.setEnabled(true);
break;
case Add:
btnAdd.setEnabled(false);
btnDelete.setEnabled(false);
setApply(false);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
case Adding:
btnAdd.setEnabled(false);
btnDelete.setEnabled(false);
setApply(true);
btnCancel.setEnabled(true);
btnRefresh.setEnabled(false);
break;
}
}
Program: 62269
Project: 62269
Buggy source:
private void pasteOne(ContainerKeyInfo target,ContainerKeyInfo source){
  if (!pBuffer.isCopy() && !source.getContainer().isKey()) {
    pBuffer.getCutItem().dispose();
  }
  if (source.getContainer().isKey()) {
    String newKey=service2.pasteKey(source.getId(),source.getDb(),source.getContainerStr(),target.getId(),target.getDb(),target.getContainerStr() + source.getContainer().getKeyOnly(),pBuffer.isCopy(),true);
    if (newKey == null)     gotoDBContainer(target.getId(),target.getDb(),target.getContainerStr() + source.getContainer().getKeyOnly(),true,true);
 else     gotoDBContainer(target.getId(),target.getDb(),newKey,true,true);
  }
 else {
    service2.pasteContainer(source.getId(),source.getDb(),source.getContainerStr(),target.getId(),target.getDb(),target.getContainerStr(),pBuffer.isCopy(),true);
    gotoDBContainer(target.getId(),target.getDb(),target.getContainerStr(),false,true);
  }
}

Fixed version (ground truth):
private void pasteOne(ContainerKeyInfo target,ContainerKeyInfo source){
  if (!pBuffer.isCopy() && !source.getContainer().isKey()) {
    pBuffer.getCutItem().dispose();
  }
  if (source.getContainer() != null && source.getContainer().isKey()) {
    String newKey=service2.pasteKey(source.getId(),source.getDb(),source.getContainerStr(),target.getId(),target.getDb(),target.getContainerStr() + source.getContainer().getKeyOnly(),pBuffer.isCopy(),true);
    if (newKey == null)     gotoDBContainer(target.getId(),target.getDb(),target.getContainerStr() + source.getContainer().getKeyOnly(),true,true);
 else     gotoDBContainer(target.getId(),target.getDb(),newKey,true,true);
  }
 else {
    service2.pasteContainer(source.getId(),source.getDb(),source.getContainerStr(),target.getId(),target.getDb(),target.getContainerStr(),pBuffer.isCopy(),true);
    gotoDBContainer(target.getId(),target.getDb(),target.getContainerStr(),false,true);
  }
}
Program: 62270
Project: 62270
Buggy source:
private void initShell(){
  shell=new Shell();
  shell.addListener(SWT.Close,new Listener(){
    public void handleEvent(    Event event){
      if (!openDataContent.canClose()) {
        boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),i18nFile.getText(I18nFile.CLOSEAPPERROR));
        event.doit=ok;
      }
 else       event.doit=true;
    }
  }
);
  shell.setSize(1074,772);
  shell.setText("String_Node_Str");
  shell.setLayout(new GridLayout(1,false));
}

Fixed version (ground truth):
private void initShell(){
  shell=new Shell();
  shell.addListener(SWT.Close,new Listener(){
    public void handleEvent(    Event event){
      if (!openDataContent.canClose()) {
        boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),i18nFile.getText(I18nFile.CLOSEAPPERROR));
        event.doit=ok;
      }
 else       event.doit=true;
    }
  }
);
  shell.setText("String_Node_Str");
  shell.setLayout(new GridLayout(1,false));
}
Program: 62272
Project: 62272
Buggy source:
public void setCount(){
  this.count=(int)page.getCount();
  table.setItemCount(count);
}

Fixed version (ground truth):
public void setCount(){
  this.count=(int)page.getCount();
  if (count == 0)   throw new RuntimeException(RedisClient.i18nFile.getText(I18nFile.KEYNOTEXIST));
  table.setItemCount(count);
}
Program: 62273
Project: 62273
Buggy source:
@Override public String getMessage(){
  return RedisClient.i18nFile.getText(I18nFile.KEYNOTEXIST) + key;
}

Fixed version (ground truth):
@Override public String getMessage(){
  return RedisClient.i18nFile.getText(I18nFile.KEYNOTEXIST) + "String_Node_Str" + key;
}
Program: 62274
Project: 62274
Buggy source:
public boolean canClose(){
  for (  DataContent dataContent : dataContents)   if (!dataContent.canClose())   return false;
  return true;
}

Fixed version (ground truth):
public String canClose(){
  for (  DataContent dataContent : dataContents)   if (!dataContent.canClose())   return dataContent.getKey();
  return null;
}
Program: 62275
Project: 62275
Buggy source:
public void handleEvent(Event event){
  if (!openDataContent.canClose()) {
    boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),i18nFile.getText(I18nFile.CLOSEAPPERROR));
    event.doit=ok;
  }
 else   event.doit=true;
}

Fixed version (ground truth):
public void handleEvent(Event event){
  String key=openDataContent.canClose();
  if (key != null) {
    boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),key + "String_Node_Str" + i18nFile.getText(I18nFile.CLOSEAPPERROR));
    event.doit=ok;
  }
 else   event.doit=true;
}
Program: 62276
Project: 62276
Buggy source:
private void initShell(){
  shell=new Shell();
  shell.addListener(SWT.Close,new Listener(){
    public void handleEvent(    Event event){
      if (!openDataContent.canClose()) {
        boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),i18nFile.getText(I18nFile.CLOSEAPPERROR));
        event.doit=ok;
      }
 else       event.doit=true;
    }
  }
);
  shell.setText("String_Node_Str");
  shell.setLayout(new GridLayout(1,false));
}

Fixed version (ground truth):
private void initShell(){
  shell=new Shell();
  shell.addListener(SWT.Close,new Listener(){
    public void handleEvent(    Event event){
      String key=openDataContent.canClose();
      if (key != null) {
        boolean ok=MessageDialog.openConfirm(shell,i18nFile.getText(I18nFile.CLOSEAPP),key + "String_Node_Str" + i18nFile.getText(I18nFile.CLOSEAPPERROR));
        event.doit=ok;
      }
 else       event.doit=true;
    }
  }
);
  shell.setText("String_Node_Str");
  shell.setLayout(new GridLayout(1,false));
}
Program: 62278
Project: 62278
Buggy source:
protected void createContents(){
  shell.setText(title);
  shell.setLayout(new GridLayout(1,false));
  dataContent.setShell(shell);
  okCancel.setShell(shell);
  shell.setSize(width,height);
  dataContent.initContents();
  okCancel.initContents();
  inputKey=dataContent.getInputKey();
  btnOk=okCancel.getOkButton();
  minWidth=500;
  minHeight=500;
  super.createContents();
}

Fixed version (ground truth):
protected void createContents(){
  shell.setText(title);
  shell.setLayout(new GridLayout(1,false));
  dataContent.setShell(shell);
  okCancel.setShell(shell);
  shell.setSize(width,height);
  dataContent.initContents();
  okCancel.initContents();
  inputKey=dataContent.getInputKey();
  btnOk=okCancel.getOkButton();
  minWidth=600;
  minHeight=500;
  super.createContents();
}
Program: 62279
Project: 62279
Buggy source:
private void add(){
  TableItem item=new TableItem(table,SWT.NONE);
  table.setSelection(item);
  listener.clickRow(item,0);
  currentStatus=Status.Add;
  currentData.setItem(item);
  addModifyTextListener();
  logger.info("String_Node_Str" + currentStatus);
  statusChanged();
}

Fixed version (ground truth):
private void add(){
  TableItem item=new TableItem(table,SWT.NONE,0);
  table.setSelection(item);
  listener.clickRow(item,0);
  currentStatus=Status.Add;
  currentData.setItem(item);
  addModifyTextListener();
  logger.info("String_Node_Str" + currentStatus);
  statusChanged();
}
Program: 62280
Project: 62280
Buggy source:
@Override public void refreshLangUI(){
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD));
  btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL));
  btnDeleteHead.setText(RedisClient.i18nFile.getText(I18nFile.DELETEHEAD));
  btnDeleteTail.setText(RedisClient.i18nFile.getText(I18nFile.DELETETAIL));
  btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
  btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL));
  btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
  super.refreshLangUI();
}

Fixed version (ground truth):
@Override public void refreshLangUI(){
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  btnInsertHead.setText(RedisClient.i18nFile.getText(I18nFile.INSERTHEAD));
  btnAppendTail.setText(RedisClient.i18nFile.getText(I18nFile.APPENDTAIL));
  btnDeleteHead.setText(RedisClient.i18nFile.getText(I18nFile.DELETEHEAD));
  btnDeleteTail.setText(RedisClient.i18nFile.getText(I18nFile.DELETETAIL));
  btnApply.setText(RedisClient.i18nFile.getText(I18nFile.APPLY));
  btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL));
  btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
  super.refreshLangUI();
}
Program: 62283
Project: 62283
Buggy source:
@Override public void refreshLangUI(){
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
  super.refreshLangUI();
}

Fixed version (ground truth):
@Override public void refreshLangUI(){
  grpValues.setText(RedisClient.i18nFile.getText(I18nFile.VALUES));
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  btnAdd.setText(RedisClient.i18nFile.getText(I18nFile.ADD));
  btnDelete.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
  btnRefresh.setText(RedisClient.i18nFile.getText(I18nFile.REFRESH));
  super.refreshLangUI();
}
Program: 62285
Project: 62285
Buggy source:
public void expire(int id,int db,String key,int ttl){
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
}

Fixed version (ground truth):
public void expire(int id,int db,String key,int ttl){
  if (!isKeyExist(id,db,key))   throw new KeyNotExistException(id,db,key);
  Expire command1=new Expire(id,db,key,ttl);
  command1.execute();
}
Program: 62286
Project: 62286
Buggy source:
public long getTTL(int id,int db,String key){
  TTLs command=new TTLs(id,db,key);
  command.execute();
  long ttl=command.getSecond();
  if (ttl == -2)   throw new KeyNotExistException(id,db,key);
  return ttl;
}

Fixed version (ground truth):
public long getTTL(int id,int db,String key){
  if (!isKeyExist(id,db,key))   throw new KeyNotExistException(id,db,key);
  TTLs command=new TTLs(id,db,key);
  command.execute();
  long ttl=command.getSecond();
  if (ttl == -2)   throw new KeyNotExistException(id,db,key);
  return ttl;
}
Program: 62287
Project: 62287
Buggy source:
public PagingListener(Table table,IPage page,boolean addHead){
  this.table=table;
  this.page=page;
  this.count=(int)page.getCount();
  this.addHead=addHead;
  logger.info("String_Node_Str" + addHead);
  if (!addHead)   table.setItemCount(count);
 else   table.setItemCount(count + 1);
}

Fixed version (ground truth):
public PagingListener(Table table,IPage page,boolean addHead){
  this.table=table;
  this.page=page;
  this.addHead=addHead;
  logger.info("String_Node_Str" + addHead);
  if (!addHead) {
    this.count=(int)page.getCount();
  }
 else {
    this.count=(int)page.getCount() + 1;
  }
  this.table.setItemCount(count);
}
Program: 62288
Project: 62288
Buggy source:
private void setPage(int index){
  TableItem item;
  int start=index / PAGE_SIZE * PAGE_SIZE;
  int end=Math.min(start + PAGE_SIZE,table.getItemCount());
  this.page.initPage(start,end);
  logger.info("String_Node_Str" + addHead);
  for (int i=start; i < end; i++) {
    if (!addHead)     item=table.getItem(i);
 else     item=table.getItem(i + 1);
    item.setText(this.page.getText(i));
  }
}

Fixed version (ground truth):
private void setPage(int index){
  TableItem item;
  int start;
  int end;
  if (!addHead) {
    start=index / PAGE_SIZE * PAGE_SIZE;
    end=Math.min(start + PAGE_SIZE,count);
  }
 else {
    start=index / PAGE_SIZE * PAGE_SIZE - 1;
    if (start < 0)     start=0;
    end=Math.min(start + PAGE_SIZE,count - 1);
  }
  this.page.initPage(start,end);
  for (int i=start; i < end; i++) {
    if (!addHead)     item=table.getItem(i);
 else {
      item=table.getItem(i + 1);
    }
    item.setText(this.page.getText(i));
  }
}
Program: 62290
Project: 62290
Buggy source:
@Override public String[] getText(int row){
  String[] values=new String[]{"String_Node_Str","String_Node_Str"};
  int index=row - start;
  if (index < page.length) {
    Tuple tuple=(Tuple)page[index];
    values=new String[]{String.valueOf(tuple.getScore()),tuple.getElement()};
  }
  return values;
}

Fixed version (ground truth):
@Override public String[] getText(int row){
  String[] values=new String[]{"String_Node_Str","String_Node_Str"};
  int index=row - start;
  if (index == -1)   return new String[]{"String_Node_Str","String_Node_Str"};
  if (index < page.length) {
    Tuple tuple=(Tuple)page[index];
    values=new String[]{String.valueOf(tuple.getScore()),tuple.getElement()};
  }
  return values;
}
Program: 62293
Project: 62293
Buggy source:
@Override public void mouseDoubleClick(MouseEvent e){
  TreeItem[] treeItems=tree.getSelection();
  Point point=new Point(e.x,e.y);
  TableItem selectedItem=table.getItem(point);
  if (selectedItem != null) {
    NodeType type=(NodeType)selectedItem.getData(NODE_TYPE);
    if (type == NodeType.CONTAINER || type == NodeType.DATABASE || type == NodeType.SERVER) {
      boolean find=false;
      for (      TreeItem treeItem : treeItems[0].getItems()) {
        String treeText=treeItem.getText();
        String tableText=selectedItem.getText(0);
        if (treeText.equals(tableText)) {
          find=true;
          if (type == NodeType.CONTAINER || type == NodeType.DATABASE)           dbContainerTreeItemSelected(treeItem,false);
 else           if (type == NodeType.SERVER)           serverTreeItemSelected(treeItem,false);
          history.add(treeItem);
          btnBackward.setEnabled(true);
          btnForward.setEnabled(false);
          break;
        }
      }
      if (!find)       MessageDialog.openInformation(shlRedisClient,"String_Node_Str","String_Node_Str" + text.getText());
    }
 else {
      properties();
    }
  }
}

Fixed version (ground truth):
@Override public void mouseDoubleClick(MouseEvent e){
  TreeItem[] treeItems=tree.getSelection();
  Point point=new Point(e.x,e.y);
  TableItem selectedItem=table.getItem(point);
  if (selectedItem != null) {
    NodeType type=(NodeType)selectedItem.getData(NODE_TYPE);
    if (type == NodeType.CONTAINER || type == NodeType.DATABASE || type == NodeType.SERVER) {
      boolean find=false;
      for (      TreeItem treeItem : treeItems[0].getItems()) {
        String treeText=treeItem.getText();
        String tableText=selectedItem.getText(0);
        if (treeText.equals(tableText)) {
          find=true;
          if (type == NodeType.CONTAINER || type == NodeType.DATABASE)           dbContainerTreeItemSelected(treeItem,false);
 else           if (type == NodeType.SERVER)           serverTreeItemSelected(treeItem,false);
          history.add(treeItem);
          btnBackward.setEnabled(true);
          btnForward.setEnabled(false);
          break;
        }
      }
      if (!find)       MessageDialog.openInformation(shlRedisClient,"String_Node_Str","String_Node_Str" + text.getText());
    }
 else {
      dataProperties();
    }
  }
}
Program: 62297
Project: 62297
Buggy source:
@Override protected void createContents(){
  super.createContents();
  shlNewHash.setText("String_Node_Str");
  text.setEnabled(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  Set<Entry<String,String>> set=value.entrySet();
  Iterator<Entry<String,String>> i=set.iterator();
  while (i.hasNext()) {
    Map.Entry<String,String> entry=(Map.Entry<String,String>)i.next();
    TableItem item=new TableItem(table,SWT.NONE);
    String[] values=new String[]{entry.getKey(),entry.getValue()};
    item.setText(values);
  }
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  shlNewHash.setText("String_Node_Str");
  text.setEditable(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  Set<Entry<String,String>> set=value.entrySet();
  Iterator<Entry<String,String>> i=set.iterator();
  while (i.hasNext()) {
    Map.Entry<String,String> entry=(Map.Entry<String,String>)i.next();
    TableItem item=new TableItem(table,SWT.NONE);
    String[] values=new String[]{entry.getKey(),entry.getValue()};
    item.setText(values);
  }
}
Program: 62298
Project: 62298
Buggy source:
@Override protected void createContents(){
  super.createContents();
  shell.setText("String_Node_Str");
  grpWhenListNot.setVisible(false);
  text.setEnabled(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  for (  String value : values) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(value);
  }
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  shell.setText("String_Node_Str");
  grpWhenListNot.setVisible(false);
  text.setEditable(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  for (  String value : values) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(value);
  }
}
Program: 62299
Project: 62299
Buggy source:
@Override protected void createContents(){
  super.createContents();
  shlNewSet.setText("String_Node_Str");
  text.setEnabled(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  for (  String value : values) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(value);
  }
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  shlNewSet.setText("String_Node_Str");
  text.setEditable(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  for (  String value : values) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(value);
  }
}