Fix [SonarQube] if/else/for/while/do statements should always use curly
braces
Format per coding standard
Add javadoc