added static code analysis for generator. fix findbugs
fixed checkstyle
fix some more PMD warnings