Program: 62837
Project: 62837
Buggy source:
@Override public boolean extractQuestionDetails(Map<String,String[]> requestParameters,FeedbackQuestionType questionType){
  String numOfRubricChoicesString=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_COLS);
  String numOfRubricSubQuestionsString=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_ROWS);
  if (numOfRubricChoicesString == null || numOfRubricSubQuestionsString == null) {
    return false;
  }
  int numOfRubricChoices=Integer.parseInt(numOfRubricChoicesString);
  int numOfRubricSubQuestions=Integer.parseInt(numOfRubricSubQuestionsString);
  List<String> rubricChoices=new ArrayList<String>();
  List<String> rubricSubQuestions=new ArrayList<String>();
  List<List<String>> rubricDescriptions=new ArrayList<List<String>>();
  int numActualChoices=0;
  int numActualSubQuestions=0;
  for (int i=0; i < numOfRubricChoices; i++) {
    String choice=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE + "String_Node_Str" + i);
    if (choice != null) {
      rubricChoices.add(choice);
      numActualChoices++;
    }
  }
  for (int i=0; i < numOfRubricSubQuestions; i++) {
    String subQuestion=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_SUBQUESTION + "String_Node_Str" + i);
    if (subQuestion != null) {
      rubricSubQuestions.add(subQuestion);
      numActualSubQuestions++;
    }
  }
  int descRows=-1;
  for (int i=0; i < numOfRubricSubQuestions; i++) {
    for (int j=0; j < numOfRubricChoices; j++) {
      String description=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_DESCRIPTION + "String_Node_Str" + i+ "String_Node_Str"+ j);
      if (description != null) {
        if (j == 0) {
          descRows++;
          rubricDescriptions.add(new ArrayList<String>());
        }
        rubricDescriptions.get(descRows).add(description);
      }
    }
  }
  setRubricQuestionDetails(numActualChoices,rubricChoices,numActualSubQuestions,rubricSubQuestions,rubricDescriptions);
  if (!this.isValidDescriptionSize()) {
    this.initializeRubricDescriptions();
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean extractQuestionDetails(Map<String,String[]> requestParameters,FeedbackQuestionType questionType){
  String numOfRubricChoicesString=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_COLS);
  String numOfRubricSubQuestionsString=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_NUM_ROWS);
  if (numOfRubricChoicesString == null || numOfRubricSubQuestionsString == null) {
    return false;
  }
  int numOfRubricChoices=Integer.parseInt(numOfRubricChoicesString);
  int numOfRubricSubQuestions=Integer.parseInt(numOfRubricSubQuestionsString);
  List<String> rubricChoices=new ArrayList<String>();
  List<String> rubricSubQuestions=new ArrayList<String>();
  List<List<String>> rubricDescriptions=new ArrayList<List<String>>();
  int numActualChoices=0;
  int numActualSubQuestions=0;
  for (int i=0; i < numOfRubricChoices; i++) {
    String choice=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_CHOICE + "String_Node_Str" + i);
    if (choice != null) {
      rubricChoices.add(choice);
      numActualChoices++;
    }
  }
  for (int i=0; i < numOfRubricSubQuestions; i++) {
    String subQuestion=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_SUBQUESTION + "String_Node_Str" + i);
    if (subQuestion != null) {
      rubricSubQuestions.add(subQuestion);
      numActualSubQuestions++;
    }
  }
  int descRows=-1;
  for (int i=0; i < numOfRubricSubQuestions; i++) {
    boolean rowAdded=false;
    for (int j=0; j < numOfRubricChoices; j++) {
      String description=HttpRequestHelper.getValueFromParamMap(requestParameters,Const.ParamsNames.FEEDBACK_QUESTION_RUBRIC_DESCRIPTION + "String_Node_Str" + i+ "String_Node_Str"+ j);
      if (description != null) {
        if (rowAdded == false) {
          descRows++;
          rubricDescriptions.add(new ArrayList<String>());
          rowAdded=true;
        }
        rubricDescriptions.get(descRows).add(description);
      }
    }
  }
  setRubricQuestionDetails(numActualChoices,rubricChoices,numActualSubQuestions,rubricSubQuestions,rubricDescriptions);
  if (!this.isValidDescriptionSize()) {
    this.initializeRubricDescriptions();
  }
  return true;
}