google-java-format google-java-format

Fixes #81

MOE_MIGRATED_REVID=135371963
diff --git a/core/src/main/java/com/google/googlejavaformat/CloseOp.java b/core/src/main/java/com/google/googlejavaformat/CloseOp.java
index f694bfc..59e7e5a 100644
--- a/core/src/main/java/com/google/googlejavaformat/CloseOp.java
+++ b/core/src/main/java/com/google/googlejavaformat/CloseOp.java
@@ -26,6 +26,7 @@
 
   /**
    * Make a {@code CloseOp}, returning a singleton since they are all the same.
+   *
    * @return the singleton {@code CloseOp}
    */
   public static Op make() {
diff --git a/core/src/main/java/com/google/googlejavaformat/CommentsHelper.java b/core/src/main/java/com/google/googlejavaformat/CommentsHelper.java
index 2711f07..45e507b 100644
--- a/core/src/main/java/com/google/googlejavaformat/CommentsHelper.java
+++ b/core/src/main/java/com/google/googlejavaformat/CommentsHelper.java
@@ -15,12 +15,13 @@
 package com.google.googlejavaformat;
 
 /**
- * Rewrite comments. This interface is implemented by
- * {@link com.google.googlejavaformat.java.JavaCommentsHelper JavaCommentsHelper}.
+ * Rewrite comments. This interface is implemented by {@link
+ * com.google.googlejavaformat.java.JavaCommentsHelper JavaCommentsHelper}.
  */
 public interface CommentsHelper {
   /**
    * Try to rewrite comments, returning rewritten text.
+   *
    * @param tok the comment's tok
    * @param maxWidth the line length for the output
    * @param column0 the current column
diff --git a/core/src/main/java/com/google/googlejavaformat/Doc.java b/core/src/main/java/com/google/googlejavaformat/Doc.java
index 0e82dbb..e9db73a 100644
--- a/core/src/main/java/com/google/googlejavaformat/Doc.java
+++ b/core/src/main/java/com/google/googlejavaformat/Doc.java
@@ -25,16 +25,16 @@
 /**
  * {@link com.google.googlejavaformat.java.JavaInputAstVisitor JavaInputAstVisitor} outputs a
  * sequence of {@link Op}s using {@link OpsBuilder}. This linear sequence is then transformed by
- * {@link DocBuilder} into a tree-structured {@code Doc}. The top-level {@code Doc} is a
- * {@link Level}, which contains a sequence of {@code Doc}s, including other {@link Level}s. Leaf
- * {@code Doc}s are {@link Token}s, representing language-level tokens; {@link Tok}s, which may also
+ * {@link DocBuilder} into a tree-structured {@code Doc}. The top-level {@code Doc} is a {@link
+ * Level}, which contains a sequence of {@code Doc}s, including other {@link Level}s. Leaf {@code
+ * Doc}s are {@link Token}s, representing language-level tokens; {@link Tok}s, which may also
  * represent non-token {@link Input.Tok}s, including comments and other white-space; {@link Space}s,
  * representing single spaces; and {@link Break}s, which represent optional line-breaks.
  */
 public abstract class Doc {
   /**
-   * Each {@link Break} in a {@link Level} is either {@link FillMode#UNIFIED} or
-   * {@link FillMode#INDEPENDENT}.
+   * Each {@link Break} in a {@link Level} is either {@link FillMode#UNIFIED} or {@link
+   * FillMode#INDEPENDENT}.
    */
   public enum FillMode {
     /**
@@ -110,6 +110,7 @@
 
   /**
    * Return the width of a {@code Doc}, or {@code Float.POSITIVE_INFINITY} if it must be broken.
+   *
    * @return the width
    */
   final float getWidth() {
@@ -123,6 +124,7 @@
   /**
    * Return a {@code Doc}'s flat-string value; not defined (and never called) if the (@code Doc}
    * contains forced breaks.
+   *
    * @return the flat-string value
    */
   final String getFlat() {
@@ -135,6 +137,7 @@
 
   /**
    * Return the {@link Range} of a {@code Doc}.
+   *
    * @return the {@code Doc}'s {@link Range}
    */
   final Range<Integer> range() {
@@ -147,34 +150,35 @@
 
   /**
    * Compute the {@code Doc}'s width.
+   *
    * @return the width, or {@code Float.POSITIVE_INFINITY} if it must be broken
    */
   abstract float computeWidth();
 
   /**
    * Compute the {@code Doc}'s flat value. Not defined (and never called) if contains forced breaks.
+   *
    * @return the flat value
    */
   abstract String computeFlat();
 
   /**
    * Compute the {@code Doc}'s {@link Range} of {@link Input.Token}s.
+   *
    * @return the {@link Range}
    */
   abstract Range<Integer> computeRange();
 
   /**
    * Make breaking decisions for a {@code Doc}.
+   *
    * @param maxWidth the maximum line width
    * @param state the current output state
    * @return the new output state
    */
   public abstract State computeBreaks(CommentsHelper commentsHelper, int maxWidth, State state);
 
-  /**
-   * Write a {@code Doc} to an {@link Output}, after breaking decisions have
-   * been made.
-   */
+  /** Write a {@code Doc} to an {@link Output}, after breaking decisions have been made. */
   public abstract void write(Output output);
 
   /** A {@code Level} inside a {@link Doc}. */
@@ -188,6 +192,7 @@
 
     /**
      * Factory method for {@code Level}s.
+     *
      * @param plusIndent the extra indent inside the {@code Level}
      * @return the new {@code Level}
      */
@@ -197,6 +202,7 @@
 
     /**
      * Add a {@link Doc} to the {@code Level}.
+     *
      * @param doc the {@link Doc} to add
      */
     void add(Doc doc) {
@@ -238,8 +244,8 @@
     boolean oneLine = false;
 
     /**
-     * Groups of {@link Doc}s that are children of the current {@link Level},
-     * separated by {@link Break}s.
+     * Groups of {@link Doc}s that are children of the current {@link Level}, separated by {@link
+     * Break}s.
      */
     List<List<Doc>> splits = new ArrayList<>();
 
@@ -273,9 +279,7 @@
       }
     }
 
-    /**
-     * Compute breaks for a {@link Level} that spans multiple lines.
-     */
+    /** Compute breaks for a {@link Level} that spans multiple lines. */
     private State computeBroken(CommentsHelper commentsHelper, int maxWidth, State state) {
       splitByBreaks(docs, splits, breaks);
 
@@ -292,9 +296,7 @@
       return state;
     }
 
-    /**
-     * Lay out a Break-separated group of Docs in the current Level.
-     */
+    /** Lay out a Break-separated group of Docs in the current Level. */
     private static State computeBreakAndSplit(
         CommentsHelper commentsHelper,
         int maxWidth,
@@ -352,6 +354,7 @@
 
     /**
      * Get the width of a sequence of {@link Doc}s.
+     *
      * @param docs the {@link Doc}s
      * @return the width, or {@code Float.POSITIVE_INFINITY} if any {@link Doc} must be broken
      */
@@ -378,9 +381,7 @@
 
   /** A leaf {@link Doc} for a token. */
   public static final class Token extends Doc implements Op {
-    /**
-     * Is a Token a real token, or imaginary (e.g., a token generated incorrectly, or an EOF)?
-     */
+    /** Is a Token a real token, or imaginary (e.g., a token generated incorrectly, or an EOF)? */
     public enum RealOrImaginary {
       REAL,
       IMAGINARY;
@@ -408,21 +409,21 @@
 
     /**
      * How much extra to indent comments before the {@code Token}.
+     *
      * @return the extra indent
      */
     Indent getPlusIndentCommentsBefore() {
       return plusIndentCommentsBefore;
     }
 
-    /**
-     * Force a line break and indent trailing javadoc or block comments.
-     */
+    /** Force a line break and indent trailing javadoc or block comments. */
     Optional<Indent> breakAndIndentTrailingComment() {
       return breakAndIndentTrailingComment;
     }
 
     /**
      * Make a {@code Token}.
+     *
      * @param token the {@link Input.Token} to wrap
      * @param realOrImaginary did this {@link Input.Token} appear in the input, or was it generated
      *     incorrectly?
@@ -440,6 +441,7 @@
 
     /**
      * Return the wrapped {@link Input.Token}.
+     *
      * @return the {@link Input.Token}
      */
     Input.Token getToken() {
@@ -448,6 +450,7 @@
 
     /**
      * Is the token good? That is, does it match an {@link Input.Token}?
+     *
      * @return whether the @code Token} is good
      */
     RealOrImaginary realOrImaginary() {
@@ -504,6 +507,7 @@
 
     /**
      * Factor method for {@code Space}.
+     *
      * @return the new {@code Space}
      */
     static Space make() {
@@ -562,6 +566,7 @@
 
     /**
      * Make a {@code Break}.
+     *
      * @param fillMode the {@link FillMode}
      * @param flat the the text when not broken
      * @param plusIndent extra indent if taken
@@ -573,6 +578,7 @@
 
     /**
      * Make a {@code Break}.
+     *
      * @param fillMode the {@link FillMode}
      * @param flat the the text when not broken
      * @param plusIndent extra indent if taken
@@ -586,6 +592,7 @@
 
     /**
      * Make a forced {@code Break}.
+     *
      * @return the new forced {@code Break}
      */
     public static Break makeForced() {
@@ -594,6 +601,7 @@
 
     /**
      * Return the {@code Break}'s extra indent.
+     *
      * @return the extra indent
      */
     int getPlusIndent() {
@@ -602,6 +610,7 @@
 
     /**
      * Is the {@code Break} forced?
+     *
      * @return whether the {@code Break} is forced
      */
     boolean isForced() {
@@ -690,6 +699,7 @@
 
     /**
      * Factory method for a {@code Tok}.
+     *
      * @param tok the {@link Input.Tok} to wrap
      * @return the new {@code Tok}
      */
diff --git a/core/src/main/java/com/google/googlejavaformat/DocBuilder.java b/core/src/main/java/com/google/googlejavaformat/DocBuilder.java
index ab69b0b..31cc798 100644
--- a/core/src/main/java/com/google/googlejavaformat/DocBuilder.java
+++ b/core/src/main/java/com/google/googlejavaformat/DocBuilder.java
@@ -18,9 +18,7 @@
 import java.util.ArrayDeque;
 import java.util.List;
 
-/**
- * A {@code DocBuilder} converts a sequence of {@link Op}s into a {@link Doc}.
- */
+/** A {@code DocBuilder} converts a sequence of {@link Op}s into a {@link Doc}. */
 public final class DocBuilder {
   private final Doc.Level base = Doc.Level.make(Indent.Const.ZERO);
   private final ArrayDeque<Doc.Level> stack = new ArrayDeque<>();
@@ -43,15 +41,14 @@
    */
   private Doc.Level appendLevel = base;
 
-  /**
-   * Start to build a {@code DocBuilder}.
-   */
+  /** Start to build a {@code DocBuilder}. */
   public DocBuilder() {
     stack.addLast(base);
   }
 
   /**
    * Add a list of {@link Op}s to the {@link OpsBuilder}.
+   *
    * @param ops the {@link Op}s
    * @return the {@link OpsBuilder}
    */
@@ -64,6 +61,7 @@
 
   /**
    * Open a new {@link Doc.Level}.
+   *
    * @param plusIndent the extra indent for the {@link Doc.Level}
    */
   void open(Indent plusIndent) {
@@ -71,9 +69,7 @@
     stack.addLast(level);
   }
 
-  /**
-   * Close the current {@link Doc.Level}.
-   */
+  /** Close the current {@link Doc.Level}. */
   void close() {
     Doc.Level top = stack.removeLast();
     stack.peekLast().add(top);
@@ -81,6 +77,7 @@
 
   /**
    * Add a {@link Doc} to the current {@link Doc.Level}.
+   *
    * @param doc the {@link Doc}
    */
   void add(Doc doc) {
@@ -89,6 +86,7 @@
 
   /**
    * Add a {@link Doc.Break} to the current {@link Doc.Level}.
+   *
    * @param breakDoc the {@link Doc.Break}
    */
   void breakDoc(Doc.Break breakDoc) {
@@ -98,6 +96,7 @@
 
   /**
    * Return the {@link Doc}.
+   *
    * @return the {@link Doc}
    */
   public Doc build() {
diff --git a/core/src/main/java/com/google/googlejavaformat/Indent.java b/core/src/main/java/com/google/googlejavaformat/Indent.java
index aa8e09b..44b56cd 100644
--- a/core/src/main/java/com/google/googlejavaformat/Indent.java
+++ b/core/src/main/java/com/google/googlejavaformat/Indent.java
@@ -18,9 +18,9 @@
 import com.google.googlejavaformat.Output.BreakTag;
 
 /**
- * An indent for a {@link Doc.Level} or {@link Doc.Break}. The indent is either a constant
- * {@code int}, or a conditional expression whose value depends on whether or not a
- * {@link Doc.Break} has been broken.
+ * An indent for a {@link Doc.Level} or {@link Doc.Break}. The indent is either a constant {@code
+ * int}, or a conditional expression whose value depends on whether or not a {@link Doc.Break} has
+ * been broken.
  */
 public abstract class Indent {
 
diff --git a/core/src/main/java/com/google/googlejavaformat/Input.java b/core/src/main/java/com/google/googlejavaformat/Input.java
index 9c63b6d..c2af02b 100644
--- a/core/src/main/java/com/google/googlejavaformat/Input.java
+++ b/core/src/main/java/com/google/googlejavaformat/Input.java
@@ -19,9 +19,7 @@
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableRangeMap;
 
-/**
- * An input to the formatter.
- */
+/** An input to the formatter. */
 public abstract class Input extends InputOutput {
   /**
    * A {@code Tok} ("tock") is a token, or a comment, or a newline, or a maximal string of blanks. A
@@ -31,18 +29,21 @@
   public interface Tok {
     /**
      * Return the {@code Tok}'s index.
+     *
      * @return its index
      */
     int getIndex();
 
     /**
      * Return the {@code Tok}'s {@code 0}-based position.
+     *
      * @return its position
      */
     int getPosition();
 
     /**
      * Return the {@code Tok}'s {@code 0}-based column number.
+     *
      * @return its column number
      */
     int getColumn();
@@ -72,24 +73,25 @@
     boolean isComment();
   }
 
-  /**
-   * A {@code Token} is a language-level token.
-   */
+  /** A {@code Token} is a language-level token. */
   public interface Token {
     /**
      * Get the token's {@link Tok}.
+     *
      * @return the token's {@link Tok}
      */
     Tok getTok();
 
     /**
      * Get the earlier {@link Tok}s assigned to this {@code Token}.
+     *
      * @return the earlier {@link Tok}s assigned to this {@code Token}
      */
     ImmutableList<? extends Tok> getToksBefore();
 
     /**
      * Get the later {@link Tok}s assigned to this {@code Token}.
+     *
      * @return the later {@link Tok}s assigned to this {@code Token}
      */
     ImmutableList<? extends Tok> getToksAfter();
@@ -97,6 +99,7 @@
 
   /**
    * Get the input tokens.
+   *
    * @return the input tokens
    */
   public abstract ImmutableList<? extends Token> getTokens();
@@ -120,9 +123,9 @@
   public abstract int getColumnNumber(int inputPosition);
 
   /**
-   * Construct a diagnostic. Populates the input filename, and converts
-   * character offsets to numbers.
-   * */
+   * Construct a diagnostic. Populates the input filename, and converts character offsets to
+   * numbers.
+   */
   public FormatterDiagnostic createDiagnostic(int inputPosition, String message) {
     return FormatterDiagnostic.create(
         getLineNumber(inputPosition), getColumnNumber(inputPosition), message);
diff --git a/core/src/main/java/com/google/googlejavaformat/InputOutput.java b/core/src/main/java/com/google/googlejavaformat/InputOutput.java
index b7446c7..f856f5f 100644
--- a/core/src/main/java/com/google/googlejavaformat/InputOutput.java
+++ b/core/src/main/java/com/google/googlejavaformat/InputOutput.java
@@ -31,15 +31,14 @@
   private static final CharMatcher NEWLINE_MATCHER = CharMatcher.is('\n');
   private static final DiscreteDomain<Integer> INTEGERS = DiscreteDomain.integers();
 
-  /**
-   * Set the lines.
-   */
+  /** Set the lines. */
   protected final void setLines(ImmutableList<String> lines) {
     this.lines = lines;
   }
 
   /**
    * Get the line count.
+   *
    * @return the line count
    */
   public final int getLineCount() {
@@ -48,6 +47,7 @@
 
   /**
    * Get a line.
+   *
    * @param lineI the line number
    * @return the line
    */
@@ -91,6 +91,7 @@
 
   /**
    * Given an {@code InputOutput}, compute the map from tok indices to line ranges.
+   *
    * @param put the {@code InputOutput}
    * @param kN the number of tokens
    * @return the map from {@link com.google.googlejavaformat.java.JavaInput.Tok} indices to line
@@ -114,6 +115,7 @@
 
   /**
    * Get the {@link Range} of {@link Input.Tok}s beginning on a line.
+   *
    * @param lineI the line number
    * @return the {@link Range} of {@link Input.Tok}s beginning on the specified line
    */
@@ -123,6 +125,7 @@
 
   /**
    * Get the {@link Range} of {@link Input.Tok}s lying in any part on a line.
+   *
    * @param lineI the line number
    * @return the {@link Range} of {@link Input.Tok}s on the specified line
    */
@@ -132,6 +135,7 @@
 
   /**
    * Get the {@link Range} of {@link Input.Tok}s ending on a line.
+   *
    * @param lineI the line number
    * @return the {@link Range} of {@link Input.Tok}s ending on the specified line
    */
diff --git a/core/src/main/java/com/google/googlejavaformat/Op.java b/core/src/main/java/com/google/googlejavaformat/Op.java
index 4735b0f..a484541 100644
--- a/core/src/main/java/com/google/googlejavaformat/Op.java
+++ b/core/src/main/java/com/google/googlejavaformat/Op.java
@@ -17,12 +17,13 @@
 /**
  * An {@code Op} is a member of the sequence of formatting operations emitted by {@link OpsBuilder}
  * and transformed by {@link DocBuilder} into a {@link Doc}. Leaf subclasses of {@link Doc}
- * implement {@code Op}; {@link Doc.Level} is the only non-leaf, and is represented by paired
- * {@link OpenOp}-{@link CloseOp} {@code Op}s.
+ * implement {@code Op}; {@link Doc.Level} is the only non-leaf, and is represented by paired {@link
+ * OpenOp}-{@link CloseOp} {@code Op}s.
  */
 public interface Op {
   /**
    * Add an {@code Op} to a {@link DocBuilder}.
+   *
    * @param builder the {@link DocBuilder}
    */
   void add(DocBuilder builder);
diff --git a/core/src/main/java/com/google/googlejavaformat/OpenOp.java b/core/src/main/java/com/google/googlejavaformat/OpenOp.java
index d752827..6498201 100644
--- a/core/src/main/java/com/google/googlejavaformat/OpenOp.java
+++ b/core/src/main/java/com/google/googlejavaformat/OpenOp.java
@@ -18,9 +18,9 @@
 
 /**
  * An {@code OpenOp} opens a level. It is an {@link Op} in the sequence of {@link Op}s generated by
- * {@link OpsBuilder}. When the sequence is turned into a {@link Doc} by {@link DocBuilder},
- * {@link Input.Tok}s delimited by {@code OpenOp}-{@link CloseOp} pairs turn into nested
- * {@link Doc.Level}s.
+ * {@link OpsBuilder}. When the sequence is turned into a {@link Doc} by {@link DocBuilder}, {@link
+ * Input.Tok}s delimited by {@code OpenOp}-{@link CloseOp} pairs turn into nested {@link
+ * Doc.Level}s.
  */
 public final class OpenOp implements Op {
   private final Indent plusIndent;
@@ -31,6 +31,7 @@
 
   /**
    * Make an ordinary {@code OpenOp}.
+   *
    * @param plusIndent the indent for breaks at this level
    * @return the {@code OpenOp}
    */
diff --git a/core/src/main/java/com/google/googlejavaformat/Output.java b/core/src/main/java/com/google/googlejavaformat/Output.java
index b1ce4b8..cbf6a9f 100644
--- a/core/src/main/java/com/google/googlejavaformat/Output.java
+++ b/core/src/main/java/com/google/googlejavaformat/Output.java
@@ -19,13 +19,9 @@
 import com.google.common.collect.Range;
 import com.google.googlejavaformat.OpsBuilder.BlankLineWanted;
 
-/**
- * An output from the formatter.
- */
+/** An output from the formatter. */
 public abstract class Output extends InputOutput {
-  /**
-   * Unique identifier for a break.
-   */
+  /** Unique identifier for a break. */
   public static final class BreakTag {
 
     Optional<Boolean> taken = Optional.absent();
@@ -46,12 +42,14 @@
 
   /**
    * Indent by outputting {@code indent} spaces.
+   *
    * @param indent the current indent
    */
   public abstract void indent(int indent);
 
   /**
    * Output a string.
+   *
    * @param text the string
    * @param range the {@link Range} corresponding to the string
    */
@@ -59,6 +57,7 @@
 
   /**
    * A blank line is or is not wanted here.
+   *
    * @param k the {@link Input.Tok} index
    * @param wanted whether a blank line is wanted here
    */
@@ -69,6 +68,7 @@
 
   /**
    * Get the {@link CommentsHelper}.
+   *
    * @return the {@link CommentsHelper}
    */
   public abstract CommentsHelper getCommentsHelper();
diff --git a/core/src/main/java/com/google/googlejavaformat/java/FormatterException.java b/core/src/main/java/com/google/googlejavaformat/java/FormatterException.java
index 2af31ff..2cf567d 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/FormatterException.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/FormatterException.java
@@ -35,6 +35,7 @@
     super(diagnostics.iterator().next().toString());
     this.diagnostics = ImmutableList.copyOf(diagnostics);
   }
+
   public List<FormatterDiagnostic> diagnostics() {
     return diagnostics;
   }
diff --git a/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java b/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java
index ff7f9ae..5029c3a 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/ImportOrderer.java
@@ -66,23 +66,15 @@
     this.toks = toks;
   }
 
-  /**
-   * An import statement.
-   */
+  /** An import statement. */
   private static class Import implements Comparable<Import> {
-    /**
-     * The name being imported, for example {@code java.util.List}.
-     */
+    /** The name being imported, for example {@code java.util.List}. */
     final String imported;
 
-    /**
-     * The characters after the final {@code ;}, up to and including the line terminator.
-     */
+    /** The characters after the final {@code ;}, up to and including the line terminator. */
     final String trailing;
 
-    /**
-     * True if this is {@code import static}.
-     */
+    /** True if this is {@code import static}. */
     final boolean isStatic;
 
     Import(String imported, String trailing, boolean isStatic) {
@@ -163,11 +155,12 @@
 
   /**
    * Scans a sequence of import lines. The parsing uses this approximate grammar:
+   *
    * <pre>{@code
-   *   <imports> -> (<end-of-line> | <import>)*
-   *   <import> -> "import" <whitespace> ("static" <whitespace>)?
-   *      <identifier> ("." <identifier>)* ("." "*")? <whitespace>? ";"
-   *      <whitespace>? <line-comment>? <end-of-line>
+   * <imports> -> (<end-of-line> | <import>)*
+   * <import> -> "import" <whitespace> ("static" <whitespace>)?
+   *    <identifier> ("." <identifier>)* ("." "*")? <whitespace>? ";"
+   *    <whitespace>? <line-comment>? <end-of-line>
    * }</pre>
    *
    * @param i the index to start parsing at.
@@ -267,15 +260,15 @@
   }
 
   /**
-   * Scans the imported thing, the dot-separated name that comes after import [static] and
-   * before the semicolon. We don't allow spaces inside the dot-separated name. Wildcard
-   * imports are supported: if the input is {@code import java.util.*;} then the returned
-   * string will be {@code java.util.*}.
+   * Scans the imported thing, the dot-separated name that comes after import [static] and before
+   * the semicolon. We don't allow spaces inside the dot-separated name. Wildcard imports are
+   * supported: if the input is {@code import java.util.*;} then the returned string will be {@code
+   * java.util.*}.
    *
-   * @param start the index of the start of the identifier. If the import is
-   *     {@code import java.util.List;} then this index points to the token {@code java}.
-   * @return the parsed import ({@code java.util.List} in the example) and the index of the
-   *     first token after the imported thing ({@code ;} in the example).
+   * @param start the index of the start of the identifier. If the import is {@code import
+   *     java.util.List;} then this index points to the token {@code java}.
+   * @return the parsed import ({@code java.util.List} in the example) and the index of the first
+   *     token after the imported thing ({@code ;} in the example).
    * @throws FormatterException if the imported name could not be parsed.
    */
   private StringAndIndex scanImported(int start) throws FormatterException {
@@ -302,8 +295,8 @@
   }
 
   /**
-   * Returns the index of the first place where one of the given identifiers occurs, or
-   * {@code Optional.absent()} if there is none.
+   * Returns the index of the first place where one of the given identifiers occurs, or {@code
+   * Optional.absent()} if there is none.
    *
    * @param start the index to start looking at
    * @param identifiers the identifiers to look for
@@ -320,9 +313,7 @@
     return Optional.absent();
   }
 
-  /**
-   * Returns the given token, or the preceding token if it is a whitespace token.
-   */
+  /** Returns the given token, or the preceding token if it is a whitespace token. */
   private int unindent(int i) {
     if (i > 0 && isSpaceToken(i - 1)) {
       return i - 1;
diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java b/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java
index 4d556d9..048d918 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/JavaFormatterOptions.java
@@ -19,22 +19,17 @@
 /**
  * Options for a google-java-format invocation.
  *
- * <p>
- * Like gofmt, the google-java-format CLI exposes <em>no</em> configuration
- * options (aside from {@code --aosp}).
+ * <p>Like gofmt, the google-java-format CLI exposes <em>no</em> configuration options (aside from
+ * {@code --aosp}).
  *
- * <p>
- * The goal of google-java-format is to provide consistent formatting, and to
- * free developers from arguments over style choices. It is an explicit non-goal
- * to support developers' individual preferences, and in fact it would work
- * directly against our primary goals.
+ * <p>The goal of google-java-format is to provide consistent formatting, and to free developers
+ * from arguments over style choices. It is an explicit non-goal to support developers' individual
+ * preferences, and in fact it would work directly against our primary goals.
  *
- * <p>
- * This class exists primarily to distinguish between Google Java Style mode and
- * {@code --aosp} mode. It also provides a configuration that enables the
- * Eclipse Javadoc formatter until
- * <a href="https://github.com/google/google-java-format/issues/7">google-java-
- * format#7</a> is resolved.
+ * <p>This class exists primarily to distinguish between Google Java Style mode and {@code --aosp}
+ * mode. It also provides a configuration that enables the Eclipse Javadoc formatter until <a
+ * href="https://github.com/google/google-java-format/issues/7">google-java- format#7</a> is
+ * resolved.
  */
 @Immutable
 public class JavaFormatterOptions {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java b/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java
index ce3db07..bf2ff5f 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/JavaOutput.java
@@ -67,6 +67,7 @@
 
   /**
    * {@code JavaOutput} constructor.
+   *
    * @param javaInput the {@link JavaInput}, used to match up blank lines in the output
    * @param commentsHelper the {@link CommentsHelper}, used to rewrite comments
    */
@@ -222,6 +223,7 @@
 
   /**
    * Emit a list of {@link Replacement}s to convert from input to output.
+   *
    * @return a list of {@link Replacement}s, sorted by start index, without overlaps
    */
   public ImmutableList<Replacement> getFormatReplacements(RangeSet<Integer> iRangeSet0) {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/Main.java b/core/src/main/java/com/google/googlejavaformat/java/Main.java
index 64d125e..7164d96 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/Main.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/Main.java
@@ -35,9 +35,7 @@
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
-/**
- * The main class for the Java formatter CLI.
- */
+/** The main class for the Java formatter CLI. */
 public final class Main {
   private static final int MAX_THREADS = 20;
   private static final String STDIN_FILENAME = "<stdin>";
@@ -60,6 +58,7 @@
    * The main method for the formatter, with some number of file names to format. We process them in
    * parallel, but we must be careful; if multiple file names refer to the same file (which is hard
    * to determine), we must serialize their updates.
+   *
    * @param args the command-line arguments
    */
   public static void main(String[] args) {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/Replacement.java b/core/src/main/java/com/google/googlejavaformat/java/Replacement.java
index 5e46a80..3aaeb9f 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/Replacement.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/Replacement.java
@@ -17,9 +17,7 @@
 import com.google.auto.value.AutoValue;
 import com.google.common.collect.Range;
 
-/**
- * Represents a range in the original source and replacement text for that range.
- */
+/** Represents a range in the original source and replacement text for that range. */
 @AutoValue
 public abstract class Replacement {
 
diff --git a/core/src/main/java/com/google/googlejavaformat/java/TypeNameClassifier.java b/core/src/main/java/com/google/googlejavaformat/java/TypeNameClassifier.java
index b4b68cc..b122659 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/TypeNameClassifier.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/TypeNameClassifier.java
@@ -17,16 +17,12 @@
 import com.google.common.base.Verify;
 import java.util.List;
 
-/**
- * Heuristics for classifying qualified names as types.
- */
+/** Heuristics for classifying qualified names as types. */
 public final class TypeNameClassifier {
 
   private TypeNameClassifier() {}
 
-  /**
-   * A state machine for classifying qualified names.
-   */
+  /** A state machine for classifying qualified names. */
   private enum TyParseState {
 
     /** The start state. */
@@ -114,14 +110,15 @@
   }
 
   /**
-   * Returns the end index (inclusive) of the longest prefix that matches the naming conventions
-   * of a type or static field access, or -1 if no such prefix was found.
+   * Returns the end index (inclusive) of the longest prefix that matches the naming conventions of
+   * a type or static field access, or -1 if no such prefix was found.
    *
    * <p>Examples:
+   *
    * <ul>
-   * <li>ClassName
-   * <li>ClassName.staticMemberName
-   * <li>com.google.ClassName.InnerClass.staticMemberName
+   *   <li>ClassName
+   *   <li>ClassName.staticMemberName
+   *   <li>com.google.ClassName.InnerClass.staticMemberName
    * </ul>
    */
   static int typePrefixLength(List<String> nameParts) {
diff --git a/core/src/main/java/com/google/googlejavaformat/java/javadoc/JavadocWriter.java b/core/src/main/java/com/google/googlejavaformat/java/javadoc/JavadocWriter.java
index 095d110..f2769e7 100644
--- a/core/src/main/java/com/google/googlejavaformat/java/javadoc/JavadocWriter.java
+++ b/core/src/main/java/com/google/googlejavaformat/java/javadoc/JavadocWriter.java
@@ -49,6 +49,7 @@
    * inside an {@code <li>} element in that inner list :)
    */
   private boolean continuingListItemOfInnermostList;
+
   private boolean continuingFooterTag;
   private final NestingCounter continuingListItemCount = new NestingCounter();
   private final NestingCounter continuingListCount = new NestingCounter();