nus-yam/ex-repair huggingface dataset:
Program: 175601
Project: 175601
Buggy source:
private static void init(){
  try {
    ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
    Class<?> brickInitClass=classLoader.loadClass(BrickHolder.class.getPackage().getName() + "String_Node_Str");
    brickInitClass.getMethod("String_Node_Str",Map.class).invoke(null,sBrickBuilders);
    brickInitClass.getMethod("String_Node_Str",Map.class).invoke(null,sBrickEventBinderMap);
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  NoSuchMethodException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void init(){
  try {
    ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
    Class<?> brickInitClass=classLoader.loadClass(BrickHolder.class.getPackage().getName() + "String_Node_Str");
    brickInitClass.getMethod("String_Node_Str",Map.class).invoke(null,sBrickBuilders);
    brickInitClass.getMethod("String_Node_Str",Map.class).invoke(null,sBrickEventBinderMap);
  }
 catch (  ClassNotFoundException e) {
    e.printStackTrace();
  }
catch (  NoSuchMethodException e) {
    e.printStackTrace();
  }
catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
}
Program: 175602
Project: 175602
Buggy source:
protected static Builder builder(){
  return ImmutableColor.builder();
}

Fixed version (ground truth):
private static Builder builder(){
  return ImmutableColor.builder();
}
Program: 175603
Project: 175603
Buggy source:
@Override public final String toString(){
  return value();
}

Fixed version (ground truth):
@Override public String toString(){
  return value;
}
Program: 175604
Project: 175604
Buggy source:
private static void assertValid(Attachment attachment){
  attachment.fields().forEach(FieldTests::assertValid);
  assertFalse(Strings.isNullOrEmpty(attachment.fallback()));
  Optional.ofNullable(attachment.color()).ifPresent(ColorTests::assertValid);
  attachment.pretext().ifPresent(pretext -> assertFalse(Strings.isNullOrEmpty(pretext)));
  Optional.ofNullable(attachment.author()).ifPresent(AuthorTests::assertValid);
  Optional.ofNullable(attachment.title()).ifPresent(TitleTests::assertValid);
  attachment.text().ifPresent(text -> assertFalse(Strings.isNullOrEmpty(text)));
  attachment.imageUrl().ifPresent(imageUrl -> assertFalse(Strings.isNullOrEmpty(imageUrl.toString())));
  attachment.thumbUrl().ifPresent(thumbUrl -> assertFalse(Strings.isNullOrEmpty(thumbUrl.toString())));
  Optional.ofNullable(attachment.footer()).ifPresent(FooterTests::assertValid);
}

Fixed version (ground truth):
public static void assertValid(Attachment attachment){
  attachment.fields().forEach(FieldTests::assertValid);
  assertFalse(Strings.isNullOrEmpty(attachment.fallback()));
  Optional.ofNullable(attachment.color()).ifPresent(ColorTests::assertValid);
  attachment.pretext().ifPresent(pretext -> assertFalse(Strings.isNullOrEmpty(pretext)));
  Optional.ofNullable(attachment.author()).ifPresent(AuthorTests::assertValid);
  Optional.ofNullable(attachment.title()).ifPresent(TitleTests::assertValid);
  attachment.text().ifPresent(text -> assertFalse(Strings.isNullOrEmpty(text)));
  attachment.imageUrl().ifPresent(imageUrl -> assertFalse(Strings.isNullOrEmpty(imageUrl.toString())));
  attachment.thumbUrl().ifPresent(thumbUrl -> assertFalse(Strings.isNullOrEmpty(thumbUrl.toString())));
  Optional.ofNullable(attachment.footer()).ifPresent(FooterTests::assertValid);
}
Program: 175605
Project: 175605
Buggy source:
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesDeserializer.deserialize(Attachment.class,RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}

Fixed version (ground truth):
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}
Program: 175606
Project: 175606
Buggy source:
@ParameterizedTest @ArgumentsSource(SerializedAttachmentsProvider.class) void testDeserialization(Attachment attachment){
  assertValid(attachment);
}

Fixed version (ground truth):
@ParameterizedTest @ArgumentsSource(SerializedAttachmentsProvider.class) void testDeserialization(JsonNode json){
  MoreAssertions.assertSerializable(json,Attachment.class,AttachmentTests::assertValid);
}
Program: 175607
Project: 175607
Buggy source:
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesDeserializer.deserialize(Author.class,RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}

Fixed version (ground truth):
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}
Program: 175608
Project: 175608
Buggy source:
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesDeserializer.deserialize(Color.class,RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}

Fixed version (ground truth):
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}
Program: 175609
Project: 175609
Buggy source:
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesDeserializer.deserialize(Field.class,RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}

Fixed version (ground truth):
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}
Program: 175610
Project: 175610
Buggy source:
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesDeserializer.deserialize(Footer.class,RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}

Fixed version (ground truth):
@Override public Stream<? extends Arguments> arguments(ContainerExtensionContext context) throws Exception {
  return ResourcesReader.readJson(RESOURCES_DIRECTORY).map(ObjectArrayArguments::create);
}
Program: 175611
Project: 175611
Buggy source:
@ParameterizedTest @ArgumentsSource(SerializedFootersProvider.class) void testDeserialization(Footer footer){
  assertValid(footer);
}

Fixed version (ground truth):
@ParameterizedTest @ArgumentsSource(SerializedFootersProvider.class) void testDeserialization(JsonNode json){
  MoreAssertions.assertSerializable(json,Footer.class,FooterTests::assertValid);
}
Program: 175612
Project: 175612
Buggy source:
public Single<Response<ResponseBody>> downloadWmRelease(final int id,Context context){
  final WhatManagerService wm=WhatManagerService.Creator.newWMApiService(mPreferencesHelper.getWmHost(),context);
  return wm.login(mPreferencesHelper.getWmUser(),mPreferencesHelper.getWmPassword()).flatMap(new Function<Response<ResponseBody>,Single<Response<ResponseBody>>>(){
    @Override public Single<Response<ResponseBody>> apply(    Response<ResponseBody> response) throws Exception {
      return wm.addTorrent(id);
    }
  }
);
}

Fixed version (ground truth):
public Single<Response<ResponseBody>> downloadWmRelease(final int id,Context context){
  try {
    final WhatManagerService wm=WhatManagerService.Creator.newWMApiService(mPreferencesHelper.getWmHost(),context);
    return wm.login(mPreferencesHelper.getWmUser(),mPreferencesHelper.getWmPassword()).flatMap(new Function<Response<ResponseBody>,Single<Response<ResponseBody>>>(){
      @Override public Single<Response<ResponseBody>> apply(      Response<ResponseBody> response) throws Exception {
        return wm.addTorrent(id);
      }
    }
);
  }
 catch (  IllegalArgumentException e) {
    return Single.error(new Exception("String_Node_Str"));
  }
}
Program: 175613
Project: 175613
Buggy source:
@Override public void showSendToServerComplete(){
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
}

Fixed version (ground truth):
@Override public void showSendToServerComplete(){
  Snackbar.make(getCurrentFocus(),"String_Node_Str",Snackbar.LENGTH_LONG).show();
}
Program: 175614
Project: 175614
Buggy source:
@Override public void showError(String message){
}

Fixed version (ground truth):
@Override public void showError(String message){
  Snackbar.make(getCurrentFocus(),message,Snackbar.LENGTH_LONG).show();
}
Program: 175615
Project: 175615
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == 0) {
    if (resultCode == RESULT_OK) {
      mThreadPresenter.loadPosts(topicId,null,forumNav.getCurrentPageNumber());
      mPostRecycler.smoothScrollToPosition(mPostRecycler.getAdapter().getItemCount());
    }
 else {
    }
    fab.show();
  }
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == 0) {
    if (resultCode == RESULT_OK) {
      mThreadPresenter.addPost(data.getStringExtra("String_Node_Str"),forumId,topicId);
    }
 else {
    }
    fab.show();
  }
}
Program: 175617
Project: 175617
Buggy source:
long crypto_box_noncebytes();

Fixed version (ground truth):
NativeLong crypto_box_noncebytes();
Program: 175618
Project: 175618
Buggy source:
public static long crytoBoxPublicKeyBytes(){
  return sodium().crypto_box_publickeybytes();
}

Fixed version (ground truth):
public static NativeLong crytoBoxPublicKeyBytes(){
  return sodium().crypto_box_publickeybytes();
}
Program: 175619
Project: 175619
Buggy source:
/** 
 * Verify message authentication code with the secret key
 * @param mac Message authentication code
 * @param message The message
 * @param key The secret key used to create the authentication code
 * @return true or false
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/secret-key_authentication.html" target="_blank">Secret-key authentication</a>
 */
public static boolean cryptoAuthVerify(byte[] mac,byte[] message,byte[] key) throws SodiumLibraryException {
  long keySize=sodium().crypto_auth_keybytes();
  if (key.length != keySize) {
    throw new SodiumLibraryException("String_Node_Str" + keySize + "String_Node_Str"+ key.length+ "String_Node_Str");
  }
  int rc=sodium().crypto_auth_verify(mac,message,message.length,key);
  if (rc == 0) {
    return true;
  }
 else   if (rc == -1) {
    return false;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Verify message authentication code with the secret key
 * @param mac Message authentication code
 * @param message The message
 * @param key The secret key used to create the authentication code
 * @return true or false
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/secret-key_authentication.html" target="_blank">Secret-key authentication</a>
 */
public static boolean cryptoAuthVerify(byte[] mac,byte[] message,byte[] key) throws SodiumLibraryException {
  int keySize=sodium().crypto_auth_keybytes().intValue();
  if (key.length != keySize) {
    throw new SodiumLibraryException("String_Node_Str" + keySize + "String_Node_Str"+ key.length+ "String_Node_Str");
  }
  int rc=sodium().crypto_auth_verify(mac,message,message.length,key);
  if (rc == 0) {
    return true;
  }
 else   if (rc == -1) {
    return false;
  }
  return false;
}
Program: 175620
Project: 175620
Buggy source:
/** 
 * Given a private key, generate the corresponding public key
 * @param privateKey The private key
 * @throws SodiumLibraryException on error
 * @return public key bytes
 */
public static byte[] cryptoPublicKey(byte[] privateKey) throws SodiumLibraryException {
  byte[] publicKey=new byte[(int)sodium().crypto_box_publickeybytes()];
  int rc=sodium().crypto_scalarmult_base(publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return publicKey;
}

Fixed version (ground truth):
/** 
 * Given a private key, generate the corresponding public key
 * @param privateKey The private key
 * @throws SodiumLibraryException on error
 * @return public key bytes
 */
public static byte[] cryptoPublicKey(byte[] privateKey) throws SodiumLibraryException {
  byte[] publicKey=new byte[sodium().crypto_box_publickeybytes().intValue()];
  int rc=sodium().crypto_scalarmult_base(publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return publicKey;
}
Program: 175621
Project: 175621
Buggy source:
public static long cryptoSecretBoxKeyBytes(){
  return sodium().crypto_secretbox_keybytes();
}

Fixed version (ground truth):
public static NativeLong cryptoSecretBoxKeyBytes(){
  return sodium().crypto_secretbox_keybytes();
}
Program: 175622
Project: 175622
Buggy source:
public static long crytoBoxSeedBytes(){
  return sodium().crypto_box_seedbytes();
}

Fixed version (ground truth):
public static NativeLong crytoBoxSeedBytes(){
  return sodium().crypto_box_seedbytes();
}
Program: 175623
Project: 175623
Buggy source:
long crypto_auth_keybytes();

Fixed version (ground truth):
NativeLong crypto_auth_keybytes();
Program: 175624
Project: 175624
Buggy source:
/** 
 * Verifies and decrypts a ciphertext - detached mode
 * @param secretBox {@link SodiumSecretBox} used during encryption
 * @param nonce Nonce used in encryption
 * @param key The key used in encryption
 * @return decrypted plaintext bytes
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static byte[] cryptoSecretBoxOpenDetached(SodiumSecretBox secretBox,byte[] nonce,byte[] key) throws SodiumLibraryException {
  if (key.length != sodium().crypto_secretbox_keybytes()) {
    throw new SodiumLibraryException("String_Node_Str" + key.length + "String_Node_Str");
  }
  if (nonce.length != sodium().crypto_secretbox_noncebytes()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str");
  }
  byte[] mac=secretBox.getMac();
  if (mac.length != sodium().crypto_secretbox_macbytes()) {
    throw new SodiumLibraryException("String_Node_Str" + mac.length + "String_Node_Str");
  }
  byte[] message=new byte[secretBox.getCipherText().length];
  byte[] cipherText=secretBox.getCipherText();
  int rc=sodium().crypto_secretbox_open_detached(message,cipherText,mac,cipherText.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return message;
}

Fixed version (ground truth):
/** 
 * Verifies and decrypts a ciphertext - detached mode
 * @param secretBox {@link SodiumSecretBox} used during encryption
 * @param nonce Nonce used in encryption
 * @param key The key used in encryption
 * @return decrypted plaintext bytes
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static byte[] cryptoSecretBoxOpenDetached(SodiumSecretBox secretBox,byte[] nonce,byte[] key) throws SodiumLibraryException {
  if (key.length != sodium().crypto_secretbox_keybytes().intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + key.length + "String_Node_Str");
  }
  if (nonce.length != sodium().crypto_secretbox_noncebytes().intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str");
  }
  byte[] mac=secretBox.getMac();
  if (mac.length != sodium().crypto_secretbox_macbytes().intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + mac.length + "String_Node_Str");
  }
  byte[] message=new byte[secretBox.getCipherText().length];
  byte[] cipherText=secretBox.getCipherText();
  int rc=sodium().crypto_secretbox_open_detached(message,cipherText,mac,cipherText.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return message;
}
Program: 175625
Project: 175625
Buggy source:
/** 
 * Computes an authentication tag for a message with a secret key.  The operation does not encrypt the message.  Usage: Alice prepares a message and the authentication tag and send it to Bob. Alice does not store the message. Later Bob sends the message and the authentication tag to Alice. Alice calls   {@link SodiumLibrary#cryptoAuthVerify(byte[] mac,byte[] message,byte[] key)}verify that the message is created by her.
 * @param message Computes the tag for this message bytes
 * @param key The secret key. The key size must be crypto_auth_keybytes() long
 * @return Authentication tag bytes
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/secret-key_authentication.html" target="_blank">Secret-key authentication</a>
 */
public static byte[] cryptoAuth(byte[] message,byte[] key) throws SodiumLibraryException {
  byte[] mac=new byte[(int)sodium().crypto_auth_bytes()];
  long keySize=sodium().crypto_auth_keybytes();
  if (key.length != keySize) {
    throw new SodiumLibraryException("String_Node_Str" + keySize + "String_Node_Str"+ key.length+ "String_Node_Str");
  }
  int rc=sodium().crypto_auth(mac,message,message.length,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return mac;
}

Fixed version (ground truth):
/** 
 * Computes an authentication tag for a message with a secret key.  The operation does not encrypt the message.  Usage: Alice prepares a message and the authentication tag and send it to Bob. Alice does not store the message. Later Bob sends the message and the authentication tag to Alice. Alice calls   {@link SodiumLibrary#cryptoAuthVerify(byte[] mac,byte[] message,byte[] key)}verify that the message is created by her.
 * @param message Computes the tag for this message bytes
 * @param key The secret key. The key size must be crypto_auth_keybytes() long
 * @return Authentication tag bytes
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/secret-key_authentication.html" target="_blank">Secret-key authentication</a>
 */
public static byte[] cryptoAuth(byte[] message,byte[] key) throws SodiumLibraryException {
  byte[] mac=new byte[sodium().crypto_auth_bytes().intValue()];
  int keySize=sodium().crypto_auth_keybytes().intValue();
  if (key.length != keySize) {
    throw new SodiumLibraryException("String_Node_Str" + keySize + "String_Node_Str"+ key.length+ "String_Node_Str");
  }
  int rc=sodium().crypto_auth(mac,message,message.length,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return mac;
}
Program: 175626
Project: 175626
Buggy source:
public static long cryptoBoxNonceBytes(){
  return sodium().crypto_box_noncebytes();
}

Fixed version (ground truth):
public static NativeLong cryptoBoxNonceBytes(){
  return sodium().crypto_box_noncebytes();
}
Program: 175627
Project: 175627
Buggy source:
/** 
 * Encrypts a message with recipient's public key. Usage: Alice encrypts a message with Bob's public key and creates authentication tag with her private key
 * @param message The message to encrypt
 * @param nonce {@link SodiumLibrary#cryptoBoxNonceBytes()} bytes of nonce. It must be preserved  because it will be needed during decryption
 * @param publicKey Recipient's public key for encrypting the message
 * @param privateKey Sender's private key for creating authentication tag
 * @throws SodiumLibraryException on error
 * @return encrypted message as an array of bytes
 */
public static byte[] cryptoBoxEasy(byte[] message,byte[] nonce,byte[] publicKey,byte[] privateKey) throws SodiumLibraryException {
  long nonce_len=sodium().crypto_box_noncebytes();
  if (nonce.length != nonce_len) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_len+ "String_Node_Str");
  }
  byte[] cipherText=new byte[(int)(sodium().crypto_box_macbytes() + message.length)];
  int rc=sodium().crypto_box_easy(cipherText,message,message.length,nonce,publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}

Fixed version (ground truth):
/** 
 * Encrypts a message with recipient's public key. Usage: Alice encrypts a message with Bob's public key and creates authentication tag with her private key
 * @param message The message to encrypt
 * @param nonce {@link SodiumLibrary#cryptoBoxNonceBytes()} bytes of nonce. It must be preserved  because it will be needed during decryption
 * @param publicKey Recipient's public key for encrypting the message
 * @param privateKey Sender's private key for creating authentication tag
 * @throws SodiumLibraryException on error
 * @return encrypted message as an array of bytes
 */
public static byte[] cryptoBoxEasy(byte[] message,byte[] nonce,byte[] publicKey,byte[] privateKey) throws SodiumLibraryException {
  NativeLong nonce_len=sodium().crypto_box_noncebytes();
  if (nonce.length != nonce_len.intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_len+ "String_Node_Str");
  }
  byte[] cipherText=new byte[(sodium().crypto_box_macbytes().intValue() + message.length)];
  int rc=sodium().crypto_box_easy(cipherText,message,message.length,nonce,publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}
Program: 175628
Project: 175628
Buggy source:
/** 
 * Encrypts a message with recipient's public key. Usage: Alice can anonymously send a message to Bob by encrypting the message with his public key.
 * @param message The message bytes to encrypt
 * @param recipientPublicKey Recipient's public key 
 * @throws SodiumLibraryException on error
 * @return Encrypted message bytes. The length of the cipher text will be {@link SodiumLibrary#cryptoBoxSealBytes()} + message.length
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/sealed_boxes.html" target="_blank">Sealed boxes</a>
 */
public static byte[] cryptoBoxSeal(byte[] message,byte[] recipientPublicKey) throws SodiumLibraryException {
  logger.info("String_Node_Str" + message.length);
  byte[] cipherText=new byte[(int)(sodium().crypto_box_sealbytes() + message.length)];
  int rc=sodium().crypto_box_seal(cipherText,message,message.length,recipientPublicKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}

Fixed version (ground truth):
/** 
 * Encrypts a message with recipient's public key. Usage: Alice can anonymously send a message to Bob by encrypting the message with his public key.
 * @param message The message bytes to encrypt
 * @param recipientPublicKey Recipient's public key 
 * @throws SodiumLibraryException on error
 * @return Encrypted message bytes. The length of the cipher text will be {@link SodiumLibrary#cryptoBoxSealBytes()} + message.length
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/sealed_boxes.html" target="_blank">Sealed boxes</a>
 */
public static byte[] cryptoBoxSeal(byte[] message,byte[] recipientPublicKey) throws SodiumLibraryException {
  logger.info("String_Node_Str" + message.length);
  byte[] cipherText=new byte[(sodium().crypto_box_sealbytes().intValue() + message.length)];
  int rc=sodium().crypto_box_seal(cipherText,message,message.length,recipientPublicKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}
Program: 175629
Project: 175629
Buggy source:
/** 
 * Decrypts a ciphertext using recipient's  key pair. Only the recipient can decrypt the message with his private key but the recipient can not identify the sender.
 * @param cipherText Ciphertext to decrypt
 * @param pk Recipient's public key
 * @param sk Recipient's private Key
 * @throws SodiumLibraryException on error
 * @return Decrypted plaintext bytes. 
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/sealed_boxes.html" target="_blank">Sealed boxes</a>
 */
public static byte[] cryptoBoxSealOpen(byte[] cipherText,byte[] pk,byte[] sk) throws SodiumLibraryException {
  byte[] decrypted=new byte[(int)(cipherText.length - sodium().crypto_box_sealbytes())];
  int rc=sodium().crypto_box_seal_open(decrypted,cipherText,cipherText.length,pk,sk);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return decrypted;
}

Fixed version (ground truth):
/** 
 * Decrypts a ciphertext using recipient's  key pair. Only the recipient can decrypt the message with his private key but the recipient can not identify the sender.
 * @param cipherText Ciphertext to decrypt
 * @param pk Recipient's public key
 * @param sk Recipient's private Key
 * @throws SodiumLibraryException on error
 * @return Decrypted plaintext bytes. 
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/sealed_boxes.html" target="_blank">Sealed boxes</a>
 */
public static byte[] cryptoBoxSealOpen(byte[] cipherText,byte[] pk,byte[] sk) throws SodiumLibraryException {
  byte[] decrypted=new byte[(int)(cipherText.length - sodium().crypto_box_sealbytes().intValue())];
  int rc=sodium().crypto_box_seal_open(decrypted,cipherText,cipherText.length,pk,sk);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return decrypted;
}
Program: 175630
Project: 175630
Buggy source:
long crypto_box_publickeybytes();

Fixed version (ground truth):
NativeLong crypto_box_publickeybytes();
Program: 175631
Project: 175631
Buggy source:
long crypto_auth_bytes();

Fixed version (ground truth):
NativeLong crypto_auth_bytes();
Program: 175632
Project: 175632
Buggy source:
public static long cryptoBoxSealBytes(){
  return sodium().crypto_box_sealbytes();
}

Fixed version (ground truth):
public static NativeLong cryptoBoxSealBytes(){
  return sodium().crypto_box_sealbytes();
}
Program: 175633
Project: 175633
Buggy source:
long crypto_secretbox_macbytes();

Fixed version (ground truth):
NativeLong crypto_secretbox_macbytes();
Program: 175634
Project: 175634
Buggy source:
long crypto_box_secretkeybytes();

Fixed version (ground truth):
NativeLong crypto_box_secretkeybytes();
Program: 175635
Project: 175635
Buggy source:
/** 
 * Encrypts a message with a key and a nonce to keep it confidential - detached mode.
 * @param message The message bytes to encrypt
 * @param nonce The nonce to use in encryption
 * @param key The key to encrypt
 * @return {@link SodiumSecretBox}
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static SodiumSecretBox cryptoSecretBoxDetached(byte[] message,byte[] nonce,byte[] key) throws SodiumLibraryException {
  if (key.length != sodium().crypto_secretbox_keybytes()) {
    throw new SodiumLibraryException("String_Node_Str" + key.length + "String_Node_Str");
  }
  if (nonce.length != sodium().crypto_secretbox_noncebytes()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str");
  }
  byte[] cipherText=new byte[message.length];
  byte[] mac=new byte[(int)sodium().crypto_secretbox_macbytes()];
  int rc=sodium().crypto_secretbox_detached(cipherText,mac,message,message.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  SodiumSecretBox secretBox=new SodiumSecretBox();
  secretBox.setCipherText(cipherText);
  secretBox.setMac(mac);
  return secretBox;
}

Fixed version (ground truth):
/** 
 * Encrypts a message with a key and a nonce to keep it confidential - detached mode.
 * @param message The message bytes to encrypt
 * @param nonce The nonce to use in encryption
 * @param key The key to encrypt
 * @return {@link SodiumSecretBox}
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static SodiumSecretBox cryptoSecretBoxDetached(byte[] message,byte[] nonce,byte[] key) throws SodiumLibraryException {
  if (key.length != sodium().crypto_secretbox_keybytes().intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + key.length + "String_Node_Str");
  }
  if (nonce.length != sodium().crypto_secretbox_noncebytes().intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str");
  }
  byte[] cipherText=new byte[message.length];
  byte[] mac=new byte[(int)sodium().crypto_secretbox_macbytes().intValue()];
  int rc=sodium().crypto_secretbox_detached(cipherText,mac,message,message.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  SodiumSecretBox secretBox=new SodiumSecretBox();
  secretBox.setCipherText(cipherText);
  secretBox.setMac(mac);
  return secretBox;
}
Program: 175636
Project: 175636
Buggy source:
public static long crytoBoxSecretKeyBytes(){
  return sodium().crypto_box_secretkeybytes();
}

Fixed version (ground truth):
public static NativeLong crytoBoxSecretKeyBytes(){
  return sodium().crypto_box_secretkeybytes();
}
Program: 175637
Project: 175637
Buggy source:
/** 
 * Encrypts a message with a key and a nonce to keep it confidential. The same key is used to encrypt and decrypt the messages. Therefore, the key must be kept confidential.
 * @param message message bytes to encrypt
 * @param nonce  nonce bytes. The nonce must be {@link SodiumLibrary#cryptoBoxNonceBytes()} bytes long and can be generated bycalling  {@link SodiumLibrary#randomBytes(int)}
 * @param key They key for encryption
 * @throws SodiumLibraryException on error
 * @return Encrypted cipher text bytes 
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static byte[] cryptoSecretBoxEasy(byte[] message,byte[] nonce,byte[] key) throws SodiumLibraryException {
  long nonce_length=sodium().crypto_secretbox_noncebytes();
  if (nonce_length != nonce.length) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_length+ "String_Node_Str");
  }
  byte[] cipherText=new byte[(int)(sodium().crypto_box_macbytes() + message.length)];
  int rc=sodium().crypto_secretbox_easy(cipherText,message,message.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}

Fixed version (ground truth):
/** 
 * Encrypts a message with a key and a nonce to keep it confidential. The same key is used to encrypt and decrypt the messages. Therefore, the key must be kept confidential.
 * @param message message bytes to encrypt
 * @param nonce  nonce bytes. The nonce must be {@link SodiumLibrary#cryptoBoxNonceBytes()} bytes long and can be generated bycalling  {@link SodiumLibrary#randomBytes(int)}
 * @param key They key for encryption
 * @throws SodiumLibraryException on error
 * @return Encrypted cipher text bytes 
 * @see <a href="https://download.libsodium.org/libsodium/content/secret-key_cryptography/authenticated_encryption.html" target="_blank">Secret-key authenticated encryption</a>
 */
public static byte[] cryptoSecretBoxEasy(byte[] message,byte[] nonce,byte[] key) throws SodiumLibraryException {
  int nonce_length=sodium().crypto_secretbox_noncebytes().intValue();
  if (nonce_length != nonce.length) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_length+ "String_Node_Str");
  }
  byte[] cipherText=new byte[(sodium().crypto_box_macbytes().intValue() + message.length)];
  int rc=sodium().crypto_secretbox_easy(cipherText,message,message.length,nonce,key);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return cipherText;
}
Program: 175638
Project: 175638
Buggy source:
long crypto_secretbox_noncebytes();

Fixed version (ground truth):
NativeLong crypto_secretbox_noncebytes();
Program: 175639
Project: 175639
Buggy source:
/** 
 * Randomly generates a private key and the corresponding public key
 * @return {@link SodiumKeyPair}
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/authenticated_encryption.html" target="_blank">Public-key authenticated encryption</a>
 */
public static SodiumKeyPair cryptoBoxKeyPair() throws SodiumLibraryException {
  SodiumKeyPair kp=new SodiumKeyPair();
  byte[] publicKey=new byte[(int)sodium().crypto_box_publickeybytes()];
  byte[] privateKey=new byte[(int)sodium().crypto_box_secretkeybytes()];
  int rc=sodium().crypto_box_keypair(publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  kp.setPublicKey(publicKey);
  kp.setPrivateKey(privateKey);
  logger.info("String_Node_Str" + publicKey.length);
  logger.info("String_Node_Str" + privateKey.length);
  return kp;
}

Fixed version (ground truth):
/** 
 * Randomly generates a private key and the corresponding public key
 * @return {@link SodiumKeyPair}
 * @throws SodiumLibraryException on error
 * @see <a href="https://download.libsodium.org/libsodium/content/public-key_cryptography/authenticated_encryption.html" target="_blank">Public-key authenticated encryption</a>
 */
public static SodiumKeyPair cryptoBoxKeyPair() throws SodiumLibraryException {
  SodiumKeyPair kp=new SodiumKeyPair();
  byte[] publicKey=new byte[sodium().crypto_box_publickeybytes().intValue()];
  byte[] privateKey=new byte[sodium().crypto_box_secretkeybytes().intValue()];
  int rc=sodium().crypto_box_keypair(publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  kp.setPublicKey(publicKey);
  kp.setPrivateKey(privateKey);
  logger.info("String_Node_Str" + publicKey.length);
  logger.info("String_Node_Str" + privateKey.length);
  return kp;
}
Program: 175641
Project: 175641
Buggy source:
public static byte[] cryptoSignEdSkTOcurveSk(byte[] edSK) throws SodiumLibraryException {
  byte[] curveSK=new byte[(int)sodium().crypto_box_publickeybytes()];
  int rc=sodium().crypto_sign_ed25519_sk_to_curve25519(curveSK,edSK);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return curveSK;
}

Fixed version (ground truth):
public static byte[] cryptoSignEdSkTOcurveSk(byte[] edSK) throws SodiumLibraryException {
  byte[] curveSK=new byte[sodium().crypto_box_publickeybytes().intValue()];
  int rc=sodium().crypto_sign_ed25519_sk_to_curve25519(curveSK,edSK);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return curveSK;
}
Program: 175642
Project: 175642
Buggy source:
public static long cryptoBoxMacBytes(){
  return sodium().crypto_box_macbytes();
}

Fixed version (ground truth):
public static NativeLong cryptoBoxMacBytes(){
  return sodium().crypto_box_macbytes();
}
Program: 175644
Project: 175644
Buggy source:
long crypto_box_seedbytes();

Fixed version (ground truth):
NativeLong crypto_box_seedbytes();
Program: 175645
Project: 175645
Buggy source:
/** 
 * Recipient decrypts a message with his private key. Usage: Bob (recipient) verifies the message with Alice's (sender) public key and  decrypts the message with his private key.
 * @param cipherText Message to decrypt
 * @param nonce Nonce used during encryption 
 * @param publicKey Sender's (Alice) public key for verifying the message
 * @param privateKey Recipient's (Bob)  Private key to decrypt the message
 * @throws SodiumLibraryException on error
 * @return Decrypted message as an array of bytes.
 */
public static byte[] cryptoBoxOpenEasy(byte[] cipherText,byte[] nonce,byte[] publicKey,byte[] privateKey) throws SodiumLibraryException {
  long nonce_len=sodium().crypto_box_noncebytes();
  if (nonce.length != nonce_len) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_len+ "String_Node_Str");
  }
  byte[] decrypted=new byte[(int)(cipherText.length - sodium().crypto_box_macbytes())];
  int rc=sodium().crypto_box_open_easy(decrypted,cipherText,cipherText.length,nonce,publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return decrypted;
}

Fixed version (ground truth):
/** 
 * Recipient decrypts a message with his private key. Usage: Bob (recipient) verifies the message with Alice's (sender) public key and  decrypts the message with his private key.
 * @param cipherText Message to decrypt
 * @param nonce Nonce used during encryption 
 * @param publicKey Sender's (Alice) public key for verifying the message
 * @param privateKey Recipient's (Bob)  Private key to decrypt the message
 * @throws SodiumLibraryException on error
 * @return Decrypted message as an array of bytes.
 */
public static byte[] cryptoBoxOpenEasy(byte[] cipherText,byte[] nonce,byte[] publicKey,byte[] privateKey) throws SodiumLibraryException {
  NativeLong nonce_len=sodium().crypto_box_noncebytes();
  if (nonce.length != nonce_len.intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + nonce.length + "String_Node_Str"+ nonce_len+ "String_Node_Str");
  }
  byte[] decrypted=new byte[(int)(cipherText.length - sodium().crypto_box_macbytes().intValue())];
  int rc=sodium().crypto_box_open_easy(decrypted,cipherText,cipherText.length,nonce,publicKey,privateKey);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return decrypted;
}
Program: 175646
Project: 175646
Buggy source:
long crypto_box_sealbytes();

Fixed version (ground truth):
NativeLong crypto_box_sealbytes();
Program: 175647
Project: 175647
Buggy source:
public static byte[] cryptoPwhashScryptSalsa208Sha256(byte[] passwd,byte[] salt,Long opsLimit,NativeLong memLimit) throws SodiumLibraryException {
  long salt_length=sodium().crypto_pwhash_scryptsalsa208sha256_saltbytes();
  if (salt.length != salt_length) {
    throw new SodiumLibraryException("String_Node_Str" + salt.length + "String_Node_Str"+ salt_length+ "String_Node_Str");
  }
  byte[] key=new byte[(int)sodium().crypto_box_seedbytes()];
  int rc=sodium().crypto_pwhash_scryptsalsa208sha256(key,key.length,passwd,passwd.length,salt,opsLimit,memLimit);
  logger.info("String_Node_Str" + rc);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return key;
}

Fixed version (ground truth):
public static byte[] cryptoPwhashScryptSalsa208Sha256(byte[] passwd,byte[] salt,Long opsLimit,NativeLong memLimit) throws SodiumLibraryException {
  NativeLong salt_length=sodium().crypto_pwhash_scryptsalsa208sha256_saltbytes();
  if (salt.length != salt_length.intValue()) {
    throw new SodiumLibraryException("String_Node_Str" + salt.length + "String_Node_Str"+ salt_length+ "String_Node_Str");
  }
  byte[] key=new byte[sodium().crypto_box_seedbytes().intValue()];
  int rc=sodium().crypto_pwhash_scryptsalsa208sha256(key,key.length,passwd,passwd.length,salt,opsLimit,memLimit);
  logger.info("String_Node_Str" + rc);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return key;
}
Program: 175648
Project: 175648
Buggy source:
public static long cryptoPwHashScryptSalsa208Sha256SaltBytes(){
  return sodium().crypto_pwhash_scryptsalsa208sha256_saltbytes();
}

Fixed version (ground truth):
public static NativeLong cryptoPwHashScryptSalsa208Sha256SaltBytes(){
  return sodium().crypto_pwhash_scryptsalsa208sha256_saltbytes();
}
Program: 175649
Project: 175649
Buggy source:
public static long cryptoSecretBoxNonceBytes(){
  return sodium().crypto_secretbox_noncebytes();
}

Fixed version (ground truth):
public static NativeLong cryptoSecretBoxNonceBytes(){
  return sodium().crypto_secretbox_noncebytes();
}
Program: 175650
Project: 175650
Buggy source:
long crypto_secretbox_keybytes();

Fixed version (ground truth):
NativeLong crypto_secretbox_keybytes();
Program: 175651
Project: 175651
Buggy source:
long crypto_pwhash_scryptsalsa208sha256_saltbytes();

Fixed version (ground truth):
NativeLong crypto_pwhash_scryptsalsa208sha256_saltbytes();
Program: 175652
Project: 175652
Buggy source:
public static long cryptoSecretBoxMacBytes(){
  return sodium().crypto_secretbox_macbytes();
}

Fixed version (ground truth):
public static NativeLong cryptoSecretBoxMacBytes(){
  return sodium().crypto_secretbox_macbytes();
}
Program: 175654
Project: 175654
Buggy source:
public static byte[] cryptoSignEdPkTOcurvePk(byte[] edPK) throws SodiumLibraryException {
  byte[] curvePK=new byte[(int)sodium().crypto_box_publickeybytes()];
  int rc=sodium().crypto_sign_ed25519_pk_to_curve25519(curvePK,edPK);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return curvePK;
}

Fixed version (ground truth):
public static byte[] cryptoSignEdPkTOcurvePk(byte[] edPK) throws SodiumLibraryException {
  byte[] curvePK=new byte[sodium().crypto_box_publickeybytes().intValue()];
  int rc=sodium().crypto_sign_ed25519_pk_to_curve25519(curvePK,edPK);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return curvePK;
}
Program: 175655
Project: 175655
Buggy source:
public static byte[] cryptoPwhash(byte[] passwd,byte[] salt,long opsLimit,NativeLong memLimit,int algorithm) throws SodiumLibraryException {
  byte[] key=new byte[(int)sodium().crypto_box_seedbytes()];
  logger.info("String_Node_Str" + NativeLong.SIZE * 8 + "String_Node_Str");
  int rc=sodium().crypto_pwhash(key,key.length,passwd,passwd.length,salt,opsLimit,memLimit,algorithm);
  logger.info("String_Node_Str" + rc);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return key;
}

Fixed version (ground truth):
public static byte[] cryptoPwhash(byte[] passwd,byte[] salt,long opsLimit,NativeLong memLimit,int algorithm) throws SodiumLibraryException {
  byte[] key=new byte[sodium().crypto_box_seedbytes().intValue()];
  logger.info("String_Node_Str" + NativeLong.SIZE * 8 + "String_Node_Str");
  int rc=sodium().crypto_pwhash(key,key.length,passwd,passwd.length,salt,opsLimit,memLimit,algorithm);
  logger.info("String_Node_Str" + rc);
  if (rc != 0) {
    throw new SodiumLibraryException("String_Node_Str" + rc + "String_Node_Str");
  }
  return key;
}
Program: 175656
Project: 175656
Buggy source:
long crypto_box_macbytes();

Fixed version (ground truth):
NativeLong crypto_box_macbytes();
Program: 175657
Project: 175657
Buggy source:
protected boolean isAccountLocked(String userid){
  if (userid == null) {
    return false;
  }
  User admin=userLoginHistory.get(userid);
  return admin != null && admin.getLoginFailedCount() == accountLockCount && (new Date().getTime() - admin.getLastLoginFailedTime().getTime() < accountLockTime);
}

Fixed version (ground truth):
protected boolean isAccountLocked(String userid){
  if (userid == null) {
    return false;
  }
  User admin=userLoginHistory.get(userid);
  return admin != null && admin.getLoginFailedCount() >= accountLockCount && (new Date().getTime() - admin.getLastLoginFailedTime().getTime() < accountLockTime);
}
Program: 175658
Project: 175658
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public ModelAndView doPost(ModelAndView mav,HttpServletRequest req,HttpServletResponse res,Locale locale) throws IOException {
  String userid=StringUtils.trim(req.getParameter("String_Node_Str"));
  String password=StringUtils.trim(req.getParameter("String_Node_Str"));
  HttpSession session=req.getSession(true);
  if (isAccountLocked(userid)) {
    session.setAttribute("String_Node_Str","String_Node_Str");
    res.sendRedirect("String_Node_Str");
  }
 else   if (authUser(userid,password)) {
    resetAccountLock(userid);
    session.setAttribute("String_Node_Str","String_Node_Str");
    session.setAttribute("String_Node_Str",userid);
    String target=(String)session.getAttribute("String_Node_Str");
    if (target == null) {
      res.sendRedirect("String_Node_Str");
    }
 else {
      session.removeAttribute("String_Node_Str");
      res.sendRedirect(target);
    }
  }
 else {
    incrementAccountLockNum(userid);
    session.setAttribute("String_Node_Str","String_Node_Str");
    return doGet(mav,req,res,locale);
  }
  return null;
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public ModelAndView doPost(ModelAndView mav,HttpServletRequest req,HttpServletResponse res,Locale locale) throws IOException {
  String userid=StringUtils.trim(req.getParameter("String_Node_Str"));
  String password=StringUtils.trim(req.getParameter("String_Node_Str"));
  HttpSession session=req.getSession(true);
  if (isAccountLocked(userid)) {
    session.setAttribute("String_Node_Str",msg.getMessage("String_Node_Str",null,locale));
  }
 else   if (authUser(userid,password)) {
    resetAccountLock(userid);
    session.setAttribute("String_Node_Str","String_Node_Str");
    session.setAttribute("String_Node_Str",userid);
    String target=(String)session.getAttribute("String_Node_Str");
    if (target == null) {
      res.sendRedirect("String_Node_Str");
      return null;
    }
 else {
      session.removeAttribute("String_Node_Str");
      res.sendRedirect(target);
      return null;
    }
  }
 else {
    session.setAttribute("String_Node_Str",msg.getMessage("String_Node_Str",null,locale));
  }
  incrementLoginFailedCount(userid);
  return doGet(mav,req,res,locale);
}
Program: 175659
Project: 175659
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ModelAndView doGet(ModelAndView mav,HttpServletRequest req,HttpServletResponse res,Locale locale){
  setViewAndCommonObjects(mav,locale,"String_Node_Str");
  HashMap<String,String[]> hiddenMap=new HashMap<>();
  Enumeration<?> paramNames=req.getParameterNames();
  while (paramNames.hasMoreElements()) {
    String paramName=(String)paramNames.nextElement();
    hiddenMap.put(paramName,req.getParameterValues(paramName));
    mav.addObject("String_Node_Str",hiddenMap);
  }
  HttpSession session=req.getSession(true);
  if (session.getAttribute("String_Node_Str") != null && !"String_Node_Str".equals(session.getAttribute("String_Node_Str"))) {
    mav.addObject("String_Node_Str",msg.getMessage((String)session.getAttribute("String_Node_Str"),null,locale));
    session.setAttribute("String_Node_Str",null);
  }
  return mav;
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ModelAndView doGet(ModelAndView mav,HttpServletRequest req,HttpServletResponse res,Locale locale){
  setViewAndCommonObjects(mav,locale,"String_Node_Str");
  HashMap<String,String[]> hiddenMap=new HashMap<>();
  Enumeration<?> paramNames=req.getParameterNames();
  while (paramNames.hasMoreElements()) {
    String paramName=(String)paramNames.nextElement();
    hiddenMap.put(paramName,req.getParameterValues(paramName));
    mav.addObject("String_Node_Str",hiddenMap);
  }
  HttpSession session=req.getSession(true);
  String authNMsg=(String)session.getAttribute("String_Node_Str");
  if (authNMsg != null && !"String_Node_Str".equals(authNMsg)) {
    mav.addObject("String_Node_Str",authNMsg);
    session.setAttribute("String_Node_Str",null);
  }
  return mav;
}