nus-yam/ex-repair huggingface dataset:
Program: 16718
Project: 16718
Buggy source:
@Override @Inject public void setService(WebSampleResourceService service){
  this.service=service;
}

Fixed version (ground truth):
@Override @Inject public void setService(SampleResourceService service){
  this.service=service;
}
Program: 16719
Project: 16719
Buggy source:
@Test @SuppressWarnings("String_Node_Str") public void testFindResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_XML).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
  wr=resource().path(getResourcePath() + "String_Node_Str" + getResourceId(res));
  ClientResponse cr=wr.get(ClientResponse.class);
  Assert.assertEquals("String_Node_Str",Status.OK.getStatusCode(),cr.getStatus());
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void testFindResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_JSON).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
  wr=resource().path(getResourcePath() + "String_Node_Str" + getResourceId(res));
  ClientResponse cr=wr.get(ClientResponse.class);
  Assert.assertEquals("String_Node_Str",Status.OK.getStatusCode(),cr.getStatus());
}
Program: 16720
Project: 16720
Buggy source:
@Test @SuppressWarnings("String_Node_Str") public void testCreateResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_XML).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void testCreateResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_JSON).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
}
Program: 16721
Project: 16721
Buggy source:
@Test @SuppressWarnings("String_Node_Str") public void testDeleteResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_XML).accept(MediaType.APPLICATION_XML).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
  wr=resource().path(getResourcePath() + "String_Node_Str" + getResourceId(res));
  ClientResponse response=wr.delete(ClientResponse.class);
  Assert.assertEquals(Status.NO_CONTENT.getStatusCode(),response.getStatus());
  response=wr.accept(MediaType.APPLICATION_XML).get(ClientResponse.class);
  Assert.assertEquals(Status.NOT_FOUND.getStatusCode(),response.getStatus());
}

Fixed version (ground truth):
@Test @SuppressWarnings("String_Node_Str") public void testDeleteResource(){
  WebResource wr=resource().path(getResourcePath());
  T r=createTestResource();
  T res=(T)wr.type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON).post(r.getClass(),r);
  Assert.assertNotNull("String_Node_Str",res);
  wr=resource().path(getResourcePath() + "String_Node_Str" + getResourceId(res));
  ClientResponse response=wr.delete(ClientResponse.class);
  Assert.assertEquals(Status.NO_CONTENT.getStatusCode(),response.getStatus());
  response=wr.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class);
  Assert.assertEquals(Status.NOT_FOUND.getStatusCode(),response.getStatus());
}
Program: 16722
Project: 16722
Buggy source:
@SuppressWarnings("String_Node_Str") @Test public void testUpdate(){
  T r1=createTestResource();
  r1=(T)resource().path(getResourcePath()).type(MediaType.APPLICATION_XML).post(r1.getClass(),r1);
  WebResource wr=resource().path(getResourcePath() + "String_Node_Str" + this.getResourceId(r1));
  String response1=wr.accept(MediaType.APPLICATION_JSON).get(String.class);
  T r2=udpateTestResource(r1);
  r2=(T)wr.type(MediaType.APPLICATION_XML).put(r2.getClass(),r2);
  String response2=wr.accept(MediaType.APPLICATION_JSON).get(String.class);
  Assert.assertFalse(response1.equals(response2));
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Test public void testUpdate(){
  T r1=createTestResource();
  r1=(T)resource().path(getResourcePath()).type(MediaType.APPLICATION_JSON).post(r1.getClass(),r1);
  WebResource wr=resource().path(getResourcePath() + "String_Node_Str" + this.getResourceId(r1));
  String response1=wr.accept(MediaType.APPLICATION_JSON).get(String.class);
  T r2=udpateTestResource(r1);
  r2=(T)wr.type(MediaType.APPLICATION_JSON).put(r2.getClass(),r2);
  String response2=wr.accept(MediaType.APPLICATION_JSON).get(String.class);
  Assert.assertFalse(response1.equals(response2));
}
Program: 16723
Project: 16723
Buggy source:
@Test public void testFindAllBeans(){
  WebResource r=resource().path("String_Node_Str");
  String response=r.type(MediaType.APPLICATION_XML).get(String.class);
  Assert.assertTrue(response.contains("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testFindAllBeans(){
  WebResource r=resource().path("String_Node_Str");
  String response=r.type(MediaType.APPLICATION_JSON).get(String.class);
  Assert.assertTrue(response.contains("String_Node_Str"));
}
Program: 16724
Project: 16724
Buggy source:
/** 
 * Override this methods in order to secure it 
 */
@Override @POST @RolesAllowed({"String_Node_Str"}) public User create(User user){
  return super.create(user);
}

Fixed version (ground truth):
@POST @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public User create(UserWithPassword userWithPassword){
  return super.create(userWithPassword.toUser());
}
Program: 16726
Project: 16726
Buggy source:
@Test public void shouldHaveIncludes(){
  Assert.assertNotNull(dbUnitConfiguration.getIncludeTables());
  Assert.assertEquals(2,dbUnitConfiguration.getIncludeTables().size());
}

Fixed version (ground truth):
@Test public void shouldHaveIncludes(){
  Assert.assertNotNull(dbUnitConfiguration.getIncludeTables());
  Assert.assertEquals(2,dbUnitConfiguration.getIncludeTables().size());
  Assert.assertNotNull("String_Node_Str",dbUnitConfiguration.getIncludeTables().get(0));
  Assert.assertNotNull("String_Node_Str",dbUnitConfiguration.getIncludeTables().get(1));
}
Program: 16727
Project: 16727
Buggy source:
@Test public void shouldHaveExcludes(){
  Assert.assertNotNull(dbUnitConfiguration.getExcludeTables());
  Assert.assertEquals(1,dbUnitConfiguration.getExcludeTables().size());
}

Fixed version (ground truth):
@Test public void shouldHaveExcludes(){
  Assert.assertNotNull(dbUnitConfiguration.getExcludeTables());
  Assert.assertEquals(1,dbUnitConfiguration.getExcludeTables().size());
  Assert.assertEquals("String_Node_Str",dbUnitConfiguration.getExcludeTables().get(0));
}
Program: 16728
Project: 16728
Buggy source:
/** 
 * Return the currently authentified Used<br/> <p> This is the first method to call once authenticated with Oauth2 Currently, the Oauth2 authentication method is the one remaining We can't be log without using OAuth2 The user_id will be override by the filter layer, so we can't get the User object corresponding to another user than the one logged </p>
 * @param login , given by the filter layer, once the token has been checked
 * @return the Logged User Object, in XMl or JSON type if everything OK,otherwise (It shouldn't append) an HTTP error 404
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public User currentUser(){
  SecurityContext securityContext=SecurityContextHolder.getContext();
  IdentityUserDetailsAdapter userDetails=(IdentityUserDetailsAdapter)securityContext.getAuthentication().getPrincipal();
  User user=this.service.findByLogin(userDetails.getUsername());
  if (user == null) {
    throw new NotFoundException();
  }
  if (user != null) {
    List<String> permissions=PermissionsOwnerTools.getInheritedPermission(user);
    user.getPermissions().clear();
    user.getPermissions().addAll(permissions);
  }
  return user;
}

Fixed version (ground truth):
/** 
 * Return the currently authentified Used<br/> <p> This is the first method to call once authenticated with Oauth2 Currently, the Oauth2 authentication method is the one remaining We can't be log without using OAuth2 The user_id will be override by the filter layer, so we can't get the User object corresponding to another user than the one logged </p>
 * @param login , given by the filter layer, once the token has been checked
 * @return the Logged User Object, in XMl or JSON type if everything OK,otherwise (It shouldn't append) an HTTP error 404
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public User currentUser(){
  SecurityContext securityContext=SecurityContextHolder.getContext();
  UserDetails userDetails=(UserDetails)securityContext.getAuthentication().getPrincipal();
  Assert.notNull(userDetails);
  User user=this.service.findByLogin(userDetails.getUsername());
  if (user == null) {
    throw new NotFoundException();
  }
  if (user != null) {
    List<String> permissions=PermissionsOwnerTools.getInheritedPermission(user);
    user.getPermissions().clear();
    user.getPermissions().addAll(permissions);
  }
  return user;
}
Program: 16729
Project: 16729
Buggy source:
public User(User u){
  super(u);
  String s;
  s=u.getFirstName();
  firstName=(s == null) ? new String() : new String(s);
  s=u.getLastName();
  lastName=(s == null) ? new String() : new String(s);
  s=u.getLogin();
  login=(s == null) ? new String() : new String(s);
  s=u.getEmail();
  email=(s == null) ? new String() : new String(s);
  List<Group> l=u.getGroups();
  groups=(l == null) ? new ArrayList<Group>() : new ArrayList<Group>(u.getGroups());
}

Fixed version (ground truth):
public User(User u){
  super(u);
  String s;
  s=u.getFirstName();
  firstName=(s == null) ? new String() : new String(s);
  s=u.getLastName();
  lastName=(s == null) ? new String() : new String(s);
  s=u.getLogin();
  login=(s == null) ? new String() : new String(s);
  s=u.getEmail();
  email=(s == null) ? new String() : new String(s);
  s=u.getPassword();
  password=(s == null) ? new String() : new String(s);
  List<Group> l=u.getGroups();
  groups=(l == null) ? new ArrayList<Group>() : new ArrayList<Group>(u.getGroups());
}
Program: 16730
Project: 16730
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override @Transactional(readOnly=false) public User update(User user) throws AlreadyExistingEntityException {
  User existingUser=this.findById(user.getId());
  if (existingUser != null) {
    user.setPassword(existingUser.getPassword());
  }
  return super.update(user);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override @Transactional(readOnly=false) public User update(User user) throws AlreadyExistingEntityException {
  User existingUser=this.findById(user.getId());
  if (user.getPassword() == null) {
    user.setPassword(existingUser.getPassword());
  }
 else   if (!user.getPassword().equals(existingUser.getPassword())) {
    user.setPassword(passwordEncoder.encodePassword(user.getPassword(),null));
  }
  return super.update(user);
}
Program: 16731
Project: 16731
Buggy source:
@Test public void shouldManageToCheckUserIdentity(){
  User u=this.createTestResource();
  String password=u.getPassword();
  u=resource().path("String_Node_Str").type(MediaType.APPLICATION_XML).post(User.class,u);
  resource().path("String_Node_Str").queryParam("String_Node_Str",password).type(MediaType.APPLICATION_XML).post(u);
  ClientResponse postAnswerCorrectPass=resource().path("String_Node_Str").queryParam("String_Node_Str",u.getLogin()).queryParam("String_Node_Str",password).post(ClientResponse.class);
  ClientResponse postAnswerWrongPass=resource().path("String_Node_Str").queryParam("String_Node_Str",u.getLogin()).queryParam("String_Node_Str","String_Node_Str").post(ClientResponse.class);
  assertEquals("String_Node_Str",Status.NO_CONTENT,postAnswerCorrectPass.getClientResponseStatus());
  assertEquals("String_Node_Str",Status.NOT_FOUND,postAnswerWrongPass.getClientResponseStatus());
}

Fixed version (ground truth):
@Test public void shouldManageToCheckUserIdentity(){
  UserWithPassword u=new UserWithPassword(this.createTestResource());
  String password=u.getPassword();
  User user=resource().path("String_Node_Str").type(MediaType.APPLICATION_JSON).post(User.class,u);
  ClientResponse postAnswerCorrectPass=resource().path("String_Node_Str").queryParam("String_Node_Str",user.getLogin()).queryParam("String_Node_Str",password).post(ClientResponse.class);
  ClientResponse postAnswerWrongPass=resource().path("String_Node_Str").queryParam("String_Node_Str",user.getLogin()).queryParam("String_Node_Str","String_Node_Str").post(ClientResponse.class);
  assertEquals("String_Node_Str",Status.NO_CONTENT,postAnswerCorrectPass.getClientResponseStatus());
  assertEquals("String_Node_Str",Status.NOT_FOUND,postAnswerWrongPass.getClientResponseStatus());
}
Program: 16732
Project: 16732
Buggy source:
/** 
 * Gets the permissions of one group
 * @param name the name of the group to search insides groups
 * @return a list of permissions, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getPermisionsFromGroup(@PathParam("String_Node_Str") String name){
  Response r=null;
  List<String> permissions=this.service.getGroupDirectPermissions(name);
  r=(permissions == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(permissions).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Gets the permissions of one group
 * @param name the name of the group to search insides groups
 * @return a list of permissions, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") public List<String> getPermisionsFromGroup(@PathParam("String_Node_Str") String name){
  List<String> permissions=this.service.getGroupDirectPermissions(name);
  if (permissions == null) {
    throw new NotFoundException();
  }
  return permissions;
}
Program: 16733
Project: 16733
Buggy source:
/** 
 * Deletes a group from the groups lists of one other group
 * @param name the name of the group in which we should remove a group
 * @param group the name of the gorup the be removed
 */
@DELETE @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public void removeGroupsForUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String groupName){
  this.service.removeGroupFromGroup(name,groupName);
}

Fixed version (ground truth):
/** 
 * Deletes a group from the groups lists of one other group
 * @param name the name of the group in which we should remove a group
 * @param group the name of the gorup the be removed
 */
@DELETE @Path("String_Node_Str") public void removeGroupsForUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String groupName){
  this.service.removeGroupFromGroup(name,groupName);
}
Program: 16734
Project: 16734
Buggy source:
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getUsersFromGroup(@PathParam("String_Node_Str") String name){
  Response r=null;
  List<User> usersFromGroup=this.userService.getUsersFromGroup(name);
  r=(usersFromGroup == null) ? Response.status(Status.NOT_FOUND).build() : Response.ok(usersFromGroup).build();
  return r;
}

Fixed version (ground truth):
@GET @Path("String_Node_Str") public List<User> getUsersFromGroup(@PathParam("String_Node_Str") String name){
  List<User> usersFromGroup=this.userService.getUsersFromGroup(name);
  if (usersFromGroup == null) {
    throw new NotFoundException();
  }
  return usersFromGroup;
}
Program: 16735
Project: 16735
Buggy source:
/** 
 * Puts a group inside the groups lists of one other group
 * @param name the name of the group in which we should add a group
 * @param group the name of the group the be added
 */
@PUT @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public void addGroupToUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String group){
  this.service.addGroupToGroup(name,group);
}

Fixed version (ground truth):
/** 
 * Puts a group inside the groups lists of one other group
 * @param name the name of the group in which we should add a group
 * @param group the name of the group the be added
 */
@PUT @Path("String_Node_Str") public void addGroupToUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String group){
  this.service.addGroupToGroup(name,group);
}
Program: 16736
Project: 16736
Buggy source:
/** 
 * Gets the groups depending of the group
 * @param name the name of the group to search insides groups
 * @return a list of group, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response getGroupsFromGroups(@PathParam("String_Node_Str") String name){
  Group g=this.service.findByName(name);
  Response r=null;
  List<Group> groups=null;
  if (g != null) {
    groups=g.getGroups();
  }
  r=(groups == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(groups).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Gets the groups depending of the group
 * @param name the name of the group to search insides groups
 * @return a list of group, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") public List<Group> getGroupsFromGroups(@PathParam("String_Node_Str") String name){
  Group g=this.service.findByName(name);
  if (g == null) {
    throw new NotFoundException();
  }
  return g.getGroups();
}
Program: 16737
Project: 16737
Buggy source:
/** 
 * Remove a permission form one Group
 * @param name the name of the group in which we should remove a permission
 * @param permisssion the permission to be removed
 */
@DELETE @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public void deletePermissionsFromUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String permission){
  this.service.removePermissionFromGroup(name,permission);
}

Fixed version (ground truth):
/** 
 * Remove a permission form one Group
 * @param name the name of the group in which we should remove a permission
 * @param permisssion the permission to be removed
 */
@DELETE @Path("String_Node_Str") public void deletePermissionsFromUser(@PathParam("String_Node_Str") String name,@PathParam("String_Node_Str") String permission){
  this.service.removePermissionFromGroup(name,permission);
}
Program: 16738
Project: 16738
Buggy source:
/** 
 * Add a permission to a group
 * @param name the name of the group in which we should add a group
 * @param permission the permission to be added
 */
@PUT @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public void addPermissionsToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.addPermissionToGroup(login,permission);
}

Fixed version (ground truth):
/** 
 * Add a permission to a group
 * @param name the name of the group in which we should add a group
 * @param permission the permission to be added
 */
@PUT @Path("String_Node_Str") public void addPermissionsToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.addPermissionToGroup(login,permission);
}
Program: 16739
Project: 16739
Buggy source:
/** 
 * Gets all the users that have a role, direct or inherited.
 * @param filters A list of roles to look for.
 * @return A list of users having at least one of the roles defined as parameter.
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public Response findAllUsersWithRole(@PathParam("String_Node_Str") String name){
  List<User> usersWithRoles=this.userService.findAllUsersWithRoles(Arrays.asList(name));
  Response r=(usersWithRoles == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(usersWithRoles).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Gets all the users that have a role, direct or inherited.
 * @param filters A list of roles to look for.
 * @return A list of users having at least one of the roles defined as parameter.
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public List<User> findAllUsersWithRole(@PathParam("String_Node_Str") String name){
  List<User> usersWithRoles=this.userService.findAllUsersWithRoles(Arrays.asList(name));
  if (usersWithRoles == null) {
    throw new NotFoundException();
  }
  return usersWithRoles;
}
Program: 16740
Project: 16740
Buggy source:
/** 
 * Performs a search.
 * @param query @QueryParam("query") Search query
 * @param withUsers @QueryParam("users")@DefaultValue("true") True to search on users
 * @param withGroups @QueryParam("groups")@DefaultValue("true") True to search on groups
 * @param withRoles @QueryParam("roles")@DefaultValue("true") True to search on roles
 * @return An array of matching users, groups and roles.
 */
@GET @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) public Response search(@QueryParam("String_Node_Str") String query,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") Boolean withUsers,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") Boolean withGroups,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") Boolean withRoles){
  logger.debug("String_Node_Str" + query);
  ResponseBuilder response=Response.serverError();
  try {
    List<Object> results=searchService.search(query,withUsers,withGroups,withRoles);
    GenericEntity<List<Object>> entity=new GenericEntity<List<Object>>(results){
    }
;
    response=Response.ok(entity);
  }
 catch (  Exception exc) {
    response.entity(exc.getMessage());
  }
  return response.build();
}

Fixed version (ground truth):
/** 
 * Performs a search.
 * @param query @QueryParam("query") Search query
 * @param withUsers @QueryParam("users")@DefaultValue("true") True to search on users
 * @param withGroups @QueryParam("groups")@DefaultValue("true") True to search on groups
 * @return An array of matching users, groups and roles.
 */
@GET public Response search(@QueryParam("String_Node_Str") String query,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") Boolean withUsers,@QueryParam("String_Node_Str") @DefaultValue("String_Node_Str") Boolean withGroups){
  logger.debug("String_Node_Str" + query);
  ResponseBuilder response=Response.serverError();
  try {
    List<AbstractPermissionsOwner> results=searchService.search(query,withUsers,withGroups);
    GenericEntity<List<AbstractPermissionsOwner>> entity=new GenericEntity<List<AbstractPermissionsOwner>>(results){
    }
;
    response=Response.ok(entity);
  }
 catch (  Exception exc) {
    response.entity(exc.getMessage());
  }
  return response.build();
}
Program: 16741
Project: 16741
Buggy source:
/** 
 * Gets the permissions of a user
 * @Param login the login of the user to search insides groups
 * @return a list of permissions, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public Response getPermissionsFromUser(@PathParam("String_Node_Str") String login){
  Response r=null;
  List<String> permissions=this.service.getUserPermissions(login);
  r=(permissions == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(permissions).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Gets the permissions of a user
 * @Param login the login of the user to search insides groups
 * @return a list of permissions, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public List<String> getPermissionsFromUser(@PathParam("String_Node_Str") String login){
  List<String> permissions=this.service.getUserPermissions(login);
  if (permissions == null) {
    throw new NotFoundException();
  }
  return permissions;
}
Program: 16742
Project: 16742
Buggy source:
/** 
 * Return the user identified by the specified login.
 * @param login
 * @return the user, in XML or JSON if the user can be found otherwise HTTPError 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public Response getUserByLogin(@PathParam("String_Node_Str") String login){
  User user=this.service.findByLogin(login);
  Response r;
  r=(user == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(user).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Return the user identified by the specified login.
 * @param login
 * @return the user, in XML or JSON if the user can be found otherwise HTTPError 404
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public User getUserByLogin(@PathParam("String_Node_Str") String login){
  User user=this.service.findByLogin(login);
  if (user == null) {
    throw new NotFoundException();
  }
  return user;
}
Program: 16743
Project: 16743
Buggy source:
/** 
 * Deletes a group from the groups lists of a user
 * @Param login the login of the user for which we should remove a group
 * @Param group the name of the group the be removed
 */
@DELETE @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public void removeGroupsForUser(@PathParam("String_Node_Str") String userLogin,@PathParam("String_Node_Str") String groupName){
  this.service.removeGroupFromUser(userLogin,groupName);
}

Fixed version (ground truth):
/** 
 * Deletes a group from the groups lists of a user
 * @Param login the login of the user for which we should remove a group
 * @Param group the name of the group the be removed
 */
@DELETE @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public void removeGroupsForUser(@PathParam("String_Node_Str") String userLogin,@PathParam("String_Node_Str") String groupName){
  this.service.removeGroupFromUser(userLogin,groupName);
}
Program: 16744
Project: 16744
Buggy source:
/** 
 * Puts a group inside the groups lists of a user
 * @Param login the login of the user for which we should add a group
 * @Param group the name of the group the be added
 */
@PUT @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public void addGroupToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String group){
  this.service.addGroupToUser(login,group);
}

Fixed version (ground truth):
/** 
 * Puts a group inside the groups lists of a user
 * @Param login the login of the user for which we should add a group
 * @Param group the name of the group the be added
 */
@PUT @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public void addGroupToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String group){
  this.service.addGroupToUser(login,group);
}
Program: 16745
Project: 16745
Buggy source:
/** 
 * Change the password of the user
 * @param user the user with the new password inside
 */
@POST @Path("String_Node_Str") @Consumes({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str","String_Node_Str"}) public Response changePassword(User u){
  u=this.service.updatePassword(u);
  Response r;
  r=(u == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(u).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Change the password of the user
 * @param user the user with the new password inside
 */
@POST @Path("String_Node_Str") @RolesAllowed({"String_Node_Str","String_Node_Str"}) public User changePassword(User u){
  User updatedUser=this.service.updatePassword(u);
  if (updatedUser == null) {
    throw new NotFoundException();
  }
  return updatedUser;
}
Program: 16746
Project: 16746
Buggy source:
/** 
 * Return the currently authentified Used<br/> <p> This is the first method to call once authenticated with Oauth2 Currently, the Oauth2 authentication method is the one remaining We can't be log without using OAuth2 The user_id will be override by the filter layer, so we can't get the User object corresponding to another user than the one logged </p>
 * @param login , given by the filter layer, once the token has been checked
 * @return the Logged User Object, in XMl or JSON type if everything OK,otherwise (It shouldn't append) an HTTP error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str","String_Node_Str"}) public Response currentUser(){
  SecurityContext securityContext=SecurityContextHolder.getContext();
  IdentityUserDetailsAdapter userDetails=(IdentityUserDetailsAdapter)securityContext.getAuthentication().getPrincipal();
  User user=this.service.findByLogin(userDetails.getUsername());
  Response response=Response.status(Status.NOT_FOUND).build();
  if (user != null) {
    List<String> permissions=PermissionsOwnerTools.getInheritedPermission(user);
    user.getPermissions().clear();
    user.getPermissions().addAll(permissions);
    response=Response.ok(user).build();
  }
  return response;
}

Fixed version (ground truth):
/** 
 * Return the currently authentified Used<br/> <p> This is the first method to call once authenticated with Oauth2 Currently, the Oauth2 authentication method is the one remaining We can't be log without using OAuth2 The user_id will be override by the filter layer, so we can't get the User object corresponding to another user than the one logged </p>
 * @param login , given by the filter layer, once the token has been checked
 * @return the Logged User Object, in XMl or JSON type if everything OK,otherwise (It shouldn't append) an HTTP error 404
 */
@GET @Path("String_Node_Str") @RolesAllowed({"String_Node_Str","String_Node_Str"}) public User currentUser(){
  SecurityContext securityContext=SecurityContextHolder.getContext();
  IdentityUserDetailsAdapter userDetails=(IdentityUserDetailsAdapter)securityContext.getAuthentication().getPrincipal();
  User user=this.service.findByLogin(userDetails.getUsername());
  if (user == null) {
    throw new NotFoundException();
  }
  if (user != null) {
    List<String> permissions=PermissionsOwnerTools.getInheritedPermission(user);
    user.getPermissions().clear();
    user.getPermissions().addAll(permissions);
  }
  return user;
}
Program: 16747
Project: 16747
Buggy source:
/** 
 * Remove a permisssion for one User
 * @Param login the login of the user in which we should remove a permission
 * @Param permisssion the permisssion to be removed
 */
@DELETE @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public void deletePermissionsFromUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.removePermissionFromUser(login,permission);
}

Fixed version (ground truth):
/** 
 * Remove a permisssion for one User
 * @Param login the login of the user in which we should remove a permission
 * @Param permisssion the permisssion to be removed
 */
@DELETE @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public void deletePermissionsFromUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.removePermissionFromUser(login,permission);
}
Program: 16748
Project: 16748
Buggy source:
/** 
 * Add a permission to a user
 * @Param login the login of the user in which we should add a group
 * @Param permission the permission to be added
 */
@PUT @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public void addPermissionsToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.addPermissionToUser(login,permission);
}

Fixed version (ground truth):
/** 
 * Add a permission to a user
 * @Param login the login of the user in which we should add a group
 * @Param permission the permission to be added
 */
@PUT @Path("String_Node_Str") @RolesAllowed({"String_Node_Str"}) public void addPermissionsToUser(@PathParam("String_Node_Str") String login,@PathParam("String_Node_Str") String permission){
  this.service.addPermissionToUser(login,permission);
}
Program: 16749
Project: 16749
Buggy source:
/** 
 * Gets the groups depending of the user
 * @Param login the login of the user to search insides groups
 * @return a list of group, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public Response getGroupsFromUser(@PathParam("String_Node_Str") String login){
  User user=this.service.findByLogin(login);
  Response r=null;
  List<Group> groups=null;
  if (user != null) {
    groups=user.getGroups();
  }
  r=(groups == null) ? Response.status(Status.NOT_FOUND).entity("String_Node_Str").build() : Response.ok(groups).build();
  return r;
}

Fixed version (ground truth):
/** 
 * Gets the groups depending of the user
 * @Param login the login of the user to search insides groups
 * @return a list of group, in XML or JSON if the group can be foundotherwise HTTP Error 404
 */
@GET @Path("String_Node_Str") @Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON}) @RolesAllowed({"String_Node_Str"}) public List<Group> getGroupsFromUser(@PathParam("String_Node_Str") String login){
  User user=this.service.findByLogin(login);
  if (user == null) {
    throw new NotFoundException();
  }
  List<Group> groups=null;
  if (user != null) {
    groups=user.getGroups();
  }
  if (groups == null) {
    throw new NotFoundException();
  }
  return groups;
}
Program: 16750
Project: 16750
Buggy source:
private BeanDefinition createSelectiveDatabasePopulator(Element element){
  List<Element> scripts=DomUtils.getChildElementsByTagName(element,"String_Node_Str");
  List<Element> exceptionElements=DomUtils.getChildElementsByTagName(element,"String_Node_Str");
  boolean ignoreFailedDrops=element.getAttribute("String_Node_Str").equals("String_Node_Str");
  boolean continueOnError=element.getAttribute("String_Node_Str").equals("String_Node_Str");
  BeanDefinitionBuilder selectivebuilder=BeanDefinitionBuilder.genericBeanDefinition(SelectiveDatabasePopulator.class);
  BeanDefinitionBuilder defaultDbPopulatorbuilder=createResourceDatabasePopulatorBuilder(scripts,ignoreFailedDrops,continueOnError);
  selectivebuilder.addPropertyValue("String_Node_Str",defaultDbPopulatorbuilder);
  for (  Element exception : exceptionElements) {
    String product=exception.getAttribute("String_Node_Str");
    List<Element> exceptionScripts=DomUtils.getChildElementsByTagName(exception,"String_Node_Str");
    selectivebuilder.addPropertyValue("String_Node_Str" + product + "String_Node_Str",createResourceDatabasePopulatorBuilder(exceptionScripts,ignoreFailedDrops,continueOnError));
  }
  return selectivebuilder.getBeanDefinition();
}

Fixed version (ground truth):
private BeanDefinition createSelectiveDatabasePopulator(Element element){
  List<Element> scripts=DomUtils.getChildElementsByTagName(element,"String_Node_Str");
  List<Element> exceptionElements=DomUtils.getChildElementsByTagName(element,"String_Node_Str");
  boolean ignoreFailedDrops=element.getAttribute("String_Node_Str").equals("String_Node_Str");
  boolean continueOnError=element.getAttribute("String_Node_Str").equals("String_Node_Str");
  BeanDefinitionBuilder selectivebuilder=BeanDefinitionBuilder.genericBeanDefinition(SelectiveDatabasePopulator.class);
  BeanDefinition defaultDbPopulator=createResourceDatabasePopulator(scripts,ignoreFailedDrops,continueOnError);
  selectivebuilder.addPropertyValue("String_Node_Str",defaultDbPopulator);
  for (  Element exception : exceptionElements) {
    String product=exception.getAttribute("String_Node_Str");
    List<Element> exceptionScripts=DomUtils.getChildElementsByTagName(exception,"String_Node_Str");
    selectivebuilder.addPropertyValue("String_Node_Str" + product + "String_Node_Str",createResourceDatabasePopulator(exceptionScripts,ignoreFailedDrops,continueOnError));
  }
  return selectivebuilder.getBeanDefinition();
}
Program: 16751
Project: 16751
Buggy source:
/** 
 * Create a user with password encryption
 * @param user the user to create
 */
public User create(User user){
  user.setPassword(passwordEncryptor.encryptPassword(user.getPassword()));
  System.out.println("String_Node_Str" + user.getPassword());
  dao.save(user);
  return user;
}

Fixed version (ground truth):
/** 
 * Create a user with password encryption
 * @param user the user to create
 */
public User create(User user){
  user.setPassword(passwordEncryptor.encryptPassword(user.getPassword()));
  dao.save(user);
  return user;
}
Program: 16752
Project: 16752
Buggy source:
/** 
 * Remove a group from one user's groups
 * @param userLogin the login of the user to whom to group should be remove
 * @param groupeName the name of the group to remove from the user's group list
 */
public void removeGroupForUser(String userLogin,String groupName){
  if (userLogin != null && groupName != null) {
    User u=this.findByLogin(userLogin);
    Group g=groupService.findByName(groupName);
    if (u != null && g != null) {
      u.removeFromGroup(g);
    }
  }
}

Fixed version (ground truth):
/** 
 * Remove a group from one user's groups
 * @param userLogin the login of the user to whom to group should be remove
 * @param groupeName the name of the group to remove from the user's group list
 */
@Transactional public void removeGroupForUser(String userLogin,String groupName){
  if (userLogin != null && groupName != null) {
    User u=this.findByLogin(userLogin);
    Group g=groupService.findByName(groupName);
    if (u != null && g != null) {
      u.removeFromGroup(g);
    }
  }
}
Program: 16753
Project: 16753
Buggy source:
/** 
 * Perform audit after method invocation. This method is called even an exception occured.
 */
protected void postAudit(){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str" + ((hasErrorOccured()) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",context.toArray());
  }
}

Fixed version (ground truth):
/** 
 * Perform audit after method invocation. This method is called even an exception occured.
 */
protected void postAudit(MethodInvocation invocation,Throwable error){
  if (this.getTargetLogger(invocation).isDebugEnabled()) {
    this.getTargetLogger(invocation).debug("String_Node_Str" + ((error == null) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str",this.getClassName(invocation),this.getMethodCompleteSignature(invocation));
  }
}
Program: 16754
Project: 16754
Buggy source:
/** 
 * Specific method that allow to precisely perform audit from a  {@link ConstraintViolationException}
 */
@SuppressWarnings("String_Node_Str") protected void logPreciseContraintViolation(ConstraintViolationException e){
  for (  ConstraintViolation constraintViolation : e.getConstraintViolations()) {
    String[] violationDescriptor={constraintViolation.getRootBeanClass().toString(),constraintViolation.getPropertyPath().toString(),constraintViolation.getMessage()};
    logger.error("String_Node_Str",violationDescriptor);
  }
}

Fixed version (ground truth):
/** 
 * Specific method that allow to precisely perform audit from a  {@link ConstraintViolationException}
 */
@SuppressWarnings("String_Node_Str") protected void logPreciseContraintViolation(ConstraintViolationException e,MethodInvocation invocation){
  for (  ConstraintViolation constraintViolation : e.getConstraintViolations()) {
    String[] violationDescriptor={constraintViolation.getRootBeanClass().toString(),constraintViolation.getPropertyPath().toString(),constraintViolation.getMessage()};
    this.getTargetLogger(invocation).error("String_Node_Str",violationDescriptor);
  }
}
Program: 16755
Project: 16755
Buggy source:
/** 
 * @return the target class of this invocation context
 */
private Class<? extends Object> getTargetClassFromInvocation(){
  return invocation.getThis().getClass();
}

Fixed version (ground truth):
/** 
 * @param invocation : method invocation context
 * @return the target class of this invocation context
 */
private Class<? extends Object> getTargetClassFromInvocation(MethodInvocation invocation){
  return invocation.getThis().getClass();
}
Program: 16756
Project: 16756
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public final Object invoke(MethodInvocation invocation) throws Throwable {
  this.invocation=invocation;
  return audit();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public final Object invoke(MethodInvocation invocation) throws Throwable {
  return audit(invocation);
}
Program: 16757
Project: 16757
Buggy source:
/** 
 * Perform audit around the invoked method
 * @return the return object from the invoked method
 * @throws Throwable exception if one thrown
 * @see {@link MethodInterceptor#invoke(MethodInvocation)}
 */
private final Object audit() throws Throwable {
  this.buildTargetLogger();
  this.buildContext();
  Object result=null;
  this.preAudit();
  try {
    result=invocation.proceed();
  }
 catch (  Throwable e) {
    this.occuredError=e;
    this.auditError();
    throw e;
  }
 finally {
    postAudit();
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Perform audit around the invoked method
 * @param invocation the method invocation joinpoint
 * @return the return object from the invoked method
 * @throws Throwable exception if one thrown
 * @see {@link MethodInterceptor#invoke(MethodInvocation)}
 */
private final Object audit(MethodInvocation invocation) throws Throwable {
  Object result=null;
  Throwable error=null;
  this.preAudit(invocation);
  try {
    result=invocation.proceed();
  }
 catch (  Throwable e) {
    error=e;
    this.auditError(invocation,error);
    throw e;
  }
 finally {
    postAudit(invocation,error);
  }
  return result;
}
Program: 16758
Project: 16758
Buggy source:
/** 
 * Perform audit before method invocation.
 */
protected void preAudit(){
  if (logger.isDebugEnabled()) {
    logger.debug("String_Node_Str",context.toArray());
  }
}

Fixed version (ground truth):
/** 
 * Perform audit before method invocation.
 */
protected void preAudit(MethodInvocation invocation){
  if (this.getTargetLogger(invocation).isDebugEnabled()) {
    this.getTargetLogger(invocation).debug("String_Node_Str",this.getClassName(invocation),this.getMethodCompleteSignature(invocation));
  }
}
Program: 16759
Project: 16759
Buggy source:
/** 
 * Perform audit when an error occured
 */
protected void auditError(){
  Assert.notNull(this.occuredError,"String_Node_Str");
  logger.error("String_Node_Str" + occuredError.getMessage() + "String_Node_Str",context.toArray());
  if (occuredError instanceof ConstraintViolationException) {
    logPreciseContraintViolation((ConstraintViolationException)occuredError);
  }
  logger.error("String_Node_Str",occuredError);
}

Fixed version (ground truth):
/** 
 * Perform audit when an error occured
 */
protected void auditError(MethodInvocation invocation,Throwable error){
  Assert.notNull(error,"String_Node_Str");
  this.getTargetLogger(invocation).error("String_Node_Str" + error.getMessage() + "String_Node_Str",this.getClassName(invocation),this.getMethodCompleteSignature(invocation));
  if (error instanceof ConstraintViolationException) {
    logPreciseContraintViolation((ConstraintViolationException)error,invocation);
  }
  this.getTargetLogger(invocation).error("String_Node_Str",error);
}
Program: 16760
Project: 16760
Buggy source:
/** 
 * {@InheritDoc}
 */
@Override public Long generateIdentifierFromEntity(User entity){
  throw new NoSuchMethodError("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@InheritDoc}
 */
@Override public Long generateIdentifierFromEntity(User entity){
  return entity.getId();
}
Program: 16761
Project: 16761
Buggy source:
/** 
 * {@inheritDoc}
 */
@Auditable public void rebuildIndex(){
  this.dao.rebuildIndex();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void rebuildIndex(){
  this.dao.rebuildIndex();
}
Program: 16762
Project: 16762
Buggy source:
/** 
 * {@inheritDoc}
 */
@Auditable public List<Hotel> find(final String query){
  if (query == null || query.isEmpty()) {
    return this.findAll();
  }
 else {
    Page<Hotel> resultList=this.dao.find(query,null);
    if (resultList != null) {
      return this.dao.find(query,null).asList();
    }
 else {
      return new ArrayList<Hotel>();
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public List<Hotel> find(final String query){
  if (query == null || query.isEmpty()) {
    return this.findAll();
  }
 else {
    Page<Hotel> resultList=this.dao.find(query,null);
    if (resultList != null) {
      return this.dao.find(query,null).asList();
    }
 else {
      return new ArrayList<Hotel>();
    }
  }
}
Program: 16763
Project: 16763
Buggy source:
@Override @Auditable public void rebuildIndex(){
  this.dao.rebuildIndex();
}

Fixed version (ground truth):
@Override public void rebuildIndex(){
  this.dao.rebuildIndex();
}
Program: 16764
Project: 16764
Buggy source:
@Override @Auditable public Page<Poll> find(final String query,final Pageable pageable) throws ServiceException {
  if (query == null || "String_Node_Str".equals(query.trim())) {
    return this.findAll(pageable);
  }
  try {
    return this.dao.find(query,pageable);
  }
 catch (  ParseException ex) {
    throw new ServiceException(ex.getMessage(),ex);
  }
}

Fixed version (ground truth):
@Override public Page<Poll> find(final String query,final Pageable pageable) throws ServiceException {
  if (query == null || "String_Node_Str".equals(query.trim())) {
    return this.findAll(pageable);
  }
  try {
    return this.dao.find(query,pageable);
  }
 catch (  ParseException ex) {
    throw new ServiceException(ex.getMessage(),ex);
  }
}
Program: 16766
Project: 16766
Buggy source:
@Override @Auditable @Transactional(readOnly=false) public void vote(String voterName,Long pid,List<String> values){
  Poll poll=this.pollService.findById(pid);
  Assert.notNull(poll,"String_Node_Str");
  Assert.isTrue(values.size() == poll.getAnswers().size(),"String_Node_Str");
  Voter voter=this.voterDao.findByNameAndPoll(voterName,poll);
  if (voter == null) {
    voter=new Voter();
    voter.setName(voterName);
    voter.setPoll(poll);
    poll.getVoters().add(voter);
    voter=this.voterDao.saveAndFlush(voter);
  }
  for (  Answer answer : voter.getPoll().getAnswers()) {
    Vote vote=new Vote();
    vote.setAnswer(answer);
    vote.setVoter(voter);
    vote.setValue(values.get(answer.getOrder() - 1));
    this.voteDao.saveAndFlush(vote);
  }
}

Fixed version (ground truth):
@Override @Transactional(readOnly=false) public void vote(String voterName,Long pid,List<String> values){
  Poll poll=this.pollService.findById(pid);
  Assert.notNull(poll,"String_Node_Str");
  Assert.isTrue(values.size() == poll.getAnswers().size(),"String_Node_Str");
  Voter voter=this.voterDao.findByNameAndPoll(voterName,poll);
  if (voter == null) {
    voter=new Voter();
    voter.setName(voterName);
    voter.setPoll(poll);
    poll.getVoters().add(voter);
    voter=this.voterDao.saveAndFlush(voter);
  }
  for (  Answer answer : voter.getPoll().getAnswers()) {
    Vote vote=new Vote();
    vote.setAnswer(answer);
    vote.setVoter(voter);
    vote.setValue(values.get(answer.getOrder() - 1));
    this.voteDao.saveAndFlush(vote);
  }
}
Program: 16767
Project: 16767
Buggy source:
@Test public void testFindAll() throws Exception {
  List<T> resourceList=dao.readAll();
  assertTrue("String_Node_Str",resourceList.size() == 1);
}

Fixed version (ground truth):
@Test public void testFindAll() throws Exception {
  List<T> resourceList=dao.readAll();
  assertTrue("String_Node_Str",resourceList.size() >= 1);
}