nus-yam/ex-repair huggingface dataset:
Program: 69393
Project: 69393
Buggy source:
private static AssessmentItem createAssessmentItem(){
  AssessmentItem assessmentItem=AssessmentItemFactory.createAssessmentItem(QTI21QuestionType.kprim,"String_Node_Str");
  NodeGroupList nodeGroups=assessmentItem.getNodeGroups();
  double maxScore=1.0d;
  Identifier responseDeclarationId=Identifier.assumedLegal("String_Node_Str");
  ResponseDeclaration responseDeclaration=createKPrimResponseDeclaration(assessmentItem,responseDeclarationId,new HashMap<>(),maxScore);
  nodeGroups.getResponseDeclarationGroup().getResponseDeclarations().add(responseDeclaration);
  appendDefaultOutcomeDeclarations(assessmentItem,maxScore);
  ItemBody itemBody=appendDefaultItemBody(assessmentItem);
  appendMatchInteractionForKPrim(itemBody,responseDeclarationId);
  ResponseProcessing responseProcessing=createResponseProcessing(assessmentItem,responseDeclarationId);
  assessmentItem.getNodeGroups().getResponseProcessingGroup().setResponseProcessing(responseProcessing);
  return assessmentItem;
}

Fixed version (ground truth):
private static AssessmentItem createAssessmentItem(){
  AssessmentItem assessmentItem=AssessmentItemFactory.createAssessmentItem(QTI21QuestionType.kprim,"String_Node_Str");
  NodeGroupList nodeGroups=assessmentItem.getNodeGroups();
  double maxScore=1.0d;
  Identifier responseDeclarationId=Identifier.assumedLegal("String_Node_Str");
  ResponseDeclaration responseDeclaration=createKPrimResponseDeclaration(assessmentItem,responseDeclarationId,new HashMap<>(),maxScore);
  nodeGroups.getResponseDeclarationGroup().getResponseDeclarations().add(responseDeclaration);
  appendDefaultOutcomeDeclarations(assessmentItem,maxScore);
  ItemBody itemBody=appendDefaultItemBody(assessmentItem);
  MatchInteraction matchInteraction=appendMatchInteractionForKPrim(itemBody,responseDeclarationId);
  SimpleMatchSet matchSet=matchInteraction.getSimpleMatchSets().get(0);
  Map<Identifier,Identifier> associations=new HashMap<>();
  for (  SimpleAssociableChoice choice : matchSet.getSimpleAssociableChoices()) {
    associations.put(choice.getIdentifier(),QTI21Constants.WRONG_IDENTIFIER);
  }
  appendAssociationKPrimResponseDeclaration(responseDeclaration,associations,1.0);
  ResponseProcessing responseProcessing=createResponseProcessing(assessmentItem,responseDeclarationId);
  assessmentItem.getNodeGroups().getResponseProcessingGroup().setResponseProcessing(responseProcessing);
  return assessmentItem;
}
Program: 69394
Project: 69394
Buggy source:
@Test public void filter(){
  String content="String_Node_Str";
  AssessmentItem item=new AssessmentItem();
  ItemBody helper=new ItemBody(item);
  new AssessmentHtmlBuilder().appendHtml(helper,content);
  List<Block> paragraphs=helper.getBlocks();
  Assert.assertNotNull(paragraphs);
  Assert.assertEquals(2,paragraphs.size());
  StringOutput sb=new StringOutput();
  QtiSerializer qtiSerializer=new QtiSerializer(new JqtiExtensionManager());
  qtiSerializer.serializeJqtiObject(helper,new StreamResult(sb));
  log.info(sb.toString());
}

Fixed version (ground truth):
@Test public void filter(){
  String content="String_Node_Str";
  AssessmentItem item=new AssessmentItem();
  ItemBody helper=new ItemBody(item);
  new AssessmentHtmlBuilder().appendHtml(helper,content);
  List<Block> paragraphs=helper.getBlocks();
  Assert.assertNotNull(paragraphs);
  Assert.assertEquals(2,paragraphs.size());
  StringOutput sb=new StringOutput();
  QtiSerializer qtiSerializer=new QtiSerializer(new JqtiExtensionManager());
  qtiSerializer.serializeJqtiObject(helper,new StreamResult(sb));
  String serializedQti=sb.toString();
  Assert.assertTrue(serializedQti.contains("String_Node_Str"));
}
Program: 69395
Project: 69395
Buggy source:
@Test public void serializeVideo(){
  String content="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  AssessmentItem item=new AssessmentItem();
  ItemBody helper=new ItemBody(item);
  new AssessmentHtmlBuilder().appendHtml(helper,content);
  List<Block> paragraphs=helper.getBlocks();
  Assert.assertNotNull(paragraphs);
  Assert.assertEquals(1,paragraphs.size());
  StringOutput sb=new StringOutput();
  QtiSerializer qtiSerializer=new QtiSerializer(new JqtiExtensionManager());
  qtiSerializer.serializeJqtiObject(helper,new StreamResult(sb));
  System.out.println("String_Node_Str");
  System.out.println(sb.toString());
}

Fixed version (ground truth):
@Test public void serializeVideo(){
  String content="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  AssessmentItem item=new AssessmentItem();
  ItemBody helper=new ItemBody(item);
  new AssessmentHtmlBuilder().appendHtml(helper,content);
  List<Block> paragraphs=helper.getBlocks();
  Assert.assertNotNull(paragraphs);
  Assert.assertEquals(1,paragraphs.size());
  StringOutput sb=new StringOutput();
  QtiSerializer qtiSerializer=new QtiSerializer(new JqtiExtensionManager());
  qtiSerializer.serializeJqtiObject(helper,new StreamResult(sb));
  String serializedQti=sb.toString();
  Assert.assertNotNull(serializedQti);
  Assert.assertTrue(serializedQti.contains("String_Node_Str"));
  Assert.assertFalse(serializedQti.contains("String_Node_Str"));
  Assert.assertFalse(serializedQti.contains("String_Node_Str"));
}
Program: 69396
Project: 69396
Buggy source:
@Test public void serializer(){
  AssessmentItem item=new AssessmentItem();
  SimpleChoice helper=new SimpleChoice(item);
  P p=new P(helper);
  TextRun text=new TextRun(p,"String_Node_Str");
  p.getInlines().add(text);
  helper.getFlowStatics().add(p);
  String content=new AssessmentHtmlBuilder().flowStaticString(helper.getFlowStatics());
  System.out.println(content);
}

Fixed version (ground truth):
@Test public void serializer(){
  AssessmentItem item=new AssessmentItem();
  SimpleChoice helper=new SimpleChoice(item);
  P p=new P(helper);
  TextRun text=new TextRun(p,"String_Node_Str");
  p.getInlines().add(text);
  helper.getFlowStatics().add(p);
  String content=new AssessmentHtmlBuilder().flowStaticString(helper.getFlowStatics());
  Assert.assertTrue(content.contains("String_Node_Str"));
}
Program: 69397
Project: 69397
Buggy source:
@Test public void findFeedbacks() throws URISyntaxException {
  URL itemUrl=AssessmentItemPackageTest.class.getResource("String_Node_Str");
  AssessmentItem assessmentItem=loadAssessmentItem(itemUrl);
  SingleChoiceAssessmentItemBuilder itemBuilder=new SingleChoiceAssessmentItemBuilder(assessmentItem,qtiSerializer);
  ModalFeedbackBuilder correctFeedback=itemBuilder.getCorrectFeedback();
  Assert.assertNotNull(correctFeedback);
  Assert.assertTrue(correctFeedback.isCorrectRule());
  ModalFeedbackBuilder incorrectFeedback=itemBuilder.getIncorrectFeedback();
  Assert.assertNotNull(incorrectFeedback);
  Assert.assertTrue(incorrectFeedback.isIncorrectRule());
}

Fixed version (ground truth):
@Test public void findFeedbacks() throws URISyntaxException {
  URL itemUrl=AssessmentItemBuilderTest.class.getResource("String_Node_Str");
  AssessmentItem assessmentItem=loadAssessmentItem(itemUrl);
  SingleChoiceAssessmentItemBuilder itemBuilder=new SingleChoiceAssessmentItemBuilder(assessmentItem,qtiSerializer);
  ModalFeedbackBuilder correctFeedback=itemBuilder.getCorrectFeedback();
  Assert.assertNotNull(correctFeedback);
  Assert.assertTrue(correctFeedback.isCorrectRule());
  ModalFeedbackBuilder incorrectFeedback=itemBuilder.getIncorrectFeedback();
  Assert.assertNotNull(incorrectFeedback);
  Assert.assertTrue(incorrectFeedback.isIncorrectRule());
}
Program: 69398
Project: 69398
Buggy source:
protected Component getFormItemComponent(){
  return component;
}

Fixed version (ground truth):
@Override protected Component getFormItemComponent(){
  return component;
}
Program: 69399
Project: 69399
Buggy source:
/** 
 * @see org.olat.core.gui.components.form.flexible.FormItemImpl#evalFormRequest(org.olat.core.gui.UserRequest)
 */
@Override public void evalFormRequest(UserRequest ureq){
  String paramId=String.valueOf(component.getFormDispatchId());
  String value=getRootForm().getRequestParameter(paramId);
  if (value != null) {
    setValue(value);
    component.setDirty(true);
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.components.form.flexible.FormItemImpl#evalFormRequest(org.olat.core.gui.UserRequest)
 */
@Override public void evalFormRequest(UserRequest ureq){
  String paramId=String.valueOf(component.getFormDispatchId());
  String val=getRootForm().getRequestParameter(paramId);
  if (val != null) {
    setValue(val);
    component.setDirty(true);
  }
}
Program: 69401
Project: 69401
Buggy source:
/** 
 * Load the assessmentTest based on the imsmanifest.xml found in the resource directory.
 * @param resourceDirectory
 * @return
 */
public ResolvedAssessmentTest loadAndResolveAssessmentTest(File resourceDirectory,boolean debugInfo);

Fixed version (ground truth):
/** 
 * Load the assessmentTest based on the imsmanifest.xml found in the resource directory.
 * @param resourceDirectory
 * @return
 */
public ResolvedAssessmentTest loadAndResolveAssessmentTest(File resourceDirectory,boolean replace,boolean debugInfo);
Program: 69402
Project: 69402
Buggy source:
@Override public void run(){
  long start=System.nanoTime();
  FileResourceManager frm=FileResourceManager.getInstance();
  List<RepositoryEntry> entries=repositoryEntryDao.getLastUsedRepositoryEntries(ImsQTI21Resource.TYPE_NAME,0,20);
  for (  RepositoryEntry entry : entries) {
    try {
      File fUnzippedDirRoot=frm.unzipFileResource(entry.getOlatResource());
      qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false);
    }
 catch (    RuntimeException e) {
      log.error("String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getDisplayname()+ "String_Node_Str",e);
    }
  }
  log.info(entries.size() + "String_Node_Str" + CodeHelper.nanoToMilliTime(start));
}

Fixed version (ground truth):
@Override public void run(){
  long start=System.nanoTime();
  FileResourceManager frm=FileResourceManager.getInstance();
  List<RepositoryEntry> entries=repositoryEntryDao.getLastUsedRepositoryEntries(ImsQTI21Resource.TYPE_NAME,0,20);
  for (  RepositoryEntry entry : entries) {
    try {
      File fUnzippedDirRoot=frm.unzipFileResource(entry.getOlatResource());
      qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false,false);
    }
 catch (    RuntimeException e) {
      log.error("String_Node_Str" + entry.getKey() + "String_Node_Str"+ entry.getDisplayname()+ "String_Node_Str",e);
    }
  }
  log.info(entries.size() + "String_Node_Str" + CodeHelper.nanoToMilliTime(start));
}
Program: 69403
Project: 69403
Buggy source:
@Override public ResolvedAssessmentTest loadAndResolveAssessmentTest(File resourceDirectory,boolean debugInfo){
  URI assessmentObjectSystemId=createAssessmentObjectUri(resourceDirectory);
  File resourceFile=new File(assessmentObjectSystemId);
  return assessmentTestsCache.computeIfAbsent(resourceFile,file -> {
    QtiXmlReader qtiXmlReader=new QtiXmlReader(jqtiExtensionManager());
    ResourceLocator fileResourceLocator=new PathResourceLocator(resourceDirectory.toPath());
    ResourceLocator inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
    AssessmentObjectXmlLoader assessmentObjectXmlLoader=new AssessmentObjectXmlLoader(qtiXmlReader,inputResourceLocator);
    ResolvedAssessmentTest resolvedAssessmentTest=assessmentObjectXmlLoader.loadAndResolveAssessmentTest(assessmentObjectSystemId);
    return resolvedAssessmentTest;
  }
);
}

Fixed version (ground truth):
@Override public ResolvedAssessmentTest loadAndResolveAssessmentTest(File resourceDirectory,boolean replace,boolean debugInfo){
  URI assessmentObjectSystemId=createAssessmentObjectUri(resourceDirectory);
  File resourceFile=new File(assessmentObjectSystemId);
  if (replace) {
    ResolvedAssessmentTest resolvedAssessmentTest=internalLoadAndResolveAssessmentTest(resourceDirectory,assessmentObjectSystemId);
    assessmentTestsCache.replace(resourceFile,resolvedAssessmentTest);
    return resolvedAssessmentTest;
  }
  return assessmentTestsCache.computeIfAbsent(resourceFile,file -> {
    return internalLoadAndResolveAssessmentTest(resourceDirectory,assessmentObjectSystemId);
  }
);
}
Program: 69404
Project: 69404
Buggy source:
@Override public boolean needManualCorrection(RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File fUnzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  ResolvedAssessmentTest resolvedAssessmentTest=loadAndResolveAssessmentTest(fUnzippedDirRoot,false);
  return AssessmentTestHelper.needManualCorrection(resolvedAssessmentTest);
}

Fixed version (ground truth):
@Override public boolean needManualCorrection(RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File fUnzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  ResolvedAssessmentTest resolvedAssessmentTest=loadAndResolveAssessmentTest(fUnzippedDirRoot,false,false);
  return AssessmentTestHelper.needManualCorrection(resolvedAssessmentTest);
}
Program: 69405
Project: 69405
Buggy source:
public MediaResource export(RepositoryEntry courseEntry,String subIdent,RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File unzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(unzippedDirRoot,false);
  ICourse course=CourseFactory.loadCourse(courseEntry);
  CourseNode courseNode=course.getRunStructure().getNode(subIdent);
  String label=courseNode.getType() + "String_Node_Str" + StringHelper.transformDisplayNameToFileSystemName(courseNode.getShortName())+ "String_Node_Str"+ Formatter.formatDatetimeFilesystemSave(new Date(System.currentTimeMillis()))+ "String_Node_Str";
  if ("String_Node_Str".equals(courseNode.getType())) {
    anonymizerCallback=course.getCourseEnvironment().getCoursePropertyManager();
  }
  final List<AssessmentResponse> responses=responseDao.getResponse(courseEntry,subIdent,testEntry,participants,allUsers,anonymUsers);
  return new OpenXMLWorkbookResource(label){
    @Override protected void generate(    OutputStream out){
      try (OpenXMLWorkbook workbook=new OpenXMLWorkbook(out,1)){
        OpenXMLWorksheet exportSheet=workbook.nextWorksheet();
        exportSheet.setHeaderRows(2);
        writeHeaders_1(exportSheet,workbook);
        writeHeaders_2(exportSheet,workbook);
        writeData(responses,exportSheet,workbook);
      }
 catch (      Exception e) {
        log.error("String_Node_Str",e);
      }
    }
  }
;
}

Fixed version (ground truth):
public MediaResource export(RepositoryEntry courseEntry,String subIdent,RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File unzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(unzippedDirRoot,false,false);
  ICourse course=CourseFactory.loadCourse(courseEntry);
  CourseNode courseNode=course.getRunStructure().getNode(subIdent);
  String label=courseNode.getType() + "String_Node_Str" + StringHelper.transformDisplayNameToFileSystemName(courseNode.getShortName())+ "String_Node_Str"+ Formatter.formatDatetimeFilesystemSave(new Date(System.currentTimeMillis()))+ "String_Node_Str";
  if ("String_Node_Str".equals(courseNode.getType())) {
    anonymizerCallback=course.getCourseEnvironment().getCoursePropertyManager();
  }
  final List<AssessmentResponse> responses=responseDao.getResponse(courseEntry,subIdent,testEntry,participants,allUsers,anonymUsers);
  return new OpenXMLWorkbookResource(label){
    @Override protected void generate(    OutputStream out){
      try (OpenXMLWorkbook workbook=new OpenXMLWorkbook(out,1)){
        OpenXMLWorksheet exportSheet=workbook.nextWorksheet();
        exportSheet.setHeaderRows(2);
        writeHeaders_1(exportSheet,workbook);
        writeHeaders_2(exportSheet,workbook);
        writeData(responses,exportSheet,workbook);
      }
 catch (      Exception e) {
        log.error("String_Node_Str",e);
      }
    }
  }
;
}
Program: 69406
Project: 69406
Buggy source:
public AssessmentResultController(UserRequest ureq,WindowControl wControl,Identity assessedIdentity,boolean anonym,AssessmentTestSession candidateSession,ShowResultsOnFinish resultsOnfinish,File fUnzippedDirRoot,String mapperUri){
  super(ureq,wControl,"String_Node_Str");
  this.anonym=anonym;
  this.mapperUri=mapperUri;
  this.resultsOnfinish=resultsOnfinish;
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  assessmentObjectUri=qtiService.createAssessmentObjectUri(fUnzippedDirRoot);
  if (!anonym && assessedIdentity != null) {
    assessedIdentityInfosCtrl=new UserShortDescription(ureq,getWindowControl(),assessedIdentity);
    listenTo(assessedIdentityInfosCtrl);
  }
  resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false);
  testSessionState=qtiService.loadTestSessionState(candidateSession);
  assessmentResult=qtiService.getAssessmentResult(candidateSession);
  candidateSessionContext=new TerminatedStaticCandidateSessionContext(candidateSession);
  initForm(ureq);
}

Fixed version (ground truth):
public AssessmentResultController(UserRequest ureq,WindowControl wControl,Identity assessedIdentity,boolean anonym,AssessmentTestSession candidateSession,ShowResultsOnFinish resultsOnfinish,File fUnzippedDirRoot,String mapperUri){
  super(ureq,wControl,"String_Node_Str");
  this.anonym=anonym;
  this.mapperUri=mapperUri;
  this.resultsOnfinish=resultsOnfinish;
  ResourceLocator fileResourceLocator=new PathResourceLocator(fUnzippedDirRoot.toPath());
  inputResourceLocator=ImsQTI21Resource.createResolvingResourceLocator(fileResourceLocator);
  assessmentObjectUri=qtiService.createAssessmentObjectUri(fUnzippedDirRoot);
  if (!anonym && assessedIdentity != null) {
    assessedIdentityInfosCtrl=new UserShortDescription(ureq,getWindowControl(),assessedIdentity);
    listenTo(assessedIdentityInfosCtrl);
  }
  resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false,false);
  testSessionState=qtiService.loadTestSessionState(candidateSession);
  assessmentResult=qtiService.getAssessmentResult(candidateSession);
  candidateSessionContext=new TerminatedStaticCandidateSessionContext(candidateSession);
  initForm(ureq);
}
Program: 69408
Project: 69408
Buggy source:
private AssessableResource getAssessableElement(RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File fUnzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  ResolvedAssessmentTest resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false);
  AssessmentTest assessmentTest=resolvedAssessmentTest.getRootNodeLookup().extractIfSuccessful();
  Double maxScore=QtiNodesExtractor.extractMaxScore(assessmentTest);
  Double minScore=QtiNodesExtractor.extractMinScore(assessmentTest);
  boolean hasScore=assessmentTest.getOutcomeDeclaration(QTI21Constants.SCORE_IDENTIFIER) != null;
  boolean hasPassed=assessmentTest.getOutcomeDeclaration(QTI21Constants.PASS_IDENTIFIER) != null;
  return new AssessableResource(hasScore,hasPassed,true,true,minScore,maxScore,null);
}

Fixed version (ground truth):
private AssessableResource getAssessableElement(RepositoryEntry testEntry){
  FileResourceManager frm=FileResourceManager.getInstance();
  File fUnzippedDirRoot=frm.unzipFileResource(testEntry.getOlatResource());
  ResolvedAssessmentTest resolvedAssessmentTest=qtiService.loadAndResolveAssessmentTest(fUnzippedDirRoot,false,false);
  AssessmentTest assessmentTest=resolvedAssessmentTest.getRootNodeLookup().extractIfSuccessful();
  Double maxScore=QtiNodesExtractor.extractMaxScore(assessmentTest);
  Double minScore=QtiNodesExtractor.extractMinScore(assessmentTest);
  boolean hasScore=assessmentTest.getOutcomeDeclaration(QTI21Constants.SCORE_IDENTIFIER) != null;
  boolean hasPassed=assessmentTest.getOutcomeDeclaration(QTI21Constants.PASS_IDENTIFIER) != null;
  return new AssessableResource(hasScore,hasPassed,true,true,minScore,maxScore,null);
}
Program: 69409
Project: 69409
Buggy source:
@Override public Media createMedia(AbstractArtefact artefact){
  String title=artefact.getTitle();
  String description=artefact.getDescription();
  String xml=artefact.getFulltextContent();
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  return mediaDao.createMedia(title,description,xml,EFF_MEDIA,businessPath,artefact.getSignature(),artefact.getAuthor());
}

Fixed version (ground truth):
@Override public Media createMedia(AbstractArtefact artefact){
  String title=artefact.getTitle();
  String description=artefact.getDescription();
  String xml=artefact.getFulltextContent();
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  return mediaDao.createMedia(title,description,xml,EFF_MEDIA,businessPath,artefact.getKey().toString(),artefact.getSignature(),artefact.getAuthor());
}
Program: 69413
Project: 69413
Buggy source:
@Override public Media createMedia(AbstractArtefact artefact){
  VFSContainer artefactFolder=oldPortfolioManager.getArtefactContainer(artefact);
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  Media media=mediaDao.createMedia(artefact.getTitle(),artefact.getDescription(),null,FORUM_HANDLER,businessPath,artefact.getSignature(),artefact.getAuthor());
  List<VFSItem> items=artefactFolder.getItems(new SystemItemFilter());
  if (items.size() > 0) {
    File mediaDir=fileStorage.generateMediaSubDirectory(media);
    String storagePath=fileStorage.getRelativePath(mediaDir);
    mediaDao.updateStoragePath(media,storagePath,null);
    VFSContainer mediaContainer=fileStorage.getMediaContainer(media);
    VFSManager.copyContent(artefactFolder,mediaContainer);
  }
  return media;
}

Fixed version (ground truth):
@Override public Media createMedia(AbstractArtefact artefact){
  VFSContainer artefactFolder=oldPortfolioManager.getArtefactContainer(artefact);
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  Media media=mediaDao.createMedia(artefact.getTitle(),artefact.getDescription(),null,FORUM_HANDLER,businessPath,artefact.getKey().toString(),artefact.getSignature(),artefact.getAuthor());
  List<VFSItem> items=artefactFolder.getItems(new SystemItemFilter());
  if (items.size() > 0) {
    File mediaDir=fileStorage.generateMediaSubDirectory(media);
    String storagePath=fileStorage.getRelativePath(mediaDir);
    mediaDao.updateStoragePath(media,storagePath,null);
    VFSContainer mediaContainer=fileStorage.getMediaContainer(media);
    VFSManager.copyContent(artefactFolder,mediaContainer);
  }
  return media;
}
Program: 69414
Project: 69414
Buggy source:
@Override public Media createMedia(AbstractArtefact artefact){
  Media media=null;
  if (artefact instanceof FileArtefact) {
    VFSContainer artefactFolder=oldPortfolioManager.getArtefactContainer(artefact);
    String filename=((FileArtefact)artefact).getFilename();
    String extension=FileUtils.getFileSuffix(filename);
    String type=FILE_TYPE;
    if ("String_Node_Str".equalsIgnoreCase(extension) || "String_Node_Str".equalsIgnoreCase(extension) || "String_Node_Str".equalsIgnoreCase(extension)|| "String_Node_Str".equalsIgnoreCase(extension)) {
      type=ImageHandler.IMAGE_TYPE;
    }
    String businessPath=artefact.getBusinessPath();
    if (businessPath == null) {
      businessPath="String_Node_Str";
    }
    media=mediaDao.createMedia(artefact.getTitle(),artefact.getDescription(),filename,type,businessPath,artefact.getSignature(),artefact.getAuthor());
    File mediaDir=fileStorage.generateMediaSubDirectory(media);
    String storagePath=fileStorage.getRelativePath(mediaDir);
    mediaDao.updateStoragePath(media,storagePath,filename);
    VFSContainer mediaContainer=fileStorage.getMediaContainer(media);
    VFSManager.copyContent(artefactFolder,mediaContainer);
  }
  return media;
}

Fixed version (ground truth):
@Override public Media createMedia(AbstractArtefact artefact){
  Media media=null;
  if (artefact instanceof FileArtefact) {
    VFSContainer artefactFolder=oldPortfolioManager.getArtefactContainer(artefact);
    String filename=((FileArtefact)artefact).getFilename();
    String extension=FileUtils.getFileSuffix(filename);
    String type=FILE_TYPE;
    if ("String_Node_Str".equalsIgnoreCase(extension) || "String_Node_Str".equalsIgnoreCase(extension) || "String_Node_Str".equalsIgnoreCase(extension)|| "String_Node_Str".equalsIgnoreCase(extension)) {
      type=ImageHandler.IMAGE_TYPE;
    }
    String businessPath=artefact.getBusinessPath();
    if (businessPath == null) {
      businessPath="String_Node_Str";
    }
    media=mediaDao.createMedia(artefact.getTitle(),artefact.getDescription(),filename,type,businessPath,artefact.getKey().toString(),artefact.getSignature(),artefact.getAuthor());
    File mediaDir=fileStorage.generateMediaSubDirectory(media);
    String storagePath=fileStorage.getRelativePath(mediaDir);
    mediaDao.updateStoragePath(media,storagePath,filename);
    VFSContainer mediaContainer=fileStorage.getMediaContainer(media);
    VFSManager.copyContent(artefactFolder,mediaContainer);
  }
  return media;
}
Program: 69415
Project: 69415
Buggy source:
@Override public Media createMedia(AbstractArtefact artefact){
  String title=artefact.getTitle();
  String description=artefact.getDescription();
  String content=artefact.getFulltextContent();
  if (!StringHelper.containsNonWhitespace(content)) {
    content=oldPortfolioManager.getArtefactFullTextContent(artefact);
  }
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  return mediaDao.createMedia(title,description,content,TEXT_MEDIA,businessPath,artefact.getSignature(),artefact.getAuthor());
}

Fixed version (ground truth):
@Override public Media createMedia(AbstractArtefact artefact){
  String title=artefact.getTitle();
  String description=artefact.getDescription();
  String content=artefact.getFulltextContent();
  if (!StringHelper.containsNonWhitespace(content)) {
    content=oldPortfolioManager.getArtefactFullTextContent(artefact);
  }
  String businessPath=artefact.getBusinessPath();
  if (businessPath == null) {
    businessPath="String_Node_Str";
  }
  return mediaDao.createMedia(title,description,content,TEXT_MEDIA,businessPath,artefact.getKey().toString(),artefact.getSignature(),artefact.getAuthor());
}
Program: 69416
Project: 69416
Buggy source:
public Media createMedia(String title,String description,String content,String type,String businessPath,int signature,Identity author){
  MediaImpl media=new MediaImpl();
  media.setCreationDate(new Date());
  media.setCollectionDate(media.getCreationDate());
  media.setType(type);
  media.setTitle(title);
  media.setDescription(description);
  media.setContent(content);
  media.setSignature(signature);
  media.setBusinessPath(businessPath);
  media.setAuthor(author);
  dbInstance.getCurrentEntityManager().persist(media);
  return media;
}

Fixed version (ground truth):
/** 
 * @param title
 * @param description
 * @param content
 * @param type
 * @param businessPath
 * @param referenceId Some external id
 * @param signature
 * @param author
 * @return
 */
public Media createMedia(String title,String description,String content,String type,String businessPath,String referenceId,int signature,Identity author){
  MediaImpl media=new MediaImpl();
  media.setCreationDate(new Date());
  media.setCollectionDate(media.getCreationDate());
  media.setType(type);
  media.setReferenceId(referenceId);
  media.setTitle(title);
  media.setDescription(description);
  media.setContent(content);
  media.setSignature(signature);
  media.setBusinessPath(businessPath);
  media.setAuthor(author);
  dbInstance.getCurrentEntityManager().persist(media);
  return media;
}
Program: 69417
Project: 69417
Buggy source:
/** 
 * @return
 */
float getActual(){
  return actual;
}

Fixed version (ground truth):
/** 
 * @return
 */
public float getActual(){
  return actual;
}
Program: 69418
Project: 69418
Buggy source:
String getInfo(){
  return info;
}

Fixed version (ground truth):
public String getInfo(){
  return info;
}
Program: 69419
Project: 69419
Buggy source:
/** 
 * @return
 */
float getMax(){
  return max;
}

Fixed version (ground truth):
/** 
 * @return
 */
public float getMax(){
  return max;
}
Program: 69420
Project: 69420
Buggy source:
/** 
 * @return
 */
String getUnitLabel(){
  return unitLabel;
}

Fixed version (ground truth):
/** 
 * @return
 */
public String getUnitLabel(){
  return unitLabel;
}
Program: 69421
Project: 69421
Buggy source:
/** 
 * @return
 */
int getWidth(){
  return width;
}

Fixed version (ground truth):
/** 
 * @return
 */
public int getWidth(){
  return width;
}
Program: 69422
Project: 69422
Buggy source:
/** 
 * @param i
 */
public void setWidth(int i){
  width=i;
}

Fixed version (ground truth):
/** 
 * @param i
 */
public void setWidth(int width){
  this.width=width;
}
Program: 69423
Project: 69423
Buggy source:
boolean getIsNoMax(){
  return isNoMax;
}

Fixed version (ground truth):
public boolean getIsNoMax(){
  return isNoMax;
}
Program: 69424
Project: 69424
Buggy source:
public ComponentRenderer getHTMLRendererSingleton(){
  return RENDERER;
}

Fixed version (ground truth):
@Override public ComponentRenderer getHTMLRendererSingleton(){
  return RENDERER;
}
Program: 69425
Project: 69425
Buggy source:
/** 
 * @see org.olat.core.gui.components.Component#dispatchRequest(org.olat.core.gui.UserRequest)
 */
protected void doDispatchRequest(UserRequest ureq){
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.components.Component#dispatchRequest(org.olat.core.gui.UserRequest)
 */
@Override protected void doDispatchRequest(UserRequest ureq){
}
Program: 69427
Project: 69427
Buggy source:
private void render(StringOutput sb,AssessmentNodeData row){
  String type=row.getType();
  String title=row.getShortTitle();
  String altText=row.getLongTitle();
  String cssClass=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type).getIconCSSClass();
  if (isIndentationEnabled()) {
    appendIndent(sb,row.getRecursionLevel());
  }
  sb.append("String_Node_Str").append(cssClass).append("String_Node_Str");
  if (altText != null) {
    sb.append("String_Node_Str").append(StringHelper.escapeHtml(altText));
  }
  sb.append("String_Node_Str").append(StringHelper.escapeHtml(title)).append("String_Node_Str");
}

Fixed version (ground truth):
private void render(StringOutput sb,AssessmentNodeData row){
  String type=row.getType();
  String title=row.getShortTitle();
  String altText=row.getLongTitle();
  String cssClass=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type).getIconCSSClass();
  if (isIndentationEnabled()) {
    appendIndent(sb,row.getRecursionLevel());
  }
  sb.append("String_Node_Str").append(cssClass).append("String_Node_Str");
  if (altText != null) {
    sb.append("String_Node_Str").append(StringHelper.escapeHtml(altText)).append("String_Node_Str");
  }
  sb.append("String_Node_Str").append(StringHelper.escapeHtml(title)).append("String_Node_Str");
}
Program: 69428
Project: 69428
Buggy source:
/** 
 * @see org.olat.core.gui.components.table.CustomCellRenderer#render(org.olat.core.gui.render.StringOutput,org.olat.core.gui.render.Renderer,java.lang.Object,java.util.Locale,int,java.lang.String)
 */
public void render(StringOutput sb,Renderer renderer,Object val,Locale locale,int alignment,String action){
  int indent;
  String type;
  String title;
  String altText;
  if (val instanceof Map) {
    Map nodeData=(Map)val;
    Integer indentObj=(Integer)nodeData.get(AssessmentHelper.KEY_INDENT);
    indent=(indentObj == null ? 0 : indentObj.intValue());
    type=(String)nodeData.get(AssessmentHelper.KEY_TYPE);
    title=(String)nodeData.get(AssessmentHelper.KEY_TITLE_SHORT);
    altText=(String)nodeData.get(AssessmentHelper.KEY_TITLE_LONG);
  }
 else   if (val instanceof NodeTableRow) {
    NodeTableRow row=(NodeTableRow)val;
    indent=row.getIndent();
    type=row.getType();
    title=row.getShortTitle();
    altText=row.getLongTitle();
  }
 else {
    return;
  }
  String cssClass=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type).getIconCSSClass();
  if (isIndentationEnabled()) {
    appendIndent(sb,indent);
  }
  sb.append("String_Node_Str").append(cssClass).append("String_Node_Str");
  if (altText != null) {
    sb.append("String_Node_Str").append(StringHelper.escapeHtml(altText));
  }
  sb.append("String_Node_Str");
  sb.append(StringHelper.escapeHtml(title));
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.components.table.CustomCellRenderer#render(org.olat.core.gui.render.StringOutput,org.olat.core.gui.render.Renderer,java.lang.Object,java.util.Locale,int,java.lang.String)
 */
public void render(StringOutput sb,Renderer renderer,Object val,Locale locale,int alignment,String action){
  int indent;
  String type;
  String title;
  String altText;
  if (val instanceof Map) {
    Map nodeData=(Map)val;
    Integer indentObj=(Integer)nodeData.get(AssessmentHelper.KEY_INDENT);
    indent=(indentObj == null ? 0 : indentObj.intValue());
    type=(String)nodeData.get(AssessmentHelper.KEY_TYPE);
    title=(String)nodeData.get(AssessmentHelper.KEY_TITLE_SHORT);
    altText=(String)nodeData.get(AssessmentHelper.KEY_TITLE_LONG);
  }
 else   if (val instanceof NodeTableRow) {
    NodeTableRow row=(NodeTableRow)val;
    indent=row.getIndent();
    type=row.getType();
    title=row.getShortTitle();
    altText=row.getLongTitle();
  }
 else {
    return;
  }
  String cssClass=CourseNodeFactory.getInstance().getCourseNodeConfigurationEvenForDisabledBB(type).getIconCSSClass();
  if (isIndentationEnabled()) {
    appendIndent(sb,indent);
  }
  sb.append("String_Node_Str").append(cssClass).append("String_Node_Str");
  if (altText != null) {
    sb.append("String_Node_Str").append(StringHelper.escapeHtml(altText)).append("String_Node_Str");
  }
  sb.append("String_Node_Str");
  sb.append(StringHelper.escapeHtml(title));
  sb.append("String_Node_Str");
}
Program: 69430
Project: 69430
Buggy source:
protected <X>ModulePropertyValue<X> valueOf(ModuleProperty<X> key){
  Class<X> klass=key.rawType();
  X val=null;
  String name=key.name();
  if (klass == Boolean.class) {
    Boolean b=(key.hasDefault() ? config.getBooleanSafe(key(name),(boolean)(key.getDefault())) : config.getBooleanEntry(key(name)));
    val=klass.cast(b);
  }
 else   if (klass == Float.class) {
    Float f=config.getFloatEntry(key(name));
    val=klass.cast(f);
  }
 else   if (klass == Integer.class) {
    if (!key.hasDefault()) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    Integer i=config.getIntegerSafe(key(name),(int)key.getDefault());
    val=klass.cast(i);
  }
 else   if (klass == Date.class) {
    Date d=config.getDateValue(key(name));
    val=klass.cast(d);
  }
 else {
    val=klass.cast(get(name));
  }
  return new ModulePropertyValue<X>(val,key);
}

Fixed version (ground truth):
protected <X>ModulePropertyValue<X> valueOf(ModuleProperty<X> key){
  Class<X> klass=key.rawType();
  X val=null;
  String name=key.name();
  if (klass == Boolean.class) {
    Boolean b=(key.hasDefault() ? config.getBooleanSafe(key(name),(Boolean)(key.getDefault())) : config.getBooleanEntry(key(name)));
    val=klass.cast(b);
  }
 else   if (klass == Float.class) {
    Float f=config.getFloatEntry(key(name));
    val=klass.cast(f);
  }
 else   if (klass == Integer.class) {
    if (!key.hasDefault()) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    Integer i=config.getIntegerSafe(key(name),(Integer)key.getDefault());
    val=klass.cast(i);
  }
 else   if (klass == Date.class) {
    Date d=config.getDateValue(key(name));
    val=klass.cast(d);
  }
 else {
    val=klass.cast(get(name));
  }
  return new ModulePropertyValue<X>(val,key);
}
Program: 69431
Project: 69431
Buggy source:
@Override protected void event(UserRequest ureq,Component source,Event event){
  if (source == mainVC) {
    String cmd=event.getCommand();
    if (StringHelper.containsNonWhitespace(cmd)) {
      String currentTime=ureq.getHttpReq().getParameter("String_Node_Str");
      String src=ureq.getHttpReq().getParameter("String_Node_Str");
      logDebug(cmd + "String_Node_Str" + currentTime+ "String_Node_Str"+ src,null);
switch (cmd) {
case "String_Node_Str":
        fireEvent(ureq,new VideoEvent(VideoEvent.PLAY,currentTime));
case "String_Node_Str":
      fireEvent(ureq,new VideoEvent(VideoEvent.PAUSE,currentTime));
case "String_Node_Str":
    fireEvent(ureq,new VideoEvent(VideoEvent.SEEKED,currentTime));
case "String_Node_Str":
  fireEvent(ureq,new VideoEvent(VideoEvent.ENDED,currentTime));
}
updateGUIPreferences(ureq,src);
}
}
}

Fixed version (ground truth):
@Override protected void event(UserRequest ureq,Component source,Event event){
  if (source == mainVC) {
    String cmd=event.getCommand();
    if (StringHelper.containsNonWhitespace(cmd)) {
      String currentTime=ureq.getHttpReq().getParameter("String_Node_Str");
      String src=ureq.getHttpReq().getParameter("String_Node_Str");
      logDebug(cmd + "String_Node_Str" + currentTime+ "String_Node_Str"+ src,null);
switch (cmd) {
case "String_Node_Str":
        fireEvent(ureq,new VideoEvent(VideoEvent.PLAY,currentTime));
      break;
case "String_Node_Str":
    fireEvent(ureq,new VideoEvent(VideoEvent.PAUSE,currentTime));
  break;
case "String_Node_Str":
fireEvent(ureq,new VideoEvent(VideoEvent.SEEKED,currentTime));
break;
case "String_Node_Str":
fireEvent(ureq,new VideoEvent(VideoEvent.ENDED,currentTime));
break;
}
updateGUIPreferences(ureq,src);
}
}
}
Program: 69432
Project: 69432
Buggy source:
/** 
 * @param moduleConfiguration
 * @return boolean
 */
public static boolean isModuleConfigValid(ModuleConfiguration moduleConfiguration){
  return (moduleConfiguration.get(CONFIG_KEY_REPOSITORY_SOFTKEY) != null);
}

Fixed version (ground truth):
/** 
 * @param moduleConfiguration
 * @return boolean
 */
public static boolean isModuleConfigValid(ModuleConfiguration moduleConfiguration){
  boolean isValid=moduleConfiguration.get(CONFIG_KEY_REPOSITORY_SOFTKEY) != null;
  if (isValid) {
    Object repoEntry=getVideoReference(moduleConfiguration,false);
    if (repoEntry == null) {
      isValid=false;
      removeVideoReference(moduleConfiguration);
    }
  }
  return isValid;
}
Program: 69434
Project: 69434
Buggy source:
public final void build(){
  List<OutcomeDeclaration> outcomeDeclarations=assessmentItem.getOutcomeDeclarations();
  outcomeDeclarations.clear();
  ResponseProcessing responseProcessing=assessmentItem.getResponseProcessing();
  List<ResponseRule> responseRules=responseProcessing.getResponseRules();
  responseRules.clear();
  List<ResponseDeclaration> responseDeclarations=assessmentItem.getResponseDeclarations();
  responseDeclarations.clear();
  buildResponseDeclaration();
  buildItemBody();
  buildModalFeedback(outcomeDeclarations,responseRules);
  buildScores(outcomeDeclarations,responseRules);
  buildMainScoreRule(outcomeDeclarations,responseRules);
}

Fixed version (ground truth):
public final void build(){
  List<OutcomeDeclaration> outcomeDeclarations=assessmentItem.getOutcomeDeclarations();
  outcomeDeclarations.clear();
  ResponseProcessing responseProcessing=assessmentItem.getResponseProcessing();
  List<ResponseRule> responseRules=responseProcessing.getResponseRules();
  responseRules.clear();
  List<ResponseDeclaration> responseDeclarations=assessmentItem.getResponseDeclarations();
  responseDeclarations.clear();
  buildItemBody();
  buildResponseDeclaration();
  buildModalFeedback(outcomeDeclarations,responseRules);
  buildScores(outcomeDeclarations,responseRules);
  buildMainScoreRule(outcomeDeclarations,responseRules);
}
Program: 69435
Project: 69435
Buggy source:
public void clearSimpleChoices(){
  if (choices != null) {
    choices.clear();
    ;
  }
}

Fixed version (ground truth):
public void clearSimpleChoices(){
  if (choices != null) {
    choices.clear();
  }
}
Program: 69436
Project: 69436
Buggy source:
@Override protected void buildItemBody(){
  List<Block> blocks=assessmentItem.getItemBody().getBlocks();
  blocks.clear();
  getHtmlHelper().appendHtml(assessmentItem.getItemBody(),question);
  List<Interaction> interactions=assessmentItem.getItemBody().findInteractions();
  for (  Interaction interaction : interactions) {
    if (interaction instanceof TextEntryInteraction && interaction.getResponseIdentifier() != null) {
      TextEntryInteraction textEntryInteraction=(TextEntryInteraction)interaction;
      AbstractEntry entry=responseIdentifierToTextEntry.get(interaction.getResponseIdentifier().toString());
      textEntryInteraction.setPlaceholderText(entry.getPlaceholder());
      textEntryInteraction.setExpectedLength(entry.getExpectedLength());
    }
  }
}

Fixed version (ground truth):
@Override protected void buildItemBody(){
  List<Block> blocks=assessmentItem.getItemBody().getBlocks();
  blocks.clear();
  getHtmlHelper().appendHtml(assessmentItem.getItemBody(),question);
  List<Interaction> interactions=assessmentItem.getItemBody().findInteractions();
  List<String> usedResponseIdentifiers=new ArrayList<>(interactions.size());
  for (  Interaction interaction : interactions) {
    if (interaction instanceof TextEntryInteraction && interaction.getResponseIdentifier() != null) {
      TextEntryInteraction textEntryInteraction=(TextEntryInteraction)interaction;
      String responseIdentifier=interaction.getResponseIdentifier().toString();
      AbstractEntry entry=responseIdentifierToTextEntry.get(responseIdentifier);
      textEntryInteraction.setPlaceholderText(entry.getPlaceholder());
      textEntryInteraction.setExpectedLength(entry.getExpectedLength());
      usedResponseIdentifiers.add(responseIdentifier);
    }
  }
  List<String> mappedResponseIdentifiers=new ArrayList<>(responseIdentifierToTextEntry.keySet());
  mappedResponseIdentifiers.removeAll(usedResponseIdentifiers);
  for (  String mappedResponseIdentifier : mappedResponseIdentifiers) {
    responseIdentifierToTextEntry.remove(mappedResponseIdentifier);
  }
}
Program: 69438
Project: 69438
Buggy source:
@Override public void sync(UserRequest ureq,AssessmentItemBuilder assessmentItemBuilder){
  if (itemBuilder == assessmentItemBuilder) {
    for (    SimpleChoice choice : itemBuilder.getSimpleChoices()) {
      SimpleChoiceWrapper wrapper=getSimpleChoiceWrapper(choice);
      if (wrapper == null) {
        wrappers.add(createSimpleChoiceWrapper(choice));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void sync(UserRequest ureq,AssessmentItemBuilder assessmentItemBuilder){
  if (itemBuilder == assessmentItemBuilder) {
    for (    SimpleChoice choice : itemBuilder.getSimpleChoices()) {
      SimpleChoiceWrapper wrapper=getSimpleChoiceWrapper(choice);
      if (wrapper == null) {
        wrappers.add(createSimpleChoiceWrapper(choice));
      }
    }
    for (Iterator<SimpleChoiceWrapper> wrapperIt=wrappers.iterator(); wrapperIt.hasNext(); ) {
      Identifier choiceIdentifier=wrapperIt.next().getChoice().getIdentifier();
      if (itemBuilder.getSimpleChoice(choiceIdentifier) == null) {
        wrapperIt.remove();
      }
    }
  }
}
Program: 69440
Project: 69440
Buggy source:
public QTI21AssessmentRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,IQTESTCourseNode 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();
  config=courseNode.getModuleConfiguration();
  singleUserEventCenter=ureq.getUserSession().getSingleUserEventCenter();
  mainVC=createVelocityContainer("String_Node_Str");
  init();
  initAssessment(ureq);
  putInitialPanel(mainVC);
}

Fixed version (ground truth):
public QTI21AssessmentRunController(UserRequest ureq,WindowControl wControl,UserCourseEnvironment userCourseEnv,IQTESTCourseNode 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();
  config=courseNode.getModuleConfiguration();
  testEntry=courseNode.getReferencedRepositoryEntry();
  singleUserEventCenter=ureq.getUserSession().getSingleUserEventCenter();
  mainVC=createVelocityContainer("String_Node_Str");
  deliveryOptions=getDeliveryOptions();
  init();
  initAssessment(ureq);
  putInitialPanel(mainVC);
}
Program: 69441
Project: 69441
Buggy source:
private QTI21DeliveryOptions getDeliveryOptions(RepositoryEntry testEntry){
  QTI21DeliveryOptions testOptions=qtiService.getDeliveryOptions(testEntry);
  QTI21DeliveryOptions deliveryOptions=testOptions.clone();
  deliveryOptions.setShowTitles(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONTITLE),testOptions.isShowTitles()));
  deliveryOptions.setPersonalNotes(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_MEMO),testOptions.isPersonalNotes()));
  deliveryOptions.setEnableCancel(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_ENABLECANCEL),testOptions.isEnableCancel()));
  deliveryOptions.setEnableSuspend(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_ENABLESUSPEND),testOptions.isEnableSuspend()));
  deliveryOptions.setDisplayQuestionProgress(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_QUESTIONPROGRESS),testOptions.isDisplayQuestionProgress()));
  deliveryOptions.setDisplayScoreProgress(mergeBoolean(config.getBooleanEntry(IQEditController.CONFIG_KEY_SCOREPROGRESS),testOptions.isDisplayScoreProgress()));
  return deliveryOptions;
}

Fixed version (ground truth):
private QTI21DeliveryOptions getDeliveryOptions(){
  QTI21DeliveryOptions testOptions=qtiService.getDeliveryOptions(testEntry);
  QTI21DeliveryOptions finalOptions=testOptions.clone();
  finalOptions.setMaxAttempts(config.getIntegerSafe(IQEditController.CONFIG_KEY_ATTEMPTS,testOptions.getMaxAttempts()));
  finalOptions.setBlockAfterSuccess(config.getBooleanSafe(IQEditController.CONFIG_KEY_QUESTIONTITLE,testOptions.isBlockAfterSuccess()));
  finalOptions.setShowTitles(config.getBooleanSafe(IQEditController.CONFIG_KEY_QUESTIONTITLE,testOptions.isShowTitles()));
  finalOptions.setPersonalNotes(config.getBooleanSafe(IQEditController.CONFIG_KEY_MEMO,testOptions.isPersonalNotes()));
  finalOptions.setEnableCancel(config.getBooleanSafe(IQEditController.CONFIG_KEY_ENABLECANCEL,testOptions.isEnableCancel()));
  finalOptions.setEnableSuspend(config.getBooleanSafe(IQEditController.CONFIG_KEY_ENABLESUSPEND,testOptions.isEnableSuspend()));
  finalOptions.setDisplayQuestionProgress(config.getBooleanSafe(IQEditController.CONFIG_KEY_QUESTIONPROGRESS,testOptions.isDisplayQuestionProgress()));
  finalOptions.setDisplayScoreProgress(config.getBooleanSafe(IQEditController.CONFIG_KEY_SCOREPROGRESS,testOptions.isDisplayScoreProgress()));
  return finalOptions;
}