nus-yam/ex-repair huggingface dataset:
Program: 69766
Project: 69766
Buggy source:
@Override public void reloadData(){
  if (dataSource != null) {
    dataSource.load(0,getPageSize());
  }
}

Fixed version (ground truth):
@Override public void reloadData(){
  if (dataSource != null) {
    dataSource.clear();
    dataSource.load(getSearchText(),getConditionalQueries(),0,getPageSize());
  }
}
Program: 69767
Project: 69767
Buggy source:
protected void evalSearchRequest(UserRequest ureq){
  if (searchFieldEl == null)   return;
  searchFieldEl.evalFormRequest(ureq);
  String search=searchFieldEl.getValue();
  if (StringHelper.containsNonWhitespace(search)) {
    doSearch(ureq,search,null);
  }
 else {
    doResetSearch(ureq);
  }
}

Fixed version (ground truth):
protected void evalSearchRequest(UserRequest ureq){
  if (searchFieldEl == null)   return;
  searchFieldEl.evalFormRequest(ureq);
  String search=searchFieldEl.getValue();
  if (StringHelper.containsNonWhitespace(search)) {
    doSearch(search,null);
  }
 else {
    doResetSearch(ureq);
  }
}
Program: 69768
Project: 69768
Buggy source:
@Override public Set<Integer> getMultiSelectedIndex(){
  if (allSelectedIndex && dataSource != null) {
    dataSource.load(0,-1);
    Set<Integer> allIndex=new HashSet<Integer>();
    for (int i=dataModel.getRowCount(); i-- > 0; ) {
      allIndex.add(new Integer(i));
    }
    return allIndex;
  }
  return multiSelectedIndex == null ? Collections.<Integer>emptySet() : multiSelectedIndex;
}

Fixed version (ground truth):
@Override public Set<Integer> getMultiSelectedIndex(){
  if (allSelectedIndex && dataSource != null) {
    dataSource.load(getSearchText(),getConditionalQueries(),0,-1);
    Set<Integer> allIndex=new HashSet<Integer>();
    for (int i=dataModel.getRowCount(); i-- > 0; ) {
      allIndex.add(new Integer(i));
    }
    return allIndex;
  }
  return multiSelectedIndex == null ? Collections.<Integer>emptySet() : multiSelectedIndex;
}
Program: 69769
Project: 69769
Buggy source:
protected void evalExtendedSearch(UserRequest ureq){
  String search=null;
  if (searchFieldEl != null) {
    searchFieldEl.evalFormRequest(ureq);
    search=searchFieldEl.getValue();
  }
  List<String> condQueries=extendedSearchCtrl.getConditionalQueries();
  doSearch(ureq,search,condQueries);
}

Fixed version (ground truth):
protected void evalExtendedSearch(UserRequest ureq){
  String search=null;
  if (searchFieldEl != null) {
    searchFieldEl.evalFormRequest(ureq);
    search=searchFieldEl.getValue();
  }
  List<String> condQueries=extendedSearchCtrl.getConditionalQueries();
  doSearch(search,condQueries);
}
Program: 69770
Project: 69770
Buggy source:
protected void doResetSearch(UserRequest ureq){
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    dataSource.load(0,getPageSize());
  }
}

Fixed version (ground truth):
protected void doResetSearch(UserRequest ureq){
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    dataSource.load(null,null,0,getPageSize());
  }
}
Program: 69772
Project: 69772
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnsModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.id.i18nKey(),Cols.id.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.licenseKey.i18nKey(),Cols.licenseKey.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer delRenderer=new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("String_Node_Str"),"String_Node_Str"),null);
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",Cols.deletable.ordinal(),"String_Node_Str",delRenderer));
  model=new QItemTypeDataModel(columnsModel);
  tableEl=uifactory.addTableElement(ureq,getWindowControl(),"String_Node_Str",model,getTranslator(),formLayout);
  uifactory.addTableElement(ureq,getWindowControl(),"String_Node_Str",model,getTranslator(),formLayout);
  tableEl.setRendererType(FlexiTableRendererType.classic);
  createType=uifactory.addFormLink("String_Node_Str",formLayout,Link.BUTTON);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnsModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.id.i18nKey(),Cols.id.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.licenseKey.i18nKey(),Cols.licenseKey.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer delRenderer=new BooleanCellRenderer(new StaticFlexiCellRenderer(translate("String_Node_Str"),"String_Node_Str"),null);
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",Cols.deletable.ordinal(),"String_Node_Str",delRenderer));
  model=new QItemTypeDataModel(columnsModel);
  tableEl=uifactory.addTableElement(ureq,getWindowControl(),"String_Node_Str",model,getTranslator(),formLayout);
  tableEl.setRendererType(FlexiTableRendererType.classic);
  createType=uifactory.addFormLink("String_Node_Str",formLayout,Link.BUTTON);
}
Program: 69773
Project: 69773
Buggy source:
@Before public void setInternalInbox(){
  inbox=mailModule.isInternSystem();
  if (!inbox) {
    mailModule.setInterSystem(true);
  }
}

Fixed version (ground truth):
@Before public void setInternalInbox(){
  inbox=mailModule.isInternSystem();
  if (!inbox) {
    mailModule.setInterSystem(true);
    sleep(500);
  }
}
Program: 69774
Project: 69774
Buggy source:
@Before public void printBanner(){
  if (started)   return;
  FrameworkStartupEventChannel.fireEvent();
  String dbVendor=DBFactory.getInstance().getDbVendor();
  postgresqlConfigured=dbVendor != null && dbVendor.startsWith("String_Node_Str");
  oracleConfigured=dbVendor != null && dbVendor.startsWith("String_Node_Str");
  System.out.println("String_Node_Str");
  printOlatLocalProperties();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  started=true;
}

Fixed version (ground truth):
@Before public void printBanner(){
  log.info("String_Node_Str" + name.getMethodName() + "String_Node_Str"+ this.getClass().getCanonicalName()+ "String_Node_Str");
  if (started) {
    return;
  }
  FrameworkStartupEventChannel.fireEvent();
  String dbVendor=DBFactory.getInstance().getDbVendor();
  postgresqlConfigured=dbVendor != null && dbVendor.startsWith("String_Node_Str");
  oracleConfigured=dbVendor != null && dbVendor.startsWith("String_Node_Str");
  System.out.println("String_Node_Str");
  printOlatLocalProperties();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  started=true;
}
Program: 69775
Project: 69775
Buggy source:
@After public void closeConnectionAfter(){
  try {
    DBFactory.getInstance().commitAndCloseSession();
  }
 catch (  Exception e) {
    e.printStackTrace();
    try {
      DBFactory.getInstance().rollbackAndCloseSession();
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@After public void closeConnectionAfter(){
  log.info("String_Node_Str" + name.getMethodName() + "String_Node_Str"+ this.getClass().getCanonicalName()+ "String_Node_Str");
  try {
    DBFactory.getInstance().commitAndCloseSession();
  }
 catch (  Exception e) {
    e.printStackTrace();
    try {
      DBFactory.getInstance().rollbackAndCloseSession();
    }
 catch (    Exception e1) {
      e1.printStackTrace();
    }
  }
}
Program: 69776
Project: 69776
Buggy source:
/** 
 * @param item
 * @return The item description with media file paths that are dispatchable bythe FeedMediaDispatcher
 */
public String getItemDescriptionForBrowser(Item item){
  feed=feedManager.getFeed(feed);
  item=feedManager.getItem(feed,item.getGuid());
  String itemDescription=item.getDescription();
  if (itemDescription != null) {
    if (feed.isExternal()) {
      Filter xssFilter=FilterFactory.getXSSFilter(itemDescription.length() + 1);
      itemDescription=xssFilter.filter(itemDescription);
    }
 else {
      String basePath=baseUri + "String_Node_Str" + item.getGuid();
      Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
      itemDescription=mediaUrlFilter.filter(itemDescription);
    }
  }
  return itemDescription;
}

Fixed version (ground truth):
/** 
 * @param item
 * @return The item description with media file paths that are dispatchable bythe FeedMediaDispatcher
 */
public String getItemDescriptionForBrowser(Item item){
  feed=feedManager.getFeed(feed);
  item=feedManager.getItem(feed,item.getGuid());
  String itemDescription=item.getDescription();
  if (itemDescription != null) {
    if (feed.isExternal()) {
      Filter xssFilter=FilterFactory.getXSSFilter(itemDescription.length() + 1);
      itemDescription=xssFilter.filter(itemDescription);
    }
 else {
      String basePath=baseUri + "String_Node_Str" + item.getGuid();
      Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
      itemDescription=mediaUrlFilter.filter(itemDescription);
    }
  }
  itemDescription=Formatter.formatLatexFormulas(itemDescription);
  return itemDescription;
}
Program: 69778
Project: 69778
Buggy source:
private String getMonthShort(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String getMonthShort(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str");
  return sb.toString();
}
Program: 69779
Project: 69779
Buggy source:
private String getMonthLong(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String getMonthLong(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str");
  return sb.toString();
}
Program: 69781
Project: 69781
Buggy source:
private String getDayLong(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String getDayLong(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str");
  return sb.toString();
}
Program: 69782
Project: 69782
Buggy source:
private String getDayShort(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str").append(translator.translate("String_Node_Str")).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String getDayShort(Translator translator){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str").append(escapeJavaScript(translator.translate("String_Node_Str"))).append("String_Node_Str");
  return sb.toString();
}
Program: 69784
Project: 69784
Buggy source:
public FlexiTableElementImpl(UserRequest ureq,String name,Translator translator,FlexiTableDataModel tableModel,FlexiTableDataSource<?> dataSource,int pageSize,boolean searchField){
  super(name);
  this.dataModel=tableModel;
  this.dataSource=dataSource;
  component=new FlexiTableComponent(this,translator);
  MapperService mapper=CoreSpringFactory.getImpl(MapperService.class);
  mapperUrl=mapper.register(ureq.getUserSession(),new FlexiTableModelMapper(component));
  this.searchField=searchField;
  if (searchField) {
    String dispatchId=component.getDispatchID();
    searchFieldEl=new TextElementImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str");
    searchFieldEl.showLabel(false);
    searchButton=new FormLinkImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str",Link.BUTTON);
    searchButton.setTranslator(translator);
    components.put("String_Node_Str",searchFieldEl);
    components.put("String_Node_Str",searchButton);
  }
  this.pageSize=pageSize;
  if (pageSize > 0) {
    setPage(0);
  }
  if (dataSource != null) {
    dataSource.load(0,pageSize);
  }
}

Fixed version (ground truth):
public FlexiTableElementImpl(UserRequest ureq,String name,Translator translator,FlexiTableDataModel tableModel,FlexiTableDataSource<?> dataSource,int pageSize,boolean searchField){
  super(name);
  this.dataModel=tableModel;
  this.dataSource=dataSource;
  component=new FlexiTableComponent(this,translator);
  MapperService mapper=CoreSpringFactory.getImpl(MapperService.class);
  mapperUrl=mapper.register(ureq.getUserSession(),new FlexiTableModelMapper(component));
  this.searchField=searchField;
  if (searchField) {
    String dispatchId=component.getDispatchID();
    searchFieldEl=new TextElementImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str");
    searchFieldEl.showLabel(false);
    searchButton=new FormLinkImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str",Link.BUTTON);
    searchButton.setTranslator(translator);
    searchButton.setCustomEnabledLinkCSS("String_Node_Str");
    components.put("String_Node_Str",searchFieldEl);
    components.put("String_Node_Str",searchButton);
  }
  this.pageSize=pageSize;
  if (pageSize > 0) {
    setPage(0);
  }
  if (dataSource != null) {
    dataSource.load(0,pageSize);
  }
}
Program: 69786
Project: 69786
Buggy source:
public QTI12PreviewController(UserRequest ureq,WindowControl wControl,QuestionItem qitem){
  super(ureq,wControl);
  qpoolService=CoreSpringFactory.getImpl(QPoolService.class);
  mainVC=createVelocityContainer("String_Node_Str");
  mainPanel=new Panel("String_Node_Str");
  VFSLeaf leaf=qpoolService.getRootFile(qitem);
  if (leaf == null) {
  }
 else {
    Item item=QTIEditHelper.readItemXml(leaf);
    if (item != null) {
      Translator translator=Util.createPackageTranslator(QTIEditorPackage.class,getLocale());
      VFSContainer directory=qpoolService.getRootDirectory(qitem);
      String mapperUrl=registerMapper(ureq,new VFSContainerMapper(directory));
      previewCtrl=new ItemPreviewController(wControl,item,mapperUrl,translator);
      listenTo(previewCtrl);
      mainPanel.setContent(previewCtrl.getInitialComponent());
      metadataCtrl=new QTI12MetadataController(ureq,getWindowControl(),item);
      listenTo(metadataCtrl);
      mainVC.put("String_Node_Str",metadataCtrl.getInitialComponent());
    }
  }
  mainVC.put("String_Node_Str",mainPanel);
  putInitialPanel(mainVC);
}

Fixed version (ground truth):
public QTI12PreviewController(UserRequest ureq,WindowControl wControl,QuestionItem qitem,boolean summary){
  super(ureq,wControl);
  qpoolService=CoreSpringFactory.getImpl(QPoolService.class);
  mainVC=createVelocityContainer("String_Node_Str");
  mainPanel=new Panel("String_Node_Str");
  VFSLeaf leaf=qpoolService.getRootFile(qitem);
  if (leaf == null) {
  }
 else {
    Item item=QTIEditHelper.readItemXml(leaf);
    if (item != null) {
      Translator translator=Util.createPackageTranslator(QTIEditorPackage.class,getLocale());
      VFSContainer directory=qpoolService.getRootDirectory(qitem);
      String mapperUrl=registerMapper(ureq,new VFSContainerMapper(directory));
      previewCtrl=new ItemPreviewController(wControl,item,mapperUrl,translator);
      listenTo(previewCtrl);
      mainPanel.setContent(previewCtrl.getInitialComponent());
      if (!summary) {
        metadataCtrl=new QTI12MetadataController(ureq,getWindowControl(),item);
        listenTo(metadataCtrl);
        mainVC.put("String_Node_Str",metadataCtrl.getInitialComponent());
      }
    }
  }
  mainVC.put("String_Node_Str",mainPanel);
  putInitialPanel(mainVC);
}
Program: 69787
Project: 69787
Buggy source:
/** 
 * @see org.olat.repository.controllers.IAddController#transactionFinishBeforeCreate()
 */
public boolean transactionFinishBeforeCreate(){
  File fTempQTI=new File(WebappHelper.getTmpDir(),CodeHelper.getUniqueID() + "String_Node_Str");
  tmpPackage=new QTIEditorPackageImpl(DUMMY_TITLE,type,locale);
  if (!tmpPackage.savePackageTo(fTempQTI))   return false;
  try {
    return (FileResourceManager.getInstance().addFileResource(fTempQTI,"String_Node_Str",resource) != null);
  }
 catch (  AddingResourceException e) {
    Tracing.logWarn("String_Node_Str",e,AddNewQTIDocumentController.class);
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.repository.controllers.IAddController#transactionFinishBeforeCreate()
 */
public boolean transactionFinishBeforeCreate(){
  File fTempQTI=new File(WebappHelper.getTmpDir(),CodeHelper.getUniqueID() + "String_Node_Str");
  tmpPackage=new QTIEditorPackageImpl(DUMMY_TITLE,type,locale);
  if (addCallback != null) {
    Object object=addCallback.getUserObject();
    if (object instanceof QItemList) {
      QItemList itemToImport=(QItemList)object;
      QTIQPoolServiceProvider provider=(QTIQPoolServiceProvider)CoreSpringFactory.getBean("String_Node_Str");
      provider.exportToEditorPackage(tmpPackage,itemToImport.getItems());
    }
  }
  if (!tmpPackage.savePackageTo(fTempQTI))   return false;
  try {
    return (FileResourceManager.getInstance().addFileResource(fTempQTI,"String_Node_Str",resource) != null);
  }
 catch (  AddingResourceException e) {
    Tracing.logWarn("String_Node_Str",e,AddNewQTIDocumentController.class);
    return false;
  }
}
Program: 69788
Project: 69788
Buggy source:
/** 
 * @param type
 * @param addCallback
 * @param ureq
 * @param wControl
 */
public AddNewQTIDocumentController(String type,RepositoryAddCallback addCallback,UserRequest ureq,WindowControl wControl){
  super(wControl);
  this.type=type;
  this.translator=new PackageTranslator(PACKAGE_REPOSITORY,ureq.getLocale());
  this.locale=ureq.getLocale();
  if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) {
    resource=new TestFileResource();
  }
 else   if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {
    resource=new SurveyFileResource();
  }
  if (addCallback != null) {
    addCallback.setResourceable(resource);
    addCallback.setDisplayName(translator.translate(resource.getResourceableTypeName()));
    addCallback.setResourceName("String_Node_Str");
    addCallback.finished(ureq);
  }
}

Fixed version (ground truth):
/** 
 * @param type
 * @param addCallback
 * @param ureq
 * @param wControl
 */
public AddNewQTIDocumentController(String type,RepositoryAddCallback addCallback,UserRequest ureq,WindowControl wControl){
  super(wControl);
  this.type=type;
  this.translator=new PackageTranslator(PACKAGE_REPOSITORY,ureq.getLocale());
  this.locale=ureq.getLocale();
  if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_ASSESS)) {
    resource=new TestFileResource();
  }
 else   if (type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {
    resource=new SurveyFileResource();
  }
  this.addCallback=addCallback;
  if (addCallback != null) {
    addCallback.setResourceable(resource);
    addCallback.setDisplayName(translator.translate(resource.getResourceableTypeName()));
    addCallback.setResourceName("String_Node_Str");
    addCallback.finished(ureq);
  }
}
Program: 69789
Project: 69789
Buggy source:
/** 
 * Package the package to the given file.
 * @param fOut
 * @return True upon success.
 */
public boolean savePackageTo(File fOut){
  saveQTIDocument(qtiDocument.getDocument());
  Set files=new HashSet(3);
  files.add(ImsRepositoryResolver.QTI_FILE);
  files.add("String_Node_Str");
  files.add("String_Node_Str");
  return ZipUtil.zip(files,packageDir,fOut,false);
}

Fixed version (ground truth):
/** 
 * Package the package to the given file.
 * @param fOut
 * @return True upon success.
 */
public boolean savePackageTo(File fOut){
  saveQTIDocument(qtiDocument.getDocument());
  Set<String> files=new HashSet<String>(3);
  files.add(ImsRepositoryResolver.QTI_FILE);
  files.add("String_Node_Str");
  files.add("String_Node_Str");
  return ZipUtil.zip(files,packageDir,fOut,false);
}
Program: 69790
Project: 69790
Buggy source:
/** 
 * Sets the sections.
 * @param sections The sections to set
 */
public void setSections(List sections){
  this.sections=sections;
}

Fixed version (ground truth):
/** 
 * Sets the sections.
 * @param sections The sections to set
 */
public void setSections(List<Section> sections){
  this.sections=sections;
}
Program: 69791
Project: 69791
Buggy source:
/** 
 * Returns the sections.
 * @return List
 */
public List getSections(){
  return sections;
}

Fixed version (ground truth):
/** 
 * Returns the sections.
 * @return List
 */
public List<Section> getSections(){
  return sections;
}
Program: 69792
Project: 69792
Buggy source:
/** 
 * Returns the items.
 * @return List
 */
public List getItems(){
  return items;
}

Fixed version (ground truth):
/** 
 * Returns the items.
 * @return List
 */
public List<Item> getItems(){
  return items;
}
Program: 69793
Project: 69793
Buggy source:
/** 
 * @see org.olat.ims.qti.editor.beecom.QTIObject#toXml()
 */
public void addToElement(Element root){
  Element section=root.addElement("String_Node_Str");
  section.addAttribute("String_Node_Str",this.ident);
  section.addAttribute("String_Node_Str",this.title);
  QTIObject obj_duration=this.getDuration();
  if (obj_duration != null) {
    obj_duration.addToElement(section);
  }
  QTIEditHelper.addObjectives(section,objectives);
  for (Iterator i=this.sectioncontrols.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
  QTIObject obj_outcomes_processing=this.getOutcomes_processing();
  if (obj_outcomes_processing != null) {
    obj_outcomes_processing.addToElement(section);
  }
  for (Iterator i=this.sectionfeedbacks.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
  SelectionOrdering selectionOrdering=this.getSelection_ordering();
  if (selectionOrdering != null) {
    selectionOrdering.addToElement(section);
  }
  for (Iterator i=this.items.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
}

Fixed version (ground truth):
/** 
 * @see org.olat.ims.qti.editor.beecom.QTIObject#toXml()
 */
public void addToElement(Element root){
  Element section=root.addElement("String_Node_Str");
  section.addAttribute("String_Node_Str",this.ident);
  section.addAttribute("String_Node_Str",this.title);
  QTIObject obj_duration=this.getDuration();
  if (obj_duration != null) {
    obj_duration.addToElement(section);
  }
  QTIEditHelper.addObjectives(section,objectives);
  for (Iterator i=this.sectioncontrols.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
  QTIObject obj_outcomes_processing=this.getOutcomes_processing();
  if (obj_outcomes_processing != null) {
    obj_outcomes_processing.addToElement(section);
  }
  for (Iterator i=this.sectionfeedbacks.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
  SelectionOrdering selectionOrdering=this.getSelection_ordering();
  if (selectionOrdering != null) {
    selectionOrdering.addToElement(section);
  }
  for (Iterator<Item> i=this.items.iterator(); i.hasNext(); ) {
    QTIObject obj=(QTIObject)i.next();
    if (obj != null) {
      obj.addToElement(section);
    }
  }
}
Program: 69794
Project: 69794
Buggy source:
public boolean checkAlienItems(){
  alienItems=false;
  for (Iterator iter=items.iterator(); iter.hasNext(); ) {
    Item element=(Item)iter.next();
    alienItems=alienItems || element.isAlient();
  }
  return alienItems;
}

Fixed version (ground truth):
public boolean checkAlienItems(){
  alienItems=false;
  for (Iterator<Item> iter=items.iterator(); iter.hasNext(); ) {
    Item element=(Item)iter.next();
    alienItems=alienItems || element.isAlient();
  }
  return alienItems;
}
Program: 69795
Project: 69795
Buggy source:
/** 
 * takes the assessment object tree and converts it to a QTIEditorTreeModel
 */
private void init(){
  Assessment ass=qtiPackage.getQTIDocument().getAssessment();
  GenericQtiNode rootNode=new AssessmentNode(ass,qtiPackage);
  this.setRootNode(rootNode);
  List sections=ass.getSections();
  for (int i=0; i < sections.size(); i++) {
    Section elem=(Section)sections.get(i);
    GenericQtiNode sectionNode=new SectionNode(elem,qtiPackage);
    List items=elem.getItems();
    for (int j=0; j < items.size(); j++) {
      Item elem2=(Item)items.get(j);
      GenericQtiNode itemNode=new ItemNode(elem2,qtiPackage);
      sectionNode.addChild(itemNode);
    }
    rootNode.addChild(sectionNode);
  }
}

Fixed version (ground truth):
/** 
 * takes the assessment object tree and converts it to a QTIEditorTreeModel
 */
private void init(){
  Assessment ass=qtiPackage.getQTIDocument().getAssessment();
  GenericQtiNode rootNode=new AssessmentNode(ass,qtiPackage);
  this.setRootNode(rootNode);
  List sections=ass.getSections();
  for (int i=0; i < sections.size(); i++) {
    Section elem=(Section)sections.get(i);
    GenericQtiNode sectionNode=new SectionNode(elem,qtiPackage);
    List<Item> items=elem.getItems();
    for (int j=0; j < items.size(); j++) {
      Item elem2=(Item)items.get(j);
      GenericQtiNode itemNode=new ItemNode(elem2,qtiPackage);
      sectionNode.addChild(itemNode);
    }
    rootNode.addChild(sectionNode);
  }
}
Program: 69796
Project: 69796
Buggy source:
protected void collectMaterials(QuestionItemFull fullItem,ItemsAndMaterials materials){
  String dir=fullItem.getDirectory();
  String rootFilename=fullItem.getRootFilename();
  VFSContainer container=qpoolFileStorage.getContainer(dir);
  VFSItem rootItem=container.resolve(rootFilename);
  if (rootItem instanceof VFSLeaf) {
    VFSLeaf rootLeaf=(VFSLeaf)rootItem;
    Element el=(Element)readItemXml(rootLeaf).clone();
    Element itemEl=(Element)el.clone();
    enrichScore(itemEl);
    enrichWithMetadata(fullItem,itemEl);
    collectResources(itemEl,container,materials);
    materials.addItemEl(itemEl);
  }
}

Fixed version (ground truth):
protected void collectMaterials(QuestionItemFull fullItem,ItemsAndMaterials materials){
  String dir=fullItem.getDirectory();
  String rootFilename=fullItem.getRootFilename();
  VFSContainer container=qpoolFileStorage.getContainer(dir);
  VFSItem rootItem=container.resolve(rootFilename);
  if (rootItem instanceof VFSLeaf) {
    VFSLeaf rootLeaf=(VFSLeaf)rootItem;
    Element el=(Element)readItemXml(rootLeaf).clone();
    Element itemEl=(Element)el.clone();
    enrichWithMetadata(fullItem,itemEl);
    collectResources(itemEl,container,materials);
    materials.addItemEl(itemEl);
  }
}
Program: 69797
Project: 69797
Buggy source:
@Override public MediaResource exportTest(List<QuestionItemShort> items,String format){
  return new QTIExportTestResource("String_Node_Str",items,this);
}

Fixed version (ground truth):
@Override public MediaResource exportTest(List<QuestionItemShort> items,ExportFormatOptions format){
  if (QTIConstants.QTI_12_FORMAT.equals(format.getFormat())) {
    return new QTIExportTestResource("String_Node_Str",items,this);
  }
  return null;
}
Program: 69798
Project: 69798
Buggy source:
@Override public Controller getPreviewController(UserRequest ureq,WindowControl wControl,QuestionItem item){
  QTI12PreviewController previewCtrl=new QTI12PreviewController(ureq,wControl,item);
  return previewCtrl;
}

Fixed version (ground truth):
@Override public Controller getPreviewController(UserRequest ureq,WindowControl wControl,QuestionItem item,boolean summary){
  QTI12PreviewController previewCtrl=new QTI12PreviewController(ureq,wControl,item,summary);
  return previewCtrl;
}
Program: 69799
Project: 69799
Buggy source:
@Override public List<String> getTestExportFormats(){
  List<String> formats=new ArrayList<String>(2);
  formats.add(QPoolService.ZIP_EXPORT_FORMAT);
  formats.add(QTIConstants.QTI_12_FORMAT);
  return formats;
}

Fixed version (ground truth):
@Override public List<ExportFormatOptions> getTestExportFormats(){
  return Collections.unmodifiableList(formats);
}
Program: 69804
Project: 69804
Buggy source:
/** 
 * @see org.olat.core.util.component.ComponentVisitor#visit(org.olat.core.gui.components.Component,org.olat.core.gui.UserRequest)
 */
public boolean visit(Component comp,UserRequest ureq){
  if (comp.isVisible()) {
    comp.validate(ureq,validationResult);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.util.component.ComponentVisitor#visit(org.olat.core.gui.components.Component,org.olat.core.gui.UserRequest)
 */
public boolean visit(Component comp,UserRequest ureq){
  if (comp != null && comp.isVisible()) {
    comp.validate(ureq,validationResult);
    return true;
  }
  return false;
}
Program: 69805
Project: 69805
Buggy source:
/** 
 * the tabledatamodel to represent the choice data. one row belongs to one checkbox/choice; the columns are merely for graphical reasons. <br> Important: the first column must return a Boolean object to indicate whether the according row is currently selected or not
 * @param model
 */
public void setTableDataModel(TableDataModel model){
  tableDataModel=model;
}

Fixed version (ground truth):
/** 
 * the tabledatamodel to represent the choice data. one row belongs to one checkbox/choice; the columns are merely for graphical reasons. <br> Important: the first column must return a Boolean object to indicate whether the according row is currently selected or not
 * @param model
 */
public void setTableDataModel(TableDataModel<?> model){
  tableDataModel=model;
}
Program: 69806
Project: 69806
Buggy source:
/** 
 * @return TableDataModel
 */
public TableDataModel getTableDataModel(){
  return tableDataModel;
}

Fixed version (ground truth):
/** 
 * @return TableDataModel
 */
public TableDataModel<?> getTableDataModel(){
  return tableDataModel;
}
Program: 69808
Project: 69808
Buggy source:
public FlexiTableElement addTableElement(UserRequest ureq,String name,FlexiTableDataModel tableModel,FlexiTableDataSource dataSource,int pageSize,boolean search,Translator translator,FormItemContainer formLayout){
  FlexiTableElementImpl fte=new FlexiTableElementImpl(ureq,name,translator,tableModel,dataSource,pageSize,search);
  formLayout.add(fte);
  return fte;
}

Fixed version (ground truth):
public FlexiTableElement addTableElement(UserRequest ureq,WindowControl wControl,String name,FlexiTableDataModel tableModel,FlexiTableDataSource dataSource,int pageSize,boolean search,Translator translator,FormItemContainer formLayout){
  FlexiTableElementImpl fte=new FlexiTableElementImpl(ureq,wControl,name,translator,tableModel,dataSource,pageSize,search);
  formLayout.add(fte);
  return fte;
}
Program: 69809
Project: 69809
Buggy source:
protected void renderRow(Renderer renderer,StringOutput target,FlexiTableComponent ftC,String rowIdPrefix,int row,int rows,URLBuilder ubu,Translator translator,RenderResult renderResult){
  FlexiTableElementImpl ftE=ftC.getFlexiTableElement();
  FlexiTableColumnModel columnsModel=ftE.getTableDataModel().getTableColumnModel();
  int numOfCols=columnsModel.getColumnCount();
  String cssClass;
  if (row % 2 == 0)   cssClass="String_Node_Str";
 else   cssClass="String_Node_Str";
  if (row == 0)   cssClass+="String_Node_Str";
  if (row == rows - 1)   cssClass+="String_Node_Str";
  target.append("String_Node_Str").append(rowIdPrefix).append(row).append("String_Node_Str").append(cssClass).append("String_Node_Str");
  int col=0;
  if (ftE.isMultiSelect()) {
    target.append("String_Node_Str").append("String_Node_Str").append(rowIdPrefix).append(row).append("String_Node_Str");
    if (ftE.isMultiSelectedIndex(row)) {
      target.append("String_Node_Str");
    }
    target.append("String_Node_Str");
    col++;
  }
  for (int j=0; j < numOfCols; j++) {
    FlexiColumnModel fcm=columnsModel.getColumnModel(j);
    renderCell(renderer,target,ftC,fcm,row,col,numOfCols,ubu,translator,renderResult);
    col++;
  }
  target.append("String_Node_Str");
}

Fixed version (ground truth):
protected void renderRow(Renderer renderer,StringOutput target,FlexiTableComponent ftC,String rowIdPrefix,int row,int rows,URLBuilder ubu,Translator translator,RenderResult renderResult){
  FlexiTableElementImpl ftE=ftC.getFlexiTableElement();
  FlexiTableColumnModel columnsModel=ftE.getTableDataModel().getTableColumnModel();
  int numOfCols=columnsModel.getColumnCount();
  String cssClass;
  if (row % 2 == 0)   cssClass="String_Node_Str";
 else   cssClass="String_Node_Str";
  if (row == 0)   cssClass+="String_Node_Str";
  if (row == rows - 1)   cssClass+="String_Node_Str";
  target.append("String_Node_Str").append(rowIdPrefix).append(row).append("String_Node_Str").append(cssClass).append("String_Node_Str");
  int col=0;
  if (ftE.isMultiSelect()) {
    target.append("String_Node_Str").append("String_Node_Str").append(rowIdPrefix).append(row).append("String_Node_Str");
    if (ftE.isMultiSelectedIndex(row)) {
      target.append("String_Node_Str");
    }
    target.append("String_Node_Str");
    col++;
  }
  for (int j=0; j < numOfCols; j++) {
    FlexiColumnModel fcm=columnsModel.getColumnModel(j);
    if (ftE.isColumnModelVisible(fcm)) {
      renderCell(renderer,target,ftC,fcm,row,col++,numOfCols,ubu,translator,renderResult);
    }
  }
  target.append("String_Node_Str");
}
Program: 69810
Project: 69810
Buggy source:
protected void renderHeaders(StringOutput target,FlexiTableElementImpl ftE,Translator translator){
  FlexiTableDataModel dataModel=ftE.getTableDataModel();
  FlexiTableColumnModel columnModel=dataModel.getTableColumnModel();
  target.append("String_Node_Str");
  int col=0;
  if (ftE.isMultiSelect()) {
    target.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
    col++;
  }
  int cols=columnModel.getColumnCount();
  for (int i=0; i < cols; i++) {
    FlexiColumnModel fcm=columnModel.getColumnModel(i);
    renderHeader(target,fcm,col,cols,translator);
    col++;
  }
  target.append("String_Node_Str");
}

Fixed version (ground truth):
protected void renderHeaders(StringOutput target,FlexiTableElementImpl ftE,Translator translator){
  FlexiTableDataModel dataModel=ftE.getTableDataModel();
  FlexiTableColumnModel columnModel=dataModel.getTableColumnModel();
  target.append("String_Node_Str");
  int col=0;
  if (ftE.isMultiSelect()) {
    target.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
    col++;
  }
  int cols=columnModel.getColumnCount();
  for (int i=0; i < cols; i++) {
    FlexiColumnModel fcm=columnModel.getColumnModel(i);
    if (ftE.isColumnModelVisible(fcm)) {
      renderHeader(target,fcm,col++,cols,translator);
    }
  }
  target.append("String_Node_Str");
}
Program: 69811
Project: 69811
Buggy source:
@Override public void render(Renderer renderer,StringOutput sb,Component source,URLBuilder ubu,Translator translator,RenderResult renderResult,String[] args){
  FlexiTableComponent ftC=(FlexiTableComponent)source;
  FlexiTableElementImpl ftE=ftC.getFlexiTableElement();
  if (ftE.isSearch()) {
    renderSearchFields(renderer,sb,ftE,ubu,translator,renderResult,args);
  }
  String id=ftC.getFormDispatchId();
  sb.append("String_Node_Str").append("String_Node_Str").append(id).append("String_Node_Str");
  renderHeaders(sb,ftE,translator);
  renderBody(renderer,sb,ftC,ubu,translator,renderResult);
  sb.append("String_Node_Str");
  if (source.isEnabled()) {
    sb.append(FormJSHelper.getJSStartWithVarDeclaration(id));
    sb.append(FormJSHelper.getSetFlexiFormDirty(ftE.getRootForm(),id));
    sb.append(FormJSHelper.getJSEnd());
  }
}

Fixed version (ground truth):
@Override public void render(Renderer renderer,StringOutput sb,Component source,URLBuilder ubu,Translator translator,RenderResult renderResult,String[] args){
  FlexiTableComponent ftC=(FlexiTableComponent)source;
  FlexiTableElementImpl ftE=ftC.getFlexiTableElement();
  String id=ftC.getFormDispatchId();
  sb.append("String_Node_Str");
  renderHeaderButtons(renderer,sb,ftE,ubu,translator,renderResult,args);
  sb.append("String_Node_Str").append(id).append("String_Node_Str");
  renderHeaders(sb,ftE,translator);
  renderBody(renderer,sb,ftC,ubu,translator,renderResult);
  sb.append("String_Node_Str");
  if (source.isEnabled()) {
    sb.append(FormJSHelper.getJSStartWithVarDeclaration(id));
    sb.append(FormJSHelper.getSetFlexiFormDirty(ftE.getRootForm(),id));
    sb.append(FormJSHelper.getJSEnd());
  }
}
Program: 69812
Project: 69812
Buggy source:
public DefaultFlexiColumnModel(String headerKey,int columnIndex,boolean sortable,String sortKey,int alignment,FlexiCellRenderer cellRenderer){
  this.sortable=sortable;
  this.sortedKey=sortKey;
  this.headerKey=headerKey;
  this.columnIndex=columnIndex;
  this.columnKey=headerKey.replace("String_Node_Str","String_Node_Str").toLowerCase();
  this.alignment=alignment;
  this.cellRenderer=cellRenderer;
}

Fixed version (ground truth):
public DefaultFlexiColumnModel(boolean defVisible,String headerKey,int columnIndex,boolean sortable,String sortKey,int alignment,FlexiCellRenderer cellRenderer){
  this.defaultVisible=defVisible;
  this.sortable=sortable;
  this.sortedKey=sortKey;
  this.headerKey=headerKey;
  this.columnIndex=columnIndex;
  this.columnKey=headerKey.replace("String_Node_Str","String_Node_Str").toLowerCase();
  this.alignment=alignment;
  this.cellRenderer=cellRenderer;
}
Program: 69814
Project: 69814
Buggy source:
public QTIImportProcessor(Identity owner,String importedFilename,File importedFile,QuestionItemDAO questionItemDao,QItemTypeDAO qItemTypeDao,QEducationalContextDAO qEduContextDao,FileStorage qpoolFileStorage){
  this.owner=owner;
  this.importedFilename=importedFilename;
  this.importedFile=importedFile;
  this.qItemTypeDao=qItemTypeDao;
  this.questionItemDao=questionItemDao;
  this.qEduContextDao=qEduContextDao;
  this.qpoolFileStorage=qpoolFileStorage;
}

Fixed version (ground truth):
public QTIImportProcessor(Identity owner,Locale defaultLocale,String importedFilename,File importedFile,QuestionItemDAO questionItemDao,QItemTypeDAO qItemTypeDao,QEducationalContextDAO qEduContextDao,FileStorage qpoolFileStorage){
  this.owner=owner;
  this.defaultLocale=defaultLocale;
  this.importedFilename=importedFilename;
  this.importedFile=importedFile;
  this.qItemTypeDao=qItemTypeDao;
  this.questionItemDao=questionItemDao;
  this.qEduContextDao=qEduContextDao;
  this.qpoolFileStorage=qpoolFileStorage;
}
Program: 69815
Project: 69815
Buggy source:
protected QuestionItemImpl processItem(DocInfos docInfos,ItemInfos itemInfos){
  Element itemEl=itemInfos.getItemEl();
  String filename;
  String ident=getAttributeValue(itemEl,"String_Node_Str");
  if (itemInfos.isOriginalItem()) {
    filename=docInfos.filename;
  }
 else   if (StringHelper.containsNonWhitespace(ident)) {
    filename=StringHelper.transformDisplayNameToFileSystemName(ident) + "String_Node_Str";
  }
 else {
    filename="String_Node_Str";
  }
  String dir=qpoolFileStorage.generateDir();
  String title=getAttributeValue(itemEl,"String_Node_Str");
  if (!StringHelper.containsNonWhitespace(title)) {
    title=ident;
  }
  if (!StringHelper.containsNonWhitespace(title)) {
    title=importedFilename;
  }
  QuestionItemImpl poolItem=questionItemDao.create(title,QTIConstants.QTI_12_FORMAT,dir,filename);
  poolItem.setDescription(itemInfos.getComment());
  processItemQuestionType(poolItem,ident,itemEl);
  processItemMetadata(poolItem,itemEl);
  questionItemDao.persist(owner,poolItem);
  return poolItem;
}

Fixed version (ground truth):
protected QuestionItemImpl processItem(DocInfos docInfos,ItemInfos itemInfos){
  Element itemEl=itemInfos.getItemEl();
  String filename;
  String ident=getAttributeValue(itemEl,"String_Node_Str");
  if (itemInfos.isOriginalItem()) {
    filename=docInfos.filename;
  }
 else   if (StringHelper.containsNonWhitespace(ident)) {
    filename=StringHelper.transformDisplayNameToFileSystemName(ident) + "String_Node_Str";
  }
 else {
    filename="String_Node_Str";
  }
  String dir=qpoolFileStorage.generateDir();
  String title=getAttributeValue(itemEl,"String_Node_Str");
  if (!StringHelper.containsNonWhitespace(title)) {
    title=ident;
  }
  if (!StringHelper.containsNonWhitespace(title)) {
    title=importedFilename;
  }
  QuestionItemImpl poolItem=questionItemDao.create(title,QTIConstants.QTI_12_FORMAT,dir,filename);
  poolItem.setDescription(itemInfos.getComment());
  poolItem.setLanguage(defaultLocale.getLanguage());
  processItemQuestionType(poolItem,ident,itemEl);
  processItemMetadata(poolItem,itemEl);
  questionItemDao.persist(owner,poolItem);
  return poolItem;
}
Program: 69816
Project: 69816
Buggy source:
@Override public List<QuestionItem> importItems(Identity owner,String filename,File file){
  QTIImportProcessor processor=new QTIImportProcessor(owner,filename,file,questionItemDao,qItemTypeDao,qEduContextDao,qpoolFileStorage);
  return processor.process();
}

Fixed version (ground truth):
@Override public List<QuestionItem> importItems(Identity owner,Locale defaultLocale,String filename,File file){
  QTIImportProcessor processor=new QTIImportProcessor(owner,defaultLocale,filename,file,questionItemDao,qItemTypeDao,qEduContextDao,qpoolFileStorage);
  return processor.process();
}
Program: 69817
Project: 69817
Buggy source:
public List<QuestionItem> importItems(Identity owner,String filename,File file);

Fixed version (ground truth):
public List<QuestionItem> importItems(Identity owner,Locale defaultLocale,String filename,File file);
Program: 69818
Project: 69818
Buggy source:
public List<QuestionItem> importItems(Identity owner,String filename,File file);

Fixed version (ground truth):
public List<QuestionItem> importItems(Identity owner,Locale defaultLocale,String filename,File file);