Program: 62326
Project: 62326
Buggy source:
private void addFavoriteMenuItem(){
  List<Favorite> favorites=service3.listAll();
  if (favorites.size() > 0) {
    new MenuItem(menu_favorite,SWT.SEPARATOR);
    for (    Favorite favorite : favorites) {
      final MenuItem menuItem=new MenuItem(menu_favorite,SWT.NONE);
      menuItem.setText(favorite.getName());
      menuItem.setData(FAVORITE,favorite);
      menuItem.addSelectionListener(new SelectionAdapter(){
        @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):
private void addFavoriteMenuItem(){
  List<Favorite> favorites=service3.listAll();
  if (favorites.size() > 0) {
    new MenuItem(menu_favorite,SWT.SEPARATOR);
    for (    Favorite favorite : favorites) {
      final MenuItem menuItem=new MenuItem(menu_favorite,SWT.NONE);
      menuItem.setText(favorite.getName());
      menuItem.setData(FAVORITE,favorite);
      menuItem.addSelectionListener(new SelectionAdapter(){
        @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;
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
);
    }
  }
}