Program: 62877
Project: 62877
Buggy source:
@Override public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses,FeedbackSessionResultsBundle bundle){
  if (responses.size() == 0) {
    return "String_Node_Str";
  }
  String html="String_Node_Str";
  String fragments="String_Node_Str";
  List<String> options;
  List<Integer> optionPoints=new ArrayList<Integer>();
  Map<String,Integer[]> optionTotalCount=new LinkedHashMap<String,Integer[]>();
  if (distributeToRecipients) {
    for (    FeedbackResponseAttributes response : responses) {
      FeedbackConstantSumResponseDetails frd=(FeedbackConstantSumResponseDetails)response.getResponseDetails();
      String recipientEmail=response.recipientEmail;
      String recipientName=bundle.getNameForEmail(recipientEmail);
      Integer[] pointCount=optionTotalCount.get(recipientName);
      if (pointCount == null) {
        pointCount=new Integer[]{0,0};
      }
      pointCount[0]+=frd.getAnswerList().get(0);
      pointCount[1]+=1;
      optionTotalCount.put(recipientName,pointCount);
    }
  }
 else {
    options=constSumOptions;
    for (int i=0; i < options.size(); i++) {
      optionPoints.add(0);
    }
    for (    FeedbackResponseAttributes response : responses) {
      FeedbackConstantSumResponseDetails frd=(FeedbackConstantSumResponseDetails)response.getResponseDetails();
      for (int i=0; i < frd.getAnswerList().size(); i++) {
        optionPoints.set(i,optionPoints.get(i) + frd.getAnswerList().get(i));
      }
    }
    for (int i=0; i < options.size(); i++) {
      optionTotalCount.put(options.get(i),new Integer[]{optionPoints.get(i),responses.size()});
    }
  }
  DecimalFormat df=new DecimalFormat("String_Node_Str");
  for (  Entry<String,Integer[]> entry : optionTotalCount.entrySet()) {
    double average=entry.getValue()[0] / entry.getValue()[1];
    fragments+=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.CONSTSUM_RESULT_STATS_OPTIONFRAGMENT,"String_Node_Str",entry.getKey(),"String_Node_Str",df.format(average));
  }
  html=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.CONSTSUM_RESULT_STATS,"String_Node_Str",distributeToRecipients ? "String_Node_Str" : "String_Node_Str","String_Node_Str",fragments);
  return html;
}

Fixed version (ground truth):
@Override public String getQuestionResultStatisticsHtml(List<FeedbackResponseAttributes> responses,FeedbackQuestionAttributes question,FeedbackSessionResultsBundle bundle){
  if (responses.size() == 0) {
    return "String_Node_Str";
  }
  String html="String_Node_Str";
  String fragments="String_Node_Str";
  List<String> options;
  List<Integer> optionPoints=new ArrayList<Integer>();
  Map<String,Integer[]> optionTotalCount=new LinkedHashMap<String,Integer[]>();
  if (distributeToRecipients) {
    for (    FeedbackResponseAttributes response : responses) {
      FeedbackConstantSumResponseDetails frd=(FeedbackConstantSumResponseDetails)response.getResponseDetails();
      String recipientEmail=response.recipientEmail;
      String recipientName=bundle.getNameForEmail(recipientEmail);
      Integer[] pointCount=optionTotalCount.get(recipientName);
      if (pointCount == null) {
        pointCount=new Integer[]{0,0};
      }
      pointCount[0]+=frd.getAnswerList().get(0);
      pointCount[1]+=1;
      optionTotalCount.put(recipientName,pointCount);
    }
  }
 else {
    options=constSumOptions;
    for (int i=0; i < options.size(); i++) {
      optionPoints.add(0);
    }
    for (    FeedbackResponseAttributes response : responses) {
      FeedbackConstantSumResponseDetails frd=(FeedbackConstantSumResponseDetails)response.getResponseDetails();
      for (int i=0; i < frd.getAnswerList().size(); i++) {
        optionPoints.set(i,optionPoints.get(i) + frd.getAnswerList().get(i));
      }
    }
    for (int i=0; i < options.size(); i++) {
      optionTotalCount.put(options.get(i),new Integer[]{optionPoints.get(i),responses.size()});
    }
  }
  DecimalFormat df=new DecimalFormat("String_Node_Str");
  for (  Entry<String,Integer[]> entry : optionTotalCount.entrySet()) {
    double average=entry.getValue()[0] / entry.getValue()[1];
    fragments+=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.CONSTSUM_RESULT_STATS_OPTIONFRAGMENT,"String_Node_Str",entry.getKey(),"String_Node_Str",df.format(average));
  }
  html=FeedbackQuestionFormTemplates.populateTemplate(FeedbackQuestionFormTemplates.CONSTSUM_RESULT_STATS,"String_Node_Str",distributeToRecipients ? "String_Node_Str" : "String_Node_Str","String_Node_Str",fragments);
  return html;
}