fix unititialised value read
add DBG prefix for javagen
use btree alloc for now, javagen breaks with malloc

I don't know what causes the problem, valgrind doesn't say anything and
it's not due to zero-initialisation.