diff --git a/java/com/google/gitiles/GitilesView.java b/java/com/google/gitiles/GitilesView.java
index f5be973..4b22e8d 100644
--- a/java/com/google/gitiles/GitilesView.java
+++ b/java/com/google/gitiles/GitilesView.java
@@ -114,7 +114,7 @@
         case LOG:
         case DIFF:
           oldRevision = other.oldRevision;
-          // $FALL-THROUGH$
+        // $FALL-THROUGH$
         case PATH:
         case DOC:
         case ROOTED_DOC:
@@ -122,15 +122,15 @@
         case BLAME:
         case SHOW:
           path = other.path;
-          // $FALL-THROUGH$
+        // $FALL-THROUGH$
         case REVISION:
           revision = other.revision;
-          // $FALL-THROUGH$
+        // $FALL-THROUGH$
         case DESCRIBE:
         case REFS:
         case REPOSITORY_INDEX:
           repositoryName = other.repositoryName;
-          // $FALL-THROUGH$
+        // $FALL-THROUGH$
         default:
           break;
       }
diff --git a/java/com/google/gitiles/PathServlet.java b/java/com/google/gitiles/PathServlet.java
index fc0af05..b2563b0 100644
--- a/java/com/google/gitiles/PathServlet.java
+++ b/java/com/google/gitiles/PathServlet.java
@@ -52,8 +52,6 @@
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ObjectLoader;
 import org.eclipse.jgit.lib.ObjectReader;
-import org.eclipse.jgit.lib.Ref;
-import org.eclipse.jgit.lib.RefDatabase;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevObject;
@@ -318,7 +316,9 @@
   }
 
   private static class AutoDiveFilter extends TreeFilter {
-    /** @see GitilesView#getBreadcrumbs(List) */
+    /**
+     * @see GitilesView#getBreadcrumbs(List)
+     */
     List<Boolean> hasSingleTree;
 
     private final byte[] pathRaw;
@@ -540,34 +540,34 @@
     return p.eof() ? p : null;
   }
 
-  private @Nullable URI createEditUrl(HttpServletRequest req, GitilesView view)
-      throws IOException {
-      String baseGerritUrl = this.urls.getBaseGerritUrl(req);
-      if (baseGerritUrl == null) {
-        return null;
-      }
-      String commitish = view.getRevision().getName();
-      if (commitish == null || !commitish.startsWith("refs/heads/")) {
-        return null;
-      }
-      try {
-        URI editUrl = new URI(baseGerritUrl);
-        String path =
-          String.format("/admin/repos/edit/repo/%s/branch/%s/file/%s",
-            view.getRepositoryName(),
-            commitish,
-            view.getPathPart());
-        return editUrl.resolve(escapeName(path));
-      } catch (URISyntaxException use) {
-        log.warn("Malformed Edit URL", use);
-      }
+  private @Nullable URI createEditUrl(HttpServletRequest req, GitilesView view) throws IOException {
+    String baseGerritUrl = this.urls.getBaseGerritUrl(req);
+    if (baseGerritUrl == null) {
       return null;
+    }
+    String commitish = view.getRevision().getName();
+    if (commitish == null || !commitish.startsWith("refs/heads/")) {
+      return null;
+    }
+    try {
+      URI editUrl = new URI(baseGerritUrl);
+      String path =
+          String.format(
+              "/admin/repos/edit/repo/%s/branch/%s/file/%s",
+              view.getRepositoryName(), commitish, view.getPathPart());
+      return editUrl.resolve(escapeName(path));
+    } catch (URISyntaxException use) {
+      log.warn("Malformed Edit URL", use);
+    }
+    return null;
   }
 
   private void showFile(HttpServletRequest req, HttpServletResponse res, WalkResult wr)
       throws IOException {
     GitilesView view = ViewFilter.getView(req);
-    Map<String, ?> data = new BlobSoyData(wr.getObjectReader(), view).toSoyData(wr.path, wr.id, createEditUrl(req, view));
+    Map<String, ?> data =
+        new BlobSoyData(wr.getObjectReader(), view)
+            .toSoyData(wr.path, wr.id, createEditUrl(req, view));
     // TODO(sop): Allow caching files by SHA-1 when no S cookie is sent.
     renderHtml(
         req,
diff --git a/java/com/google/gitiles/ReadmeHelper.java b/java/com/google/gitiles/ReadmeHelper.java
index 389c73c..a15f52c 100644
--- a/java/com/google/gitiles/ReadmeHelper.java
+++ b/java/com/google/gitiles/ReadmeHelper.java
@@ -58,7 +58,9 @@
   }
 
   void scanTree(RevTree tree)
-      throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException,
+      throws MissingObjectException,
+          IncorrectObjectTypeException,
+          CorruptObjectException,
           IOException {
     if (config.render) {
       try (TreeWalk tw = new TreeWalk(reader)) {
diff --git a/java/com/google/gitiles/VisibilityChecker.java b/java/com/google/gitiles/VisibilityChecker.java
index dedf547..0183ea9 100644
--- a/java/com/google/gitiles/VisibilityChecker.java
+++ b/java/com/google/gitiles/VisibilityChecker.java
@@ -68,7 +68,8 @@
       return false;
     }
 
-    return !walk.getObjectReader().createReachabilityChecker(walk)
+    return !walk.getObjectReader()
+        .createReachabilityChecker(walk)
         .areAllReachable(ImmutableList.of(commit), startCommits.stream())
         .isPresent();
   }
diff --git a/java/com/google/gitiles/doc/Navbar.java b/java/com/google/gitiles/doc/Navbar.java
index 60d1059..6d9e567 100644
--- a/java/com/google/gitiles/doc/Navbar.java
+++ b/java/com/google/gitiles/doc/Navbar.java
@@ -137,8 +137,11 @@
   }
 
   private static Set<String> splitExtensionNames(String url) {
-    return Splitter.on(CharMatcher.whitespace().or(CharMatcher.is(','))).trimResults()
-        .omitEmptyStrings().splitToList(url).stream()
+    return Splitter.on(CharMatcher.whitespace().or(CharMatcher.is(',')))
+        .trimResults()
+        .omitEmptyStrings()
+        .splitToList(url)
+        .stream()
         .map(String::toLowerCase)
         .collect(toSet());
   }
diff --git a/javatests/com/google/gitiles/DiffServletTest.java b/javatests/com/google/gitiles/DiffServletTest.java
index 529c349..295418e 100644
--- a/javatests/com/google/gitiles/DiffServletTest.java
+++ b/javatests/com/google/gitiles/DiffServletTest.java
@@ -45,7 +45,8 @@
 
     String diffHeader =
         String.format(
-            "diff --git <a href=\"/b/repo/+/%s/foo\">a/foo</a> <a href=\"/b/repo/+/%s/foo\">b/foo</a>",
+            "diff --git <a href=\"/b/repo/+/%s/foo\">a/foo</a> <a"
+                + " href=\"/b/repo/+/%s/foo\">b/foo</a>",
             c1.name(), c2.name());
     assertThat(actual).contains(diffHeader);
   }
diff --git a/javatests/com/google/gitiles/PathServletTest.java b/javatests/com/google/gitiles/PathServletTest.java
index 7531242..660cc2f 100644
--- a/javatests/com/google/gitiles/PathServletTest.java
+++ b/javatests/com/google/gitiles/PathServletTest.java
@@ -110,7 +110,8 @@
     Map<String, ?> data = buildData("/repo/+/refs/heads/master/editFoo");
 
     String editUrl = (String) getBlobData(data).get("editUrl");
-    String testUrl = "http://test-host-review/admin/repos/edit/repo/repo/branch/refs/heads/master/file/editFoo";
+    String testUrl =
+        "http://test-host-review/admin/repos/edit/repo/repo/branch/refs/heads/master/file/editFoo";
     assertThat(editUrl).isEqualTo(testUrl);
   }
 
