it would be more accurate to say-
Code:
Cipher cipher = Cipher.getInstance("PBEWithSHA1AndDES","BC");
cipher = Cipher.getInstance("DES/CBC/PKCS5Padding", "BC");
instead of
cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
This is because the encrypt cipher has specified the BC provider, but the decrypt cipher hasn't specified BC provider. JCA implementation could use other provider which comes higher in precedence, in such cases input and plain could be different.