output: #fixed code
                               protected void setIV(byte[] iv, boolean isEncrypt) {
  		if (_ivLength == 0) {
  			return;
  		}
  		CipherParameters cipherParameters = null;
  
  		if (isEncrypt) {
  			cipherParameters = getCipherParameters(iv);
  			try {
  				encCipher = getCipher(isEncrypt);
  			} catch (InvalidAlgorithmParameterException e) {
  				logger.info(e.toString());
  			}
  			encCipher.init(isEncrypt, cipherParameters);
  		} else {
              _decryptIV = Arrays.copyOfRange(iv,0,_ivLength);
  			cipherParameters = getCipherParameters(iv);
  			try {
  				decCipher = getCipher(isEncrypt);
  			} catch (InvalidAlgorithmParameterException e) {
  				logger.info(e.toString());
  			}
  			decCipher.init(isEncrypt, cipherParameters);
  		}
  	}
input: #vulnerable code 
                               protected void setIV(byte[] iv, boolean isEncrypt) {
  		if (_ivLength == 0) {
  			return;
  		}
  		CipherParameters cipherParameters = null;
  
  		if (isEncrypt) {
  			cipherParameters = getCipherParameters(iv);
  			try {
  				encCipher = getCipher(isEncrypt);
  			} catch (InvalidAlgorithmParameterException e) {
  				logger.info(e.toString());
  			}
  			encCipher.init(isEncrypt, cipherParameters);
  		} else {
  			_decryptIV = new byte[_ivLength];
  			System.arraycopy(iv, 0, _decryptIV, 0, _ivLength);
  			cipherParameters = getCipherParameters(iv);
  			try {
  				decCipher = getCipher(isEncrypt);
  			} catch (InvalidAlgorithmParameterException e) {
  				logger.info(e.toString());
  			}
  			decCipher.init(isEncrypt, cipherParameters);
  		}
  	} 
                              #location 17 
                              #vulnerability type THREAD_SAFETY_VIOLATION