Source:
<code>protected View createScreenletView(Context context, AttributeSet attributes) { TypedArray typedArray = context.getTheme().obtainStyledAttributes(attributes, R.styleable.LoginScreenlet, 0, 0); int storeValue = typedArray.getInt(R.styleable.LoginScreenlet_credentialsStorage, StorageType.NONE.toInt()); credentialsStorage = StorageType.valueOf(storeValue); oauthConsumerKey = typedArray.getString(R.styleable.LoginScreenlet_oauthConsumerKey); oauthConsumerSecret = typedArray.getString(R.styleable.LoginScreenlet_oauthConsumerSecret); shouldHandleCookieExpiration = typedArray.getBoolean(R.styleable.LoginScreenlet_shouldHandleCookieExpiration, true); cookieExpirationTime = typedArray.getInt(R.styleable.LoginScreenlet_cookieExpirationTime, CookieAuthentication.COOKIE_EXPIRATION_TIME); int layoutId = typedArray.getResourceId(R.styleable.LoginScreenlet_layoutId, getDefaultLayoutId()); View view = LayoutInflater.from(context).inflate(layoutId, null); LoginViewModel loginViewModel = (LoginViewModel) view; int authMethodId = typedArray.getInt(R.styleable.LoginScreenlet_loginMode, 0); authenticationType = AuthenticationType.values()[authMethodId]; loginViewModel.setAuthenticationType(authenticationType); <START> if (authenticationType.equals(AuthenticationType.BASIC) || authenticationType.equals( <END> AuthenticationType.COOKIE)) { int basicAuthMethodId = typedArray.getInt(R.styleable.LoginScreenlet_basicAuthMethod, 0); basicAuthMethod = BasicAuthMethod.getValue(basicAuthMethodId); loginViewModel.setBasicAuthMethod(basicAuthMethod); } typedArray.recycle(); return view; }</code><technical_language>Invert if</technical_language>

Target:
protected View createScreenletView(Context context, AttributeSet attributes) { TypedArray typedArray = context.getTheme().obtainStyledAttributes(attributes, R.styleable.LoginScreenlet, 0, 0); int storeValue = typedArray.getInt(R.styleable.LoginScreenlet_credentialsStorage, StorageType.NONE.toInt()); credentialsStorage = StorageType.valueOf(storeValue); oauthConsumerKey = typedArray.getString(R.styleable.LoginScreenlet_oauthConsumerKey); oauthConsumerSecret = typedArray.getString(R.styleable.LoginScreenlet_oauthConsumerSecret); shouldHandleCookieExpiration = typedArray.getBoolean(R.styleable.LoginScreenlet_shouldHandleCookieExpiration, true); cookieExpirationTime = typedArray.getInt(R.styleable.LoginScreenlet_cookieExpirationTime, CookieAuthentication.COOKIE_EXPIRATION_TIME); int layoutId = typedArray.getResourceId(R.styleable.LoginScreenlet_layoutId, getDefaultLayoutId()); View view = LayoutInflater.from(context).inflate(layoutId, null); LoginViewModel loginViewModel = (LoginViewModel) view; int authMethodId = typedArray.getInt(R.styleable.LoginScreenlet_loginMode, 0); authenticationType = AuthenticationType.values()[authMethodId]; loginViewModel.setAuthenticationType(authenticationType); if (AuthenticationType.BASIC.equals(authenticationType) || AuthenticationType.COOKIE.equals( authenticationType)) { int basicAuthMethodId = typedArray.getInt(R.styleable.LoginScreenlet_basicAuthMethod, 0); basicAuthMethod = BasicAuthMethod.getValue(basicAuthMethodId); loginViewModel.setBasicAuthMethod(basicAuthMethod); } typedArray.recycle(); return view; }