I’ve been working on a program that parses and interprets some data, but I’ve been running into a problem. No matter how hard I try, I can’t seem to stomp out this bug.
Code snippet: http://pastebin.com/0BLakSpe
VetoSet.java: http://pastebin.com/8RdGKGQw
Result: http://pastebin.com/8GfxndGw
I’ve modified the code so you don’t have to trudge through lots of unrelated methods, and I’ve modified the error message so it makes sense in the context of the code I’ve posted.
Here’s the full code for those who want to read it:
Main.java: http://pastebin.com/FenKU6Ze
VetoSet.java: http://pastebin.com/8RdGKGQw
VetoParser.java*: http://pastebin.com/1vTF3aXP
ReadFile.java: http://pastebin.com/beV0bqPa
Interpolate.java: http://pastebin.com/3CsaJdXm
Utility.java: http://pastebin.com/4G8ZmYxp
Here’s a tarball of compilable code: http://www.qfpost.com/file/d?g=KFaF7M6dk
If anyone could help me with this problem, it would be greatly appreciated
Thanks,
taktoa
* The rotatePairArrays function has some debugging code added on
Your problem is in
VetoStuff.vetoSetToPairArray():You have switched the two dimensions in the 2d-array. Since
input[0].getVetoPairs().length > input.lengthyour pairArray will end up with some nulls at the end.Change it to:
(you are overwriting the inner arrays anyway when you assign them two lines later).