Merge changes from topic 'events'

* changes:
  Update replication plugin
  Add EventDispatcher interface and use it.
diff --git a/Documentation/user-review-ui.txt b/Documentation/user-review-ui.txt
index ab1070a..b36792f 100644
--- a/Documentation/user-review-ui.txt
+++ b/Documentation/user-review-ui.txt
@@ -350,21 +350,26 @@
 image::images/user-review-ui-change-screen-file-list-comments.png[width=800, link="images/user-review-ui-change-screen-file-list-comments.png"]
 
 [[size]]
-The size of the modifications in the files can be seen in the `Size`
-column. The footer row shows the total size of the change.
-
-For files, the `Size` column shows the sum of inserted and deleted
-lines as one number. For the total size, inserted and deleted lines are
-shown separately. In addition, the number of insertions and deletions
-is shown as a bar. The size of the bar indicates the amount of changed
-lines, and its coloring in green and red shows the proportion of
-insertions to deletions.
+The size of the modifications in the files can be seen in the `Size` column. The
+footer row shows the total size of the change.
 
 The size information is useful to easily spot the files that contain
 the most modifications; these files are likely to be the most relevant
 files for this change. The total change size gives an estimate of how
 long a review of this change may take.
 
+When the "Show Change Sizes As Colored Bars" user preference is enabled, the
+`Size` column shows the sum of inserted and deleted lines as one number.  In
+addition, the change size is shown as a bar. The size of the bar indicates the
+amount of changed lines, and its coloring shows the proportion of insertions
+(green) to deletions (red).
+
+When the "Show Change Sizes As Colored Bars" user preference is disabled, the
+colored bar is not shown.  For added and renamed files, the `Size` column
+shows the number of inserted and deleted lines. For new files, the column only
+shows the total number of lines in the new file. No size is shown for binary
+files and deleted files.
+
 image::images/user-review-ui-change-screen-file-list-size.png[width=800, link="images/user-review-ui-change-screen-file-list-size.png"]
 
 [[diff-against]]
diff --git a/ReleaseNotes/ReleaseNotes-2.11.txt b/ReleaseNotes/ReleaseNotes-2.11.txt
index 3a7a56e..1d32d72 100644
--- a/ReleaseNotes/ReleaseNotes-2.11.txt
+++ b/ReleaseNotes/ReleaseNotes-2.11.txt
@@ -106,6 +106,25 @@
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/config-gerrit.html#change.replyLabel[
 label and tooltip] to be configured.
 
+* Improve file sorting for C and C++ files.
++
+Header files are now listed before implementation files.
+
+* link:http://code.google.com/p/gerrit/issues/detail?id=3148[Issue 3148]:
+Allow display of colored size bars to be enabled or disabled per user.
++
+The 'Show Change Sizes As Colored Bars In Changes Table' setting is renamed to
+'Show Change Sizes As Colored Bars' and is now used to also control how the
+change size is shown per file in the file table.
++
+When enabled (which is the default), the change size per file is shown as a sum
+of lines added/removed, and also representated by a colored bar showing the
+proportion of added/removed lines.
++
+When disabled, the colored bar is not shown and the change size per file is shown
+in the same way as it used to be in the old change screen.
+
+
 Side-By-Side Diff
 ^^^^^^^^^^^^^^^^^
 
@@ -130,10 +149,26 @@
 ** Dart
 ** Dockerfile
 ** GLSL shader
+** Go
 ** Objective C
 ** link:http://code.google.com/p/gerrit/issues/detail?id=2779[Issue 2779]: reStructured text
 ** Soy
 
+
+Projects Screen
+^^^^^^^^^^^^^^^
+
+* Add pagination of the branch list page.
+
+* Add an 'Edit Config' button on the project info page.
++
+The button creates a new change on the `refs/meta/config` branch and opens the
+`project.config` file in the inline editor.
++
+This allows project owners to easily edit the `project.config` file from the
+browser, which is useful since it is possible that not all configuration options
+are available in the UI.
+
 REST
 ~~~~
 
@@ -154,8 +189,8 @@
 In the past, Gerrit bugs, lack of transactions, and unreliable NoSQL backends
 have at various times produced a bewildering variety of corrupt states.
 +
-This endpoint can be used to detect and explain some of these possible states
-of a change.
+This endpoint can be used to detect, explain, and repair some of these possible
+states of a change.
 
 Change Edits
 ^^^^^^^^^^^^
@@ -196,17 +231,21 @@
 Projects
 ^^^^^^^^
 
+* Add new
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-projects.html#delete-branches[
+Delete Branches] endpoint.
+
 * Add filtering and pagination options on the
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-projects.html#list-branches[
-list branches] endpoint.
+List Branches] endpoint.
 
 * Add new
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-projects.html#list-tags[
-list tags] endpoint.
+List Tags] endpoint.
 
 * Add new
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-projects.html#get-tag[
-get tag] endpoint.
+Get Tag] endpoint.
 
 
 Configuration
@@ -281,12 +320,20 @@
 ~~~~~~
 
 * Allow to enable the http daemon when running in slave mode.
-
++
 The `--enable-httpd` option can be used in conjunction with the `--slave` option
 to allow clients to fetch from the slave over the http protocol.
++
+HTTP Authentication may also be used when running in slave mode.
 
 * Include the submitter's name in the change message when a change is submitted.
 
+* Add a message to changes created via cherry pick.
++
+When a change is cherry-picked to another branch using the cherry-pick action,
+the message 'Patch Set <number>: Cherry Picked from branch <name>.' is added as
+a change message on the created change.
+
 
 ssh
 ~~~
@@ -410,22 +457,39 @@
 * Sort list of updated changes in output from push.
 
 * link:https://code.google.com/p/gerrit/issues/detail?id=2940[Issue 2940]:
-Improve warning messages when Change-Id is missing in the commit message.
+Improve warning messages when `Change-Id` is missing in the commit message.
 
 ** Add a hint to amend the commit after installing the commit-msg hook.
-** Don't show 'Suggestion for commit message' when Change-Id is missing.
+** Don't show 'Suggestion for commit message' when `Change-Id` is missing.
+
+* Allow to publish draft patch sets even when `allowDrafts` is false.
++
+If a user uploaded a change while `allowDrafts` was enabled, and then it was
+disabled by the administrator, the uploaded change could not be published and
+was stuck in the draft state.
+
+
+Authentication
+~~~~~~~~~~~~~~
+
+* Improve LDAP login times and transfer 40x less data.
++
+When recursively expanding LDAP groups, all attributes were fetched. However
+only one of the attributes is actually needed. By fetching only that attribute,
+the amount of data transferred is significantly reduced and the login time is
+decreased.
 
 
 Secondary Index / Search
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 * link:https://code.google.com/p/gerrit/issues/detail?id=2822[Issue 2822]:
-Improve Lucene analysis of words linked with '_' or '.'.
+Improve Lucene analysis of words linked with underscore or dot.
 +
-Instead of treating words linked with '_' or '.' as one word, Lucene now
+Instead of treating words linked with underscore or dot as one word, Lucene now
 treats them as separate words.
 
-* Fix support for change~branch~id in query syntax.
+* Fix support for `change~branch~id` in query syntax.
 
 
 Configuration
@@ -454,6 +518,22 @@
 For changes in the 'Related Changes' tab that are closed the link was
 bringing the user to GitWeb, and not as expected to the change screen.
 
+* link:http://code.google.com/p/gerrit/issues/detail?id=3147[Issue 3147]:
+Allow to disable muting of common path prefixes in the file list.
++
+In the file table, parts of the file path that are common to the file previously
+listed are muted. The purpose of this is to make it easier to see files that all
+belong under the same path, but some users find it annoying.
++
+This feature can now be enabled or disabled, per user, with the 'Mute Common
+Path Prefixes In File List' setting.
+
+* link:http://code.google.com/p/gerrit/issues/detail?id=3130[Issue 3130]:
+Remove special handling of 'LGTM' in review comments
++
+Typing 'LGTM' in the review cover message no longer automatically selects the
+highest available Code-Review score.
+
 * Show a confirmation dialog before deleting a draft change or patch set.
 +
 Previously there was no confirmation and a draft change or revision patch
@@ -497,8 +577,8 @@
 +
 When a cherry-pick operation failed with 'Cherry pick failed' error, there was no
 way to know the reason for the failure: merge conflict or the commit is already
-on the target branch.  These failures are now differentiated and a proper error
-is reported to the client.
+on the target branch.  These failures are now differentiated and an appropriate
+error is reported.
 
 * link:https://code.google.com/p/gerrit/issues/detail?id=2837[Issue 2837]:
 Improve display of long user names for collapsed comments in history.
@@ -535,6 +615,18 @@
 If a change from the 'Same Topic' tab was clicked, the selected tab would reset
 to the default tab ('Related Changes').
 
+* Left-align column titles in the file list.
+
+* Increase right margin of download box to make space for scrollbar.
++
+Under some circumstances the browser's scrollbar would be shown over the
+copy-to-clipboard icons in the download dropdown.
+
+* Display +1 score's text next to the checkbox for simple boolean labels.
++
+In the reply box, the text of the label score is displayed on the right hand
+side when a score is selected, but this was missing for simple boolean labels.
+
 
 Side-By-Side Diff
 ^^^^^^^^^^^^^^^^^
@@ -579,6 +671,15 @@
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-changes.html#suggest-reviewers[
 suggest reviewers] endpoint.
 
+* Return correct response from 'delete draft' endpoints.
++
+When the `change.allowDrafts` setting is False, it is not allowed to delete
+draft changes or patch sets.
++
+In this case the response `405 Method Not Allowed` is now returned, instead of
+`409 Conflict`.
+
+
 Projects
 ^^^^^^^^
 
@@ -587,6 +688,33 @@
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-projects.html#list-projects[
 list projects] endpoint.
 
+* link:https://code.google.com/p/gerrit/issues/detail?id=2706[Issue 2706]:
+Do not delete branches concurrently.
++
+Deleting multiple branches from the UI was resulting in a server error when
+branches were in the packed-refs.
+
+* Add retry logic for lock failure when deleting a branch.
+
+* link:http://code.google.com/p/gerrit/issues/detail?id=3153[Issue 3153]:
+Fix handling of project names ending with `.git`.
++
+The projects REST API documentation states that the `.git` suffix will be
+stripped off the input project name, if present.
++
+This was working for the 'Create Project' endpoint, but not for any of the
+others.
+
+
+Plugins
+~~~~~~~
+
+Replication
+^^^^^^^^^^^
+
+* Create missing repositories on the remote when replicating with the git
+protocol.
+
 
 Upgrades
 --------
diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ConfigAnnotationParser.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ConfigAnnotationParser.java
index 41df3e6..07d0f50 100644
--- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ConfigAnnotationParser.java
+++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ConfigAnnotationParser.java
@@ -42,7 +42,7 @@
     return cfg;
   }
 
-  static private void parseAnnotation(Config cfg, GerritConfig c) {
+  private static void parseAnnotation(Config cfg, GerritConfig c) {
     ArrayList<String> l = Lists.newArrayList(splitter.split(c.name()));
     if (l.size() == 2) {
       cfg.setString(l.get(0), null, l.get(1), c.value());
diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java
index 371a472..e578aad 100644
--- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java
+++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/edit/ChangeEditIT.java
@@ -77,12 +77,13 @@
 
 public class ChangeEditIT extends AbstractDaemonTest {
 
-  private final static String FILE_NAME = "foo";
-  private final static String FILE_NAME2 = "foo2";
-  private final static String FILE_NAME3 = "foo3";
-  private final static byte[] CONTENT_OLD = "bar".getBytes(UTF_8);
-  private final static byte[] CONTENT_NEW = "baz".getBytes(UTF_8);
-  private final static byte[] CONTENT_NEW2 = "quxÄÜÖßµ".getBytes(UTF_8);
+  private static final String FILE_NAME = "foo";
+  private static final String FILE_NAME2 = "foo2";
+  private static final String FILE_NAME3 = "foo3";
+  private static final byte[] CONTENT_OLD = "bar".getBytes(UTF_8);
+  private static final byte[] CONTENT_NEW = "baz".getBytes(UTF_8);
+  private static final String CONTENT_NEW2_STR = "quxÄÜÖßµ";
+  private static final byte[] CONTENT_NEW2 = CONTENT_NEW2_STR.getBytes(UTF_8);
 
   @Inject
   private SchemaFactory<ReviewDb> reviewDbProvider;
@@ -302,7 +303,7 @@
         .isEqualTo(SC_NOT_FOUND);
     EditMessage.Input in = new EditMessage.Input();
     in.message = String.format("New commit message\n\n" +
-        CONTENT_NEW2 + "\n\nChange-Id: %s",
+        CONTENT_NEW2_STR + "\n\nChange-Id: %s",
         change.getKey());
     assertThat(adminSession.put(urlEditMessage(), in).getStatusCode())
         .isEqualTo(SC_NO_CONTENT);
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java b/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
index 98beecf..c45d9f9 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/IoUtil.java
@@ -46,6 +46,7 @@
           try {
             src.close();
           } catch (IOException e2) {
+            // Ignore
           }
         }
       }
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java
index 454324b..4ed296f 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/ParameterizedString.java
@@ -145,7 +145,7 @@
     }
   }
 
-  private static abstract class Format {
+  private abstract static class Format {
     abstract void format(StringBuilder b, Map<String, String> p);
   }
 
@@ -200,7 +200,7 @@
     }
   }
 
-  private static abstract class Function {
+  private abstract static class Function {
     abstract String apply(String a);
   }
 
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/PatchSetPublishDetail.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/PatchSetPublishDetail.java
deleted file mode 100644
index a9b6335..0000000
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/PatchSetPublishDetail.java
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2009 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.common.data;
-
-import com.google.gerrit.reviewdb.client.Change;
-import com.google.gerrit.reviewdb.client.PatchLineComment;
-import com.google.gerrit.reviewdb.client.PatchSetInfo;
-
-import java.util.List;
-
-public class PatchSetPublishDetail {
-  protected AccountInfoCache accounts;
-  protected PatchSetInfo patchSetInfo;
-  protected Change change;
-  protected List<PatchLineComment> drafts;
-  protected List<SubmitRecord> submitRecords;
-  protected SubmitTypeRecord submitTypeRecord;
-  protected boolean canSubmit;
-
-  public void setSubmitTypeRecord(SubmitTypeRecord submitTypeRecord) {
-    this.submitTypeRecord = submitTypeRecord;
-  }
-
-  public SubmitTypeRecord getSubmitTypeRecord() {
-    return submitTypeRecord;
-  }
-
-  public void setAccounts(AccountInfoCache accounts) {
-    this.accounts = accounts;
-  }
-
-  public void setPatchSetInfo(PatchSetInfo patchSetInfo) {
-    this.patchSetInfo = patchSetInfo;
-  }
-
-  public void setChange(Change change) {
-    this.change = change;
-  }
-
-  public void setDrafts(List<PatchLineComment> drafts) {
-    this.drafts = drafts;
-  }
-
-  public void setCanSubmit(boolean allowed) {
-    canSubmit = allowed;
-  }
-
-  public AccountInfoCache getAccounts() {
-    return accounts;
-  }
-
-  public Change getChange() {
-    return change;
-  }
-
-  public PatchSetInfo getPatchSetInfo() {
-    return patchSetInfo;
-  }
-
-  public List<PatchLineComment> getDrafts() {
-    return drafts;
-  }
-
-  public boolean canSubmit() {
-    return canSubmit;
-  }
-}
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java
index bd05baf..3ba7adf 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/PermissionRule.java
@@ -182,10 +182,14 @@
     }
 
     if (canUseRange && (getMin() != 0 || getMax() != 0)) {
-      if (0 <= getMin()) r.append('+');
+      if (0 <= getMin()) {
+        r.append('+');
+      }
       r.append(getMin());
       r.append("..");
-      if (0 <= getMax()) r.append('+');
+      if (0 <= getMax()) {
+        r.append('+');
+      }
       r.append(getMax());
       r.append(' ');
     }
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ReviewerInfo.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/ReviewerInfo.java
deleted file mode 100644
index 28a8340..0000000
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/ReviewerInfo.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (C) 2011 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.common.data;
-
-/**
- * Suggested reviewer for a change. Can be a user ({@link AccountInfo}) or a
- * group ({@link GroupReference}).
- */
-public class ReviewerInfo implements Comparable<ReviewerInfo> {
-  private AccountInfo accountInfo;
-  private GroupReference groupReference;
-
-  protected ReviewerInfo() {
-  }
-
-  public ReviewerInfo(final AccountInfo accountInfo) {
-    this.accountInfo = accountInfo;
-  }
-
-  public ReviewerInfo(final GroupReference groupReference) {
-    this.groupReference = groupReference;
-  }
-
-  public AccountInfo getAccountInfo() {
-    return accountInfo;
-  }
-
-  public GroupReference getGroup() {
-    return groupReference;
-  }
-
-  @Override
-  public int compareTo(final ReviewerInfo o) {
-    return getSortValue().compareTo(o.getSortValue());
-  }
-
-  private String getSortValue() {
-    if (accountInfo != null) {
-      if (accountInfo.getPreferredEmail() != null) {
-        return accountInfo.getPreferredEmail();
-      }
-      return accountInfo.getFullName();
-    }
-    return groupReference.getName();
-  }
-}
diff --git a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/webui/WebLink.java b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/webui/WebLink.java
index 998638c..e497f7d 100644
--- a/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/webui/WebLink.java
+++ b/gerrit-extension-api/src/main/java/com/google/gerrit/extensions/webui/WebLink.java
@@ -28,18 +28,18 @@
     /**
      * Opens the link in a new window or tab
      */
-    public final static String BLANK = "_blank";
+    public static final String BLANK = "_blank";
     /**
      * Opens the link in the frame it was clicked.
      */
-    public final static String SELF = "_self";
+    public static final String SELF = "_self";
     /**
      * Opens link in parent frame.
      */
-    public final static String PARENT = "_parent";
+    public static final String PARENT = "_parent";
     /**
      * Opens link in the full body of the window.
      */
-    public final static String TOP = "_top";
+    public static final String TOP = "_top";
   }
 }
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/globalkey/client/NpFlowPanel.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/globalkey/client/NpFlowPanel.java
deleted file mode 100644
index 7ae7fd0..0000000
--- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/globalkey/client/NpFlowPanel.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2013 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gwtexpui.globalkey.client;
-
-import com.google.gwt.event.dom.client.KeyPressEvent;
-import com.google.gwt.user.client.ui.FlowPanel;
-
-public class NpFlowPanel extends FlowPanel {
-  public NpFlowPanel() {
-    addDomHandler(GlobalKey.STOP_PROPAGATION, KeyPressEvent.getType());
-  }
-}
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtmlBuilder.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtmlBuilder.java
index 75337ac..69da38d 100644
--- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtmlBuilder.java
+++ b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtmlBuilder.java
@@ -402,7 +402,7 @@
     return isElementName(name);
   }
 
-  private static abstract class Impl {
+  private abstract static class Impl {
     abstract void escapeStr(SafeHtmlBuilder b, String in);
   }
 
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java
index 6d94f1d..e2bf142 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java
@@ -895,7 +895,7 @@
     return token.substring(prefixlen);
   }
 
-  private static abstract class AsyncSplit implements RunAsyncCallback {
+  private abstract static class AsyncSplit implements RunAsyncCallback {
     private final boolean isReloadUi;
     protected final String token;
 
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
index 5596ace..36cb765 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
@@ -21,7 +21,7 @@
 contextWholeFile = Whole File
 buttonSaveChanges = Save Changes
 showRelativeDateInChangeTable = Show Relative Dates In Changes Table
-showSizeBarInChangeTable = Show Change Sizes As Colored Bars In Changes Table
+showSizeBarInChangeTable = Show Change Sizes As Colored Bars
 showLegacycidInChangeTable = Show Change Number In Changes Table
 muteCommonPathPrefixes = Mute Common Path Prefixes In File List
 myMenu = My Menu
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountInfo.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountInfo.java
index 3ac626c..1127374 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountInfo.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountInfo.java
@@ -56,7 +56,7 @@
   }
 
   public static class AvatarInfo extends JavaScriptObject {
-    public final static int DEFAULT_SIZE = 26;
+    public static final int DEFAULT_SIZE = 26;
     public final native String url() /*-{ return this.url }-*/;
     public final native int height() /*-{ return this.height || 0 }-*/;
     public final native int width() /*-{ return this.width || 0 }-*/;
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
index 20ff993..86f543a 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.java
@@ -143,4 +143,7 @@
   String buttonCreateDescription();
   String buttonCreateChange();
   String buttonCreateChangeDescription();
+  String buttonEditConfig();
+  String buttonEditConfigDescription();
+  String editConfigMessage();
 }
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
index 26b8123..4446354 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
@@ -167,3 +167,6 @@
 buttonCreateDescription = Insert the description of the change.
 buttonCreateChange = Create Change
 buttonCreateChangeDescription = Create change directly in the browser.
+buttonEditConfig = Edit Config
+buttonEditConfigDescription = Creates a change to edit the project configuration in the browser.
+editConfigMessage = Edit Project Config
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/EditConfigAction.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/EditConfigAction.java
new file mode 100644
index 0000000..86a31ee
--- /dev/null
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/EditConfigAction.java
@@ -0,0 +1,45 @@
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.client.admin;
+
+import com.google.gerrit.client.Dispatcher;
+import com.google.gerrit.client.Gerrit;
+import com.google.gerrit.client.changes.ChangeApi;
+import com.google.gerrit.client.changes.ChangeInfo;
+import com.google.gerrit.client.rpc.GerritCallback;
+import com.google.gerrit.reviewdb.client.PatchSet;
+import com.google.gerrit.reviewdb.client.RefNames;
+import com.google.gwt.user.client.ui.Button;
+
+public class EditConfigAction {
+  static void call(final Button b, final String project) {
+    b.setEnabled(false);
+
+    ChangeApi.createChange(project, RefNames.REFS_CONFIG,
+        Util.C.editConfigMessage(), null, new GerritCallback<ChangeInfo>() {
+          @Override
+          public void onSuccess(ChangeInfo result) {
+            Gerrit.display(Dispatcher.toEditScreen(
+                new PatchSet.Id(result.legacy_id(), 1), "project.config"));
+          }
+
+          @Override
+          public void onFailure(Throwable caught) {
+            b.setEnabled(true);
+            super.onFailure(caught);
+          }
+        });
+  }
+}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java
index e1fb925..6cb9295 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/ProjectInfoScreen.java
@@ -581,6 +581,10 @@
     if (showCreateChange) {
       actionsPanel.add(createChangeAction());
     }
+
+    if (isOwner) {
+      actionsPanel.add(createEditConfigAction());
+    }
   }
 
   private Button createChangeAction() {
@@ -596,6 +600,19 @@
     return createChange;
   }
 
+  private Button createEditConfigAction() {
+    final Button editConfig = new Button(Util.C.buttonEditConfig());
+    editConfig.setStyleName("");
+    editConfig.setTitle(Util.C.buttonEditConfigDescription());
+    editConfig.addClickHandler(new ClickHandler() {
+      @Override
+      public void onClick(ClickEvent event) {
+        EditConfigAction.call(editConfig, getProjectKey().get());
+      }
+    });
+    return editConfig;
+  }
+
   private void doSave() {
     enableForm(false);
     saveProject.setEnabled(false);
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java
index 88f8408..8a27fd0 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java
@@ -191,6 +191,7 @@
   @UiField Button reviewMode;
   @UiField Button addFile;
   @UiField Button deleteFile;
+  @UiField Button renameFile;
   @UiField Button expandAll;
   @UiField Button collapseAll;
   @UiField QuickApprove quickApprove;
@@ -201,6 +202,7 @@
   private DownloadAction downloadAction;
   private AddFileAction addFileAction;
   private DeleteFileAction deleteFileAction;
+  private RenameFileAction renameFileAction;
 
   public ChangeScreen(Change.Id changeId, String base, String revision,
       boolean openReplyBox, FileTable.Mode mode) {
@@ -486,6 +488,7 @@
         editMode.setVisible(fileTableMode == FileTable.Mode.REVIEW);
         addFile.setVisible(!editMode.isVisible());
         deleteFile.setVisible(!editMode.isVisible());
+        renameFile.setVisible(!editMode.isVisible());
         reviewMode.setVisible(!editMode.isVisible());
         addFileAction = new AddFileAction(
             changeId, info.revision(revision),
@@ -493,6 +496,9 @@
         deleteFileAction = new DeleteFileAction(
             changeId, info.revision(revision),
             style, addFile);
+        renameFileAction = new RenameFileAction(
+            changeId, info.revision(revision),
+            style, addFile);
       } else {
         editMode.setVisible(false);
         addFile.setVisible(false);
@@ -670,6 +676,7 @@
     editMode.setVisible(false);
     addFile.setVisible(true);
     deleteFile.setVisible(true);
+    renameFile.setVisible(true);
     reviewMode.setVisible(true);
   }
 
@@ -680,6 +687,7 @@
     editMode.setVisible(true);
     addFile.setVisible(false);
     deleteFile.setVisible(false);
+    renameFile.setVisible(false);
     reviewMode.setVisible(false);
   }
 
@@ -693,6 +701,11 @@
     deleteFileAction.onDelete();
   }
 
+  @UiHandler("renameFile")
+  void onRenameFile(@SuppressWarnings("unused") ClickEvent e) {
+    renameFileAction.onRename();
+  }
+
   private void refreshFileTable() {
     int idx = diffBase.getSelectedIndex();
     if (0 <= idx) {
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.ui.xml b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.ui.xml
index 280455a..6f8d3aa 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.ui.xml
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.ui.xml
@@ -496,6 +496,13 @@
         <ui:attribute name='title'/>
         <div><ui:msg>Delete&#8230;</ui:msg></div>
       </g:Button>
+      <g:Button ui:field='renameFile'
+         title='Rename file in the repository'
+         styleName=''
+         visible='false'>
+        <ui:attribute name='title'/>
+        <div><ui:msg>Rename&#8230;</ui:msg></div>
+      </g:Button>
       <div class='{style.headerButtons}'>
         <g:Button ui:field='openAll'
             styleName=''
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/FileTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/FileTable.java
index d0038e3..fc62c46 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/FileTable.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/FileTable.java
@@ -442,6 +442,7 @@
     private final NativeMap<JsArray<CommentInfo>> comments;
     private final NativeMap<JsArray<CommentInfo>> drafts;
     private final boolean hasUser;
+    private final boolean showChangeSizeBars;
     private boolean attached;
     private int row;
     private double start;
@@ -462,6 +463,8 @@
       this.comments = comments;
       this.drafts = drafts;
       this.hasUser = Gerrit.isSignedIn();
+      this.showChangeSizeBars = !hasUser
+          || Gerrit.getUserAccount().getGeneralPreferences().isSizeBarInChangeTable();
       myTable.addStyleName(R.css().table());
     }
 
@@ -721,14 +724,27 @@
     private void columnDelta1(SafeHtmlBuilder sb, FileInfo info) {
       sb.openTd().setStyleName(R.css().deltaColumn1());
       if (!Patch.COMMIT_MSG.equals(info.path()) && !info.binary()) {
-        sb.append(info.lines_inserted() + info.lines_deleted());
+        if (showChangeSizeBars) {
+          sb.append(info.lines_inserted() + info.lines_deleted());
+        } else if (!ChangeType.DELETED.matches(info.status())) {
+          if (ChangeType.ADDED.matches(info.status())) {
+            sb.append(info.lines_inserted())
+              .append(" lines");
+          } else {
+            sb.append("+")
+              .append(info.lines_inserted())
+              .append(", -")
+              .append(info.lines_deleted());
+          }
+        }
       }
       sb.closeTd();
     }
 
     private void columnDelta2(SafeHtmlBuilder sb, FileInfo info) {
       sb.openTd().setStyleName(R.css().deltaColumn2());
-      if (!Patch.COMMIT_MSG.equals(info.path()) && !info.binary()
+      if (showChangeSizeBars
+          && !Patch.COMMIT_MSG.equals(info.path()) && !info.binary()
           && (info.lines_inserted() != 0 || info.lines_deleted() != 0)) {
         int w = 80;
         int t = inserted + deleted;
@@ -775,26 +791,28 @@
 
       // delta2
       sb.openTh().setStyleName(R.css().deltaColumn2());
-      int w = 80;
-      int t = inserted + deleted;
-      int i = Math.max(1, (int) (((double) w) * inserted / t));
-      int d = Math.max(1, (int) (((double) w) * deleted / t));
-      if (i + d > w && i > d) {
-        i = w - d;
-      } else if (i + d > w && d > i) {
-        d = w - i;
-      }
-      if (0 < inserted) {
-        sb.openDiv()
-        .setStyleName(R.css().inserted())
-        .setAttribute("style", "width:" + i + "px")
-        .closeDiv();
-      }
-      if (0 < deleted) {
-        sb.openDiv()
-          .setStyleName(R.css().deleted())
-          .setAttribute("style", "width:" + d + "px")
+      if (showChangeSizeBars) {
+        int w = 80;
+        int t = inserted + deleted;
+        int i = Math.max(1, (int) (((double) w) * inserted / t));
+        int d = Math.max(1, (int) (((double) w) * deleted / t));
+        if (i + d > w && i > d) {
+          i = w - d;
+        } else if (i + d > w && d > i) {
+          d = w - i;
+        }
+        if (0 < inserted) {
+          sb.openDiv()
+          .setStyleName(R.css().inserted())
+          .setAttribute("style", "width:" + i + "px")
           .closeDiv();
+        }
+        if (0 < deleted) {
+          sb.openDiv()
+            .setStyleName(R.css().deleted())
+            .setAttribute("style", "width:" + d + "px")
+            .closeDiv();
+        }
       }
       sb.closeTh();
 
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileAction.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileAction.java
new file mode 100644
index 0000000..1f11e65
--- /dev/null
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileAction.java
@@ -0,0 +1,71 @@
+//Copyright (C) 2015 The Android Open Source Project
+//
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+
+package com.google.gerrit.client.change;
+
+import com.google.gerrit.client.changes.ChangeInfo.RevisionInfo;
+import com.google.gerrit.reviewdb.client.Change;
+import com.google.gwt.event.logical.shared.CloseEvent;
+import com.google.gwt.event.logical.shared.CloseHandler;
+import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwtexpui.globalkey.client.GlobalKey;
+import com.google.gwtexpui.user.client.PluginSafePopupPanel;
+
+class RenameFileAction {
+  private final Change.Id changeId;
+  private final RevisionInfo revision;
+  private final ChangeScreen.Style style;
+  private final Widget renameButton;
+
+  private RenameFileBox renameBox;
+  private PopupPanel popup;
+
+  RenameFileAction(Change.Id changeId, RevisionInfo revision,
+      ChangeScreen.Style style, Widget renameButton) {
+    this.changeId = changeId;
+    this.revision = revision;
+    this.style = style;
+    this.renameButton = renameButton;
+  }
+
+  void onRename() {
+    if (popup != null) {
+      popup.hide();
+      return;
+    }
+
+    if (renameBox == null) {
+      renameBox = new RenameFileBox(changeId, revision);
+    }
+    renameBox.clearPath();
+
+    final PluginSafePopupPanel p = new PluginSafePopupPanel(true);
+    p.setStyleName(style.replyBox());
+    p.addAutoHidePartner(renameButton.getElement());
+    p.addCloseHandler(new CloseHandler<PopupPanel>() {
+      @Override
+      public void onClose(CloseEvent<PopupPanel> event) {
+        if (popup == p) {
+          popup = null;
+        }
+      }
+    });
+    p.add(renameBox);
+    p.showRelativeTo(renameButton);
+    GlobalKey.dialog(p);
+    renameBox.setFocus(true);
+    popup = p;
+  }
+}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.java
new file mode 100644
index 0000000..77348f7
--- /dev/null
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.java
@@ -0,0 +1,107 @@
+//Copyright (C) 2015 The Android Open Source Project
+//
+//Licensed under the Apache License, Version 2.0 (the "License");
+//you may not use this file except in compliance with the License.
+//You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing, software
+//distributed under the License is distributed on an "AS IS" BASIS,
+//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//See the License for the specific language governing permissions and
+//limitations under the License.
+
+package com.google.gerrit.client.change;
+
+import com.google.gerrit.client.Gerrit;
+import com.google.gerrit.client.VoidResult;
+import com.google.gerrit.client.changes.ChangeEditApi;
+import com.google.gerrit.client.changes.ChangeInfo.RevisionInfo;
+import com.google.gerrit.client.ui.RemoteSuggestBox;
+import com.google.gerrit.common.PageLinks;
+import com.google.gerrit.reviewdb.client.Change;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.logical.shared.CloseEvent;
+import com.google.gwt.event.logical.shared.CloseHandler;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwtexpui.globalkey.client.NpTextBox;
+
+class RenameFileBox extends Composite {
+  interface Binder extends UiBinder<HTMLPanel, RenameFileBox> {}
+  private static final Binder uiBinder = GWT.create(Binder.class);
+
+  private final Change.Id changeId;
+
+  @UiField Button rename;
+  @UiField Button cancel;
+
+  @UiField(provided = true)
+  RemoteSuggestBox path;
+  @UiField NpTextBox newPath;
+
+  RenameFileBox(Change.Id changeId, RevisionInfo revision) {
+    this.changeId = changeId;
+
+    path = new RemoteSuggestBox(new PathSuggestOracle(changeId, revision));
+    path.addCloseHandler(new CloseHandler<RemoteSuggestBox>() {
+      @Override
+      public void onClose(CloseEvent<RemoteSuggestBox> event) {
+        hide();
+      }
+    });
+
+    initWidget(uiBinder.createAndBindUi(this));
+  }
+
+  void setFocus(boolean focus) {
+    path.setFocus(focus);
+  }
+
+  void clearPath() {
+    path.setText("");
+  }
+
+  @UiHandler("rename")
+  void onRename(@SuppressWarnings("unused") ClickEvent e) {
+    rename(path.getText(), newPath.getText());
+  }
+
+  private void rename(String path, String newPath) {
+    hide();
+    ChangeEditApi.rename(changeId.get(), path, newPath,
+        new AsyncCallback<VoidResult>() {
+          @Override
+          public void onSuccess(VoidResult result) {
+            Gerrit.display(PageLinks.toChangeInEditMode(changeId));
+          }
+
+          @Override
+          public void onFailure(Throwable caught) {
+          }
+        });
+  }
+
+  @UiHandler("cancel")
+  void onCancel(@SuppressWarnings("unused") ClickEvent e) {
+    hide();
+  }
+
+  private void hide() {
+    for (Widget w = getParent(); w != null; w = w.getParent()) {
+      if (w instanceof PopupPanel) {
+        ((PopupPanel) w).hide();
+        break;
+      }
+    }
+  }
+}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.ui.xml b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.ui.xml
new file mode 100644
index 0000000..27849ee
--- /dev/null
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RenameFileBox.ui.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (C) 2013 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<ui:UiBinder
+    xmlns:ui='urn:ui:com.google.gwt.uibinder'
+    xmlns:c='urn:import:com.google.gwtexpui.globalkey.client'
+    xmlns:u='urn:import:com.google.gerrit.client.ui'
+    xmlns:g='urn:import:com.google.gwt.user.client.ui'>
+  <ui:with field='res' type='com.google.gerrit.client.change.Resources'/>
+  <ui:style>
+    .cancel { float: right; }
+  </ui:style>
+  <g:HTMLPanel>
+    <div class='{res.style.section}'>
+      <ui:msg>Old: <u:RemoteSuggestBox ui:field='path' visibleLength='86'/></ui:msg>
+    </div>
+    <div class='{res.style.section}'>
+      <ui:msg>New: <c:NpTextBox ui:field='newPath' visibleLength='86'/></ui:msg>
+    </div>
+    <div class='{res.style.section}'>
+      <g:Button ui:field='rename'
+          title='Rename file in the repository'
+          styleName='{res.style.button}'>
+        <ui:attribute name='title'/>
+        <div><ui:msg>Rename</ui:msg></div>
+      </g:Button>
+      <g:Button ui:field='cancel'
+          styleName='{res.style.button}'
+          addStyleNames='{style.cancel}'>
+          <div>Cancel</div>
+      </g:Button>
+    </div>
+  </g:HTMLPanel>
+</ui:UiBinder>
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java
index fd9f4bc..f9054fe 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ReplyBox.java
@@ -351,7 +351,6 @@
     final String id = lv.info.name();
     final CheckBox b = new CheckBox();
     b.setText(id);
-    b.setTitle(lv.info.value_text("+1"));
     b.setEnabled(lv.permitted.contains((short) 1));
     if (self != null && self.value() == 1) {
       b.setValue(true);
@@ -364,6 +363,10 @@
     });
     b.setStyleName(style.label_name());
     labelsTable.setWidget(row, 0, b);
+
+    CellFormatter fmt = labelsTable.getCellFormatter();
+    fmt.setStyleName(row, labelHelpColumn, style.label_help());
+    labelsTable.setText(row, labelHelpColumn, lv.info.value_text("+1"));
   }
 
   private static boolean isCheckBox(Set<Short> values) {
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeEditApi.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeEditApi.java
index 22204dc..a00e329 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeEditApi.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeEditApi.java
@@ -72,6 +72,15 @@
     editFile(id, path).delete(cb);
   }
 
+  /** Rename a file in the pending edit. */
+  public static void rename(int id, String path, String newPath,
+      AsyncCallback<VoidResult> cb) {
+    Input in = Input.create();
+    in.old_path(path);
+    in.new_path(newPath);
+    ChangeApi.edit(id).post(in, cb);
+  }
+
   /** Restore (undo delete/modify) a file in the pending edit. */
   public static void restore(int id, String path, AsyncCallback<VoidResult> cb) {
     Input in = Input.create();
@@ -93,6 +102,8 @@
     }
 
     final native void restore_path(String p) /*-{ this.restore_path=p }-*/;
+    final native void old_path(String p) /*-{ this.old_path=p }-*/;
+    final native void new_path(String p) /*-{ this.new_path=p }-*/;
 
     protected Input() {
     }
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/editor/EditScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/editor/EditScreen.java
index 37e4f13a..5cf7d62 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/editor/EditScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/editor/EditScreen.java
@@ -130,7 +130,7 @@
     super.onLoad();
 
     CallbackGroup group1 = new CallbackGroup();
-    CallbackGroup group2 = new CallbackGroup();
+    final CallbackGroup group2 = new CallbackGroup();
     final CallbackGroup group3 = new CallbackGroup();
 
     CodeMirror.initLibrary(group1.add(new AsyncCallback<Void>() {
@@ -140,6 +140,9 @@
       public void onSuccess(Void result) {
         // Load theme after CM library to ensure theme can override CSS.
         ThemeLoader.loadTheme(prefs.theme(), themeCallback);
+
+        group2.done();
+        group3.done();
       }
 
       @Override
@@ -229,8 +232,6 @@
       }
     });
     group1.done();
-    group2.done();
-    group3.done();
   }
 
   @Override
diff --git a/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java b/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java
index 474b284..4ee9676 100644
--- a/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java
+++ b/gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java
@@ -294,8 +294,8 @@
     return name;
   }
 
-  private volatile static File myArchive;
-  private volatile static File myHome;
+  private static volatile File myArchive;
+  private static volatile File myHome;
 
   /**
    * Locate the JAR/WAR file we were launched from.
diff --git a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
index 4248e54..bf19352 100644
--- a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
+++ b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/Plugin.java
@@ -96,7 +96,7 @@
 
   native void _initialized() /*-{ this._success = true }-*/;
   native void _loaded() /*-{ this._loadedGwt() }-*/;
-  private static native final Plugin install(String u)
+  private static final native Plugin install(String u)
   /*-{ return $wnd.Gerrit.installGwt(u) }-*/;
 
   private static final native JavaScriptObject wrap(Screen.EntryPoint b) /*-{
diff --git a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/rpc/RestApi.java b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/rpc/RestApi.java
index cfbc8a5..8b2a6b8 100644
--- a/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/rpc/RestApi.java
+++ b/gerrit-plugin-gwtui/src/main/java/com/google/gerrit/plugin/client/rpc/RestApi.java
@@ -109,7 +109,7 @@
     get(NativeString.unwrap(cb));
   }
 
-  private native static void get(String p, JavaScriptObject r)
+  private static native void get(String p, JavaScriptObject r)
   /*-{ $wnd.Gerrit.get(p, r) }-*/;
 
   public <T extends JavaScriptObject>
@@ -117,7 +117,7 @@
     put(path(), wrap(cb));
   }
 
-  private native static void put(String p, JavaScriptObject r)
+  private static native void put(String p, JavaScriptObject r)
   /*-{ $wnd.Gerrit.put(p, r) }-*/;
 
   public <T extends JavaScriptObject>
@@ -125,7 +125,7 @@
     put(path(), content, wrap(cb));
   }
 
-  private native static
+  private static native
   void put(String p, String c, JavaScriptObject r)
   /*-{ $wnd.Gerrit.put(p, c, r) }-*/;
 
@@ -134,7 +134,7 @@
     put(path(), content, wrap(cb));
   }
 
-  private native static
+  private static native
   void put(String p, JavaScriptObject c, JavaScriptObject r)
   /*-{ $wnd.Gerrit.put(p, c, r) }-*/;
 
@@ -143,7 +143,7 @@
     post(path(), content, wrap(cb));
   }
 
-  private native static
+  private static native
   void post(String p, String c, JavaScriptObject r)
   /*-{ $wnd.Gerrit.post(p, c, r) }-*/;
 
@@ -152,7 +152,7 @@
     post(path(), content, wrap(cb));
   }
 
-  private native static
+  private static native
   void post(String p, JavaScriptObject c, JavaScriptObject r)
   /*-{ $wnd.Gerrit.post(p, c, r) }-*/;
 
@@ -160,10 +160,10 @@
     delete(path(), wrap(cb));
   }
 
-  private native static void delete(String p, JavaScriptObject r)
+  private static native void delete(String p, JavaScriptObject r)
   /*-{ $wnd.Gerrit.del(p, r) }-*/;
 
-  private native static <T extends JavaScriptObject>
+  private static native <T extends JavaScriptObject>
   JavaScriptObject wrap(AsyncCallback<T> b) /*-{
     return function(r) {
       b.@com.google.gwt.user.client.rpc.AsyncCallback::onSuccess(Ljava/lang/Object;)(r)
diff --git a/gerrit-prettify/src/main/java/com/google/gerrit/prettify/client/PrettyFormatter.java b/gerrit-prettify/src/main/java/com/google/gerrit/prettify/client/PrettyFormatter.java
index 668ebed5..cdf800c 100644
--- a/gerrit-prettify/src/main/java/com/google/gerrit/prettify/client/PrettyFormatter.java
+++ b/gerrit-prettify/src/main/java/com/google/gerrit/prettify/client/PrettyFormatter.java
@@ -28,7 +28,7 @@
 import java.util.Set;
 
 public abstract class PrettyFormatter implements SparseHtmlFile {
-  public static abstract class EditFilter {
+  public abstract static class EditFilter {
     abstract String getStyleName();
 
     abstract int getBegin(Edit edit);
diff --git a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/InheritedBoolean.java b/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/InheritedBoolean.java
deleted file mode 100644
index ce9b0f2..0000000
--- a/gerrit-reviewdb/src/main/java/com/google/gerrit/reviewdb/client/InheritedBoolean.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2012 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.reviewdb.client;
-
-import com.google.gerrit.extensions.client.InheritableBoolean;
-
-public class InheritedBoolean {
-
-  public InheritableBoolean value;
-  public boolean inheritedValue;
-
-  public InheritedBoolean() {
-  }
-
-  public void setValue(final InheritableBoolean value) {
-    this.value = value;
-  }
-
-  public void setInheritedValue(final boolean inheritedValue) {
-    this.inheritedValue = inheritedValue;
-  }
-}
diff --git a/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHookRunner.java b/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHookRunner.java
index 6515d97..086a6d0 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHookRunner.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/common/ChangeHookRunner.java
@@ -927,8 +927,7 @@
           while ((line = br.readLine()) != null) {
             log.info("hook[" + getName() + "] output: " + line);
           }
-        }
-        catch(IOException  iox) {
+        } catch (IOException iox) {
           log.error("Error writing hook output", iox);
         }
       }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/args4j/TimestampHandler.java b/gerrit-server/src/main/java/com/google/gerrit/server/args4j/TimestampHandler.java
index 8dd4270..21ef31a 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/args4j/TimestampHandler.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/args4j/TimestampHandler.java
@@ -31,7 +31,7 @@
 import java.util.TimeZone;
 
 public class TimestampHandler extends OptionHandler<Timestamp> {
-  public final static String TIMESTAMP_FORMAT = "yyyyMMdd_HHmm";
+  public static final String TIMESTAMP_FORMAT = "yyyyMMdd_HHmm";
 
   @Inject
   public TimestampHandler(@Assisted CmdLineParser parser,
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/ConsistencyChecker.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/ConsistencyChecker.java
index 52d2032..ad1e160 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/ConsistencyChecker.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/ConsistencyChecker.java
@@ -72,7 +72,7 @@
       LoggerFactory.getLogger(ConsistencyChecker.class);
 
   @AutoValue
-  public static abstract class Result {
+  public abstract static class Result {
     private static Result create(Change.Id id, List<ProblemInfo> problems) {
       return new AutoValue_ConsistencyChecker_Result(id, null, problems);
     }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java
index f731b5f..81f3b9b 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/GetDiff.java
@@ -70,7 +70,7 @@
 import java.util.concurrent.TimeUnit;
 
 public class GetDiff implements RestReadView<FileResource> {
-  private final static ImmutableMap<Patch.ChangeType, ChangeType> CHANGE_TYPE =
+  private static final ImmutableMap<Patch.ChangeType, ChangeType> CHANGE_TYPE =
       Maps.immutableEnumMap(
           new ImmutableMap.Builder<Patch.ChangeType, ChangeType>()
               .put(Patch.ChangeType.ADDED, ChangeType.ADDED)
@@ -339,11 +339,13 @@
         int lastB = 0;
         for (Edit edit : internalEdit) {
           if (edit.getBeginA() != edit.getEndA()) {
-            e.editA.add(ImmutableList.of(edit.getBeginA() - lastA, edit.getEndA() - edit.getBeginA()));
+            e.editA.add(ImmutableList.of(
+                edit.getBeginA() - lastA, edit.getEndA() - edit.getBeginA()));
             lastA = edit.getEndA();
           }
           if (edit.getBeginB() != edit.getEndB()) {
-            e.editB.add(ImmutableList.of(edit.getBeginB() - lastB, edit.getEndB() - edit.getBeginB()));
+            e.editB.add(ImmutableList.of(
+                edit.getBeginB() - lastB, edit.getEndB() - edit.getBeginB()));
             lastB = edit.getEndB();
           }
         }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/ReviewerSuggestionCache.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/ReviewerSuggestionCache.java
index 83fa938..554d760 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/ReviewerSuggestionCache.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/ReviewerSuggestionCache.java
@@ -34,8 +34,10 @@
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 /**
- * The suggest oracle may be called many times in rapid succession during the course of one operation.
- * It would be easy to have a simple Cache<Boolean, List<Account>> with a short expiration time of 30s.
+ * The suggest oracle may be called many times in rapid succession during the
+ * course of one operation.
+ * It would be easy to have a simple Cache<Boolean, List<Account>> with a short
+ * expiration time of 30s.
  * Cache only has a single key we're just using Cache for the expiration behavior.
  */
 @Singleton
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java
index 6891fc7..6e9b3f2 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/Submit.java
@@ -537,17 +537,23 @@
                 continue;
 
               case REJECT:
-                if (msg.length() > 0) msg.append("; ");
+                if (msg.length() > 0) {
+                  msg.append("; ");
+                }
                 msg.append("blocked by ").append(lbl.label);
                 continue;
 
               case NEED:
-                if (msg.length() > 0) msg.append("; ");
+                if (msg.length() > 0) {
+                  msg.append("; ");
+                }
                 msg.append("needs ").append(lbl.label);
                 continue;
 
               case IMPOSSIBLE:
-                if (msg.length() > 0) msg.append("; ");
+                if (msg.length() > 0) {
+                  msg.append("; ");
+                }
                 msg.append("needs ").append(lbl.label)
                    .append(" (check project access)");
                 continue;
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/config/SitePaths.java b/gerrit-server/src/main/java/com/google/gerrit/server/config/SitePaths.java
index 9d7c54a..fbff7c4 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/config/SitePaths.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/config/SitePaths.java
@@ -100,12 +100,13 @@
 
     if (site_path.exists()) {
       final String[] contents = site_path.list();
-      if (contents != null)
+      if (contents != null) {
         isNew = contents.length == 0;
-      else if (site_path.isDirectory())
+      } else if (site_path.isDirectory()) {
         throw new FileNotFoundException("Cannot access " + site_path);
-      else
+      } else {
         throw new FileNotFoundException("Not a directory: " + site_path);
+      }
     } else {
       isNew = true;
     }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/index/FieldDef.java b/gerrit-server/src/main/java/com/google/gerrit/server/index/FieldDef.java
index 872179d..557faeb 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/index/FieldDef.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/index/FieldDef.java
@@ -32,7 +32,7 @@
  */
 public abstract class FieldDef<I, T> {
   /** Definition of a single (non-repeatable) field. */
-  public static abstract class Single<I, T> extends FieldDef<I, T> {
+  public abstract static class Single<I, T> extends FieldDef<I, T> {
     Single(String name, FieldType<T> type, boolean stored) {
       super(name, type, stored);
     }
@@ -44,7 +44,7 @@
   }
 
   /** Definition of a repeatable field. */
-  public static abstract class Repeatable<I, T>
+  public abstract static class Repeatable<I, T>
       extends FieldDef<I, Iterable<T>> {
     Repeatable(String name, FieldType<T> type, boolean stored) {
       super(name, type, stored);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/AbstractChangeUpdate.java b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/AbstractChangeUpdate.java
index 01fa6b1..fbca668 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/AbstractChangeUpdate.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/AbstractChangeUpdate.java
@@ -182,12 +182,12 @@
   }
 
   /** Writes commit to a BatchMetaDataUpdate without committing the batch. */
-  abstract public void writeCommit(BatchMetaDataUpdate batch)
+  public abstract void writeCommit(BatchMetaDataUpdate batch)
       throws OrmException, IOException;
 
   /**
    * @return the NameKey for the project where the update will be stored,
    *    which is not necessarily the same as the change's project.
    */
-  abstract protected Project.NameKey getProjectName();
+  protected abstract Project.NameKey getProjectName();
 }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeRebuilder.java b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeRebuilder.java
index fb39462..1053f09 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeRebuilder.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeRebuilder.java
@@ -220,7 +220,7 @@
         && event.psId.equals(update.getPatchSetId());
   }
 
-  private static abstract class Event implements Comparable<Event> {
+  private abstract static class Event implements Comparable<Event> {
     final PatchSet.Id psId;
     final Account.Id who;
     final Timestamp when;
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java
index 4961bef..dd67c20 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/IntraLineLoader.java
@@ -178,10 +178,11 @@
               int nb = lf + 1;
               int p = 0;
               while (p < ae - ab) {
-                if (cmp.equals(a, ab + p, a, ab + p))
+                if (cmp.equals(a, ab + p, a, ab + p)) {
                   p++;
-                else
+                } else {
                   break;
+                }
               }
               if (p == ae - ab) {
                 ab = nb;
@@ -214,10 +215,11 @@
               int nb = lf + 1;
               int p = 0;
               while (p < be - bb) {
-                if (cmp.equals(b, bb + p, b, bb + p))
+                if (cmp.equals(b, bb + p, b, bb + p)) {
                   p++;
-                else
+                } else {
                   break;
+                }
               }
               if (p == be - bb) {
                 bb = nb;
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchList.java b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchList.java
index 7d44912..4fff619 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchList.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/patch/PatchList.java
@@ -150,12 +150,13 @@
     while (low < high) {
       final int mid = (low + high) >>> 1;
       final int cmp = patches[mid].getNewName().compareTo(fileName);
-      if (cmp < 0)
+      if (cmp < 0) {
         low = mid + 1;
-      else if (cmp == 0)
+      } else if (cmp == 0) {
         return mid;
-      else
+      } else {
         high = mid;
+      }
     }
     return -(low + 1);
   }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/JarScanner.java b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/JarScanner.java
index 6a65272..df4ead8 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/JarScanner.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/JarScanner.java
@@ -264,7 +264,7 @@
     }
   }
 
-  private static abstract class AbstractAnnotationVisitor extends
+  private abstract static class AbstractAnnotationVisitor extends
       AnnotationVisitor {
     AbstractAnnotationVisitor() {
       super(Opcodes.ASM4);
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginLoader.java b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginLoader.java
index 8b99286..b51359d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginLoader.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/PluginLoader.java
@@ -214,7 +214,7 @@
     }
   }
 
-  synchronized private void unloadPlugin(Plugin plugin) {
+  private synchronized void unloadPlugin(Plugin plugin) {
     persistentCacheFactory.onStop(plugin);
     String name = plugin.getName();
     log.info(String.format("Unloading plugin %s", name));
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/CommentLinkInfo.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/CommentLinkInfo.java
index 4035c7e..a91e745 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/CommentLinkInfo.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/CommentLinkInfo.java
@@ -47,7 +47,7 @@
   public final String html;
   public final Boolean enabled; // null means true
 
-  public transient final String name;
+  public final transient String name;
 
   public CommentLinkInfo(String name, String match, String link, String html,
       Boolean enabled) {
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/SectionSortCache.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/SectionSortCache.java
index 4142a30..9009aad 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/SectionSortCache.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/SectionSortCache.java
@@ -119,7 +119,7 @@
   }
 
   @AutoValue
-  static abstract class EntryKey {
+  abstract static class EntryKey {
     public abstract String ref();
     public abstract List<String> patterns();
     public abstract int cachedHashCode();
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/AndPredicate.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/AndPredicate.java
index 953dabf..39b0fa3 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/query/AndPredicate.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/AndPredicate.java
@@ -92,8 +92,9 @@
 
   @Override
   public boolean equals(final Object other) {
-    if (other == null)
+    if (other == null) {
       return false;
+    }
     return getClass() == other.getClass()
         && getChildren().equals(((Predicate<?>) other).getChildren());
   }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
index 1b3473e..8cca00d 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
@@ -23,7 +23,7 @@
 
 @Singleton
 public class ConflictsCacheImpl implements ConflictsCache {
-  public final static String NAME = "conflicts";
+  public static final String NAME = "conflicts";
 
   public static Module module() {
     return new CacheModule() {
diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/ioutil/BasicSerializationTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/ioutil/BasicSerializationTest.java
index d9f86bd..dbc8f02 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/server/ioutil/BasicSerializationTest.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/server/ioutil/BasicSerializationTest.java
@@ -137,8 +137,9 @@
   private static void assertOutput(final byte[] expect,
       final ByteArrayOutputStream out) {
     final byte[] buf = out.toByteArray();
-    for (int i = 0; i < expect.length; i++)
+    for (int i = 0; i < expect.length; i++) {
       assertEquals(expect[i], buf[i]);
+    }
   }
 
   private static InputStream r(final byte[] buf) {
diff --git a/gerrit-server/src/test/java/com/google/gerrit/testutil/TempFileUtil.java b/gerrit-server/src/test/java/com/google/gerrit/testutil/TempFileUtil.java
index 2f3453b..72c2b5a 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/testutil/TempFileUtil.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/testutil/TempFileUtil.java
@@ -22,7 +22,7 @@
 public class TempFileUtil {
   private static List<File> allDirsCreated = new ArrayList<>();
 
-  public synchronized static File createTempDirectory() throws IOException {
+  public static synchronized File createTempDirectory() throws IOException {
     File tmp = File.createTempFile("gerrit_test_", "").getCanonicalFile();
     if (!tmp.delete() || !tmp.mkdir()) {
       throw new IOException("Cannot create " + tmp.getPath());
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandFactoryProvider.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandFactoryProvider.java
index f7d4f8f..56441fba 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandFactoryProvider.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/CommandFactoryProvider.java
@@ -253,7 +253,7 @@
   }
 
   /** Split a command line into a string array. */
-  static public String[] split(String commandLine) {
+  public static String[] split(String commandLine) {
     final List<String> list = new ArrayList<>();
     boolean inquote = false;
     boolean inDblQuote = false;
diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java
index d95b887..8f26bba 100644
--- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java
+++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/commands/QueryShell.java
@@ -709,7 +709,7 @@
     print(help.toString());
   }
 
-  private static abstract class Function {
+  private abstract static class Function {
     final String name;
 
     Function(final String name) {