Source:
<code>private void initRevisionsAction(ChangeInfo info, String revision, NativeMap<ActionInfo> actions) { int currentPatchSet; if (info.current_revision() != null && info.revisions().containsKey(info.current_revision())) { currentPatchSet = info.revision(info.current_revision())._number(); } else { JsArray<RevisionInfo> revList = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(revList); currentPatchSet = revList.get(revList.length() - 1)._number(); } String currentlyViewedPatchSet; boolean isPatchSetCurrent = true; <START> final String <END> revisionId = info.revision(revision).id(); if (revisionId.equals("edit")) { currentlyViewedPatchSet = Resources.M.editPatchSet(RevisionInfo.findEditParent(info.revisions() .values())); currentPatchSet = info.revisions().values().length() - 1; } else { currentlyViewedPatchSet = revisionId; if (currentlyViewedPatchSet != Integer.toString(currentPatchSet)) { isPatchSetCurrent = false; } } patchSetsText.setInnerText(Resources.M.patchSets( currentlyViewedPatchSet, currentPatchSet)); if (isPatchSetCurrent) { patchSetsText.removeClassName(style.notCurrentPatchSet()); } else { patchSetsText.addClassName(style.notCurrentPatchSet()); } patchSetsAction = new PatchSetsAction( info.legacy_id(), revision, style, headerLine, patchSets); RevisionInfo revInfo = info.revision(revision); if (revInfo.draft()) { if (actions.containsKey("publish")) { publish.setVisible(true); publish.setTitle(actions.get("publish").title()); } if (actions.containsKey("/")) { deleteRevision.setVisible(true); deleteRevision.setTitle(actions.get("/").title()); } } }</code><technical_language>nit: final in new code</technical_language>

Target:
private void initRevisionsAction(ChangeInfo info, String revision, NativeMap<ActionInfo> actions) { int currentPatchSet; if (info.current_revision() != null && info.revisions().containsKey(info.current_revision())) { currentPatchSet = info.revision(info.current_revision())._number(); } else { JsArray<RevisionInfo> revList = info.revisions().values(); RevisionInfo.sortRevisionInfoByNumber(revList); currentPatchSet = revList.get(revList.length() - 1)._number(); } String currentlyViewedPatchSet; boolean isPatchSetCurrent = true; String revisionId = info.revision(revision).id(); if (revisionId.equals("edit")) { currentlyViewedPatchSet = Resources.M.editPatchSet(RevisionInfo.findEditParent(info.revisions() .values())); currentPatchSet = info.revisions().values().length() - 1; } else { currentlyViewedPatchSet = revisionId; if (!currentlyViewedPatchSet.equals(Integer.toString(currentPatchSet))) { isPatchSetCurrent = false; } } patchSetsText.setInnerText(Resources.M.patchSets( currentlyViewedPatchSet, currentPatchSet)); if (isPatchSetCurrent) { patchSetsText.removeClassName(style.notCurrentPatchSet()); } else { patchSetsText.addClassName(style.notCurrentPatchSet()); } patchSetsAction = new PatchSetsAction( info.legacy_id(), revision, style, headerLine, patchSets); RevisionInfo revInfo = info.revision(revision); if (revInfo.draft()) { if (actions.containsKey("publish")) { publish.setVisible(true); publish.setTitle(actions.get("publish").title()); } if (actions.containsKey("/")) { deleteRevision.setVisible(true); deleteRevision.setTitle(actions.get("/").title()); } } }