Program: 69839
Project: 69839
Buggy source:
/** 
 * @see org.olat.core.gui.media.AsyncMediaResponsible#getAsyncMediaResource(org.olat.core.gui.UserRequest)
 */
public MediaResource getAsyncMediaResource(UserRequest ureq){
  String moduleURI=ureq.getModuleURI();
  MediaResource mr=null;
  if (moduleURI != null) {
    if (moduleURI.startsWith(OLAT_CMD_PREFIX)) {
      String cmdAndSub=moduleURI.substring(OLAT_CMD_PREFIX.length());
      int slpos=cmdAndSub.indexOf('/');
      if (slpos != -1) {
        String cmd=cmdAndSub.substring(0,slpos);
        String subcmd=cmdAndSub.substring(slpos + 1);
        OlatCmdEvent aev=new OlatCmdEvent(cmd,subcmd);
        fireEvent(ureq,aev);
        if (aev.isAccepted())         return null;
      }
    }
    VFSItem sourceItem=rootContainer.resolve(moduleURI);
    if (sourceItem == null || (sourceItem instanceof VFSContainer)) {
      return new NotFoundMediaResource(moduleURI);
    }
    boolean checkRegular=true;
    if ((ureq.getParameter("String_Node_Str") != null) || ((moduleURI.endsWith("String_Node_Str") || moduleURI.endsWith("String_Node_Str")) && (ureq.getParameter("String_Node_Str") != null))) {
      Tracing.logDebug("String_Node_Str" + moduleURI,HtmlStaticPageComponent.class);
      ExternalSiteEvent ese=new ExternalSiteEvent(moduleURI);
      fireEvent(ureq,ese);
      if (ese.isAccepted()) {
        mr=ese.getResultingMediaResource();
        Tracing.logDebug("String_Node_Str",HtmlStaticPageComponent.class);
        checkRegular=false;
      }
 else {
        Mapper mapper=createMapper(rootContainer);
        String amapPath;
        String mapperID=VFSManager.getRealPath(rootContainer);
        if (mapperID == null) {
          amapPath=CoreSpringFactory.getImpl(MapperService.class).register(ureq.getUserSession(),mapper);
        }
 else {
          mapperID=this.getClass().getSimpleName() + "String_Node_Str" + mapperID;
          amapPath=CoreSpringFactory.getImpl(MapperService.class).register(ureq.getUserSession(),mapperID,mapper);
        }
        ese.setResultingMediaResource(new RedirectMediaResource(amapPath + "String_Node_Str" + moduleURI));
        Tracing.logDebug("String_Node_Str" + amapPath + "String_Node_Str"+ moduleURI,HtmlStaticPageComponent.class);
        ese.accept();
        mr=ese.getResultingMediaResource();
        checkRegular=false;
      }
    }
    if (checkRegular) {
      if ((moduleURI.endsWith("String_Node_Str") || moduleURI.endsWith("String_Node_Str")) && (ureq.getParameter("String_Node_Str") == null)) {
        currentURI=moduleURI;
        getFileContent((VFSLeaf)sourceItem);
        fireEvent(ureq,new NewInlineUriEvent(currentURI));
      }
 else {
        mr=new VFSMediaResource((VFSLeaf)sourceItem);
      }
    }
  }
  return mr;
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.media.AsyncMediaResponsible#getAsyncMediaResource(org.olat.core.gui.UserRequest)
 */
public MediaResource getAsyncMediaResource(UserRequest ureq){
  String moduleURI=ureq.getModuleURI();
  MediaResource mr=null;
  if (moduleURI != null) {
    if (moduleURI.startsWith(OLAT_CMD_PREFIX)) {
      String cmdAndSub=moduleURI.substring(OLAT_CMD_PREFIX.length());
      int slpos=cmdAndSub.indexOf('/');
      if (slpos != -1) {
        String cmd=cmdAndSub.substring(0,slpos);
        String subcmd=cmdAndSub.substring(slpos + 1);
        OlatCmdEvent aev=new OlatCmdEvent(cmd,subcmd);
        fireEvent(ureq,aev);
        if (aev.isAccepted())         return null;
      }
    }
    VFSItem sourceItem=rootContainer.resolve(moduleURI);
    if (sourceItem == null || (sourceItem instanceof VFSContainer)) {
      return new NotFoundMediaResource(moduleURI);
    }
    boolean checkRegular=true;
    if ((ureq.getParameter("String_Node_Str") != null) || ((moduleURI.endsWith("String_Node_Str") || moduleURI.endsWith("String_Node_Str")) && (ureq.getParameter("String_Node_Str") != null))) {
      Tracing.logDebug("String_Node_Str" + moduleURI,HtmlStaticPageComponent.class);
      ExternalSiteEvent ese=new ExternalSiteEvent(moduleURI);
      fireEvent(ureq,ese);
      if (ese.isAccepted()) {
        mr=ese.getResultingMediaResource();
        Tracing.logDebug("String_Node_Str",HtmlStaticPageComponent.class);
        checkRegular=false;
      }
 else {
        Mapper mapper=createMapper(rootContainer);
        String amapPath;
        String mapperID=VFSManager.getRealPath(rootContainer);
        if (mapperID == null) {
          amapPath=CoreSpringFactory.getImpl(MapperService.class).register(ureq.getUserSession(),mapper);
        }
 else {
          mapperID=this.getClass().getSimpleName() + "String_Node_Str" + mapperID;
          amapPath=CoreSpringFactory.getImpl(MapperService.class).register(mapperID,mapper);
        }
        ese.setResultingMediaResource(new RedirectMediaResource(amapPath + "String_Node_Str" + moduleURI));
        Tracing.logDebug("String_Node_Str" + amapPath + "String_Node_Str"+ moduleURI,HtmlStaticPageComponent.class);
        ese.accept();
        mr=ese.getResultingMediaResource();
        checkRegular=false;
      }
    }
    if (checkRegular) {
      if ((moduleURI.endsWith("String_Node_Str") || moduleURI.endsWith("String_Node_Str")) && (ureq.getParameter("String_Node_Str") == null)) {
        currentURI=moduleURI;
        getFileContent((VFSLeaf)sourceItem);
        fireEvent(ureq,new NewInlineUriEvent(currentURI));
      }
 else {
        mr=new VFSMediaResource((VFSLeaf)sourceItem);
      }
    }
  }
  return mr;
}