Source:
<code>public ChangeDetail call() throws OrmException, NoSuchEntityException, IllegalStateException, PatchSetInfoNotAvailableException, NoSuchChangeException { final Change.Id changeId = patchSetId.getParentKey(); final ChangeControl changeControl = changeControlFactory.validateFor(changeId); List<SubmitRecord> result = changeControl.canSubmit(db, patchSetId); if (result.isEmpty()) { throw new IllegalStateException("Cannot submit"); } switch (result.get(0).status) { case OK: ChangeUtil.submit(patchSetId, user, db, opFactory, merger); return changeDetailFactory.create(changeId).call(); case NOT_READY: { for (SubmitRecord.Label lbl : result.get(0).labels) { switch (lbl.status) { case OK: break; case REJECT: throw new IllegalStateException("Blocked by " + lbl.label); case NEED: throw new IllegalStateException("Needs " + lbl.label); case IMPOSSIBLE: throw new IllegalStateException("Cannnot submit, check project access"); default: throw new IllegalArgumentException("Unknown status " + lbl.status); } } throw new IllegalStateException("Cannot submit"); } case CLOSED: throw new IllegalStateException("Change is closed"); case GROUP_NOT_READY: throw new IllegalStateException( <START> "Change is part of a group, and not all changes in the group are submittable"); <END> case RULE_ERROR: if (result.get(0).errorMessage != null) { throw new IllegalStateException(result.get(0).errorMessage); } else { throw new IllegalStateException("Internal rule error"); } default: throw new IllegalStateException("Uknown status " + result.get(0).status); } }</code><technical_language>this read like: "Change is codependent changes submittable"</technical_language>

Target:
public ChangeDetail call() throws OrmException, NoSuchEntityException, IllegalStateException, PatchSetInfoNotAvailableException, NoSuchChangeException { final Change.Id changeId = patchSetId.getParentKey(); final ChangeControl changeControl = changeControlFactory.validateFor(changeId); List<SubmitRecord> result = changeControl.canSubmit(db, patchSetId); if (result.isEmpty()) { throw new IllegalStateException("Cannot submit"); } switch (result.get(0).status) { case OK: ChangeUtil.submit(patchSetId, user, db, opFactory, merger); return changeDetailFactory.create(changeId).call(); case NOT_READY: { for (SubmitRecord.Label lbl : result.get(0).labels) { switch (lbl.status) { case OK: break; case REJECT: throw new IllegalStateException("Blocked by " + lbl.label); case NEED: throw new IllegalStateException("Needs " + lbl.label); case IMPOSSIBLE: throw new IllegalStateException("Cannnot submit, check project access"); default: throw new IllegalArgumentException("Unknown status " + lbl.status); } } throw new IllegalStateException("Cannot submit"); } case CLOSED: throw new IllegalStateException("Change is closed"); case GROUP_NOT_READY: throw new IllegalStateException( "Change is codependent on changes that are not all submittable at this moment"); case RULE_ERROR: if (result.get(0).errorMessage != null) { throw new IllegalStateException(result.get(0).errorMessage); } else { throw new IllegalStateException("Internal rule error"); } default: throw new IllegalStateException("Uknown status " + result.get(0).status); } }