Source:
private void onResult(final PatchScript script, final boolean isFirst) { final Change.Key cid = script.getChangeId(); final String path = patchKey.get(); String fileName = path; final int last = fileName.lastIndexOf('/'); if (last >= 0) { fileName = fileName.substring(last + 1); } setWindowTitle(PatchUtil.M.patchWindowTitle(cid.abbreviate(), fileName)); setPageTitle(PatchUtil.M.patchPageTitle(cid.abbreviate(), path)); Util.DETAIL_SVC.changeDetail(currentChangeId, new GerritCallback<ChangeDetail>() { @Override public void onSuccess(ChangeDetail detail) { commitMessageBlock.display(detail.getCurrentPatchSetDetail().getInfo()); } }); historyTable.display(script.getHistory()); historyPanel.setVisible(true); boolean hasEdits = !script.getEdits().isEmpty(); boolean hasMeta = !script.getPatchHeader().isEmpty(); boolean hasDifferences = hasEdits || hasMeta; boolean pureMetaChange = !hasEdits && hasMeta; if (contentTable instanceof SideBySideTable && pureMetaChange) { contentTable.removeFromParent(); contentTable = new UnifiedDiffTable(); contentTable.fileList = fileList; contentPanel.add(contentTable); setToken(Dispatcher.toPatchUnified(patchKey)); } if (hasDifferences) { contentTable.display(patchKey, idSideA, idSideB, script); contentTable.display(script.getCommentDetail()); contentTable.finishDisplay(); } showPatch(hasDifferences); settingsPanel.setEnableSmallFileFeatures(!script.isHugeFile()); settingsPanel.setEnableIntralineDifference(script.hasIntralineDifference()); settingsPanel.setEnabled(true); lastScript = script; if (Gerrit.isSignedIn() && isFirst) { settingsPanel.getReviewedCheckBox().setValue(true); setReviewedByCurrentUser(true ); } }

Target:
private void onResult(final PatchScript script, final boolean isFirst) { final Change.Key cid = script.getChangeId(); final String path = patchKey.get(); String fileName = path; final int last = fileName.lastIndexOf('/'); if (last >= 0) { fileName = fileName.substring(last + 1); } setWindowTitle(PatchUtil.M.patchWindowTitle(cid.abbreviate(), fileName)); setPageTitle(PatchUtil.M.patchPageTitle(cid.abbreviate(), path)); if (idSideB != null) { if (idSideB.equals(cachedPatchSetId)) { commitMessageBlock.display(cachedCommitMessage); } else { fetchCommitMessage(idSideB); } } historyTable.display(script.getHistory()); historyPanel.setVisible(true); boolean hasEdits = !script.getEdits().isEmpty(); boolean hasMeta = !script.getPatchHeader().isEmpty(); boolean hasDifferences = hasEdits || hasMeta; boolean pureMetaChange = !hasEdits && hasMeta; if (contentTable instanceof SideBySideTable && pureMetaChange) { contentTable.removeFromParent(); contentTable = new UnifiedDiffTable(); contentTable.fileList = fileList; contentPanel.add(contentTable); setToken(Dispatcher.toPatchUnified(patchKey)); } if (hasDifferences) { contentTable.display(patchKey, idSideA, idSideB, script); contentTable.display(script.getCommentDetail()); contentTable.finishDisplay(); } showPatch(hasDifferences); settingsPanel.setEnableSmallFileFeatures(!script.isHugeFile()); settingsPanel.setEnableIntralineDifference(script.hasIntralineDifference()); settingsPanel.setEnabled(true); lastScript = script; if (Gerrit.isSignedIn() && isFirst) { settingsPanel.getReviewedCheckBox().setValue(true); setReviewedByCurrentUser(true ); } }