Program: 69583
Project: 69583
Buggy source:
private void initialize(UserRequest ureq){
  mainVc=createVelocityContainer("String_Node_Str");
  mainVc.contextPut("String_Node_Str",screenMode);
  navSitesVc=createVelocityContainer("String_Node_Str");
  navSitesVc.setDomReplacementWrapperRequired(false);
  mainVc.put("String_Node_Str",navSitesVc);
  navTabsVc=createVelocityContainer("String_Node_Str");
  navTabsVc.setDomReplacementWrapperRequired(false);
  mainVc.put("String_Node_Str",navTabsVc);
  guimsgVc=createVelocityContainer("String_Node_Str");
  guimsgVc.contextPut("String_Node_Str",guiMessage);
  guimsgHolder=new Panel("String_Node_Str");
  guimsgHolder.setContent(guimsgPanel);
  currentMsgHolder=guimsgHolder;
  mainVc.put("String_Node_Str",guimsgHolder);
  cssHolder=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",cssHolder);
  stickymsgVc=createVelocityContainer("String_Node_Str");
  mainVc.put("String_Node_Str",stickymsgVc);
  updateStickyMessage();
  dtabs=new ArrayList<>();
  dtabsLinkNames=new ArrayList<>();
  dtabsControllers=new ArrayList<>();
  userTools=new HomeSite(null);
  sites=baseFullWebappControllerParts.getSiteInstances(ureq,getWindowControl());
  if (sites != null && sites.size() == 0) {
    sites=null;
  }
  List<String> siteLinks=new ArrayList<>();
  if (sites != null) {
    for (Iterator<SiteInstance> iterator=sites.iterator(); iterator.hasNext(); ) {
      SiteInstance si=iterator.next();
      NavElement navEl=si.getNavElement();
      if (navEl != null) {
        String linkName="String_Node_Str" + CodeHelper.getRAMUniqueID();
        siteLinks.add(linkName);
        Link link=LinkFactory.createCustomLink(linkName,"String_Node_Str","String_Node_Str",Link.NONTRANSLATED,navSitesVc,this);
        link.setCustomDisplayText(navEl.getTitle());
        link.setTitle(navEl.getDescription());
        link.setUserObject(si);
        Character accessKey=navEl.getAccessKey();
        if (accessKey != null && StringHelper.containsNonWhitespace(accessKey.toString())) {
          link.setAccessKey(accessKey.toString());
        }
      }
    }
  }
  navSitesVc.contextPut("String_Node_Str",siteLinks);
  navSitesVc.contextPut("String_Node_Str",this);
  navTabsVc.contextPut("String_Node_Str",dtabs);
  navTabsVc.contextPut("String_Node_Str",dtabsLinkNames);
  navTabsVc.contextPut("String_Node_Str",this);
  Controller headerCtr=baseFullWebappControllerParts.createHeaderController(ureq,getWindowControl());
  if (headerCtr != null) {
    listenTo(headerCtr);
    Component headerCmp=headerCtr.getInitialComponent();
    mainVc.put("String_Node_Str",headerCmp);
  }
  topnavCtr=baseFullWebappControllerParts.createTopNavController(ureq,getWindowControl());
  if (topnavCtr != null) {
    listenTo(topnavCtr);
    Component topNavCmp=topnavCtr.getInitialComponent();
    mainVc.put("String_Node_Str",topNavCmp);
  }
  modalPanel=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",modalPanel);
  main=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",main);
  footerCtr=baseFullWebappControllerParts.createFooterController(ureq,getWindowControl());
  if (footerCtr != null) {
    listenTo(footerCtr);
    Component footerCmp=footerCtr.getInitialComponent();
    mainVc.put("String_Node_Str",footerCmp);
  }
  contentCtrl=baseFullWebappControllerParts.getContentController(ureq,getWindowControl());
  if (contentCtrl != null) {
    listenTo(contentCtrl);
    GuiStack gs=getWindowControl().getWindowBackOffice().createGuiStack(contentCtrl.getInitialComponent());
    setGuiStack(gs);
    main.setContent(contentCtrl.getInitialComponent());
  }
 else {
    main.setContent(TextFactory.createTextComponentFromString("String_Node_Str","String_Node_Str",null,false,null));
    GuiStack gs=getWindowControl().getWindowBackOffice().createGuiStack(new Panel("String_Node_Str"));
    setGuiStack(gs);
  }
  setWindowSettings(getWindowControl().getWindowBackOffice().getWindowSettings());
  addCustomThemeJS();
}

Fixed version (ground truth):
private void initialize(UserRequest ureq){
  mainVc=createVelocityContainer("String_Node_Str");
  mainVc.contextPut("String_Node_Str",screenMode);
  navSitesVc=createVelocityContainer("String_Node_Str");
  navSitesVc.setDomReplacementWrapperRequired(false);
  mainVc.put("String_Node_Str",navSitesVc);
  navTabsVc=createVelocityContainer("String_Node_Str");
  navTabsVc.setDomReplacementWrapperRequired(false);
  mainVc.put("String_Node_Str",navTabsVc);
  guimsgVc=createVelocityContainer("String_Node_Str");
  guimsgVc.contextPut("String_Node_Str",guiMessage);
  guimsgHolder=new Panel("String_Node_Str");
  guimsgHolder.setContent(guimsgPanel);
  currentMsgHolder=guimsgHolder;
  mainVc.put("String_Node_Str",guimsgHolder);
  cssHolder=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",cssHolder);
  stickymsgVc=createVelocityContainer("String_Node_Str");
  mainVc.put("String_Node_Str",stickymsgVc);
  updateStickyMessage();
  dtabs=new ArrayList<>();
  dtabsLinkNames=new ArrayList<>();
  dtabsControllers=new ArrayList<>();
  userTools=new HomeSite(null);
  sites=baseFullWebappControllerParts.getSiteInstances(ureq,getWindowControl());
  if (sites != null && sites.size() == 0) {
    sites=null;
  }
  List<String> siteLinks=new ArrayList<>();
  if (sites != null) {
    for (Iterator<SiteInstance> iterator=sites.iterator(); iterator.hasNext(); ) {
      SiteInstance si=iterator.next();
      NavElement navEl=si.getNavElement();
      if (navEl != null) {
        String linkName="String_Node_Str" + CodeHelper.getRAMUniqueID();
        siteLinks.add(linkName);
        Link link=LinkFactory.createCustomLink(linkName,"String_Node_Str","String_Node_Str",Link.NONTRANSLATED,navSitesVc,this);
        link.setCustomDisplayText(navEl.getTitle());
        link.setTitle(navEl.getDescription());
        link.setUserObject(si);
        Character accessKey=navEl.getAccessKey();
        if (accessKey != null && StringHelper.containsNonWhitespace(accessKey.toString())) {
          link.setAccessKey(accessKey.toString());
        }
      }
    }
  }
  navSitesVc.contextPut("String_Node_Str",siteLinks);
  navSitesVc.contextPut("String_Node_Str",this);
  navTabsVc.contextPut("String_Node_Str",dtabs);
  navTabsVc.contextPut("String_Node_Str",dtabsLinkNames);
  navTabsVc.contextPut("String_Node_Str",this);
  Controller headerCtr=baseFullWebappControllerParts.createHeaderController(ureq,getWindowControl());
  if (headerCtr != null) {
    listenTo(headerCtr);
    Component headerCmp=headerCtr.getInitialComponent();
    mainVc.put("String_Node_Str",headerCmp);
  }
  topnavCtr=baseFullWebappControllerParts.createTopNavController(ureq,getWindowControl());
  if (topnavCtr != null) {
    listenTo(topnavCtr);
    Component topNavCmp=topnavCtr.getInitialComponent();
    mainVc.put("String_Node_Str",topNavCmp);
  }
  modalPanel=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",modalPanel);
  main=new Panel("String_Node_Str");
  mainVc.put("String_Node_Str",main);
  footerCtr=baseFullWebappControllerParts.createFooterController(ureq,getWindowControl());
  if (footerCtr != null) {
    listenTo(footerCtr);
    Component footerCmp=footerCtr.getInitialComponent();
    mainVc.put("String_Node_Str",footerCmp);
  }
  contentCtrl=baseFullWebappControllerParts.getContentController(ureq,getWindowControl());
  if (contentCtrl != null) {
    listenTo(contentCtrl);
    GuiStack gs=getWindowControl().getWindowBackOffice().createGuiStack(contentCtrl.getInitialComponent());
    setGuiStack(gs);
    main.setContent(contentCtrl.getInitialComponent());
  }
 else {
    main.setContent(TextFactory.createTextComponentFromString("String_Node_Str","String_Node_Str",null,false,null));
    GuiStack gs=getWindowControl().getWindowBackOffice().createGuiStack(new Panel("String_Node_Str"));
    setGuiStack(gs);
  }
  setWindowSettings(getWindowControl().getWindowBackOffice().getWindowSettings());
}