nus-yam/ex-repair huggingface dataset:
Program: 69308
Project: 69308
Buggy source:
public MembersAvatarDisplayRunController(UserRequest ureq,WindowControl wControl,Translator translator,CourseEnvironment courseEnv,BusinessGroup businessGroup,List<Identity> owners,List<Identity> coaches,List<Identity> participants,List<Identity> waiting,boolean canEmail,boolean canDownload,boolean deduplicateList,boolean showOwners,boolean showCoaches,boolean showParticipants,boolean showWaiting,boolean editable){
  super(ureq,wControl,"String_Node_Str",translator);
  setTranslator(translator);
  this.courseEnv=courseEnv;
  this.businessGroup=businessGroup;
  this.repoEntry=courseEnv != null ? courseEnv.getCourseGroupManager().getCourseEntry() : null;
  userPropertyHandlers=userManager.getUserPropertyHandlersFor(USER_PROPS_ID,false);
  avatarBaseURL=registerCacheableMapper(ureq,"String_Node_Str",new UserAvatarMapper(true));
  portraitManager=DisplayPortraitManager.getInstance();
  chatEnabled=imModule.isEnabled() && imModule.isPrivateEnabled();
  this.owners=owners;
  this.coaches=coaches;
  this.participants=participants;
  this.waiting=waiting;
  this.canEmail=canEmail;
  this.canDownload=canDownload;
  this.showOwners=showOwners;
  this.showCoaches=showCoaches;
  this.showParticipants=showParticipants;
  this.showWaiting=showWaiting;
  this.deduplicateList=deduplicateList;
  this.editable=editable;
  initForm(ureq);
}

Fixed version (ground truth):
public MembersAvatarDisplayRunController(UserRequest ureq,WindowControl wControl,Translator translator,CourseEnvironment courseEnv,BusinessGroup businessGroup,List<Identity> owners,List<Identity> coaches,List<Identity> participants,List<Identity> waiting,boolean canEmail,boolean canDownload,boolean deduplicateList,boolean showOwners,boolean showCoaches,boolean showParticipants,boolean showWaiting,boolean editable){
  super(ureq,wControl,"String_Node_Str",translator);
  setTranslator(translator);
  this.courseEnv=courseEnv;
  this.businessGroup=businessGroup;
  this.repoEntry=courseEnv != null ? courseEnv.getCourseGroupManager().getCourseEntry() : null;
  Roles roles=ureq.getUserSession().getRoles();
  boolean isAdministrativeUser=securityModule.isUserAllowedAdminProps(roles);
  userPropertyHandlers=userManager.getUserPropertyHandlersFor(MembersDisplayRunController.USER_PROPS_LIST_ID,isAdministrativeUser);
  userPropertyAvatarHandlers=userManager.getUserPropertyHandlersFor(MembersDisplayRunController.USER_PROPS_AVATAR_ID,isAdministrativeUser);
  avatarBaseURL=registerCacheableMapper(ureq,"String_Node_Str",new UserAvatarMapper(true));
  portraitManager=DisplayPortraitManager.getInstance();
  chatEnabled=imModule.isEnabled() && imModule.isPrivateEnabled();
  this.owners=owners;
  this.coaches=coaches;
  this.participants=participants;
  this.waiting=waiting;
  this.canEmail=canEmail;
  this.canDownload=canDownload;
  this.showOwners=showOwners;
  this.showCoaches=showCoaches;
  this.showParticipants=showParticipants;
  this.showWaiting=showWaiting;
  this.deduplicateList=deduplicateList;
  this.editable=editable;
  initForm(ureq);
}
Program: 69309
Project: 69309
Buggy source:
@Override public Controller createController(UserRequest lureq,WindowControl lwControl){
  lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("String_Node_Str");
  return new MembersPrintController(lureq,lwControl,userPropertyHandlers,getTranslator(),ownerList,coachList,participantList,waitingtList,showOwners,showCoaches,showParticipants,showWaiting,courseEnv != null ? courseEnv.getCourseTitle() : businessGroup.getName());
}

Fixed version (ground truth):
@Override public Controller createController(UserRequest lureq,WindowControl lwControl){
  lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("String_Node_Str");
  return new MembersPrintController(lureq,lwControl,getTranslator(),ownerList,coachList,participantList,waitingtList,showOwners,showCoaches,showParticipants,showWaiting,courseEnv != null ? courseEnv.getCourseTitle() : businessGroup.getName());
}
Program: 69311
Project: 69311
Buggy source:
private void doPrint(UserRequest ureq){
  ControllerCreator printControllerCreator=new ControllerCreator(){
    @Override public Controller createController(    UserRequest lureq,    WindowControl lwControl){
      lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("String_Node_Str");
      return new MembersPrintController(lureq,lwControl,userPropertyHandlers,getTranslator(),ownerList,coachList,participantList,waitingtList,showOwners,showCoaches,showParticipants,showWaiting,courseEnv != null ? courseEnv.getCourseTitle() : businessGroup.getName());
    }
  }
;
  ControllerCreator layoutCtrlr=BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(printControllerCreator);
  openInNewBrowserWindow(ureq,layoutCtrlr);
}

Fixed version (ground truth):
private void doPrint(UserRequest ureq){
  ControllerCreator printControllerCreator=new ControllerCreator(){
    @Override public Controller createController(    UserRequest lureq,    WindowControl lwControl){
      lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("String_Node_Str");
      return new MembersPrintController(lureq,lwControl,getTranslator(),ownerList,coachList,participantList,waitingtList,showOwners,showCoaches,showParticipants,showWaiting,courseEnv != null ? courseEnv.getCourseTitle() : businessGroup.getName());
    }
  }
;
  ControllerCreator layoutCtrlr=BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(printControllerCreator);
  openInNewBrowserWindow(ureq,layoutCtrlr);
}
Program: 69313
Project: 69313
Buggy source:
private void initFormMemberList(String name,String label,List<Member> members){
  VelocityContainer listVC=createVelocityContainer("String_Node_Str");
  listVC.contextPut("String_Node_Str",label);
  listVC.contextPut("String_Node_Str",avatarBaseURL);
  listVC.contextPut("String_Node_Str",members);
  listVC.contextPut("String_Node_Str",userPropertyHandlers);
  listVC.contextPut("String_Node_Str","String_Node_Str" + name);
  mainVC.put(name,listVC);
}

Fixed version (ground truth):
private void initFormMemberList(String name,String label,List<Member> members){
  VelocityContainer listVC=createVelocityContainer("String_Node_Str");
  listVC.contextPut("String_Node_Str",label);
  listVC.contextPut("String_Node_Str",avatarBaseURL);
  listVC.contextPut("String_Node_Str",members);
  listVC.contextPut("String_Node_Str","String_Node_Str" + name);
  listVC.contextPut("String_Node_Str",userPropertyPrintHandlers);
  Map<String,Integer> handlerLookupMap=new HashMap<String,Integer>();
  for (int i=userPropertyHandlers.size(); i-- > 0; ) {
    UserPropertyHandler handler=userPropertyHandlers.get(i);
    handlerLookupMap.put(handler.getName(),i);
  }
  listVC.contextPut("String_Node_Str",handlerLookupMap);
  mainVC.put(name,listVC);
}
Program: 69315
Project: 69315
Buggy source:
private void activateTopUsers(){
  int all=horizontalRadioButtons.getSelected();
  numTableRows.setVisible(all != 0);
}

Fixed version (ground truth):
private void activateTopUsers(){
  int all=bestOnlyEl.getSelected();
  numTableRows.setVisible(all != 0);
}
Program: 69316
Project: 69316
Buggy source:
private void activateForm(boolean init){
  boolean formactive=allowHighScore.isSelected(0);
  MultipleSelectionElement[] checkboxes={showPosition,showPodium,showHistogram,showListing,displayAnonymous};
  for (int i=0; i < checkboxes.length; i++) {
    checkboxes[i].setEnabled(formactive);
    if (!init) {
      if (formactive) {
        checkboxes[i].select("String_Node_Str",true);
      }
 else {
        checkboxes[i].uncheckAll();
      }
    }
  }
  if (!init) {
    horizontalRadioButtons.setVisible(formactive);
    horizontalRadioButtons.select(yesOrNoKeys[1],true);
    numTableRows.setVisible(formactive);
    dateStart.setDate(null);
  }
}

Fixed version (ground truth):
private void activateForm(boolean init){
  boolean formactive=allowHighScore.isSelected(0);
  MultipleSelectionElement[] checkboxes={showPosition,showPodium,showHistogram,showListing,displayAnonymous};
  for (int i=0; i < checkboxes.length; i++) {
    checkboxes[i].setEnabled(formactive);
    if (!init) {
      if (formactive) {
        checkboxes[i].select("String_Node_Str",true);
      }
 else {
        checkboxes[i].uncheckAll();
      }
    }
  }
  if (!init) {
    bestOnlyEl.setVisible(formactive);
    bestOnlyEl.select(yesOrNoKeys[1],true);
    numTableRows.setVisible(formactive);
    dateStart.setDate(null);
  }
}
Program: 69317
Project: 69317
Buggy source:
public HighScoreEditController(UserRequest ureq,WindowControl wControl,CourseNode msNode){
  super(ureq,wControl,FormBasicController.LAYOUT_DEFAULT);
  this.msNode=msNode;
  initForm(ureq);
}

Fixed version (ground truth):
public HighScoreEditController(UserRequest ureq,WindowControl wControl,ModuleConfiguration config){
  super(ureq,wControl,FormBasicController.LAYOUT_DEFAULT);
  this.config=config;
  initForm(ureq);
}
Program: 69319
Project: 69319
Buggy source:
@Override protected void formInnerEvent(UserRequest ureq,FormItem source,FormEvent event){
  if (source == allowHighScore) {
    activateForm(false);
  }
 else   if (source == showListing) {
    activateListing();
  }
 else   if (source == horizontalRadioButtons) {
    activateTopUsers();
  }
  if (allowHighScore.isSelected(0) && (!showPosition.isSelected(0) && !showPodium.isSelected(0) && !showListing.isSelected(0)&& !showHistogram.isSelected(0))) {
    allowHighScore.setErrorKey("String_Node_Str",null);
  }
 else {
    allowHighScore.clearError();
  }
}

Fixed version (ground truth):
@Override protected void formInnerEvent(UserRequest ureq,FormItem source,FormEvent event){
  if (source == allowHighScore) {
    activateForm(false);
  }
 else   if (source == showListing) {
    activateListing();
  }
 else   if (source == bestOnlyEl) {
    activateTopUsers();
  }
  if (allowHighScore.isSelected(0) && (!showPosition.isSelected(0) && !showPodium.isSelected(0) && !showListing.isSelected(0)&& !showHistogram.isSelected(0))) {
    allowHighScore.setErrorKey("String_Node_Str",null);
  }
 else {
    allowHighScore.clearError();
  }
}
Program: 69320
Project: 69320
Buggy source:
private void activateListing(){
  boolean listingactive=showListing.isSelected(0);
  horizontalRadioButtons.setVisible(listingactive);
  horizontalRadioButtons.select(yesOrNoKeys[1],true);
  numTableRows.setVisible(listingactive);
}

Fixed version (ground truth):
private void activateListing(){
  boolean listingactive=showListing.isSelected(0);
  bestOnlyEl.setVisible(listingactive);
  bestOnlyEl.select(yesOrNoKeys[1],true);
  numTableRows.setVisible(listingactive);
}
Program: 69321
Project: 69321
Buggy source:
@Override protected void formOK(UserRequest ureq){
  fireEvent(ureq,Event.DONE_EVENT);
}

Fixed version (ground truth):
@Override protected void formOK(UserRequest ureq){
  config.set(CONFIG_KEY_HIGHSCORE,allowHighScore.isSelected(0));
  config.set(CONFIG_KEY_POSITION,showPosition.isSelected(0));
  config.set(CONFIG_KEY_PODIUM,showPodium.isSelected(0));
  config.set(CONFIG_KEY_HISTOGRAM,showHistogram.isSelected(0));
  config.set(CONFIG_KEY_LISTING,showListing.isSelected(0));
  config.set(CONFIG_KEY_DATESTART,dateStart.getDate());
  config.set(CONFIG_KEY_ANONYMIZE,displayAnonymous.isSelected(0));
  if (showListing.isSelected(0)) {
    config.set(CONFIG_KEY_BESTONLY,bestOnlyEl.getSelected());
    config.set(CONFIG_KEY_NUMUSER,numTableRows.getIntValue());
  }
  fireEvent(ureq,Event.DONE_EVENT);
}
Program: 69324
Project: 69324
Buggy source:
/** 
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,org.olat.core.gui.control.Controller,org.olat.core.gui.control.Event)
 */
public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == ltConfigForm) {
    if (event == Event.CANCELLED_EVENT) {
    }
 else     if (event == Event.DONE_EVENT) {
      config=ltConfigForm.getUpdatedConfig();
      updateHighscoreTab();
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      myContent.contextPut("String_Node_Str",Boolean.TRUE);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      highScoreNodeConfigController.updateModuleConfiguration(courseNode.getModuleConfiguration());
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,org.olat.core.gui.control.Controller,org.olat.core.gui.control.Event)
 */
public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == ltConfigForm) {
    if (event == Event.CANCELLED_EVENT) {
    }
 else     if (event == Event.DONE_EVENT) {
      config=ltConfigForm.getUpdatedConfig();
      updateHighscoreTab();
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      myContent.contextPut("String_Node_Str",Boolean.TRUE);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}
Program: 69325
Project: 69325
Buggy source:
/** 
 * @param cpNode
 * @param ureq
 * @param wControl
 * @param course
 */
public CheckListEditController(CheckListCourseNode courseNode,UserRequest ureq,WindowControl wControl,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.courseNode=courseNode;
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondCtrl);
  CheckboxManager checkboxManager=CoreSpringFactory.getImpl(CheckboxManager.class);
  int numOfChecks=checkboxManager.countChecks(course,courseNode.getIdent());
  checkboxListEditCtrl=new CheckListBoxListEditController(ureq,wControl,course,courseNode,numOfChecks > 0);
  listenTo(checkboxListEditCtrl);
  configurationCtrl=new CheckListConfigurationController(ureq,wControl,courseNode,numOfChecks > 0);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,courseNode);
  listenTo(highScoreNodeConfigController);
}

Fixed version (ground truth):
/** 
 * @param cpNode
 * @param ureq
 * @param wControl
 * @param course
 */
public CheckListEditController(CheckListCourseNode courseNode,UserRequest ureq,WindowControl wControl,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.courseNode=courseNode;
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondCtrl);
  CheckboxManager checkboxManager=CoreSpringFactory.getImpl(CheckboxManager.class);
  int numOfChecks=checkboxManager.countChecks(course,courseNode.getIdent());
  checkboxListEditCtrl=new CheckListBoxListEditController(ureq,wControl,course,courseNode,numOfChecks > 0);
  listenTo(checkboxListEditCtrl);
  configurationCtrl=new CheckListConfigurationController(ureq,wControl,courseNode,numOfChecks > 0);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,courseNode.getModuleConfiguration());
  listenTo(highScoreNodeConfigController);
}
Program: 69326
Project: 69326
Buggy source:
@Override public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondCtrl.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == configurationCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      checkboxListEditCtrl.dispatchEvent(ureq,configurationCtrl,event);
      updateHighscoreTab();
    }
  }
 else   if (source == checkboxListEditCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      configurationCtrl.dispatchEvent(ureq,checkboxListEditCtrl,event);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      highScoreNodeConfigController.updateModuleConfiguration(courseNode.getModuleConfiguration());
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}

Fixed version (ground truth):
@Override public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondCtrl.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == configurationCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      checkboxListEditCtrl.dispatchEvent(ureq,configurationCtrl,event);
      updateHighscoreTab();
    }
  }
 else   if (source == checkboxListEditCtrl) {
    if (event == Event.DONE_EVENT || event == Event.CHANGED_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
      configurationCtrl.dispatchEvent(ureq,checkboxListEditCtrl,event);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}
Program: 69327
Project: 69327
Buggy source:
public GTAEditController(UserRequest ureq,WindowControl wControl,GTACourseNode gtaNode,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.euce=euce;
  this.gtaNode=gtaNode;
  courseEnv=course.getCourseEnvironment();
  config=gtaNode.getModuleConfiguration();
  Condition accessCondition=gtaNode.getPreConditionAccess();
  CourseEditorTreeModel editorModel=course.getEditorTreeModel();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(editorModel,gtaNode));
  listenTo(accessibilityCondCtrl);
  workflowCtrl=new GTAWorkflowEditController(ureq,getWindowControl(),gtaNode,euce.getCourseEditorEnv());
  listenTo(workflowCtrl);
  assignmentCtrl=new GTAAssignmentEditController(ureq,getWindowControl(),gtaNode,config,courseEnv,false);
  listenTo(assignmentCtrl);
  submissionCtrl=new GTASubmissionEditController(ureq,getWindowControl(),config);
  listenTo(submissionCtrl);
  manualAssessmentCtrl=new MSEditFormController(ureq,getWindowControl(),config);
  listenTo(manualAssessmentCtrl);
  solutionsCtrl=new GTASampleSolutionsEditController(ureq,getWindowControl(),gtaNode,courseEnv,false);
  listenTo(solutionsCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,gtaNode);
  listenTo(highScoreNodeConfigController);
  if ("String_Node_Str".equals(config.get(GTACourseNode.GTASK_TYPE))) {
    highScoreNodeConfigController.setFormInfoMessage("String_Node_Str",getTranslator());
  }
}

Fixed version (ground truth):
public GTAEditController(UserRequest ureq,WindowControl wControl,GTACourseNode gtaNode,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.euce=euce;
  this.gtaNode=gtaNode;
  courseEnv=course.getCourseEnvironment();
  config=gtaNode.getModuleConfiguration();
  Condition accessCondition=gtaNode.getPreConditionAccess();
  CourseEditorTreeModel editorModel=course.getEditorTreeModel();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(editorModel,gtaNode));
  listenTo(accessibilityCondCtrl);
  workflowCtrl=new GTAWorkflowEditController(ureq,getWindowControl(),gtaNode,euce.getCourseEditorEnv());
  listenTo(workflowCtrl);
  assignmentCtrl=new GTAAssignmentEditController(ureq,getWindowControl(),gtaNode,config,courseEnv,false);
  listenTo(assignmentCtrl);
  submissionCtrl=new GTASubmissionEditController(ureq,getWindowControl(),config);
  listenTo(submissionCtrl);
  manualAssessmentCtrl=new MSEditFormController(ureq,getWindowControl(),config);
  listenTo(manualAssessmentCtrl);
  solutionsCtrl=new GTASampleSolutionsEditController(ureq,getWindowControl(),gtaNode,courseEnv,false);
  listenTo(solutionsCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,config);
  listenTo(highScoreNodeConfigController);
  if ("String_Node_Str".equals(config.get(GTACourseNode.GTASK_TYPE))) {
    highScoreNodeConfigController.setFormInfoMessage("String_Node_Str",getTranslator());
  }
}
Program: 69330
Project: 69330
Buggy source:
private void init(UserRequest ureq){
  configurationCtrl=new IQConfigurationController(ureq,getWindowControl(),stackPanel,course,courseNode,type);
  listenTo(configurationCtrl);
  layoutConfigurationCtrl=new IQLayoutConfigurationController(ureq,getWindowControl(),course,courseNode,type);
  listenTo(layoutConfigurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,getWindowControl(),courseNode);
  listenTo(highScoreNodeConfigController);
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondContr=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondContr);
}

Fixed version (ground truth):
private void init(UserRequest ureq){
  configurationCtrl=new IQConfigurationController(ureq,getWindowControl(),stackPanel,course,courseNode,type);
  listenTo(configurationCtrl);
  layoutConfigurationCtrl=new IQLayoutConfigurationController(ureq,getWindowControl(),course,courseNode,type);
  listenTo(layoutConfigurationCtrl);
  if (AssessmentInstance.QMD_ENTRY_TYPE_ASSESS.equals(type)) {
    highScoreNodeConfigController=new HighScoreEditController(ureq,getWindowControl(),moduleConfiguration);
    listenTo(highScoreNodeConfigController);
  }
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondContr=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondContr);
}
Program: 69331
Project: 69331
Buggy source:
@Override public void addTabs(TabbedPane tabbedPane){
  myTabbedPane=tabbedPane;
  tabbedPane.addTab(translate(PANE_TAB_ACCESSIBILITY),accessibilityCondContr.getWrappedDefaultAccessConditionVC(translate("String_Node_Str")));
  tabbedPane.addTab(translate(PANE_TAB_IQCONFIG_XXX),configurationCtrl.getInitialComponent());
  tabbedPane.addTab(translate(PANE_TAB_IQLAYOUTCONFIG),layoutConfigurationCtrl.getInitialComponent());
  tabbedPane.addTab(translate(PANE_TAB_HIGHSCORE),highScoreNodeConfigController.getInitialComponent());
}

Fixed version (ground truth):
@Override public void addTabs(TabbedPane tabbedPane){
  myTabbedPane=tabbedPane;
  tabbedPane.addTab(translate(PANE_TAB_ACCESSIBILITY),accessibilityCondContr.getWrappedDefaultAccessConditionVC(translate("String_Node_Str")));
  tabbedPane.addTab(translate(PANE_TAB_IQCONFIG_XXX),configurationCtrl.getInitialComponent());
  tabbedPane.addTab(translate(PANE_TAB_IQLAYOUTCONFIG),layoutConfigurationCtrl.getInitialComponent());
  if (AssessmentInstance.QMD_ENTRY_TYPE_ASSESS.equals(type)) {
    tabbedPane.addTab(translate(PANE_TAB_HIGHSCORE),highScoreNodeConfigController.getInitialComponent());
  }
}
Program: 69332
Project: 69332
Buggy source:
@Override public void event(UserRequest urequest,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == configurationCtrl) {
    if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
      layoutConfigurationCtrl.updateEditController(urequest);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      highScoreNodeConfigController.updateModuleConfiguration(courseNode.getModuleConfiguration());
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == layoutConfigurationCtrl) {
    if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
      configurationCtrl.updateEditController(urequest);
      layoutConfigurationCtrl.updateEditController(urequest);
    }
  }
}

Fixed version (ground truth):
@Override public void event(UserRequest urequest,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      courseNode.setPreConditionAccess(cond);
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == configurationCtrl) {
    if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
      layoutConfigurationCtrl.updateEditController(urequest);
    }
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == layoutConfigurationCtrl) {
    if (event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
      fireEvent(urequest,NodeEditController.NODECONFIG_CHANGED_EVENT);
      configurationCtrl.updateEditController(urequest);
      layoutConfigurationCtrl.updateEditController(urequest);
    }
  }
}
Program: 69333
Project: 69333
Buggy source:
public QTI21AssessmentRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,QTICourseNode courseNode){
  super(ureq,wControl,Util.createPackageTranslator(CourseNode.class,ureq.getLocale()));
  setTranslator(Util.createPackageTranslator(AssessmentTestDisplayController.class,getLocale(),getTranslator()));
  this.courseNode=courseNode;
  this.userCourseEnv=userCourseEnv;
  userSession=ureq.getUserSession();
  anonym=userSession.getRoles().isGuestOnly();
  config=courseNode.getModuleConfiguration();
  testEntry=courseNode.getReferencedRepositoryEntry();
  singleUserEventCenter=userSession.getSingleUserEventCenter();
  mainVC=createVelocityContainer("String_Node_Str");
  if (courseNode instanceof AssessableCourseNode) {
    AssessableCourseNode assessableCourseNode=(AssessableCourseNode)courseNode;
    if (assessableCourseNode.hasScoreConfigured() || userCourseEnv.isCoach()) {
      HighScoreRunController highScoreCtr=new HighScoreRunController(ureq,getWindowControl(),userCourseEnv,courseNode);
      if (highScoreCtr.isViewHighscore()) {
        Component highScoreComponent=highScoreCtr.getInitialComponent();
        mainVC.put("String_Node_Str",highScoreComponent);
      }
    }
  }
  addLoggingResourceable(LoggingResourceable.wrap(courseNode));
  if (courseNode instanceof IQTESTCourseNode) {
    mainVC.contextPut("String_Node_Str","String_Node_Str");
  }
 else   if (courseNode instanceof IQSELFCourseNode) {
    mainVC.contextPut("String_Node_Str","String_Node_Str");
  }
  deliveryOptions=getDeliveryOptions();
  overrideOptions=getOverrideOptions();
  init(ureq);
  initAssessment();
  putInitialPanel(mainVC);
}

Fixed version (ground truth):
public QTI21AssessmentRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,QTICourseNode courseNode){
  super(ureq,wControl,Util.createPackageTranslator(CourseNode.class,ureq.getLocale()));
  setTranslator(Util.createPackageTranslator(AssessmentTestDisplayController.class,getLocale(),getTranslator()));
  this.courseNode=courseNode;
  this.userCourseEnv=userCourseEnv;
  userSession=ureq.getUserSession();
  anonym=userSession.getRoles().isGuestOnly();
  config=courseNode.getModuleConfiguration();
  testEntry=courseNode.getReferencedRepositoryEntry();
  singleUserEventCenter=userSession.getSingleUserEventCenter();
  mainVC=createVelocityContainer("String_Node_Str");
  addLoggingResourceable(LoggingResourceable.wrap(courseNode));
  if (courseNode instanceof IQTESTCourseNode) {
    mainVC.contextPut("String_Node_Str","String_Node_Str");
  }
 else   if (courseNode instanceof IQSELFCourseNode) {
    mainVC.contextPut("String_Node_Str","String_Node_Str");
  }
  deliveryOptions=getDeliveryOptions();
  overrideOptions=getOverrideOptions();
  init(ureq);
  initAssessment(ureq);
  putInitialPanel(mainVC);
}
Program: 69335
Project: 69335
Buggy source:
@Override protected void event(UserRequest ureq,Controller source,Event event){
  if (source == displayCtrl) {
    if (event == Event.CANCELLED_EVENT) {
      doExitAssessment(ureq,event,false);
      exposeResults();
      showInfo("String_Node_Str");
    }
 else     if ("String_Node_Str".equals(event.getCommand())) {
      doExitAssessment(ureq,event,false);
      exposeResults();
      showInfo("String_Node_Str");
    }
 else     if (event instanceof QTI21Event) {
      QTI21Event qe=(QTI21Event)event;
      if (QTI21Event.EXIT.equals(qe.getCommand())) {
        if (!displayCtrl.isResultsVisible()) {
          doExitAssessment(ureq,event,true);
          initAssessment();
        }
      }
 else       if (QTI21Event.CLOSE_RESULTS.equals(qe.getCommand())) {
        doExitAssessment(ureq,event,true);
        initAssessment();
      }
    }
  }
  super.event(ureq,source,event);
}

Fixed version (ground truth):
@Override protected void event(UserRequest ureq,Controller source,Event event){
  if (source == displayCtrl) {
    if (event == Event.CANCELLED_EVENT) {
      doExitAssessment(ureq,event,false);
      exposeResults();
      showInfo("String_Node_Str");
    }
 else     if ("String_Node_Str".equals(event.getCommand())) {
      doExitAssessment(ureq,event,false);
      exposeResults();
      showInfo("String_Node_Str");
    }
 else     if (event instanceof QTI21Event) {
      QTI21Event qe=(QTI21Event)event;
      if (QTI21Event.EXIT.equals(qe.getCommand())) {
        if (!displayCtrl.isResultsVisible()) {
          doExitAssessment(ureq,event,true);
          initAssessment(ureq);
        }
      }
 else       if (QTI21Event.CLOSE_RESULTS.equals(qe.getCommand())) {
        doExitAssessment(ureq,event,true);
        initAssessment(ureq);
      }
    }
  }
  super.event(ureq,source,event);
}
Program: 69337
Project: 69337
Buggy source:
/** 
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,org.olat.core.gui.control.Controller,org.olat.core.gui.control.Event)
 */
@Override public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      msNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == modConfigController) {
    if (event == Event.CANCELLED_EVENT) {
      if (modConfigController != null) {
        removeAsListenerAndDispose(modConfigController);
      }
      modConfigController=new MSEditFormController(ureq,getWindowControl(),msNode.getModuleConfiguration());
      listenTo(modConfigController);
      configurationVC.put("String_Node_Str",modConfigController.getInitialComponent());
      if (hasLogEntries) {
        modConfigController.setDisplayOnly(true);
      }
      configurationVC.contextPut("String_Node_Str",new Boolean(false));
      return;
    }
 else     if (event == Event.DONE_EVENT) {
      modConfigController.updateModuleConfiguration(msNode.getModuleConfiguration());
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
    updateHighscoreTab();
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      highScoreNodeConfigController.updateModuleConfiguration(msNode.getModuleConfiguration());
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,org.olat.core.gui.control.Controller,org.olat.core.gui.control.Event)
 */
@Override public void event(UserRequest ureq,Controller source,Event event){
  if (source == accessibilityCondContr) {
    if (event == Event.CHANGED_EVENT) {
      Condition cond=accessibilityCondContr.getCondition();
      msNode.setPreConditionAccess(cond);
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
 else   if (source == modConfigController) {
    if (event == Event.CANCELLED_EVENT) {
      if (modConfigController != null) {
        removeAsListenerAndDispose(modConfigController);
      }
      modConfigController=new MSEditFormController(ureq,getWindowControl(),msNode.getModuleConfiguration());
      listenTo(modConfigController);
      configurationVC.put("String_Node_Str",modConfigController.getInitialComponent());
      if (hasLogEntries) {
        modConfigController.setDisplayOnly(true);
      }
      configurationVC.contextPut("String_Node_Str",new Boolean(false));
      return;
    }
 else     if (event == Event.DONE_EVENT) {
      modConfigController.updateModuleConfiguration(msNode.getModuleConfiguration());
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
    updateHighscoreTab();
  }
 else   if (source == highScoreNodeConfigController) {
    if (event == Event.DONE_EVENT) {
      fireEvent(ureq,NodeEditController.NODECONFIG_CHANGED_EVENT);
    }
  }
}
Program: 69341
Project: 69341
Buggy source:
public HighScoreEditController(UserRequest ureq,WindowControl wControl,CourseNode msNode,UserCourseEnvironment euce){
  super(ureq,wControl,FormBasicController.LAYOUT_DEFAULT);
  this.msNode=msNode;
  initForm(ureq);
}

Fixed version (ground truth):
public HighScoreEditController(UserRequest ureq,WindowControl wControl,CourseNode msNode){
  super(ureq,wControl,FormBasicController.LAYOUT_DEFAULT);
  this.msNode=msNode;
  initForm(ureq);
}
Program: 69342
Project: 69342
Buggy source:
@Override public void setObjects(List objects){
}

Fixed version (ground truth):
@Override public void setObjects(List<HighScoreTableEntry> entries){
  this.entries=entries;
}
Program: 69343
Project: 69343
Buggy source:
@Override public Object createCopyWithEmptyList(){
  return null;
}

Fixed version (ground truth):
@Override public Object createCopyWithEmptyList(){
  return new HighScoreFlexiTableModel(new ArrayList<>(),anonymous,placeholder,ownId);
}
Program: 69344
Project: 69344
Buggy source:
@Override public int getRowCount(){
  return ROW_COUNT;
}

Fixed version (ground truth):
@Override public int getRowCount(){
  return entries == null ? 0 : entries.size();
}
Program: 69345
Project: 69345
Buggy source:
public HighScoreFlexiTableModel(List<HighScoreTableEntry> entries,boolean anonymous,String placeholder,Identity ownId){
  this.ROW_COUNT=entries.size();
  this.entries=entries;
  this.anonymous=anonymous;
  this.placeholder=placeholder;
  this.ownId=ownId;
}

Fixed version (ground truth):
public HighScoreFlexiTableModel(List<HighScoreTableEntry> entries,boolean anonymous,String placeholder,Identity ownId){
  this.entries=entries;
  this.anonymous=anonymous;
  this.placeholder=placeholder;
  this.ownId=ownId;
}
Program: 69346
Project: 69346
Buggy source:
/** 
 * Instantiates a new high score run controller.  Use this controller in combination with BasicController and DefaultController
 */
public HighScoreRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,CourseNode courseNode){
  super(ureq,wControl,"String_Node_Str");
  this.nodeID=courseNode.getIdent();
  setupContent(ureq,wControl,userCourseEnv,courseNode);
}

Fixed version (ground truth):
/** 
 * Instantiates a new high score run controller.  Use this controller in combination with BasicController and DefaultController
 */
public HighScoreRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,CourseNode courseNode){
  super(ureq,wControl,"String_Node_Str");
  this.nodeID=courseNode.getIdent();
  setupContent(ureq,userCourseEnv,courseNode);
}
Program: 69349
Project: 69349
Buggy source:
/** 
 * @param cpNode
 * @param ureq
 * @param wControl
 * @param course
 */
public CheckListEditController(CheckListCourseNode courseNode,UserRequest ureq,WindowControl wControl,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.courseNode=courseNode;
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondCtrl);
  CheckboxManager checkboxManager=CoreSpringFactory.getImpl(CheckboxManager.class);
  int numOfChecks=checkboxManager.countChecks(course,courseNode.getIdent());
  checkboxListEditCtrl=new CheckListBoxListEditController(ureq,wControl,course,courseNode,numOfChecks > 0);
  listenTo(checkboxListEditCtrl);
  configurationCtrl=new CheckListConfigurationController(ureq,wControl,courseNode,numOfChecks > 0);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,courseNode,euce);
  listenTo(highScoreNodeConfigController);
}

Fixed version (ground truth):
/** 
 * @param cpNode
 * @param ureq
 * @param wControl
 * @param course
 */
public CheckListEditController(CheckListCourseNode courseNode,UserRequest ureq,WindowControl wControl,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.courseNode=courseNode;
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondCtrl);
  CheckboxManager checkboxManager=CoreSpringFactory.getImpl(CheckboxManager.class);
  int numOfChecks=checkboxManager.countChecks(course,courseNode.getIdent());
  checkboxListEditCtrl=new CheckListBoxListEditController(ureq,wControl,course,courseNode,numOfChecks > 0);
  listenTo(checkboxListEditCtrl);
  configurationCtrl=new CheckListConfigurationController(ureq,wControl,courseNode,numOfChecks > 0);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,courseNode);
  listenTo(highScoreNodeConfigController);
}
Program: 69350
Project: 69350
Buggy source:
public GTAEditController(UserRequest ureq,WindowControl wControl,GTACourseNode gtaNode,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.euce=euce;
  this.gtaNode=gtaNode;
  courseEnv=course.getCourseEnvironment();
  config=gtaNode.getModuleConfiguration();
  Condition accessCondition=gtaNode.getPreConditionAccess();
  CourseEditorTreeModel editorModel=course.getEditorTreeModel();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(editorModel,gtaNode));
  listenTo(accessibilityCondCtrl);
  workflowCtrl=new GTAWorkflowEditController(ureq,getWindowControl(),gtaNode,euce.getCourseEditorEnv());
  listenTo(workflowCtrl);
  assignmentCtrl=new GTAAssignmentEditController(ureq,getWindowControl(),gtaNode,config,courseEnv,false);
  listenTo(assignmentCtrl);
  submissionCtrl=new GTASubmissionEditController(ureq,getWindowControl(),config);
  listenTo(submissionCtrl);
  manualAssessmentCtrl=new MSEditFormController(ureq,getWindowControl(),config);
  listenTo(manualAssessmentCtrl);
  solutionsCtrl=new GTASampleSolutionsEditController(ureq,getWindowControl(),gtaNode,courseEnv,false);
  listenTo(solutionsCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,gtaNode,euce);
  listenTo(highScoreNodeConfigController);
  if ("String_Node_Str".equals(config.get(GTACourseNode.GTASK_TYPE))) {
    highScoreNodeConfigController.setFormInfoMessage("String_Node_Str",getTranslator());
  }
}

Fixed version (ground truth):
public GTAEditController(UserRequest ureq,WindowControl wControl,GTACourseNode gtaNode,ICourse course,UserCourseEnvironment euce){
  super(ureq,wControl);
  this.euce=euce;
  this.gtaNode=gtaNode;
  courseEnv=course.getCourseEnvironment();
  config=gtaNode.getModuleConfiguration();
  Condition accessCondition=gtaNode.getPreConditionAccess();
  CourseEditorTreeModel editorModel=course.getEditorTreeModel();
  accessibilityCondCtrl=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(editorModel,gtaNode));
  listenTo(accessibilityCondCtrl);
  workflowCtrl=new GTAWorkflowEditController(ureq,getWindowControl(),gtaNode,euce.getCourseEditorEnv());
  listenTo(workflowCtrl);
  assignmentCtrl=new GTAAssignmentEditController(ureq,getWindowControl(),gtaNode,config,courseEnv,false);
  listenTo(assignmentCtrl);
  submissionCtrl=new GTASubmissionEditController(ureq,getWindowControl(),config);
  listenTo(submissionCtrl);
  manualAssessmentCtrl=new MSEditFormController(ureq,getWindowControl(),config);
  listenTo(manualAssessmentCtrl);
  solutionsCtrl=new GTASampleSolutionsEditController(ureq,getWindowControl(),gtaNode,courseEnv,false);
  listenTo(solutionsCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,wControl,gtaNode);
  listenTo(highScoreNodeConfigController);
  if ("String_Node_Str".equals(config.get(GTACourseNode.GTASK_TYPE))) {
    highScoreNodeConfigController.setFormInfoMessage("String_Node_Str",getTranslator());
  }
}
Program: 69351
Project: 69351
Buggy source:
private void init(UserRequest ureq){
  configurationCtrl=new IQConfigurationController(ureq,getWindowControl(),this.stackPanel,course,courseNode,euce,type);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,getWindowControl(),courseNode,euce);
  listenTo(highScoreNodeConfigController);
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondContr=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondContr);
}

Fixed version (ground truth):
private void init(UserRequest ureq){
  configurationCtrl=new IQConfigurationController(ureq,getWindowControl(),this.stackPanel,course,courseNode,euce,type);
  listenTo(configurationCtrl);
  highScoreNodeConfigController=new HighScoreEditController(ureq,getWindowControl(),courseNode);
  listenTo(highScoreNodeConfigController);
  Condition accessCondition=courseNode.getPreConditionAccess();
  accessibilityCondContr=new ConditionEditController(ureq,getWindowControl(),euce,accessCondition,AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(),courseNode));
  listenTo(accessibilityCondContr);
}
Program: 69357
Project: 69357
Buggy source:
private String createHTMLfromQTIResultSet(String idPath,String idDir,ZipOutputStream zout,Identity assessedIdentity,QTIResultSet resultSet) throws IOException {
  Document doc=FilePersister.retreiveResultsReporting(assessedIdentity,AssessmentInstance.QMD_ENTRY_TYPE_ASSESS,resultSet.getAssessmentID());
  if (doc == null) {
    return "String_Node_Str";
  }
  File resourceXML=retrieveXML(assessedIdentity,resultSet.getAssessmentID());
  String resultsHTML=LocalizedXSLTransformer.getInstance(ureq.getLocale()).renderResults(doc);
  resultsHTML=createResultHTML(resultsHTML);
  String html=idPath + resultSet.getAssessmentID() + "String_Node_Str";
  String xml=html.replace("String_Node_Str","String_Node_Str");
  convertToZipEntry(zout,html,resultsHTML);
  convertToZipEntry(zout,xml,resourceXML);
  return idPath.replace(idDir,"String_Node_Str") + resultSet.getAssessmentID() + "String_Node_Str";
}

Fixed version (ground truth):
private String createHTMLfromQTIResultSet(String idPath,String idDir,ZipOutputStream zout,Identity assessedIdentity,QTIResultSet resultSet) throws IOException {
  Document doc=FilePersister.retreiveResultsReporting(assessedIdentity,AssessmentInstance.QMD_ENTRY_TYPE_ASSESS,resultSet.getAssessmentID());
  if (doc == null) {
    return "String_Node_Str";
  }
  File resourceXML=retrieveXML(assessedIdentity,resultSet.getAssessmentID());
  String resultsHTML=LocalizedXSLTransformer.getInstance(locale != null ? locale : ureq.getLocale()).renderResults(doc);
  resultsHTML=createResultHTML(resultsHTML);
  String html=idPath + resultSet.getAssessmentID() + "String_Node_Str";
  String xml=html.replace("String_Node_Str","String_Node_Str");
  convertToZipEntry(zout,html,resultsHTML);
  convertToZipEntry(zout,xml,resourceXML);
  return idPath.replace(idDir,"String_Node_Str") + resultSet.getAssessmentID() + "String_Node_Str";
}
Program: 69358
Project: 69358
Buggy source:
public QTI12ResultsExportMediaResource(CourseEnvironment courseEnv,UserRequest ureq,List<Identity> identities,QTICourseNode courseNode,ZipOutputStream exportStream){
  this.courseNode=courseNode;
  this.courseEnv=courseEnv;
  this.ureq=ureq;
  this.title="String_Node_Str";
  this.identities=identities;
  this.velocityHelper=VelocityHelper.getInstance();
  this.exportStream=exportStream;
  translator=new PackageTranslator(QTI12ResultsExportMediaResource.class.getPackage().getName(),ureq.getLocale());
  qtiResultManager=QTIResultManager.getInstance();
  prepare(null);
}

Fixed version (ground truth):
public QTI12ResultsExportMediaResource(CourseEnvironment courseEnv,Locale locale,List<Identity> identities,QTICourseNode courseNode,ZipOutputStream exportStream){
  this.courseNode=courseNode;
  this.courseEnv=courseEnv;
  this.locale=locale;
  this.title="String_Node_Str";
  this.identities=identities;
  this.velocityHelper=VelocityHelper.getInstance();
  this.exportStream=exportStream;
  translator=new PackageTranslator(QTI12ResultsExportMediaResource.class.getPackage().getName(),locale);
  this.exportFolderName=translator.translate("String_Node_Str");
  qtiResultManager=QTIResultManager.getInstance();
}