Program: 135679
Project: 135679
Buggy source:
private Claim dbAuthenticate(PasswordCredentials creds){
  Domain domain=null;
  User user=null;
  String credsDomain=creds.domain() == null ? IIDMStore.DEFAULT_DOMAIN : creds.domain();
  LOG.debug("String_Node_Str");
  try {
    domain=idmStore.readDomain(credsDomain);
    if (domain == null) {
      throw new AuthenticationException("String_Node_Str" + credsDomain + "String_Node_Str");
    }
  }
 catch (  IDMStoreException e) {
    throw new AuthenticationException("String_Node_Str",e);
  }
  try {
    LOG.debug("String_Node_Str");
    Users users=idmStore.getUsers(creds.username(),credsDomain);
    List<User> userList=users.getUsers();
    if (userList.size() == 0) {
      throw new AuthenticationException("String_Node_Str" + creds.username() + "String_Node_Str"+ credsDomain);
    }
    user=userList.get(0);
    if (!SHA256Calculator.getSHA256(creds.password(),user.getSalt()).equals(user.getPassword())) {
      throw new AuthenticationException("String_Node_Str");
    }
    if (!user.isEnabled()) {
      throw new AuthenticationException("String_Node_Str");
    }
    LOG.debug("String_Node_Str");
    List<String> roles=new ArrayList<>();
    Grants grants=idmStore.getGrants(domain.getDomainid(),user.getUserid());
    List<Grant> grantList=grants.getGrants();
    for (int z=0; z < grantList.size(); z++) {
      Grant grant=grantList.get(z);
      Role role=idmStore.readRole(grant.getRoleid());
      if (role != null) {
        roles.add(role.getName());
      }
    }
    LOG.debug("String_Node_Str");
    ClaimBuilder claim=new ClaimBuilder();
    claim.setUserId(user.getUserid().toString());
    claim.setUser(creds.username());
    claim.setDomain(credsDomain);
    for (int z=0; z < roles.size(); z++) {
      claim.addRole(roles.get(z));
    }
    return claim.build();
  }
 catch (  IDMStoreException se) {
    throw new AuthenticationException("String_Node_Str" + se.toString() + se);
  }
}

Fixed version (ground truth):
@Nonnull private Claim dbAuthenticate(PasswordCredentials creds){
  Domain domain=null;
  User user=null;
  String credsDomain=creds.domain() == null ? IIDMStore.DEFAULT_DOMAIN : creds.domain();
  LOG.debug("String_Node_Str");
  try {
    domain=idmStore.readDomain(credsDomain);
    if (domain == null) {
      throw new AuthenticationException("String_Node_Str" + credsDomain + "String_Node_Str");
    }
  }
 catch (  IDMStoreException e) {
    throw new AuthenticationException("String_Node_Str",e);
  }
  try {
    LOG.debug("String_Node_Str");
    Users users=idmStore.getUsers(creds.username(),credsDomain);
    List<User> userList=users.getUsers();
    if (userList.size() == 0) {
      throw new AuthenticationException("String_Node_Str" + creds.username() + "String_Node_Str"+ credsDomain);
    }
    user=userList.get(0);
    if (!SHA256Calculator.getSHA256(creds.password(),user.getSalt()).equals(user.getPassword())) {
      throw new AuthenticationException("String_Node_Str");
    }
    if (!user.isEnabled()) {
      throw new AuthenticationException("String_Node_Str");
    }
    LOG.debug("String_Node_Str");
    List<String> roles=new ArrayList<>();
    Grants grants=idmStore.getGrants(domain.getDomainid(),user.getUserid());
    List<Grant> grantList=grants.getGrants();
    for (int z=0; z < grantList.size(); z++) {
      Grant grant=grantList.get(z);
      Role role=idmStore.readRole(grant.getRoleid());
      if (role != null) {
        roles.add(role.getName());
      }
    }
    LOG.debug("String_Node_Str");
    ClaimBuilder claim=new ClaimBuilder();
    claim.setUserId(user.getUserid());
    claim.setUser(creds.username());
    claim.setDomain(credsDomain);
    for (int z=0; z < roles.size(); z++) {
      claim.addRole(roles.get(z));
    }
    return claim.build();
  }
 catch (  IDMStoreException se) {
    throw new AuthenticationException("String_Node_Str" + se.toString() + se);
  }
}