Fix warnings reported by `checkstyle` and `IntelliJ IDEA`