Badly written code in J2ME?