Program: 35594
Project: 35594
Buggy source:
@Inject public SigmahAppFrame(final EventBus eventBus,final Authentication auth,final TabModel tabModel,final Dispatcher dispatcher,final UserLocalCache cache,final OnlineMode onlineMode){
  if (auth == null) {
    this.view=new SigmahViewport(0,0);
    this.view.setLayout(new FitLayout());
    this.view.syncSize();
    this.view.setBorders(false);
    this.view.add(new LoginView());
    this.view.layout();
    RootPanel.get().add(this.view);
    RootPanel.get("String_Node_Str").getElement().removeFromParent();
  }
 else {
    cache.init();
    RootPanel.get("String_Node_Str").add(new Label(auth.getEmail()));
    final Anchor reportButton=new Anchor(I18N.CONSTANTS.bugReport());
    dispatcher.execute(new GetHostServerInfo(),null,new AsyncCallback<HostServerInfo>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      HostServerInfo result){
        configureReportAnchor(reportButton,auth,result.getHostUrl());
      }
    }
);
    RootPanel.get("String_Node_Str").add(reportButton);
    final Anchor helpButton=new Anchor(I18N.CONSTANTS.help());
    helpButton.addClickHandler(new ClickHandler(){
      @Override public void onClick(      ClickEvent event){
        SigmahHelpWindow.show(activePageState);
      }
    }
);
    RootPanel.get("String_Node_Str").add(helpButton);
    final Anchor logoutButton=new Anchor(I18N.CONSTANTS.logout());
    if (RootPanel.get("String_Node_Str") != null) {
      RootPanel.get("String_Node_Str").add(logoutButton);
    }
    if (dispatcher instanceof DispatchOperator && Factory.getInstance() != null)     RootPanel.get("String_Node_Str").add(OfflineLabelFactory.getLabel((DispatchOperator)dispatcher,onlineMode));
    final Anchor creditButton=new Anchor(I18N.CONSTANTS.credits());
    creditButton.addClickHandler(new ClickHandler(){
      boolean initalized=false;
      @Override public void onClick(      ClickEvent event){
        if (initalized) {
          CreditFrame.show();
        }
 else {
          dispatcher.execute(new GetApplicationInfo(),null,new AsyncCallback<ApplicationInfo>(){
            @Override public void onFailure(            Throwable caught){
            }
            @Override public void onSuccess(            ApplicationInfo result){
              CreditFrame.init(result);
              CreditFrame.show();
            }
          }
);
        }
      }
    }
);
    if (RootPanel.get("String_Node_Str") != null) {
      RootPanel.get("String_Node_Str").add(creditButton);
    }
    final TabBar tabBar=new TabBar(tabModel,eventBus);
    activePageState=new DashboardPageState();
    final Tab dashboardTab=tabModel.add(I18N.CONSTANTS.dashboard(),activePageState,false);
    tabBar.addTabStyleName(tabModel.indexOf(dashboardTab),"String_Node_Str");
    final RootPanel tabs=RootPanel.get("String_Node_Str");
    tabs.add(tabBar);
    eventBus.addListener(NavigationHandler.NavigationAgreed,new Listener<NavigationEvent>(){
      @Override public void handleEvent(      NavigationEvent be){
        if (be.getParentObject() instanceof TabBar && be.getNavigationError() == NavigationError.NONE && be.getParentEvent().getNavigationError() == NavigationError.WORK_NOT_SAVED) {
          if (tabBar.getLastAction() == TabAction.REMOVE) {
            final Tab currentTab=tabModel.get(tabBar.getSelectedIndex());
            tabModel.remove(currentTab);
          }
 else           if (tabBar.getLastAction() == TabAction.NAVIGATE) {
            final Tab targetTab=tabModel.get(be.getPlace());
            NavigationError navigationError=tabBar.displayTab(targetTab);
            if (navigationError == NavigationError.NONE) {
              tabBar.setSelectedIndex(tabModel.indexOf(targetTab));
            }
          }
        }
 else         if (be.getParentObject() == logoutButton && be.getNavigationError() == NavigationError.NONE && be.getParentEvent().getNavigationError() == NavigationError.WORK_NOT_SAVED) {
          logOut();
        }
 else {
          final PageState state=be.getPlace();
          activePageState=state;
          final String title;
          if (state instanceof TabPage)           title=((TabPage)state).getTabTitle();
 else           title=I18N.CONSTANTS.title();
          final Tab targetTab=tabModel.add(title,be.getPlace(),true);
          if (state instanceof HasTab)           ((HasTab)state).setTab(targetTab);
        }
      }
    }
);
    logoutButton.addClickHandler(new ClickHandler(){
      @Override public void onClick(      ClickEvent event){
        Tab targetTab=null;
        if (tabBar.getSelectedIndex() > 0) {
          targetTab=tabModel.get(tabBar.getSelectedIndex() - 1);
        }
 else         if (tabModel.size() > 1) {
          targetTab=tabModel.get(tabBar.getSelectedIndex() - 1);
        }
        if (targetTab != null) {
          NavigationEvent navigationEvent=new NavigationEvent(NavigationHandler.NavigationRequested,targetTab.getState(),null,logoutButton);
          eventBus.fireEvent(navigationEvent);
          if (navigationEvent.getNavigationError() == NavigationError.NONE) {
            logOut();
          }
        }
 else {
          logOut();
        }
      }
    }
);
    int clutterHeight=getDecorationHeight(HEADER_DEFAULT_HEIGHT);
    this.view=new SigmahViewport(0,clutterHeight);
    this.view.setLayout(new FitLayout());
    this.view.syncSize();
    this.view.setBorders(true);
    RootPanel.get("String_Node_Str").add(this.view);
    cache.getOrganizationCache().getOrganization(new AsyncCallback<OrganizationDTO>(){
      @Override public void onSuccess(      OrganizationDTO result){
        if (result != null) {
          RootPanel.get("String_Node_Str").getElement().setInnerHTML(result.getName().toUpperCase());
          RootPanel.get("String_Node_Str").getElement().setAttribute("String_Node_Str","String_Node_Str" + GWT.getModuleBaseURL() + "String_Node_Str"+ FileUploadUtils.IMAGE_URL+ "String_Node_Str"+ result.getLogo()+ "String_Node_Str");
        }
      }
      @Override public void onFailure(      Throwable e){
        Log.error("String_Node_Str" + auth.getUserId() + "String_Node_Str",e);
      }
    }
);
  }
}

Fixed version (ground truth):
@Inject public SigmahAppFrame(final EventBus eventBus,final Authentication auth,final TabModel tabModel,final Dispatcher dispatcher,final UserLocalCache cache,final OnlineMode onlineMode){
  if (auth == null) {
    this.view=new SigmahViewport(0,0);
    this.view.setLayout(new FitLayout());
    this.view.syncSize();
    this.view.setBorders(false);
    this.view.add(new LoginView());
    this.view.layout();
    RootPanel.get().add(this.view);
    RootPanel.get("String_Node_Str").getElement().removeFromParent();
  }
 else {
    cache.init();
    RootPanel.get("String_Node_Str").add(new Label(auth.getEmail()));
    final Anchor reportButton=new Anchor(I18N.CONSTANTS.bugReport());
    dispatcher.execute(new GetHostServerInfo(),null,new AsyncCallback<HostServerInfo>(){
      @Override public void onFailure(      Throwable caught){
      }
      @Override public void onSuccess(      HostServerInfo result){
        configureReportAnchor(reportButton,auth,result.getHostUrl());
      }
    }
);
    RootPanel.get("String_Node_Str").add(reportButton);
    final Anchor helpButton=new Anchor(I18N.CONSTANTS.help());
    helpButton.addClickHandler(new ClickHandler(){
      @Override public void onClick(      ClickEvent event){
        SigmahHelpWindow.show(activePageState);
      }
    }
);
    RootPanel.get("String_Node_Str").add(helpButton);
    final Anchor logoutButton=new Anchor(I18N.CONSTANTS.logout());
    if (RootPanel.get("String_Node_Str") != null) {
      RootPanel.get("String_Node_Str").add(logoutButton);
    }
    if (dispatcher instanceof DispatchOperator && Factory.getInstance() != null)     RootPanel.get("String_Node_Str").add(OfflineLabelFactory.getLabel((DispatchOperator)dispatcher,onlineMode));
    final Anchor creditButton=new Anchor(I18N.CONSTANTS.credits());
    creditButton.addClickHandler(new ClickHandler(){
      boolean initalized=false;
      @Override public void onClick(      ClickEvent event){
        if (initalized) {
          CreditFrame.show();
        }
 else {
          dispatcher.execute(new GetApplicationInfo(),null,new AsyncCallback<ApplicationInfo>(){
            @Override public void onFailure(            Throwable caught){
            }
            @Override public void onSuccess(            ApplicationInfo result){
              CreditFrame.init(result);
              CreditFrame.show();
            }
          }
);
        }
      }
    }
);
    if (RootPanel.get("String_Node_Str") != null) {
      RootPanel.get("String_Node_Str").add(creditButton);
    }
    final TabBar tabBar=new TabBar(tabModel,eventBus);
    activePageState=new DashboardPageState();
    final Tab dashboardTab=tabModel.add(I18N.CONSTANTS.dashboard(),activePageState,false);
    tabBar.addTabStyleName(tabModel.indexOf(dashboardTab),"String_Node_Str");
    final RootPanel tabs=RootPanel.get("String_Node_Str");
    tabs.add(tabBar);
    eventBus.addListener(NavigationHandler.NavigationAgreed,new Listener<NavigationEvent>(){
      @Override public void handleEvent(      NavigationEvent be){
        if (be.getParentObject() instanceof TabBar && be.getNavigationError() == NavigationError.NONE && be.getParentEvent().getNavigationError() == NavigationError.WORK_NOT_SAVED) {
          if (tabBar.getLastAction() == TabAction.REMOVE) {
            final Tab currentTab=tabModel.get(tabBar.getSelectedIndex());
            tabModel.remove(currentTab);
          }
 else           if (tabBar.getLastAction() == TabAction.NAVIGATE) {
            final Tab targetTab=tabModel.get(be.getPlace());
            NavigationError navigationError=tabBar.displayTab(targetTab);
            if (navigationError == NavigationError.NONE) {
              tabBar.setSelectedIndex(tabModel.indexOf(targetTab));
            }
          }
        }
 else         if (be.getParentObject() == logoutButton && be.getNavigationError() == NavigationError.NONE && be.getParentEvent().getNavigationError() == NavigationError.WORK_NOT_SAVED) {
          logOut();
        }
 else {
          final PageState state=be.getPlace();
          activePageState=state;
          final String title;
          if (state instanceof TabPage)           title=((TabPage)state).getTabTitle();
 else           title=I18N.CONSTANTS.title();
          final Tab targetTab=tabModel.add(title,be.getPlace(),true);
          if (state instanceof HasTab)           ((HasTab)state).setTab(targetTab);
        }
      }
    }
);
    eventBus.addListener(AppEvents.DeleteProject,new Listener<ProjectEvent>(){
      @Override public void handleEvent(      ProjectEvent pe){
        final Tab currentTab=tabModel.get(tabBar.getSelectedIndex());
        tabModel.remove(currentTab);
      }
    }
);
    logoutButton.addClickHandler(new ClickHandler(){
      @Override public void onClick(      ClickEvent event){
        Tab targetTab=null;
        if (tabBar.getSelectedIndex() > 0) {
          targetTab=tabModel.get(tabBar.getSelectedIndex() - 1);
        }
 else         if (tabModel.size() > 1) {
          targetTab=tabModel.get(tabBar.getSelectedIndex() - 1);
        }
        if (targetTab != null) {
          NavigationEvent navigationEvent=new NavigationEvent(NavigationHandler.NavigationRequested,targetTab.getState(),null,logoutButton);
          eventBus.fireEvent(navigationEvent);
          if (navigationEvent.getNavigationError() == NavigationError.NONE) {
            logOut();
          }
        }
 else {
          logOut();
        }
      }
    }
);
    int clutterHeight=getDecorationHeight(HEADER_DEFAULT_HEIGHT);
    this.view=new SigmahViewport(0,clutterHeight);
    this.view.setLayout(new FitLayout());
    this.view.syncSize();
    this.view.setBorders(true);
    RootPanel.get("String_Node_Str").add(this.view);
    cache.getOrganizationCache().getOrganization(new AsyncCallback<OrganizationDTO>(){
      @Override public void onSuccess(      OrganizationDTO result){
        if (result != null) {
          RootPanel.get("String_Node_Str").getElement().setInnerHTML(result.getName().toUpperCase());
          RootPanel.get("String_Node_Str").getElement().setAttribute("String_Node_Str","String_Node_Str" + GWT.getModuleBaseURL() + "String_Node_Str"+ FileUploadUtils.IMAGE_URL+ "String_Node_Str"+ result.getLogo()+ "String_Node_Str");
        }
      }
      @Override public void onFailure(      Throwable e){
        Log.error("String_Node_Str" + auth.getUserId() + "String_Node_Str",e);
      }
    }
);
  }
}