Program: 69442
Project: 69442
Buggy source:
private void initAssessment(UserRequest ureq){
  boolean enableScoreInfo=config.getBooleanSafe(IQEditController.CONFIG_KEY_ENABLESCOREINFO);
  mainVC.contextPut("String_Node_Str",new Boolean(enableScoreInfo));
  mainVC.contextPut("String_Node_Str",config.get(IQEditController.CONFIG_KEY_ATTEMPTS));
  ScoreEvaluation scoreEval=courseNode.getUserScoreEvaluation(userCourseEnv);
  boolean blockAfterSuccess=config.getBooleanSafe(IQEditController.CONFIG_KEY_BLOCK_AFTER_SUCCESS);
  Boolean blocked=Boolean.FALSE;
  if (blockAfterSuccess) {
    Boolean passed=scoreEval.getPassed();
    if (passed != null && passed.booleanValue()) {
      blocked=Boolean.TRUE;
    }
  }
  mainVC.contextPut("String_Node_Str",blocked);
  Identity identity=userCourseEnv.getIdentityEnvironment().getIdentity();
  mainVC.contextPut("String_Node_Str",AssessmentHelper.getRoundedScore(scoreEval.getScore()));
  mainVC.contextPut("String_Node_Str",(scoreEval.getPassed() == null ? Boolean.FALSE : Boolean.TRUE));
  mainVC.contextPut("String_Node_Str",scoreEval.getPassed());
  StringBuilder comment=Formatter.stripTabsAndReturns(courseNode.getUserUserComment(userCourseEnv));
  mainVC.contextPut("String_Node_Str",StringHelper.xssScan(comment));
  Integer attempts=courseNode.getUserAttempts(userCourseEnv);
  mainVC.contextPut("String_Node_Str",attempts == null ? new Integer(0) : attempts);
  UserNodeAuditManager am=userCourseEnv.getCourseEnvironment().getAuditManager();
  mainVC.contextPut("String_Node_Str",am.getUserNodeLog(courseNode,identity));
  exposeResults(ureq);
}

Fixed version (ground truth):
private void initAssessment(UserRequest ureq){
  boolean enableScoreInfo=config.getBooleanSafe(IQEditController.CONFIG_KEY_ENABLESCOREINFO);
  mainVC.contextPut("String_Node_Str",new Boolean(enableScoreInfo));
  int maxAttempts=deliveryOptions.getMaxAttempts();
  if (maxAttempts > 0) {
    mainVC.contextPut("String_Node_Str",new Integer(maxAttempts));
  }
 else {
    mainVC.contextPut("String_Node_Str",Boolean.FALSE);
  }
  AssessmentEntry assessmentEntry=courseNode.getUserAssessmentEntry(userCourseEnv);
  if (assessmentEntry == null) {
    mainVC.contextPut("String_Node_Str",Boolean.FALSE);
    mainVC.contextPut("String_Node_Str",null);
    mainVC.contextPut("String_Node_Str",Boolean.FALSE);
    mainVC.contextPut("String_Node_Str",Boolean.FALSE);
    mainVC.contextPut("String_Node_Str",null);
    mainVC.contextPut("String_Node_Str",0);
  }
 else {
    Boolean passed=assessmentEntry.getPassed();
    Boolean blocked=Boolean.FALSE;
    boolean blockAfterSuccess=config.getBooleanSafe(IQEditController.CONFIG_KEY_BLOCK_AFTER_SUCCESS);
    if (blockAfterSuccess && passed != null && passed.booleanValue()) {
      blocked=Boolean.TRUE;
    }
    mainVC.contextPut("String_Node_Str",blocked);
    Identity identity=userCourseEnv.getIdentityEnvironment().getIdentity();
    mainVC.contextPut("String_Node_Str",AssessmentHelper.getRoundedScore(assessmentEntry.getScore()));
    mainVC.contextPut("String_Node_Str",(passed == null ? Boolean.FALSE : Boolean.TRUE));
    mainVC.contextPut("String_Node_Str",passed);
    StringBuilder comment=Formatter.stripTabsAndReturns(courseNode.getUserUserComment(userCourseEnv));
    mainVC.contextPut("String_Node_Str",StringHelper.xssScan(comment));
    Integer attempts=assessmentEntry.getAttempts();
    mainVC.contextPut("String_Node_Str",attempts == null ? new Integer(0) : attempts);
    UserNodeAuditManager am=userCourseEnv.getCourseEnvironment().getAuditManager();
    mainVC.contextPut("String_Node_Str",am.getUserNodeLog(courseNode,identity));
  }
  exposeResults(ureq);
}