Electronic Code Block (ECB) mode is an implementation that divides the original message into blocks and each block is encrypted separately. The problem with ECB is that it is not semantically secure. The worst parts is that in ECB mode encryption of the same block of plaintext will yield the same block of ciphertext, this does not allow for hiding of data patterns.

Electronic Code Block (ECB) Fixes for Java

Vulnerable:

Cipher c = Cipher.getInstance("AES/ECB/NoPadding");
c.init(Cipher.ENCRYPT_MODE, k, iv);
byte[] cipherText = c.doFinal(plainText);

Solution: Use Galois/Counter Mode (GCM)

Cipher c = Cipher.getInstance("AES/GCM/NoPadding");
c.init(Cipher.ENCRYPT_MODE, k, iv);
byte[] cipherText = c.doFinal(plainText);

Want to check your projects for free?

Wikipedia: Electronic Codebook (ECB)