Program: 165028
Project: 165028
Buggy source:
/** 
 * Starts the Pay With PayPal flow with additional scopes. This will launch the PayPal app if installed or switch to the browser for user authorization. The Billing Agreement flow will be used if enabled, otherwise the Future Payment flow will be used.
 * @param fragment A {@link BraintreeFragment} used to process the request.
 * @param additionalScopes A {@link java.util.List} of additional scopes. Ex: {@link #SCOPE_ADDRESS}. Acceptable scopes are defined in   {@link com.braintreepayments.api.PayPal}.
 */
public static void authorizeAccount(final BraintreeFragment fragment,final List<String> additionalScopes){
  fragment.sendAnalyticsEvent("String_Node_Str");
  fragment.waitForConfiguration(new ConfigurationListener(){
    @Override public void onConfigurationFetched(    Configuration configuration){
      if (!configuration.isPayPalEnabled()) {
        fragment.postCallback(new ConfigurationException("String_Node_Str"));
        return;
      }
      if (configuration.getPayPal().shouldUseBillingAgreement()) {
        requestBillingAgreement(fragment,new PayPalRequest());
        return;
      }
      sPendingRequest=getAuthorizationRequest(fragment.getApplicationContext(),fragment.getConfiguration().getPayPal(),fragment.getAuthorization().toString());
      if (additionalScopes != null) {
        for (        String scope : additionalScopes) {
          ((AuthorizationRequest)sPendingRequest).withScopeValue(scope);
        }
      }
      sPendingRequestStatus=PayPalOneTouchCore.performRequest(fragment.getActivity(),sPendingRequest,PAYPAL_REQUEST_CODE,sEnableSignatureVerification,getBrowserSwitchAdapter(fragment));
      sendAnalyticsForPayPalPerformRequestStatus(fragment,sPendingRequestStatus);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Starts the Pay With PayPal flow with additional scopes. This will launch the PayPal app if installed or switch to the browser for user authorization. The Billing Agreement flow will be used if enabled, otherwise the Future Payment flow will be used.
 * @param fragment A {@link BraintreeFragment} used to process the request.
 * @param additionalScopes A {@link java.util.List} of additional scopes. Ex: {@link #SCOPE_ADDRESS}. Acceptable scopes are defined in   {@link com.braintreepayments.api.PayPal}.
 */
public static void authorizeAccount(final BraintreeFragment fragment,final List<String> additionalScopes){
  fragment.sendAnalyticsEvent("String_Node_Str");
  fragment.waitForConfiguration(new ConfigurationListener(){
    @Override public void onConfigurationFetched(    Configuration configuration){
      if (!configuration.isPayPalEnabled()) {
        fragment.postCallback(new ConfigurationException("String_Node_Str"));
        return;
      }
      if (configuration.getPayPal().shouldUseBillingAgreement()) {
        requestBillingAgreement(fragment,new PayPalRequest());
        return;
      }
      sPendingRequest=getAuthorizationRequest(fragment.getApplicationContext(),fragment.getConfiguration().getPayPal(),fragment.getAuthorization().toString());
      if (additionalScopes != null) {
        for (        String scope : additionalScopes) {
          ((AuthorizationRequest)sPendingRequest).withScopeValue(scope);
        }
      }
      startPayPal(fragment,PayPalOneTouchCore.getStartIntent(fragment.getActivity(),sPendingRequest,sEnableSignatureVerification));
    }
  }
);
}