Program: 175943
Project: 175943
Buggy source:
public void reloadConfiguration(){
  if (!SwingUtilities.isEventDispatchThread()) {
    logger.warn("String_Node_Str");
  }
  if (!jenkinsAppSettings.isServerUrlSet()) {
    JenkinsWidget.getInstance(project).updateStatusIcon(BuildStatusAggregator.EMPTY);
    DefaultTreeModel model=(DefaultTreeModel)jobTree.getModel();
    DefaultMutableTreeNode root=(DefaultMutableTreeNode)model.getRoot();
    root.removeAllChildren();
    model.nodeStructureChanged(root);
    jobTree.setRootVisible(false);
    jenkins.update(Jenkins.byDefault());
    currentSelectedView=null;
    jobTree.getEmptyText().setText(UNAVAILABLE);
    return;
  }
  new Task.Backgroundable(project,"String_Node_Str",false,JenkinsLoadingTaskOption.INSTANCE){
    private Jenkins jenkinsWorkspace;
    @Override public void onSuccess(){
      jenkins.update(jenkinsWorkspace);
    }
    @Override public void onCancel(){
      jobTree.getEmptyText().setText(UNAVAILABLE);
    }
    @Override public void run(    @NotNull ProgressIndicator indicator){
      indicator.setIndeterminate(true);
      requestManager.authenticate(jenkinsAppSettings,jenkinsSettings);
      jenkinsWorkspace=requestManager.loadJenkinsWorkspace(jenkinsAppSettings);
    }
  }
.queue();
  if (!jenkinsSettings.getFavoriteJobs().isEmpty()) {
    createFavoriteViewIfNecessary();
  }
  String lastSelectedViewName=jenkinsSettings.getLastSelectedView();
  View viewToLoad;
  if (StringUtils.isEmpty(lastSelectedViewName)) {
    viewToLoad=jenkins.getPrimaryView();
  }
 else   if (favoriteView != null && lastSelectedViewName.equals(favoriteView.getName())) {
    viewToLoad=favoriteView;
  }
 else {
    viewToLoad=jenkins.getViewByName(lastSelectedViewName);
  }
  loadView(viewToLoad);
}

Fixed version (ground truth):
public void reloadConfiguration(){
  if (!SwingUtilities.isEventDispatchThread()) {
    logger.warn("String_Node_Str");
  }
  if (!jenkinsAppSettings.isServerUrlSet()) {
    JenkinsWidget.getInstance(project).updateStatusIcon(BuildStatusAggregator.EMPTY);
    DefaultTreeModel model=(DefaultTreeModel)jobTree.getModel();
    DefaultMutableTreeNode root=(DefaultMutableTreeNode)model.getRoot();
    root.removeAllChildren();
    model.nodeStructureChanged(root);
    jobTree.setRootVisible(false);
    jenkins.update(Jenkins.byDefault());
    currentSelectedView=null;
    jobTree.getEmptyText().setText(UNAVAILABLE);
    return;
  }
  new Task.Backgroundable(project,"String_Node_Str",false,JenkinsLoadingTaskOption.INSTANCE){
    private Jenkins jenkinsWorkspace;
    @Override public void onSuccess(){
      jenkins.update(jenkinsWorkspace);
      BrowserPanel.this.refreshCurrentView();
    }
    @Override public void onCancel(){
      jobTree.getEmptyText().setText(UNAVAILABLE);
    }
    @Override public void run(    @NotNull ProgressIndicator indicator){
      indicator.setIndeterminate(true);
      requestManager.authenticate(jenkinsAppSettings,jenkinsSettings);
      jenkinsWorkspace=requestManager.loadJenkinsWorkspace(jenkinsAppSettings);
    }
  }
.queue();
  if (!jenkinsSettings.getFavoriteJobs().isEmpty()) {
    createFavoriteViewIfNecessary();
  }
  String lastSelectedViewName=jenkinsSettings.getLastSelectedView();
  View viewToLoad;
  if (StringUtils.isEmpty(lastSelectedViewName)) {
    viewToLoad=jenkins.getPrimaryView();
  }
 else   if (favoriteView != null && lastSelectedViewName.equals(favoriteView.getName())) {
    viewToLoad=favoriteView;
  }
 else {
    viewToLoad=jenkins.getViewByName(lastSelectedViewName);
  }
  loadView(viewToLoad);
}