Source:
<code>private Bundle getBrokerOptions(final AuthenticationRequest request) { Bundle brokerOptions = new Bundle(); brokerOptions.putInt(AuthenticationConstants.Browser.REQUEST_ID, request.getRequestId()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_AUTHORITY, request.getAuthority()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_RESOURCE, request.getResource()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_REDIRECT, request.getRedirectUri()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CLIENTID_KEY, request.getClientId()); brokerOptions.putString(AuthenticationConstants.Broker.ADAL_VERSION_KEY, request.getVersion()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_USERINFO_USERID, request.getUserId()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_EXTRA_QUERY_PARAM, request.getExtraQueryParamsAuthentication()); if (request.getCorrelationId() != null) { brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CORRELATIONID, request.getCorrelationId().toString()); } String username = request.getBrokerAccountName(); if (StringExtensions.isNullOrBlank(username)) { username = request.getLoginHint(); } brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_LOGIN_HINT, username); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_NAME, username); if (request.getPrompt() != null) { brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_PROMPT, request.getPrompt().name()); } <START> if (!StringExtensions.isNullOrBlank(request.getClaimsChallenge())) { <END> brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CLAIMS, request.getClaimsChallenge()); } if (Utility.isClaimsChallengePresent(request)) { brokerOptions.putString(AuthenticationConstants.Broker.BROKER_SKIP_CACHE, Boolean.toString(true)); } return brokerOptions; }</code><technical_language>2 checks do thing, merge a single if block</technical_language>

Target:
private Bundle getBrokerOptions(final AuthenticationRequest request) { Bundle brokerOptions = new Bundle(); brokerOptions.putInt(AuthenticationConstants.Browser.REQUEST_ID, request.getRequestId()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_AUTHORITY, request.getAuthority()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_RESOURCE, request.getResource()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_REDIRECT, request.getRedirectUri()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CLIENTID_KEY, request.getClientId()); brokerOptions.putString(AuthenticationConstants.Broker.ADAL_VERSION_KEY, request.getVersion()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_USERINFO_USERID, request.getUserId()); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_EXTRA_QUERY_PARAM, request.getExtraQueryParamsAuthentication()); if (request.getCorrelationId() != null) { brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CORRELATIONID, request.getCorrelationId().toString()); } String username = request.getBrokerAccountName(); if (StringExtensions.isNullOrBlank(username)) { username = request.getLoginHint(); } brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_LOGIN_HINT, username); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_NAME, username); if (request.getPrompt() != null) { brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_PROMPT, request.getPrompt().name()); } if (Utility.isClaimsChallengePresent(request)) { brokerOptions.putString(AuthenticationConstants.Broker.BROKER_SKIP_CACHE, Boolean.toString(true)); brokerOptions.putString(AuthenticationConstants.Broker.ACCOUNT_CLAIMS, request.getClaimsChallenge()); } return brokerOptions; }