nus-yam/ex-repair huggingface dataset:
Program: 69955
Project: 69955
Buggy source:
/** 
 * @param browser
 * @param content
 * @param title
 * @param description
 * @param tags
 * @return Add a text artefact to a e-portfolio.
 */
public boolean addTextArtefact(Selenium browser,String binder,String page,String structure,String content,String title,String description,String tags){
  if (!functionalUtil.openSite(browser,OlatSite.HOME))   return (false);
  if (!functionalHomeSiteUtil.openActionByMenuTree(browser,EPortfolioAction.MY_ARTIFACTS))   return (false);
  openEditLink(browser);
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(getAddTextArtefactCss()).append("String_Node_Str");
  browser.click(locatorBuffer.toString());
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  functionalUtil.typeMCE(browser,content);
  functionalUtil.clickWizardNext(browser);
  fillInTitleAndDescription(browser,title,description);
  fillInTags(browser,tags);
  if (!createElements(browser,binder,page,structure))   return (false);
  browser.click(createSelector(binder,page,structure));
  functionalUtil.clickWizardFinish(browser);
  return (true);
}

Fixed version (ground truth):
/** 
 * @param browser
 * @param content
 * @param title
 * @param description
 * @param tags
 * @return Add a text artefact to a e-portfolio.
 */
public boolean addTextArtefact(Selenium browser,String binder,String page,String structure,String content,String title,String description,String tags){
  if (!createElements(browser,binder,page,structure))   return (false);
  if (!functionalUtil.openSite(browser,OlatSite.HOME))   return (false);
  if (!functionalHomeSiteUtil.openActionByMenuTree(browser,EPortfolioAction.MY_ARTIFACTS))   return (false);
  openEditLink(browser);
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(getAddTextArtefactCss()).append("String_Node_Str");
  browser.click(locatorBuffer.toString());
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  functionalUtil.typeMCE(browser,content);
  functionalUtil.clickWizardNext(browser);
  fillInTitleAndDescription(browser,title,description);
  fillInTags(browser,tags);
  browser.click(createSelector(binder,page,structure));
  functionalUtil.clickWizardFinish(browser);
  return (true);
}
Program: 69956
Project: 69956
Buggy source:
/** 
 * @param browser
 * @param binder
 * @param page
 * @param title
 * @return true if structural element exists otherwise falseChecks if structural element exists.
 */
public boolean structureExists(Selenium browser,String binder,String page,String title){
  StringBuffer selectorBuffer=new StringBuffer();
  if (browser.isElementPresent(selectorBuffer.toString())) {
    return (true);
  }
 else {
    return (false);
  }
}

Fixed version (ground truth):
/** 
 * @param browser
 * @param binder
 * @param page
 * @param title
 * @return true if structural element exists otherwise falseChecks if structural element exists.
 */
public boolean structureExists(Selenium browser,String binder,String page,String title){
  if (!openBinder(browser,binder))   return (false);
  StringBuffer selectorBuffer=new StringBuffer();
  if (browser.isElementPresent(selectorBuffer.toString())) {
    return (true);
  }
 else {
    return (false);
  }
}
Program: 69957
Project: 69957
Buggy source:
/** 
 * @param browser
 * @param title
 * @param description
 * @return true on successFills in the open wizard's title and description fields. 
 */
private boolean fillInTitleAndDescription(Selenium browser,String title,String description){
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(functionalUtil.getWizardCss()).append("String_Node_Str");
  browser.type(locatorBuffer.toString(),title);
  functionalUtil.typeMCE(browser,description);
  functionalUtil.clickWizardNext(browser);
  return (true);
}

Fixed version (ground truth):
/** 
 * @param browser
 * @param title
 * @param description
 * @return true on successFills in the open wizard's title and description fields. 
 */
protected boolean fillInTitleAndDescription(Selenium browser,String title,String description){
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(functionalUtil.getWizardCss()).append("String_Node_Str");
  browser.type(locatorBuffer.toString(),title);
  functionalUtil.typeMCE(browser,description);
  functionalUtil.clickWizardNext(browser);
  return (true);
}
Program: 69958
Project: 69958
Buggy source:
/** 
 * @param browser
 * @param tags
 * @return Fills in the open wizard's tags.
 */
private boolean fillInTags(Selenium browser,String tags){
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(functionalUtil.getWizardCss()).append("String_Node_Str");
  browser.type(locatorBuffer.toString(),tags);
  functionalUtil.clickWizardNext(browser);
  return (true);
}

Fixed version (ground truth):
/** 
 * @param browser
 * @param tags
 * @return Fills in the open wizard's tags.
 */
protected boolean fillInTags(Selenium browser,String tags){
  StringBuffer locatorBuffer=new StringBuffer();
  locatorBuffer.append("String_Node_Str").append(functionalUtil.getWizardCss()).append("String_Node_Str");
  browser.type(locatorBuffer.toString(),tags);
  functionalUtil.clickWizardNext(browser);
  return (true);
}
Program: 69959
Project: 69959
Buggy source:
private UserSession(){
  init();
  CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this,null,ORES_USERSESSION);
  registeredWithBus=true;
  Logger.getLogger(getClass().getName()).debug("String_Node_Str");
}

Fixed version (ground truth):
private UserSession(){
  init();
  CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this,null,ORES_USERSESSION);
  registeredWithBus=true;
}
Program: 69960
Project: 69960
Buggy source:
private String getRedirectToURL(UserSession usess){
  ChiefController cc=(ChiefController)Windows.getWindows(usess).getAttribute("String_Node_Str");
  Window w=cc.getWindow();
  URLBuilder ubu=new URLBuilder("String_Node_Str",w.getInstanceId(),String.valueOf(w.getTimestamp()),null);
  StringOutput sout=new StringOutput(30);
  ubu.buildURI(sout,null,null);
  return WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED + sout.toString();
}

Fixed version (ground truth):
private String getRedirectToURL(UserSession usess){
  ChiefController cc=(ChiefController)Windows.getWindows(usess).getAttribute("String_Node_Str");
  Window w=cc.getWindow();
  URLBuilder ubu=new URLBuilder(WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED,w.getInstanceId(),String.valueOf(w.getTimestamp()),null);
  StringOutput sout=new StringOutput(30);
  ubu.buildURI(sout,null,null);
  return sout.toString();
}
Program: 69963
Project: 69963
Buggy source:
/** 
 * @param browser
 * @return true on successResets portal settings to default.
 */
public boolean resetSettings(Selenium browser){
  log.info("String_Node_Str");
  functionalUtil.openSite(browser,OlatSite.HOME);
  log.info("String_Node_Str");
  if (!openActionByMenuTree(browser,HomeSiteAction.SETTINGS)) {
    return (false);
  }
  log.info("String_Node_Str");
  functionalUtil.openContentTab(browser,SettingsTab.SYSTEM.ordinal());
  log.info("String_Node_Str");
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,GUI_PREFERENCES_VALUE);
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,SYS_PREFERENCES_VALUE);
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,RESUME_VALUE);
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str");
  selectorBuffer.append(getSysprefsButtonsCss());
  selectorBuffer.append("String_Node_Str");
  selectorBuffer.append("String_Node_Str");
  log.info("String_Node_Str");
  browser.click(selectorBuffer.toString());
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  functionalUtil.waitForPageToLoadElement(browser,selectorBuffer.toString());
  return (true);
}

Fixed version (ground truth):
/** 
 * @param browser
 * @return true on successResets portal settings to default.
 */
public boolean resetSettings(Selenium browser){
  log.info("String_Node_Str");
  functionalUtil.openSite(browser,OlatSite.HOME);
  log.info("String_Node_Str");
  if (!openActionByMenuTree(browser,HomeSiteAction.SETTINGS)) {
    return (false);
  }
  log.info("String_Node_Str");
  functionalUtil.openContentTab(browser,SettingsTab.SYSTEM.ordinal());
  log.info("String_Node_Str");
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,GUI_PREFERENCES_VALUE);
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,SYS_PREFERENCES_VALUE);
  functionalUtil.clickCheckbox(browser,CONFIGURATIONS_CSS,RESUME_VALUE);
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str");
  selectorBuffer.append(getSysprefsButtonsCss());
  selectorBuffer.append("String_Node_Str");
  selectorBuffer.append("String_Node_Str");
  log.info("String_Node_Str");
  browser.click(selectorBuffer.toString());
  browser.waitForPageToLoad(functionalUtil.getWaitLimit());
  return (true);
}
Program: 69966
Project: 69966
Buggy source:
@Override public void exportNode(File exportDirectory,ICourse course){
  XStream xstream=new XStream();
  ChecklistManager cm=ChecklistManager.getInstance();
  Checklist checklist=loadOrCreateChecklist(course.getCourseEnvironment().getCoursePropertyManager());
  Checklist copy=cm.copyChecklistInRAM(checklist);
  String exportContent=xstream.toXML(copy);
  ExportUtil.writeContentToFile(getExportFilename(),exportContent,exportDirectory,WebappHelper.getDefaultCharset());
}

Fixed version (ground truth):
@Override public void exportNode(File exportDirectory,ICourse course){
  XStream xstream=XStreamHelper.createXStreamInstance();
  ChecklistManager cm=ChecklistManager.getInstance();
  Checklist checklist=loadOrCreateChecklist(course.getCourseEnvironment().getCoursePropertyManager());
  Checklist copy=cm.copyChecklistInRAM(checklist);
  String exportContent=xstream.toXML(copy);
  ExportUtil.writeContentToFile(getExportFilename(),exportContent,exportDirectory,WebappHelper.getDefaultCharset());
}
Program: 69967
Project: 69967
Buggy source:
@Override public Controller importNode(File importDirectory,ICourse course,boolean unattendedImport,UserRequest ureq,WindowControl wControl){
  CoursePropertyManager cpm=course.getCourseEnvironment().getCoursePropertyManager();
  if (getChecklistKey(cpm) != null)   deleteChecklistKeyConf(cpm);
  File importFile=new File(importDirectory,getExportFilename());
  String importContent=FileUtils.load(importFile,WebappHelper.getDefaultCharset());
  if (importContent == null || importContent.isEmpty()) {
    return null;
  }
  XStream xstream=new XStream();
  Checklist checklist=(Checklist)xstream.fromXML(importContent);
  if (checklist != null) {
    checklist=ChecklistManager.getInstance().copyChecklist(checklist);
    setChecklistKey(cpm,checklist.getKey());
  }
  return null;
}

Fixed version (ground truth):
@Override public Controller importNode(File importDirectory,ICourse course,boolean unattendedImport,UserRequest ureq,WindowControl wControl){
  CoursePropertyManager cpm=course.getCourseEnvironment().getCoursePropertyManager();
  if (getChecklistKey(cpm) != null)   deleteChecklistKeyConf(cpm);
  File importFile=new File(importDirectory,getExportFilename());
  String importContent=FileUtils.load(importFile,WebappHelper.getDefaultCharset());
  if (importContent == null || importContent.isEmpty()) {
    return null;
  }
  XStream xstream=XStreamHelper.createXStreamInstance();
  Checklist checklist=(Checklist)xstream.fromXML(importContent);
  if (checklist != null) {
    checklist=ChecklistManager.getInstance().copyChecklist(checklist);
    setChecklistKey(cpm,checklist.getKey());
  }
  return null;
}
Program: 69968
Project: 69968
Buggy source:
/** 
 * Factory to create a fresh XStream instance. Use this when reading and writing to a configured XML mapping
 */
public static XStream createXStreamInstance(){
  return new XStream();
}

Fixed version (ground truth):
/** 
 * Factory to create a fresh XStream instance. Use this when reading and writing to a configured XML mapping
 */
public static XStream createXStreamInstance(){
  return new EnhancedXStream();
}
Program: 69969
Project: 69969
Buggy source:
@Override public void postExport(CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  super.postExport(envMapper,backwardsCompatible);
  ModuleConfiguration mc=getModuleConfiguration();
  @SuppressWarnings("String_Node_Str") List<Long> groupKeys=(List<Long>)mc.get(COEditController.CONFIG_KEY_EMAILTOGROUP_IDS);
  if (groupKeys != null) {
    String groupNames=envMapper.toOriginalGroupNames(groupKeys);
    mc.set(COEditController.CONFIG_KEY_EMAILTOGROUPS,groupNames);
  }
  @SuppressWarnings("String_Node_Str") List<Long> areaKeys=(List<Long>)mc.get(COEditController.CONFIG_KEY_EMAILTOAREA_IDS);
  if (areaKeys != null) {
    String areaNames=envMapper.toOriginalAreaNames(areaKeys);
    mc.set(COEditController.CONFIG_KEY_EMAILTOAREAS,areaNames);
  }
  if (backwardsCompatible) {
    mc.remove(COEditController.CONFIG_KEY_EMAILTOGROUP_IDS);
    mc.remove(COEditController.CONFIG_KEY_EMAILTOAREA_IDS);
  }
}

Fixed version (ground truth):
@Override public void postExport(CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  super.postExport(envMapper,backwardsCompatible);
  ModuleConfiguration mc=getModuleConfiguration();
  @SuppressWarnings("String_Node_Str") List<Long> groupKeys=(List<Long>)mc.get(COEditController.CONFIG_KEY_EMAILTOGROUP_IDS);
  if (groupKeys != null) {
    String groupNames=envMapper.toGroupNames(groupKeys);
    mc.set(COEditController.CONFIG_KEY_EMAILTOGROUPS,groupNames);
  }
  @SuppressWarnings("String_Node_Str") List<Long> areaKeys=(List<Long>)mc.get(COEditController.CONFIG_KEY_EMAILTOAREA_IDS);
  if (areaKeys != null) {
    String areaNames=envMapper.toAreaNames(areaKeys);
    mc.set(COEditController.CONFIG_KEY_EMAILTOAREAS,areaNames);
  }
  if (backwardsCompatible) {
    mc.remove(COEditController.CONFIG_KEY_EMAILTOGROUP_IDS);
    mc.remove(COEditController.CONFIG_KEY_EMAILTOAREA_IDS);
  }
}
Program: 69970
Project: 69970
Buggy source:
@Override public void postExport(CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  super.postExport(envMapper,backwardsCompatible);
  ModuleConfiguration mc=getModuleConfiguration();
  @SuppressWarnings("String_Node_Str") List<Long> groupKeys=(List<Long>)mc.get(ENCourseNode.CONFIG_GROUP_IDS);
  if (groupKeys != null) {
    String groupNames=envMapper.toOriginalGroupNames(groupKeys);
    mc.set(ENCourseNode.CONFIG_GROUPNAME,groupNames);
  }
  @SuppressWarnings("String_Node_Str") List<Long> areaKeys=(List<Long>)mc.get(ENCourseNode.CONFIG_AREA_IDS);
  if (areaKeys != null) {
    String areaNames=envMapper.toOriginalAreaNames(areaKeys);
    mc.set(ENCourseNode.CONFIG_AREANAME,areaNames);
  }
  if (backwardsCompatible) {
    mc.remove(ENCourseNode.CONFIG_GROUP_IDS);
    mc.remove(ENCourseNode.CONFIG_AREA_IDS);
  }
}

Fixed version (ground truth):
@Override public void postExport(CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  super.postExport(envMapper,backwardsCompatible);
  ModuleConfiguration mc=getModuleConfiguration();
  @SuppressWarnings("String_Node_Str") List<Long> groupKeys=(List<Long>)mc.get(ENCourseNode.CONFIG_GROUP_IDS);
  if (groupKeys != null) {
    String groupNames=envMapper.toGroupNames(groupKeys);
    mc.set(ENCourseNode.CONFIG_GROUPNAME,groupNames);
  }
  @SuppressWarnings("String_Node_Str") List<Long> areaKeys=(List<Long>)mc.get(ENCourseNode.CONFIG_AREA_IDS);
  if (areaKeys != null) {
    String areaNames=envMapper.toAreaNames(areaKeys);
    mc.set(ENCourseNode.CONFIG_AREANAME,areaNames);
  }
  if (backwardsCompatible) {
    mc.remove(ENCourseNode.CONFIG_GROUP_IDS);
    mc.remove(ENCourseNode.CONFIG_AREA_IDS);
  }
}
Program: 69971
Project: 69971
Buggy source:
protected void postExportCondition(Condition condition,CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  if (condition == null)   return;
  boolean easy=StringHelper.containsNonWhitespace(condition.getConditionFromEasyModeConfiguration());
  if (easy) {
    if (condition.getEasyModeGroupAccessIdList() != null || condition.getEasyModeGroupAreaAccessIdList() != null) {
      String groupNames=envMapper.toOriginalGroupNames(condition.getEasyModeGroupAccessIdList());
      condition.setEasyModeGroupAccess(groupNames);
      String areaNames=envMapper.toOriginalAreaNames(condition.getEasyModeGroupAreaAccessIdList());
      condition.setEasyModeGroupAreaAccess(areaNames);
      String condString=condition.getConditionFromEasyModeConfiguration();
      if (backwardsCompatible) {
        condString=convertExpressionKeyToName(condString,envMapper);
      }
      condition.setConditionExpression(condString);
    }
  }
 else   if (condition.isExpertMode() && backwardsCompatible) {
    String expression=condition.getConditionExpression();
    if (StringHelper.containsNonWhitespace(expression)) {
      String processExpression=convertExpressionKeyToName(expression,envMapper);
      if (!expression.equals(processExpression)) {
        condition.setConditionExpression(processExpression);
      }
    }
  }
  if (backwardsCompatible) {
    condition.setEasyModeGroupAreaAccessIds(null);
    condition.setEasyModeGroupAccessIds(null);
    condition.setConditionUpgraded(null);
  }
}

Fixed version (ground truth):
protected void postExportCondition(Condition condition,CourseEnvironmentMapper envMapper,boolean backwardsCompatible){
  if (condition == null)   return;
  boolean easy=StringHelper.containsNonWhitespace(condition.getConditionFromEasyModeConfiguration());
  if (easy) {
    if (condition.getEasyModeGroupAccessIdList() != null || condition.getEasyModeGroupAreaAccessIdList() != null) {
      String groupNames=envMapper.toGroupNames(condition.getEasyModeGroupAccessIdList());
      condition.setEasyModeGroupAccess(groupNames);
      String areaNames=envMapper.toAreaNames(condition.getEasyModeGroupAreaAccessIdList());
      condition.setEasyModeGroupAreaAccess(areaNames);
      String condString=condition.getConditionFromEasyModeConfiguration();
      if (backwardsCompatible) {
        condString=convertExpressionKeyToName(condString,envMapper);
      }
      condition.setConditionExpression(condString);
    }
  }
 else   if (condition.isExpertMode() && backwardsCompatible) {
    String expression=condition.getConditionExpression();
    if (StringHelper.containsNonWhitespace(expression)) {
      String processExpression=convertExpressionKeyToName(expression,envMapper);
      if (!expression.equals(processExpression)) {
        condition.setConditionExpression(processExpression);
      }
    }
  }
  if (backwardsCompatible) {
    condition.setEasyModeGroupAreaAccessIds(null);
    condition.setEasyModeGroupAccessIds(null);
    condition.setConditionUpgraded(null);
  }
}
Program: 69973
Project: 69973
Buggy source:
private boolean upgradeCourseConditions(UpgradeManager upgradeManager,UpgradeHistoryData uhd){
  if (!uhd.getBooleanDataValue(TASK_CONDITIONS)) {
    int counter=0;
    List<RepositoryEntry> entries;
    SearchRepositoryEntryParameters params=new SearchRepositoryEntryParameters();
    params.setRoles(new Roles(true,false,false,false,false,false,false));
    params.addResourceTypes("String_Node_Str");
    do {
      entries=repositoryManager.genericANDQueryWithRolesRestriction(params,counter,REPO_ENTRIES_BATCH_SIZE,true);
      for (      RepositoryEntry entry : entries) {
        ICourse course=CourseFactory.loadCourse(entry.getOlatResource());
        CourseEnvironmentMapper envMapper=getCourseEnvironmentMapper(entry.getOlatResource());
        course.postImport(envMapper);
      }
      counter+=entries.size();
      log.audit("String_Node_Str" + entries.size());
    }
 while (entries.size() == REPO_ENTRIES_BATCH_SIZE);
    uhd.setBooleanDataValue(TASK_CONDITIONS,false);
    upgradeManager.setUpgradesHistory(uhd,VERSION);
  }
  return true;
}

Fixed version (ground truth):
private boolean upgradeCourseConditions(UpgradeManager upgradeManager,UpgradeHistoryData uhd){
  if (!uhd.getBooleanDataValue(TASK_CONDITIONS)) {
    int counter=0;
    List<RepositoryEntry> entries;
    SearchRepositoryEntryParameters params=new SearchRepositoryEntryParameters();
    params.setRoles(new Roles(true,false,false,false,false,false,false));
    params.addResourceTypes("String_Node_Str");
    do {
      entries=repositoryManager.genericANDQueryWithRolesRestriction(params,counter,REPO_ENTRIES_BATCH_SIZE,true);
      for (      RepositoryEntry entry : entries) {
        try {
          ICourse course=CourseFactory.loadCourse(entry.getOlatResource());
          CourseEnvironmentMapper envMapper=getCourseEnvironmentMapper(entry.getOlatResource());
          course.postImport(envMapper);
        }
 catch (        CorruptedCourseException e) {
          log.error("String_Node_Str" + entry.getOlatResource().getResourceableId());
        }
      }
      counter+=entries.size();
      log.audit("String_Node_Str" + entries.size());
    }
 while (entries.size() == REPO_ENTRIES_BATCH_SIZE);
    uhd.setBooleanDataValue(TASK_CONDITIONS,false);
    upgradeManager.setUpgradesHistory(uhd,VERSION);
  }
  return true;
}
Program: 69974
Project: 69974
Buggy source:
@Override public boolean existGroup(String nameOrKey){
  SearchBusinessGroupParams params=new SearchBusinessGroupParams();
  if (StringHelper.isLong(nameOrKey)) {
    params.setKeys(Collections.singletonList(new Long(nameOrKey)));
  }
 else {
    params.setExactName(nameOrKey);
  }
  return businessGroupService.countBusinessGroups(params,courseResource) > 0;
}

Fixed version (ground truth):
@Override public boolean existGroup(String nameOrKey){
  SearchBusinessGroupParams params=new SearchBusinessGroupParams();
  if (StringHelper.isLong(nameOrKey)) {
    params.setGroupKeys(Collections.singletonList(new Long(nameOrKey)));
  }
 else {
    params.setExactName(nameOrKey);
  }
  return businessGroupService.countBusinessGroups(params,courseResource) > 0;
}
Program: 69975
Project: 69975
Buggy source:
private void doEnrollView(UserRequest ureq){
  if (enrolledGroup != null) {
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    enrollVC.contextPut("String_Node_Str",Boolean.FALSE);
    String desc=this.enrolledGroup.getDescription();
    enrollVC.contextPut("String_Node_Str",this.enrolledGroup.getName());
    enrollVC.contextPut("String_Node_Str",(desc == null) ? "String_Node_Str" : this.enrolledGroup.getDescription());
  }
 else   if (waitingListGroup != null) {
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    String desc=this.waitingListGroup.getDescription();
    enrollVC.contextPut("String_Node_Str",this.waitingListGroup.getName());
    enrollVC.contextPut("String_Node_Str",(desc == null) ? "String_Node_Str" : this.waitingListGroup.getDescription());
  }
 else {
    enrollVC.contextPut("String_Node_Str",Boolean.FALSE);
  }
  doEnrollMultipleView(ureq);
}

Fixed version (ground truth):
private void doEnrollView(UserRequest ureq){
  if (enrolledGroup != null) {
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    enrollVC.contextPut("String_Node_Str",Boolean.FALSE);
    enrollVC.contextPut("String_Node_Str",enrolledGroup.getName());
    enrollVC.contextPut("String_Node_Str",(enrolledGroup.getDescription() == null) ? "String_Node_Str" : enrolledGroup.getDescription());
  }
 else   if (waitingListGroup != null) {
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    enrollVC.contextPut("String_Node_Str",Boolean.TRUE);
    String desc=this.waitingListGroup.getDescription();
    enrollVC.contextPut("String_Node_Str",this.waitingListGroup.getName());
    enrollVC.contextPut("String_Node_Str",(desc == null) ? "String_Node_Str" : this.waitingListGroup.getDescription());
  }
 else {
    enrollVC.contextPut("String_Node_Str",Boolean.FALSE);
  }
  doEnrollMultipleView(ureq);
}
Program: 69977
Project: 69977
Buggy source:
private void registerGroupChangedEvents(List<Long> enrollableGroupNames,List<Long> enrollableAreaNames,Identity identity){
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupNames,enrollableAreaNames,courseGroupManager);
  for (  BusinessGroup group : groups) {
    CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this,identity,group);
  }
}

Fixed version (ground truth):
private void registerGroupChangedEvents(List<Long> enrollableGroupKeys,List<Long> enrollableAreaKeys,Identity identity){
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  for (  BusinessGroup group : groups) {
    CoordinatorManager.getInstance().getCoordinator().getEventBus().registerFor(this,identity,group);
  }
}
Program: 69978
Project: 69978
Buggy source:
private void deregisterGroupChangedEvents(List<Long> enrollableGroupNames,List<Long> enrollableAreaNames){
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupNames,enrollableAreaNames,courseGroupManager);
  for (  BusinessGroup group : groups) {
    CoordinatorManager.getInstance().getCoordinator().getEventBus().deregisterFor(this,group);
  }
}

Fixed version (ground truth):
private void deregisterGroupChangedEvents(List<Long> enrollableGroupKeys,List<Long> enrollableAreaKeys){
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  for (  BusinessGroup group : groups) {
    CoordinatorManager.getInstance().getCoordinator().getEventBus().deregisterFor(this,group);
  }
}
Program: 69979
Project: 69979
Buggy source:
/** 
 * @param identity
 * @param groupNames
 * @return BusinessGroup in which the identity is enrolled, null if identityis nowhere enrolled.
 */
protected BusinessGroup getBusinessGroupWhereEnrolled(Identity identity,List<Long> groupKeys,List<Long> areaKeys,CourseGroupManager cgm){
  if (groupKeys != null && !groupKeys.isEmpty()) {
    SearchBusinessGroupParams params=new SearchBusinessGroupParams();
    params.setAttendee(true);
    params.setIdentity(identity);
    params.setKeys(groupKeys);
    List<BusinessGroup> groups=businessGroupService.findBusinessGroups(params,cgm.getCourseResource(),0,1);
    if (groups.size() > 0) {
      return groups.get(0);
    }
  }
  if (areaKeys != null && !areaKeys.isEmpty()) {
    List<BGArea> areas=areaManager.loadAreas(areaKeys);
    for (    BGArea area : areas) {
      List<BusinessGroup> groups=areaManager.findBusinessGroupsOfArea(area);
      if (groups.size() > 0) {
        return groups.get(0);
      }
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param identity
 * @param groupNames
 * @return BusinessGroup in which the identity is enrolled, null if identityis nowhere enrolled.
 */
protected BusinessGroup getBusinessGroupWhereEnrolled(Identity identity,List<Long> groupKeys,List<Long> areaKeys,OLATResource courseResource){
  if (groupKeys != null && !groupKeys.isEmpty()) {
    SearchBusinessGroupParams params=new SearchBusinessGroupParams();
    params.setAttendee(true);
    params.setIdentity(identity);
    params.setGroupKeys(groupKeys);
    List<BusinessGroup> groups=businessGroupService.findBusinessGroups(params,courseResource,0,1);
    if (groups.size() > 0) {
      return groups.get(0);
    }
  }
  if (areaKeys != null && !areaKeys.isEmpty()) {
    List<BusinessGroup> groups=areaManager.findBusinessGroupsOfAreaAttendedBy(identity,areaKeys,courseResource);
    if (groups.size() > 0) {
      return groups.get(0);
    }
  }
  return null;
}
Program: 69981
Project: 69981
Buggy source:
/** 
 * Searches for all business groups that are associated with the given business group area where the given identity is in the participants group
 * @param identity
 * @param areaName
 * @param context
 * @return A list of business groups
 */
public List<BusinessGroup> findBusinessGroupsOfAreaAttendedBy(Identity identity,String areaName,OLATResource resource);

Fixed version (ground truth):
/** 
 * Searches for all business groups that are associated with the given business group area where the given identity is in the participants group
 * @param identity
 * @param areaName
 * @param context
 * @return A list of business groups
 */
public List<BusinessGroup> findBusinessGroupsOfAreaAttendedBy(Identity identity,List<Long> areaKeys,OLATResource resource);
Program: 69982
Project: 69982
Buggy source:
/** 
 * @see org.olat.group.area.BGAreaManager#findBusinessGroupsOfAreaAttendedBy(org.olat.core.id.Identity,java.lang.String,org.olat.group.context.BGContext)
 */
public List<BusinessGroup> findBusinessGroupsOfAreaAttendedBy(Identity identity,String areaName,OLATResource resource){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(BusinessGroupImpl.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");
  if (StringHelper.containsNonWhitespace(areaName)) {
    sb.append("String_Node_Str");
  }
  if (resource != null) {
    sb.append("String_Node_Str");
  }
  TypedQuery<BusinessGroup> query=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),BusinessGroup.class).setParameter("String_Node_Str",identity.getKey());
  if (StringHelper.containsNonWhitespace(areaName)) {
    query.setParameter("String_Node_Str",areaName);
  }
  if (resource != null) {
    query.setParameter("String_Node_Str",resource.getKey());
  }
  List<BusinessGroup> groups=query.getResultList();
  return groups;
}

Fixed version (ground truth):
/** 
 * @see org.olat.group.area.BGAreaManager#findBusinessGroupsOfAreaAttendedBy(org.olat.core.id.Identity,java.lang.String,org.olat.group.context.BGContext)
 */
@Override public List<BusinessGroup> findBusinessGroupsOfAreaAttendedBy(Identity identity,List<Long> areaKeys,OLATResource resource){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(BusinessGroupImpl.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");
  if (areaKeys != null && !areaKeys.isEmpty()) {
    sb.append("String_Node_Str");
  }
  if (resource != null) {
    sb.append("String_Node_Str");
  }
  TypedQuery<BusinessGroup> query=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),BusinessGroup.class).setParameter("String_Node_Str",identity.getKey());
  if (areaKeys != null && !areaKeys.isEmpty()) {
    query.setParameter("String_Node_Str",areaKeys);
  }
  if (resource != null) {
    query.setParameter("String_Node_Str",resource.getKey());
  }
  List<BusinessGroup> groups=query.getResultList();
  return groups;
}
Program: 69983
Project: 69983
Buggy source:
@Override public List<BusinessGroup> findBusinessGroupsOfAreaKeys(List<Long> areaKeys){
  if (areaKeys == null || areaKeys.isEmpty())   return Collections.emptyList();
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(BGtoAreaRelationImpl.class.getName()).append("String_Node_Str").append("String_Node_Str");
  List<BusinessGroup> result=DBFactory.getInstance().getCurrentEntityManager().createQuery(sb.toString(),BusinessGroup.class).setParameter("String_Node_Str",areaKeys).getResultList();
  return result;
}

Fixed version (ground truth):
@Override public List<BusinessGroup> findBusinessGroupsOfAreaKeys(List<Long> areaKeys){
  if (areaKeys == null || areaKeys.isEmpty())   return Collections.emptyList();
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(BGtoAreaRelationImpl.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");
  List<BusinessGroup> result=DBFactory.getInstance().getCurrentEntityManager().createQuery(sb.toString(),BusinessGroup.class).setParameter("String_Node_Str",areaKeys).getResultList();
  return result;
}
Program: 69986
Project: 69986
Buggy source:
/** 
 * Check if an identity is in any security-group.
 * @param identity
 * @return true: Found identity in any security-group of this table model.
 */
private boolean isEnrolledInAnyGroup(Identity identity){
  BusinessGroup businessGroup;
  for (Iterator iter=objects.iterator(); iter.hasNext(); ) {
    businessGroup=(BusinessGroup)iter.next();
    if (isEnrolledIn(businessGroup,identity)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check if an identity is in any security-group.
 * @param identity
 * @return true: Found identity in any security-group of this table model.
 */
private boolean isEnrolledInAnyGroup(Identity identity){
  for (  BusinessGroup businessGroup : objects) {
    if (isEnrolledIn(businessGroup,identity)) {
      return true;
    }
  }
  return false;
}
Program: 69987
Project: 69987
Buggy source:
/** 
 * @param groups List of business groups
 * @param members List containing the number of participants for each group.The index of the list corresponds with the index of the group list
 * @param trans
 */
public BusinessGroupTableModelWithMaxSize(List groups,List members,Translator trans,Identity identity,boolean cancelEnrollEnabled){
  super(groups);
  this.members=members;
  this.trans=trans;
  this.identity=identity;
  securityManager=BaseSecurityManager.getInstance();
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  this.cancelEnrollEnabled=cancelEnrollEnabled;
}

Fixed version (ground truth):
/** 
 * @param groups List of business groups
 * @param members List containing the number of participants for each group.The index of the list corresponds with the index of the group list
 * @param trans
 */
public BusinessGroupTableModelWithMaxSize(List<BusinessGroup> groups,List<Integer> members,Translator trans,Identity identity,boolean cancelEnrollEnabled){
  super(groups);
  this.members=members;
  this.trans=trans;
  this.identity=identity;
  securityManager=BaseSecurityManager.getInstance();
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  this.cancelEnrollEnabled=cancelEnrollEnabled;
}
Program: 69988
Project: 69988
Buggy source:
/** 
 * @param owned
 */
public void setEntries(List owned){
  this.objects=owned;
}

Fixed version (ground truth):
/** 
 * @param owned
 */
public void setEntries(List<BusinessGroup> owned){
  this.objects=owned;
}
Program: 69992
Project: 69992
Buggy source:
private void init(UserRequest ureq){
  startPage=createVelocityContainer("String_Node_Str");
  isAssessable=config.getBooleanSafe(ScormEditController.CONFIG_ISASSESSABLE,true);
  if (!maxAttemptsReached()) {
    chooseScormRunMode=new ChooseScormRunModeForm(ureq,getWindowControl(),!isAssessable);
    listenTo(chooseScormRunMode);
    startPage.put("String_Node_Str",chooseScormRunMode.getInitialComponent());
    startPage.contextPut("String_Node_Str",Boolean.FALSE);
  }
 else {
    startPage.contextPut("String_Node_Str",Boolean.TRUE);
  }
  main=new Panel("String_Node_Str");
  doStartPage();
  putInitialPanel(main);
  boolean doSkip=config.getBooleanSafe(ScormEditController.CONFIG_SKIPLAUNCHPAGE,true);
  if (isAssessable && doSkip && !maxAttemptsReached()) {
    doLaunch(ureq,true);
    getWindowControl().getWindowBackOffice().addCycleListener(this);
  }
}

Fixed version (ground truth):
private void init(UserRequest ureq){
  startPage=createVelocityContainer("String_Node_Str");
  isAssessable=config.getBooleanSafe(ScormEditController.CONFIG_ISASSESSABLE,true);
  if (!maxAttemptsReached()) {
    chooseScormRunMode=new ChooseScormRunModeForm(ureq,getWindowControl(),!isAssessable);
    listenTo(chooseScormRunMode);
    startPage.put("String_Node_Str",chooseScormRunMode.getInitialComponent());
    startPage.contextPut("String_Node_Str",Boolean.FALSE);
  }
 else {
    startPage.contextPut("String_Node_Str",Boolean.TRUE);
  }
  main=new Panel("String_Node_Str");
  doStartPage();
  putInitialPanel(main);
  boolean doSkip=config.getBooleanSafe(ScormEditController.CONFIG_SKIPLAUNCHPAGE,true);
  if (doSkip && !maxAttemptsReached()) {
    doLaunch(ureq,true);
    getWindowControl().getWindowBackOffice().addCycleListener(this);
  }
}
Program: 69994
Project: 69994
Buggy source:
/** 
 * FIXME:fj: change className to class
 * @see org.olat.core.gui.control.generic.dtabs.DTabs#activateStatic(org.olat.core.gui.UserRequest,java.lang.String,java.lang.String)
 */
public void activateStatic(UserRequest ureq,String className,String viewIdentifier,List<ContextEntry> entries){
  for (Iterator it_sites=sites.iterator(); it_sites.hasNext(); ) {
    SiteInstance site=(SiteInstance)it_sites.next();
    String cName=site.getClass().getName();
    if (cName.equals(className)) {
      activateSite(site,ureq,viewIdentifier,entries);
      return;
    }
  }
}

Fixed version (ground truth):
/** 
 * FIXME:fj: change className to class
 * @see org.olat.core.gui.control.generic.dtabs.DTabs#activateStatic(org.olat.core.gui.UserRequest,java.lang.String,java.lang.String)
 */
public void activateStatic(UserRequest ureq,String className,String viewIdentifier,List<ContextEntry> entries){
  for (Iterator<SiteInstance> it_sites=sites.iterator(); it_sites.hasNext(); ) {
    SiteInstance site=it_sites.next();
    String cName=site.getClass().getName();
    if (cName.equals(className)) {
      activateSite(site,ureq,viewIdentifier,entries);
      return;
    }
  }
}
Program: 69996
Project: 69996
Buggy source:
public void execute(){
  PropertyManager pm=PropertyManager.getInstance();
  String props=XStreamHelper.toXML(toUpdate);
  Property imProperty=PropertyManager.getInstance().findProperty(identity,null,null,null,ImPreferences.USER_PROPERTY_KEY);
  if (imProperty == null) {
    throw new AssertException("String_Node_Str" + identity.getName() + "String_Node_Str");
  }
  imProperty.setTextValue(props);
  pm.updateProperty(imProperty);
}

Fixed version (ground truth):
public void execute(){
  PropertyManager.getInstance().deleteProperty(prefs.getDbProperty());
}
Program: 69997
Project: 69997
Buggy source:
/** 
 * @see java.lang.Runnable#run()
 */
public void run(){
  double j=Math.random() * 20;
  int z=Long.valueOf((Math.round(j))).intValue();
  try {
    Thread.sleep(z);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  ImPrefsManager mgr=ImPrefsManager.getInstance();
  ImPreferences prefs=mgr.loadOrCreatePropertiesFor(ident);
  prefs.setAwarenessVisible(false);
  prefs.setOnlineTimeVisible(false);
  prefs.setRosterDefaultStatus(Presence.Mode.away.toString());
  prefs.setVisibleToOthers(false);
  mgr.updatePropertiesFor(ident,prefs);
  double rand=Math.random() * 3;
  int i=Long.valueOf((Math.round(rand))).intValue();
  if (i == 1) {
    PropertyManager.getInstance().deleteProperty(prefs.getDbProperty());
    System.out.println("String_Node_Str" + ident.getName());
  }
  DBFactory.getInstance().closeSession();
  System.out.println("String_Node_Str" + ident.getName());
}

Fixed version (ground truth):
/** 
 * @see java.lang.Runnable#run()
 */
public void run(){
  double j=Math.random() * 20;
  int z=Long.valueOf((Math.round(j))).intValue();
  try {
    Thread.sleep(z);
  }
 catch (  InterruptedException e) {
    log.error("String_Node_Str",e);
  }
  ImPrefsManager mgr=ImPrefsManager.getInstance();
  ImPreferences prefs=mgr.loadOrCreatePropertiesFor(ident);
  prefs.setAwarenessVisible(false);
  prefs.setOnlineTimeVisible(false);
  prefs.setRosterDefaultStatus(Presence.Mode.away.toString());
  prefs.setVisibleToOthers(false);
  mgr.updatePropertiesFor(ident,prefs);
  double rand=Math.random() * 3;
  int i=Long.valueOf((Math.round(rand))).intValue();
  if (i == 1) {
    mgr.deleteProperties(ident,prefs);
    System.out.println("String_Node_Str" + ident.getName());
  }
  DBFactory.getInstance().commitAndCloseSession();
  System.out.println("String_Node_Str" + ident.getName());
}
Program: 69998
Project: 69998
Buggy source:
@Test public void testPrefs(){
  List<String> usernames=new ArrayList<String>();
  List<Identity> identities=new ArrayList<Identity>();
  usernames.add(testUserA);
  usernames.add(testUserB);
  usernames.add(testUserC);
  usernames.add(testUserD);
  for (Iterator<String> iterator=usernames.iterator(); iterator.hasNext(); ) {
    String name=iterator.next();
    Identity ident=securityManager.findIdentityByName(name);
    assertNotNull(ident);
    identities.add(ident);
  }
  long start=System.currentTimeMillis();
  int runs=0;
  while (runs < 100) {
    double rand=Math.random() * 3;
    int i=Long.valueOf((Math.round(rand))).intValue();
    ImPrefsManager mgr=ImPrefsManager.getInstance();
    Identity ident=identities.get(i);
    ImPreferences prefs=mgr.loadOrCreatePropertiesFor(ident);
    assertNotNull(prefs);
    assertNotNull(prefs.getDbProperty());
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e1) {
      log.error("String_Node_Str",e1);
    }
    for (Iterator<Identity> iterator=identities.iterator(); iterator.hasNext(); ) {
      ident=iterator.next();
      TaskExecutorManager.getInstance().runTask(new IMPrefsTask(ident));
      try {
        Thread.sleep(20);
      }
 catch (      InterruptedException e) {
        log.error("String_Node_Str",e);
      }
    }
    runs++;
  }
  long stop=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (stop - start) / 1000);
}

Fixed version (ground truth):
@Test public void testPrefs(){
  Identity id1=JunitTestHelper.createAndPersistIdentityAsUser("String_Node_Str" + UUID.randomUUID().toString());
  Identity id2=JunitTestHelper.createAndPersistIdentityAsUser("String_Node_Str" + UUID.randomUUID().toString());
  Identity id3=JunitTestHelper.createAndPersistIdentityAsUser("String_Node_Str" + UUID.randomUUID().toString());
  Identity id4=JunitTestHelper.createAndPersistIdentityAsUser("String_Node_Str" + UUID.randomUUID().toString());
  List<Identity> identities=new ArrayList<Identity>();
  identities.add(id1);
  identities.add(id2);
  identities.add(id3);
  identities.add(id4);
  dbInstance.commitAndCloseSession();
  long start=System.currentTimeMillis();
  for (int runs=0; runs < 100; runs++) {
    double rand=Math.random() * 3.0d;
    int i=Long.valueOf((Math.round(rand))).intValue();
    Identity randomIdentity=identities.get(i);
    ImPreferences prefs=imPrefsManager.loadOrCreatePropertiesFor(randomIdentity);
    assertNotNull(prefs);
    assertNotNull(prefs.getDbProperty());
    try {
      Thread.sleep(100);
    }
 catch (    InterruptedException e1) {
      log.error("String_Node_Str",e1);
    }
    for (    Identity identity : identities) {
      TaskExecutorManager.getInstance().runTask(new IMPrefsTask(identity));
      try {
        Thread.sleep(20);
      }
 catch (      InterruptedException e) {
        log.error("String_Node_Str",e);
      }
    }
  }
  long stop=System.currentTimeMillis();
  System.out.println("String_Node_Str" + (stop - start) / 1000);
}
Program: 69999
Project: 69999
Buggy source:
/** 
 * TearDown is called after each test
 */
@After public void tearDown(){
  try {
    DBFactory.getInstance().closeSession();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
@After public void tearDown(){
  try {
    DBFactory.getInstance().closeSession();
  }
 catch (  Exception e) {
    log.error("String_Node_Str" + e);
  }
}
Program: 70002
Project: 70002
Buggy source:
@Override protected boolean validateFormLogic(UserRequest ureq){
  boolean allOk=true;
  String whiteList=domainListElement.getValue();
  domainListElement.clearError();
  if (StringHelper.containsNonWhitespace(whiteList)) {
    List<String> normalizedList=registrationModule.getDomainList(whiteList);
    List<String> errors=registrationManager.validateWhiteList(normalizedList);
    if (!errors.isEmpty()) {
      StringBuilder sb=new StringBuilder();
      for (      String error : errors) {
        if (sb.length() > 0)         sb.append("String_Node_Str");
        sb.append(error);
      }
      domainListElement.setErrorKey("String_Node_Str",new String[]{sb.toString()});
      allOk&=false;
    }
  }
  if (staticPropElement.isSelected(0)) {
    if (propertyElement.isOneSelected()) {
      String propertyName=propertyElement.getSelectedKey();
      String value=propertyValueElement.getValue();
      UserPropertyHandler handler=userPropertiesConfig.getPropertyHandler(propertyName);
      ValidationError validationError=new ValidationError();
      boolean valid=handler.isValidValue(value,validationError,getLocale());
      if (!valid) {
        String errorKey=validationError.getErrorKey();
        if (errorKey == null) {
          propertyValueElement.setErrorKey("String_Node_Str",null);
        }
 else {
          propertyValueElement.setErrorKey(errorKey,null);
        }
      }
    }
  }
  return allOk && super.validateFormLogic(ureq);
}

Fixed version (ground truth):
@Override protected boolean validateFormLogic(UserRequest ureq){
  boolean allOk=true;
  String whiteList=domainListElement.getValue();
  domainListElement.clearError();
  if (StringHelper.containsNonWhitespace(whiteList)) {
    List<String> normalizedList=registrationModule.getDomainList(whiteList);
    List<String> errors=registrationManager.validateWhiteList(normalizedList);
    if (!errors.isEmpty()) {
      StringBuilder sb=new StringBuilder();
      for (      String error : errors) {
        if (sb.length() > 0)         sb.append("String_Node_Str");
        sb.append(error);
      }
      domainListElement.setErrorKey("String_Node_Str",new String[]{sb.toString()});
      allOk&=false;
    }
  }
  if (staticPropElement.isSelected(0)) {
    if (propertyElement.isOneSelected()) {
      String propertyName=propertyElement.getSelectedKey();
      String value=propertyValueElement.getValue();
      UserPropertyHandler handler=userPropertiesConfig.getPropertyHandler(propertyName);
      ValidationError validationError=new ValidationError();
      boolean valid=handler.isValidValue(value,validationError,getLocale());
      if (!valid) {
        propertyValueElement.setErrorKey("String_Node_Str",null);
        allOk&=false;
      }
    }
  }
  return allOk && super.validateFormLogic(ureq);
}