Source:
public ChangeDetail call() throws OrmException, NoSuchEntityException, PatchSetInfoNotAvailableException, NoSuchChangeException { control = changeControlFactory.validateFor(changeId); final Change change = control.getChange(); final PatchSet patch = db.patchSets().get(change.currentPatchSetId()); if (patch == null) { throw new NoSuchEntityException(); } aic.want(change.getOwner()); detail = new ChangeDetail(); detail.setChange(change); detail.setAllowsAnonymous(control.forUser(anonymousUser).isVisible(db)); detail.setCanAbandon(change.getStatus() != Change.Status.DRAFT && change.getStatus().isOpen() && control.canAbandon()); detail.setCanPublish(control.canPublish(db)); detail.setCanPublish(control.canDelete(db)); detail.setCanRestore(change.getStatus() == Change.Status.ABANDONED && control.canRestore()); detail.setCanDeleteDraft(change.getStatus() == Change.Status.DRAFT && control.isOwner()); detail.setStarred(control.getCurrentUser().getStarredChanges().contains( changeId)); detail.setCanRevert(change.getStatus() == Change.Status.MERGED && control.canAddPatchSet()); detail.setCanEdit(control.getRefControl().canWrite()); if (detail.getChange().getStatus().isOpen()) { List<SubmitRecord> submitRecords = control.canSubmit(db, patch.getId()); for (SubmitRecord rec : submitRecords) { if (rec.labels != null) { for (SubmitRecord.Label lbl : rec.labels) { aic.want(lbl.appliedBy); } } if (rec.status == SubmitRecord.Status.OK && control.getRefControl().canSubmit()) { detail.setCanSubmit(true); } } detail.setSubmitRecords(submitRecords); } patchsetsById = new HashMap<PatchSet.Id, PatchSet>(); loadPatchSets(); loadMessages(); if (change.currentPatchSetId() != null) { loadCurrentPatchSet(); } load(); detail.setAccounts(aic.create()); return detail; }

Target:
public ChangeDetail call() throws OrmException, NoSuchEntityException, PatchSetInfoNotAvailableException, NoSuchChangeException { control = changeControlFactory.validateFor(changeId); final Change change = control.getChange(); final PatchSet patch = db.patchSets().get(change.currentPatchSetId()); if (patch == null) { throw new NoSuchEntityException(); } aic.want(change.getOwner()); detail = new ChangeDetail(); detail.setChange(change); detail.setAllowsAnonymous(control.forUser(anonymousUser).isVisible(db)); detail.setCanAbandon(change.getStatus() != Change.Status.DRAFT && change.getStatus().isOpen() && control.canAbandon()); detail.setCanPublish(control.canPublish(db)); detail.setCanRestore(change.getStatus() == Change.Status.ABANDONED && control.canRestore()); detail.setCanDeleteDraft(control.canDelete(db)); detail.setStarred(control.getCurrentUser().getStarredChanges().contains( changeId)); detail.setCanRevert(change.getStatus() == Change.Status.MERGED && control.canAddPatchSet()); detail.setCanEdit(control.getRefControl().canWrite()); if (detail.getChange().getStatus().isOpen()) { List<SubmitRecord> submitRecords = control.canSubmit(db, patch.getId()); for (SubmitRecord rec : submitRecords) { if (rec.labels != null) { for (SubmitRecord.Label lbl : rec.labels) { aic.want(lbl.appliedBy); } } if (rec.status == SubmitRecord.Status.OK && control.getRefControl().canSubmit()) { detail.setCanSubmit(true); } } detail.setSubmitRecords(submitRecords); } patchsetsById = new HashMap<PatchSet.Id, PatchSet>(); loadPatchSets(); loadMessages(); if (change.currentPatchSetId() != null) { loadCurrentPatchSet(); } load(); detail.setAccounts(aic.create()); return detail; }