Fix checkstyle/pmd errors