Program: 69669
Project: 69669
Buggy source:
/** 
 * Constructor for the identity assessment edit controller
 * @param ureq The user request
 * @param wControl The window control
 * @param course
 * @param courseNode The assessable course node
 * @param assessedIdentityWrapper The wrapped assessed identity
 */
public AssessmentEditController(UserRequest ureq,WindowControl wControl,StackedController stackPanel,ICourse course,AssessableCourseNode courseNode,AssessedIdentityWrapper assessedIdentityWrapper){
  super(ureq,wControl);
  this.assessedIdentityWrapper=assessedIdentityWrapper;
  this.courseNode=courseNode;
  addLoggingResourceable(LoggingResourceable.wrap(course));
  addLoggingResourceable(LoggingResourceable.wrap(courseNode));
  if (courseNode == null) {
    throw new OLATRuntimeException(AssessmentEditController.class,"String_Node_Str",null);
  }
  if (assessedIdentityWrapper == null) {
    throw new OLATRuntimeException(AssessmentEditController.class,"String_Node_Str",null);
  }
  String lockSubKey="String_Node_Str" + courseNode.getIdent() + "String_Node_Str"+ assessedIdentityWrapper.getIdentity().getKey();
  lockEntry=CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(course,ureq.getIdentity(),lockSubKey);
  if (lockEntry.isSuccess()) {
    detailView=createVelocityContainer("String_Node_Str");
    hideLogButton=LinkFactory.createButtonSmall("String_Node_Str",detailView,this);
    showLogButton=LinkFactory.createButtonSmall("String_Node_Str",detailView,this);
    backLink=LinkFactory.createLinkBack(detailView,this);
    Identity assessedIdentity=assessedIdentityWrapper.getIdentity();
    detailView.contextPut("String_Node_Str",assessedIdentity.getUser());
    ModuleConfiguration modConfig=courseNode.getModuleConfiguration();
    String infoCoach=(String)modConfig.get(MSCourseNode.CONFIG_KEY_INFOTEXT_COACH);
    infoCoach=Formatter.formatLatexFormulas(infoCoach);
    detailView.contextPut("String_Node_Str",infoCoach);
    assessmentForm=new AssessmentForm(ureq,wControl,courseNode,assessedIdentityWrapper);
    listenTo(assessmentForm);
    detailView.put("String_Node_Str",assessmentForm.getInitialComponent());
    UserCourseEnvironment uce=assessedIdentityWrapper.getUserCourseEnvironment();
    String nodeLog=courseNode.getUserLog(uce);
    detailView.contextPut("String_Node_Str",nodeLog);
    if (courseNode.hasDetails()) {
      detailView.contextPut("String_Node_Str",Boolean.TRUE);
      detailsEditController=courseNode.getDetailsEditController(ureq,wControl,stackPanel,uce);
      listenTo(detailsEditController);
      detailView.put("String_Node_Str",detailsEditController.getInitialComponent());
    }
 else {
      detailView.contextPut("String_Node_Str",Boolean.FALSE);
    }
    detailView.contextPut("String_Node_Str",courseNode);
    detailView.contextPut("String_Node_Str",CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(courseNode.getType()).getIconCSSClass());
    List<BusinessGroup> participantGroups=course.getCourseEnvironment().getCourseGroupManager().getParticipatingBusinessGroups(assessedIdentity);
    final Collator collator=Collator.getInstance(ureq.getLocale());
    Collections.sort(participantGroups,new Comparator<BusinessGroup>(){
      public int compare(      BusinessGroup a,      BusinessGroup b){
        return collator.compare(a.getName(),b.getName());
      }
    }
);
    detailView.contextPut("String_Node_Str",participantGroups);
    detailView.contextPut("String_Node_Str",(participantGroups.size() > 0 ? Boolean.FALSE : Boolean.TRUE));
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    putInitialPanel(detailView);
  }
 else {
    alreadyLockedDialogController=DialogBoxUIFactory.createResourceLockedMessage(ureq,wControl,lockEntry,"String_Node_Str",getTranslator());
    listenTo(alreadyLockedDialogController);
    alreadyLockedDialogController.activate();
  }
}

Fixed version (ground truth):
/** 
 * Constructor for the identity assessment edit controller
 * @param ureq The user request
 * @param wControl The window control
 * @param course
 * @param courseNode The assessable course node
 * @param assessedIdentityWrapper The wrapped assessed identity
 * @param showCourseNodeDetails show the details controller if one available
 */
public AssessmentEditController(UserRequest ureq,WindowControl wControl,StackedController stackPanel,ICourse course,AssessableCourseNode courseNode,AssessedIdentityWrapper assessedIdentityWrapper,boolean showCourseNodeDetails){
  super(ureq,wControl);
  this.assessedIdentityWrapper=assessedIdentityWrapper;
  this.courseNode=courseNode;
  addLoggingResourceable(LoggingResourceable.wrap(course));
  addLoggingResourceable(LoggingResourceable.wrap(courseNode));
  if (courseNode == null) {
    throw new OLATRuntimeException(AssessmentEditController.class,"String_Node_Str",null);
  }
  if (assessedIdentityWrapper == null) {
    throw new OLATRuntimeException(AssessmentEditController.class,"String_Node_Str",null);
  }
  String lockSubKey="String_Node_Str" + courseNode.getIdent() + "String_Node_Str"+ assessedIdentityWrapper.getIdentity().getKey();
  lockEntry=CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(course,ureq.getIdentity(),lockSubKey);
  if (lockEntry.isSuccess()) {
    detailView=createVelocityContainer("String_Node_Str");
    hideLogButton=LinkFactory.createButtonSmall("String_Node_Str",detailView,this);
    showLogButton=LinkFactory.createButtonSmall("String_Node_Str",detailView,this);
    backLink=LinkFactory.createLinkBack(detailView,this);
    Identity assessedIdentity=assessedIdentityWrapper.getIdentity();
    detailView.contextPut("String_Node_Str",assessedIdentity.getUser());
    ModuleConfiguration modConfig=courseNode.getModuleConfiguration();
    String infoCoach=(String)modConfig.get(MSCourseNode.CONFIG_KEY_INFOTEXT_COACH);
    infoCoach=Formatter.formatLatexFormulas(infoCoach);
    detailView.contextPut("String_Node_Str",infoCoach);
    assessmentForm=new AssessmentForm(ureq,wControl,courseNode,assessedIdentityWrapper);
    listenTo(assessmentForm);
    detailView.put("String_Node_Str",assessmentForm.getInitialComponent());
    UserCourseEnvironment uce=assessedIdentityWrapper.getUserCourseEnvironment();
    String nodeLog=courseNode.getUserLog(uce);
    detailView.contextPut("String_Node_Str",nodeLog);
    if (courseNode.hasDetails() && showCourseNodeDetails) {
      detailView.contextPut("String_Node_Str",Boolean.TRUE);
      detailsEditController=courseNode.getDetailsEditController(ureq,wControl,stackPanel,uce);
      listenTo(detailsEditController);
      detailView.put("String_Node_Str",detailsEditController.getInitialComponent());
    }
 else {
      detailView.contextPut("String_Node_Str",Boolean.FALSE);
    }
    detailView.contextPut("String_Node_Str",courseNode);
    detailView.contextPut("String_Node_Str",CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(courseNode.getType()).getIconCSSClass());
    List<BusinessGroup> participantGroups=course.getCourseEnvironment().getCourseGroupManager().getParticipatingBusinessGroups(assessedIdentity);
    final Collator collator=Collator.getInstance(ureq.getLocale());
    Collections.sort(participantGroups,new Comparator<BusinessGroup>(){
      public int compare(      BusinessGroup a,      BusinessGroup b){
        return collator.compare(a.getName(),b.getName());
      }
    }
);
    detailView.contextPut("String_Node_Str",participantGroups);
    detailView.contextPut("String_Node_Str",(participantGroups.size() > 0 ? Boolean.FALSE : Boolean.TRUE));
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    detailView.contextPut("String_Node_Str",Boolean.TRUE);
    putInitialPanel(detailView);
  }
 else {
    alreadyLockedDialogController=DialogBoxUIFactory.createResourceLockedMessage(ureq,wControl,lockEntry,"String_Node_Str",getTranslator());
    listenTo(alreadyLockedDialogController);
    alreadyLockedDialogController.activate();
  }
}