Source:
<code>public Response<?> apply(ReviewerResource rsrc, Input input) throws AuthException, ResourceNotFoundException, OrmException, IOException { ChangeControl control = rsrc.getControl(); Change.Id changeId = rsrc.getChange().getId(); ReviewDb db = dbProvider.get(); StringBuilder msg = new StringBuilder(); <START> msg.append("Removed the following approvals:\n\n"); <END> db.changes().beginTransaction(changeId); try { List<PatchSetApproval> del = Lists.newArrayList(); for (PatchSetApproval a : approvals(db, rsrc)) { if (control.canRemoveReviewer(a)) { del.add(a); if (a.getValue() != 0) { msg.append("* ") .append(a.getLabel()).append(formatLabelValue(a.getValue())) .append(" by ").append(userFactory.create(a.getAccountId()).getNameEmail()) .append("\n"); } } else { throw new AuthException("delete not permitted"); } } if (del.isEmpty()) { throw new ResourceNotFoundException(); } ChangeUtil.bumpRowVersionNotLastUpdatedOn(rsrc.getChange().getId(), db); db.patchSetApprovals().delete(del); ChangeMessage changeMessage = new ChangeMessage(new ChangeMessage.Key(rsrc.getChange().getId(), ChangeUtil.messageUUID(db)), ((IdentifiedUser) control.getCurrentUser()).getAccountId(), TimeUtil.nowTs(), rsrc.getChange().currentPatchSetId()); changeMessage.setMessage(msg.toString()); db.changeMessages().insert(Collections.singleton(changeMessage)); db.commit(); } finally { db.rollback(); } indexer.index(rsrc.getChange()); return Response.none(); }</code><technical_language>If a "CC" is removed (where PatchSetApproval exists for = 0) this logs a message "Removed approvals:\n\n". This sense approvals removed. OK a CC reviewer removed, score assigned I this is worth stating in message log. is. text coded clear happens</technical_language>

Target:
public Response<?> apply(ReviewerResource rsrc, Input input) throws AuthException, ResourceNotFoundException, OrmException, IOException { ChangeControl control = rsrc.getControl(); Change.Id changeId = rsrc.getChange().getId(); ReviewDb db = dbProvider.get(); StringBuilder msg = new StringBuilder(); db.changes().beginTransaction(changeId); try { List<PatchSetApproval> del = Lists.newArrayList(); for (PatchSetApproval a : approvals(db, rsrc)) { if (control.canRemoveReviewer(a)) { del.add(a); if (a.getValue() != 0) { if (msg.length() == 0) { msg.append("Removed the following approvals:\n\n"); } msg.append("* ") .append(a.getLabel()).append(formatLabelValue(a.getValue())) .append(" by ").append(userFactory.create(a.getAccountId()).getNameEmail()) .append("\n"); } } else { throw new AuthException("delete not permitted"); } } if (del.isEmpty()) { throw new ResourceNotFoundException(); } ChangeUtil.bumpRowVersionNotLastUpdatedOn(rsrc.getChange().getId(), db); db.patchSetApprovals().delete(del); if (msg.length() > 0) { ChangeMessage changeMessage = new ChangeMessage(new ChangeMessage.Key(rsrc.getChange().getId(), ChangeUtil.messageUUID(db)), ((IdentifiedUser) control.getCurrentUser()).getAccountId(), TimeUtil.nowTs(), rsrc.getChange().currentPatchSetId()); changeMessage.setMessage(msg.toString()); db.changeMessages().insert(Collections.singleton(changeMessage)); } db.commit(); } finally { db.rollback(); } indexer.index(rsrc.getChange()); return Response.none(); }