Shitty Java code