nus-yam/ex-repair huggingface dataset:
Program: 69911
Project: 69911
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.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,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());
}
Program: 69912
Project: 69912
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.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,true);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(200,response.getStatusLine().getStatusCode());
  BusinessGroup bg=businessGroupService.loadBusinessGroup(g1.getKey());
  assertNull(bg);
}
Program: 69913
Project: 69913
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.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,true);
  HttpResponse response=conn.execute(method);
  EntityUtils.consume(response.getEntity());
  assertEquals(401,response.getStatusLine().getStatusCode());
}
Program: 69914
Project: 69914
Buggy source:
/** 
 * Lists all learn groups of the specified course.
 * @response.representation.200.qname {http://www.example.com}groupVO
 * @response.representation.200.mediaType application/xml, application/json
 * @response.representation.200.doc The list of all learning group of the course200.example  {@link org.olat.restapi.support.vo.Examples#SAMPLE_GROUPVOes}
 * @response.representation.404.doc The context of the group not found
 * @param request The HTTP request
 * @return
 */
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getGroupList(@Context HttpServletRequest request){
  CourseGroupManager groupManager=PersistingCourseGroupManager.getInstance(course);
  List<BusinessGroup> groups=groupManager.getAllBusinessGroups();
  int count=0;
  GroupVO[] vos=new GroupVO[groups.size()];
  for (  BusinessGroup group : groups) {
    vos[count++]=ObjectFactory.get(group);
  }
  return Response.ok(vos).build();
}

Fixed version (ground truth):
/** 
 * Lists all learn groups of the specified course.
 * @response.representation.200.qname {http://www.example.com}groupVO
 * @response.representation.200.mediaType application/xml, application/json
 * @response.representation.200.doc The list of all learning group of the course200.example  {@link org.olat.restapi.support.vo.Examples#SAMPLE_GROUPVOes}
 * @response.representation.404.doc The context of the group not found
 * @param request The HTTP request
 * @return
 */
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getGroupList(@Context HttpServletRequest request){
  BusinessGroupService bgs=CoreSpringFactory.getImpl(BusinessGroupService.class);
  SearchBusinessGroupParams params=new SearchBusinessGroupParams();
  List<BusinessGroup> groups=bgs.findBusinessGroups(params,course,0,-1);
  int count=0;
  GroupVO[] vos=new GroupVO[groups.size()];
  for (  BusinessGroup group : groups) {
    vos[count++]=ObjectFactory.get(group);
  }
  return Response.ok(vos).build();
}
Program: 69915
Project: 69915
Buggy source:
@Path("String_Node_Str") public CourseGroupWebService getCourseGroupWebService(@PathParam("String_Node_Str") Long courseId){
  OLATResource ores=getCourseOLATResource(courseId);
  return new CourseGroupWebService(ores);
}

Fixed version (ground truth):
@Path("String_Node_Str") public CourseGroupWebService getCourseGroupWebService(@PathParam("String_Node_Str") Long courseId){
  OLATResource ores=getCourseOLATResource(courseId);
  if (ores != null) {
    return new CourseGroupWebService(ores);
  }
  return null;
}
Program: 69916
Project: 69916
Buggy source:
public void setDatedObjects(List<? extends Dated> datedObjects){
  model.setDatedObjects(datedObjects);
  createLinks();
}

Fixed version (ground truth):
/** 
 * Method to re-initialize the year navigation with other dated objects. The model, links etc are all discarded.
 * @param datedObjects the new objects for the navigation
 */
public void setDatedObjects(List<? extends Dated> datedObjects){
  mainVC=createVelocityContainer("String_Node_Str");
  next=LinkFactory.createCustomLink("String_Node_Str","String_Node_Str",null,Link.NONTRANSLATED,mainVC,this);
  next.setCustomEnabledLinkCSS("String_Node_Str");
  next.setCustomDisabledLinkCSS("String_Node_Str");
  next.setTooltip(translate("String_Node_Str"),false);
  previous=LinkFactory.createCustomLink("String_Node_Str","String_Node_Str",null,Link.NONTRANSLATED,mainVC,this);
  previous.setCustomEnabledLinkCSS("String_Node_Str");
  previous.setCustomDisabledLinkCSS("String_Node_Str");
  previous.setTooltip(translate("String_Node_Str"),false);
  if (mainPanel == null) {
    mainPanel=this.putInitialPanel(mainVC);
  }
 else {
    mainPanel.setContent(mainVC);
  }
  model=new YearNavigationModel(datedObjects,getLocale());
  allObjects=datedObjects;
  showAll=true;
  createLinks();
}
Program: 69917
Project: 69917
Buggy source:
/** 
 * Constructor based on a list of <code>Dated</code> objects.
 * @param ureq
 * @param control
 * @param fallBackTranslator
 * @param datedObjects
 */
public YearNavigationController(UserRequest ureq,WindowControl control,Translator fallBackTranslator,List<? extends Dated> datedObjects){
  super(ureq,control,fallBackTranslator);
  model=new YearNavigationModel(datedObjects,ureq.getLocale());
  allObjects=datedObjects;
  showAll=true;
  mainVC=createVelocityContainer("String_Node_Str");
  next=LinkFactory.createCustomLink("String_Node_Str","String_Node_Str",null,Link.NONTRANSLATED,mainVC,this);
  next.setCustomEnabledLinkCSS("String_Node_Str");
  next.setCustomDisabledLinkCSS("String_Node_Str");
  next.setTooltip(translate("String_Node_Str"),false);
  previous=LinkFactory.createCustomLink("String_Node_Str","String_Node_Str",null,Link.NONTRANSLATED,mainVC,this);
  previous.setCustomEnabledLinkCSS("String_Node_Str");
  previous.setCustomDisabledLinkCSS("String_Node_Str");
  previous.setTooltip(translate("String_Node_Str"),false);
  createLinks();
  this.putInitialPanel(mainVC);
}

Fixed version (ground truth):
/** 
 * Constructor based on a list of <code>Dated</code> objects.
 * @param ureq
 * @param control
 * @param fallBackTranslator
 * @param datedObjects
 */
public YearNavigationController(UserRequest ureq,WindowControl control,Translator fallBackTranslator,List<? extends Dated> datedObjects){
  super(ureq,control,fallBackTranslator);
  setDatedObjects(datedObjects);
}
Program: 69922
Project: 69922
Buggy source:
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str");
  selectors.add(selectorBuffer.toString());
  while (categoryMatcher.find()) {
    StringBuffer selector=new StringBuffer();
    selector.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str").append(categoryMatcher.group(1)).append("String_Node_Str");
    selectors.add(selector.toString());
  }
  return ((String[])selectors.toArray());
}

Fixed version (ground truth):
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str");
  selectors.add(selectorBuffer.toString());
  while (categoryMatcher.find()) {
    StringBuffer selector=new StringBuffer();
    selector.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str").append(categoryMatcher.group(1)).append("String_Node_Str");
    selectors.add(selector.toString());
  }
  return (selectors.toArray(new String[selectors.size()]));
}
Program: 69925
Project: 69925
Buggy source:
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  while (categoryMatcher.find()) {
    StringBuffer selector=new StringBuffer();
    selector.append("String_Node_Str").append(getCatalogSubcategoryListCss()).append("String_Node_Str").append(getCatalogSubcategoryIconCss()).append("String_Node_Str").append(categoryMatcher.group(1)).append("String_Node_Str");
    selectors.add(selector.toString());
  }
  return ((String[])selectors.toArray());
}

Fixed version (ground truth):
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  while (categoryMatcher.find()) {
    selectors.add(createCatalogSelector(categoryMatcher.group(1)));
  }
  return (selectors.toArray(new String[selectors.size()]));
}
Program: 69928
Project: 69928
Buggy source:
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str");
  selectors.add(selectorBuffer.toString());
  while (categoryMatcher.find()) {
    StringBuffer selector=new StringBuffer();
    selector.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str").append(categoryMatcher.group(1)).append("String_Node_Str");
    selectors.add(selector.toString());
  }
  return (selectors.toArray(new String[selectors.size()]));
}

Fixed version (ground truth):
/** 
 * @param path
 * @return Creates xpath selectors to select catalog within the tree.
 */
public String[] createCatalogSelectors(String path){
  if (path == null || !path.startsWith("String_Node_Str")) {
    return (null);
  }
  Matcher categoryMatcher=categoryPattern.matcher(path);
  ArrayList<String> selectors=new ArrayList<String>();
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(functionalUtil.getTreeNodeAnchorCss()).append("String_Node_Str");
  selectors.add(selectorBuffer.toString());
  while (categoryMatcher.find()) {
    StringBuffer selector=new StringBuffer();
    selector.append("String_Node_Str").append(functionalUtil.getTreeNodeCss()).append("String_Node_Str").append(categoryMatcher.group(1)).append("String_Node_Str");
    selectors.add(selector.toString());
  }
  return (selectors.toArray(new String[selectors.size()]));
}
Program: 69930
Project: 69930
Buggy source:
@Test @RunAsClient public void checkCollectForumPost() throws IOException, URISyntaxException {
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,ForumArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  CourseVO course=functionalVOUtil.importCourseIncludingForum(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.postForumMessage(browser,course.getRepoEntryKey(),0,FORUM_POST_TITLE,FORUM_POST_MESSAGE));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectForumPost() throws IOException, URISyntaxException {
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,ForumArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  ((Binder.Page.ForumArtefact)artefact).postTitle=FORUM_POST_TITLE;
  ((Binder.Page.ForumArtefact)artefact).postContent=FORUM_POST_MESSAGE;
  CourseVO course=functionalVOUtil.importCourseIncludingForum(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.postForumMessage(browser,course.getRepoEntryKey(),0,FORUM_POST_TITLE,FORUM_POST_MESSAGE));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}
Program: 69931
Project: 69931
Buggy source:
@Test @RunAsClient public void checkCreateLearningJournal(){
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,JournalArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createLearningJournal(browser,LEARNING_JOURNAL_BINDER,LEARNING_JOURNAL_PAGE,LEARNING_JOURNAL_STRUCTURE,LEARNING_JOURNAL_TITLE,LEARNING_JOURNAL_DESCRIPTION,LEARNING_JOURNAL_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCreateLearningJournal(){
  Object[] retval=prepareVerification(LEARNING_JOURNAL_BINDER,null,LEARNING_JOURNAL_PAGE,null,LEARNING_JOURNAL_STRUCTURE,null,JournalArtefact.class,LEARNING_JOURNAL_TITLE,LEARNING_JOURNAL_DESCRIPTION,LEARNING_JOURNAL_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createLearningJournal(browser,LEARNING_JOURNAL_BINDER,LEARNING_JOURNAL_PAGE,LEARNING_JOURNAL_STRUCTURE,LEARNING_JOURNAL_TITLE,LEARNING_JOURNAL_DESCRIPTION,LEARNING_JOURNAL_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
}
Program: 69932
Project: 69932
Buggy source:
@Test @RunAsClient public void checkAddTextArtefact(){
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,TextArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.addTextArtefact(browser,TEXT_ARTEFACT_BINDER,TEXT_ARTEFACT_PAGE,TEXT_ARTEFACT_STRUCTURE,TEXT_ARTEFACT_CONTENT,TEXT_ARTEFACT_TITLE,TEXT_ARTEFACT_DESCRIPTION,TEXT_ARTEFACT_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkAddTextArtefact(){
  Object[] retval=prepareVerification(TEXT_ARTEFACT_BINDER,null,TEXT_ARTEFACT_PAGE,null,TEXT_ARTEFACT_STRUCTURE,null,TextArtefact.class,TEXT_ARTEFACT_TITLE,TEXT_ARTEFACT_DESCRIPTION,TEXT_ARTEFACT_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.addTextArtefact(browser,TEXT_ARTEFACT_BINDER,TEXT_ARTEFACT_PAGE,TEXT_ARTEFACT_STRUCTURE,TEXT_ARTEFACT_CONTENT,TEXT_ARTEFACT_TITLE,TEXT_ARTEFACT_DESCRIPTION,TEXT_ARTEFACT_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}
Program: 69933
Project: 69933
Buggy source:
@Test @RunAsClient public void checkCollectWikiArticle() throws URISyntaxException, IOException {
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,WikiArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  RepositoryEntryVO vo=functionalVOUtil.importWiki(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.createWikiArticle(browser,vo.getKey(),WIKI_ARTICLE_PAGENAME,WIKI_ARTICLE_CONTENT));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE,WIKI_ARTEFACT_TITLE,WIKI_ARTEFACT_DESCRIPTION,WIKI_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectWikiArticle() throws URISyntaxException, IOException {
  Object[] retval=prepareVerification(WIKI_BINDER,null,WIKI_PAGE,null,WIKI_STRUCTURE,null,WikiArtefact.class,WIKI_ARTEFACT_TITLE,WIKI_ARTEFACT_DESCRIPTION,WIKI_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  ((Binder.Page.WikiArtefact)artefact).article=WIKI_ARTICLE_CONTENT;
  RepositoryEntryVO vo=functionalVOUtil.importWiki(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.createWikiArticle(browser,vo.getKey(),WIKI_ARTICLE_PAGENAME,WIKI_ARTICLE_CONTENT));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE,WIKI_ARTEFACT_TITLE,WIKI_ARTEFACT_DESCRIPTION,WIKI_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}
Program: 69934
Project: 69934
Buggy source:
@Test @RunAsClient public void checkCollectBlogPost() throws URISyntaxException, IOException {
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,BlogArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  CourseVO course=functionalVOUtil.importCourseIncludingBlog(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.createBlogEntry(browser,course.getRepoEntryKey(),0,BLOG_POST_TITLE,BLOG_POST_DESCRIPTION,BLOG_POST_CONTENT));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE,BLOG_ARTEFACT_TITLE,BLOG_ARTEFACT_DESCRIPTION,BLOG_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectBlogPost() throws URISyntaxException, IOException {
  Object[] retval=prepareVerification(BLOG_BINDER,null,BLOG_PAGE,null,BLOG_STRUCTURE,null,BlogArtefact.class,BLOG_ARTEFACT_TITLE,BLOG_ARTEFACT_DESCRIPTION,BLOG_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  ((Binder.Page.BlogArtefact)artefact).postTitle=BLOG_POST_TITLE;
  ((Binder.Page.BlogArtefact)artefact).postContent=BLOG_POST_CONTENT;
  CourseVO course=functionalVOUtil.importCourseIncludingBlog(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.createElements(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE));
  Assert.assertTrue(functionalCourseUtil.createBlogEntry(browser,course.getRepoEntryKey(),0,BLOG_POST_TITLE,BLOG_POST_DESCRIPTION,BLOG_POST_CONTENT));
  artefact.businessPath=functionalUtil.currentBusinessPath(browser);
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE,BLOG_ARTEFACT_TITLE,BLOG_ARTEFACT_DESCRIPTION,BLOG_TAGS,functionalEportfolioUtil));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}
Program: 69935
Project: 69935
Buggy source:
@Test @RunAsClient public void checkUploadFileArtefact() throws URISyntaxException, MalformedURLException {
  Object[] retval=prepareVerification(FORUM_BINDER,null,FORUM_PAGE,null,FORUM_STRUCTURE,null,FileArtefact.class,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.uploadFileArtefact(browser,FILE_ARTEFACT_BINDER,FILE_ARTEFACT_PAGE,FILE_ARTEFACT_STRUCTURE,FunctionalArtefactTest.class.getResource(FILE_ARTEFACT_PATH).toURI(),FILE_ARTEFACT_TITLE,FILE_ARTEFACT_DESCRIPTION,FILE_ARTEFACT_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkUploadFileArtefact() throws URISyntaxException, MalformedURLException {
  Object[] retval=prepareVerification(FILE_ARTEFACT_BINDER,null,FILE_ARTEFACT_PAGE,null,FILE_ARTEFACT_STRUCTURE,null,FileArtefact.class,FILE_ARTEFACT_TITLE,FILE_ARTEFACT_DESCRIPTION,FILE_ARTEFACT_TAGS,null);
  Binder binder=(Binder)retval[0];
  Binder.Page page=(Binder.Page)retval[1];
  Binder.Page.Structure structure=(Binder.Page.Structure)retval[2];
  Binder.Page.Artefact artefact=(Binder.Page.Artefact)retval[3];
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalEportfolioUtil.uploadFileArtefact(browser,FILE_ARTEFACT_BINDER,FILE_ARTEFACT_PAGE,FILE_ARTEFACT_STRUCTURE,FunctionalArtefactTest.class.getResource(FILE_ARTEFACT_PATH).toURI(),FILE_ARTEFACT_TITLE,FILE_ARTEFACT_DESCRIPTION,FILE_ARTEFACT_TAGS));
  binder.ignore=false;
  page.ignore=false;
  structure.ignore=false;
  artefact.ignore=false;
  Assert.assertTrue(checkArtefact(artefact));
  Assert.assertTrue(checkMap(binder));
}
Program: 69937
Project: 69937
Buggy source:
@Test @RunAsClient public void checkCreateUsingWizard(){
  Assert.assertTrue(functionalUtil.login(browser,functionalUtil.getUsername(),functionalUtil.getPassword(),true));
  Assert.assertTrue(functionalUtil.openSite(browser,OlatSite.LEARNING_RESOURCES));
  CourseWizardElement[] elementArray=new CourseWizardElement[]{CourseWizardElement.INFO_PAGE,CourseWizardElement.FORUM,CourseWizardElement.ENROLLMENT,CourseWizardElement.DOWNLOAD_FOLDER,CourseWizardElement.EMAIL};
  Assert.assertTrue(functionalRepositorySiteUtil.createCourseUsingWizard(browser,WIZARD_COURSE_TITLE,WIZARD_COURSE_DESCRIPTION,elementArray,null,true,CourseWizardAccess.USERS));
  for (int i=0; i < elementArray.length; i++) {
    functionalCourseUtil.open(browser,i);
  }
}

Fixed version (ground truth):
@Ignore @Test @RunAsClient public void checkCreateUsingWizard(){
  Assert.assertTrue(functionalUtil.login(browser,functionalUtil.getUsername(),functionalUtil.getPassword(),true));
  Assert.assertTrue(functionalUtil.openSite(browser,OlatSite.LEARNING_RESOURCES));
  CourseWizardElement[] elementArray=new CourseWizardElement[]{CourseWizardElement.INFO_PAGE,CourseWizardElement.FORUM,CourseWizardElement.ENROLLMENT,CourseWizardElement.DOWNLOAD_FOLDER,CourseWizardElement.EMAIL};
  Assert.assertTrue(functionalRepositorySiteUtil.createCourseUsingWizard(browser,WIZARD_COURSE_TITLE,WIZARD_COURSE_DESCRIPTION,elementArray,null,true,CourseWizardAccess.USERS));
  for (int i=0; i < elementArray.length; i++) {
    functionalCourseUtil.open(browser,i);
  }
}
Program: 69938
Project: 69938
Buggy source:
@Before public void setup() throws IOException, URISyntaxException {
  if (!initialized) {
    functionalUtil=new FunctionalUtil();
    functionalUtil.setDeploymentUrl(deploymentUrl.toString());
    functionalRepositorySiteUtil=new FunctionalRepositorySiteUtil(functionalUtil);
    functionalCourseUtil=new FunctionalCourseUtil(functionalUtil,functionalRepositorySiteUtil);
    initialized=true;
  }
}

Fixed version (ground truth):
@Before public void setup() throws IOException, URISyntaxException {
  if (!initialized) {
    functionalUtil=new FunctionalUtil();
    functionalUtil.setDeploymentUrl(deploymentUrl.toString());
    functionalHtmlUtil=new FunctionalHtmlUtil();
    functionalRepositorySiteUtil=new FunctionalRepositorySiteUtil(functionalUtil);
    functionalCourseUtil=new FunctionalCourseUtil(functionalUtil,functionalRepositorySiteUtil);
    initialized=true;
  }
}
Program: 69939
Project: 69939
Buggy source:
public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj instanceof Item) {
    Item item=(Item)obj;
    return guid != null && guid.equals(item.guid);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Overwrite equals method so that different object in the vm that actually represent the same item are recognized as such. Eg in the remove method of the feed
 */
public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj instanceof Item) {
    Item item=(Item)obj;
    return guid != null && guid.equals(item.guid);
  }
  return false;
}
Program: 69941
Project: 69941
Buggy source:
public boolean checkConnection(String url,String login,String password,int customerId) throws VmsNotAvailableException {
  try {
    LicenceServiceStub licenceWs=new LicenceServiceStub(url + "String_Node_Str");
    SecurityHeader.addAdminSecurityHeader(login,password,licenceWs);
    LicenceServiceStub.GetModulesForCustomerRequest licenceRequest=new LicenceServiceStub.GetModulesForCustomerRequest();
    licenceRequest.setCustomerid(viteroModule.getCustomerId());
    LicenceServiceStub.GetModulesForCustomerResponse response=licenceWs.getModulesForCustomer(licenceRequest);
    LicenceServiceStub.Modulestype modules=response.getGetModulesForCustomerResponse();
    LicenceServiceStub.Modules_type0 modulesType=modules.getModules();
    return modulesType != null;
  }
 catch (  AxisFault f) {
    ErrorCode code=handleAxisFault(f);
switch (code) {
case unsufficientRights:
      logError("String_Node_Str",f);
    break;
}
return false;
}
catch (Exception e) {
logWarn("String_Node_Str",e);
return false;
}
}

Fixed version (ground truth):
public boolean checkConnection(String url,String login,String password,int customerId) throws VmsNotAvailableException {
  try {
    LicenceServiceStub licenceWs=new LicenceServiceStub(url + "String_Node_Str");
    SecurityHeader.addAdminSecurityHeader(login,password,licenceWs);
    LicenceServiceStub.GetModulesForCustomerRequest licenceRequest=new LicenceServiceStub.GetModulesForCustomerRequest();
    licenceRequest.setCustomerid(viteroModule.getCustomerId());
    LicenceServiceStub.GetModulesForCustomerResponse response=licenceWs.getModulesForCustomer(licenceRequest);
    LicenceServiceStub.Modulestype modules=response.getGetModulesForCustomerResponse();
    LicenceServiceStub.Modules_type0 modulesType=modules.getModules();
    return modulesType != null;
  }
 catch (  AxisFault f) {
    ErrorCode code=handleAxisFault(f);
switch (code) {
case unsufficientRights:
      logError("String_Node_Str",f);
    break;
default :
  logAxisError("String_Node_Str",f);
}
return false;
}
catch (Exception e) {
logWarn("String_Node_Str",e);
return false;
}
}
Program: 69942
Project: 69942
Buggy source:
public boolean isUserOf(ViteroBooking booking,Identity identity) throws VmsNotAvailableException {
  boolean member=false;
  int userId=getVmsUserId(identity,false);
  if (userId > 0) {
    Usertype[] users=getVmsUsersByGroup(booking.getGroupId());
    if (users != null) {
      for (      Usertype user : users) {
        if (userId == user.getId()) {
          member=true;
        }
      }
    }
  }
  return member;
}

Fixed version (ground truth):
public boolean isUserOf(ViteroBooking booking,Identity identity) throws VmsNotAvailableException {
  boolean member=false;
  GetUserInfo userInfo=getVmsUserId(identity,false);
  int userId=userInfo.getUserId();
  if (userId > 0) {
    Usertype[] users=getVmsUsersByGroup(booking.getGroupId());
    if (users != null) {
      for (      Usertype user : users) {
        if (userId == user.getId()) {
          member=true;
        }
      }
    }
  }
  return member;
}
Program: 69943
Project: 69943
Buggy source:
protected int getVmsUserId(Identity identity,boolean create) throws VmsNotAvailableException {
  int userId;
  Authentication authentication=securityManager.findAuthentication(identity,VMS_PROVIDER);
  if (authentication == null) {
    if (create) {
      userId=createVmsUser(identity);
      if (userId > 0) {
        securityManager.createAndPersistAuthentication(identity,VMS_PROVIDER,Integer.toString(userId),"String_Node_Str");
      }
    }
 else {
      userId=-1;
    }
  }
 else {
    userId=Integer.parseInt(authentication.getAuthusername());
  }
  return userId;
}

Fixed version (ground truth):
protected GetUserInfo getVmsUserId(Identity identity,boolean create) throws VmsNotAvailableException {
  int userId;
  boolean created=false;
  closeDBSessionSafely();
  Authentication authentication=securityManager.findAuthentication(identity,VMS_PROVIDER);
  if (authentication == null) {
    if (create) {
      created=true;
      userId=createVmsUser(identity);
      if (userId > 0) {
        securityManager.createAndPersistAuthentication(identity,VMS_PROVIDER,Integer.toString(userId),"String_Node_Str");
      }
    }
 else {
      userId=-1;
    }
  }
 else {
    userId=Integer.parseInt(authentication.getAuthusername());
  }
  closeDBSessionSafely();
  return new GetUserInfo(created,userId);
}
Program: 69946
Project: 69946
Buggy source:
public List<ViteroBooking> getBookingInFutures(Identity identity) throws VmsNotAvailableException {
  int userId=getVmsUserId(identity,false);
  if (userId > 0) {
    Booking[] bookings=getBookingInFutureByUserId(userId);
    return convert(bookings);
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
public List<ViteroBooking> getBookingInFutures(Identity identity) throws VmsNotAvailableException {
  GetUserInfo userInfo=getVmsUserId(identity,false);
  int userId=userInfo.getUserId();
  if (userId > 0) {
    Booking[] bookings=getBookingInFutureByUserId(userId);
    return convert(bookings);
  }
  return Collections.emptyList();
}
Program: 69948
Project: 69948
Buggy source:
@Override public void deleteUserData(Identity identity,String newDeletedUserName){
  if (!viteroModule.isDeleteVmsUserOnUserDelete())   return;
  try {
    int userId=getVmsUserId(identity,false);
    if (userId > 0) {
      deleteVmsUser(userId);
    }
  }
 catch (  VmsNotAvailableException e) {
    logError("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void deleteUserData(Identity identity,String newDeletedUserName){
  if (!viteroModule.isDeleteVmsUserOnUserDelete())   return;
  try {
    GetUserInfo userInfo=getVmsUserId(identity,false);
    int userId=userInfo.getUserId();
    if (userId > 0) {
      deleteVmsUser(userId);
    }
  }
 catch (  VmsNotAvailableException e) {
    logError("String_Node_Str",e);
  }
}
Program: 69950
Project: 69950
Buggy source:
private final void apache(HttpServletRequest request,long uploadLimit){
  ServletFileUpload uploadParser=new ServletFileUpload();
  uploadParser.setSizeMax((uploadLimit * 1024l) + 512000l);
  try {
    FileItemIterator iter=uploadParser.getItemIterator(request);
    while (iter.hasNext()) {
      FileItemStream item=iter.next();
      String itemName=item.getFieldName();
      InputStream itemStream=item.openStream();
      if (item.isFormField()) {
        String value=Streams.asString(itemStream,"String_Node_Str");
        fields.put(itemName,value);
      }
 else {
        filename=item.getName();
        contentType=item.getContentType();
        if (filename != null) {
          filename=UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str") + "String_Node_Str" + filename;
        }
 else {
          filename="String_Node_Str" + UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str");
        }
        file=new File(System.getProperty("String_Node_Str"),filename);
        try {
          save(itemStream,file);
        }
 catch (        Exception e) {
          log.error("String_Node_Str",e);
        }
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private final void apache(HttpServletRequest request,long uploadLimit){
  ServletFileUpload uploadParser=new ServletFileUpload();
  uploadParser.setSizeMax((uploadLimit * 1024l) + 512000l);
  try {
    FileItemIterator iter=uploadParser.getItemIterator(request);
    while (iter.hasNext()) {
      FileItemStream item=iter.next();
      String itemName=item.getFieldName();
      InputStream itemStream=item.openStream();
      if (item.isFormField()) {
        String value=Streams.asString(itemStream,"String_Node_Str");
        fields.put(itemName,value);
      }
 else {
        filename=item.getName();
        contentType=item.getContentType();
        if (filename != null) {
          filename=UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str") + "String_Node_Str" + filename;
        }
 else {
          filename="String_Node_Str" + UUID.randomUUID().toString().replace("String_Node_Str","String_Node_Str");
        }
        file=new File(System.getProperty("String_Node_Str"),filename);
        try {
          save(itemStream,file);
        }
 catch (        Exception e) {
          log.error("String_Node_Str",e);
        }
        System.out.println("String_Node_Str" + file.length());
      }
    }
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
  }
}
Program: 69951
Project: 69951
Buggy source:
@Test @RunAsClient public void checkCollectForumPost() throws IOException, URISyntaxException {
  CourseVO course=functionalVOUtil.importAllElementsCourse(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.postForumMessage(browser,course.getRepoEntryKey(),0,FORUM_POST_TITLE,FORUM_POST_MESSAGE));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectForumPost() throws IOException, URISyntaxException {
  CourseVO course=functionalVOUtil.importAllElementsCourse(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.postForumMessage(browser,course.getRepoEntryKey(),0,FORUM_POST_TITLE,FORUM_POST_MESSAGE));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,FORUM_BINDER,FORUM_PAGE,FORUM_STRUCTURE,FORUM_ARTEFACT_TITLE,FORUM_ARTEFACT_DESCRIPTION,FORUM_TAGS,functionalEportfolioUtil));
}
Program: 69952
Project: 69952
Buggy source:
@Test @RunAsClient public void checkCollectWikiArticle() throws URISyntaxException, IOException {
  RepositoryEntryVO vo=functionalVOUtil.importWiki(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.createWikiArticle(browser,vo.getKey(),WIKI_ARTICLE_PAGENAME,WIKI_ARTICLE_CONTENT));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectWikiArticle() throws URISyntaxException, IOException {
  RepositoryEntryVO vo=functionalVOUtil.importWiki(deploymentUrl);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.createWikiArticle(browser,vo.getKey(),WIKI_ARTICLE_PAGENAME,WIKI_ARTICLE_CONTENT));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,WIKI_BINDER,WIKI_PAGE,WIKI_STRUCTURE,WIKI_ARTEFACT_TITLE,WIKI_ARTEFACT_DESCRIPTION,WIKI_TAGS,functionalEportfolioUtil));
}
Program: 69953
Project: 69953
Buggy source:
@Test @RunAsClient public void checkCollectBlogPost() throws URISyntaxException, IOException {
  long repoKey=functionalRepositorySiteUtil.createBlog(browser,BLOG_TITLE,BLOG_DESCRIPTION);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.createBlogEntry(browser,repoKey,BLOG_POST_TITLE,BLOG_POST_DESCRIPTION,BLOG_POST_CONTENT));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE));
}

Fixed version (ground truth):
@Test @RunAsClient public void checkCollectBlogPost() throws URISyntaxException, IOException {
  long repoKey=functionalRepositorySiteUtil.createBlog(browser,BLOG_TITLE,BLOG_DESCRIPTION);
  Assert.assertTrue(functionalUtil.login(browser,user.getLogin(),user.getPassword(),true));
  Assert.assertTrue(functionalCourseUtil.createBlogEntry(browser,repoKey,BLOG_POST_TITLE,BLOG_POST_DESCRIPTION,BLOG_POST_CONTENT));
  Assert.assertTrue(functionalCourseUtil.addToEportfolio(browser,BLOG_BINDER,BLOG_PAGE,BLOG_STRUCTURE,BLOG_ARTEFACT_TITLE,BLOG_ARTEFACT_DESCRIPTION,BLOG_TAGS,functionalEportfolioUtil));
}
Program: 69954
Project: 69954
Buggy source:
/** 
 * @param browser
 * @return true on successAdds an artefact to eportfolio by clicking the appropriate button.
 */
public boolean addToEportfolio(Selenium browser,String binder,String page,String structure,FunctionalEPortfolioUtil functionalEPortfolioUtil){
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(getEportfolioAddCss()).append("String_Node_Str");
  browser.click(selectorBuffer.toString());
  if (binder != null) {
  }
  return (true);
}

Fixed version (ground truth):
/** 
 * @param browser
 * @return true on successAdds an artefact to eportfolio by clicking the appropriate button.
 */
public boolean addToEportfolio(Selenium browser,String binder,String page,String structure,String title,String description,String tags,FunctionalEPortfolioUtil functionalEPortfolioUtil){
  if (!functionalEPortfolioUtil.createElements(browser,binder,page,structure))   return (false);
  StringBuffer selectorBuffer=new StringBuffer();
  selectorBuffer.append("String_Node_Str").append(getEportfolioAddCss()).append("String_Node_Str");
  browser.click(selectorBuffer.toString());
  if (binder != null) {
    functionalEPortfolioUtil.fillInTitleAndDescription(browser,title,description);
    functionalEPortfolioUtil.fillInTags(browser,tags);
    browser.click(functionalEPortfolioUtil.createSelector(binder,page,structure));
    functionalUtil.clickWizardFinish(browser);
  }
  return (true);
}