nus-yam/ex-repair huggingface dataset:
Program: 62300
Project: 62300
Buggy source:
@Override protected void createContents(){
  super.createContents();
  shlNString.setText("String_Node_Str");
  text_key.setEnabled(false);
  text_key.removeModifyListener(new ModifyKey());
  text_value.setText(value);
  text_value.selectAll();
  text_value.setFocus();
  text_value.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String newValue=text_value.getText() == null ? "String_Node_Str" : text_value.getText();
      if (newValue.equals(value))       btnOk.setEnabled(false);
 else       btnOk.setEnabled(true);
    }
  }
);
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  shlNString.setText("String_Node_Str");
  text_key.setEditable(false);
  text_key.removeModifyListener(new ModifyKey());
  text_value.setText(value);
  text_value.selectAll();
  text_value.setFocus();
  text_value.addModifyListener(new ModifyListener(){
    public void modifyText(    ModifyEvent e){
      String newValue=text_value.getText() == null ? "String_Node_Str" : text_value.getText();
      if (newValue.equals(value))       btnOk.setEnabled(false);
 else       btnOk.setEnabled(true);
    }
  }
);
}
Program: 62301
Project: 62301
Buggy source:
@Override protected void createContents(){
  super.createContents();
  shlNewSortedSet.setText("String_Node_Str");
  text.setEnabled(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  Iterator<Tuple> i=values.iterator();
  while (i.hasNext()) {
    Tuple entry=i.next();
    TableItem item=new TableItem(table,SWT.NONE);
    String[] zvalues=new String[]{Double.toString(entry.getScore()),entry.getElement()};
    item.setText(zvalues);
  }
}

Fixed version (ground truth):
@Override protected void createContents(){
  super.createContents();
  shlNewSortedSet.setText("String_Node_Str");
  text.setEditable(false);
  text.removeModifyListener(new ModifyKey());
  btnOk.setEnabled(true);
  Iterator<Tuple> i=values.iterator();
  while (i.hasNext()) {
    Tuple entry=i.next();
    TableItem item=new TableItem(table,SWT.NONE);
    String[] zvalues=new String[]{Double.toString(entry.getScore()),entry.getElement()};
    item.setText(zvalues);
  }
}
Program: 62302
Project: 62302
Buggy source:
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.HASH)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
 else   if (jedis.exists(key) && getValueType(key) == NodeType.HASH) {
    ReadHash command=new ReadHash(id,db,key);
    command.execute(jedis);
    Map<String,String> hashValues=command.getValue();
    Set<Entry<String,String>> set=values.entrySet();
    Iterator<Entry<String,String>> i=set.iterator();
    while (i.hasNext()) {
      Map.Entry<String,String> entry=(Map.Entry<String,String>)i.next();
      String field=entry.getKey();
      String value=entry.getValue();
      jedis.hset(key,field,value);
    }
    Set<Entry<String,String>> hashSet=hashValues.entrySet();
    Iterator<Entry<String,String>> hashI=hashSet.iterator();
    while (hashI.hasNext()) {
      Map.Entry<String,String> entry=(Map.Entry<String,String>)hashI.next();
      String field=entry.getKey();
      String oldValue=values.get(field);
      if (oldValue == null)       jedis.hdel(key,field);
    }
  }
 else   jedis.hmset(key,values);
}

Fixed version (ground truth):
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.HASH)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
 else   if (jedis.exists(key) && getValueType(key) == NodeType.HASH) {
    DeleteKey command=new DeleteKey(id,db,key);
    command.execute(jedis);
    jedis.hmset(key,values);
  }
 else   jedis.hmset(key,values);
}
Program: 62304
Project: 62304
Buggy source:
@Override public int compareTo(Node o){
  int result=this.getKey().compareTo(o.getKey());
  if (order == Order.Ascend)   return result;
  return result * -1;
}

Fixed version (ground truth):
public int compareTo(Node o){
  int result=this.getKey().compareTo(o.getKey());
  if (order == Order.Ascend)   return result;
  return result * -1;
}
Program: 62305
Project: 62305
Buggy source:
private void deleteKey(){
  boolean ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
  if (ok) {
    ContainerInfo cinfo=new ContainerInfo();
    TreeItem[] items=tree.getSelection();
    parseContainer(items[0],cinfo);
    String key=cinfo.getContainer() == null ? "String_Node_Str" : cinfo.getContainer();
    key+=itemSelected.getText();
    service2.deleteKey(cinfo.getId(),cinfo.getDb(),key);
    itemSelected.dispose();
  }
}

Fixed version (ground truth):
private void deleteKey(){
  boolean ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
  if (ok) {
    ContainerInfo cinfo=new ContainerInfo();
    TreeItem[] items=tree.getSelection();
    parseContainer(items[0],cinfo);
    String key=cinfo.getContainer() == null ? "String_Node_Str" : cinfo.getContainer();
    key+=itemSelected.getText();
    service2.deleteKey(cinfo.getId(),cinfo.getDb(),key);
    itemSelected.dispose();
    treeItemSelected(false);
  }
}
Program: 62306
Project: 62306
Buggy source:
private void deleteCotainer(){
  boolean ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
  if (ok) {
    TreeItem treeItem;
    ContainerInfo cinfo=new ContainerInfo();
    if (itemSelected instanceof TreeItem)     treeItem=(TreeItem)itemSelected;
 else     treeItem=getTreeItemByTableItem((TableItem)itemSelected);
    parseContainer(treeItem,cinfo);
    service2.deleteContainer(cinfo.getId(),cinfo.getDb(),cinfo.getContainer());
    if (itemSelected instanceof TableItem) {
      treeItem.dispose();
    }
    itemSelected.dispose();
  }
}

Fixed version (ground truth):
private void deleteCotainer(){
  boolean ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
  if (ok) {
    TreeItem treeItem;
    ContainerInfo cinfo=new ContainerInfo();
    if (itemSelected instanceof TreeItem)     treeItem=(TreeItem)itemSelected;
 else     treeItem=getTreeItemByTableItem((TableItem)itemSelected);
    parseContainer(treeItem,cinfo);
    service2.deleteContainer(cinfo.getId(),cinfo.getDb(),cinfo.getContainer());
    if (itemSelected instanceof TableItem) {
      treeItem.dispose();
    }
    itemSelected.dispose();
    treeItemSelected(false);
  }
}
Program: 62307
Project: 62307
Buggy source:
public JedisCommand getCommand(){
  if (redisVersion.containsKey(String.valueOf(id))) {
    version=redisVersion.get(String.valueOf(id));
  }
 else {
    version=getRedisVersion();
    redisVersion.put(String.valueOf(id),version);
  }
  JedisCommand command=null;
  for (int i=commands.size(); i > 0; i--) {
    command=commands.get(i - 1);
    if (command.getVersion().getVersion() <= version.getVersion()) {
      return command;
    }
  }
  return command;
}

Fixed version (ground truth):
public JedisCommand getCommand(){
  if (redisVersion.containsKey(String.valueOf(id))) {
    version=redisVersion.get(String.valueOf(id));
  }
 else {
    version=getRedisVersion();
    redisVersion.put(String.valueOf(id),version);
  }
  for (  JedisCommand command : commands) {
    if (command.getVersion().getVersion() <= version.getVersion()) {
      return command;
    }
  }
  return null;
}
Program: 62308
Project: 62308
Buggy source:
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getNodeType(key) != NodeType.HASH)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
  jedis.hmset(key,values);
}

Fixed version (ground truth):
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.HASH)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
  jedis.hmset(key,values);
}
Program: 62309
Project: 62309
Buggy source:
@Override public void command(){
  jedis.select(db);
  Set<String> nodekeys=null;
  int length;
  if (key != null) {
    nodekeys=jedis.keys(key + "String_Node_Str");
    length=key.length();
  }
 else {
    nodekeys=jedis.keys("String_Node_Str");
    length=0;
  }
  Iterator<String> it=nodekeys.iterator();
  while (it.hasNext()) {
    String nextKey=it.next();
    String[] ckey=nextKey.substring(length).split("String_Node_Str");
    if (ckey.length == 1) {
      NodeType nodeType=getNodeType(nextKey);
      long size=getSize(nextKey);
      DataNode node=new DataNode(ckey[0],nodeType,size,order,orderBy);
      keys.add(node);
    }
  }
}

Fixed version (ground truth):
@Override public void command(){
  jedis.select(db);
  Set<String> nodekeys=null;
  int length;
  if (key != null) {
    nodekeys=jedis.keys(key + "String_Node_Str");
    length=key.length();
  }
 else {
    nodekeys=jedis.keys("String_Node_Str");
    length=0;
  }
  Iterator<String> it=nodekeys.iterator();
  while (it.hasNext()) {
    String nextKey=it.next();
    String[] ckey=nextKey.substring(length).split("String_Node_Str");
    if (ckey.length == 1) {
      NodeType nodeType=getValueType(nextKey);
      long size=getSize(nextKey);
      DataNode node=new DataNode(ckey[0],nodeType,size,order,orderBy);
      keys.add(node);
    }
  }
}
Program: 62310
Project: 62310
Buggy source:
@Override public void command(){
  jedis.select(db);
  Set<String> nodekeys=jedis.keys("String_Node_Str");
  Iterator<String> it=nodekeys.iterator();
  while (it.hasNext()) {
    String key=(String)it.next();
    NodeType nodeType=getNodeType(key);
    Node node=new Node(key,nodeType);
    nodes.add(node);
  }
}

Fixed version (ground truth):
@Override public void command(){
  jedis.select(db);
  Set<String> nodekeys=jedis.keys("String_Node_Str");
  Iterator<String> it=nodekeys.iterator();
  while (it.hasNext()) {
    String key=(String)it.next();
    NodeType nodeType=getValueType(key);
    Node node=new Node(key,nodeType);
    nodes.add(node);
  }
}
Program: 62311
Project: 62311
Buggy source:
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getNodeType(key) != NodeType.LIST)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
  for (  String value : values) {
    if (headTail && exist)     jedis.lpush(key,value);
 else     if (headTail && !exist)     jedis.lpushx(key,value);
 else     if (!headTail && exist)     jedis.rpush(key,value);
 else     jedis.rpushx(key,value);
  }
}

Fixed version (ground truth):
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.LIST)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
  for (  String value : values) {
    if (headTail && exist)     jedis.lpush(key,value);
 else     if (headTail && !exist)     jedis.lpushx(key,value);
 else     if (!headTail && exist)     jedis.rpush(key,value);
 else     jedis.rpushx(key,value);
  }
}
Program: 62312
Project: 62312
Buggy source:
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getNodeType(key) != NodeType.SET)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
}

Fixed version (ground truth):
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.SET)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
}
Program: 62313
Project: 62313
Buggy source:
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getNodeType(key) != NodeType.SORTEDSET)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
}

Fixed version (ground truth):
@Override protected void command(){
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.SORTEDSET)   throw new RuntimeException("String_Node_Str" + key + "String_Node_Str");
}
Program: 62314
Project: 62314
Buggy source:
private void export(){
  TreeItem treeItem;
  ContainerInfo cinfo=new ContainerInfo();
  if (itemSelected instanceof TreeItem) {
    treeItem=(TreeItem)itemSelected;
  }
 else {
    treeItem=getTreeItemByTableItem((TableItem)itemSelected);
  }
  parseContainer(treeItem,cinfo);
  FileDialog dialog=new FileDialog(shlRedisClient,SWT.SAVE);
  dialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str"};
  dialog.setFilterExtensions(filterExt);
  String file=dialog.open();
  File exportFile=new File(file);
  boolean ok=false;
  if (exportFile.exists())   ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
  if (ok) {
    ExportService service=new ExportService(file,cinfo.getId(),cinfo.getDb(),cinfo.getContainer());
    try {
      service.export();
    }
 catch (    IOException e) {
      throw new RuntimeException(e.getMessage());
    }
  }
}

Fixed version (ground truth):
private void export(){
  TreeItem treeItem;
  ContainerInfo cinfo=new ContainerInfo();
  if (itemSelected instanceof TreeItem) {
    treeItem=(TreeItem)itemSelected;
  }
 else {
    treeItem=getTreeItemByTableItem((TableItem)itemSelected);
  }
  parseContainer(treeItem,cinfo);
  FileDialog dialog=new FileDialog(shlRedisClient,SWT.SAVE);
  dialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str"};
  dialog.setFilterExtensions(filterExt);
  String file=dialog.open();
  if (file != null) {
    File exportFile=new File(file);
    boolean ok=false;
    boolean exist=exportFile.exists();
    if (exist)     ok=MessageDialog.openConfirm(shlRedisClient,"String_Node_Str","String_Node_Str");
    if (!exist || ok) {
      ExportService service=new ExportService(file,cinfo.getId(),cinfo.getDb(),cinfo.getContainer());
      try {
        service.export();
      }
 catch (      IOException e) {
        throw new RuntimeException(e.getMessage());
      }
    }
  }
}
Program: 62315
Project: 62315
Buggy source:
private void importFile(){
  TreeItem treeItem;
  ContainerInfo cinfo=new ContainerInfo();
  if (itemSelected instanceof TreeItem) {
    treeItem=(TreeItem)itemSelected;
  }
 else {
    treeItem=getTreeItemByTableItem((TableItem)itemSelected);
  }
  parseContainer(treeItem,cinfo);
  FileDialog dialog=new FileDialog(shlRedisClient,SWT.OPEN);
  dialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str"};
  dialog.setFilterExtensions(filterExt);
  String file=dialog.open();
  ImportService service=new ImportService(file,cinfo.getId(),cinfo.getDb());
  try {
    service.importFile();
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage());
  }
  dbContainerTreeItemSelected(treeItem,true);
}

Fixed version (ground truth):
private void importFile(){
  TreeItem treeItem;
  ContainerInfo cinfo=new ContainerInfo();
  if (itemSelected instanceof TreeItem) {
    treeItem=(TreeItem)itemSelected;
  }
 else {
    treeItem=getTreeItemByTableItem((TableItem)itemSelected);
  }
  parseContainer(treeItem,cinfo);
  FileDialog dialog=new FileDialog(shlRedisClient,SWT.OPEN);
  dialog.setText("String_Node_Str");
  String[] filterExt={"String_Node_Str"};
  dialog.setFilterExtensions(filterExt);
  String file=dialog.open();
  if (file != null) {
    ImportService service=new ImportService(file,cinfo.getId(),cinfo.getDb());
    try {
      service.importFile();
    }
 catch (    IOException e) {
      throw new RuntimeException(e.getMessage());
    }
    dbContainerTreeItemSelected(treeItem,true);
  }
}
Program: 62319
Project: 62319
Buggy source:
private void serverItemSelected(TreeItem selectedItem,boolean refresh){
  tree.setSelection(selectedItem);
  text.setText(selectedItem.getText() + "String_Node_Str");
  table.removeAll();
  mntmAdd_Favorite.setEnabled(false);
  if (refresh)   selectedItem.setData(ITEM_OPENED,false);
  if (selectedItem.getData(ITEM_OPENED) == null || ((Boolean)(selectedItem.getData(ITEM_OPENED)) == false)) {
    selectedItem.removeAll();
    addDBTreeItem((Integer)selectedItem.getData(NODE_ID),selectedItem);
  }
  int dbs=service1.listDBs((Integer)selectedItem.getData(NODE_ID));
  for (int i=0; i < dbs; i++) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(new String[]{DB_PREFIX + i,NodeType.DATABASE.toString()});
    item.setData(NODE_ID,i);
    item.setImage(dbImage);
  }
}

Fixed version (ground truth):
private void serverItemSelected(TreeItem selectedItem,boolean refresh){
  tree.setSelection(selectedItem);
  text.setText(selectedItem.getText() + "String_Node_Str");
  table.removeAll();
  mntmEdit.setEnabled(true);
  mntmDelete_1.setEnabled(true);
  mntmProperties.setEnabled(true);
  mntmAdd.setEnabled(false);
  mntmRename_2.setEnabled(false);
  mntmDelete_3.setEnabled(false);
  mntmAdd_Favorite.setEnabled(false);
  if (refresh)   selectedItem.setData(ITEM_OPENED,false);
  if (selectedItem.getData(ITEM_OPENED) == null || ((Boolean)(selectedItem.getData(ITEM_OPENED)) == false)) {
    selectedItem.removeAll();
    addDBTreeItem((Integer)selectedItem.getData(NODE_ID),selectedItem);
  }
  int dbs=service1.listDBs((Integer)selectedItem.getData(NODE_ID));
  for (int i=0; i < dbs; i++) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(new String[]{DB_PREFIX + i,NodeType.DATABASE.toString()});
    item.setData(NODE_ID,i);
    item.setImage(dbImage);
  }
}
Program: 62320
Project: 62320
Buggy source:
private void rootItemSelected(boolean refresh){
  tree.setSelection(rootRedisServers);
  text.setText("String_Node_Str");
  table.removeAll();
  mntmAdd_Favorite.setEnabled(false);
  if (refresh)   rootRedisServers.setData(ITEM_OPENED,false);
  if (rootRedisServers.getData(ITEM_OPENED) == null || ((Boolean)(rootRedisServers.getData(ITEM_OPENED)) == false)) {
    rootRedisServers.removeAll();
    initServers();
  }
  java.util.List<Server> servers=service1.listAll();
  for (  Server server : servers) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(new String[]{server.getName(),NodeType.SERVER.toString()});
    item.setImage(redisImage);
  }
}

Fixed version (ground truth):
private void rootItemSelected(boolean refresh){
  tree.setSelection(rootRedisServers);
  text.setText("String_Node_Str");
  table.removeAll();
  mntmEdit.setEnabled(false);
  mntmDelete_1.setEnabled(false);
  mntmProperties.setEnabled(false);
  mntmAdd.setEnabled(false);
  mntmRename_2.setEnabled(false);
  mntmDelete_3.setEnabled(false);
  mntmAdd_Favorite.setEnabled(false);
  if (refresh)   rootRedisServers.setData(ITEM_OPENED,false);
  if (rootRedisServers.getData(ITEM_OPENED) == null || ((Boolean)(rootRedisServers.getData(ITEM_OPENED)) == false)) {
    rootRedisServers.removeAll();
    initServers();
  }
  java.util.List<Server> servers=service1.listAll();
  for (  Server server : servers) {
    TableItem item=new TableItem(table,SWT.NONE);
    item.setText(new String[]{server.getName(),NodeType.SERVER.toString()});
    item.setImage(redisImage);
  }
}
Program: 62321
Project: 62321
Buggy source:
private void dbContainerItemSelected(TreeItem itemSelected,boolean refresh){
  tree.setSelection(itemSelected);
  ContainerInfo info=new ContainerInfo();
  parseContainer(itemSelected,info);
  String container=(info.getContainer() == null) ? "String_Node_Str" : info.getContainer();
  text.setText(info.getServerName() + "String_Node_Str" + DB_PREFIX+ info.getDb()+ "String_Node_Str"+ container);
  mntmAdd_Favorite.setEnabled(true);
  Set<Node> cnodes=service2.listContainers(info.getId(),info.getDb(),info.getContainer());
  if (refresh)   itemSelected.setData(ITEM_OPENED,false);
  if (itemSelected.getData(ITEM_OPENED) == null || ((Boolean)(itemSelected.getData(ITEM_OPENED)) == false)) {
    itemSelected.removeAll();
    for (    Node node : cnodes) {
      TreeItem item=new TreeItem(itemSelected,SWT.NONE);
      item.setText(node.getKey());
      item.setData(NODE_TYPE,node.getType());
      item.setImage(containerImage);
    }
    itemSelected.setExpanded(true);
    itemSelected.setData(ITEM_OPENED,true);
  }
  tableItemOrderSelected(info,Order.Ascend,OrderBy.NAME);
  tblclmnName.setText(COL_NAME);
  tblclmnType.setText(COL_TYPE);
  tblclmnSize.setText(COL_SIZE);
}

Fixed version (ground truth):
private void dbContainerItemSelected(TreeItem itemSelected,boolean refresh){
  tree.setSelection(itemSelected);
  ContainerInfo info=new ContainerInfo();
  parseContainer(itemSelected,info);
  String container=(info.getContainer() == null) ? "String_Node_Str" : info.getContainer();
  text.setText(info.getServerName() + "String_Node_Str" + DB_PREFIX+ info.getDb()+ "String_Node_Str"+ container);
  mntmEdit.setEnabled(false);
  mntmDelete_1.setEnabled(false);
  mntmProperties.setEnabled(false);
  TreeItem[] items=tree.getSelection();
  NodeType type=(NodeType)items[0].getData(NODE_TYPE);
  mntmAdd.setEnabled(true);
  if (type == NodeType.CONTAINER) {
    mntmRename_2.setEnabled(true);
    mntmDelete_3.setEnabled(true);
  }
 else {
    mntmRename_2.setEnabled(false);
    mntmDelete_3.setEnabled(false);
  }
  mntmAdd_Favorite.setEnabled(true);
  Set<Node> cnodes=service2.listContainers(info.getId(),info.getDb(),info.getContainer());
  if (refresh)   itemSelected.setData(ITEM_OPENED,false);
  if (itemSelected.getData(ITEM_OPENED) == null || ((Boolean)(itemSelected.getData(ITEM_OPENED)) == false)) {
    itemSelected.removeAll();
    for (    Node node : cnodes) {
      TreeItem item=new TreeItem(itemSelected,SWT.NONE);
      item.setText(node.getKey());
      item.setData(NODE_TYPE,node.getType());
      item.setImage(containerImage);
    }
    itemSelected.setExpanded(true);
    itemSelected.setData(ITEM_OPENED,true);
  }
  tableItemOrderSelected(info,Order.Ascend,OrderBy.NAME);
  tblclmnName.setText(COL_NAME);
  tblclmnType.setText(COL_TYPE);
  tblclmnSize.setText(COL_SIZE);
}
Program: 62323
Project: 62323
Buggy source:
/** 
 * Create the dialog.
 * @param parent
 * @param style
 */
public RenameKeysDialog(Shell parent,int style,String server,int db,String oldContainer){
  super(parent,style);
  setText("String_Node_Str");
  this.server=server;
  this.db=db;
  this.oldContainer=oldContainer;
}

Fixed version (ground truth):
/** 
 * Create the dialog.
 * @param parent
 * @param style
 */
public RenameKeysDialog(Shell parent,int style,String server,int db,String oldContainer){
  super(parent,style);
  setText("String_Node_Str");
  this.server=server;
  this.db=db;
  this.oldContainer=oldContainer == null ? "String_Node_Str" : oldContainer;
}
Program: 62324
Project: 62324
Buggy source:
@Override public void widgetSelected(SelectionEvent e){
  Favorite favorite=(Favorite)menuItem.getData(FAVORITE);
  int sid=favorite.getServerID();
  TreeItem[] treeItems=tree.getItems();
  for (  TreeItem treeItem : treeItems) {
    int serverId=(Integer)treeItem.getData(NODE_ID);
    if (serverId == sid) {
      serverItemSelected(treeItem);
      String[] containers=favorite.getFavorite().split("String_Node_Str");
      TreeItem[] dbItems=treeItem.getItems();
      for (      TreeItem dbItem : dbItems) {
        if (dbItem.getText().equals(containers[1])) {
          tree.setSelection(dbItem);
          treeItemSelected(dbItem);
          TreeItem[] dataItems=dbItem.getItems();
          for (int i=2; i < containers.length; i++) {
            for (            TreeItem dataItem : dataItems) {
              if (dataItem.getText().equals(containers[i])) {
                tree.setSelection(dataItem);
                treeItemSelected(dataItem);
                dataItems=dataItem.getItems();
                break;
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  Favorite favorite=(Favorite)menuItem.getData(FAVORITE);
  int sid=favorite.getServerID();
  rootItemSelected();
  TreeItem[] treeItems=rootRedisServers.getItems();
  for (  TreeItem treeItem : treeItems) {
    int serverId=(Integer)treeItem.getData(NODE_ID);
    if (serverId == sid) {
      serverItemSelected(treeItem);
      String[] containers=favorite.getFavorite().split("String_Node_Str");
      TreeItem[] dbItems=treeItem.getItems();
      for (      TreeItem dbItem : dbItems) {
        if (dbItem.getText().equals(containers[1])) {
          tree.setSelection(dbItem);
          treeItemSelected(dbItem);
          TreeItem[] dataItems=dbItem.getItems();
          for (int i=2; i < containers.length; i++) {
            for (            TreeItem dataItem : dataItems) {
              if (dataItem.getText().equals(containers[i])) {
                tree.setSelection(dataItem);
                treeItemSelected(dataItem);
                dataItems=dataItem.getItems();
                break;
              }
            }
          }
        }
      }
    }
  }
}
Program: 62325
Project: 62325
Buggy source:
private void initSash(){
  SashForm sashForm_2=new SashForm(shlRedisClient,SWT.SMOOTH | SWT.VERTICAL);
  sashForm_2.setSashWidth(0);
  text=new Text(sashForm_2,SWT.BORDER | SWT.SEARCH);
  text.setEditable(false);
  SashForm sashForm=new SashForm(sashForm_2,SWT.NONE);
  tree=new Tree(sashForm,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  rootRedisServers=new TreeItem(tree,SWT.NONE);
  rootRedisServers.setText("String_Node_Str");
  rootRedisServers.setData(NODE_TYPE,NodeType.ROOT);
  initMenuDB();
  tree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TreeItem[] items=tree.getSelection();
      NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case ROOT:
        rootItemSelected();
      break;
case SERVER:
    serverItemSelected(items[0]);
  break;
case DATABASE:
case CONTAINER:
treeItemSelected(items[0]);
break;
default :
break;
}
}
}
);
SashForm sashForm_1=new SashForm(sashForm,SWT.VERTICAL);
initTable(sashForm_1);
sashForm_1.setWeights(new int[]{1});
sashForm.setWeights(new int[]{1,3});
sashForm_2.setWeights(new int[]{22,368});
initMenuNull();
initMenuServer();
initServers();
}

Fixed version (ground truth):
private void initSash(){
  SashForm sashForm_2=new SashForm(shlRedisClient,SWT.SMOOTH | SWT.VERTICAL);
  sashForm_2.setSashWidth(0);
  text=new Text(sashForm_2,SWT.BORDER | SWT.SEARCH);
  text.setEditable(false);
  SashForm sashForm=new SashForm(sashForm_2,SWT.NONE);
  tree=new Tree(sashForm,SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
  rootRedisServers=new TreeItem(tree,SWT.NONE);
  rootRedisServers.setText("String_Node_Str");
  rootRedisServers.setData(NODE_TYPE,NodeType.ROOT);
  rootRedisServers.setExpanded(true);
  rootRedisServers.setData(ITEM_OPENED,true);
  initMenuDB();
  tree.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      TreeItem[] items=tree.getSelection();
      NodeType type=(NodeType)items[0].getData(NODE_TYPE);
switch (type) {
case ROOT:
        rootItemSelected();
      break;
case SERVER:
    serverItemSelected(items[0]);
  break;
case DATABASE:
case CONTAINER:
treeItemSelected(items[0]);
break;
default :
break;
}
}
}
);
SashForm sashForm_1=new SashForm(sashForm,SWT.VERTICAL);
initTable(sashForm_1);
sashForm_1.setWeights(new int[]{1});
sashForm.setWeights(new int[]{1,3});
sashForm_2.setWeights(new int[]{22,368});
initMenuNull();
initMenuServer();
initServers();
}
Program: 62328
Project: 62328
Buggy source:
private void parseContainer(TreeItem item,ContainerInfo info){
  TreeItem parent=item.getParentItem();
  if (item.getData(NODE_TYPE) == NodeType.CONTAINER) {
    String container=item.getText();
    if (info.getContainer() != null)     info.setContainer(container + "String_Node_Str" + info.getContainer());
 else     info.setContainer(container + "String_Node_Str");
    parseContainer(parent,info);
  }
 else   if (item.getData(NODE_TYPE) == NodeType.DATABASE) {
    int db=(Integer)item.getData(NODE_ID);
    info.setDb(db);
    parseContainer(parent,info);
  }
 else   if (item.getData(NODE_TYPE) == NodeType.SERVER) {
    int id=(Integer)item.getData(NODE_ID);
    info.setId(id);
    return;
  }
}

Fixed version (ground truth):
private void parseContainer(TreeItem item,ContainerInfo info){
  TreeItem parent=item.getParentItem();
  if (item.getData(NODE_TYPE) == NodeType.CONTAINER) {
    String container=item.getText();
    if (info.getContainer() != null)     info.setContainer(container + "String_Node_Str" + info.getContainer());
 else     info.setContainer(container + "String_Node_Str");
    parseContainer(parent,info);
  }
 else   if (item.getData(NODE_TYPE) == NodeType.DATABASE) {
    int db=(Integer)item.getData(NODE_ID);
    info.setDb(db);
    parseContainer(parent,info);
  }
 else   if (item.getData(NODE_TYPE) == NodeType.SERVER) {
    int id=(Integer)item.getData(NODE_ID);
    info.setId(id);
    info.setServerName(item.getText());
    return;
  }
}
Program: 62329
Project: 62329
Buggy source:
private void initTable(SashForm sashForm_1){
  table=new Table(sashForm_1,SWT.BORDER | SWT.FULL_SELECTION);
  table.setHeaderVisible(true);
  TableColumn tblclmnName=new TableColumn(table,SWT.NONE);
  tblclmnName.setWidth(100);
  tblclmnName.setText("String_Node_Str");
  TableColumn tblclmnType=new TableColumn(table,SWT.NONE);
  tblclmnType.setWidth(100);
  tblclmnType.setText("String_Node_Str");
  TableColumn tblclmnSize=new TableColumn(table,SWT.NONE);
  tblclmnSize.setWidth(100);
  tblclmnSize.setText("String_Node_Str");
}

Fixed version (ground truth):
private void initTable(SashForm sashForm_1){
  table=new Table(sashForm_1,SWT.BORDER | SWT.FULL_SELECTION);
  table.addMouseListener(new MouseAdapter(){
    @Override public void mouseDoubleClick(    MouseEvent e){
    }
  }
);
  table.setHeaderVisible(true);
  TableColumn tblclmnName=new TableColumn(table,SWT.NONE);
  tblclmnName.setWidth(100);
  tblclmnName.setText("String_Node_Str");
  TableColumn tblclmnType=new TableColumn(table,SWT.NONE);
  tblclmnType.setWidth(100);
  tblclmnType.setText("String_Node_Str");
  TableColumn tblclmnSize=new TableColumn(table,SWT.NONE);
  tblclmnSize.setWidth(100);
  tblclmnSize.setText("String_Node_Str");
}
Program: 62333
Project: 62333
Buggy source:
@Autowired public WebWorkerResource(Current current,TabService tabService,DirectoryService directoryService,FileService fileService,ThreadService threadService,ApplicationController controller){
  this.current=current;
  this.tabService=tabService;
  this.directoryService=directoryService;
  this.fileService=fileService;
  this.threadService=threadService;
  this.controller=controller;
}

Fixed version (ground truth):
@Autowired public WebWorkerResource(Current current,TabService tabService,DirectoryService directoryService,FileService fileService,ThreadService threadService,ApplicationController controller,DataUriController dataUriService){
  this.current=current;
  this.tabService=tabService;
  this.directoryService=directoryService;
  this.fileService=fileService;
  this.threadService=threadService;
  this.controller=controller;
  this.dataUriService=dataUriService;
}
Program: 62334
Project: 62334
Buggy source:
public void executeWorkerResource(AllController.Payload payload){
  String finalURI=payload.getFinalURI();
  if (finalURI.matches("String_Node_Str")) {
    if (controller.getIncludeAsciidocResource()) {
      payload.write(String.format("String_Node_Str",finalURI));
      return;
    }
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir(finalURI);
    fileService.processFile(payload,path);
  }
 else   if (payload.getRequestURI().endsWith("String_Node_Str")) {
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir("String_Node_Str");
    fileService.processFile(payload,path);
  }
 else   if (payload.getRequestURI().endsWith("String_Node_Str")) {
    final String stylesheet=controller.readDefaultStylesheet();
    payload.write(stylesheet);
  }
 else {
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir(finalURI);
    fileService.processFile(payload,path);
  }
}

Fixed version (ground truth):
public void executeWorkerResource(AllController.Payload payload){
  Optional.ofNullable(payload.getRequestURI()).filter(e -> e.endsWith("String_Node_Str")).ifPresent(e -> {
    payload.setFinalURI(payload.param("String_Node_Str"));
  }
);
  String finalURI=payload.getFinalURI();
  if (finalURI.matches("String_Node_Str")) {
    if (controller.getIncludeAsciidocResource()) {
      payload.write(String.format("String_Node_Str",finalURI));
      return;
    }
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir(finalURI);
    fileService.processFile(payload,path);
  }
 else   if (payload.getRequestURI().endsWith("String_Node_Str")) {
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir("String_Node_Str");
    fileService.processFile(payload,path);
  }
 else   if (payload.getRequestURI().endsWith("String_Node_Str")) {
    final String stylesheet=controller.readDefaultStylesheet();
    payload.write(stylesheet);
  }
 else {
    Path path=directoryService.findPathInConfigOrCurrentOrWorkDir(finalURI);
    fileService.processFile(payload,path);
  }
}
Program: 62337
Project: 62337
Buggy source:
private void clearHistory(){
  textArea.clear();
}

Fixed version (ground truth):
private void clearHistory(){
  threadService.runActionLater(() -> {
    textArea.clear();
  }
);
}
Program: 62339
Project: 62339
Buggy source:
public void destroy(){
  ObservableList<Tab> tabs=this.getTabPane().getTabs();
  tabs.remove(this);
  Optional.ofNullable(process).ifPresent(Process::destroy);
  Arrays.asList(inputStream,inputStreamReader,inputReader,errorStream,errorStreamReader,errorReader,outputStream,outputStreamWriter,outputWriter).forEach((closeable) -> {
    try {
      closeable.close();
    }
 catch (    IOException e) {
    }
  }
);
}

Fixed version (ground truth):
public void destroy(){
  threadService.runActionLater(() -> {
    ObservableList<Tab> tabs=this.getTabPane().getTabs();
    tabs.remove(this);
    threadService.start(() -> {
      Optional.ofNullable(process).ifPresent(Process::destroy);
      process.exitValue();
    }
);
  }
);
}
Program: 62340
Project: 62340
Buggy source:
public CommandChecker checkCommand(String command,Runnable runnable){
  if (!matched && text.equalsIgnoreCase(command)) {
    threadService.runActionLater(runnable);
    matched=true;
  }
  return this;
}

Fixed version (ground truth):
public CommandChecker checkCommand(String command,Runnable runnable){
  if (!matched && text.equalsIgnoreCase(command)) {
    runnable.run();
    matched=true;
  }
  return this;
}
Program: 62341
Project: 62341
Buggy source:
@WebkitCall(from="String_Node_Str") public void finishOutline(){
  threadService.runActionLater(() -> {
    if (outlineTreeView.getRoot() == null) {
      TreeItem<Section> rootItem=new TreeItem<>();
      rootItem.setExpanded(true);
      Section rootSection=new Section();
      rootSection.setLevel(-1);
      String outlineTitle="String_Node_Str";
      rootSection.setTitle(outlineTitle);
      rootItem.setValue(rootSection);
      outlineTreeView.setRoot(rootItem);
      outlineTreeView.setOnMouseClicked(event -> {
        try {
          TreeItem<Section> item=outlineTreeView.getSelectionModel().getSelectedItem();
          EditorPane editorPane=current.currentEditor();
          editorPane.moveCursorTo(item.getValue().getLineno());
        }
 catch (        Exception e) {
          logger.error("String_Node_Str");
        }
      }
);
    }
    outlineTreeView.getRoot().getChildren().clear();
    for (    Section section : outlineList) {
      TreeItem<Section> sectionItem=new TreeItem<>(section);
      sectionItem.setExpanded(true);
      outlineTreeView.getRoot().getChildren().add(sectionItem);
      TreeSet<Section> subsections=section.getSubsections();
      for (      Section subsection : subsections) {
        TreeItem<Section> subItem=new TreeItem<>(subsection);
        subItem.setExpanded(true);
        sectionItem.getChildren().add(subItem);
        this.addSubSections(subItem,subsection.getSubsections());
      }
    }
  }
);
}

Fixed version (ground truth):
@WebkitCall(from="String_Node_Str") public void finishOutline(){
  threadService.runActionLater(() -> {
    if (outlineTreeView.getRoot() == null) {
      TreeItem<Section> rootItem=new TreeItem<>();
      rootItem.setExpanded(true);
      Section rootSection=new Section();
      rootSection.setLevel(-1);
      String outlineTitle="String_Node_Str";
      rootSection.setTitle(outlineTitle);
      rootItem.setValue(rootSection);
      outlineTreeView.setRoot(rootItem);
      outlineTreeView.setOnMouseClicked(event -> {
        try {
          TreeItem<Section> item=outlineTreeView.getSelectionModel().getSelectedItem();
          EditorPane editorPane=current.currentEditor();
          editorPane.moveCursorTo(item.getValue().getLineno());
        }
 catch (        Exception e) {
          logger.error("String_Node_Str");
        }
      }
);
    }
    if (outlineList.size() > 0)     outlineTreeView.getRoot().getChildren().clear();
    for (    Section section : outlineList) {
      TreeItem<Section> sectionItem=new TreeItem<>(section);
      sectionItem.setExpanded(true);
      outlineTreeView.getRoot().getChildren().add(sectionItem);
      TreeSet<Section> subsections=section.getSubsections();
      for (      Section subsection : subsections) {
        TreeItem<Section> subItem=new TreeItem<>(subsection);
        subItem.setExpanded(true);
        sectionItem.getChildren().add(subItem);
        this.addSubSections(subItem,subsection.getSubsections());
      }
    }
  }
);
}
Program: 62342
Project: 62342
Buggy source:
public void convert(String rendered,Consumer<String>... nextStep){
  threadService.runActionLater(() -> {
    this.rendered=rendered;
    String url=String.format(slideUrl,controller.getPort(),directoryService.interPath());
    if (slidePane.isVisible() || !url.equals(slidePane.getLocation())) {
      slidePane.load(url);
    }
 else {
      threadService.runActionLater(() -> {
        slidePane.replaceSlides(rendered);
      }
);
    }
    for (    Consumer<String> step : nextStep) {
      step.accept(rendered);
    }
  }
);
}

Fixed version (ground truth):
public void convert(String rendered,Consumer<String>... nextStep){
  threadService.runActionLater(() -> {
    this.rendered=rendered;
    String url=String.format(slideUrl,controller.getPort(),directoryService.interPath());
    if (controller.rightShowerHider.getShowing() != slidePane || !url.equals(slidePane.getLocation())) {
      slidePane.load(url);
    }
 else {
      threadService.runActionLater(() -> {
        slidePane.replaceSlides(rendered);
      }
);
    }
    for (    Consumer<String> step : nextStep) {
      step.accept(rendered);
    }
  }
);
}
Program: 62343
Project: 62343
Buggy source:
@Autowired public EditorPane(ApplicationController controller,ThreadService threadService,ShortcutProvider shortcutProvider,ApplicationContext applicationContext,TabService tabService,AsciiTreeGenerator asciiTreeGenerator,ParserService parserService,DirectoryService directoryService){
  this.controller=controller;
  this.threadService=threadService;
  this.shortcutProvider=shortcutProvider;
  this.applicationContext=applicationContext;
  this.tabService=tabService;
  this.asciiTreeGenerator=asciiTreeGenerator;
  this.directoryService=directoryService;
  this.handleReadyTasks=FXCollections.observableArrayList();
  this.parserService=parserService;
  this.webView=new WebView();
  webEngine().setConfirmHandler(this::handleConfirm);
  initializeMargins();
  initializeEditorContextMenus();
}

Fixed version (ground truth):
@Autowired public EditorPane(ApplicationController controller,ThreadService threadService,ShortcutProvider shortcutProvider,ApplicationContext applicationContext,TabService tabService,AsciiTreeGenerator asciiTreeGenerator,ParserService parserService,DirectoryService directoryService){
  this.controller=controller;
  this.threadService=threadService;
  this.shortcutProvider=shortcutProvider;
  this.applicationContext=applicationContext;
  this.tabService=tabService;
  this.asciiTreeGenerator=asciiTreeGenerator;
  this.directoryService=directoryService;
  this.handleReadyTasks=FXCollections.observableArrayList();
  this.parserService=parserService;
  this.webView=new WebView();
  this.ready.addListener(this::afterEditorReady);
  webEngine().setConfirmHandler(this::handleConfirm);
  initializeMargins();
  initializeEditorContextMenus();
}
Program: 62344
Project: 62344
Buggy source:
private Boolean handleConfirm(String param){
  if ("String_Node_Str".equals(param)) {
    handleEditorReady();
    ObservableList<Runnable> runnables=FXCollections.observableArrayList(handleReadyTasks);
    handleReadyTasks.clear();
    for (    Runnable runnable : runnables) {
      runnable.run();
    }
    ready.setValue(true);
    updatePreviewUrl();
  }
  return false;
}

Fixed version (ground truth):
private Boolean handleConfirm(String param){
  if ("String_Node_Str".equals(param)) {
    afterEditorLoaded();
  }
  return false;
}
Program: 62345
Project: 62345
Buggy source:
@Override public Source resolve(String href,String base) throws TransformerException {
  if (Objects.nonNull(href)) {
    try {
      if (href.charAt(0) == '/')       href="String_Node_Str" + href;
      Path path=Paths.get(URI.create(href));
      if (!Files.exists(path)) {
        Path tryThis=currentTabPathDir.resolve(path.subpath(0,path.getNameCount()));
        if (Files.exists(tryThis)) {
          return super.resolve(tryThis.toUri().toString(),base);
        }
        if (pathResolverService.isImage(path)) {
          Optional<Path> first=IOHelper.find(currentTabPathDir,Integer.MAX_VALUE,(p,attr) -> p.getFileName().equals(path.getFileName())).findFirst();
          if (first.isPresent())           return super.resolve(first.map(Path::toUri).map(URI::toString).get(),base);
        }
      }
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  return super.resolve(href,base);
}

Fixed version (ground truth):
@Override public Source resolve(String href,String base) throws TransformerException {
  if (Objects.nonNull(href)) {
    try {
      if (href.charAt(0) == '/')       href="String_Node_Str" + href;
      Path path=Paths.get(UriComponentsBuilder.fromUriString(href).build().toUri());
      if (!Files.exists(path)) {
        Path tryThis=currentTabPathDir.resolve(path.subpath(0,path.getNameCount()));
        if (Files.exists(tryThis)) {
          return super.resolve(tryThis.toUri().toString(),base);
        }
        if (pathResolverService.isImage(path)) {
          Optional<Path> first=IOHelper.find(currentTabPathDir,Integer.MAX_VALUE,(p,attr) -> p.getFileName().equals(path.getFileName())).findFirst();
          if (first.isPresent())           return super.resolve(first.map(Path::toUri).map(URI::toString).get(),base);
        }
      }
    }
 catch (    Exception e) {
      logger.error("String_Node_Str",e);
    }
  }
  return super.resolve(href,base);
}
Program: 62348
Project: 62348
Buggy source:
public void addPathToTree(Path path){
  try (DirectoryStream<Path> directoryStream=Files.newDirectoryStream(path)){
    List<TreeItem<Item>> subItemList=StreamSupport.stream(directoryStream.spliterator(),false).filter(p -> !pathResolver.isHidden(p)).filter(pathResolver::isViewable).map(p -> new TreeItem<>(new Item(p),awesomeService.getIcon(p))).collect(Collectors.toList());
    threadService.runActionLater(() -> {
      rootItem=new TreeItem<>(new Item(path,String.format("String_Node_Str",Optional.of(path).map(Path::getFileName).orElse(path))),awesomeService.getIcon(path));
      rootItem.setExpanded(true);
      rootItem.getChildren().addAll(subItemList);
      controller.getFileSystemView().setRoot(rootItem);
    }
,true);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void addPathToTree(Path path){
  try (DirectoryStream<Path> directoryStream=Files.newDirectoryStream(path)){
    final List<Path> pathList=StreamSupport.stream(directoryStream.spliterator(),false).collect(Collectors.toList());
    List<TreeItem<Item>> subItemList=pathList.stream().filter(p -> !pathResolver.isHidden(p)).filter(pathResolver::isViewable).sorted(pathOrder::comparePaths).map(p -> new TreeItem<>(new Item(p),awesomeService.getIcon(p))).collect(Collectors.toList());
    threadService.runActionLater(() -> {
      rootItem=new TreeItem<>(new Item(path,String.format("String_Node_Str",Optional.of(path).map(Path::getFileName).orElse(path))),awesomeService.getIcon(path));
      rootItem.setExpanded(true);
      rootItem.getChildren().addAll(subItemList);
      controller.getFileSystemView().setRoot(rootItem);
    }
,true);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
}
Program: 62349
Project: 62349
Buggy source:
public void browse(final Path path){
  threadService.runActionLater(() -> {
    controller.getWorkDirTabPane().getSelectionModel().selectFirst();
    TreeView<Item> treeView=controller.getFileSystemView();
    int selectedIndex=treeView.getSelectionModel().getSelectedIndex();
    if (selectedIndex != -1)     lastSelectedItem=selectedIndex;
    rootItem=new TreeItem<>(new Item(path,String.format("String_Node_Str",Optional.of(path).map(Path::getFileName).orElse(path))),awesomeService.getIcon(path));
    rootItem.setExpanded(true);
    treeView.setRoot(rootItem);
    threadService.runTaskLater(() -> {
      this.addPathToTree(path);
      if (Objects.nonNull(lastSelectedItem)) {
        threadService.runActionLater(() -> {
          treeView.getSelectionModel().select(lastSelectedItem);
        }
);
      }
      logger.debug("String_Node_Str",path);
    }
);
  }
,true);
}

Fixed version (ground truth):
public void browse(final Path path){
  threadService.runActionLater(() -> {
    controller.getWorkDirTabPane().getSelectionModel().selectFirst();
    this.treeView=controller.getFileSystemView();
    int selectedIndex=treeView.getSelectionModel().getSelectedIndex();
    if (selectedIndex != -1)     lastSelectedItem=selectedIndex;
    rootItem=new TreeItem<>(new Item(path,String.format("String_Node_Str",Optional.of(path).map(Path::getFileName).orElse(path))),awesomeService.getIcon(path));
    rootItem.setExpanded(true);
    treeView.setRoot(rootItem);
    threadService.runTaskLater(() -> {
      this.addPathToTree(path);
      if (Objects.nonNull(lastSelectedItem)) {
        threadService.runActionLater(() -> {
          treeView.getSelectionModel().select(lastSelectedItem);
        }
);
      }
      logger.debug("String_Node_Str",path);
    }
);
  }
,true);
}
Program: 62350
Project: 62350
Buggy source:
@FXML public void newSlide(ActionEvent actionEvent){
  DialogBuilder dialog=DialogBuilder.newFolderDialog();
  dialog.showAndWait().map(String::trim).ifPresent(folderName -> {
    if (dialog.isShowing())     dialog.hide();
    if (folderName.matches(DialogBuilder.FOLDER_NAME_REGEX)) {
      Path path=fileSystemView.getSelectionModel().getSelectedItem().getValue().getPath();
      Path folderPath=path.resolve(folderName);
      threadService.runTaskLater(() -> {
        IOHelper.createDirectories(folderPath);
        indikatorService.startProgressBar();
        IOHelper.copyDirectory(configPath.resolve("String_Node_Str"),folderPath);
        indikatorService.stopProgressBar();
        directoryService.changeWorkigDir(folderPath);
        threadService.runActionLater(() -> {
          tabService.addTab(folderPath.resolve("String_Node_Str"));
        }
);
      }
);
    }
  }
);
}

Fixed version (ground truth):
@FXML public void newSlide(ActionEvent actionEvent){
  DialogBuilder dialog=DialogBuilder.newFolderDialog();
  dialog.showAndWait().map(String::trim).ifPresent(folderName -> {
    if (dialog.isShowing())     dialog.hide();
    if (folderName.matches(DialogBuilder.FOLDER_NAME_REGEX)) {
      Path path=fileSystemView.getSelectionModel().getSelectedItem().getValue().getPath();
      Path folderPath=path.resolve(folderName);
      threadService.runTaskLater(() -> {
        IOHelper.createDirectories(folderPath);
        indikatorService.startProgressBar();
        IOHelper.copyDirectory(configPath.resolve("String_Node_Str"),folderPath);
        indikatorService.stopProgressBar();
        threadService.runActionLater(() -> {
          tabService.addTab(folderPath.resolve("String_Node_Str"));
        }
);
        directoryService.changeWorkigDir(folderPath);
      }
);
    }
  }
);
}
Program: 62352
Project: 62352
Buggy source:
public void enableScrollingAndJumping(){
  stopScrolling.setValue(true);
  stopJumping.setValue(true);
}

Fixed version (ground truth):
public void enableScrollingAndJumping(){
  stopScrolling.setValue(false);
  stopJumping.setValue(false);
}