Program: 69566
Project: 69566
Buggy source:
/** 
 * @see org.olat.core.gui.components.ComponentRenderer#render(org.olat.core.gui.render.Renderer,org.olat.core.gui.render.StringOutput,org.olat.core.gui.components.Component,org.olat.core.gui.render.URLBuilder,org.olat.core.gui.translator.Translator,org.olat.core.gui.render.RenderResult,java.lang.String[])
 */
@Override public void render(Renderer renderer,StringOutput sb,Component source,URLBuilder ubu,Translator translator,RenderResult renderResult,String[] args){
  RatingComponent rating=(RatingComponent)source;
  sb.append("String_Node_Str");
  if (rating.getCssClass() != null)   sb.append(rating.getCssClass());
  sb.append("String_Node_Str");
  String title=rating.getTitle();
  if (title != null) {
    sb.append("String_Node_Str");
    if (rating.isTranslateTitle()) {
      title=translator.translate(title);
    }
    sb.append(title);
    sb.append("String_Node_Str");
  }
  List<String> labels=rating.getRatingLabel();
  sb.append("String_Node_Str");
  if (rating.isAllowUserInput()) {
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  boolean ajaxModeEnabled=renderer.getGlobalSettings().getAjaxFlags().isIframePostEnabled();
  for (int i=0; i < labels.size(); i++) {
    sb.append("String_Node_Str");
    if (rating.getCurrentRating() >= i + 1) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    if (rating.isAllowUserInput() && rating.isEnabled()) {
      if (rating.getForm() == null) {
        sb.append("String_Node_Str");
        ubu.buildURI(sb,new String[]{VelocityContainer.COMMAND_ID},new String[]{(i + 1) + "String_Node_Str"},ajaxModeEnabled ? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
        sb.append("String_Node_Str");
        if (ajaxModeEnabled) {
          ubu.appendTarget(sb);
        }
        sb.append("String_Node_Str");
      }
 else {
        Form theForm=rating.getForm();
        String elementId=FormBaseComponentIdProvider.DISPPREFIX + rating.getDispatchID();
        sb.append("String_Node_Str").append(FormJSHelper.getXHRFnCallFor(theForm,elementId,1,new NameValuePair(VelocityContainer.COMMAND_ID,Integer.toString(i + 1)))).append("String_Node_Str");
      }
    }
 else {
      sb.append("String_Node_Str");
    }
    String label=rating.getRatingLabel(i);
    if (label != null) {
      if (rating.isTranslateRatingLabels()) {
        label=translator.translate(label);
      }
      StringBuilder escapedLabel=new StringBuilder();
      escapedLabel.append(StringEscapeUtils.escapeHtml(label));
      sb.append("String_Node_Str").append(escapedLabel).append("String_Node_Str");
    }
    sb.append("String_Node_Str");
  }
  if (rating.isShowRatingAsText()) {
    sb.append("String_Node_Str");
    sb.append(Formatter.roundToString(rating.getCurrentRating(),1));
    sb.append("String_Node_Str");
    sb.append(labels.size());
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  String expl=rating.getExplanation();
  if (expl != null) {
    sb.append("String_Node_Str");
    if (rating.isTranslateExplanation()) {
      expl=translator.translate(expl);
    }
    sb.append(expl);
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.components.ComponentRenderer#render(org.olat.core.gui.render.Renderer,org.olat.core.gui.render.StringOutput,org.olat.core.gui.components.Component,org.olat.core.gui.render.URLBuilder,org.olat.core.gui.translator.Translator,org.olat.core.gui.render.RenderResult,java.lang.String[])
 */
@Override public void render(Renderer renderer,StringOutput sb,Component source,URLBuilder ubu,Translator translator,RenderResult renderResult,String[] args){
  RatingComponent rating=(RatingComponent)source;
  sb.append("String_Node_Str");
  if (rating.getCssClass() != null)   sb.append(rating.getCssClass());
  sb.append("String_Node_Str");
  String title=rating.getTitle();
  if (title != null) {
    sb.append("String_Node_Str");
    if (rating.isTranslateTitle()) {
      title=translator.translate(title);
    }
    sb.append(title);
    sb.append("String_Node_Str");
  }
  List<String> labels=rating.getRatingLabel();
  sb.append("String_Node_Str");
  if (rating.isAllowUserInput()) {
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  boolean ajaxModeEnabled=renderer.getGlobalSettings().getAjaxFlags().isIframePostEnabled();
  for (int i=0; i < labels.size(); i++) {
    sb.append("String_Node_Str");
    if (rating.getCurrentRating() >= i + 1) {
      sb.append("String_Node_Str");
    }
 else {
      sb.append("String_Node_Str");
    }
    sb.append("String_Node_Str");
    if (rating.isAllowUserInput() && rating.isEnabled()) {
      if (rating.getForm() == null) {
        sb.append("String_Node_Str");
        ubu.buildURI(sb,new String[]{VelocityContainer.COMMAND_ID},new String[]{(i + 1) + "String_Node_Str"},ajaxModeEnabled ? AJAXFlags.MODE_TOBGIFRAME : AJAXFlags.MODE_NORMAL);
        sb.append("String_Node_Str");
        if (ajaxModeEnabled) {
          ubu.appendTarget(sb);
        }
        sb.append("String_Node_Str");
      }
 else {
        Form theForm=rating.getForm();
        String elementId=FormBaseComponentIdProvider.DISPPREFIX + rating.getDispatchID();
        sb.append("String_Node_Str").append(FormJSHelper.getXHRFnCallFor(theForm,elementId,1,new NameValuePair(VelocityContainer.COMMAND_ID,Integer.toString(i + 1)))).append("String_Node_Str");
      }
    }
 else {
      sb.append("String_Node_Str");
    }
    String label=rating.getRatingLabel(i);
    if (label != null) {
      if (rating.isTranslateRatingLabels()) {
        if (translator != null) {
          label=translator.translate(label);
        }
 else {
          label="String_Node_Str";
        }
      }
      StringBuilder escapedLabel=new StringBuilder();
      escapedLabel.append(StringEscapeUtils.escapeHtml(label));
      sb.append("String_Node_Str").append(escapedLabel).append("String_Node_Str");
    }
    sb.append("String_Node_Str");
  }
  if (rating.isShowRatingAsText()) {
    sb.append("String_Node_Str");
    sb.append(Formatter.roundToString(rating.getCurrentRating(),1));
    sb.append("String_Node_Str");
    sb.append(labels.size());
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  String expl=rating.getExplanation();
  if (expl != null) {
    sb.append("String_Node_Str");
    if (rating.isTranslateExplanation()) {
      expl=translator.translate(expl);
    }
    sb.append(expl);
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str");
}