Fixed typos in javadoc and some inline comments. Pr #22908. Patch submitted by Janek Bogucki. Reviewed by Phil Steitz.