Program: 70001
Project: 70001
Buggy source:
/** 
 * Factory method to create a file based HTML editor instance that uses locking to prevent two people editing the same file.
 * @param ureq
 * @param wControl
 * @param baseContainer the baseContainer (below that folder all images can be chosen)
 * @param relFilePath the file e.g. "index.html"
 * @param userActivityLogger the userActivity Logger if used
 * @param customLinkTreeModel Model for internal-link tree e.g. course-node tree with link information
 * @param editorCheckEnabled true: check if file has been created with another tool and warn user about potential data loss; false: ignore other authoring tools
 * @return Controller with internal-link selector
 */
protected HTMLEditorController(UserRequest ureq,WindowControl wControl,VFSContainer baseContainer,String relFilePath,CustomLinkTreeModel customLinkTreeModel,boolean editorCheckEnabled){
  super(ureq,wControl,"String_Node_Str");
  this.baseContainer=baseContainer;
  this.fileRelPath=relFilePath;
  this.customLinkTreeModel=customLinkTreeModel;
  this.editorCheckEnabled=editorCheckEnabled;
  this.fileName=((relFilePath.charAt(0) == '/') ? relFilePath.substring(1) : relFilePath);
  this.fileLeaf=(VFSLeaf)baseContainer.resolve(fileName);
  if (fileLeaf == null)   throw new AssertException("String_Node_Str" + getFileDebuggingPath(baseContainer,relFilePath) + "String_Node_Str");
  long size=fileLeaf.getSize();
  if (size > FolderConfig.getMaxEditSizeLimit()) {
    setTranslator(Util.createPackageTranslator(PlainTextEditorController.class,getLocale(),getTranslator()));
    getWindowControl().setError(translate("String_Node_Str",new String[]{(size / 1000) + "String_Node_Str",(FolderConfig.getMaxEditSizeLimit() / 1000) + "String_Node_Str"}));
    this.body="String_Node_Str";
    this.editable=false;
    return;
  }
  if (fileLeaf instanceof LocalFileImpl) {
    OLATResourceable lockResourceable=OresHelper.createOLATResourceableTypeWithoutCheck(fileLeaf.toString());
    String lockToken=Encoder.encrypt(getFileDebuggingPath(baseContainer,relFilePath));
    this.lock=CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(lockResourceable,ureq.getIdentity(),lockToken);
    VelocityContainer vc=(VelocityContainer)flc.getComponent();
    if (!lock.isSuccess()) {
      vc.contextPut("String_Node_Str",Boolean.TRUE);
      vc.contextPut("String_Node_Str",lock.getOwner().getName());
      this.editable=false;
      return;
    }
 else {
      vc.contextPut("String_Node_Str",Boolean.FALSE);
    }
  }
  this.body=parsePage(fileLeaf);
  initForm(ureq);
}

Fixed version (ground truth):
/** 
 * Factory method to create a file based HTML editor instance that uses locking to prevent two people editing the same file.
 * @param ureq
 * @param wControl
 * @param baseContainer the baseContainer (below that folder all images can be chosen)
 * @param relFilePath the file e.g. "index.html"
 * @param userActivityLogger the userActivity Logger if used
 * @param customLinkTreeModel Model for internal-link tree e.g. course-node tree with link information
 * @param editorCheckEnabled true: check if file has been created with another tool and warn user about potential data loss; false: ignore other authoring tools
 * @return Controller with internal-link selector
 */
protected HTMLEditorController(UserRequest ureq,WindowControl wControl,VFSContainer baseContainer,String relFilePath,CustomLinkTreeModel customLinkTreeModel,boolean editorCheckEnabled){
  super(ureq,wControl,"String_Node_Str");
  this.baseContainer=baseContainer;
  this.fileRelPath=relFilePath;
  this.customLinkTreeModel=customLinkTreeModel;
  this.editorCheckEnabled=editorCheckEnabled;
  this.fileName=((relFilePath.charAt(0) == '/') ? relFilePath.substring(1) : relFilePath);
  this.fileLeaf=(VFSLeaf)baseContainer.resolve(fileName);
  if (fileLeaf == null)   throw new AssertException("String_Node_Str" + getFileDebuggingPath(baseContainer,relFilePath) + "String_Node_Str");
  long size=fileLeaf.getSize();
  if (size > FolderConfig.getMaxEditSizeLimit()) {
    setTranslator(Util.createPackageTranslator(PlainTextEditorController.class,getLocale(),getTranslator()));
    fileToLargeError=translate("String_Node_Str",new String[]{(size / 1000) + "String_Node_Str",(FolderConfig.getMaxEditSizeLimit() / 1000) + "String_Node_Str"});
    this.body="String_Node_Str";
    this.editable=false;
    initForm(ureq);
    return;
  }
  if (fileLeaf instanceof LocalFileImpl) {
    OLATResourceable lockResourceable=OresHelper.createOLATResourceableTypeWithoutCheck(fileLeaf.toString());
    String lockToken=Encoder.encrypt(getFileDebuggingPath(baseContainer,relFilePath));
    this.lock=CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(lockResourceable,ureq.getIdentity(),lockToken);
    VelocityContainer vc=(VelocityContainer)flc.getComponent();
    if (!lock.isSuccess()) {
      vc.contextPut("String_Node_Str",Boolean.TRUE);
      vc.contextPut("String_Node_Str",lock.getOwner().getName());
      this.editable=false;
      return;
    }
 else {
      vc.contextPut("String_Node_Str",Boolean.FALSE);
    }
  }
  this.body=parsePage(fileLeaf);
  initForm(ureq);
}