Program: 69389
Project: 69389
Buggy source:
private AssessmentItemBuilder convertMultipleChoice(Item item){
  MultipleChoiceAssessmentItemBuilder itemBuilder=new MultipleChoiceAssessmentItemBuilder(qtiSerializer);
  convertItemBasics(item,itemBuilder);
  itemBuilder.clearMapping();
  itemBuilder.clearSimpleChoices();
  ChoiceInteraction interaction=itemBuilder.getChoiceInteraction();
  Question question=item.getQuestion();
  itemBuilder.setShuffle(question.isShuffle());
  boolean singleCorrect=question.isSingleCorrect();
  List<Response> responses=question.getResponses();
  for (  Response response : responses) {
    String responseText=response.getContent().renderAsHtmlForEditor();
    SimpleChoice newChoice;
    if (StringHelper.isHtml(responseText)) {
      newChoice=AssessmentItemFactory.createSimpleChoice(interaction,"String_Node_Str",itemBuilder.getQuestionType().getPrefix());
      htmlBuilder.appendHtml(newChoice,responseText);
    }
 else {
      newChoice=AssessmentItemFactory.createSimpleChoice(interaction,responseText,itemBuilder.getQuestionType().getPrefix());
    }
    itemBuilder.addSimpleChoice(newChoice);
    if (response.isCorrect()) {
      itemBuilder.addCorrectAnswer(newChoice.getIdentifier());
    }
    double score=response.getPoints();
    if (singleCorrect) {
      if (score > 0.0f) {
        itemBuilder.setMaxScore(score);
      }
    }
 else {
      itemBuilder.setMapping(newChoice.getIdentifier(),score);
    }
  }
  if (singleCorrect) {
    itemBuilder.setScoreEvaluationMode(ScoreEvaluation.allCorrectAnswers);
  }
 else {
    itemBuilder.setScoreEvaluationMode(ScoreEvaluation.perAnswer);
  }
  return itemBuilder;
}

Fixed version (ground truth):
private AssessmentItemBuilder convertMultipleChoice(Item item){
  MultipleChoiceAssessmentItemBuilder itemBuilder=new MultipleChoiceAssessmentItemBuilder(qtiSerializer);
  convertItemBasics(item,itemBuilder);
  itemBuilder.clearMapping();
  itemBuilder.clearSimpleChoices();
  ChoiceInteraction interaction=itemBuilder.getChoiceInteraction();
  Question question=item.getQuestion();
  itemBuilder.setShuffle(question.isShuffle());
  boolean singleCorrect=question.isSingleCorrect();
  List<Response> responses=question.getResponses();
  for (  Response response : responses) {
    String responseText=response.getContent().renderAsHtmlForEditor();
    responseText=prepareContent(responseText);
    SimpleChoice newChoice;
    if (StringHelper.isHtml(responseText)) {
      newChoice=AssessmentItemFactory.createSimpleChoice(interaction,"String_Node_Str",itemBuilder.getQuestionType().getPrefix());
      htmlBuilder.appendHtml(newChoice,responseText);
    }
 else {
      newChoice=AssessmentItemFactory.createSimpleChoice(interaction,responseText,itemBuilder.getQuestionType().getPrefix());
    }
    itemBuilder.addSimpleChoice(newChoice);
    if (response.isCorrect()) {
      itemBuilder.addCorrectAnswer(newChoice.getIdentifier());
    }
    double score=response.getPoints();
    if (singleCorrect) {
      if (score > 0.0f) {
        itemBuilder.setMaxScore(score);
      }
    }
 else {
      itemBuilder.setMapping(newChoice.getIdentifier(),score);
    }
  }
  if (singleCorrect) {
    itemBuilder.setScoreEvaluationMode(ScoreEvaluation.allCorrectAnswers);
  }
 else {
    itemBuilder.setScoreEvaluationMode(ScoreEvaluation.perAnswer);
  }
  return itemBuilder;
}