Source:
private String getSubmissionFormTableBodyHtml(String questionNumberString, String responseNumberString, boolean sessionIsOpen, boolean isExistingResponse, FeedbackRubricResponseDetails frd) { StringBuilder tableBodyHtml = new StringBuilder(); String tableBodyFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_BODY_FRAGMENT; String tableBodyTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_BODY; for (int i = 0; i < numOfRubricSubQuestions; i++) { StringBuilder tableBodyFragmentHtml = new StringBuilder(); for (int j = 0; j < numOfRubricChoices; j++) { String tableBodyCell = FeedbackQuestionFormTemplates.populateTemplate(tableBodyFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(j), "${row}", Integer.toString(i), "${disabled}", sessionIsOpen ? "" : "disabled", "${description}", Sanitizer.sanitizeForHtml(this.getDescription(i, j)), "${checked}", isExistingResponse && frd.getAnswer(i) == j ? "checked" : "", "${Const.ParamsNames.FEEDBACK_QUESTION_RUBRICCHOICE}", Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE); tableBodyFragmentHtml.append(tableBodyCell).append(Const.EOL); } String tableRow = FeedbackQuestionFormTemplates.populateTemplate(tableBodyTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${row}", Integer.toString(i), "${subQuestion}", StringHelper.integerToLowerCaseAlphabeticalIndex(i + 1) + ") " + Sanitizer.sanitizeForHtml(rubricSubQuestions.get(i)), "${rubricRowBodyFragments}", tableBodyFragmentHtml.toString()); tableBodyHtml.append(tableRow).append(Const.EOL); } return tableBodyHtml.toString(); }

Target:
private String getSubmissionFormTableBodyHtml(String questionNumberString, String responseNumberString, boolean sessionIsOpen, boolean isExistingResponse, FeedbackRubricResponseDetails frd) { StringBuilder tableBodyHtml = new StringBuilder(); String tableBodyFragmentTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_BODY_FRAGMENT; String tableBodyTemplate = FeedbackQuestionFormTemplates.RUBRIC_SUBMISSION_FORM_BODY; for (int i = 0; i < numOfRubricSubQuestions; i++) { StringBuilder tableBodyFragmentHtml = new StringBuilder(); for (int j = 0; j < numOfRubricChoices; j++) { String tableBodyCell = Templates.populateTemplate(tableBodyFragmentTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${col}", Integer.toString(j), "${row}", Integer.toString(i), "${disabled}", sessionIsOpen ? "" : "disabled", "${description}", Sanitizer.sanitizeForHtml(this.getDescription(i, j)), "${checked}", isExistingResponse && frd.getAnswer(i) == j ? "checked" : "", "${Const.ParamsNames.FEEDBACK_QUESTION_RUBRICCHOICE}", Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE); tableBodyFragmentHtml.append(tableBodyCell).append(Const.EOL); } String tableRow = Templates.populateTemplate(tableBodyTemplate, "${qnIndex}", questionNumberString, "${respIndex}", responseNumberString, "${row}", Integer.toString(i), "${subQuestion}", StringHelper.integerToLowerCaseAlphabeticalIndex(i + 1) + ") " + Sanitizer.sanitizeForHtml(rubricSubQuestions.get(i)), "${rubricRowBodyFragments}", tableBodyFragmentHtml.toString()); tableBodyHtml.append(tableRow).append(Const.EOL); } return tableBodyHtml.toString(); }