lets do it more redable, eg
if (part < 0 || part >= parts) thr IllegalArgument
if (submission.keySet().contains(part)) thr IllegalState