nus-yam/ex-repair huggingface dataset:
Program: 69689
Project: 69689
Buggy source:
public String getHighlightTitle(){
  if (StringHelper.containsNonWhitespace(highlightTitle)) {
    return highlightTitle;
  }
  return getTitle();
}

Fixed version (ground truth):
public String getHighlightTitle(){
  return highlightTitle;
}
Program: 69693
Project: 69693
Buggy source:
/** 
 * Get an HTML summary of existing references or null if no references exist.
 * @param target
 * @param locale
 * @return HTML fragment or null if no references exist.
 */
public String getReferencesToSummary(OLATResourceable target,Locale locale){
  Translator translator=Util.createPackageTranslator(this.getClass(),locale);
  StringBuilder result=new StringBuilder(100);
  List<ReferenceImpl> refs=getReferencesTo(target);
  if (refs.size() == 0)   return null;
  for (  ReferenceImpl ref : refs) {
    OLATResourceImpl source=ref.getSource();
    if (source.getResourceableTypeName().equals(CourseModule.getCourseTypeName())) {
      try {
        ICourse course=CourseFactory.loadCourse(source);
        result.append(translator.translate("String_Node_Str",new String[]{course.getCourseTitle()}));
      }
 catch (      Exception e) {
        log.error("String_Node_Str",e);
        result.append(translator.translate("String_Node_Str",new String[]{"String_Node_Str" + source.getKey().toString() + "String_Node_Str"}));
      }
    }
 else {
      result.append(translator.translate("String_Node_Str",new String[]{source.getKey().toString()}));
    }
    result.append("String_Node_Str");
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Get an HTML summary of existing references or null if no references exist.
 * @param target
 * @param locale
 * @return HTML fragment or null if no references exist.
 */
public String getReferencesToSummary(OLATResourceable target,Locale locale){
  Translator translator=Util.createPackageTranslator(this.getClass(),locale);
  StringBuilder result=new StringBuilder(100);
  List<ReferenceImpl> refs=getReferencesTo(target);
  if (refs.size() == 0)   return null;
  for (  ReferenceImpl ref : refs) {
    OLATResourceImpl source=ref.getSource();
    if (source.getResourceableTypeName().equals(CourseModule.getCourseTypeName())) {
      try {
        ICourse course=CourseFactory.loadCourse(source);
        result.append(translator.translate("String_Node_Str",new String[]{StringHelper.escapeHtml(course.getCourseTitle())}));
      }
 catch (      Exception e) {
        log.error("String_Node_Str",e);
        result.append(translator.translate("String_Node_Str",new String[]{"String_Node_Str" + source.getKey().toString() + "String_Node_Str"}));
      }
    }
 else {
      result.append(translator.translate("String_Node_Str",new String[]{source.getKey().toString()}));
    }
    result.append("String_Node_Str");
  }
  return result.toString();
}
Program: 69694
Project: 69694
Buggy source:
@Test public void testDeletePersonalCalendarEvents() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login(id2.getName(),"String_Node_Str"));
  CalendarManager calendarManager=CalendarManagerFactory.getInstance().getCalendarManager();
  KalendarRenderWrapper calendarWrapper=calendarManager.getPersonalCalendar(id2);
  KalendarEvent kalEvent=new KalendarEvent(UUID.randomUUID().toString(),"String_Node_Str",new Date(),new Date());
  calendarManager.addEventTo(calendarWrapper.getKalendar(),kalEvent);
  URI eventUri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(id2.getKey().toString()).path("String_Node_Str").path("String_Node_Str" + calendarWrapper.getKalendar().getCalendarID()).path("String_Node_Str").path(kalEvent.getID()).build();
  HttpDelete delEventMethod=conn.createDelete(eventUri,MediaType.APPLICATION_JSON,true);
  HttpResponse delEventResponse=conn.execute(delEventMethod);
  assertEquals(200,delEventResponse.getStatusLine().getStatusCode());
  EntityUtils.consume(delEventResponse.getEntity());
  conn.shutdown();
  Collection<KalendarEvent> savedEvents=calendarWrapper.getKalendar().getEvents();
  for (  KalendarEvent savedEvent : savedEvents) {
    Assert.assertFalse(savedEvent.getID().equals(kalEvent.getID()));
  }
}

Fixed version (ground truth):
@Test public void testDeletePersonalCalendarEvents() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login(id2.getName(),"String_Node_Str"));
  CalendarManager calendarManager=CalendarManagerFactory.getInstance().getCalendarManager();
  KalendarRenderWrapper calendarWrapper=calendarManager.getPersonalCalendar(id2);
  KalendarEvent kalEvent=new KalendarEvent(UUID.randomUUID().toString(),"String_Node_Str",new Date(),new Date());
  calendarManager.addEventTo(calendarWrapper.getKalendar(),kalEvent);
  URI eventUri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(id2.getKey().toString()).path("String_Node_Str").path("String_Node_Str" + calendarWrapper.getKalendar().getCalendarID()).path("String_Node_Str").path(kalEvent.getID()).build();
  HttpDelete delEventMethod=conn.createDelete(eventUri,MediaType.APPLICATION_JSON);
  HttpResponse delEventResponse=conn.execute(delEventMethod);
  assertEquals(200,delEventResponse.getStatusLine().getStatusCode());
  EntityUtils.consume(delEventResponse.getEntity());
  conn.shutdown();
  Collection<KalendarEvent> savedEvents=calendarWrapper.getKalendar().getEvents();
  for (  KalendarEvent savedEvent : savedEvents) {
    Assert.assertFalse(savedEvent.getID().equals(kalEvent.getID()));
  }
}
Program: 69696
Project: 69696
Buggy source:
@Test public void testDeleteCatalogEntry() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogManager catalogManager=CatalogManager.getInstance();
  List<CatalogEntry> entries=catalogManager.getChildrenOf(root1);
  for (  CatalogEntry entry : entries) {
    assertFalse(entry.getKey().equals(entry2.getKey()));
  }
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testDeleteCatalogEntry() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogManager catalogManager=CatalogManager.getInstance();
  List<CatalogEntry> entries=catalogManager.getChildrenOf(root1);
  for (  CatalogEntry entry : entries) {
    assertFalse(entry.getKey().equals(entry2.getKey()));
  }
  conn.shutdown();
}
Program: 69697
Project: 69697
Buggy source:
@Test public void testRemoveOwner() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry1.getKey().toString()).path("String_Node_Str").path(id1.getUser().getKey().toString()).build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry entry=catalogManager.loadCatalogEntry(entry1.getKey());
  List<Identity> identities=BaseSecurityManager.getInstance().getIdentitiesOfSecurityGroup(entry.getOwnerGroup());
  boolean found=false;
  for (  Identity identity : identities) {
    if (identity.getKey().equals(id1.getKey())) {
      found=true;
    }
  }
  assertFalse(found);
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testRemoveOwner() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry1.getKey().toString()).path("String_Node_Str").path(id1.getUser().getKey().toString()).build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry entry=catalogManager.loadCatalogEntry(entry1.getKey());
  List<Identity> identities=BaseSecurityManager.getInstance().getIdentitiesOfSecurityGroup(entry.getOwnerGroup());
  boolean found=false;
  for (  Identity identity : identities) {
    if (identity.getKey().equals(id1.getKey())) {
      found=true;
    }
  }
  assertFalse(found);
  conn.shutdown();
}
Program: 69698
Project: 69698
Buggy source:
@Test public void testMoveCatalogEntryForm() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entryToMove1.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON,true);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str",subEntry13move.getKey().toString()));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entryToMove1);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  assertNotNull(updatedEntry.getParent());
  assertTrue(updatedEntry.getParent().equalsByPersistableKey(subEntry13move));
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testMoveCatalogEntryForm() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entryToMove1.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str",subEntry13move.getKey().toString()));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entryToMove1);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  assertNotNull(updatedEntry.getParent());
  assertTrue(updatedEntry.getParent().equalsByPersistableKey(subEntry13move));
  conn.shutdown();
}
Program: 69699
Project: 69699
Buggy source:
@Test public void testUpdateCatalogEntryJson() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  CatalogEntryVO entry=new CatalogEntryVO();
  entry.setName("String_Node_Str");
  entry.setDescription("String_Node_Str");
  entry.setType(CatalogEntry.TYPE_NODE);
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry1.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON,true);
  method.addHeader("String_Node_Str",MediaType.APPLICATION_JSON);
  conn.addJsonEntity(method,entry);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry1);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testUpdateCatalogEntryJson() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  CatalogEntryVO entry=new CatalogEntryVO();
  entry.setName("String_Node_Str");
  entry.setDescription("String_Node_Str");
  entry.setType(CatalogEntry.TYPE_NODE);
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry1.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON);
  method.addHeader("String_Node_Str",MediaType.APPLICATION_JSON);
  conn.addJsonEntity(method,entry);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry1);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}
Program: 69700
Project: 69700
Buggy source:
@Test public void testUpdateAndMoveCatalogEntryJson() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  CatalogEntryVO entry=new CatalogEntryVO();
  entry.setName("String_Node_Str");
  entry.setDescription("String_Node_Str");
  entry.setType(CatalogEntry.TYPE_NODE);
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entryToMove2.getKey().toString()).queryParam("String_Node_Str",subEntry13move.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON,true);
  method.addHeader("String_Node_Str",MediaType.APPLICATION_JSON);
  conn.addJsonEntity(method,entry);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entryToMove2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  assertNotNull(updatedEntry.getParent());
  assertTrue(updatedEntry.getParent().equalsByPersistableKey(subEntry13move));
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testUpdateAndMoveCatalogEntryJson() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  CatalogEntryVO entry=new CatalogEntryVO();
  entry.setName("String_Node_Str");
  entry.setDescription("String_Node_Str");
  entry.setType(CatalogEntry.TYPE_NODE);
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entryToMove2.getKey().toString()).queryParam("String_Node_Str",subEntry13move.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON);
  method.addHeader("String_Node_Str",MediaType.APPLICATION_JSON);
  conn.addJsonEntity(method,entry);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entryToMove2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  assertNotNull(updatedEntry.getParent());
  assertTrue(updatedEntry.getParent().equalsByPersistableKey(subEntry13move));
  conn.shutdown();
}
Program: 69701
Project: 69701
Buggy source:
@Test public void testUpdateCatalogEntryQuery() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON,true);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str",String.valueOf(CatalogEntry.TYPE_NODE)));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testUpdateCatalogEntryQuery() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str",String.valueOf(CatalogEntry.TYPE_NODE)));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}
Program: 69702
Project: 69702
Buggy source:
@Test public void testUpdateCatalogEntryForm() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON,true);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str",String.valueOf(CatalogEntry.TYPE_NODE)));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}

Fixed version (ground truth):
@Test public void testUpdateCatalogEntryForm() throws IOException, URISyntaxException {
  RestConnection conn=new RestConnection();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getContextURI()).path("String_Node_Str").path(entry2.getKey().toString()).build();
  HttpPost method=conn.createPost(uri,MediaType.APPLICATION_JSON);
  conn.addEntity(method,new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str","String_Node_Str"),new BasicNameValuePair("String_Node_Str",String.valueOf(CatalogEntry.TYPE_NODE)));
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  CatalogEntryVO vo=conn.parse(response,CatalogEntryVO.class);
  assertNotNull(vo);
  CatalogManager catalogManager=CatalogManager.getInstance();
  CatalogEntry updatedEntry=catalogManager.loadCatalogEntry(entry2);
  assertEquals("String_Node_Str",updatedEntry.getName());
  assertEquals("String_Node_Str",updatedEntry.getDescription());
  conn.shutdown();
}
Program: 69704
Project: 69704
Buggy source:
@Test public void testUpdateCourseGroup() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  GroupVO vo=new GroupVO();
  vo.setKey(g1.getKey());
  vo.setName("String_Node_Str");
  vo.setDescription("String_Node_Str");
  vo.setMinParticipants(g1.getMinParticipants());
  vo.setMaxParticipants(g1.getMaxParticipants());
  vo.setType(g1.getType());
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g1.getKey()).build();
  HttpPost method=conn.createPost(request,MediaType.APPLICATION_JSON,true);
  conn.addJsonEntity(method,vo);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertTrue(response.getStatusLine().getStatusCode() == 200 || response.getStatusLine().getStatusCode() == 201);
  BusinessGroup bg=businessGroupService.loadBusinessGroup(g1.getKey());
  assertNotNull(bg);
  assertEquals(bg.getKey(),vo.getKey());
  assertEquals("String_Node_Str",bg.getName());
  assertEquals("String_Node_Str",bg.getDescription());
}

Fixed version (ground truth):
@Test public void testUpdateCourseGroup() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  GroupVO vo=new GroupVO();
  vo.setKey(g1.getKey());
  vo.setName("String_Node_Str");
  vo.setDescription("String_Node_Str");
  vo.setMinParticipants(g1.getMinParticipants());
  vo.setMaxParticipants(g1.getMaxParticipants());
  vo.setType(g1.getType());
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g1.getKey()).build();
  HttpPost method=conn.createPost(request,MediaType.APPLICATION_JSON);
  conn.addJsonEntity(method,vo);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertTrue(response.getStatusLine().getStatusCode() == 200 || response.getStatusLine().getStatusCode() == 201);
  BusinessGroup bg=businessGroupService.loadBusinessGroup(g1.getKey());
  assertNotNull(bg);
  assertEquals(bg.getKey(),vo.getKey());
  assertEquals("String_Node_Str",bg.getName());
  assertEquals("String_Node_Str",bg.getDescription());
}
Program: 69705
Project: 69705
Buggy source:
@Test public void testDeleteCourseGroup() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g1.getKey()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(200,response.getStatusLine().getStatusCode());
  BusinessGroup bg=businessGroupService.loadBusinessGroup(g1.getKey());
  assertNull(bg);
}

Fixed version (ground truth):
@Test public void testDeleteCourseGroup() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g1.getKey()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(200,response.getStatusLine().getStatusCode());
  BusinessGroup bg=businessGroupService.loadBusinessGroup(g1.getKey());
  assertNull(bg);
}
Program: 69706
Project: 69706
Buggy source:
@Test public void testBasicSecurityDeleteCall() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g2.getKey()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(401,response.getStatusLine().getStatusCode());
}

Fixed version (ground truth):
@Test public void testBasicSecurityDeleteCall() throws IOException, URISyntaxException {
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + courseRepoEntry.getOlatResource().getResourceableId() + "String_Node_Str"+ g2.getKey()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(401,response.getStatusLine().getStatusCode());
}
Program: 69707
Project: 69707
Buggy source:
@Test public void testDeleteCourses() throws IOException, URISyntaxException {
  ICourse course=CoursesWebService.createEmptyCourse(admin,"String_Node_Str","String_Node_Str",null);
  DBFactory.getInstance().intermediateCommit();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + course.getResourceableId()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  List<String> courseType=new ArrayList<String>();
  courseType.add(CourseModule.getCourseTypeName());
  Roles roles=new Roles(true,true,true,true,false,true,false);
  List<RepositoryEntry> repoEntries=RepositoryManager.getInstance().genericANDQueryWithRolesRestriction("String_Node_Str","String_Node_Str","String_Node_Str",courseType,null,roles,"String_Node_Str");
  assertNotNull(repoEntries);
  for (  RepositoryEntry entry : repoEntries) {
    assertNotSame(entry.getOlatResource().getResourceableId(),course.getResourceableId());
  }
}

Fixed version (ground truth):
@Test public void testDeleteCourses() throws IOException, URISyntaxException {
  ICourse course=CoursesWebService.createEmptyCourse(admin,"String_Node_Str","String_Node_Str",null);
  DBFactory.getInstance().intermediateCommit();
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI request=UriBuilder.fromUri(getContextURI()).path("String_Node_Str" + course.getResourceableId()).build();
  HttpDelete method=conn.createDelete(request,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  List<String> courseType=new ArrayList<String>();
  courseType.add(CourseModule.getCourseTypeName());
  Roles roles=new Roles(true,true,true,true,false,true,false);
  List<RepositoryEntry> repoEntries=RepositoryManager.getInstance().genericANDQueryWithRolesRestriction("String_Node_Str","String_Node_Str","String_Node_Str",courseType,null,roles,"String_Node_Str");
  assertNotNull(repoEntries);
  for (  RepositoryEntry entry : repoEntries) {
    assertNotSame(entry.getOlatResource().getResourceableId(),course.getResourceableId());
  }
}
Program: 69712
Project: 69712
Buggy source:
@Test public void deleteFolder() throws IOException, URISyntaxException {
  OlatNamedContainerImpl folder=BCCourseNode.getNodeFolderContainer((BCCourseNode)bcNode,course1.getCourseEnvironment());
  VFSItem item=folder.resolve("String_Node_Str");
  if (item == null) {
    folder.createChildContainer("String_Node_Str");
  }
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getNodeURI()).path("String_Node_Str").path("String_Node_Str").build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON,true);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  VFSItem deletedItem=folder.resolve("String_Node_Str");
  assertNull(deletedItem);
}

Fixed version (ground truth):
@Test public void deleteFolder() throws IOException, URISyntaxException {
  OlatNamedContainerImpl folder=BCCourseNode.getNodeFolderContainer((BCCourseNode)bcNode,course1.getCourseEnvironment());
  VFSItem item=folder.resolve("String_Node_Str");
  if (item == null) {
    folder.createChildContainer("String_Node_Str");
  }
  assertTrue(conn.login("String_Node_Str","String_Node_Str"));
  URI uri=UriBuilder.fromUri(getNodeURI()).path("String_Node_Str").path("String_Node_Str").build();
  HttpDelete method=conn.createDelete(uri,MediaType.APPLICATION_JSON);
  HttpResponse response=conn.execute(method);
  assertEquals(200,response.getStatusLine().getStatusCode());
  VFSItem deletedItem=folder.resolve("String_Node_Str");
  assertNull(deletedItem);
}
Program: 69718
Project: 69718
Buggy source:
public TextFlexiCellRenderer(boolean escapeHtml){
  this.escapeHtml=escapeHtml;
}

Fixed version (ground truth):
public TextFlexiCellRenderer(EscapeMode escapeHtml){
  this.escapeHtml=escapeHtml;
}
Program: 69719
Project: 69719
Buggy source:
/** 
 * Render Date type with Formatter depending on locale. Render all other types with toString. 
 * @param target
 * @param cellValue
 * @param translator
 */
@Override public void render(StringOutput target,Object cellValue,int row,FlexiTableComponent source,URLBuilder ubu,Translator translator){
  if (cellValue instanceof Date) {
    Formatter formatter=Formatter.getInstance(translator.getLocale());
    target.append(formatter.formatDateAndTime((Date)cellValue));
  }
 else   if (cellValue instanceof String) {
    String str=(String)cellValue;
    if (escapeHtml) {
      StringHelper.escapeHtml(target,str);
    }
 else {
      target.append(str);
    }
  }
 else   if (cellValue != null) {
    target.append(cellValue.toString());
  }
}

Fixed version (ground truth):
/** 
 * Render Date type with Formatter depending on locale. Render all other types with toString. 
 * @param target
 * @param cellValue
 * @param translator
 */
@Override public void render(StringOutput target,Object cellValue,int row,FlexiTableComponent source,URLBuilder ubu,Translator translator){
  if (cellValue instanceof Date) {
    Formatter formatter=Formatter.getInstance(translator.getLocale());
    target.append(formatter.formatDateAndTime((Date)cellValue));
  }
 else   if (cellValue instanceof String) {
    String str=(String)cellValue;
    if (escapeHtml != null) {
switch (escapeHtml) {
case antisamy:
        target.append(new OWASPAntiSamyXSSFilter().filter(str));
      break;
case html:
    StringHelper.escapeHtml(target,str);
  break;
case none:
target.append(str);
break;
}
}
 else {
StringHelper.escapeHtml(target,str);
}
}
 else if (cellValue != null) {
target.append(cellValue.toString());
}
}
Program: 69720
Project: 69720
Buggy source:
private void renderString(StringOutput sb,String val){
switch (escapeHtml) {
case none:
    sb.append((String)val);
  break;
case html:
StringHelper.escapeHtml(sb,(String)val);
break;
case antisamy:
System.out.println(val);
sb.append(new OWASPAntiSamyXSSFilter().filter(val));
break;
default :
StringHelper.escapeHtml(sb,(String)val);
}
}

Fixed version (ground truth):
private void renderString(StringOutput sb,String val){
switch (escapeHtml) {
case none:
    sb.append((String)val);
  break;
case html:
StringHelper.escapeHtml(sb,(String)val);
break;
case antisamy:
sb.append(new OWASPAntiSamyXSSFilter().filter(val));
break;
default :
StringHelper.escapeHtml(sb,(String)val);
}
}
Program: 69723
Project: 69723
Buggy source:
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),TABLE_ACTION_LAUNCH,getLocale()));
  CustomCellRenderer acRenderer=new BGAccessControlledCellRenderer();
  groupListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor(Cols.accessTypes.i18n(),Cols.accessTypes.ordinal(),null,getLocale(),ColumnDescriptor.ALIGNMENT_LEFT,acRenderer));
  groupListCtr.addColumnDescriptor(new RoleColumnDescriptor(getLocale()));
  groupListCtr.addColumnDescriptor(new AccessActionColumnDescriptor(Cols.accessControlLaunch.i18n(),Cols.accessControlLaunch.ordinal(),getTranslator()));
  return 8;
}

Fixed version (ground truth):
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  DefaultColumnDescriptor freePlacesCol=new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),TABLE_ACTION_LAUNCH,getLocale());
  freePlacesCol.setEscapeHtml(EscapeMode.none);
  groupListCtr.addColumnDescriptor(freePlacesCol);
  CustomCellRenderer acRenderer=new BGAccessControlledCellRenderer();
  groupListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor(Cols.accessTypes.i18n(),Cols.accessTypes.ordinal(),null,getLocale(),ColumnDescriptor.ALIGNMENT_LEFT,acRenderer));
  groupListCtr.addColumnDescriptor(new RoleColumnDescriptor(getLocale()));
  groupListCtr.addColumnDescriptor(new AccessActionColumnDescriptor(Cols.accessControlLaunch.i18n(),Cols.accessControlLaunch.ordinal(),getTranslator()));
  return 8;
}
Program: 69724
Project: 69724
Buggy source:
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new MarkColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 10;
}

Fixed version (ground truth):
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new MarkColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  DefaultColumnDescriptor freeplacesCol=new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale());
  freeplacesCol.setEscapeHtml(EscapeMode.none);
  groupListCtr.addColumnDescriptor(freeplacesCol);
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 10;
}
Program: 69725
Project: 69725
Buggy source:
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 9;
}

Fixed version (ground truth):
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  DefaultColumnDescriptor freeplacesCol=new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale());
  freeplacesCol.setEscapeHtml(EscapeMode.none);
  groupListCtr.addColumnDescriptor(freeplacesCol);
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 9;
}
Program: 69726
Project: 69726
Buggy source:
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new MarkColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 10;
}

Fixed version (ground truth):
@Override protected int initColumns(){
  groupListCtr.addColumnDescriptor(new MarkColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new BusinessGroupNameColumnDescriptor(TABLE_ACTION_LAUNCH,getLocale()));
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.key.i18n(),Cols.key.ordinal(),null,getLocale()));
  if (groupModule.isManagedBusinessGroups()) {
    groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.externalId.i18n(),Cols.externalId.ordinal(),null,getLocale()));
  }
  groupListCtr.addColumnDescriptor(false,new DefaultColumnDescriptor(Cols.description.i18n(),Cols.description.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new ResourcesColumnDescriptor(this,mainVC,getTranslator()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.tutorsCount.i18n(),Cols.tutorsCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.participantsCount.i18n(),Cols.participantsCount.ordinal(),null,getLocale()));
  DefaultColumnDescriptor freeplacesCol=new DefaultColumnDescriptor(Cols.freePlaces.i18n(),Cols.freePlaces.ordinal(),null,getLocale());
  freeplacesCol.setEscapeHtml(EscapeMode.none);
  groupListCtr.addColumnDescriptor(freeplacesCol);
  groupListCtr.addColumnDescriptor(new DefaultColumnDescriptor(Cols.waitingListCount.i18n(),Cols.waitingListCount.ordinal(),null,getLocale()));
  groupListCtr.addColumnDescriptor(new StaticColumnDescriptor(TABLE_ACTION_SELECT,"String_Node_Str",translate("String_Node_Str")));
  return 10;
}
Program: 69728
Project: 69728
Buggy source:
private void update(){
  enableMenu.setVisible(displayMenu.isSelected(0));
  menuRenderOptions.setVisible(displayMenu.isSelected(0));
  if (!limitAttempts.isSelected(0)) {
    attempts.setIntValue(0);
  }
  attempts.setVisible(limitAttempts.isVisible() && limitAttempts.isSelected(0));
  attempts.setMandatory(attempts.isVisible());
  attempts.clearError();
  summary.setVisible(showResultsAfterFinishTest.isSelected(0) || showResultsOnHomePage.isSelected(0));
  showResultsDateDependentButton.setVisible(showResultsOnHomePage.isSelected(0));
  if (!startDateElement.isVisible()) {
    startDateElement.setValue("String_Node_Str");
  }
  startDateElement.clearError();
  startDateElement.setVisible(showResultsDateDependentButton.isVisible() && showResultsDateDependentButton.isSelected(0));
  endDateElement.clearError();
  if (!endDateElement.isVisible())   endDateElement.setValue("String_Node_Str");
  endDateElement.setVisible(startDateElement.isVisible());
}

Fixed version (ground truth):
private void update(){
  enableMenu.setVisible(displayMenu.isSelected(0));
  menuRenderOptions.setVisible(displayMenu.isSelected(0));
  if (!limitAttempts.isSelected(0)) {
    attempts.setIntValue(0);
  }
  attempts.setVisible(limitAttempts.isVisible() && limitAttempts.isSelected(0));
  attempts.setMandatory(attempts.isVisible());
  attempts.clearError();
  summary.setVisible(showResultsAfterFinishTest.isSelected(0) || showResultsOnHomePage.isSelected(0));
  showResultsDateDependentButton.setVisible(showResultsOnHomePage.isSelected(0));
  if (!startDateElement.isVisible()) {
    startDateElement.setValue("String_Node_Str");
  }
  startDateElement.clearError();
  startDateElement.setVisible(showResultsDateDependentButton.isVisible() && showResultsDateDependentButton.isSelected(0));
  endDateElement.clearError();
  if (!endDateElement.isVisible())   endDateElement.setValue("String_Node_Str");
  endDateElement.setVisible(startDateElement.isVisible());
  flc.setDirty(true);
}
Program: 69730
Project: 69730
Buggy source:
/** 
 * @see org.olat.core.gui.control.generic.dtabs.DTabs#createDTab(org.olat.core.id.OLATResourceable
	 *      java.lang.String)
 */
public DTab createDTab(OLATResourceable ores,OLATResourceable repoOres,String title){
  if (dtabs.size() >= getMaxTabs()) {
    getWindowControl().setError(translate("String_Node_Str"));
    return null;
  }
  DTabImpl dt=new DTabImpl(ores,repoOres,StringHelper.escapeHtml(title),getWindowControl());
  return dt;
}

Fixed version (ground truth):
/** 
 * @see org.olat.core.gui.control.generic.dtabs.DTabs#createDTab(org.olat.core.id.OLATResourceable
	 *      java.lang.String)
 */
public DTab createDTab(OLATResourceable ores,OLATResourceable repoOres,String title){
  if (dtabs.size() >= getMaxTabs()) {
    getWindowControl().setError(translate("String_Node_Str"));
    return null;
  }
  DTabImpl dt=new DTabImpl(ores,repoOres,title,getWindowControl());
  return dt;
}