Program: 72415
Project: 72415
Buggy source:
/** 
 * Initialize and return a Java Cipher object for the specified operation mode, cipher algorithm, cipher key and initialization vector (if applicable) in the prefix of the cipher text.
 * @param operationMode Whether to encrypt or decrypt. (Cipher.ENCRYPT_MODE or Cipher.DECRYPT_MODE)
 * @param cipherAlgorithm The name of the symmetric cipher algorithm to be used. (examples: AES-128-CBC, DES-ECB)
 * @param cipherKey The secret key for the cipher.
 * @param cipherText The cipher text that includes the initialization vector (IV). Should be nullif the operation mode is encrypt or the cipher algorithm does not use IV. 
 * @return An initialized Java Cipher object.
 * @throws IllegalArgumentException If the Java Cipher object cannot be initialized.
 */
private Cipher _getCipher(int operationMode,String cipherAlgorithm,byte[] cipherKey,byte[] cipherText) throws IllegalArgumentException {
  String[] tokens=cipherAlgorithm.split("String_Node_Str");
  if (tokens.length < 1) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  int keySize=0;
  int blockSize=0;
  int ivSize=0;
  String cipherName="String_Node_Str";
  String cipherMode="String_Node_Str";
  if (tokens[0].equals("String_Node_Str")) {
    cipherName=tokens[0];
    blockSize=16;
    if (tokens.length != 3) {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[1].equals("String_Node_Str")) {
      keySize=16;
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      keySize=24;
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      keySize=32;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[2].equals("String_Node_Str")) {
      cipherMode=tokens[2];
    }
 else     if (tokens[2].equals("String_Node_Str") || tokens[2].equals("String_Node_Str")) {
      cipherMode=tokens[2];
      ivSize=blockSize;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
  }
 else   if (tokens[0].equals("String_Node_Str")) {
    cipherName=tokens[0];
    keySize=8;
    blockSize=8;
    if (tokens.length != 2) {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[1].equals("String_Node_Str")) {
      cipherMode=tokens[1];
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      cipherMode=tokens[1];
      ivSize=blockSize;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  Cipher cipher;
  try {
    cipher=Cipher.getInstance(cipherName + "String_Node_Str" + cipherMode+ "String_Node_Str");
  }
 catch (  NoSuchAlgorithmException|NoSuchPaddingException e) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm + "String_Node_Str"+ e.getMessage());
  }
  IvParameterSpec ivSpec=null;
  byte[] initVector=null;
  if (ivSize > 0) {
    if (cipherText == null) {
      initVector=_getRandomBytes(ivSize);
    }
 else {
      initVector=Arrays.copyOfRange(cipherText,0,ivSize);
    }
    ivSpec=new IvParameterSpec(initVector);
  }
  if (cipherKey.length != keySize) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  SecretKeySpec secretKeySpec=new SecretKeySpec(cipherKey,cipherName);
  try {
    if (ivSpec != null) {
      cipher.init(operationMode,secretKeySpec,ivSpec);
    }
 else {
      cipher.init(operationMode,secretKeySpec);
    }
  }
 catch (  InvalidKeyException|InvalidAlgorithmParameterException e) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm + "String_Node_Str"+ e.getMessage());
  }
  return cipher;
}

Fixed version (ground truth):
/** 
 * Initialize and return a Java Cipher object for the specified operation mode, cipher algorithm, cipher key and initialization vector (if applicable) in the prefix of the cipher text.
 * @param operationMode Whether to encrypt or decrypt. (Cipher.ENCRYPT_MODE or Cipher.DECRYPT_MODE)
 * @param cipherAlgorithm The name of the symmetric cipher algorithm to be used. (examples: AES-128-CBC, DES-ECB)
 * @param cipherKey The secret key for the cipher.
 * @param cipherText The cipher text that includes the initialization vector (IV). Should be nullif the operation mode is encrypt or the cipher algorithm does not use IV. 
 * @return An initialized Java Cipher object.
 * @throws IllegalArgumentException If the Java Cipher object cannot be initialized.
 */
private Cipher _getCipher(int operationMode,String cipherAlgorithm,byte[] cipherKey,byte[] cipherText) throws IllegalArgumentException {
  String[] tokens=cipherAlgorithm.split("String_Node_Str");
  if (tokens.length < 1) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  int keySize=0;
  int blockSize=0;
  int ivSize=0;
  String cipherName="String_Node_Str";
  String cipherMode="String_Node_Str";
  if (tokens[0].equals("String_Node_Str")) {
    cipherName=tokens[0];
    blockSize=16;
    if (tokens.length != 3) {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[1].equals("String_Node_Str")) {
      keySize=16;
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      keySize=24;
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      keySize=32;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[2].equals("String_Node_Str")) {
      cipherMode=tokens[2];
    }
 else     if (tokens[2].equals("String_Node_Str") || tokens[2].equals("String_Node_Str")) {
      cipherMode=tokens[2];
      ivSize=blockSize;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
  }
 else   if (tokens[0].equals("String_Node_Str")) {
    cipherName=tokens[0];
    keySize=8;
    blockSize=8;
    if (tokens.length != 2) {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
    if (tokens[1].equals("String_Node_Str")) {
      cipherMode=tokens[1];
    }
 else     if (tokens[1].equals("String_Node_Str")) {
      cipherMode=tokens[1];
      ivSize=blockSize;
    }
 else {
      throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
    }
  }
 else {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  Cipher cipher;
  try {
    cipher=Cipher.getInstance(cipherName + "String_Node_Str" + cipherMode+ "String_Node_Str");
  }
 catch (  NoSuchAlgorithmException|NoSuchPaddingException e) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm,e);
  }
  IvParameterSpec ivSpec=null;
  byte[] initVector=null;
  if (ivSize > 0) {
    if (cipherText == null) {
      initVector=_getRandomBytes(ivSize);
    }
 else {
      initVector=Arrays.copyOfRange(cipherText,0,ivSize);
    }
    ivSpec=new IvParameterSpec(initVector);
  }
  if (cipherKey.length != keySize) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm);
  }
  SecretKeySpec secretKeySpec=new SecretKeySpec(cipherKey,cipherName);
  try {
    if (ivSpec != null) {
      cipher.init(operationMode,secretKeySpec,ivSpec);
    }
 else {
      cipher.init(operationMode,secretKeySpec);
    }
  }
 catch (  InvalidKeyException|InvalidAlgorithmParameterException e) {
    throw new IllegalArgumentException("String_Node_Str" + cipherAlgorithm,e);
  }
  return cipher;
}