Program: 69976
Project: 69976
Buggy source:
/** 
 * @param moduleConfiguration
 * @param ureq
 * @param wControl
 * @param userCourseEnv
 * @param enNode
 */
public ENRunController(ModuleConfiguration moduleConfiguration,UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,ENCourseNode enNode){
  super(ureq,wControl);
  this.moduleConfig=moduleConfiguration;
  this.enNode=enNode;
  addLoggingResourceable(LoggingResourceable.wrap(enNode));
  areaManager=CoreSpringFactory.getImpl(BGAreaManager.class);
  enrollmentManager=CoreSpringFactory.getImpl(EnrollmentManager.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  courseGroupManager=userCourseEnv.getCourseEnvironment().getCourseGroupManager();
  coursePropertyManager=userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
  enrollableGroupKeys=(List<Long>)moduleConfig.get(ENCourseNode.CONFIG_GROUP_IDS);
  if (enrollableGroupKeys == null) {
    String groupNamesConfig=(String)moduleConfig.get(ENCourseNode.CONFIG_GROUPNAME);
    enrollableGroupKeys=businessGroupService.toGroupKeys(groupNamesConfig,courseGroupManager.getCourseResource());
  }
  enrollableAreaKeys=(List<Long>)moduleConfig.get(ENCourseNode.CONFIG_AREA_IDS);
  if (enrollableAreaKeys != null) {
    String areaInitVal=(String)moduleConfig.get(ENCourseNode.CONFIG_AREANAME);
    enrollableAreaKeys=areaManager.toAreaKeys(areaInitVal,courseGroupManager.getCourseResource());
  }
  cancelEnrollEnabled=((Boolean)moduleConfig.get(ENCourseNode.CONF_CANCEL_ENROLL_ENABLED)).booleanValue();
  Identity identity=userCourseEnv.getIdentityEnvironment().getIdentity();
  enrolledGroup=enrollmentManager.getBusinessGroupWhereEnrolled(identity,enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  waitingListGroup=enrollmentManager.getBusinessGroupWhereInWaitingList(identity,enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  registerGroupChangedEvents(enrollableGroupKeys,enrollableAreaKeys,ureq.getIdentity());
  enrollVC=createVelocityContainer("String_Node_Str");
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  tableCtr=createTableController(ureq,enrollmentManager.hasAnyWaitingList(groups));
  doEnrollView(ureq);
  enrollVC.contextPut("String_Node_Str",enNode.getShortTitle());
  enrollVC.contextPut("String_Node_Str",enNode.getLongTitle());
  String learningObj=enNode.getLearningObjectives();
  if (learningObj != null) {
    Component learningObjectives=ObjectivesHelper.createLearningObjectivesComponent(learningObj,ureq);
    enrollVC.put("String_Node_Str",learningObjectives);
    enrollVC.contextPut("String_Node_Str",learningObj);
  }
  putInitialPanel(enrollVC);
}

Fixed version (ground truth):
/** 
 * @param moduleConfiguration
 * @param ureq
 * @param wControl
 * @param userCourseEnv
 * @param enNode
 */
public ENRunController(ModuleConfiguration moduleConfiguration,UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,ENCourseNode enNode){
  super(ureq,wControl);
  this.moduleConfig=moduleConfiguration;
  this.enNode=enNode;
  addLoggingResourceable(LoggingResourceable.wrap(enNode));
  areaManager=CoreSpringFactory.getImpl(BGAreaManager.class);
  enrollmentManager=CoreSpringFactory.getImpl(EnrollmentManager.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  courseGroupManager=userCourseEnv.getCourseEnvironment().getCourseGroupManager();
  coursePropertyManager=userCourseEnv.getCourseEnvironment().getCoursePropertyManager();
  enrollableGroupKeys=(List<Long>)moduleConfig.get(ENCourseNode.CONFIG_GROUP_IDS);
  if (enrollableGroupKeys == null) {
    String groupNamesConfig=(String)moduleConfig.get(ENCourseNode.CONFIG_GROUPNAME);
    enrollableGroupKeys=businessGroupService.toGroupKeys(groupNamesConfig,courseGroupManager.getCourseResource());
  }
  enrollableAreaKeys=(List<Long>)moduleConfig.get(ENCourseNode.CONFIG_AREA_IDS);
  if (enrollableAreaKeys == null) {
    String areaInitVal=(String)moduleConfig.get(ENCourseNode.CONFIG_AREANAME);
    enrollableAreaKeys=areaManager.toAreaKeys(areaInitVal,courseGroupManager.getCourseResource());
  }
  cancelEnrollEnabled=((Boolean)moduleConfig.get(ENCourseNode.CONF_CANCEL_ENROLL_ENABLED)).booleanValue();
  Identity identity=userCourseEnv.getIdentityEnvironment().getIdentity();
  enrolledGroup=enrollmentManager.getBusinessGroupWhereEnrolled(identity,enrollableGroupKeys,enrollableAreaKeys,courseGroupManager.getCourseResource());
  waitingListGroup=enrollmentManager.getBusinessGroupWhereInWaitingList(identity,enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  registerGroupChangedEvents(enrollableGroupKeys,enrollableAreaKeys,ureq.getIdentity());
  enrollVC=createVelocityContainer("String_Node_Str");
  List<BusinessGroup> groups=enrollmentManager.loadGroupsFromNames(enrollableGroupKeys,enrollableAreaKeys,courseGroupManager);
  tableCtr=createTableController(ureq,enrollmentManager.hasAnyWaitingList(groups));
  doEnrollView(ureq);
  enrollVC.contextPut("String_Node_Str",enNode.getShortTitle());
  enrollVC.contextPut("String_Node_Str",enNode.getLongTitle());
  String learningObj=enNode.getLearningObjectives();
  if (learningObj != null) {
    Component learningObjectives=ObjectivesHelper.createLearningObjectivesComponent(learningObj,ureq);
    enrollVC.put("String_Node_Str",learningObjectives);
    enrollVC.contextPut("String_Node_Str",learningObj);
  }
  putInitialPanel(enrollVC);
}