Prevented some bugs with the help of FindBugs.