Set up checkstyle, findbugs and pmd plugins
Remove trailing whitespace
Removed suspicious/potentially confusing indentation
[code style] Replaced tabs by white space
[code style] Added braces to control statements to avoid confusion and bugs