nus-yam/ex-repair huggingface dataset:
Program: 69507
Project: 69507
Buggy source:
@Override public List<Identity> getAssessedIdentities(SearchAssessedIdentityParams params){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append("String_Node_Str").append(IdentityImpl.class.getName()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(GroupRoles.participant.name()).append("String_Node_Str").append("String_Node_Str");
  List<Identity> list=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),Identity.class).setParameter("String_Node_Str",params.getCourseEntry().getKey()).setParameter("String_Node_Str",params.getCourseEntry().getOlatResource().getKey()).getResultList();
  return list;
}

Fixed version (ground truth):
@Override public List<Identity> getAssessedIdentities(SearchAssessedIdentityParams params){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append("String_Node_Str").append(IdentityImpl.class.getName()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(GroupRoles.participant.name()).append("String_Node_Str").append("String_Node_Str");
  List<Identity> list=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),Identity.class).setParameter("String_Node_Str",params.getCourseEntry().getKey()).getResultList();
  return list;
}
Program: 69509
Project: 69509
Buggy source:
public void recordTestAssessmentResult(UserTestSession candidateSession,AssessmentResult assessmentResult);

Fixed version (ground truth):
public UserTestSession recordTestAssessmentResult(UserTestSession candidateSession,AssessmentResult assessmentResult);
Program: 69510
Project: 69510
Buggy source:
@Override public void recordTestAssessmentResult(UserTestSession candidateSession,AssessmentResult assessmentResult){
  storeAssessmentResultFile(candidateSession,assessmentResult);
  recordOutcomeVariables(candidateSession,assessmentResult.getTestResult());
}

Fixed version (ground truth):
@Override public UserTestSession recordTestAssessmentResult(UserTestSession candidateSession,AssessmentResult assessmentResult){
  storeAssessmentResultFile(candidateSession,assessmentResult);
  recordOutcomeVariables(candidateSession,assessmentResult.getTestResult());
  return testSessionDao.update(candidateSession);
}
Program: 69511
Project: 69511
Buggy source:
private void recordOutcomeVariables(UserTestSession candidateSession,AbstractResult resultNode){
  for (  final ItemVariable itemVariable : resultNode.getItemVariables()) {
    if (itemVariable instanceof OutcomeVariable || QtiConstants.VARIABLE_DURATION_IDENTIFIER.equals(itemVariable.getIdentifier())) {
      log.audit(candidateSession.getKey() + "String_Node_Str" + itemVariable.getIdentifier()+ "String_Node_Str"+ stringifyQtiValue(itemVariable.getComputedValue()));
    }
  }
}

Fixed version (ground truth):
private void recordOutcomeVariables(UserTestSession candidateSession,AbstractResult resultNode){
  for (  final ItemVariable itemVariable : resultNode.getItemVariables()) {
    if (itemVariable instanceof OutcomeVariable) {
      OutcomeVariable outcomeVariable=(OutcomeVariable)itemVariable;
      Identifier identifier=outcomeVariable.getIdentifier();
      if (QtiConstants.VARIABLE_DURATION_IDENTIFIER.equals(identifier)) {
        log.audit(candidateSession.getKey() + "String_Node_Str" + itemVariable.getIdentifier()+ "String_Node_Str"+ stringifyQtiValue(itemVariable.getComputedValue()));
      }
 else       if (QTI21Constants.SCORE_IDENTIFIER.equals(identifier)) {
        Value value=itemVariable.getComputedValue();
        if (value instanceof NumberValue) {
          double score=((NumberValue)value).doubleValue();
          candidateSession.setScore(new BigDecimal(Double.toString(score)));
        }
      }
 else       if (QTI21Constants.PASS_IDENTIFIER.equals(identifier)) {
        Value value=itemVariable.getComputedValue();
        if (value instanceof BooleanValue) {
          boolean pass=((BooleanValue)value).booleanValue();
          candidateSession.setPassed(pass);
        }
      }
    }
  }
}
Program: 69512
Project: 69512
Buggy source:
@Override public RepositoryEntry importResource(Identity initialAuthor,String initialAuthorAlt,String displayname,String description,boolean withReferences,Locale locale,File file,String filename){
  ImsQTI21Resource ores=new ImsQTI21Resource();
  OLATResource resource=OLATResourceManager.getInstance().createAndPersistOLATResourceInstance(ores);
  File fResourceFileroot=FileResourceManager.getInstance().getFileResourceRootImpl(resource).getBasefile();
  File zipDir=new File(fResourceFileroot,FileResourceManager.ZIPDIR);
  FileResource.copyResource(file,filename,zipDir);
  RepositoryEntry re=CoreSpringFactory.getImpl(RepositoryService.class).create(initialAuthor,null,"String_Node_Str",displayname,description,resource,RepositoryEntry.ACC_OWNERS);
  DBFactory.getInstance().commit();
  return re;
}

Fixed version (ground truth):
@Override public RepositoryEntry importResource(Identity initialAuthor,String initialAuthorAlt,String displayname,String description,boolean withReferences,Locale locale,File file,String filename){
  ImsQTI21Resource ores=new ImsQTI21Resource();
  OLATResource resource=OLATResourceManager.getInstance().createAndPersistOLATResourceInstance(ores);
  File fResourceFileroot=FileResourceManager.getInstance().getFileResourceRootImpl(resource).getBasefile();
  File zipDir=new File(fResourceFileroot,FileResourceManager.ZIPDIR);
  copyResource(file,filename,zipDir);
  RepositoryEntry re=CoreSpringFactory.getImpl(RepositoryService.class).create(initialAuthor,null,"String_Node_Str",displayname,description,resource,RepositoryEntry.ACC_OWNERS);
  DBFactory.getInstance().commit();
  return re;
}
Program: 69513
Project: 69513
Buggy source:
/** 
 * @see org.olat.core.commons.modules.bc.meta.MetaInfo#getAuthorIdentity()
 */
public Identity getAuthorIdentity(){
  if (authorIdentKey == null) {
    return null;
  }
 else {
    return BaseSecurityManager.getInstance().loadIdentityByKey(authorIdentKey);
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.commons.modules.bc.meta.MetaInfo#getAuthorIdentity()
 */
@Override public Identity getAuthorIdentity(){
  if (authorIdentKey == null) {
    return null;
  }
 else {
    return BaseSecurityManager.getInstance().loadIdentityByKey(authorIdentKey);
  }
}
Program: 69514
Project: 69514
Buggy source:
/** 
 * @param pane
 * @param enabled
 */
public void setEnabled(int pane,boolean enabled){
  boolean wasEnabled=isEnabled();
  if (wasEnabled ^ enabled) {
    setDirty(true);
  }
  disabledPanes.set(pane,!enabled);
}

Fixed version (ground truth):
/** 
 * @param pane
 * @param enabled
 */
public void setEnabled(int pane,boolean enabled){
  boolean wasEnabled=isEnabled(pane);
  if (wasEnabled != enabled) {
    setDirty(true);
  }
  disabledPanes.set(pane,!enabled);
}
Program: 69517
Project: 69517
Buggy source:
public EditSolutionController(UserRequest ureq,WindowControl wControl,Solution solution,File solutionContainer,boolean replaceFile){
  super(ureq,wControl);
  this.replaceFile=replaceFile;
  this.solution=solution;
  this.solutionContainer=solutionContainer;
  initForm(ureq);
}

Fixed version (ground truth):
private EditSolutionController(UserRequest ureq,WindowControl wControl,Solution solution,File solutionDir,VFSContainer solutionContainer,boolean replaceFile){
  super(ureq,wControl);
  this.replaceFile=replaceFile;
  this.solution=solution;
  this.solutionDir=solutionDir;
  this.solutionContainer=solutionContainer;
  initForm(ureq);
}
Program: 69518
Project: 69518
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  formLayout.setElementCssClass("String_Node_Str");
  String title=solution.getTitle() == null ? "String_Node_Str" : solution.getTitle();
  titleEl=uifactory.addTextElement("String_Node_Str","String_Node_Str",128,title,formLayout);
  titleEl.setElementCssClass("String_Node_Str");
  titleEl.setMandatory(true);
  fileEl=uifactory.addFileElement("String_Node_Str","String_Node_Str",formLayout);
  fileEl.setMandatory(true);
  fileEl.addActionListener(FormEvent.ONCHANGE);
  if (StringHelper.containsNonWhitespace(solution.getFilename())) {
    File currentFile=new File(solutionContainer,solution.getFilename());
    if (currentFile.exists()) {
      fileEl.setInitialFile(currentFile);
    }
  }
  FormLayoutContainer buttonCont=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
  buttonCont.setRootForm(mainForm);
  formLayout.add(buttonCont);
  uifactory.addFormSubmitButton("String_Node_Str",buttonCont);
  uifactory.addFormCancelButton("String_Node_Str",buttonCont,ureq,getWindowControl());
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  formLayout.setElementCssClass("String_Node_Str");
  String title=solution.getTitle() == null ? "String_Node_Str" : solution.getTitle();
  titleEl=uifactory.addTextElement("String_Node_Str","String_Node_Str",128,title,formLayout);
  titleEl.setElementCssClass("String_Node_Str");
  titleEl.setMandatory(true);
  fileEl=uifactory.addFileElement("String_Node_Str","String_Node_Str",formLayout);
  fileEl.setMandatory(true);
  fileEl.addActionListener(FormEvent.ONCHANGE);
  if (StringHelper.containsNonWhitespace(solution.getFilename())) {
    File currentFile=new File(solutionDir,solution.getFilename());
    if (currentFile.exists()) {
      fileEl.setInitialFile(currentFile);
    }
  }
  FormLayoutContainer buttonCont=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
  buttonCont.setRootForm(mainForm);
  formLayout.add(buttonCont);
  uifactory.addFormSubmitButton("String_Node_Str",buttonCont);
  uifactory.addFormCancelButton("String_Node_Str",buttonCont,ureq,getWindowControl());
}
Program: 69519
Project: 69519
Buggy source:
@Override protected void formOK(UserRequest ureq){
  solution.setTitle(titleEl.getValue());
  if (fileEl.getUploadFile() != null) {
    if (replaceFile && StringHelper.containsNonWhitespace(solution.getFilename())) {
      File currentFile=new File(solutionContainer,solution.getFilename());
      if (currentFile.exists()) {
        currentFile.delete();
      }
    }
    String filename=fileEl.getUploadFileName();
    solution.setFilename(filename);
    try {
      Path upload=fileEl.getUploadFile().toPath();
      File newFile=new File(solutionContainer,filename);
      Files.move(upload,newFile.toPath(),StandardCopyOption.REPLACE_EXISTING);
    }
 catch (    Exception ex) {
      logError("String_Node_Str",ex);
    }
  }
  fireEvent(ureq,Event.DONE_EVENT);
}

Fixed version (ground truth):
@Override protected void formOK(UserRequest ureq){
  solution.setTitle(titleEl.getValue());
  if (fileEl.getUploadFile() != null) {
    if (replaceFile && StringHelper.containsNonWhitespace(solution.getFilename())) {
      File currentFile=new File(solutionDir,solution.getFilename());
      if (currentFile.exists()) {
        currentFile.delete();
      }
    }
    String filename=fileEl.getUploadFileName();
    solution.setFilename(filename);
    try {
      Path upload=fileEl.getUploadFile().toPath();
      File newFile=new File(solutionDir,filename);
      Files.move(upload,newFile.toPath(),StandardCopyOption.REPLACE_EXISTING);
      VFSItem uploadedItem=solutionContainer.resolve(filename);
      if (uploadedItem instanceof MetaTagged) {
        MetaInfo metaInfo=((MetaTagged)uploadedItem).getMetaInfo();
        metaInfo.setAuthor(ureq.getIdentity());
        metaInfo.write();
      }
    }
 catch (    Exception ex) {
      logError("String_Node_Str",ex);
    }
  }
  fireEvent(ureq,Event.DONE_EVENT);
}
Program: 69520
Project: 69520
Buggy source:
private void appendSelectDeselectAllButtons(final StringOutput target,final Translator translator,Table table,String formName,int rows,int resultsPerPage){
  if (table.isMultiSelect()) {
    target.append("String_Node_Str");
    target.append("String_Node_Str");
    target.append("String_Node_Str").append(formName).append("String_Node_Str");
    target.append("String_Node_Str");
    target.append(translator.translate("String_Node_Str"));
    target.append("String_Node_Str");
    target.append("String_Node_Str").append(formName).append("String_Node_Str");
    target.append("String_Node_Str");
    target.append(translator.translate("String_Node_Str"));
    target.append("String_Node_Str");
    target.append("String_Node_Str");
  }
  if (table.isShowAllSelected() && (rows > resultsPerPage)) {
    target.append("String_Node_Str");
    target.append(A_CLASS).append("String_Node_Str").append(HREF_JAVA_SCRIPT_TABLE_FORM_INJECT_COMMAND_AND_SUBMIT);
    target.append(formName).append(SINGLE_COMMA_SINGLE).append(Table.COMMAND_PAGEACTION).append(SINGLE_COMMA_SINGLE).append(Table.COMMAND_SHOW_PAGES).append(CLOSE_AND_O2CLICK);
    target.append(translator.translate("String_Node_Str")).append("String_Node_Str");
    target.append("String_Node_Str");
  }
}

Fixed version (ground truth):
private void appendSelectDeselectAllButtons(final StringOutput target,final Translator translator,Table table,String formName,int rows,int resultsPerPage){
  if (table.isMultiSelect()) {
    target.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(formName).append("String_Node_Str").append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str");
    target.append("String_Node_Str").append(formName).append("String_Node_Str").append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append("String_Node_Str");
  }
  if (table.isShowAllSelected() && (rows > resultsPerPage)) {
    target.append("String_Node_Str");
    target.append(A_CLASS).append("String_Node_Str").append(HREF_JAVA_SCRIPT_TABLE_FORM_INJECT_COMMAND_AND_SUBMIT);
    target.append(formName).append(SINGLE_COMMA_SINGLE).append(Table.COMMAND_PAGEACTION).append(SINGLE_COMMA_SINGLE).append(Table.COMMAND_SHOW_PAGES).append(CLOSE_AND_O2CLICK);
    target.append(translator.translate("String_Node_Str")).append("String_Node_Str");
    target.append("String_Node_Str");
  }
}
Program: 69523
Project: 69523
Buggy source:
private void setGroupHeaders(BusinessGroup group){
  mainVC.contextPut("String_Node_Str",group.getName());
  openGroupButton=LinkFactory.createButton("String_Node_Str",mainVC,this);
}

Fixed version (ground truth):
private void setGroupHeaders(BusinessGroup group){
  mainVC.contextPut("String_Node_Str",group.getName());
  openGroupButton=LinkFactory.createButton("String_Node_Str",mainVC,this);
  openGroupButton.setIconLeftCSS("String_Node_Str");
}
Program: 69525
Project: 69525
Buggy source:
@Override protected IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh) throws IOException {
  final OOMultiReader r=(OOMultiReader)referenceToRefresh.getIndexReader();
  final IndexReader newReader=DirectoryReader.openIfChanged(r.getReader());
  final IndexReader newPermReader=DirectoryReader.openIfChanged(r.getPermanentReader());
  if (newReader == null && newPermReader == null) {
    return null;
  }
 else {
    return getSearcher(factory);
  }
}

Fixed version (ground truth):
@Override protected IndexSearcher refreshIfNeeded(IndexSearcher referenceToRefresh) throws IOException {
  final OOMultiReader r=(OOMultiReader)referenceToRefresh.getIndexReader();
  final IndexReader newReader=DirectoryReader.openIfChanged(r.getReader());
  final IndexReader newPermReader=DirectoryReader.openIfChanged(r.getPermanentReader());
  IndexSearcher searcher;
  if (refresh.getAndSet(false)) {
    searcher=getSearcher(factory);
  }
 else   if (newReader == null && newPermReader == null) {
    searcher=null;
  }
 else {
    searcher=getSearcher(factory);
  }
  return searcher;
}
Program: 69528
Project: 69528
Buggy source:
private Identity doCreateAndPersistIdentity(){
  String lang=languageSingleSelection.getSelectedKey();
  String username=usernameTextElement.getValue();
  String pwd=null;
  if (showPasswordFields && authCheckbox.isSelected(0)) {
    pwd=psw1TextElement.getValue();
    if (!StringHelper.containsNonWhitespace(pwd)) {
      pwd=null;
    }
  }
  UserManager um=UserManager.getInstance();
  User newUser=um.createUser(null,null,null);
  for (  UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
    FormItem propertyItem=this.flc.getFormComponent(userPropertyHandler.getName());
    userPropertyHandler.updateUserFromFormItem(newUser,propertyItem);
  }
  newUser.getPreferences().setLanguage(lang);
  newUser.getPreferences().setInformSessionTimeout(true);
  Identity ident=AuthHelper.createAndPersistIdentityAndUserWithUserGroup(username,null,pwd,newUser);
  return ident;
}

Fixed version (ground truth):
private Identity doCreateAndPersistIdentity(){
  String lang=languageSingleSelection.getSelectedKey();
  String username=usernameTextElement.getValue();
  String pwd=null;
  if (showPasswordFields && authCheckbox.isSelected(0)) {
    pwd=psw1TextElement.getValue();
    if (!StringHelper.containsNonWhitespace(pwd)) {
      pwd=null;
    }
  }
  UserManager um=UserManager.getInstance();
  User newUser=um.createUser(null,null,null);
  for (  UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
    FormItem propertyItem=this.flc.getFormComponent(userPropertyHandler.getName());
    userPropertyHandler.updateUserFromFormItem(newUser,propertyItem);
  }
  newUser.getPreferences().setLanguage(lang);
  newUser.getPreferences().setInformSessionTimeout(true);
  Identity ident=securityManager.createAndPersistIdentityAndUserWithDefaultProviderAndUserGroup(username,null,pwd,newUser);
  return ident;
}
Program: 69530
Project: 69530
Buggy source:
public ImportStepForm00(UserRequest ureq,WindowControl control,Form rootForm,StepsRunContext runContext){
  super(ureq,control,rootForm,runContext,LAYOUT_VERTICAL,null);
  flc.setTranslator(getTranslator());
  um=UserManager.getInstance();
  initForm(ureq);
}

Fixed version (ground truth):
public ImportStepForm00(UserRequest ureq,WindowControl control,Form rootForm,StepsRunContext runContext){
  super(ureq,control,rootForm,runContext,LAYOUT_VERTICAL,null);
  flc.setTranslator(getTranslator());
  initForm(ureq);
}
Program: 69531
Project: 69531
Buggy source:
public void addError(String error){
  errors.add(error);
}

Fixed version (ground truth):
public void addError(String error){
  if (StringHelper.containsNonWhitespace(error)) {
    errors.add(error);
    hasErrors=true;
  }
}
Program: 69532
Project: 69532
Buggy source:
private Identity doCreateAndPersistIdentity(TransientIdentity singleUser,ImportReport report){
  String login=singleUser.getName();
  String pwd=singleUser.getPassword();
  String lang=singleUser.getLanguage();
  if (canCreateOLATPassword) {
    if (!StringHelper.containsNonWhitespace(pwd)) {
      pwd=null;
    }
  }
  User newUser=um.createUser(null,null,null);
  List<UserPropertyHandler> userProperties=userPropertyHandlers;
  for (  UserPropertyHandler userPropertyHandler : userProperties) {
    String thisValue=singleUser.getProperty(userPropertyHandler.getName(),null);
    String stringValue=userPropertyHandler.getStringValue(thisValue,getLocale());
    userPropertyHandler.setUserProperty(newUser,stringValue);
  }
  newUser.getPreferences().setLanguage(lang);
  newUser.getPreferences().setInformSessionTimeout(true);
  Identity ident;
  if (pwd != null && pwd.startsWith(SHIBBOLETH_MARKER) && ShibbolethModule.isEnableShibbolethLogins()) {
    String uniqueID=pwd.substring(SHIBBOLETH_MARKER.length());
    ident=AuthHelper.createAndPersistIdentityAndUserWithUserGroup(login,ShibbolethDispatcher.PROVIDER_SHIB,uniqueID,newUser);
    report.incrementCreatedUser();
    report.incrementUpdatedShibboletAuthentication();
  }
 else {
    ident=AuthHelper.createAndPersistIdentityAndUserWithUserGroup(login,null,pwd,newUser);
    report.incrementCreatedUser();
  }
  return ident;
}

Fixed version (ground truth):
private Identity doCreateAndPersistIdentity(TransientIdentity singleUser,ImportReport report){
  String login=singleUser.getName();
  String pwd=singleUser.getPassword();
  String lang=singleUser.getLanguage();
  if (canCreateOLATPassword) {
    if (!StringHelper.containsNonWhitespace(pwd)) {
      pwd=null;
    }
  }
  User newUser=um.createUser(null,null,null);
  List<UserPropertyHandler> userProperties=userPropertyHandlers;
  for (  UserPropertyHandler userPropertyHandler : userProperties) {
    String thisValue=singleUser.getProperty(userPropertyHandler.getName(),null);
    String stringValue=userPropertyHandler.getStringValue(thisValue,getLocale());
    userPropertyHandler.setUserProperty(newUser,stringValue);
  }
  newUser.getPreferences().setLanguage(lang);
  newUser.getPreferences().setInformSessionTimeout(true);
  Identity ident;
  if (pwd != null && pwd.startsWith(SHIBBOLETH_MARKER) && ShibbolethModule.isEnableShibbolethLogins()) {
    String uniqueID=pwd.substring(SHIBBOLETH_MARKER.length());
    ident=securityManager.createAndPersistIdentityAndUserWithUserGroup(login,null,ShibbolethDispatcher.PROVIDER_SHIB,uniqueID,newUser);
    report.incrementCreatedUser();
    report.incrementUpdatedShibboletAuthentication();
  }
 else {
    ident=securityManager.createAndPersistIdentityAndUserWithDefaultProviderAndUserGroup(login,null,pwd,newUser);
    report.incrementCreatedUser();
  }
  return ident;
}
Program: 69534
Project: 69534
Buggy source:
/** 
 * @param ureq
 * @param wControl
 * @param canCreateOLATPassword true: workflow offers column to createpasswords; false: workflow does not offer pwd column
 */
public UserImportController(UserRequest ureq,WindowControl wControl,boolean canCreateOLATPassword){
  super(ureq,wControl);
  um=UserManager.getInstance();
  dbInstance=CoreSpringFactory.getImpl(DB.class);
  securityManager=CoreSpringFactory.getImpl(BaseSecurity.class);
  olatAuthManager=CoreSpringFactory.getImpl(OLATAuthManager.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  this.canCreateOLATPassword=canCreateOLATPassword;
  mainVC=createVelocityContainer("String_Node_Str");
  startLink=LinkFactory.createButton("String_Node_Str",mainVC,this);
  startLink.setPrimary(true);
  putInitialPanel(mainVC);
}

Fixed version (ground truth):
/** 
 * @param ureq
 * @param wControl
 * @param canCreateOLATPassword true: workflow offers column to createpasswords; false: workflow does not offer pwd column
 */
public UserImportController(UserRequest ureq,WindowControl wControl,boolean canCreateOLATPassword){
  super(ureq,wControl);
  this.canCreateOLATPassword=canCreateOLATPassword;
  mainVC=createVelocityContainer("String_Node_Str");
  startLink=LinkFactory.createButton("String_Node_Str",mainVC,this);
  startLink.setPrimary(true);
  putInitialPanel(mainVC);
}
Program: 69535
Project: 69535
Buggy source:
/** 
 * @see org.olat.core.gui.control.DefaultController#doDispose(boolean)
 */
protected void doDispose(){
}

Fixed version (ground truth):
@Override protected void doDispose(){
}
Program: 69537
Project: 69537
Buggy source:
private boolean checkAssessmentGuard(UserRequest ureq,TransientAssessmentMode mode){
  boolean needUpdate;
  if (assessmentGuardCtrl == null) {
    if (lockStatus == LockStatus.need) {
      assessmentGuardCtrl=new AssessmentModeGuardController(ureq,getWindowControl(),Collections.singletonList(mode),true);
      listenTo(assessmentGuardCtrl);
      assessmentGuardCtrl.getInitialComponent();
      lockStatus=LockStatus.popup;
      needUpdate=true;
    }
 else {
      needUpdate=false;
    }
  }
 else {
    needUpdate=assessmentGuardCtrl.updateAssessmentMode(ureq);
  }
  return needUpdate;
}

Fixed version (ground truth):
private boolean checkAssessmentGuard(UserRequest ureq,TransientAssessmentMode mode){
  boolean needUpdate;
  if (this.getIdentity() != null) {
    System.out.println(getIdentity().getName() + "String_Node_Str" + lockStatus);
  }
  if (assessmentGuardCtrl == null) {
    if (lockStatus == LockStatus.need) {
      List<TransientAssessmentMode> modes=mode == null ? Collections.<TransientAssessmentMode>emptyList() : Collections.singletonList(mode);
      assessmentGuardCtrl=new AssessmentModeGuardController(ureq,getWindowControl(),modes,true);
      listenTo(assessmentGuardCtrl);
      assessmentGuardCtrl.getInitialComponent();
      lockStatus=LockStatus.popup;
      needUpdate=true;
    }
 else {
      needUpdate=false;
    }
  }
 else {
    needUpdate=assessmentGuardCtrl.updateAssessmentMode(ureq);
  }
  return needUpdate;
}
Program: 69538
Project: 69538
Buggy source:
private boolean asyncUnlockResource(TransientAssessmentMode mode){
  boolean unlock;
  if (lockResource != null && lockResource.getResourceableId().equals(mode.getResource().getResourceableId())) {
    logAudit("String_Node_Str" + getIdentity().getName() + "String_Node_Str"+ mode.getResource()+ "String_Node_Str",null);
    unlockResource();
    lockMode=null;
    lockStatus=null;
    unlock=true;
  }
 else {
    unlock=false;
  }
  return unlock;
}

Fixed version (ground truth):
private boolean asyncUnlockResource(TransientAssessmentMode mode){
  boolean unlock;
  if (lockResource != null && lockResource.getResourceableId().equals(mode.getResource().getResourceableId())) {
    logAudit("String_Node_Str" + getIdentity().getName() + "String_Node_Str"+ mode.getResource()+ "String_Node_Str",null);
    unlockResource();
    if (lockMode != null) {
      lockStatus=LockStatus.need;
    }
 else {
      lockStatus=null;
    }
    lockMode=null;
    unlock=true;
  }
 else {
    unlock=false;
  }
  return unlock;
}
Program: 69539
Project: 69539
Buggy source:
private void continueAfterAssessmentMode(UserRequest ureq,ResourceGuard selectedGuard){
  List<ResourceGuard> lastGuards=new ArrayList<ResourceGuard>();
  for (  ResourceGuard currentGuard : guards.getList()) {
    if (currentGuard != selectedGuard) {
      lastGuards.add(currentGuard);
    }
  }
  guards.setList(lastGuards);
  boolean canContinue=guards.getSize() == 0;
  if (canContinue) {
    fireEvent(ureq,new Event("String_Node_Str"));
    String businessPath="String_Node_Str";
    NewControllerFactory.getInstance().launch(businessPath,ureq,getWindowControl());
  }
 else {
    mainVC.setDirty(true);
  }
}

Fixed version (ground truth):
private void continueAfterAssessmentMode(UserRequest ureq,ResourceGuard selectedGuard){
  List<ResourceGuard> lastGuards=new ArrayList<ResourceGuard>();
  for (  ResourceGuard currentGuard : guards.getList()) {
    if (currentGuard != selectedGuard) {
      lastGuards.add(currentGuard);
    }
  }
  guards.setList(lastGuards);
  boolean canContinue=guards.getSize() == 0;
  if (canContinue) {
    cmc.deactivate();
    fireEvent(ureq,new Event("String_Node_Str"));
    String businessPath="String_Node_Str";
    NewControllerFactory.getInstance().launch(businessPath,ureq,getWindowControl());
  }
 else {
    mainVC.setDirty(true);
  }
}
Program: 69540
Project: 69540
Buggy source:
/** 
 * Remove the list of assessment modes and lock the chief controller.
 * @param ureq
 * @param mode
 */
private void launchAssessmentMode(UserRequest ureq,TransientAssessmentMode mode){
  ureq.getUserSession().setAssessmentModes(null);
  OLATResourceable resource=mode.getResource();
  ureq.getUserSession().setLockResource(resource,mode);
  Windows.getWindows(ureq).getChiefController().lockResource(resource);
  fireEvent(ureq,new ChooseAssessmentModeEvent(mode));
  String businessPath="String_Node_Str" + mode.getRepositoryEntryKey() + "String_Node_Str";
  if (StringHelper.containsNonWhitespace(mode.getStartElementKey())) {
    businessPath+="String_Node_Str" + mode.getStartElementKey() + "String_Node_Str";
  }
  NewControllerFactory.getInstance().launch(businessPath,ureq,getWindowControl());
}

Fixed version (ground truth):
/** 
 * Remove the list of assessment modes and lock the chief controller.
 * @param ureq
 * @param mode
 */
private void launchAssessmentMode(UserRequest ureq,TransientAssessmentMode mode){
  cmc.deactivate();
  ureq.getUserSession().setAssessmentModes(null);
  OLATResourceable resource=mode.getResource();
  ureq.getUserSession().setLockResource(resource,mode);
  Windows.getWindows(ureq).getChiefController().lockResource(resource);
  fireEvent(ureq,new ChooseAssessmentModeEvent(mode));
  String businessPath="String_Node_Str" + mode.getRepositoryEntryKey() + "String_Node_Str";
  if (StringHelper.containsNonWhitespace(mode.getStartElementKey())) {
    businessPath+="String_Node_Str" + mode.getStartElementKey() + "String_Node_Str";
  }
  NewControllerFactory.getInstance().launch(businessPath,ureq,getWindowControl());
}
Program: 69541
Project: 69541
Buggy source:
private ResourceGuard syncAssessmentMode(UserRequest ureq,TransientAssessmentMode mode){
  Date now=new Date();
  Date beginWithLeadTime=mode.getBeginWithLeadTime();
  if (!mode.isManual() && beginWithLeadTime.after(now)) {
    return null;
  }
 else   if (mode.isManual() && (Status.end.equals(mode.getStatus()) || Status.none.equals(mode.getStatus()))) {
    return null;
  }
  ResourceGuard guard=guards.getGuardFor(mode);
  if (guard == null) {
    guard=createGuard(mode);
  }
  StringBuilder sb=new StringBuilder();
  boolean allowed=true;
  if (mode.getIpList() != null) {
    boolean ipInRange=assessmentModeMgr.isIpAllowed(mode.getIpList(),address);
    if (!ipInRange) {
      sb.append(translate("String_Node_Str"));
    }
    allowed&=ipInRange;
  }
  if (mode.getSafeExamBrowserKey() != null) {
    boolean safeExamCheck=assessmentModeMgr.isSafelyAllowed(ureq.getHttpReq(),mode.getSafeExamBrowserKey());
    if (!safeExamCheck) {
      if (sb.length() > 0)       sb.append("String_Node_Str");
      sb.append(translate("String_Node_Str"));
    }
    allowed&=safeExamCheck;
  }
  guard.getCountDown().setDate(mode.getBegin());
  String state;
  if (allowed) {
    Link go=guard.getGo();
    Link cont=guard.getContinue();
    state=updateButtons(mode,now,go,cont);
  }
 else {
    state="String_Node_Str";
  }
  guard.sync(state,sb.toString(),mode,getLocale());
  return guard;
}

Fixed version (ground truth):
private ResourceGuard syncAssessmentMode(UserRequest ureq,TransientAssessmentMode mode){
  Date now=new Date();
  Date beginWithLeadTime=mode.getBeginWithLeadTime();
  Date endWithFollowupTime=mode.getEndWithFollowupTime();
  if (mode.isManual() && (Status.end.equals(mode.getStatus()) || Status.none.equals(mode.getStatus()))) {
    return null;
  }
 else   if (!mode.isManual() && (beginWithLeadTime.after(now) || now.after(endWithFollowupTime))) {
    return null;
  }
  ResourceGuard guard=guards.getGuardFor(mode);
  if (guard == null) {
    guard=createGuard(mode);
  }
  StringBuilder sb=new StringBuilder();
  boolean allowed=true;
  if (mode.getIpList() != null) {
    boolean ipInRange=assessmentModeMgr.isIpAllowed(mode.getIpList(),address);
    if (!ipInRange) {
      sb.append(translate("String_Node_Str"));
    }
    allowed&=ipInRange;
  }
  if (mode.getSafeExamBrowserKey() != null) {
    boolean safeExamCheck=assessmentModeMgr.isSafelyAllowed(ureq.getHttpReq(),mode.getSafeExamBrowserKey());
    if (!safeExamCheck) {
      if (sb.length() > 0)       sb.append("String_Node_Str");
      sb.append(translate("String_Node_Str"));
    }
    allowed&=safeExamCheck;
  }
  guard.getCountDown().setDate(mode.getBegin());
  String state;
  if (allowed) {
    Link go=guard.getGo();
    Link cont=guard.getContinue();
    state=updateButtons(mode,now,go,cont);
  }
 else {
    state="String_Node_Str";
  }
  guard.sync(state,sb.toString(),mode,getLocale());
  return guard;
}
Program: 69544
Project: 69544
Buggy source:
public AccessRefusedController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  VelocityContainer mainVC=createVelocityContainer("String_Node_Str");
  StackedPanel contentP=new SimpleStackedPanel("String_Node_Str");
  contentP.setContent(mainVC);
  wControl.setWarning(translate("String_Node_Str"));
  putInitialPanel(contentP);
}

Fixed version (ground truth):
public AccessRefusedController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  VelocityContainer mainVC=createVelocityContainer("String_Node_Str");
  StackedPanel contentP=new SimpleStackedPanel("String_Node_Str");
  contentP.setContent(mainVC);
  putInitialPanel(contentP);
}
Program: 69547
Project: 69547
Buggy source:
public Long execute(){
  Long attempts=null;
  Float score=scoreEvaluation.getScore();
  Boolean passed=scoreEvaluation.getPassed();
  saveNodeScore(courseNode,assessedIdentity,score,cpm);
  saveNodePassed(courseNode,assessedIdentity,passed,cpm);
  saveAssessmentID(courseNode,assessedIdentity,scoreEvaluation.getAssessmentID(),cpm);
  if (incrementUserAttempts) {
    attempts=incrementNodeAttemptsProperty(courseNode,assessedIdentity,cpm);
  }
  if (courseNode instanceof AssessableCourseNode) {
    userCourseEnv.getScoreAccounting().scoreInfoChanged((AssessableCourseNode)courseNode,scoreEvaluation);
    EfficiencyStatementManager esm=EfficiencyStatementManager.getInstance();
    esm.updateUserEfficiencyStatement(userCourseEnv);
  }
  if (scoreEvaluation.getPassed() && course.getCourseConfig().isAutomaticCertificationEnabled()) {
    CertificatesManager certificatesManager=CoreSpringFactory.getImpl(CertificatesManager.class);
    if (certificatesManager.isRecertificationAllowed(assessedIdentity,courseEntry)) {
      CertificateTemplate template=null;
      Long templateId=course.getCourseConfig().getCertificateTemplate();
      if (templateId != null) {
        template=certificatesManager.getTemplateById(templateId);
      }
      CertificateInfos certificateInfos=new CertificateInfos(assessedIdentity,score,passed);
      MailerResult result=new MailerResult();
      certificatesManager.generateCertificate(certificateInfos,courseEntry,template,result);
    }
  }
  return attempts;
}

Fixed version (ground truth):
public Long execute(){
  Long attempts=null;
  Float score=scoreEvaluation.getScore();
  Boolean passed=scoreEvaluation.getPassed();
  saveNodeScore(courseNode,assessedIdentity,score,cpm);
  saveNodePassed(courseNode,assessedIdentity,passed,cpm);
  saveAssessmentID(courseNode,assessedIdentity,scoreEvaluation.getAssessmentID(),cpm);
  if (incrementUserAttempts) {
    attempts=incrementNodeAttemptsProperty(courseNode,assessedIdentity,cpm);
  }
  if (courseNode instanceof AssessableCourseNode) {
    userCourseEnv.getScoreAccounting().scoreInfoChanged((AssessableCourseNode)courseNode,scoreEvaluation);
    EfficiencyStatementManager esm=EfficiencyStatementManager.getInstance();
    esm.updateUserEfficiencyStatement(userCourseEnv);
  }
  if (passed != null && passed.booleanValue() && course.getCourseConfig().isAutomaticCertificationEnabled()) {
    CertificatesManager certificatesManager=CoreSpringFactory.getImpl(CertificatesManager.class);
    if (certificatesManager.isRecertificationAllowed(assessedIdentity,courseEntry)) {
      CertificateTemplate template=null;
      Long templateId=course.getCourseConfig().getCertificateTemplate();
      if (templateId != null) {
        template=certificatesManager.getTemplateById(templateId);
      }
      CertificateInfos certificateInfos=new CertificateInfos(assessedIdentity,score,passed);
      MailerResult result=new MailerResult();
      certificatesManager.generateCertificate(certificateInfos,courseEntry,template,result);
    }
  }
  return attempts;
}
Program: 69548
Project: 69548
Buggy source:
/** 
 * @return the meesage body
 */
protected String getMBody(){
  return teArElBody.getValue();
}

Fixed version (ground truth):
/** 
 * @return the message body
 */
protected String getMBody(){
  return teArElBody.getValue();
}
Program: 69549
Project: 69549
Buggy source:
private String getGroupNames(List<Long> keys){
  StringBuilder sb=new StringBuilder();
  List<BusinessGroupShort> groups=businessGroupService.loadShortBusinessGroups(keys);
  for (  BusinessGroupShort group : groups) {
    if (sb.length() > 0)     sb.append("String_Node_Str");
    sb.append(group.getName());
  }
  return sb.toString();
}

Fixed version (ground truth):
private String getGroupNames(List<Long> keys){
  StringBuilder sb=new StringBuilder();
  List<BusinessGroupShort> groups=businessGroupService.loadShortBusinessGroups(keys);
  for (  BusinessGroupShort group : groups) {
    if (sb.length() > 0)     sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append(group.getName());
  }
  return sb.toString();
}
Program: 69551
Project: 69551
Buggy source:
/** 
 * returns the choosen learning areas, or null if no ares were choosen.
 */
protected String getEmailCoachesAreas(){
  if (!isEmpty(easyAreaCoachSelectionList) && wantCoaches.isSelected(0) && coachesChoice.isSelected(2)) {
    return easyAreaCoachSelectionList.getValue();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * returns the chosen learning areas, or null if no ares were chosen.
 */
protected String getEmailCoachesAreas(){
  if (!isEmpty(easyAreaCoachSelectionList) && wantCoaches.isSelected(0) && coachesChoice.isSelected(2)) {
    return easyAreaCoachSelectionList.getValue();
  }
  return null;
}
Program: 69553
Project: 69553
Buggy source:
/** 
 * returns the choosen groups, or null if no groups were choosen.
 * @return
 */
protected String getEmailGroupCoaches(){
  if (!isEmpty(easyGroupCoachSelectionList) && wantCoaches.isSelected(0) && coachesChoice.isSelected(2)) {
    return easyGroupCoachSelectionList.getValue();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * returns the chosen groups, or null if no groups were chosen.
 * @return
 */
protected String getEmailGroupCoaches(){
  if (!isEmpty(easyGroupCoachSelectionList) && wantCoaches.isSelected(0) && coachesChoice.isSelected(2)) {
    return easyGroupCoachSelectionList.getValue();
  }
  return null;
}
Program: 69554
Project: 69554
Buggy source:
private String getAreaNames(List<Long> keys){
  StringBuilder sb=new StringBuilder();
  List<BGArea> areas=areaManager.loadAreas(keys);
  for (  BGArea area : areas) {
    if (sb.length() > 0)     sb.append("String_Node_Str");
    sb.append(area.getName());
  }
  return sb.toString();
}

Fixed version (ground truth):
private String getAreaNames(List<Long> keys){
  StringBuilder sb=new StringBuilder();
  List<BGArea> areas=areaManager.loadAreas(keys);
  for (  BGArea area : areas) {
    if (sb.length() > 0)     sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append(area.getName());
  }
  return sb.toString();
}
Program: 69556
Project: 69556
Buggy source:
/** 
 * Archive the current SCORM CMI Data, see ItemSequence.archiveScoData
 * @return
 */
public boolean archiveScoData(){
  boolean success=false;
  try {
    String itemId=scormManager.getSequence().findItemFromIndex(Integer.valueOf(olatScoId));
    ItemSequence item=scormManager.getSequence().getItem(itemId);
    if (item != null) {
      success=item.archiveScoData();
    }
  }
 catch (  Exception e) {
    if (isLogDebugEnabled()) {
      logWarn("String_Node_Str" + e.getMessage(),e);
    }
  }
  return success;
}

Fixed version (ground truth):
/** 
 * Archive the current SCORM CMI Data, see ItemSequence.archiveScoData
 * @return
 */
public boolean archiveScoData(){
  boolean success=false;
  try {
    String itemId=scormManager.getSequence().findItemFromIndex(Integer.valueOf(olatScoId));
    ItemSequence item=scormManager.getSequence().getItem(itemId);
    if (item != null) {
      success=item.archiveScoData();
    }
  }
 catch (  Exception e) {
    logError("String_Node_Str",e);
  }
  return success;
}
Program: 69557
Project: 69557
Buggy source:
private boolean validLimitationOnType(List<ResourceHandler> handlers){
  boolean allOk=true;
  if (limitTypes != null && handlers != null) {
    for (    ResourceHandler handler : handlers) {
      boolean match=false;
      for (      String limitType : limitTypes) {
        if (limitType.equals(handler.getHandler().getSupportedType())) {
          match=true;
        }
      }
      if (!match) {
        allOk=false;
        uploadFileEl.setErrorKey("String_Node_Str",new String[]{});
      }
    }
  }
  return allOk;
}

Fixed version (ground truth):
private boolean validLimitationOnType(List<ResourceHandler> handlers){
  boolean allOk=true;
  if (limitTypes != null && handlers != null) {
    for (Iterator<ResourceHandler> handlerIt=handlers.iterator(); handlerIt.hasNext(); ) {
      boolean match=false;
      ResourceHandler handler=handlerIt.next();
      for (      String limitType : limitTypes) {
        if (limitType.equals(handler.getHandler().getSupportedType())) {
          match=true;
        }
      }
      if (!match) {
        handlerIt.remove();
      }
    }
    if (handlers.isEmpty()) {
      allOk=false;
      uploadFileEl.setErrorKey("String_Node_Str",new String[]{});
    }
  }
  return allOk;
}
Program: 69558
Project: 69558
Buggy source:
private void renderMultiColumnsVertical(StringOutput sb,MultipleSelectionComponent stC,int columns){
  String columnCss;
  if (columns == 2) {
    columnCss="String_Node_Str";
  }
 else   if (columns == 3) {
    columnCss="String_Node_Str";
  }
 else {
    columns=4;
    columnCss="String_Node_Str";
  }
  sb.append("String_Node_Str");
  appendIdIfRequired(sb,stC).append("String_Node_Str");
  CheckboxElement[] checks=stC.getCheckComponents();
  for (int i=0; i < checks.length; ) {
    sb.append("String_Node_Str");
    for (int j=columns; j-- > 0; ) {
      if (i < checks.length) {
        CheckboxElement check=checks[i++];
        sb.append("String_Node_Str").append(columnCss).append("String_Node_Str").append("String_Node_Str");
        renderCheckbox(sb,check,stC,false);
        sb.append("String_Node_Str");
      }
    }
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
private void renderMultiColumnsVertical(StringOutput sb,MultipleSelectionComponent stC,int columns){
  String columnCss;
  if (columns == 2) {
    columnCss="String_Node_Str";
  }
 else   if (columns == 3) {
    columnCss="String_Node_Str";
  }
 else {
    columns=4;
    columnCss="String_Node_Str";
  }
  sb.append("String_Node_Str");
  appendIdIfRequired(sb,stC).append("String_Node_Str");
  CheckboxElement[] checks=stC.getCheckComponents();
  for (int i=0; i < checks.length; ) {
    sb.append("String_Node_Str");
    for (int j=columns; j-- > 0; ) {
      if (i < checks.length) {
        CheckboxElement check=checks[i++];
        sb.append("String_Node_Str").append(columnCss).append("String_Node_Str");
        renderCheckbox(sb,check,stC,false);
        sb.append("String_Node_Str");
      }
    }
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
}
Program: 69559
Project: 69559
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  passwordSwitch=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{translate("String_Node_Str")});
  passwordSwitch.addActionListener(FormEvent.ONCHANGE);
  passwordField=uifactory.addTextElement("String_Node_Str","String_Node_Str",30,"String_Node_Str",formLayout);
  passwordField.setExampleKey("String_Node_Str",null);
  passwordField.showError(false);
  if (condition != null && StringHelper.containsNonWhitespace(condition.getPassword())) {
    passwordSwitch.select("String_Node_Str",true);
    passwordField.setVisible(true);
    passwordField.setValue(condition.getPassword());
  }
 else {
    passwordField.setVisible(false);
    passwordSwitch.select("String_Node_Str",false);
    passwordField.setValue("String_Node_Str");
  }
  uifactory.addFormSubmitButton("String_Node_Str","String_Node_Str",formLayout);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  passwordSwitch=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  passwordSwitch.addActionListener(FormEvent.ONCHANGE);
  passwordField=uifactory.addTextElement("String_Node_Str",null,30,"String_Node_Str",formLayout);
  passwordField.setExampleKey("String_Node_Str",null);
  passwordField.showError(false);
  if (condition != null && StringHelper.containsNonWhitespace(condition.getPassword())) {
    passwordSwitch.select("String_Node_Str",true);
    passwordField.setVisible(true);
    passwordField.setValue(condition.getPassword());
  }
 else {
    passwordField.setVisible(false);
    passwordSwitch.select("String_Node_Str",false);
    passwordField.setValue("String_Node_Str");
  }
  uifactory.addFormSubmitButton("String_Node_Str","String_Node_Str",formLayout);
}
Program: 69560
Project: 69560
Buggy source:
public PasswordConditionEditController(UserRequest ureq,WindowControl wControl,PasswordCondition condition){
  super(ureq,wControl,"String_Node_Str");
  this.condition=condition;
  hasAlreadyPassword=StringHelper.containsNonWhitespace(condition.getPassword());
  initForm(ureq);
}

Fixed version (ground truth):
public PasswordConditionEditController(UserRequest ureq,WindowControl wControl,PasswordCondition condition){
  super(ureq,wControl);
  this.condition=condition;
  hasAlreadyPassword=StringHelper.containsNonWhitespace(condition.getPassword());
  initForm(ureq);
}
Program: 69561
Project: 69561
Buggy source:
/** 
 * @see org.olat.course.nodes.CourseNode#createEditController(org.olat.core.gui.UserRequest,org.olat.core.gui.control.WindowControl,org.olat.course.ICourse)
 */
@Override public TabbableController createEditController(UserRequest ureq,WindowControl wControl,BreadcrumbPanel stackPanel,ICourse course,UserCourseEnvironment euce){
  updateModuleConfigDefaults(false);
  STCourseNodeEditController childTabCntrllr=new STCourseNodeEditController(ureq,wControl,this,course.getCourseFolderContainer(),course.getCourseEnvironment().getCourseGroupManager(),course.getEditorTreeModel(),euce);
  CourseNode chosenNode=course.getEditorTreeModel().getCourseNode(euce.getCourseEditorEnv().getCurrentCourseNodeId());
  return new NodeEditController(ureq,wControl,course.getEditorTreeModel(),course,chosenNode,euce,childTabCntrllr);
}

Fixed version (ground truth):
/** 
 * @see org.olat.course.nodes.CourseNode#createEditController(org.olat.core.gui.UserRequest,org.olat.core.gui.control.WindowControl,org.olat.course.ICourse)
 */
@Override public TabbableController createEditController(UserRequest ureq,WindowControl wControl,BreadcrumbPanel stackPanel,ICourse course,UserCourseEnvironment euce){
  updateModuleConfigDefaults(false);
  STCourseNodeEditController childTabCntrllr=new STCourseNodeEditController(ureq,wControl,this,course.getCourseFolderContainer(),course.getEditorTreeModel(),euce);
  CourseNode chosenNode=course.getEditorTreeModel().getCourseNode(euce.getCourseEditorEnv().getCurrentCourseNodeId());
  return new NodeEditController(ureq,wControl,course.getEditorTreeModel(),course,chosenNode,euce,childTabCntrllr);
}