Program: 69550
Project: 69550
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  Boolean ownerSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOOWNERS);
  Boolean coacheSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL) || config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE) || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA) != null;
  setFormTitle("String_Node_Str",null);
  setFormContextHelp("String_Node_Str","String_Node_Str","String_Node_Str");
  recipentsContainer=FormLayoutContainer.createHorizontalFormLayout("String_Node_Str",getTranslator());
  formLayout.add(recipentsContainer);
  wantEmail=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  wantEmail.addActionListener(FormEvent.ONCLICK);
  eList=(List<String>)config.get(COEditController.CONFIG_KEY_EMAILTOADRESSES);
  String emailToAdresses="String_Node_Str";
  if (eList != null) {
    emailToAdresses=StringHelper.formatIdentitesAsEmailToString(eList,"String_Node_Str");
    wantEmail.select("String_Node_Str",eList.size() > 0);
  }
  teArElEmailToAdresses=uifactory.addTextAreaElement("String_Node_Str","String_Node_Str",-1,3,60,true,emailToAdresses,formLayout);
  teArElEmailToAdresses.setMandatory(true);
  wantOwners=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (ownerSelection != null) {
    wantOwners.select("String_Node_Str",ownerSelection.booleanValue());
  }
  wantOwners.addActionListener(FormEvent.ONCLICK);
  wantCoaches=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (coacheSelection != null && coacheSelection)   wantCoaches.select("String_Node_Str",true);
  wantCoaches.addActionListener(FormEvent.ONCLICK);
  coachesChoice=uifactory.addRadiosVertical("String_Node_Str",null,formLayout,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")});
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL))   coachesChoice.select("String_Node_Str",true);
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE))   coachesChoice.select("String_Node_Str",true);
  if (config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA) != null)   coachesChoice.select("String_Node_Str",true);
  coachesChoice.addActionListener(FormEvent.ONCLICK);
  coachesChoice.setVisible(false);
  String groupCoachesInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> groupCoachesKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP_ID);
  if (groupCoachesKeys == null) {
    groupCoachesInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP);
    groupCoachesKeys=businessGroupService.toGroupKeys(groupCoachesInitVal,cev.getCourseGroupManager().getCourseEntry());
  }
  groupCoachesInitVal=getGroupNames(groupCoachesKeys);
  easyGroupCoachSelectionList=uifactory.addStaticTextElement("String_Node_Str","String_Node_Str",groupCoachesInitVal,formLayout);
  easyGroupCoachSelectionList.setUserObject(groupCoachesKeys);
  easyGroupCoachSelectionList.setVisible(false);
  chooseGroupCoachesLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseGroupCoachesLink.setVisible(false);
  String areaCoachesInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> areaCoachesKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA_IDS);
  if (areaCoachesKeys == null) {
    areaCoachesInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA);
    areaCoachesKeys=areaManager.toAreaKeys(areaCoachesInitVal,cev.getCourseGroupManager().getCourseResource());
  }
  areaCoachesInitVal=getAreaNames(areaCoachesKeys);
  easyAreaCoachSelectionList=uifactory.addStaticTextElement("String_Node_Str","String_Node_Str",areaCoachesInitVal,formLayout);
  easyAreaCoachSelectionList.setUserObject(areaCoachesKeys);
  easyAreaCoachSelectionList.setVisible(false);
  chooseAreasCoachesLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  Boolean particiapntSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL) || config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE) || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA) != null;
  wantParticipants=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (particiapntSelection != null && particiapntSelection)   wantParticipants.select("String_Node_Str",true);
  wantParticipants.addActionListener(FormEvent.ONCLICK);
  participantsChoice=uifactory.addRadiosVertical("String_Node_Str",null,formLayout,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")});
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL))   participantsChoice.select("String_Node_Str",true);
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE))   participantsChoice.select("String_Node_Str",true);
  if (config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA) != null)   participantsChoice.select("String_Node_Str",true);
  participantsChoice.addActionListener(FormEvent.ONCLICK);
  participantsChoice.setVisible(false);
  String groupParticipantsInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> groupParticipantsKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP_ID);
  if (groupParticipantsKeys == null) {
    groupParticipantsInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP);
    groupParticipantsKeys=businessGroupService.toGroupKeys(groupParticipantsInitVal,cev.getCourseGroupManager().getCourseEntry());
  }
  groupParticipantsInitVal=getGroupNames(groupParticipantsKeys);
  easyGroupParticipantsSelectionList=uifactory.addStaticTextElement("String_Node_Str","String_Node_Str",groupParticipantsInitVal,formLayout);
  easyGroupParticipantsSelectionList.setUserObject(groupParticipantsKeys);
  easyGroupParticipantsSelectionList.setVisible(false);
  chooseGroupParticipantsLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseGroupParticipantsLink.setVisible(false);
  String areaParticipantsInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> areaParticipantsKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA_IDS);
  if (areaParticipantsKeys == null) {
    areaParticipantsInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA);
    areaParticipantsKeys=areaManager.toAreaKeys(areaParticipantsInitVal,cev.getCourseGroupManager().getCourseResource());
  }
  areaParticipantsInitVal=getAreaNames(areaParticipantsKeys);
  easyAreaParticipantsSelectionList=uifactory.addStaticTextElement("String_Node_Str","String_Node_Str",areaParticipantsInitVal,formLayout);
  easyAreaParticipantsSelectionList.setUserObject(areaParticipantsKeys);
  easyAreaParticipantsSelectionList.setVisible(false);
  chooseAreasParticipantsLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseAreasParticipantsLink.setVisible(false);
  coachesAndPartips=FormLayoutContainer.createHorizontalFormLayout("String_Node_Str",getTranslator());
  formLayout.add(coachesAndPartips);
  groupsAndAreasSubContainer=FormLayoutContainer.createHorizontalFormLayout("String_Node_Str",getTranslator());
  formLayout.add(groupsAndAreasSubContainer);
  uifactory.addSpacerElement("String_Node_Str",formLayout,false);
  String mS=(String)config.get(COEditController.CONFIG_KEY_MSUBJECT_DEFAULT);
  String mSubject=(mS != null) ? mS : "String_Node_Str";
  teElSubject=uifactory.addTextElement("String_Node_Str","String_Node_Str",255,mSubject,formLayout);
  String mB=(String)config.get(COEditController.CONFIG_KEY_MBODY_DEFAULT);
  String mBody=(mB != null) ? mB : "String_Node_Str";
  teArElBody=uifactory.addTextAreaElement("String_Node_Str","String_Node_Str",10000,8,60,true,mBody,formLayout);
  subm=uifactory.addFormSubmitButton("String_Node_Str",formLayout);
  update();
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  Boolean ownerSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOOWNERS);
  Boolean coacheSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL) || config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE) || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA) != null;
  setFormTitle("String_Node_Str",null);
  setFormContextHelp("String_Node_Str","String_Node_Str","String_Node_Str");
  recipentsContainer=FormLayoutContainer.createHorizontalFormLayout("String_Node_Str",getTranslator());
  formLayout.add(recipentsContainer);
  wantEmail=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  wantEmail.addActionListener(FormEvent.ONCLICK);
  eList=(List<String>)config.get(COEditController.CONFIG_KEY_EMAILTOADRESSES);
  String emailToAdresses="String_Node_Str";
  if (eList != null) {
    emailToAdresses=StringHelper.formatIdentitesAsEmailToString(eList,"String_Node_Str");
    wantEmail.select("String_Node_Str",eList.size() > 0);
  }
  teArElEmailToAdresses=uifactory.addTextAreaElement("String_Node_Str","String_Node_Str",-1,3,60,true,emailToAdresses,formLayout);
  teArElEmailToAdresses.setMandatory(true);
  wantOwners=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (ownerSelection != null) {
    wantOwners.select("String_Node_Str",ownerSelection.booleanValue());
  }
  wantOwners.addActionListener(FormEvent.ONCLICK);
  wantCoaches=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (coacheSelection != null && coacheSelection)   wantCoaches.select("String_Node_Str",true);
  wantCoaches.addActionListener(FormEvent.ONCLICK);
  coachesChoice=uifactory.addRadiosVertical("String_Node_Str",null,formLayout,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")});
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_ALL))   coachesChoice.select("String_Node_Str",true);
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOCOACHES_COURSE))   coachesChoice.select("String_Node_Str",true);
  if (config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA) != null)   coachesChoice.select("String_Node_Str",true);
  coachesChoice.addActionListener(FormEvent.ONCLICK);
  coachesChoice.setVisible(false);
  chooseGroupCoachesLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseGroupCoachesLink.setIconLeftCSS("String_Node_Str");
  chooseGroupCoachesLink.setVisible(false);
  chooseGroupCoachesLink.setLabel("String_Node_Str",null);
  chooseGroupCoachesLink.setElementCssClass("String_Node_Str");
  String groupCoachesInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> groupCoachesKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP_ID);
  if (groupCoachesKeys == null) {
    groupCoachesInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_GROUP);
    groupCoachesKeys=businessGroupService.toGroupKeys(groupCoachesInitVal,cev.getCourseGroupManager().getCourseEntry());
  }
  groupCoachesInitVal=getGroupNames(groupCoachesKeys);
  easyGroupCoachSelectionList=uifactory.addStaticTextElement("String_Node_Str",null,groupCoachesInitVal,formLayout);
  easyGroupCoachSelectionList.setUserObject(groupCoachesKeys);
  easyGroupCoachSelectionList.setVisible(false);
  easyGroupCoachSelectionList.setElementCssClass("String_Node_Str");
  chooseAreasCoachesLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseAreasCoachesLink.setIconLeftCSS("String_Node_Str");
  chooseAreasCoachesLink.setLabel("String_Node_Str",null);
  chooseAreasCoachesLink.setElementCssClass("String_Node_Str");
  String areaCoachesInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> areaCoachesKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA_IDS);
  if (areaCoachesKeys == null) {
    areaCoachesInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOCOACHES_AREA);
    areaCoachesKeys=areaManager.toAreaKeys(areaCoachesInitVal,cev.getCourseGroupManager().getCourseResource());
  }
  areaCoachesInitVal=getAreaNames(areaCoachesKeys);
  easyAreaCoachSelectionList=uifactory.addStaticTextElement("String_Node_Str",null,areaCoachesInitVal,formLayout);
  easyAreaCoachSelectionList.setUserObject(areaCoachesKeys);
  easyAreaCoachSelectionList.setVisible(false);
  easyAreaCoachSelectionList.setElementCssClass("String_Node_Str");
  Boolean particiapntSelection=config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL) || config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE) || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA) != null;
  wantParticipants=uifactory.addCheckboxesHorizontal("String_Node_Str","String_Node_Str",formLayout,new String[]{"String_Node_Str"},new String[]{null});
  if (particiapntSelection != null && particiapntSelection)   wantParticipants.select("String_Node_Str",true);
  wantParticipants.addActionListener(FormEvent.ONCLICK);
  participantsChoice=uifactory.addRadiosVertical("String_Node_Str",null,formLayout,new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new String[]{translate("String_Node_Str"),translate("String_Node_Str"),translate("String_Node_Str")});
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_ALL))   participantsChoice.select("String_Node_Str",true);
  if (config.getBooleanSafe(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_COURSE))   participantsChoice.select("String_Node_Str",true);
  if (config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP) != null || config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA) != null)   participantsChoice.select("String_Node_Str",true);
  participantsChoice.addActionListener(FormEvent.ONCLICK);
  participantsChoice.setVisible(false);
  chooseGroupParticipantsLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseGroupParticipantsLink.setIconLeftCSS("String_Node_Str");
  chooseGroupParticipantsLink.setVisible(false);
  chooseGroupParticipantsLink.setLabel("String_Node_Str",null);
  chooseGroupParticipantsLink.setElementCssClass("String_Node_Str");
  String groupParticipantsInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> groupParticipantsKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP_ID);
  if (groupParticipantsKeys == null) {
    groupParticipantsInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_GROUP);
    groupParticipantsKeys=businessGroupService.toGroupKeys(groupParticipantsInitVal,cev.getCourseGroupManager().getCourseEntry());
  }
  groupParticipantsInitVal=getGroupNames(groupParticipantsKeys);
  easyGroupParticipantsSelectionList=uifactory.addStaticTextElement("String_Node_Str",null,groupParticipantsInitVal,formLayout);
  easyGroupParticipantsSelectionList.setUserObject(groupParticipantsKeys);
  easyGroupParticipantsSelectionList.setVisible(false);
  easyGroupParticipantsSelectionList.setElementCssClass("String_Node_Str");
  chooseAreasParticipantsLink=uifactory.addFormLink("String_Node_Str",formLayout,"String_Node_Str");
  chooseAreasParticipantsLink.setIconLeftCSS("String_Node_Str");
  chooseAreasParticipantsLink.setVisible(false);
  chooseAreasParticipantsLink.setLabel("String_Node_Str",null);
  chooseAreasParticipantsLink.setElementCssClass("String_Node_Str");
  String areaParticipantsInitVal;
  @SuppressWarnings("String_Node_Str") List<Long> areaParticipantsKeys=(List<Long>)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA_ID);
  if (areaParticipantsKeys == null) {
    areaParticipantsInitVal=(String)config.get(COEditController.CONFIG_KEY_EMAILTOPARTICIPANTS_AREA);
    areaParticipantsKeys=areaManager.toAreaKeys(areaParticipantsInitVal,cev.getCourseGroupManager().getCourseResource());
  }
  areaParticipantsInitVal=getAreaNames(areaParticipantsKeys);
  easyAreaParticipantsSelectionList=uifactory.addStaticTextElement("String_Node_Str",null,areaParticipantsInitVal,formLayout);
  easyAreaParticipantsSelectionList.setUserObject(areaParticipantsKeys);
  easyAreaParticipantsSelectionList.setVisible(false);
  easyAreaParticipantsSelectionList.setElementCssClass("String_Node_Str");
  uifactory.addSpacerElement("String_Node_Str",formLayout,false);
  String mS=(String)config.get(COEditController.CONFIG_KEY_MSUBJECT_DEFAULT);
  String mSubject=(mS != null) ? mS : "String_Node_Str";
  teElSubject=uifactory.addTextElement("String_Node_Str","String_Node_Str",255,mSubject,formLayout);
  String mB=(String)config.get(COEditController.CONFIG_KEY_MBODY_DEFAULT);
  String mBody=(mB != null) ? mB : "String_Node_Str";
  teArElBody=uifactory.addTextAreaElement("String_Node_Str","String_Node_Str",10000,8,60,true,mBody,formLayout);
  subm=uifactory.addFormSubmitButton("String_Node_Str",formLayout);
  update();
}