boolean isNew, boolean sendVerifyEmail) {
checkNotNull(study);
checkNotNull(callerRoles);
checkNotNull(participant);
Validate.entityThrowingException(new StudyParticipantValidator(study, isNew), participant);
<BUG>boolean newAccountAssigningId = isNotBlank(participant.getExternalId()) &&
(study.isExternalIdValidationEnabled() || study.isExternalIdRequiredOnSignup());
Account account = null;</BUG>
if (isNew) {
if (newAccountAssigningId) {

boolean isNew, boolean sendVerifyEmail) {
checkNotNull(study);
checkNotNull(callerRoles);
checkNotNull(participant);
Validate.entityThrowingException(new StudyParticipantValidator(study, isNew), participant);
boolean newAccountAssigningId = isNew && study.isExternalIdValidationEnabled()
&& isNotBlank(participant.getExternalId());
Account account = null;
if (isNew) {
if (newAccountAssigningId) {
