This part is a 3.3 nF ±5% X7R 0402 MLCC rated 50 V (Walsin 0402B332J500CT) — a capacitor, not a chip, and non-polar.
A capacitor is an open circuit at DC, so putting one across a battery does not by itself pass current or generate heat. The realistic ways this ends in a bang:
- Over-voltage. 50 V is the hard limit. Anything above it punches through the dielectric, which shorts, and the short is what does the damage — the stored energy in a 3.3 nF part is negligible, so the energy comes from the battery. If "bar battery" means anything in the hundreds of volts, this is the answer.
- It was not across the battery but in series with a load, or bridged two nodes it should not have — a cracked or shorted MLCC across a low-impedance source will happily dump the battery's full short-circuit current through a 0402 body.
- Mechanical cracking. MLCCs crack from board flex or thermal shock during hand-soldering, and a cracked part often fails short later rather than immediately.
If it was genuinely under 50 V, the interesting failure is #3 and the part was already damaged before it went in.
Closing this as a usage question rather than a defect in the page — the page's data (3.3 nF, X7R, 50 V) matches the Walsin datasheet. If you think the published voltage rating or footprint is wrong, reopen with what you measured and I will check it against the datasheet.