nus-yam/ex-repair huggingface dataset:
Program: 69246
Project: 69246
Buggy source:
@Bean public CachingTargetResolver cachingTargetResolver(){
  return new CachingTargetResolver(new ReactiveTargetResolver());
}

Fixed version (ground truth):
@Bean public CachingTargetResolver cachingTargetResolver(ReactiveTargetResolver reactiveTargetResolver){
  return new CachingTargetResolver(reactiveTargetResolver);
}
Program: 69247
Project: 69247
Buggy source:
public CachingTargetResolver(TargetResolver targetResolver){
  this.parentTargetResolver=targetResolver;
}

Fixed version (ground truth):
public CachingTargetResolver(TargetResolver parentTargetResolver){
  this.parentTargetResolver=parentTargetResolver;
}
Program: 69248
Project: 69248
Buggy source:
public List<Instance> discover(){
  log.debug(String.format("String_Node_Str",this.promregatorConfiguration.getTargets().size()));
  List<ResolvedTarget> resolvedTargets=this.targetResolver.resolveTargets(this.promregatorConfiguration.getTargets());
  log.debug(String.format("String_Node_Str",resolvedTargets.size()));
  List<Instance> instanceList=this.appInstanceScanner.determineInstancesFromTargets(resolvedTargets);
  log.debug(String.format("String_Node_Str",instanceList.size()));
  for (  Instance instance : instanceList) {
    this.registerInstance(instance);
  }
  return instanceList;
}

Fixed version (ground truth):
public List<Instance> discover(@Null Predicate<? super String> applicationIdFilter,@Null Predicate<? super Instance> instanceFilter){
  log.debug(String.format("String_Node_Str",this.promregatorConfiguration.getTargets().size()));
  List<ResolvedTarget> resolvedTargets=this.targetResolver.resolveTargets(this.promregatorConfiguration.getTargets());
  log.debug(String.format("String_Node_Str",resolvedTargets.size()));
  List<Instance> instanceList=this.appInstanceScanner.determineInstancesFromTargets(resolvedTargets,applicationIdFilter,instanceFilter);
  log.debug(String.format("String_Node_Str",instanceList.size()));
  for (  Instance instance : instanceList) {
    this.registerInstance(instance);
  }
  return instanceList;
}
Program: 69249
Project: 69249
Buggy source:
public String handleRequest(@Null Predicate<? super String> applicationIdFilter,@Null Predicate<? super Instance> instanceFilter){
  log.debug("String_Node_Str");
  Instant start=Instant.now();
  this.up.clear();
  List<Instance> instanceList=this.discoverer.discover();
  List<MetricsFetcher> callablesPrep=this.createMetricsFetchers(instanceList);
  LinkedList<Future<HashMap<String,MetricFamilySamples>>> futures=this.startMetricsFetchers(callablesPrep);
  log.debug(String.format("String_Node_Str",futures.size()));
  MergableMetricFamilySamples mmfs=waitForMetricsFetchers(futures);
  Instant stop=Instant.now();
  Duration duration=Duration.between(start,stop);
  this.handleScrapeDuration(this.requestRegistry,duration);
  if (this.isIncludeGlobalMetrics()) {
    mmfs.merge(this.gmfspr.determineEnumerationOfMetricFamilySamples(this.collectorRegistry));
  }
  mmfs.merge(this.gmfspr.determineEnumerationOfMetricFamilySamples(this.requestRegistry));
  return mmfs.toType004String();
}

Fixed version (ground truth):
public String handleRequest(@Null Predicate<? super String> applicationIdFilter,@Null Predicate<? super Instance> instanceFilter){
  log.debug("String_Node_Str");
  Instant start=Instant.now();
  this.up.clear();
  List<Instance> instanceList=this.discoverer.discover(applicationIdFilter,instanceFilter);
  List<MetricsFetcher> callablesPrep=this.createMetricsFetchers(instanceList);
  LinkedList<Future<HashMap<String,MetricFamilySamples>>> futures=this.startMetricsFetchers(callablesPrep);
  log.debug(String.format("String_Node_Str",futures.size()));
  MergableMetricFamilySamples mmfs=waitForMetricsFetchers(futures);
  Instant stop=Instant.now();
  Duration duration=Duration.between(start,stop);
  this.handleScrapeDuration(this.requestRegistry,duration);
  if (this.isIncludeGlobalMetrics()) {
    mmfs.merge(this.gmfspr.determineEnumerationOfMetricFamilySamples(this.collectorRegistry));
  }
  mmfs.merge(this.gmfspr.determineEnumerationOfMetricFamilySamples(this.requestRegistry));
  return mmfs.toType004String();
}
Program: 69250
Project: 69250
Buggy source:
@RequestMapping(method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public DiscoveryResponse[] getDiscovery(HttpServletRequest request){
  List<Instance> instances=this.discoverer.discover();
  String localHostname=this.myHostname != null ? this.myHostname : request.getLocalName();
  int localPort=this.myPort != 0 ? this.myPort : request.getLocalPort();
  final String[] targets={String.format("String_Node_Str",localHostname,localPort)};
  log.info(String.format("String_Node_Str",targets[0]));
  List<DiscoveryResponse> result=new LinkedList<>();
  for (  Instance instance : instances) {
    String path=String.format(SingleTargetMetricsEndpoint.ENDPOINT_PATH + "String_Node_Str",instance.getApplicationId(),instance.getInstanceNumber());
    DiscoveryLabel dl=new DiscoveryLabel(path,instance);
    DiscoveryResponse dr=new DiscoveryResponse(targets,dl);
    result.add(dr);
  }
  DiscoveryLabel dl=new DiscoveryLabel(PromregatorMetricsEndpoint.ENDPOINT_PATH);
  result.add(new DiscoveryResponse(targets,dl));
  log.info(String.format("String_Node_Str",result.size()));
  return result.toArray(new DiscoveryResponse[0]);
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_UTF8_VALUE) public DiscoveryResponse[] getDiscovery(HttpServletRequest request){
  List<Instance> instances=this.discoverer.discover(null,null);
  String localHostname=this.myHostname != null ? this.myHostname : request.getLocalName();
  int localPort=this.myPort != 0 ? this.myPort : request.getLocalPort();
  final String[] targets={String.format("String_Node_Str",localHostname,localPort)};
  log.info(String.format("String_Node_Str",targets[0]));
  List<DiscoveryResponse> result=new LinkedList<>();
  for (  Instance instance : instances) {
    String path=String.format(SingleTargetMetricsEndpoint.ENDPOINT_PATH + "String_Node_Str",instance.getApplicationId(),instance.getInstanceNumber());
    DiscoveryLabel dl=new DiscoveryLabel(path,instance);
    DiscoveryResponse dr=new DiscoveryResponse(targets,dl);
    result.add(dr);
  }
  DiscoveryLabel dl=new DiscoveryLabel(PromregatorMetricsEndpoint.ENDPOINT_PATH);
  result.add(new DiscoveryResponse(targets,dl));
  log.info(String.format("String_Node_Str",result.size()));
  return result.toArray(new DiscoveryResponse[0]);
}
Program: 69251
Project: 69251
Buggy source:
@Test public void testPerformance(){
  List<Target> targets=new LinkedList<>();
  Target t=null;
  final int numberOfApps=10000;
  for (int i=0; i < numberOfApps; i++) {
    t=new Target();
    t.setOrgName("String_Node_Str");
    t.setSpaceName("String_Node_Str");
    t.setApplicationName("String_Node_Str" + i);
    t.setPath("String_Node_Str");
    t.setProtocol("String_Node_Str");
    targets.add(t);
  }
  Instant start=Instant.now();
  List<Instance> result=this.appInstanceScanner.determineInstancesFromTargets(targets);
  Instant stop=Instant.now();
  Assert.assertEquals(numberOfApps * 10,result.size());
  Duration d=Duration.between(start,stop);
  Assert.assertTrue(d.minusSeconds(5).isNegative());
}

Fixed version (ground truth):
@Test public void testPerformance(){
  List<ResolvedTarget> targets=new LinkedList<>();
  ResolvedTarget t=null;
  final int numberOfApps=10000;
  for (int i=0; i < numberOfApps; i++) {
    t=new ResolvedTarget();
    t.setOrgName("String_Node_Str");
    t.setSpaceName("String_Node_Str");
    t.setApplicationName("String_Node_Str" + i);
    t.setPath("String_Node_Str");
    t.setProtocol("String_Node_Str");
    targets.add(t);
  }
  Instant start=Instant.now();
  List<Instance> result=this.appInstanceScanner.determineInstancesFromTargets(targets);
  Instant stop=Instant.now();
  Assert.assertEquals(numberOfApps * 10,result.size());
  Duration d=Duration.between(start,stop);
  Assert.assertTrue(d.minusSeconds(5).isNegative());
}
Program: 69252
Project: 69252
Buggy source:
@Override public List<ResolvedTarget> load(Target key) throws Exception {
  log.warn(String.format("String_Node_Str",key.toString()));
  List<Target> list=new LinkedList<>();
  list.add(key);
  return targetResolver.resolveTargets(list);
}

Fixed version (ground truth):
@Override public List<ResolvedTarget> load(Target key) throws Exception {
  log.warn(String.format("String_Node_Str",key.toString()));
  List<Target> list=new LinkedList<>();
  list.add(key);
  return nativeTargetResolver.resolveTargets(list);
}
Program: 69253
Project: 69253
Buggy source:
public CachingTargetResolver(TargetResolver targetResolver){
  this.nativeTargetResolver=targetResolver;
  this.targetResolutionCache=CacheBuilder.newBuilder().expireAfterWrite(this.timeoutCacheApplicationLevel,TimeUnit.SECONDS).removalListener(new RemovalListener<Target,List<ResolvedTarget>>(){
    @Override public void onRemoval(    RemovalNotification<Target,List<ResolvedTarget>> notification){
      if (removalListeners == null)       return;
      for (      CachingTargetResolverRemovalListener listener : removalListeners) {
        listener.onRemoval(notification.getKey(),notification.getValue());
      }
    }
  }
).build(new CacheLoader<Target,List<ResolvedTarget>>(){
    @Override public List<ResolvedTarget> load(    Target key) throws Exception {
      log.warn(String.format("String_Node_Str",key.toString()));
      List<Target> list=new LinkedList<>();
      list.add(key);
      return targetResolver.resolveTargets(list);
    }
  }
);
}

Fixed version (ground truth):
public CachingTargetResolver(TargetResolver targetResolver){
  this.nativeTargetResolver=targetResolver;
}
Program: 69255
Project: 69255
Buggy source:
public String[] getTargets(){
  return targets;
}

Fixed version (ground truth):
public String[] getTargets(){
  return targets.clone();
}
Program: 69256
Project: 69256
Buggy source:
public DiscoveryResponse(String[] targets,DiscoveryLabel labels){
  super();
  this.targets=targets;
  this.labels=labels;
}

Fixed version (ground truth):
public DiscoveryResponse(String[] targets,DiscoveryLabel labels){
  super();
  this.targets=targets.clone();
  this.labels=labels;
}
Program: 69257
Project: 69257
Buggy source:
public String[] getOwnTelemetryLabels(){
  return ownTelemetryLabels;
}

Fixed version (ground truth):
public String[] getOwnTelemetryLabels(){
  return ownTelemetryLabels.clone();
}
Program: 69261
Project: 69261
Buggy source:
private void update(RolesElement wrapper,RolesByOrganisation editedRolesByOrg){
  for (  OrganisationRoles role : OrganisationRoles.values()) {
    wrapper.setRole(role,editedRolesByOrg.hasRole(role));
  }
  wrapper.saveSelectedRoles();
  if (editedRolesByOrg.hasSomeRoles(OrganisationRoles.administrator,OrganisationRoles.sysadmin,OrganisationRoles.rolesmanager)) {
    statusEl.setEnabled(false);
  }
  setStatus(editedIdentity.getStatus());
  wrapper.getRolesEl().setVisible(!isAnonymous());
  rolesSep.setVisible(!isAnonymous());
}

Fixed version (ground truth):
private void update(RolesElement wrapper,RolesByOrganisation editedRolesByOrg){
  for (  OrganisationRoles role : OrganisationRoles.values()) {
    boolean hasRole=editedRolesByOrg != null && editedRolesByOrg.hasRole(role);
    wrapper.setRole(role,hasRole);
  }
  wrapper.saveSelectedRoles();
  if (editedRolesByOrg != null && editedRolesByOrg.hasSomeRoles(OrganisationRoles.administrator,OrganisationRoles.sysadmin,OrganisationRoles.rolesmanager)) {
    statusEl.setEnabled(false);
  }
  setStatus(editedIdentity.getStatus());
  wrapper.getRolesEl().setVisible(!isAnonymous());
  rolesSep.setVisible(!isAnonymous());
}
Program: 69265
Project: 69265
Buggy source:
public static List<Identity> retrieveCoachesFromCourseGroups(CourseGroupManager cgm){
  Set<Identity> uniq=new HashSet<Identity>();
{
    List<Identity> coaches=cgm.getCoachesFromAreas();
    uniq.addAll(coaches);
  }
{
    List<Identity> coaches=cgm.getCoachesFromBusinessGroups();
    uniq.addAll(coaches);
  }
  return new ArrayList<Identity>(uniq);
}

Fixed version (ground truth):
public static List<Identity> retrieveCoachesFromCourseGroups(CourseGroupManager cgm){
  Set<Identity> uniq=new HashSet<>();
  uniq.addAll(cgm.getCoachesFromAreas());
  uniq.addAll(cgm.getCoachesFromBusinessGroups());
  return new ArrayList<>(uniq);
}
Program: 69266
Project: 69266
Buggy source:
public static List<Identity> retrieveParticipantsFromAreas(List<Long> areaKeys,CourseGroupManager cgm){
  List<Identity> participiants=cgm.getParticipantsFromAreas(areaKeys);
  return participiants;
}

Fixed version (ground truth):
public static List<Identity> retrieveParticipantsFromAreas(List<Long> areaKeys,CourseGroupManager cgm){
  return cgm.getParticipantsFromAreas(areaKeys);
}
Program: 69267
Project: 69267
Buggy source:
public static List<Identity> retrieveCoachesFromGroups(List<Long> groupKeys,CourseGroupManager cgm){
  List<Identity> coaches=new ArrayList<Identity>(new HashSet<Identity>(cgm.getCoachesFromBusinessGroups(groupKeys)));
  return coaches;
}

Fixed version (ground truth):
public static List<Identity> retrieveCoachesFromGroups(List<Long> groupKeys,CourseGroupManager cgm){
  return new ArrayList<>(new HashSet<>(cgm.getCoachesFromBusinessGroups(groupKeys)));
}
Program: 69268
Project: 69268
Buggy source:
public static List<Identity> retrieveParticipantsFromGroups(List<Long> groupKeys,CourseGroupManager cgm){
  List<Identity> participiants=cgm.getParticipantsFromBusinessGroups(groupKeys);
  return participiants;
}

Fixed version (ground truth):
public static List<Identity> retrieveParticipantsFromGroups(List<Long> groupKeys,CourseGroupManager cgm){
  return cgm.getParticipantsFromBusinessGroups(groupKeys);
}
Program: 69269
Project: 69269
Buggy source:
public static List<Identity> retrieveParticipantsFromCourse(CourseGroupManager cgm){
  List<Identity> participiants=cgm.getParticipants();
  return participiants;
}

Fixed version (ground truth):
public static List<Identity> retrieveParticipantsFromCourse(CourseGroupManager cgm){
  return cgm.getParticipants();
}
Program: 69270
Project: 69270
Buggy source:
public static List<Identity> retrieveCoachesFromAreas(List<Long> areaKeys,CourseGroupManager cgm){
  List<Identity> coaches=cgm.getCoachesFromAreas(areaKeys);
  Set<Identity> coachesWithoutDuplicates=new HashSet<Identity>(coaches);
  coaches=new ArrayList<Identity>(coachesWithoutDuplicates);
  return coaches;
}

Fixed version (ground truth):
public static List<Identity> retrieveCoachesFromAreas(List<Long> areaKeys,CourseGroupManager cgm){
  List<Identity> coaches=cgm.getCoachesFromAreas(areaKeys);
  return new ArrayList<>(new HashSet<>(coaches));
}
Program: 69271
Project: 69271
Buggy source:
public static List<Identity> retrieveCoachesFromCourse(CourseGroupManager cgm){
  List<Identity> coaches=cgm.getCoaches();
  return coaches;
}

Fixed version (ground truth):
public static List<Identity> retrieveCoachesFromCourse(CourseGroupManager cgm){
  return cgm.getCoaches();
}
Program: 69272
Project: 69272
Buggy source:
public static List<Identity> retrieveParticipantsFromCourseGroups(CourseGroupManager cgm){
  Set<Identity> uniq=new HashSet<Identity>();
{
    List<Identity> participiants=cgm.getParticipantsFromAreas();
    uniq.addAll(participiants);
  }
{
    List<Identity> participiants=cgm.getParticipantsFromBusinessGroups();
    uniq.addAll(participiants);
  }
  return new ArrayList<Identity>(uniq);
}

Fixed version (ground truth):
public static List<Identity> retrieveParticipantsFromCourseGroups(CourseGroupManager cgm){
  Set<Identity> uniq=new HashSet<>();
  uniq.addAll(cgm.getParticipantsFromAreas());
  uniq.addAll(cgm.getParticipantsFromBusinessGroups());
  return new ArrayList<>(uniq);
}
Program: 69273
Project: 69273
Buggy source:
@Override public Identity saveDeletedByData(Identity identity,Identity doer){
  IdentityImpl reloadedIdentity=loadForUpdate(identity);
  if (reloadedIdentity != null) {
    reloadedIdentity.setDeletedBy(getDeletedByName(doer));
    reloadedIdentity.setDeletedDate(new Date());
    List<String> deletedRoles=getRolesSummaryWithResources(reloadedIdentity);
    StringBuilder deletedRoleBuffer=new StringBuilder();
    for (    String deletedRole : deletedRoles) {
      if (deletedRoleBuffer.length() > 0)       deletedRoleBuffer.append("String_Node_Str");
      deletedRoleBuffer.append(deletedRole);
    }
    reloadedIdentity.setDeletedRoles(deletedRoleBuffer.toString());
    reloadedIdentity=dbInstance.getCurrentEntityManager().merge(reloadedIdentity);
    dbInstance.commit();
  }
  return reloadedIdentity;
}

Fixed version (ground truth):
@Override public Identity saveDeletedByData(Identity identity,Identity doer){
  IdentityImpl reloadedIdentity=loadForUpdate(identity);
  if (reloadedIdentity != null) {
    reloadedIdentity.setDeletedBy(getDeletedByName(doer));
    reloadedIdentity.setDeletedDate(new Date());
    Collection<String> deletedRoles=new HashSet<>(getRolesSummaryWithResources(reloadedIdentity));
    StringBuilder deletedRoleBuffer=new StringBuilder();
    for (    String deletedRole : deletedRoles) {
      if (deletedRoleBuffer.length() > 0)       deletedRoleBuffer.append("String_Node_Str");
      deletedRoleBuffer.append(deletedRole);
    }
    reloadedIdentity.setDeletedRoles(deletedRoleBuffer.toString());
    reloadedIdentity=dbInstance.getCurrentEntityManager().merge(reloadedIdentity);
    dbInstance.commit();
  }
  return reloadedIdentity;
}
Program: 69274
Project: 69274
Buggy source:
private void appendStatistics(CorrectionIdentityRow row,AssessmentItemSession itemSession,ItemSessionState itemSessionState,AssessmentItemRef itemRef){
  row.addSession();
  if (itemSessionState.isResponded()) {
    row.addAnswered();
  }
 else {
    row.addNotAnswered();
  }
  BigDecimal manualScore=null;
  if (itemSession != null) {
    manualScore=itemSession.getManualScore();
    if (itemSession.isToReview()) {
      row.addToReview();
    }
  }
  boolean manualCorrection=model.isManualCorrection(itemRef);
  row.setManualCorrection(manualCorrection);
  if (manualCorrection) {
    if (manualScore == null) {
      row.addNotCorrected();
    }
 else {
      row.addCorrected();
    }
  }
 else   if (manualScore != null) {
    row.addCorrected();
  }
 else {
    row.addAutoCorrected();
  }
}

Fixed version (ground truth):
private void appendStatistics(CorrectionIdentityRow row,AssessmentItemSession itemSession,ItemSessionState itemSessionState,AssessmentItemRef itemRef){
  row.addSession();
  if (itemSessionState.isResponded()) {
    row.addAnswered();
  }
 else {
    row.addNotAnswered();
  }
  BigDecimal manualScore=null;
  if (itemSession != null) {
    manualScore=itemSession.getManualScore();
    if (itemSession.isToReview()) {
      row.addToReview();
    }
  }
  boolean manualCorrection=model.isManualCorrection(itemRef);
  if (!row.isManualCorrection()) {
    row.setManualCorrection(manualCorrection);
  }
  if (manualCorrection) {
    if (manualScore == null) {
      row.addNotCorrected();
    }
 else {
      row.addCorrected();
    }
  }
 else   if (manualScore != null) {
    row.addCorrected();
  }
 else {
    row.addAutoCorrected();
  }
}
Program: 69275
Project: 69275
Buggy source:
private TaxonomyLevelOverviewController doSelectTaxonomyLevel(UserRequest ureq,TaxonomyLevel taxonomyLevel){
  OLATResourceable ores=OresHelper.createOLATResourceableInstance("String_Node_Str",taxonomyLevel.getKey());
  WindowControl bwControl=addToHistory(ureq,ores,null);
  TaxonomyLevelOverviewController detailsLevelCtrl=new TaxonomyLevelOverviewController(ureq,bwControl,taxonomyLevel);
  listenTo(detailsLevelCtrl);
  stackPanel.pushController(taxonomyLevel.getDisplayName(),detailsLevelCtrl);
  return detailsLevelCtrl;
}

Fixed version (ground truth):
private TaxonomyLevelOverviewController doSelectTaxonomyLevel(UserRequest ureq,TaxonomyLevel taxonomyLevel){
  if (taxonomyLevel == null) {
    showWarning("String_Node_Str");
    loadModel(false,false);
    return null;
  }
 else {
    OLATResourceable ores=OresHelper.createOLATResourceableInstance("String_Node_Str",taxonomyLevel.getKey());
    WindowControl bwControl=addToHistory(ureq,ores,null);
    TaxonomyLevelOverviewController detailsLevelCtrl=new TaxonomyLevelOverviewController(ureq,bwControl,taxonomyLevel);
    listenTo(detailsLevelCtrl);
    stackPanel.pushController(taxonomyLevel.getDisplayName(),detailsLevelCtrl);
    return detailsLevelCtrl;
  }
}
Program: 69276
Project: 69276
Buggy source:
@Override public void activate(UserRequest ureq,List<ContextEntry> entries,StateEntry state){
  if (entries == null || entries.isEmpty())   return;
  String type=entries.get(0).getOLATResourceable().getResourceableTypeName();
  if ("String_Node_Str".equalsIgnoreCase(type)) {
    Long levelKey=entries.get(0).getOLATResourceable().getResourceableId();
    List<TaxonomyLevelRow> rows=model.getObjects();
    for (    TaxonomyLevelRow row : rows) {
      if (levelKey.equals(row.getKey())) {
        List<ContextEntry> subEntries=entries.subList(1,entries.size());
        doSelectTaxonomyLevel(ureq,row).activate(ureq,subEntries,entries.get(0).getTransientState());
        break;
      }
    }
  }
}

Fixed version (ground truth):
@Override public void activate(UserRequest ureq,List<ContextEntry> entries,StateEntry state){
  if (entries == null || entries.isEmpty())   return;
  String type=entries.get(0).getOLATResourceable().getResourceableTypeName();
  if ("String_Node_Str".equalsIgnoreCase(type)) {
    Long levelKey=entries.get(0).getOLATResourceable().getResourceableId();
    List<TaxonomyLevelRow> rows=model.getObjects();
    for (    TaxonomyLevelRow row : rows) {
      if (levelKey.equals(row.getKey())) {
        List<ContextEntry> subEntries=entries.subList(1,entries.size());
        TaxonomyLevelOverviewController ctrl=doSelectTaxonomyLevel(ureq,row);
        if (ctrl != null) {
          ctrl.activate(ureq,subEntries,entries.get(0).getTransientState());
        }
        break;
      }
    }
  }
}
Program: 69277
Project: 69277
Buggy source:
private void fillCheckbox(BGRightsOption groupRights,List<String> permissions){
  List<BGRight> selections=new ArrayList<>();
  for (  String permission : CourseRights.getAvailableRights()) {
    BGRight permissionEl=new BGRight(permission);
    boolean selected=permissions == null ? false : permissions.contains(permission);
    MultipleSelectionElement selection=createSelection(selected);
    permissionEl.setSelection(selection);
    selection.setUserObject(permissionEl);
    selections.add(permissionEl);
  }
  groupRights.setRightsEl(selections);
}

Fixed version (ground truth):
private void fillCheckbox(BGRightsRow groupRights,List<String> permissions){
  List<BGRight> selections=new ArrayList<>();
  for (  String permission : CourseRights.getAvailableRights()) {
    BGRight permissionEl=new BGRight(permission);
    boolean selected=permissions == null ? false : permissions.contains(permission);
    MultipleSelectionElement selection=createSelection(selected);
    permissionEl.setSelection(selection);
    selection.setUserObject(permissionEl);
    selections.add(permissionEl);
  }
  groupRights.setRightsEl(selections);
}
Program: 69278
Project: 69278
Buggy source:
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel tableColumnModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  int colIndex=0;
  tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel("String_Node_Str",colIndex++));
  tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel("String_Node_Str",colIndex++));
  for (  String right : CourseRights.getAvailableRights()) {
    tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(right,colIndex++));
  }
  tableDataModel=new GroupsAndRightsDataModel(tableColumnModel);
  tableEl=uifactory.addTableElement(getWindowControl(),"String_Node_Str",tableDataModel,getTranslator(),formLayout);
  FormLayoutContainer buttonsLayout=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
  buttonsLayout.setRootForm(mainForm);
  formLayout.add("String_Node_Str",buttonsLayout);
  if (!readOnly) {
    uifactory.addFormSubmitButton("String_Node_Str",buttonsLayout);
    removeAllLink=uifactory.addFormLink("String_Node_Str",buttonsLayout,Link.BUTTON);
  }
}

Fixed version (ground truth):
@Override protected void initForm(FormItemContainer formLayout,Controller listener,UserRequest ureq){
  FlexiTableColumnModel tableColumnModel=FlexiTableDataModelFactory.createFlexiTableColumnModel();
  int colIndex=0;
  tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel("String_Node_Str",colIndex++,new BGRightsResourceNameRenderer()));
  tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel("String_Node_Str",colIndex++));
  for (  String right : CourseRights.getAvailableRights()) {
    tableColumnModel.addFlexiColumnModel(new DefaultFlexiColumnModel(right,colIndex++));
  }
  tableDataModel=new GroupsAndRightsDataModel(tableColumnModel,getTranslator());
  tableEl=uifactory.addTableElement(getWindowControl(),"String_Node_Str",tableDataModel,getTranslator(),formLayout);
  FormLayoutContainer buttonsLayout=FormLayoutContainer.createButtonLayout("String_Node_Str",getTranslator());
  buttonsLayout.setRootForm(mainForm);
  formLayout.add("String_Node_Str",buttonsLayout);
  if (!readOnly) {
    uifactory.addFormSubmitButton("String_Node_Str",buttonsLayout);
    removeAllLink=uifactory.addFormLink("String_Node_Str",buttonsLayout,Link.BUTTON);
  }
}
Program: 69279
Project: 69279
Buggy source:
private MultipleSelectionElement createSelection(boolean selected){
  String name="String_Node_Str" + (++counter);
  MultipleSelectionElement selection=uifactory.addCheckboxesHorizontal(name,flc,keys,values);
  selection.setEnabled(!readOnly);
  flc.add(name,selection);
  if (selected) {
    selection.select(keys[0],true);
  }
  return selection;
}

Fixed version (ground truth):
private MultipleSelectionElement createSelection(boolean selected){
  String name="String_Node_Str" + (++counter);
  MultipleSelectionElement selection=uifactory.addCheckboxesHorizontal(name,null,flc,keys,values);
  selection.setEnabled(!readOnly);
  flc.add(name,selection);
  if (selected) {
    selection.select(keys[0],true);
  }
  return selection;
}
Program: 69281
Project: 69281
Buggy source:
private void loadModel(){
  List<BusinessGroup> groups=businessGroupService.findBusinessGroups(null,courseEntry,0,-1);
  List<Group> baseGroups=getAllBaseGroups(groups);
  List<BGRights> currentRights=rightManager.findBGRights(baseGroups,courseEntry.getOlatResource());
  Map<Group,BGRights> tutorToRightsMap=new HashMap<>();
  Map<Group,BGRights> participantToRightsMap=new HashMap<>();
  for (  BGRights right : currentRights) {
    if (right.getRole() == BGRightsRole.tutor) {
      tutorToRightsMap.put(right.getBaseGroup(),right);
    }
 else     if (right.getRole() == BGRightsRole.participant) {
      participantToRightsMap.put(right.getBaseGroup(),right);
    }
  }
  List<BGRightsOption> options=new ArrayList<>();
  String courseName=courseEntry.getDisplayname();
  Group defGroup=repositoryService.getDefaultGroup(courseEntry);
  options.add(getRightsOption(defGroup,courseName,tutorToRightsMap.get(defGroup),BGRightsRole.tutor));
  options.add(getRightsOption(defGroup,courseName,participantToRightsMap.get(defGroup),BGRightsRole.participant));
  for (  BusinessGroup group : groups) {
    String name=group.getName();
    Group bGroup=group.getBaseGroup();
    options.add(getRightsOption(bGroup,name,tutorToRightsMap.get(bGroup),BGRightsRole.tutor));
    options.add(getRightsOption(bGroup,name,participantToRightsMap.get(bGroup),BGRightsRole.participant));
  }
  tableDataModel.setObjects(options);
}

Fixed version (ground truth):
private void loadModel(){
  List<BusinessGroup> groups=businessGroupService.findBusinessGroups(null,courseEntry,0,-1);
  List<Group> baseGroups=getAllBaseGroups(groups);
  List<BGRights> currentRights=rightManager.findBGRights(baseGroups,courseEntry.getOlatResource());
  Map<Group,BGRights> tutorToRightsMap=new HashMap<>();
  Map<Group,BGRights> participantToRightsMap=new HashMap<>();
  for (  BGRights right : currentRights) {
    if (right.getRole() == BGRightsRole.tutor) {
      tutorToRightsMap.put(right.getBaseGroup(),right);
    }
 else     if (right.getRole() == BGRightsRole.participant) {
      participantToRightsMap.put(right.getBaseGroup(),right);
    }
  }
  List<BGRightsRow> options=new ArrayList<>();
  String courseName=courseEntry.getDisplayname();
  Group defGroup=repositoryService.getDefaultGroup(courseEntry);
  options.add(getRightsOption(defGroup,courseName,tutorToRightsMap.get(defGroup),BGRightsRole.tutor,BGRightsResourceType.repositoryEntry));
  options.add(getRightsOption(defGroup,courseName,participantToRightsMap.get(defGroup),BGRightsRole.participant,BGRightsResourceType.repositoryEntry));
  for (  BusinessGroup group : groups) {
    String name=group.getName();
    Group bGroup=group.getBaseGroup();
    options.add(getRightsOption(bGroup,name,tutorToRightsMap.get(bGroup),BGRightsRole.tutor,BGRightsResourceType.businessGroup));
    options.add(getRightsOption(bGroup,name,participantToRightsMap.get(bGroup),BGRightsRole.participant,BGRightsResourceType.businessGroup));
  }
  tableDataModel.setObjects(options);
}
Program: 69282
Project: 69282
Buggy source:
private BGRightsOption getRightsOption(Group group,String name,BGRights r,BGRightsRole role){
  BGRightsOption options=new BGRightsOption(group,name,role);
  fillCheckbox(options,r == null ? null : r.getRights());
  FormLink rmLink=uifactory.addFormLink("String_Node_Str" + (++counter),"String_Node_Str","String_Node_Str",flc,Link.LINK);
  rmLink.setUserObject(options);
  return options;
}

Fixed version (ground truth):
private BGRightsRow getRightsOption(Group group,String name,BGRights r,BGRightsRole role,BGRightsResourceType type){
  BGRightsRow options=new BGRightsRow(group,name,role,type);
  fillCheckbox(options,r == null ? null : r.getRights());
  FormLink rmLink=uifactory.addFormLink("String_Node_Str" + (++counter),"String_Node_Str","String_Node_Str",flc,Link.LINK);
  rmLink.setUserObject(options);
  return options;
}
Program: 69285
Project: 69285
Buggy source:
/** 
 * This is a convenience method to log out. IMPORTANT: This method initiates a redirect and RETURN. Make sure you return the call hierarchy gracefully. Most of all, don't touch HttpServletRequest or the Session after you call this method.
 * @param ureq
 */
public static void doLogout(UserRequest ureq){
  if (ureq == null)   return;
  boolean wasGuest=false;
  UserSession usess=ureq.getUserSession();
  if (usess != null && usess.getRoles() != null) {
    wasGuest=usess.getRoles().isGuestOnly();
  }
  String lang=I18nManager.getInstance().getLocaleKey(ureq.getLocale());
  HttpSession session=ureq.getHttpReq().getSession(false);
  if (session != null) {
    try {
      session.invalidate();
      deleteShibsessionCookie(ureq);
    }
 catch (    IllegalStateException ise) {
    }
  }
  String setWarning=wasGuest ? "String_Node_Str" : "String_Node_Str";
  ureq.getDispatchResult().setResultingMediaResource(new RedirectMediaResource(WebappHelper.getServletContextPath() + "String_Node_Str" + lang+ setWarning));
}

Fixed version (ground truth):
/** 
 * This is a convenience method to log out. IMPORTANT: This method initiates a redirect and RETURN. Make sure you return the call hierarchy gracefully. Most of all, don't touch HttpServletRequest or the Session after you call this method.
 * @param ureq
 */
public static void doLogout(UserRequest ureq){
  if (ureq == null)   return;
  boolean wasGuest=false;
  UserSession usess=ureq.getUserSession();
  if (usess != null && usess.getRoles() != null) {
    wasGuest=usess.getRoles().isGuestOnly();
  }
  String lang=CoreSpringFactory.getImpl(I18nModule.class).getLocaleKey(ureq.getLocale());
  HttpSession session=ureq.getHttpReq().getSession(false);
  if (session != null) {
    try {
      session.invalidate();
      deleteShibsessionCookie(ureq);
    }
 catch (    IllegalStateException ise) {
    }
  }
  String setWarning=wasGuest ? "String_Node_Str" : "String_Node_Str";
  ureq.getDispatchResult().setResultingMediaResource(new RedirectMediaResource(WebappHelper.getServletContextPath() + "String_Node_Str" + lang+ setWarning));
}
Program: 69288
Project: 69288
Buggy source:
public PFNotifications(Subscriber subscriber,Locale locale,Date compareDate,PFManager pfManager,NotificationsManager notificationsManager){
  this.subscriber=subscriber;
  this.compareDate=compareDate;
  this.notificationsManager=notificationsManager;
  this.pfManager=pfManager;
  translator=Util.createPackageTranslator(PFRunController.class,locale);
}

Fixed version (ground truth):
public PFNotifications(Subscriber subscriber,Locale locale,Date compareDate,PFManager pfManager,NotificationsManager notificationsManager,UserManager userManager){
  this.subscriber=subscriber;
  this.compareDate=compareDate;
  this.notificationsManager=notificationsManager;
  this.pfManager=pfManager;
  this.userManager=userManager;
  translator=Util.createPackageTranslator(PFRunController.class,locale);
}
Program: 69289
Project: 69289
Buggy source:
@Override public SubscriptionInfo createSubscriptionInfo(Subscriber subscriber,Locale locale,Date compareDate){
  SubscriptionInfo si=null;
  Publisher p=subscriber.getPublisher();
  try {
    final Translator translator=Util.createPackageTranslator(PFRunController.class,locale);
    PFNotifications notifications=new PFNotifications(subscriber,locale,compareDate,pfManager,notificationsManager);
    List<SubscriptionListItem> items=notifications.getItems();
    if (items.isEmpty()) {
      si=notificationsManager.getNoSubscriptionInfo();
    }
 else {
      String displayName=notifications.getDisplayname();
      String title=translator.translate("String_Node_Str",new String[]{displayName});
      si=new SubscriptionInfo(subscriber.getKey(),p.getType(),new TitleItem(title,CSS_CLASS_ICON),items);
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    si=notificationsManager.getNoSubscriptionInfo();
  }
  return si;
}

Fixed version (ground truth):
@Override public SubscriptionInfo createSubscriptionInfo(Subscriber subscriber,Locale locale,Date compareDate){
  SubscriptionInfo si=null;
  Publisher p=subscriber.getPublisher();
  try {
    final Translator translator=Util.createPackageTranslator(PFRunController.class,locale);
    PFNotifications notifications=new PFNotifications(subscriber,locale,compareDate,pfManager,notificationsManager,userManager);
    List<SubscriptionListItem> items=notifications.getItems();
    if (items.isEmpty()) {
      si=notificationsManager.getNoSubscriptionInfo();
    }
 else {
      String displayName=notifications.getDisplayname();
      String title=translator.translate("String_Node_Str",new String[]{displayName});
      si=new SubscriptionInfo(subscriber.getKey(),p.getType(),new TitleItem(title,CSS_CLASS_ICON),items);
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    si=notificationsManager.getNoSubscriptionInfo();
  }
  return si;
}
Program: 69290
Project: 69290
Buggy source:
/** 
 * @param item
 * @return The media url of the item
 */
public String getMediaUrl(Item item){
  item=feedManager.loadItem(item.getKey());
  if (item == null) {
    return null;
  }
  String file=null;
  Enclosure enclosure=item.getEnclosure();
  if (enclosure != null) {
    if (helperFeed.isExternal()) {
      file=item.getEnclosure().getExternalUrl();
    }
 else     if (helperFeed.isInternal()) {
      file=this.baseUri + "String_Node_Str" + item.getGuid()+ "String_Node_Str"+ MEDIA_DIR+ "String_Node_Str"+ enclosure.getFileName();
    }
  }
  return file;
}

Fixed version (ground truth):
/** 
 * @param item
 * @return The media url of the item
 */
public String getMediaUrl(Item item){
  item=feedManager.loadItem(item.getKey());
  if (item == null) {
    return null;
  }
  String file=null;
  Enclosure enclosure=item.getEnclosure();
  if (enclosure != null) {
    if (item.getFeed().isExternal()) {
      file=item.getEnclosure().getExternalUrl();
    }
 else     if (item.getFeed().isInternal()) {
      file=this.baseUri + "String_Node_Str" + item.getGuid()+ "String_Node_Str"+ MEDIA_DIR+ "String_Node_Str"+ enclosure.getFileName();
    }
  }
  return file;
}
Program: 69291
Project: 69291
Buggy source:
/** 
 * Get the item description with media file paths that are dispatchable by a FeedMediaDispatcher.
 * @param item
 * @return 
 */
public String getItemDescriptionForBrowser(Item item){
  String itemDescription="String_Node_Str";
  if (item != null) {
    String description=item.getDescription();
    if (description != null) {
      if (helperFeed.isExternal()) {
        Filter xssFilter=FilterFactory.getXSSFilter(description.length() + 1);
        itemDescription=xssFilter.filter(description);
      }
 else {
        String basePath=baseUri + "String_Node_Str" + item.getGuid();
        Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
        itemDescription=mediaUrlFilter.filter(description);
      }
    }
    itemDescription=Formatter.formatLatexFormulas(itemDescription);
  }
  return itemDescription;
}

Fixed version (ground truth):
/** 
 * Get the item description with media file paths that are dispatchable by a FeedMediaDispatcher.
 * @param item
 * @return 
 */
public String getItemDescriptionForBrowser(Item item){
  String itemDescription="String_Node_Str";
  if (item != null) {
    String description=item.getDescription();
    if (description != null) {
      if (item.getFeed().isExternal()) {
        Filter xssFilter=FilterFactory.getXSSFilter(description.length() + 1);
        itemDescription=xssFilter.filter(description);
      }
 else {
        String basePath=baseUri + "String_Node_Str" + item.getGuid();
        Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
        itemDescription=mediaUrlFilter.filter(description);
      }
    }
    itemDescription=Formatter.formatLatexFormulas(itemDescription);
  }
  return itemDescription;
}
Program: 69293
Project: 69293
Buggy source:
/** 
 * Set the base uri of an internal feed. <br> E.g http://my.olat.org/olat/feed/ident/[IDKEY]/token/[TOKEN]/id/[ORESID]
 */
public void setURIs(){
  if (helperFeed.isInternal()) {
    baseUri=FeedManager.getInstance().getFeedBaseUri(helperFeed,identity,courseId,nodeId);
    feedUrl=baseUri + "String_Node_Str" + FeedManager.RSS_FEED_NAME;
  }
 else   if (helperFeed.isExternal()) {
    baseUri=FeedManager.getInstance().getFeedBaseUri(helperFeed,identity,courseId,nodeId);
    feedUrl=helperFeed.getExternalFeedUrl();
  }
 else {
    baseUri=FeedManager.getInstance().getFeedBaseUri(helperFeed,identity,courseId,nodeId);
    feedUrl=null;
    helperFeed.setExternalImageURL(null);
  }
}

Fixed version (ground truth):
/** 
 * Set the base uri of an internal feed. <br> E.g http://my.olat.org/olat/feed/ident/[IDKEY]/token/[TOKEN]/id/[ORESID]
 * @param feed 
 */
public void setURIs(Feed feed){
  baseUri=FeedManager.getInstance().getFeedBaseUri(feed,identity,courseId,nodeId);
  if (feed.isInternal()) {
    feedUrl=baseUri + "String_Node_Str" + FeedManager.RSS_FEED_NAME;
  }
 else   if (feed.isExternal()) {
    feedUrl=feed.getExternalFeedUrl();
  }
 else {
    feedUrl=null;
  }
}
Program: 69294
Project: 69294
Buggy source:
/** 
 * The item content with media file paths that are dispatchable by a FeedMediaDispatcher.
 * @param item
 * @return
 */
public String getItemContentForBrowser(Item item){
  String itemContent="String_Node_Str";
  if (item != null) {
    String content=item.getContent();
    if (content != null) {
      if (helperFeed.isExternal()) {
        Filter xssFilter=FilterFactory.getXSSFilter(content.length() + 1);
        itemContent=xssFilter.filter(content);
      }
 else {
        String basePath=baseUri + "String_Node_Str" + item.getGuid();
        Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
        itemContent=mediaUrlFilter.filter(content);
      }
    }
  }
  return itemContent;
}

Fixed version (ground truth):
/** 
 * The item content with media file paths that are dispatchable by a FeedMediaDispatcher.
 * @param item
 * @return
 */
public String getItemContentForBrowser(Item item){
  String itemContent="String_Node_Str";
  if (item != null) {
    String content=item.getContent();
    if (content != null) {
      if (item.getFeed().isExternal()) {
        Filter xssFilter=FilterFactory.getXSSFilter(content.length() + 1);
        itemContent=xssFilter.filter(content);
      }
 else {
        String basePath=baseUri + "String_Node_Str" + item.getGuid();
        Filter mediaUrlFilter=FilterFactory.getBaseURLToMediaRelativeURLFilter(basePath);
        itemContent=mediaUrlFilter.filter(content);
      }
    }
  }
  return itemContent;
}
Program: 69295
Project: 69295
Buggy source:
/** 
 * Use this constructor if no internationalization properties are required
 * @param feed
 * @param identityKey
 */
FeedViewHelper(Feed feed,Identity identity,Long courseId,String nodeId){
  this.helperFeed=feed;
  this.identity=identity;
  this.courseId=courseId;
  this.nodeId=nodeId;
  this.setURIs();
}

Fixed version (ground truth):
/** 
 * Use this constructor if no internationalization properties are required
 * @param feed
 * @param identityKey
 */
FeedViewHelper(Feed feed,Identity identity,Long courseId,String nodeId){
  this.identity=identity;
  this.courseId=courseId;
  this.nodeId=nodeId;
  this.setURIs(feed);
}
Program: 69296
Project: 69296
Buggy source:
@Override public Feed updateFeedMode(Boolean external,Feed feed){
  if (feed == null)   return null;
  Feed reloaded=feedDAO.loadFeed(feed);
  if (reloaded == null)   return null;
  if (external == null || feed.isUndefined() || external.booleanValue() != feed.getExternal().booleanValue()) {
    itemDAO.removeItems(feed);
  }
  reloaded.setExternal(external);
  return updateFeed(reloaded);
}

Fixed version (ground truth):
@Override public Feed updateFeedMode(Boolean external,Feed feed){
  if (feed == null)   return null;
  Feed reloaded=feedDAO.loadFeed(feed);
  if (reloaded == null)   return null;
  if (external == null || feed.isUndefined() || external.booleanValue() != feed.getExternal().booleanValue()) {
    itemDAO.removeItems(feed);
    reloaded.setExternalImageURL(null);
  }
  reloaded.setExternal(external);
  return updateFeed(reloaded);
}
Program: 69298
Project: 69298
Buggy source:
public CourseAccessAndProperties(RepositoryEntry re,RepositoryEntryAllowToLeaveOptions setting,int access,boolean membersOnly,boolean canCopy,boolean canReference,boolean canDownload){
  super();
  this.repoEntry=re;
  this.setting=setting;
  this.access=access;
  this.membersOnly=membersOnly;
  this.canCopy=canCopy;
  this.canReference=canReference;
  this.canDownload=canDownload;
}

Fixed version (ground truth):
public CourseAccessAndProperties(RepositoryEntry re,RepositoryEntryAllowToLeaveOptions setting,int access,boolean membersOnly,boolean canCopy,boolean canReference,boolean canDownload){
  this.repoEntry=re;
  this.setting=setting;
  this.access=access;
  this.membersOnly=membersOnly;
  this.canCopy=canCopy;
  this.canReference=canReference;
  this.canDownload=canDownload;
}
Program: 69304
Project: 69304
Buggy source:
@Override protected void formOK(UserRequest ureq){
  if (catalogBox.isOneSelected()) {
    String val=catalogBox.getSelectedKey();
    addToRunContext("String_Node_Str",val);
    List<CategoryLabel> categories=new ArrayList<CategoryLabel>();
    for (    FormLink deletedLink : deleteLinks) {
      CategoryLabel cat=(CategoryLabel)deletedLink.getUserObject();
      categories.add(cat);
    }
    addToRunContext("String_Node_Str",categories);
  }
  fireEvent(ureq,StepsEvent.ACTIVATE_NEXT);
}

Fixed version (ground truth):
@Override protected void formOK(UserRequest ureq){
  CourseCatalog courseCatalog=new CourseCatalog();
  courseCatalog.setChoiceValue(catalogBox.getSelectedKey());
  boolean removeAll="String_Node_Str".equals(catalogBox.getSelectedKey());
  for (  FormLink deletedLink : deleteLinks) {
    CategoryLabel cat=(CategoryLabel)deletedLink.getUserObject();
    if (removeAll) {
      cat.setDeleted(true);
    }
    courseCatalog.getCategoryLabels().add(cat);
  }
  addToRunContext("String_Node_Str",courseCatalog);
  fireEvent(ureq,StepsEvent.ACTIVATE_NEXT);
}
Program: 69305
Project: 69305
Buggy source:
private List<Member> initFormMemberList(String name,List<Identity> ids,Set<Long> duplicateCatcher,FormItemContainer formLayout,boolean withEmail){
  String page=velocity_root + "String_Node_Str";
  FormLayoutContainer container=FormLayoutContainer.createCustomFormLayout(name,getTranslator(),page);
  formLayout.add(name,container);
  container.setRootForm(mainForm);
  List<Member> members=createMemberLinks(ids,duplicateCatcher,container,withEmail);
  container.contextPut("String_Node_Str",members);
  container.contextPut("String_Node_Str",avatarBaseURL);
  return members;
}

Fixed version (ground truth):
private List<Member> initFormMemberList(String name,List<Identity> ids,Set<Long> duplicateCatcher,FormItemContainer formLayout,boolean withEmail){
  String page=velocity_root + "String_Node_Str";
  FormLayoutContainer container=FormLayoutContainer.createCustomFormLayout(name,getTranslator(),page);
  container.contextPut("String_Node_Str",userPropertyAvatarHandlers);
  Map<String,Integer> handlerLookupMap=new HashMap<String,Integer>();
  for (int i=userPropertyHandlers.size(); i-- > 0; ) {
    UserPropertyHandler handler=userPropertyHandlers.get(i);
    handlerLookupMap.put(handler.getName(),i);
  }
  container.contextPut("String_Node_Str",handlerLookupMap);
  formLayout.add(name,container);
  container.setRootForm(mainForm);
  List<Member> members=createMemberLinks(ids,duplicateCatcher,container,withEmail);
  container.contextPut("String_Node_Str",members);
  container.contextPut("String_Node_Str",avatarBaseURL);
  return members;
}
Program: 69306
Project: 69306
Buggy source:
@Override public Controller createController(UserRequest lureq,WindowControl lwControl){
  lwControl.getWindowBackOffice().getChiefController().addBodyCssClass("String_Node_Str");
  return new MembersPrintController(lureq,lwControl,userPropertyHandlers,getTranslator(),ownerList,coachList,participantList,waitingtList,showOwners,showCoaches,showParticipants,showWaiting,courseEnv != null ? courseEnv.getCourseTitle() : businessGroup.getName());
}

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

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