Program: 31320
Project: 31320
Buggy source:
/** 
 * Test of createAccount method, of class org.owasp.esapi.Authenticator.
 * @throws AuthenticationException the authentication exception
 * @throws EncryptionException
 */
public void testCreateUser() throws AuthenticationException, EncryptionException {
  System.out.println("String_Node_Str");
  String accountName=ESAPI.randomizer().getRandomString(8,DefaultEncoder.CHAR_ALPHANUMERICS);
  Authenticator instance=ESAPI.authenticator();
  String password=instance.generateStrongPassword();
  User user=instance.createUser(accountName,password,password);
  assertTrue(user.verifyPassword(password));
  try {
    instance.createUser(accountName,password,password);
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,DefaultEncoder.CHAR_ALPHANUMERICS),"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,DefaultEncoder.CHAR_ALPHANUMERICS),"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(null,"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,DefaultEncoder.CHAR_ALPHANUMERICS),null,null);
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    String uName="String_Node_Str";
    instance.createUser(uName,uName,uName);
    fail();
  }
 catch (  AuthenticationException e) {
  }
}

Fixed version (ground truth):
/** 
 * Test of createAccount method, of class org.owasp.esapi.Authenticator.
 * @throws AuthenticationException the authentication exception
 * @throws EncryptionException
 */
public void testCreateUser() throws AuthenticationException, EncryptionException {
  System.out.println("String_Node_Str");
  String accountName=ESAPI.randomizer().getRandomString(8,EncoderConstants.CHAR_ALPHANUMERICS);
  Authenticator instance=ESAPI.authenticator();
  String password=instance.generateStrongPassword();
  User user=instance.createUser(accountName,password,password);
  assertTrue(user.verifyPassword(password));
  try {
    instance.createUser(accountName,password,password);
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,EncoderConstants.CHAR_ALPHANUMERICS),"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,EncoderConstants.CHAR_ALPHANUMERICS),"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(null,"String_Node_Str","String_Node_Str");
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    instance.createUser(ESAPI.randomizer().getRandomString(8,EncoderConstants.CHAR_ALPHANUMERICS),null,null);
    fail();
  }
 catch (  AuthenticationException e) {
  }
  try {
    String uName="String_Node_Str";
    instance.createUser(uName,uName,uName);
    fail();
  }
 catch (  AuthenticationException e) {
  }
}