I do think it'll be easier to start from scratch to be honest, but if you want it anyway http://a.pomf.cat/ckjziq.zip , this has all the code and all the outputs it produced back when I used it last summer. Just keep in mind that my comments might be a little... sparse.
In case you have a change of heart and decide to save yourself the suffering of going through my code or Java isn't your thing, here's what I'd do: