nus-yam/ex-repair huggingface dataset:
Program: 69731
Project: 69731
Buggy source:
private void renderTinyMCE_4(StringOutput sb,String domID,RichTextElementComponent teC,URLBuilder ubu){
  RichTextElementImpl te=teC.getRichTextElementImpl();
  RichTextConfiguration config=te.getEditorConfiguration();
  List<String> onInit=config.getOnInit();
  renderTextarea(sb,domID + "String_Node_Str",teC);
  StringOutput configurations=new StringOutput();
  config.appendConfigToTinyJSArray_4(configurations);
  StringOutput baseUrl=new StringOutput();
  StaticMediaDispatcher.renderStaticURI(baseUrl,"String_Node_Str",false);
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(domID).append("String_Node_Str");
  ubu.buildURI(sb,null,null);
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append(baseUrl.toString()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(onInit.get(0)).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(configurations).append("String_Node_Str");
  sb.append("String_Node_Str");
}

Fixed version (ground truth):
private void renderTinyMCE_4(StringOutput sb,String domID,RichTextElementComponent teC,URLBuilder ubu){
  RichTextElementImpl te=teC.getRichTextElementImpl();
  RichTextConfiguration config=te.getEditorConfiguration();
  List<String> onInit=config.getOnInit();
  renderTextarea(sb,domID,teC);
  StringOutput configurations=new StringOutput();
  config.appendConfigToTinyJSArray_4(configurations);
  StringOutput baseUrl=new StringOutput();
  StaticMediaDispatcher.renderStaticURI(baseUrl,"String_Node_Str",false);
  sb.append("String_Node_Str");
  sb.append("String_Node_Str").append(domID).append("String_Node_Str");
  ubu.buildURI(sb,null,null);
  sb.append("String_Node_Str");
  sb.append("String_Node_Str" + te.getRootForm().getDispatchFieldId() + "String_Node_Str"+ domID+ "String_Node_Str");
  sb.append("String_Node_Str").append(domID).append("String_Node_Str");
  sb.append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append(baseUrl.toString()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(onInit.get(0).replace("String_Node_Str","String_Node_Str")).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(domID).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(configurations).append("String_Node_Str");
  sb.append("String_Node_Str");
}
Program: 69732
Project: 69732
Buggy source:
@Override protected void formOK(UserRequest ureq){
  String searchValue=getSearchValue(ureq);
  if (StringHelper.containsNonWhitespace(searchValue)) {
    if (StringHelper.isLong(searchValue)) {
      doSelect(ureq);
    }
 else     if (searchValue.length() >= 3) {
      Map<String,String> userProperties=new HashMap<String,String>();
      userProperties.put(UserConstants.FIRSTNAME,searchValue);
      userProperties.put(UserConstants.LASTNAME,searchValue);
      userProperties.put(UserConstants.EMAIL,searchValue);
      List<Identity> res=searchUsers(searchValue,userProperties,false);
      if (res.size() == 1) {
        Identity chosenIdent=res.get(0);
        fireEvent(ureq,new SingleIdentityChosenEvent(chosenIdent));
      }
 else       if (res.size() > 1) {
        tableEl.reset();
        userTableModel.setObjects(wrapIdentities(res));
      }
    }
  }
 else {
    if (validateForm(ureq)) {
      doSearch();
    }
  }
}

Fixed version (ground truth):
@Override protected void formOK(UserRequest ureq){
  String searchValue=getSearchValue(ureq);
  if (StringHelper.containsNonWhitespace(searchValue)) {
    if (StringHelper.isLong(searchValue)) {
      doFireSelection(ureq,Collections.singletonList(searchValue));
    }
 else     if (searchValue.length() >= 3) {
      Map<String,String> userProperties=new HashMap<String,String>();
      userProperties.put(UserConstants.FIRSTNAME,searchValue);
      userProperties.put(UserConstants.LASTNAME,searchValue);
      userProperties.put(UserConstants.EMAIL,searchValue);
      List<Identity> res=searchUsers(searchValue,userProperties,false);
      if (res.size() == 1) {
        Identity chosenIdent=res.get(0);
        fireEvent(ureq,new SingleIdentityChosenEvent(chosenIdent));
      }
 else       if (res.size() > 1) {
        tableEl.reset();
        userTableModel.setObjects(wrapIdentities(res));
      }
    }
  }
 else {
    if (validateForm(ureq)) {
      doSearch();
    }
  }
}
Program: 69733
Project: 69733
Buggy source:
@Override protected void event(UserRequest ureq,Controller source,Event event){
  if (source == this.disclaimerFormController) {
    if (event == event.CANCELLED_EVENT) {
      fireEvent(ureq,Event.CANCELLED_EVENT);
    }
 else     if (event == Event.DONE_EVENT) {
      boolean acceptCheckboxChecked=(disclaimerFormController.acceptCheckbox != null) ? (disclaimerFormController.acceptCheckbox.isSelected(0)) : false;
      boolean additionalCheckboxConfigured=CoreSpringFactory.getImpl(RegistrationModule.class).isDisclaimerAdditionalCheckbox();
      boolean additionalCheckboxChecked=(disclaimerFormController.additionalCheckbox != null) ? (disclaimerFormController.additionalCheckbox.isSelected(0)) : false;
      if (!additionalCheckboxConfigured) {
        if (acceptCheckboxChecked) {
          fireEvent(ureq,Event.DONE_EVENT);
        }
 else {
          showError(SR_ERROR_DISCLAIMER_CHECKBOX);
        }
      }
 else {
        if (acceptCheckboxChecked && additionalCheckboxChecked) {
          fireEvent(ureq,Event.DONE_EVENT);
        }
 else {
          showError(SR_ERROR_DISCLAIMER_CHECKBOXES);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override protected void event(UserRequest ureq,Controller source,Event event){
  if (source == this.disclaimerFormController) {
    if (event == Event.CANCELLED_EVENT) {
      fireEvent(ureq,Event.CANCELLED_EVENT);
    }
 else     if (event == Event.DONE_EVENT) {
      boolean acceptCheckboxChecked=(disclaimerFormController.acceptCheckbox != null) ? (disclaimerFormController.acceptCheckbox.isSelected(0)) : false;
      boolean additionalCheckboxConfigured=CoreSpringFactory.getImpl(RegistrationModule.class).isDisclaimerAdditionalCheckbox();
      boolean additionalCheckboxChecked=(disclaimerFormController.additionalCheckbox != null) ? (disclaimerFormController.additionalCheckbox.isSelected(0)) : false;
      if (!additionalCheckboxConfigured) {
        if (acceptCheckboxChecked) {
          fireEvent(ureq,Event.DONE_EVENT);
        }
 else {
          showError(SR_ERROR_DISCLAIMER_CHECKBOX);
        }
      }
 else {
        if (acceptCheckboxChecked && additionalCheckboxChecked) {
          fireEvent(ureq,Event.DONE_EVENT);
        }
 else {
          showError(SR_ERROR_DISCLAIMER_CHECKBOXES);
        }
      }
    }
  }
}
Program: 69734
Project: 69734
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  acceptCheckbox=uifactory.addCheckboxesVertical(ACKNOWLEDGE_CHECKBOX_NAME,null,formLayout,new String[]{DCL_CHECKBOX_KEY},new String[]{translate(NLS_DISCLAIMER_ACKNOWLEDGED)},null,1);
  acceptCheckbox.setMandatory(false);
  acceptCheckbox.select(DCL_CHECKBOX_KEY,readOnly);
  if (CoreSpringFactory.getImpl(RegistrationModule.class).isDisclaimerAdditionalCheckbox()) {
    String additionalCheckboxText=translate("String_Node_Str");
    if (additionalCheckboxText != null) {
      additionalCheckbox=uifactory.addCheckboxesVertical(ADDITIONAL_CHECKBOX_NAME,null,formLayout,new String[]{DCL_CHECKBOX_KEY2},new String[]{additionalCheckboxText},null,1);
      additionalCheckbox.select(DCL_CHECKBOX_KEY2,readOnly);
    }
  }
  if (readOnly) {
    formLayout.setEnabled(!readOnly);
  }
 else {
    final FormLayoutContainer buttonLayout=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
    formLayout.add(buttonLayout);
    buttonLayout.setElementCssClass("String_Node_Str");
    uifactory.addFormSubmitButton(DCL_ACCEPT,NLS_DISCLAIMER_OK,buttonLayout);
    uifactory.addFormCancelButton(NLS_DISCLAIMER_NOK,buttonLayout,ureq,getWindowControl());
  }
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  acceptCheckbox=uifactory.addCheckboxesVertical(ACKNOWLEDGE_CHECKBOX_NAME,null,formLayout,new String[]{DCL_CHECKBOX_KEY},new String[]{translate(NLS_DISCLAIMER_ACKNOWLEDGED)},null,1);
  acceptCheckbox.setEscapeHtml(false);
  acceptCheckbox.setMandatory(false);
  acceptCheckbox.select(DCL_CHECKBOX_KEY,readOnly);
  if (CoreSpringFactory.getImpl(RegistrationModule.class).isDisclaimerAdditionalCheckbox()) {
    String additionalCheckboxText=translate("String_Node_Str");
    if (additionalCheckboxText != null) {
      additionalCheckbox=uifactory.addCheckboxesVertical(ADDITIONAL_CHECKBOX_NAME,null,formLayout,new String[]{DCL_CHECKBOX_KEY2},new String[]{additionalCheckboxText},null,1);
      additionalCheckbox.setEscapeHtml(false);
      additionalCheckbox.select(DCL_CHECKBOX_KEY2,readOnly);
    }
  }
  if (readOnly) {
    formLayout.setEnabled(!readOnly);
  }
 else {
    final FormLayoutContainer buttonLayout=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
    formLayout.add(buttonLayout);
    buttonLayout.setElementCssClass("String_Node_Str");
    uifactory.addFormSubmitButton(DCL_ACCEPT,NLS_DISCLAIMER_OK,buttonLayout);
    uifactory.addFormCancelButton(NLS_DISCLAIMER_NOK,buttonLayout,ureq,getWindowControl());
  }
}
Program: 69735
Project: 69735
Buggy source:
public SystemAdminMainController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  init(ureq);
  addCssClassToMain("String_Node_Str");
}

Fixed version (ground truth):
public SystemAdminMainController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  init(ureq);
  getMenuTree().setExpandSelectedNode(false);
  addCssClassToMain("String_Node_Str");
}
Program: 69736
Project: 69736
Buggy source:
@Override protected void event(UserRequest ureq,Component source,Event event){
  if (source.equals(backLink)) {
    if (stack.size() > 1) {
      source=stack.get(stack.size() - 2);
    }
  }
  if (stack.contains(source)) {
    popController(source);
  }
 else   if (source == olatMenuTree) {
    if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
      TreeNode selTreeNode=olatMenuTree.getSelectedNode();
      removeAsListenerAndDispose(contentCtr);
      Object uobject=selTreeNode.getUserObject();
      TreeNode delegatee=selTreeNode.getDelegate();
      if (delegatee != null) {
        olatMenuTree.setSelectedNode(delegatee);
      }
      contentCtr=getContentCtr(uobject,ureq);
      listenTo(contentCtr);
      Component resComp=contentCtr.getInitialComponent();
      content.setContent(resComp);
      addToHistory(ureq,contentCtr);
    }
 else {
      content.setContent(null);
    }
  }
 else {
    logWarn("String_Node_Str" + event.getCommand(),null);
  }
}

Fixed version (ground truth):
@Override protected void event(UserRequest ureq,Component source,Event event){
  if (source.equals(backLink)) {
    if (stack.size() > 1) {
      source=stack.get(stack.size() - 2);
    }
  }
  if (stack.contains(source)) {
    popController(source);
  }
 else   if (source == olatMenuTree) {
    if (event instanceof TreeEvent && event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
      TreeEvent te=(TreeEvent)event;
      if (te.getSubCommand() != null) {
      }
 else {
        TreeNode selTreeNode=olatMenuTree.getSelectedNode();
        removeAsListenerAndDispose(contentCtr);
        Object uobject=selTreeNode.getUserObject();
        TreeNode delegatee=selTreeNode.getDelegate();
        if (delegatee != null) {
          olatMenuTree.setSelectedNode(delegatee);
        }
        contentCtr=getContentCtr(uobject,ureq);
        listenTo(contentCtr);
        Component resComp=contentCtr.getInitialComponent();
        content.setContent(resComp);
        addToHistory(ureq,contentCtr);
      }
    }
 else {
      content.setContent(null);
    }
  }
 else {
    logWarn("String_Node_Str" + event.getCommand(),null);
  }
}
Program: 69739
Project: 69739
Buggy source:
/** 
 * Return the nodes
 * @param ce
 * @param firstResult
 * @param maxResults
 * @param orderBy
 * @param asc
 * @return
 */
public List<CatalogEntry> getChildrenOf(CatalogEntry ce,int firstResult,int maxResults,CatalogEntry.OrderBy orderBy,boolean asc){
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(CatalogEntryImpl.class.getName()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
  if (orderBy != null) {
    sb.append("String_Node_Str").append(orderBy.name()).append(asc ? "String_Node_Str" : "String_Node_Str");
  }
  TypedQuery<CatalogEntry> dbQuery=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),CatalogEntry.class).setParameter("String_Node_Str",ce.getKey()).setFirstResult(0);
  if (maxResults > 0) {
    dbQuery.setMaxResults(maxResults);
  }
  List<CatalogEntry> entries=dbQuery.getResultList();
  return entries;
}

Fixed version (ground truth):
/** 
 * Return the nodes
 * @param ce
 * @param firstResult
 * @param maxResults
 * @param orderBy
 * @param asc
 * @return
 */
public List<CatalogEntry> getChildrenOf(CatalogEntry ce,int firstResult,int maxResults,CatalogEntry.OrderBy orderBy,boolean asc){
  if (ce == null) {
    return Collections.emptyList();
  }
  StringBuilder sb=new StringBuilder();
  sb.append("String_Node_Str").append(CatalogEntryImpl.class.getName()).append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str");
  if (orderBy != null) {
    sb.append("String_Node_Str").append(orderBy.name()).append(asc ? "String_Node_Str" : "String_Node_Str");
  }
  TypedQuery<CatalogEntry> dbQuery=dbInstance.getCurrentEntityManager().createQuery(sb.toString(),CatalogEntry.class).setParameter("String_Node_Str",ce.getKey()).setFirstResult(0);
  if (maxResults > 0) {
    dbQuery.setMaxResults(maxResults);
  }
  List<CatalogEntry> entries=dbQuery.getResultList();
  return entries;
}
Program: 69740
Project: 69740
Buggy source:
/** 
 * Create and add a node to the tree
 * @param entry
 * @return 
 */
private GenericTreeNode addNode(CatalogEntry entry){
  GenericTreeNode node=entryMap.get(entry.getKey());
  if (node == null && entry.getType() == CatalogEntry.TYPE_NODE) {
    if (entry.getParent() != null) {
      node=entryMap.get(entry.getParent().getKey());
      if (node != null) {
        GenericTreeNode build=buildNode(entry);
        node.addChild(build);
        build.setParent(node);
      }
 else {
        addMissingNodes(entry);
      }
    }
  }
  return node;
}

Fixed version (ground truth):
/** 
 * Create and add a node to the tree
 * @param entry
 * @return 
 */
private GenericTreeNode addNode(CatalogEntry entry){
  GenericTreeNode node=entryMap.get(entry.getKey());
  if (node == null && entry.getType() == CatalogEntry.TYPE_NODE) {
    if (entry.getParent() != null) {
      node=entryMap.get(entry.getParent().getKey());
      if (node != null) {
        GenericTreeNode build=buildNode(entry);
        node.addChild(build);
        build.setParent(node);
      }
 else {
        addMissingNodes(entry);
      }
    }
 else {
      node=buildNode(entry);
    }
  }
  return node;
}
Program: 69741
Project: 69741
Buggy source:
private void updateEnabled(){
  boolean inherit=(inheritEl.isVisible() && inheritEl.isSelected(0));
  encodingContentEl.setEnabled(!inherit);
  encodingJSEl.setEnabled(!inherit);
  standardModeEl.setEnabled(!inherit);
  if (inherit) {
    jsOptionEl.setEnabled(false);
    cssOptionEl.setEnabled(false);
    heightEl.setEnabled(false);
    glossarEl.setEnabled(false);
  }
 else {
    boolean standard=standardModeEl.isSelected(0);
    if (!standard) {
      jsOptionEl.select(jsKeys[1],true);
      cssOptionEl.select(cssKeys[1],true);
      heightEl.select(keys[0],true);
      glossarEl.select("String_Node_Str",true);
    }
    boolean jQueryEnabled=jsOptionEl.isSelected(1);
    jsOptionEl.setEnabled(!standard);
    cssOptionEl.setEnabled(!standard);
    heightEl.setEnabled(!standard);
    glossarEl.setEnabled(!standard && jQueryEnabled);
  }
}

Fixed version (ground truth):
private void updateEnabled(){
  boolean inherit=(inheritEl.isVisible() && inheritEl.isSelected(0));
  encodingContentEl.setEnabled(!inherit);
  encodingJSEl.setEnabled(!inherit);
  standardModeEl.setEnabled(!inherit);
  if (inherit) {
    jsOptionEl.setEnabled(false);
    cssOptionEl.setEnabled(false);
    heightEl.setEnabled(false);
    glossarEl.setEnabled(false);
  }
 else {
    boolean standard=standardModeEl.isSelected(0);
    boolean jQueryEnabled=jsOptionEl.isSelected(1);
    jsOptionEl.setEnabled(!standard);
    cssOptionEl.setEnabled(!standard);
    heightEl.setEnabled(!standard);
    glossarEl.setEnabled(!standard && jQueryEnabled);
  }
}
Program: 69742
Project: 69742
Buggy source:
/** 
 * Constructor for the item edit controller. Use the initialzeI18nitemAsCurrentItem() to set the current item from the given i18nItems list to a specific value after constructing the object
 * @param ureq
 * @param control
 * @param i18nItems List of i18n items that should be displayed. List can beempty but must NOT be NULL.
 * @param referenceLocale The locale used as reference
 * @param customizingMode true: edit overlay customization files and notlanguage files; false: edit language files
 */
public TranslationToolI18nItemEditCrumbController(UserRequest ureq,WindowControl control,List<I18nItem> i18nItems,Locale referenceLocale,boolean customizingMode){
  super(ureq,control,"String_Node_Str");
  this.customizingMode=customizingMode;
  this.i18nItems=i18nItems;
  this.referenceLocale=referenceLocale;
  if (i18nItems.size() > 0) {
    currentItem=i18nItems.get(currentItemPosition);
    initForm(ureq);
  }
 else {
    showError("String_Node_Str");
    getInitialComponent().setVisible(false);
  }
}

Fixed version (ground truth):
/** 
 * Constructor for the item edit controller. Use the initialzeI18nitemAsCurrentItem() to set the current item from the given i18nItems list to a specific value after constructing the object
 * @param ureq
 * @param control
 * @param i18nItems List of i18n items that should be displayed. List can beempty but must NOT be NULL.
 * @param referenceLocale The locale used as reference
 * @param customizingMode true: edit overlay customization files and notlanguage files; false: edit language files
 */
public TranslationToolI18nItemEditCrumbController(UserRequest ureq,WindowControl control,List<I18nItem> i18nItems,Locale referenceLocale,boolean customizingMode){
  super(ureq,control,"String_Node_Str");
  i18nMgr=I18nManager.getInstance();
  this.customizingMode=customizingMode;
  this.i18nItems=i18nItems;
  if (referenceLocale == null) {
    Preferences guiPrefs=ureq.getUserSession().getGuiPreferences();
    List<String> referenceLangs=I18nModule.getTransToolReferenceLanguages();
    String referencePrefs=(String)guiPrefs.get(I18nModule.class,I18nModule.GUI_PREFS_PREFERRED_REFERENCE_LANG,referenceLangs.get(0));
    this.referenceLocale=i18nMgr.getLocaleOrNull(referencePrefs);
    if (this.referenceLocale == null) {
      this.referenceLocale=i18nMgr.getLocaleOrDefault("String_Node_Str");
    }
  }
 else {
    this.referenceLocale=referenceLocale;
  }
  if (i18nItems.size() > 0) {
    currentItem=i18nItems.get(currentItemPosition);
    initForm(ureq);
  }
 else {
    showError("String_Node_Str");
    getInitialComponent().setVisible(false);
  }
}
Program: 69744
Project: 69744
Buggy source:
public ENEditGroupAreaFormController(UserRequest ureq,WindowControl wControl,ModuleConfiguration moduleConfig,CourseEditorEnv cev){
  super(ureq,wControl,null);
  Translator pT=Util.createPackageTranslator(Condition.class,ureq.getLocale(),getTranslator());
  this.setTranslator(pT);
  areaManager=CoreSpringFactory.getImpl(BGAreaManager.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  singleUserEventCenter=ureq.getUserSession().getSingleUserEventCenter();
  groupConfigChangeEventOres=OresHelper.createOLATResourceableType(MultiUserEvent.class);
  singleUserEventCenter.registerFor(this,ureq.getIdentity(),groupConfigChangeEventOres);
  this.moduleConfig=moduleConfig;
  this.cev=cev;
  hasAreas=areaManager.countBGAreasInContext(cev.getCourseGroupManager().getCourseResource()) > 0;
  hasGroups=businessGroupService.countBusinessGroups(null,cev.getCourseGroupManager().getCourseResource()) > 0;
  initForm(ureq);
}

Fixed version (ground truth):
public ENEditGroupAreaFormController(UserRequest ureq,WindowControl wControl,ModuleConfiguration moduleConfig,CourseEditorEnv cev){
  super(ureq,wControl);
  Translator pT=Util.createPackageTranslator(Condition.class,ureq.getLocale(),getTranslator());
  this.setTranslator(pT);
  areaManager=CoreSpringFactory.getImpl(BGAreaManager.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  singleUserEventCenter=ureq.getUserSession().getSingleUserEventCenter();
  groupConfigChangeEventOres=OresHelper.createOLATResourceableType(MultiUserEvent.class);
  singleUserEventCenter.registerFor(this,ureq.getIdentity(),groupConfigChangeEventOres);
  this.moduleConfig=moduleConfig;
  this.cev=cev;
  hasAreas=areaManager.countBGAreasInContext(cev.getCourseGroupManager().getCourseResource()) > 0;
  hasGroups=businessGroupService.countBusinessGroups(null,cev.getCourseGroupManager().getCourseResource()) > 0;
  initForm(ureq);
}
Program: 69745
Project: 69745
Buggy source:
private void doSelectControllerTreeNode(UserRequest ureq,TreeNode node,List<ContextEntry> entries,StateEntry state){
  Object uNode=node.getUserObject();
  if ("String_Node_Str".equals(uNode)) {
    doSelectAdmin(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminStudyFields(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminPools(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminTypes(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminLevels(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminLicenses(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectMyQuestions(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectMarkedQuestions(ureq,entries,state);
  }
 else   if (uNode instanceof Pool) {
    Pool pool=(Pool)uNode;
    doSelectPool(ureq,pool,node,entries,state);
  }
 else   if (uNode instanceof BusinessGroup) {
    BusinessGroup group=(BusinessGroup)uNode;
    doSelectGroup(ureq,group,node,entries,state);
  }
 else   if (uNode instanceof QuestionItemCollection) {
    QuestionItemCollection coll=(QuestionItemCollection)uNode;
    doSelectCollection(ureq,coll,node,entries,state);
  }
}

Fixed version (ground truth):
private void doSelectControllerTreeNode(UserRequest ureq,TreeNode node,List<ContextEntry> entries,StateEntry state){
  Object uNode=node.getUserObject();
  if ("String_Node_Str".equals(uNode)) {
    doSelectPresentation(ureq);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdmin(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminStudyFields(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminPools(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminTypes(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminLevels(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectAdminLicenses(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectMyQuestions(ureq,entries,state);
  }
 else   if ("String_Node_Str".equals(uNode)) {
    doSelectMarkedQuestions(ureq,entries,state);
  }
 else   if (uNode instanceof Pool) {
    Pool pool=(Pool)uNode;
    doSelectPool(ureq,pool,node,entries,state);
  }
 else   if (uNode instanceof BusinessGroup) {
    BusinessGroup group=(BusinessGroup)uNode;
    doSelectGroup(ureq,group,node,entries,state);
  }
 else   if (uNode instanceof QuestionItemCollection) {
    QuestionItemCollection coll=(QuestionItemCollection)uNode;
    doSelectCollection(ureq,coll,node,entries,state);
  }
}
Program: 69746
Project: 69746
Buggy source:
public QuestionPoolMainEditorController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  roles=ureq.getUserSession().getRoles();
  markManager=CoreSpringFactory.getImpl(MarkManager.class);
  qpoolService=CoreSpringFactory.getImpl(QPoolService.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  menuTree=new MenuTree("String_Node_Str");
  menuTree.setTreeModel(buildTreeModel());
  menuTree.setSelectedNode(menuTree.getTreeModel().getRootNode());
  menuTree.setDragEnabled(false);
  menuTree.setDropEnabled(true);
  menuTree.setDropSiblingEnabled(false);
  menuTree.addListener(this);
  menuTree.setRootVisible(false);
  List<String> openNodeIds=new ArrayList<String>(2);
  openNodeIds.add(myNode.getIdent());
  openNodeIds.add(sharesNode.getIdent());
  menuTree.setOpenNodeIds(openNodeIds);
  content=new Panel("String_Node_Str");
  columnLayoutCtr=new LayoutMain3ColsController(ureq,getWindowControl(),menuTree,null,content,"String_Node_Str");
  putInitialPanel(columnLayoutCtr.getInitialComponent());
}

Fixed version (ground truth):
public QuestionPoolMainEditorController(UserRequest ureq,WindowControl wControl){
  super(ureq,wControl);
  roles=ureq.getUserSession().getRoles();
  markManager=CoreSpringFactory.getImpl(MarkManager.class);
  qpoolService=CoreSpringFactory.getImpl(QPoolService.class);
  businessGroupService=CoreSpringFactory.getImpl(BusinessGroupService.class);
  menuTree=new MenuTree("String_Node_Str");
  menuTree.setTreeModel(buildTreeModel());
  menuTree.setSelectedNode(menuTree.getTreeModel().getRootNode());
  menuTree.setDragEnabled(false);
  menuTree.setDropEnabled(true);
  menuTree.setDropSiblingEnabled(false);
  menuTree.addListener(this);
  menuTree.setRootVisible(false);
  List<String> openNodeIds=new ArrayList<String>(2);
  openNodeIds.add(myNode.getIdent());
  openNodeIds.add(sharesNode.getIdent());
  menuTree.setOpenNodeIds(openNodeIds);
  content=new Panel("String_Node_Str");
  columnLayoutCtr=new LayoutMain3ColsController(ureq,getWindowControl(),menuTree,null,content,"String_Node_Str");
  doSelectPresentation(ureq);
  putInitialPanel(columnLayoutCtr.getInitialComponent());
}
Program: 69749
Project: 69749
Buggy source:
protected void doSearch(String search,List<String> condQueries){
  if (condQueries == null || condQueries.isEmpty()) {
    conditionalQueries=null;
  }
 else {
    conditionalQueries=new ArrayList<String>(condQueries);
  }
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    ResultInfos<?> infos=dataSource.load(search,conditionalQueries,0,getPageSize(),orderBy);
    System.out.println("String_Node_Str" + infos.getObjects().size());
  }
}

Fixed version (ground truth):
protected void doSearch(String search,List<String> condQueries){
  if (condQueries == null || condQueries.isEmpty()) {
    conditionalQueries=null;
  }
 else {
    conditionalQueries=new ArrayList<String>(condQueries);
  }
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    dataSource.load(search,conditionalQueries,0,getPageSize(),orderBy);
  }
}
Program: 69750
Project: 69750
Buggy source:
@Override public VFSLeaf getRootFile(QuestionItem item){
  QuestionItemImpl reloadedItem=questionItemDao.loadById(item.getKey());
  VFSContainer root=qpoolModule.getRootContainer();
  VFSItem dir=root.resolve(reloadedItem.getDirectory());
  if (dir instanceof VFSContainer) {
    VFSContainer itemContainer=(VFSContainer)dir;
    VFSItem rootLeaf=itemContainer.resolve(reloadedItem.getRootFilename());
    if (rootLeaf instanceof VFSLeaf) {
      return (VFSLeaf)rootLeaf;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public VFSLeaf getRootFile(QuestionItem item){
  QuestionItemImpl reloadedItem=questionItemDao.loadById(item.getKey());
  if (reloadedItem == null) {
    return null;
  }
  VFSContainer root=qpoolModule.getRootContainer();
  VFSItem dir=root.resolve(reloadedItem.getDirectory());
  if (dir instanceof VFSContainer) {
    VFSContainer itemContainer=(VFSContainer)dir;
    VFSItem rootLeaf=itemContainer.resolve(reloadedItem.getRootFilename());
    if (rootLeaf instanceof VFSLeaf) {
      return (VFSLeaf)rootLeaf;
    }
  }
  return null;
}
Program: 69751
Project: 69751
Buggy source:
public QuestionItem updateItem(QuestionItem item){
  QuestionItem mergedItem=questionItemDao.merge(item);
  dbInstance.commit();
  lifeIndexer.indexDocument(QItemDocument.TYPE,mergedItem.getKey());
  return mergedItem;
}

Fixed version (ground truth):
@Override public QuestionItem updateItem(QuestionItem item){
  QuestionItem mergedItem=questionItemDao.merge(item);
  dbInstance.commit();
  lifeIndexer.indexDocument(QItemDocument.TYPE,mergedItem.getKey());
  return mergedItem;
}
Program: 69752
Project: 69752
Buggy source:
@Override public void deleteItems(List<QuestionItemShort> items){
  if (items == null || items.isEmpty()) {
    return;
  }
  poolDao.removeFromPools(items);
  questionItemDao.removeFromShares(items);
  collectionDao.deleteItemFromCollections(items);
  questionItemDao.delete(items);
  for (  QuestionItemShort item : items) {
    lifeIndexer.deleteDocument(QItemDocument.TYPE,item.getKey());
  }
}

Fixed version (ground truth):
@Override public void deleteItems(List<QuestionItemShort> items){
  if (items == null || items.isEmpty()) {
    return;
  }
  poolDao.removeFromPools(items);
  questionItemDao.removeFromShares(items);
  collectionDao.deleteItemFromCollections(items);
  questionItemDao.delete(items);
  for (  QuestionItemShort item : items) {
    lifeIndexer.deleteDocument(QItemDocument.TYPE,item.getKey());
  }
  dbInstance.getCurrentEntityManager().flush();
}
Program: 69753
Project: 69753
Buggy source:
@Override public List<QuestionItem> copyItems(Identity owner,List<QuestionItemShort> itemsToCopy){
  List<QuestionItem> copies=new ArrayList<QuestionItem>();
  for (  QuestionItemShort itemToCopy : itemsToCopy) {
    QuestionItemImpl original=questionItemDao.loadById(itemToCopy.getKey());
    QuestionItemImpl copy=questionItemDao.copy(owner,original);
    QPoolSPI provider=qpoolModule.getQuestionPoolProvider(copy.getFormat());
    if (provider != null) {
      provider.copyItem(original,copy);
    }
    copies.add(copy);
  }
  return copies;
}

Fixed version (ground truth):
@Override public List<QuestionItem> copyItems(Identity owner,List<QuestionItemShort> itemsToCopy){
  List<QuestionItem> copies=new ArrayList<QuestionItem>();
  for (  QuestionItemShort itemToCopy : itemsToCopy) {
    QuestionItemImpl original=questionItemDao.loadById(itemToCopy.getKey());
    QuestionItemImpl copy=questionItemDao.copy(owner,original);
    QPoolSPI provider=qpoolModule.getQuestionPoolProvider(copy.getFormat());
    if (provider != null) {
      provider.copyItem(original,copy);
    }
    copies.add(copy);
  }
  if (copies.size() > 0) {
    dbInstance.getCurrentEntityManager().flush();
  }
  return copies;
}
Program: 69754
Project: 69754
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.publicPool.i18nKey(),Cols.publicPool.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.name.i18nKey(),Cols.name.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  model=new PoolDataModel(columnsModel,getTranslator());
  poolTable=uifactory.addTableElement(ureq,getWindowControl(),"String_Node_Str",model,getTranslator(),formLayout);
  poolTable.setRendererType(FlexiTableRendererType.classic);
  reloadModel();
  createPool=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(false,Cols.id.i18nKey(),Cols.id.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.publicPool.i18nKey(),Cols.publicPool.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.name.i18nKey(),Cols.name.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel("String_Node_Str",translate("String_Node_Str"),"String_Node_Str"));
  model=new PoolDataModel(columnsModel,getTranslator());
  poolTable=uifactory.addTableElement(ureq,getWindowControl(),"String_Node_Str",model,getTranslator(),formLayout);
  poolTable.setRendererType(FlexiTableRendererType.classic);
  reloadModel();
  createPool=uifactory.addFormLink("String_Node_Str",formLayout,Link.BUTTON);
}
Program: 69755
Project: 69755
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.level.i18nKey(),Cols.level.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer renderer=new StaticFlexiCellRenderer("String_Node_Str",new TextFlexiCellRenderer());
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel(Cols.levelI18n.i18nKey(),Cols.levelI18n.ordinal(),"String_Node_Str",renderer));
  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 LevelDataModel(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);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnsModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false,Cols.id.i18nKey(),Cols.id.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.level.i18nKey(),Cols.level.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer renderer=new StaticFlexiCellRenderer("String_Node_Str",new TextFlexiCellRenderer());
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel(Cols.levelI18n.i18nKey(),Cols.levelI18n.ordinal(),"String_Node_Str",renderer));
  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 LevelDataModel(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: 69756
Project: 69756
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.type.i18nKey(),Cols.type.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer renderer=new StaticFlexiCellRenderer("String_Node_Str",new TextFlexiCellRenderer());
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel(Cols.typeI18n.i18nKey(),Cols.typeI18n.ordinal(),"String_Node_Str",renderer));
  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);
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel columnsModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(false,Cols.id.i18nKey(),Cols.id.ordinal(),true,"String_Node_Str"));
  columnsModel.addFlexiColumnModel(new DefaultFlexiColumnModel(Cols.type.i18nKey(),Cols.type.ordinal(),true,"String_Node_Str"));
  FlexiCellRenderer renderer=new StaticFlexiCellRenderer("String_Node_Str",new TextFlexiCellRenderer());
  columnsModel.addFlexiColumnModel(new StaticFlexiColumnModel(Cols.typeI18n.i18nKey(),Cols.typeI18n.ordinal(),"String_Node_Str",renderer));
  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: 69757
Project: 69757
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);
  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(false,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: 69759
Project: 69759
Buggy source:
private void doEditQuestionMetadata(UserRequest ureq){
  questionEditCtrl=new QuestionMetadataEditController(ureq,getWindowControl(),item);
  listenTo(questionEditCtrl);
  mainVC.put("String_Node_Str",questionEditCtrl.getInitialComponent());
}

Fixed version (ground truth):
private void doEditQuestionMetadata(UserRequest ureq){
  removeAsListenerAndDispose(questionEditCtrl);
  questionEditCtrl=new QuestionMetadataEditController(ureq,getWindowControl(),item);
  listenTo(questionEditCtrl);
  mainVC.put("String_Node_Str",questionEditCtrl.getInitialComponent());
}
Program: 69760
Project: 69760
Buggy source:
private void doEditEducationalMetadata(UserRequest ureq){
  educationalEditCtrl=new EducationalMetadataEditController(ureq,getWindowControl(),item);
  listenTo(educationalEditCtrl);
  mainVC.put("String_Node_Str",educationalEditCtrl.getInitialComponent());
}

Fixed version (ground truth):
private void doEditEducationalMetadata(UserRequest ureq){
  removeAsListenerAndDispose(educationalEditCtrl);
  educationalEditCtrl=new EducationalMetadataEditController(ureq,getWindowControl(),item);
  listenTo(educationalEditCtrl);
  mainVC.put("String_Node_Str",educationalEditCtrl.getInitialComponent());
}
Program: 69761
Project: 69761
Buggy source:
@Override protected boolean validateFormLogic(UserRequest ureq){
  boolean allOk=true;
  allOk&=validateSelection(typeEl,true);
  allOk&=validateBigDecimal(difficultyEl,0.0d,1.0d,true);
  allOk&=validateBigDecimal(stdevDifficultyEl,0.0d,1.0d,true);
  allOk&=validateBigDecimal(differentiationEl,-1.0d,1.0d,true);
  allOk&=validateSelection(assessmentTypeEl,true);
  return allOk && super.validateFormLogic(ureq);
}

Fixed version (ground truth):
@Override protected boolean validateFormLogic(UserRequest ureq){
  boolean allOk=true;
  allOk&=validateSelection(typeEl,true);
  allOk&=validateBigDecimal(difficultyEl,0.0d,1.0d,true);
  allOk&=validateBigDecimal(stdevDifficultyEl,0.0d,1.0d,true);
  allOk&=validateBigDecimal(differentiationEl,-1.0d,1.0d,true);
  allOk&=validateInteger(numAnswerAltEl,0,Integer.MAX_VALUE,true);
  allOk&=validateSelection(assessmentTypeEl,true);
  return allOk && super.validateFormLogic(ureq);
}
Program: 69762
Project: 69762
Buggy source:
@Override public ResultInfos<U> load(final int firstResult,final int maxResults,SortKey... orderBy){
  return loadDatas(null,null,false,firstResult,maxResults,orderBy);
}

Fixed version (ground truth):
@Override public ResultInfos<U> load(String query,List<String> addQueries,int firstResult,int maxResults,SortKey... orderBy){
  return loadDatas(query,addQueries,false,firstResult,maxResults,orderBy);
}
Program: 69763
Project: 69763
Buggy source:
/** 
 * Load the rows needed for paging
 * @param firstResult
 * @param maxResults
 */
public ResultInfos<U> load(int firstResult,int maxResults,SortKey... orderBy);

Fixed version (ground truth):
/** 
 * @param firstResult
 * @param maxResults
 * @param orderBy
 */
public ResultInfos<U> load(String query,List<String> addQueries,int firstResult,int maxResults,SortKey... orderBy);
Program: 69764
Project: 69764
Buggy source:
public FlexiTableElementImpl(UserRequest ureq,WindowControl wControl,String name,Translator translator,FlexiTableDataModel<?> tableModel,int pageSize){
  super(name);
  this.wControl=wControl;
  this.dataModel=tableModel;
  this.dataSource=(tableModel instanceof FlexiTableDataSource) ? (FlexiTableDataSource<?>)dataModel : null;
  component=new FlexiTableComponent(this,translator);
  for (int i=dataModel.getTableColumnModel().getColumnCount(); i-- > 0; ) {
    FlexiColumnModel col=dataModel.getTableColumnModel().getColumnModel(i);
    if (col.isDefaultVisible()) {
      enabledColumnIndex.add(new Integer(col.getColumnIndex()));
    }
  }
  MapperService mapper=CoreSpringFactory.getImpl(MapperService.class);
  mapperUrl=mapper.register(ureq.getUserSession(),new FlexiTableModelMapper(component));
  String dispatchId=component.getDispatchID();
  customButton=new FormLinkImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str",Link.BUTTON);
  customButton.setTranslator(translator);
  customButton.setCustomEnabledLinkCSS("String_Node_Str");
  components.put("String_Node_Str",customButton);
  this.pageSize=pageSize;
  if (pageSize > 0) {
    setPage(0);
  }
  if (dataSource != null) {
    dataSource.load(0,pageSize);
  }
}

Fixed version (ground truth):
public FlexiTableElementImpl(UserRequest ureq,WindowControl wControl,String name,Translator translator,FlexiTableDataModel<?> tableModel,int pageSize){
  super(name);
  this.wControl=wControl;
  this.dataModel=tableModel;
  this.dataSource=(tableModel instanceof FlexiTableDataSource) ? (FlexiTableDataSource<?>)dataModel : null;
  component=new FlexiTableComponent(this,translator);
  for (int i=dataModel.getTableColumnModel().getColumnCount(); i-- > 0; ) {
    FlexiColumnModel col=dataModel.getTableColumnModel().getColumnModel(i);
    if (col.isDefaultVisible()) {
      enabledColumnIndex.add(new Integer(col.getColumnIndex()));
    }
  }
  MapperService mapper=CoreSpringFactory.getImpl(MapperService.class);
  mapperUrl=mapper.register(ureq.getUserSession(),new FlexiTableModelMapper(component));
  String dispatchId=component.getDispatchID();
  customButton=new FormLinkImpl(dispatchId + "String_Node_Str","String_Node_Str","String_Node_Str",Link.BUTTON);
  customButton.setTranslator(translator);
  customButton.setCustomEnabledLinkCSS("String_Node_Str");
  components.put("String_Node_Str",customButton);
  this.pageSize=pageSize;
  if (pageSize > 0) {
    setPage(0);
  }
  if (dataSource != null) {
    dataSource.load(null,null,0,pageSize);
  }
}
Program: 69765
Project: 69765
Buggy source:
protected void doSearch(UserRequest ureq,String search,List<String> condQueries){
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    dataSource.search(search,condQueries,0,getPageSize());
  }
}

Fixed version (ground truth):
protected void doSearch(String search,List<String> condQueries){
  if (condQueries == null || condQueries.isEmpty()) {
    conditionalQueries=null;
  }
 else {
    conditionalQueries=new ArrayList<String>(condQueries);
  }
  if (dataSource != null) {
    resetInternComponents();
    dataSource.clear();
    ResultInfos<?> infos=dataSource.load(search,conditionalQueries,0,getPageSize(),orderBy);
    System.out.println("String_Node_Str" + infos.getObjects().size());
  }
}