nus-yam/ex-repair huggingface dataset:
Program: 101083
Project: 101083
Buggy source:
public Iterable<String> predictiveSearch(String prefix){
  char[] queryChars=prefix.toCharArray();
  int cur=0;
  Node node=root;
  while (node != null) {
    char[] letters=node.getLetters();
    if (letters.length > (queryChars.length - cur))     return Collections.emptyList();
    for (int i=0; i < letters.length; i++) {
      if (letters[i] != queryChars[cur + i]) {
        return Collections.emptyList();
      }
    }
    cur+=letters.length;
    if (queryChars.length == cur) {
      List<String> ret=new ArrayList<String>();
      if (node.isTerminated())       ret.add(prefix);
      enumLetters(node,prefix,ret);
      return ret;
    }
    node=node.getChild(queryChars[cur]);
  }
  return Collections.emptyList();
}

Fixed version (ground truth):
public Iterable<String> predictiveSearch(String prefix){
  char[] queryChars=prefix.toCharArray();
  int cur=0;
  Node node=root;
  while (node != null) {
    char[] letters=node.getLetters();
    int n=Math.min(letters.length,queryChars.length - cur);
    for (int i=0; i < n; i++) {
      if (letters[i] != queryChars[cur + i]) {
        return Collections.emptyList();
      }
    }
    cur+=n;
    if (queryChars.length == cur) {
      List<String> ret=new ArrayList<String>();
      int rest=letters.length - n;
      if (rest > 0) {
        prefix+=new String(letters,n,rest);
      }
      if (node.isTerminated())       ret.add(prefix);
      enumLetters(node,prefix,ret);
      return ret;
    }
    node=node.getChild(queryChars[cur]);
  }
  return Collections.emptyList();
}
Program: 101084
Project: 101084
Buggy source:
/** 
 * Constructor used by ExoContainer.
 * @param {@link InitParams} params
 * @param {@link ConfigurationManager} confManager
 */
public ExtendedPropertyConfigurator(InitParams params,ConfigurationManager confManager){
  super(loadPropertiesParams(params),confManager);
  ValuesParam exts=params.getValuesParam("String_Node_Str");
  if (exts != null) {
    for (    Object val : exts.getValues()) {
      String path=(String)val;
      if (path != null) {
        URL url=null;
        try {
          url=confManager.getURL(path);
          url.openStream().close();
          LOG.info("String_Node_Str" + url + "String_Node_Str");
          Map<String,String> props=ContainerUtil.loadProperties(url);
          if (props != null) {
            for (            Map.Entry<String,String> entry : props.entrySet()) {
              String propertyName=entry.getKey();
              String propertyValue=entry.getValue();
              PropertyManager.setProperty(propertyName,propertyValue);
            }
          }
        }
 catch (        FileNotFoundException fne) {
          LOG.info("String_Node_Str" + path + "String_Node_Str");
        }
catch (        Exception e) {
          LOG.error("String_Node_Str" + path + (url != null ? "String_Node_Str" + url : "String_Node_Str"),e);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Constructor used by ExoContainer.
 * @param params
 * @param confManager
 */
public ExtendedPropertyConfigurator(InitParams params,ConfigurationManager confManager){
  super(loadPropertiesParams(params),confManager);
  ValuesParam exts=params.getValuesParam("String_Node_Str");
  if (exts != null) {
    for (    Object val : exts.getValues()) {
      String path=(String)val;
      if (path != null) {
        URL url=null;
        try {
          url=confManager.getURL(path);
          url.openStream().close();
          LOG.info("String_Node_Str" + url + "String_Node_Str");
          Map<String,String> props=ContainerUtil.loadProperties(url);
          if (props != null) {
            for (            Map.Entry<String,String> entry : props.entrySet()) {
              String propertyName=entry.getKey();
              String propertyValue=entry.getValue();
              PropertyManager.setProperty(propertyName,propertyValue);
            }
          }
        }
 catch (        FileNotFoundException fne) {
          LOG.info("String_Node_Str" + path + "String_Node_Str");
        }
catch (        Exception e) {
          LOG.error("String_Node_Str" + path + (url != null ? "String_Node_Str" + url : "String_Node_Str"),e);
        }
      }
    }
  }
}
Program: 101085
Project: 101085
Buggy source:
/** 
 * Serves   {@link #DISABLED_JSP} if the portlet is not a valid dependencyof the current portal container.
 */
public void doFilter(RenderRequest request,RenderResponse response,FilterChain chain) throws IOException, PortletException {
  PortletConfig portletConfig=(PortletConfig)request.getAttribute("String_Node_Str");
  String portletName=portletConfig.getPortletName();
  String portletID=context.getPortletContextName() + "String_Node_Str" + portletName;
  if (getModuleRegistry().isPortletActive(portletID)) {
    chain.doFilter(request,response);
  }
 else {
    LOG.info("String_Node_Str" + portletID + "String_Node_Str");
    String html=getPortletSpecificMessage(request,portletName,portletID);
    response.getWriter().print(html);
  }
}

Fixed version (ground truth):
/** 
 * Serves a page with a message if the portlet is not a valid dependency of the current portal container.
 */
public void doFilter(RenderRequest request,RenderResponse response,FilterChain chain) throws IOException, PortletException {
  PortletConfig portletConfig=(PortletConfig)request.getAttribute("String_Node_Str");
  String portletName=portletConfig.getPortletName();
  String portletID=context.getPortletContextName() + "String_Node_Str" + portletName;
  if (getModuleRegistry().isPortletActive(portletID)) {
    chain.doFilter(request,response);
  }
 else {
    LOG.info("String_Node_Str" + portletID + "String_Node_Str");
    String html=getPortletSpecificMessage(request,portletName,portletID);
    response.getWriter().print(html);
  }
}
Program: 101086
Project: 101086
Buggy source:
/** 
 * Allows superusers to switch on or off a feature, then redirects them to the portal homepage.
 * @param featureName Name of the feature.
 * @param active Its value must be "yes" or "no" that switches on or off the feature respectively.
 * @authentication
 * @request GET: http://localhost:8080/rest/homepage/intranet/features?name=notification&active=no
 * @return Redirects to the portal homepage.
 * @throws Exception
 */
@GET public Response featureSwitch(@QueryParam("String_Node_Str") String featureName,@QueryParam("String_Node_Str") String active) throws Exception {
  ExoContainer container=ExoContainerContext.getCurrentContainer();
  UserACL acl=(UserACL)container.getComponentInstanceOfType(UserACL.class);
  String currentUser=ConversationState.getCurrent().getIdentity().getUserId();
  if (!acl.getSuperUser().equals(currentUser)) {
    LOG.warn("String_Node_Str");
    throw new WebApplicationException(Response.Status.FORBIDDEN);
  }
  boolean isActive=("String_Node_Str".equals(active)) ? false : true;
  ExoFeatureService featureService=CommonsUtils.getService(ExoFeatureService.class);
  featureService.saveActiveFeature(featureName,isActive);
  String domain=System.getProperty("String_Node_Str","String_Node_Str");
  return Response.seeOther(URI.create(domain + LinkProvider.getRedirectUri("String_Node_Str"))).build();
}

Fixed version (ground truth):
/** 
 * Allows superusers to switch on or off a feature, then redirects them to the portal homepage.
 * @param featureName Name of the feature.
 * @param active Its value must be "yes" or "no" that switches on or off the feature respectively.
 * @return Redirects to the portal homepage.
 * @throws Exception
 */
@GET public Response featureSwitch(@QueryParam("String_Node_Str") String featureName,@QueryParam("String_Node_Str") String active) throws Exception {
  ExoContainer container=ExoContainerContext.getCurrentContainer();
  UserACL acl=(UserACL)container.getComponentInstanceOfType(UserACL.class);
  String currentUser=ConversationState.getCurrent().getIdentity().getUserId();
  if (!acl.getSuperUser().equals(currentUser)) {
    LOG.warn("String_Node_Str");
    throw new WebApplicationException(Response.Status.FORBIDDEN);
  }
  boolean isActive=("String_Node_Str".equals(active)) ? false : true;
  ExoFeatureService featureService=CommonsUtils.getService(ExoFeatureService.class);
  featureService.saveActiveFeature(featureName,isActive);
  String domain=System.getProperty("String_Node_Str","String_Node_Str");
  return Response.seeOther(URI.create(domain + LinkProvider.getRedirectUri("String_Node_Str"))).build();
}
Program: 101087
Project: 101087
Buggy source:
/** 
 * Instantiates a new XML deployment plugin.
 * @param initParams the init params
 * @param configurationManager the configuration manager
 * @param repositoryService the repository service
 * @param nodeHierarchyCreator the nodeHierarchyCreator service
 */
public XMLDeploymentPlugin(InitParams initParams,SpaceCustomizationService spaceCustomizationService_,NodeHierarchyCreator nodeHierarchyCreator){
  this.spaceCustomizationService=spaceCustomizationService_;
  this.initParams=initParams;
}

Fixed version (ground truth):
/** 
 * Instantiates a new XML deployment plugin.
 * @param initParams the init params
 * @param spaceCustomizationService the space customization service
 * @param nodeHierarchyCreator the nodeHierarchyCreator service
 */
public XMLDeploymentPlugin(InitParams initParams,SpaceCustomizationService spaceCustomizationService,NodeHierarchyCreator nodeHierarchyCreator){
  this.spaceCustomizationService=spaceCustomizationService;
  this.initParams=initParams;
}
Program: 101088
Project: 101088
Buggy source:
/** 
 * Return the   {@link Page} that have a dashbord of user that name isprovided <br/>
 * @param userId The user name.
 * @throws Exception
 */
private Page getUserDashboardPage(String userId) throws Exception {
  return dataStorageService.getPage(SiteType.USER.getName() + "String_Node_Str" + userId+ "String_Node_Str"+ DEFAULT_TAB_NAME);
}

Fixed version (ground truth):
/** 
 * Return the   {@link Page} that have a dashbord of user that name isprovided <br>
 * @param userId The user name.
 * @throws Exception
 */
private Page getUserDashboardPage(String userId) throws Exception {
  return dataStorageService.getPage(SiteType.USER.getName() + "String_Node_Str" + userId+ "String_Node_Str"+ DEFAULT_TAB_NAME);
}
Program: 101089
Project: 101089
Buggy source:
/** 
 * Apply OrganizationService listeners on selected User
 * @param username The user name
 * @param eventType ADDED/UPDATED/DELETED
 */
@Managed @ManagedDescription("String_Node_Str") @Impact(ImpactType.READ) public String isUserSync(@ManagedDescription("String_Node_Str") @ManagedName("String_Node_Str") String username) throws Exception {
  Session session=null;
  try {
    session=repositoryService.getCurrentRepository().getSystemSession(Util.WORKSPACE);
    return "String_Node_Str" + Util.hasUserFolder(session,username);
  }
  finally {
    if (session != null) {
      session.logout();
    }
  }
}

Fixed version (ground truth):
/** 
 * Apply OrganizationService listeners on selected User
 * @param username The user name
 */
@Managed @ManagedDescription("String_Node_Str") @Impact(ImpactType.READ) public String isUserSync(@ManagedDescription("String_Node_Str") @ManagedName("String_Node_Str") String username) throws Exception {
  Session session=null;
  try {
    session=repositoryService.getCurrentRepository().getSystemSession(Util.WORKSPACE);
    return "String_Node_Str" + Util.hasUserFolder(session,username);
  }
  finally {
    if (session != null) {
      session.logout();
    }
  }
}
Program: 101090
Project: 101090
Buggy source:
/** 
 * @param url
 * @return URL of the page with selected URI in the current portal
 */
public static String getURLInCurrentPortal(String uri){
  RequestContext ctx=RequestContext.getCurrentInstance();
  NodeURL nodeURL=ctx.createURL(NodeURL.TYPE);
  NavigationResource resource=new NavigationResource(SiteType.PORTAL,Util.getPortalRequestContext().getPortalOwner(),uri);
  return nodeURL.setResource(resource).toString();
}

Fixed version (ground truth):
/** 
 * @param uri
 * @return URL of the page with selected URI in the current portal
 */
public static String getURLInCurrentPortal(String uri){
  RequestContext ctx=RequestContext.getCurrentInstance();
  NodeURL nodeURL=ctx.createURL(NodeURL.TYPE);
  NavigationResource resource=new NavigationResource(SiteType.PORTAL,Util.getPortalRequestContext().getPortalOwner(),uri);
  return nodeURL.setResource(resource).toString();
}
Program: 101091
Project: 101091
Buggy source:
/** 
 * @param portalName
 * @param url
 * @return URL of the page with selected URI in the selected portal
 */
public static String getPortalURL(String portalName,String uri){
  RequestContext ctx=RequestContext.getCurrentInstance();
  NodeURL nodeURL=ctx.createURL(NodeURL.TYPE);
  NavigationResource resource=new NavigationResource(SiteKey.portal(portalName),uri);
  return nodeURL.setResource(resource).toString();
}

Fixed version (ground truth):
/** 
 * @param portalName
 * @param uri
 * @return URL of the page with selected URI in the selected portal
 */
public static String getPortalURL(String portalName,String uri){
  RequestContext ctx=RequestContext.getCurrentInstance();
  NodeURL nodeURL=ctx.createURL(NodeURL.TYPE);
  NavigationResource resource=new NavigationResource(SiteKey.portal(portalName),uri);
  return nodeURL.setResource(resource).toString();
}
Program: 101092
Project: 101092
Buggy source:
/** 
 * get Top {maxcount} rated of topics by permission of userId
 * @param userId String is userId of user login
 * @param maxcount maximum of result
 * @return top {maxcount} rated of topics
 * @throws Exception
 */
public List<TopicBean> getTopRateTopicByUser(List<String> allInfoOfUser,int maxcount) throws Exception {
  SessionProvider sProvider=SessionProvider.createSystemProvider();
  List<TopicBean> topicBeans=new ArrayList<TopicBean>();
  try {
    long roleUser=getUserRoleOfForum(sProvider,(allInfoOfUser.size() > 0) ? allInfoOfUser.get(0) : "String_Node_Str");
    NodeIterator iter=getTopVoteTopicByUser(sProvider,(roleUser <= 1) ? true : false);
    TopicBean bean;
    PropertyReader reader;
    while (iter.hasNext()) {
      Node node=iter.nextNode();
      if (hasPermissionInForum(sProvider,node,allInfoOfUser,roleUser)) {
        reader=new PropertyReader(node);
        bean=new TopicBean(node.getName());
        bean.setOwner(reader.string("String_Node_Str"));
        bean.setCreateDate(reader.date("String_Node_Str"));
        bean.setLink(reader.string("String_Node_Str"));
        bean.setTitle(reader.string("String_Node_Str"));
        bean.setVoteRating(reader.d("String_Node_Str"));
        bean.setNumberOfUserVoteRating(reader.list("String_Node_Str").size());
        topicBeans.add(bean);
        if (topicBeans.size() == maxcount)         break;
      }
    }
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str");
  }
 finally {
    sProvider.close();
  }
  return topicBeans;
}

Fixed version (ground truth):
/** 
 * get Top {maxcount} rated of topics by permission of userId
 * @param allInfoOfUser List of users ids
 * @param maxcount maximum of result
 * @return top {maxcount} rated of topics
 * @throws Exception
 */
public List<TopicBean> getTopRateTopicByUser(List<String> allInfoOfUser,int maxcount) throws Exception {
  SessionProvider sProvider=SessionProvider.createSystemProvider();
  List<TopicBean> topicBeans=new ArrayList<TopicBean>();
  try {
    long roleUser=getUserRoleOfForum(sProvider,(allInfoOfUser.size() > 0) ? allInfoOfUser.get(0) : "String_Node_Str");
    NodeIterator iter=getTopVoteTopicByUser(sProvider,(roleUser <= 1) ? true : false);
    TopicBean bean;
    PropertyReader reader;
    while (iter.hasNext()) {
      Node node=iter.nextNode();
      if (hasPermissionInForum(sProvider,node,allInfoOfUser,roleUser)) {
        reader=new PropertyReader(node);
        bean=new TopicBean(node.getName());
        bean.setOwner(reader.string("String_Node_Str"));
        bean.setCreateDate(reader.date("String_Node_Str"));
        bean.setLink(reader.string("String_Node_Str"));
        bean.setTitle(reader.string("String_Node_Str"));
        bean.setVoteRating(reader.d("String_Node_Str"));
        bean.setNumberOfUserVoteRating(reader.list("String_Node_Str").size());
        topicBeans.add(bean);
        if (topicBeans.size() == maxcount)         break;
      }
    }
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str");
  }
 finally {
    sProvider.close();
  }
  return topicBeans;
}
Program: 101093
Project: 101093
Buggy source:
/** 
 * Get user login history <p/> REST service URL: /loginhistory/{userId}/{fromTime}/{toTime}
 * @return : Login history entries from {fromTime} to {toTime} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response loginhistory(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") Long fromTime,@PathParam("String_Node_Str") Long toTime) throws Exception {
  try {
    List<LoginHistoryBean> loginHis=loginHistoryService.getLoginHistory(userId,fromTime,toTime);
    List<Object> loginHisData=new ArrayList<Object>();
    loginHisData.add(loginHis.size());
    loginHisData.add(loginHis);
    MessageBean data=new MessageBean();
    data.setData(loginHisData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}

Fixed version (ground truth):
/** 
 * Get user login history <br> REST service URL: /loginhistory/{userId}/{fromTime}/{toTime}
 * @return : Login history entries from {fromTime} to {toTime} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response loginhistory(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") Long fromTime,@PathParam("String_Node_Str") Long toTime) throws Exception {
  try {
    List<LoginHistoryBean> loginHis=loginHistoryService.getLoginHistory(userId,fromTime,toTime);
    List<Object> loginHisData=new ArrayList<Object>();
    loginHisData.add(loginHis.size());
    loginHisData.add(loginHis);
    MessageBean data=new MessageBean();
    data.setData(loginHisData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}
Program: 101094
Project: 101094
Buggy source:
/** 
 * Get login count statistic in a week <p/> REST service URL: /loginhistory/weekstats/{userId}/{week}
 * @return : List of login count per days in week {week} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response weekstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String week) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerDaysInWeek(userId,sdf.parse(week).getTime());
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}

Fixed version (ground truth):
/** 
 * Get login count statistic in a week <br> REST service URL: /loginhistory/weekstats/{userId}/{week}
 * @return : List of login count per days in week {week} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response weekstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String week) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerDaysInWeek(userId,sdf.parse(week).getTime());
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}
Program: 101095
Project: 101095
Buggy source:
/** 
 * Get login count statistic in months <p/> REST service URL: /loginhistory/monthstats/{userId}/{fromMonth/{numOfMonth}}
 * @return : List of login count per weeks in {numOfMonths} months start from {fromMonth} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response monthstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String fromMonth,@PathParam("String_Node_Str") int numOfMonths) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerWeeksInMonths(userId,sdf.parse(fromMonth).getTime(),numOfMonths);
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}

Fixed version (ground truth):
/** 
 * Get login count statistic in months <br> REST service URL: /loginhistory/monthstats/{userId}/{fromMonth/{numOfMonth}}
 * @return : List of login count per weeks in {numOfMonths} months start from {fromMonth} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response monthstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String fromMonth,@PathParam("String_Node_Str") int numOfMonths) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerWeeksInMonths(userId,sdf.parse(fromMonth).getTime(),numOfMonths);
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}
Program: 101096
Project: 101096
Buggy source:
/** 
 * Get last {numItems} login history entries <p/> REST service URL: /loginhistory/lastlogins/{numItems}/{userIdFilter}
 * @return : The list of last {numItems} login history entries (filtered by {userIdFilter}) in JSON data format
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response lastlogins(@PathParam("String_Node_Str") int numItems,@PathParam("String_Node_Str") String userIdFilter) throws Exception {
  try {
    List lastLogins=loginHistoryService.getLastLogins(numItems,userIdFilter);
    MessageBean data=new MessageBean();
    data.setData(lastLogins);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}

Fixed version (ground truth):
/** 
 * Get last {numItems} login history entries <br> REST service URL: /loginhistory/lastlogins/{numItems}/{userIdFilter}
 * @return : The list of last {numItems} login history entries (filtered by {userIdFilter}) in JSON data format
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response lastlogins(@PathParam("String_Node_Str") int numItems,@PathParam("String_Node_Str") String userIdFilter) throws Exception {
  try {
    List lastLogins=loginHistoryService.getLastLogins(numItems,userIdFilter);
    MessageBean data=new MessageBean();
    data.setData(lastLogins);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}
Program: 101097
Project: 101097
Buggy source:
/** 
 * Get login count statistic in a year <p/> REST service URL: /loginhistory/yearstats/{userId}/{year}
 * @return : List of login count per months in year {year} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response yearstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String year) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerMonthsInYear(userId,sdf.parse(year).getTime());
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}

Fixed version (ground truth):
/** 
 * Get login count statistic in a year <br> REST service URL: /loginhistory/yearstats/{userId}/{year}
 * @return : List of login count per months in year {year} (in JSON data format) of user {userId}
 */
@GET @Path("String_Node_Str") @Produces(MediaType.APPLICATION_JSON) public Response yearstats(@PathParam("String_Node_Str") String userId,@PathParam("String_Node_Str") String year) throws Exception {
  try {
    SimpleDateFormat sdf=new SimpleDateFormat("String_Node_Str");
    List<LoginCounterBean> loginCounts=loginHistoryService.getLoginCountPerMonthsInYear(userId,sdf.parse(year).getTime());
    List<Object> loginCountsData=new ArrayList<Object>();
    loginCountsData.add(loginCounts.size());
    loginCountsData.add(loginCounts);
    MessageBean data=new MessageBean();
    data.setData(loginCountsData);
    return Response.ok(data,MediaType.APPLICATION_JSON).cacheControl(cacheControl).build();
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + e.getMessage(),e);
    return Response.status(HTTPStatus.INTERNAL_ERROR).cacheControl(cacheControl).build();
  }
}
Program: 101098
Project: 101098
Buggy source:
@Override public Boolean call() throws Exception {
  int start=idx * threadSize;
  int end=start + threadSize;
  if (idx == threadNum - 1) {
    end+=odd;
  }
  ExoContainerContext.setCurrentContainer(container);
  int startBatch=start;
  int endBatch=startBatch + batchSize;
  while (endBatch <= totalSize && endBatch <= end && startBatch < endBatch) {
    LOG.info("String_Node_Str",Thread.currentThread(),startBatch,endBatch);
    RequestLifeCycle.begin(impl);
    IdentitySession session=idmService.getIdentitySession();
    User[] tmp=usrs.load(startBatch,endBatch - startBatch);
    try {
      for (      User u : tmp) {
        enableUser(u,session);
      }
      count.addAndGet(endBatch - startBatch);
      startBatch=endBatch;
      endBatch=startBatch + batchSize;
      endBatch=endBatch > end ? end : endBatch;
      LOG.info("String_Node_Str",Thread.currentThread());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      return false;
    }
 finally {
      RequestLifeCycle.end();
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public Boolean call() throws Exception {
  int start=idx * threadSize;
  int end=start + threadSize;
  if (idx == threadNum - 1) {
    end+=odd;
  }
  ExoContainerContext.setCurrentContainer(container);
  int startBatch=start;
  int endBatch=startBatch + batchSize;
  endBatch=endBatch > end ? end : endBatch;
  while (endBatch <= totalSize && endBatch <= end && startBatch < endBatch) {
    LOG.info("String_Node_Str",Thread.currentThread(),startBatch,endBatch);
    RequestLifeCycle.begin(impl);
    IdentitySession session=idmService.getIdentitySession();
    User[] tmp=usrs.load(startBatch,endBatch - startBatch);
    try {
      for (      User u : tmp) {
        enableUser(u,session);
      }
      count.addAndGet(endBatch - startBatch);
      startBatch=endBatch;
      endBatch=startBatch + batchSize;
      endBatch=endBatch > end ? end : endBatch;
      LOG.info("String_Node_Str",Thread.currentThread());
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      return false;
    }
 finally {
      RequestLifeCycle.end();
    }
  }
  return true;
}
Program: 101100
Project: 101100
Buggy source:
private boolean isOnProfilePage() throws Exception {
  System.out.println(Util.getPortalRequestContext().getRequest().getRequestURL().toString());
  return Util.getPortalRequestContext().getRequest().getRequestURL().toString().contains(PROFILE_PATH);
}

Fixed version (ground truth):
private boolean isOnProfilePage() throws Exception {
  return Util.getPortalRequestContext().getRequest().getRequestURL().toString().contains(PROFILE_PATH);
}
Program: 101101
Project: 101101
Buggy source:
@Override public void processRender(WebuiApplication app,WebuiRequestContext context) throws Exception {
  if (isUserUrl() || isEditProfilePage()) {
    if (isOwner() || isEditProfilePage()) {
      ResourceBundle resApp=context.getApplicationResourceBundle();
      String title=resApp.getString(MY_PROFILE_TITLE);
      Util.getPortalRequestContext().getRequest().setAttribute(PortalRequestContext.REQUEST_TITLE,title);
    }
 else {
      Util.getPortalRequestContext().getRequest().setAttribute(PortalRequestContext.REQUEST_TITLE,getOwnerProfile().getFullName());
    }
  }
  super.processRender(app,context);
}

Fixed version (ground truth):
@Override public void processRender(WebuiApplication app,WebuiRequestContext context) throws Exception {
  if (isUserUrl() && isOnProfilePage() || isEditProfilePage()) {
    if (isOwner() || isEditProfilePage()) {
      ResourceBundle resApp=context.getApplicationResourceBundle();
      String title=resApp.getString(MY_PROFILE_TITLE);
      Util.getPortalRequestContext().getRequest().setAttribute(PortalRequestContext.REQUEST_TITLE,title);
    }
 else {
      Util.getPortalRequestContext().getRequest().setAttribute(PortalRequestContext.REQUEST_TITLE,getOwnerProfile().getFullName());
    }
  }
  super.processRender(app,context);
}
Program: 101103
Project: 101103
Buggy source:
/** 
 * The controller method index() is the name of the default method that Juzu will call. set localization and put into parameters
 * @param httpContext
 * @return Response
 */
@View public Response index(HttpContext httpContext){
  Map<String,Object> parameters=new HashMap<String,Object>();
  parameters.put("String_Node_Str",BrandingController_.uploadFile(null));
  parameters.put("String_Node_Str",getLogoUrl(httpContext,true));
  Locale locale=RequestContext.getCurrentInstance().getLocale();
  ResourceBundle rs=RequestContext.getCurrentInstance().getApplicationResourceBundle();
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  return index.ok(parameters);
}

Fixed version (ground truth):
/** 
 * The controller method index() is the name of the default method that Juzu will call. set localization and put into parameters
 * @param httpContext
 * @return Response
 */
@View public Response index(HttpContext httpContext,RenderContext renderContext){
  Map<String,Object> parameters=new HashMap<String,Object>();
  parameters.put("String_Node_Str",BrandingController_.uploadFile(null));
  parameters.put("String_Node_Str",getLogoUrl(httpContext,true));
  ResourceBundle rs=renderContext.getApplicationContext().resolveBundle(renderContext.getUserContext().getLocale());
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  parameters.put("String_Node_Str",rs.getString("String_Node_Str"));
  return index.ok(parameters);
}
Program: 101104
Project: 101104
Buggy source:
@Resource @Route("String_Node_Str") public Response.Content save(FileItem file,String style) throws IOException {
  if (file != null && file.getContentType().startsWith("String_Node_Str")) {
    dataStorageService.saveFile(file);
  }
  if (style != null && style != "String_Node_Str") {
    settingService.set(Context.GLOBAL,Scope.GLOBAL,BAR_NAVIGATION_STYLE_KEY,SettingValue.create(style));
    this.style=style;
  }
  return Response.ok("String_Node_Str");
}

Fixed version (ground truth):
@Resource public Response.Content save(HttpContext httpContext,FileItem file,String style) throws IOException {
  if (file != null && file.getContentType().startsWith("String_Node_Str")) {
    dataStorageService.saveFile(file);
  }
  if (style != null && style != "String_Node_Str") {
    settingService.set(Context.GLOBAL,Scope.GLOBAL,BAR_NAVIGATION_STYLE_KEY,SettingValue.create(style));
    this.style=style;
  }
  return getResource(httpContext);
}
Program: 101105
Project: 101105
Buggy source:
@Resource @Route("String_Node_Str") public Response.Content save(FileItem file) throws IOException {
  if (file != null && file.getContentType().startsWith("String_Node_Str")) {
    dataStorageService.saveFile(file);
  }
  return Response.ok("String_Node_Str");
}

Fixed version (ground truth):
@Resource @Route("String_Node_Str") public Response.Content save(FileItem file,String style) throws IOException {
  if (file != null && file.getContentType().startsWith("String_Node_Str")) {
    dataStorageService.saveFile(file);
  }
  if (style != null && style != "String_Node_Str") {
    settingService.set(Context.GLOBAL,Scope.GLOBAL,BAR_NAVIGATION_STYLE_KEY,SettingValue.create(style));
    this.style=style;
  }
  return Response.ok("String_Node_Str");
}
Program: 101106
Project: 101106
Buggy source:
@View @Route("String_Node_Str") public Response index(HttpContext httpContext){
  Map<String,Object> parameters=new HashMap<String,Object>();
  parameters.put("String_Node_Str",BrandingControler_.save());
  String logoUrl=getLogoUrl(httpContext);
  if (!verifyUrl(logoUrl)) {
    parameters.put("String_Node_Str","String_Node_Str");
  }
 else {
    parameters.put("String_Node_Str",logoUrl);
  }
  parameters.put("String_Node_Str",settingService.get(Context.GLOBAL,Scope.GLOBAL,BAR_NAVIGATION_STYLE_KEY));
  return index.render(parameters);
}

Fixed version (ground truth):
@View @Route("String_Node_Str") public Response index(HttpContext httpContext){
  Map<String,Object> parameters=new HashMap<String,Object>();
  parameters.put("String_Node_Str",BrandingControler_.save(null));
  String logoUrl=getLogoUrl(httpContext);
  if (!isExiste(logoUrl)) {
    parameters.put("String_Node_Str","String_Node_Str");
  }
 else {
    parameters.put("String_Node_Str",logoUrl);
  }
  return index.render(parameters);
}
Program: 101108
Project: 101108
Buggy source:
/** 
 * This method should remove the PortalConfig, Page and PageNavigation that belong to the portal in the database. The method should broadcast the event UserPortalConfigService.portal.onRemove
 * @param config
 * @throws Exception
 */
public void removeUserPortalConfig(String portalName) throws Exception {
  Query<Page> query=new Query<Page>(PortalConfig.PORTAL_TYPE,portalName,null,null,Page.class);
  LazyPageList pageList=storage_.find(query);
  pageList.setPageSize(10);
  int i=1;
  while (i <= pageList.getAvailablePage()) {
    List<?> list=pageList.getPage(i);
    Iterator<?> itr=list.iterator();
    while (itr.hasNext()) {
      Page page=(Page)itr.next();
      remove(page);
    }
    i++;
  }
  PageNavigation navigation=storage_.getPageNavigation(PortalConfig.PORTAL_TYPE,portalName);
  if (navigation != null)   remove(navigation);
  Query<PortletPreferences> portletPrefQuery=new Query<PortletPreferences>(PortalConfig.PORTAL_TYPE,portalName,null,null,PortletPreferences.class);
  pageList=storage_.find(portletPrefQuery);
  pageList.setPageSize(10);
  i=1;
  while (i <= pageList.getAvailablePage()) {
    List<?> list=pageList.getPage(i);
    for (int j=0, n=list.size(); j < n; j++) {
      PortletPreferences portletPreferences=(PortletPreferences)list.get(j);
      storage_.remove(portletPreferences);
    }
    i++;
  }
  PortalConfig config=storage_.getPortalConfig(portalName);
  portalConfigCache_.remove(config.getName());
  if (config != null)   storage_.remove(config);
}

Fixed version (ground truth):
/** 
 * This method should remove the PortalConfig, Page and PageNavigation that belong to the portal in the database. The method should broadcast the event UserPortalConfigService.portal.onRemove
 * @param config
 * @throws Exception
 */
public void removeUserPortalConfig(String portalName) throws Exception {
  Query<Page> query=new Query<Page>(PortalConfig.PORTAL_TYPE,portalName,null,null,Page.class);
  LazyPageList pageList=storage_.find(query);
  pageList.setPageSize(10);
  int i=1;
  while (i <= pageList.getAvailablePage()) {
    List<?> list=pageList.getPage(i);
    Iterator<?> itr=list.iterator();
    while (itr.hasNext()) {
      Page page=(Page)itr.next();
      remove(page);
    }
    i++;
  }
  PageNavigation navigation=storage_.getPageNavigation(PortalConfig.PORTAL_TYPE,portalName);
  if (navigation != null)   remove(navigation);
  Query<PortletPreferences> portletPrefQuery=new Query<PortletPreferences>(PortalConfig.PORTAL_TYPE,portalName,null,null,PortletPreferences.class);
  pageList=storage_.find(portletPrefQuery);
  pageList.setPageSize(10);
  i=1;
  while (i <= pageList.getAvailablePage()) {
    List<?> list=pageList.getPage(i);
    while (list.size() > 0) {
      PortletPreferences portletPreferences=(PortletPreferences)list.get(0);
      storage_.remove(portletPreferences);
    }
    i++;
  }
  PortalConfig config=storage_.getPortalConfig(portalName);
  portalConfigCache_.remove(config.getName());
  if (config != null)   storage_.remove(config);
}
Program: 101109
Project: 101109
Buggy source:
public UIContainerForm() throws Exception {
  super("String_Node_Str");
  UIFormInputSet infoInputSet=new UIFormInputSet("String_Node_Str");
  infoInputSet.addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(StringLengthValidator.class,3,30).addValidator(NameValidator.class)).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(StringLengthValidator.class,3,30)).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(ExpressionValidator.class,"String_Node_Str","String_Node_Str")).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(ExpressionValidator.class,"String_Node_Str","String_Node_Str"));
  addChild(infoInputSet);
  setSelectedTab(infoInputSet.getId());
  UIListPermissionSelector uiListPermissionSelector=createUIComponent(UIListPermissionSelector.class,null,null);
  uiListPermissionSelector.configure("String_Node_Str","String_Node_Str");
  uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
  addChild(uiListPermissionSelector);
}

Fixed version (ground truth):
public UIContainerForm() throws Exception {
  super("String_Node_Str");
  UIFormInputSet infoInputSet=new UIFormInputSet("String_Node_Str");
  infoInputSet.addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(MandatoryValidator.class).addValidator(StringLengthValidator.class,3,30).addValidator(NameValidator.class)).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(StringLengthValidator.class,3,30)).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(ExpressionValidator.class,"String_Node_Str","String_Node_Str")).addUIFormInput(new UIFormStringInput("String_Node_Str","String_Node_Str",null).addValidator(ExpressionValidator.class,"String_Node_Str","String_Node_Str"));
  addChild(infoInputSet);
  setSelectedTab(infoInputSet.getId());
  UIListPermissionSelector uiListPermissionSelector=createUIComponent(UIListPermissionSelector.class,null,null);
  uiListPermissionSelector.configure("String_Node_Str","String_Node_Str");
  uiListPermissionSelector.addValidator(EmptyIteratorValidator.class);
  UIFormInputSet uiPermissionSet=createUIComponent(UIFormInputSet.class,"String_Node_Str",null);
  uiPermissionSet.addChild(uiListPermissionSelector);
  addUIFormInput(uiPermissionSet);
}
Program: 101110
Project: 101110
Buggy source:
public void testResourceBundleServiceRemove() throws Exception {
  ResourceBundle res=service_.getResourceBundle(fileRes,Locale.ENGLISH);
  createResourceBundle(databaseRes,PROPERTIES,Locale.ENGLISH.getLanguage());
  createResourceBundle(databaseRes,PROPERTIES_FR,Locale.FRANCE.getLanguage());
  res=service_.getResourceBundle(databaseRes,Locale.ENGLISH);
  assertTrue("String_Node_Str",res != null);
  res=service_.getResourceBundle(databaseRes,Locale.FRANCE);
  assertTrue("String_Node_Str",res != null);
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  Query q=new Query(null,null);
  List l=service_.findResourceDescriptions(q).getAll();
  int sizeBeforeRemove=l.size();
  ResourceBundleData data=service_.getResourceBundleData(databaseRes + "String_Node_Str");
  service_.removeResourceBundleData(data.getId());
  l=service_.findResourceDescriptions(q).getAll();
  assertEquals("String_Node_Str",sizeBeforeRemove - 1,l.size());
  assertTrue("String_Node_Str",service_.getResourceBundleData(databaseRes + "String_Node_Str") == null);
  tearDown();
}

Fixed version (ground truth):
public void testResourceBundleServiceRemove() throws Exception {
  ResourceBundle res=service_.getResourceBundle(fileRes,Locale.ENGLISH);
  createResourceBundle(databaseRes,PROPERTIES,Locale.ENGLISH.getLanguage());
  createResourceBundle(databaseRes,PROPERTIES_FR,Locale.FRANCE.getLanguage());
  res=service_.getResourceBundle(databaseRes,Locale.ENGLISH);
  assertTrue("String_Node_Str",res != null);
  res=service_.getResourceBundle(databaseRes,Locale.FRANCE);
  assertTrue("String_Node_Str",res != null);
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  Query q=new Query(null,null);
  List l=service_.findResourceDescriptions(q).getAll();
  int sizeBeforeRemove=l.size();
  ResourceBundleData data=service_.getResourceBundleData(databaseRes + "String_Node_Str");
  service_.removeResourceBundleData(data.getId());
  l=service_.findResourceDescriptions(q).getAll();
  assertEquals("String_Node_Str",sizeBeforeRemove - 1,l.size());
  assertTrue("String_Node_Str",service_.getResourceBundleData(databaseRes + "String_Node_Str") == null);
}
Program: 101112
Project: 101112
Buggy source:
public void testResourceBundleServiceList() throws Exception {
  Query q=new Query(null,null);
  List l=service_.findResourceDescriptions(q).getAll();
  assertTrue("String_Node_Str",l.size() == 0);
  ResourceBundle res=service_.getResourceBundle(fileRes,Locale.ENGLISH);
  createResourceBundle(databaseRes,PROPERTIES,Locale.ENGLISH.getLanguage());
  createResourceBundle(databaseRes,PROPERTIES_FR,Locale.FRANCE.getLanguage());
  res=service_.getResourceBundle(databaseRes,Locale.ENGLISH);
  assertTrue("String_Node_Str",res != null);
  res=service_.getResourceBundle(databaseRes,Locale.FRANCE);
  assertTrue("String_Node_Str",res != null);
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  q=new Query(null,null);
  l=service_.findResourceDescriptions(q).getAll();
  assertTrue("String_Node_Str",l.size() == 2);
  tearDown();
}

Fixed version (ground truth):
public void testResourceBundleServiceList() throws Exception {
  Query q=new Query(null,null);
  List l=service_.findResourceDescriptions(q).getAll();
  ResourceBundle res=service_.getResourceBundle(fileRes,Locale.ENGLISH);
  createResourceBundle(databaseRes,PROPERTIES,Locale.ENGLISH.getLanguage());
  createResourceBundle(databaseRes,PROPERTIES_FR,Locale.FRANCE.getLanguage());
  res=service_.getResourceBundle(databaseRes,Locale.ENGLISH);
  assertTrue("String_Node_Str",res != null);
  res=service_.getResourceBundle(databaseRes,Locale.FRANCE);
  assertTrue("String_Node_Str",res != null);
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",res.getString("String_Node_Str"));
  q=new Query(null,null);
  l=service_.findResourceDescriptions(q).getAll();
  assertTrue("String_Node_Str",l.size() >= 2);
}
Program: 101113
Project: 101113
Buggy source:
public Set<UIComponent> getDefaultUIComponentToUpdateByAjax(WebuiRequestContext context){
  Set<UIComponent> list=new HashSet<UIComponent>(3);
  list.add(context.getUIApplication());
  return list;
}

Fixed version (ground truth):
public Set<UIComponent> getDefaultUIComponentToUpdateByAjax(WebuiRequestContext context){
  Set<UIComponent> list=new LinkedHashSet<UIComponent>(3);
  list.add(context.getUIApplication());
  return list;
}
Program: 101114
Project: 101114
Buggy source:
public void addUIComponentToUpdateByAjax(UIComponent uicomponent){
  if (uicomponentToUpdateByAjax == null) {
    uicomponentToUpdateByAjax=new HashSet<UIComponent>();
  }
  uicomponentToUpdateByAjax.add(uicomponent);
}

Fixed version (ground truth):
public void addUIComponentToUpdateByAjax(UIComponent uicomponent){
  if (uicomponentToUpdateByAjax == null) {
    uicomponentToUpdateByAjax=new LinkedHashSet<UIComponent>();
  }
  uicomponentToUpdateByAjax.add(uicomponent);
}
Program: 101115
Project: 101115
Buggy source:
public void print(Object o){
  try {
    if (o instanceof Text) {
      ((Text)o).writeTo(this);
    }
 else {
      write(String.valueOf(o));
    }
  }
 catch (  IOException e) {
  }
}

Fixed version (ground truth):
public void print(Object o){
  try {
    if (o == null) {
      write("String_Node_Str");
    }
 else     if (o instanceof Text) {
      ((Text)o).writeTo(this);
    }
 else {
      write(String.valueOf(o));
    }
  }
 catch (  IOException e) {
  }
}
Program: 101117
Project: 101117
Buggy source:
public Appendable append(char c) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
public Appendable append(char c) throws IOException {
  encoder.encode(c,out);
  return this;
}