For next time, buy your plants as you would your fish and only buy the healthy looking ones.
For this time and moving forward, plants put their energies into growing leaves, so that they can photosynthesise.
Some plants also put their energy into growing comprehensive root systems. The Java Fern isn't one of these, so leaves are it's priority.
When a leave is damaged, the plant will spend energy on repairing that leaf.
When a leaf is missing, it will put energy into growing another.
With this in mind, I suggest you get a pair of sharp scissors, (so as not to crush the plant) and cut off the damaged leaves.
DO NOT DISCARD THE DAMAGED LEAVES!.
The 'mother' plant will now devote itself to growing more leaves.
Leave the cut leaves loose in the tank...they'll probably float. With luck, after maybe a week or so, you should see a tiny fern growing out of the tip of the old leaf. Let this grow and you'll have another Java Fern to plant.