Program: 194940
Project: 194940
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (Log.isLoggable(TAG,Log.VERBOSE)) {
    Log.v(TAG,"String_Node_Str" + savedInstanceState + "String_Node_Str");
  }
  String message=null;
  try {
    IBinder activityToken=getActivityToken();
    mCallingUid=ActivityManagerNative.getDefault().getLaunchedFromUid(activityToken);
    mCallingPackage=ActivityManagerNative.getDefault().getLaunchedFromPackage(activityToken);
    if (mCallingUid != 0 && mCallingPackage != null) {
      Bundle restrictions=UserManager.get(this).getUserRestrictions(new UserHandle(UserHandle.getUserId(mCallingUid)));
      mDisallowAddAccounts=restrictions.getBoolean(UserManager.DISALLOW_MODIFY_ACCOUNTS,false);
    }
  }
 catch (  RemoteException re) {
    Log.w(getClass().getSimpleName(),"String_Node_Str" + re);
  }
  final Intent intent=getIntent();
  if (savedInstanceState != null) {
    mPendingRequest=savedInstanceState.getInt(KEY_INSTANCE_STATE_PENDING_REQUEST);
    mExistingAccounts=savedInstanceState.getParcelableArray(KEY_INSTANCE_STATE_EXISTING_ACCOUNTS);
    mSelectedAccountName=savedInstanceState.getString(KEY_INSTANCE_STATE_SELECTED_ACCOUNT_NAME);
    mSelectedAddNewAccount=savedInstanceState.getBoolean(KEY_INSTANCE_STATE_SELECTED_ADD_ACCOUNT,false);
    mAccounts=savedInstanceState.getParcelableArrayList(KEY_INSTANCE_STATE_ACCOUNT_LIST);
  }
 else {
    mPendingRequest=REQUEST_NULL;
    mExistingAccounts=null;
    Account selectedAccount=(Account)intent.getParcelableExtra(EXTRA_SELECTED_ACCOUNT);
    if (selectedAccount != null) {
      mSelectedAccountName=selectedAccount.name;
    }
  }
  if (Log.isLoggable(TAG,Log.VERBOSE)) {
    Log.v(TAG,"String_Node_Str" + mSelectedAccountName);
  }
  mSetOfAllowableAccounts=getAllowableAccountSet(intent);
  mSetOfRelevantAccountTypes=getReleventAccountTypes(intent);
  mAlwaysPromptForAccount=intent.getBooleanExtra(EXTRA_ALWAYS_PROMPT_FOR_ACCOUNT,false);
  mDescriptionOverride=intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
  mAccounts=getAcceptableAccountChoices(AccountManager.get(this));
  if (mAccounts.isEmpty() && mDisallowAddAccounts) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.app_not_authorized);
    mDontShowPicker=true;
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  if (Log.isLoggable(TAG,Log.VERBOSE)) {
    Log.v(TAG,"String_Node_Str" + savedInstanceState + "String_Node_Str");
  }
  String message=null;
  try {
    IBinder activityToken=getActivityToken();
    mCallingUid=ActivityManagerNative.getDefault().getLaunchedFromUid(activityToken);
    mCallingPackage=ActivityManagerNative.getDefault().getLaunchedFromPackage(activityToken);
    if (mCallingUid != 0 && mCallingPackage != null) {
      Bundle restrictions=UserManager.get(this).getUserRestrictions(new UserHandle(UserHandle.getUserId(mCallingUid)));
      mDisallowAddAccounts=restrictions.getBoolean(UserManager.DISALLOW_MODIFY_ACCOUNTS,false);
    }
  }
 catch (  RemoteException re) {
    Log.w(getClass().getSimpleName(),"String_Node_Str" + re);
  }
  final Intent intent=getIntent();
  if (savedInstanceState != null) {
    mPendingRequest=savedInstanceState.getInt(KEY_INSTANCE_STATE_PENDING_REQUEST);
    mExistingAccounts=savedInstanceState.getParcelableArray(KEY_INSTANCE_STATE_EXISTING_ACCOUNTS);
    mSelectedAccountName=savedInstanceState.getString(KEY_INSTANCE_STATE_SELECTED_ACCOUNT_NAME);
    mSelectedAddNewAccount=savedInstanceState.getBoolean(KEY_INSTANCE_STATE_SELECTED_ADD_ACCOUNT,false);
    mAccounts=savedInstanceState.getParcelableArrayList(KEY_INSTANCE_STATE_ACCOUNT_LIST);
  }
 else {
    mPendingRequest=REQUEST_NULL;
    mExistingAccounts=null;
    Account selectedAccount=(Account)intent.getParcelableExtra(EXTRA_SELECTED_ACCOUNT);
    if (selectedAccount != null) {
      mSelectedAccountName=selectedAccount.name;
    }
  }
  if (Log.isLoggable(TAG,Log.VERBOSE)) {
    Log.v(TAG,"String_Node_Str" + mSelectedAccountName);
  }
  mSetOfAllowableAccounts=getAllowableAccountSet(intent);
  mSetOfRelevantAccountTypes=getReleventAccountTypes(intent);
  mAlwaysPromptForAccount=intent.getBooleanExtra(EXTRA_ALWAYS_PROMPT_FOR_ACCOUNT,false);
  mDescriptionOverride=intent.getStringExtra(EXTRA_DESCRIPTION_TEXT_OVERRIDE);
  mAccounts=getAcceptableAccountChoices(AccountManager.get(this));
  if (mAccounts.isEmpty() && mDisallowAddAccounts) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.app_not_authorized);
    mDontShowPicker=true;
  }
  if (mDontShowPicker) {
    super.onCreate(savedInstanceState);
    return;
  }
  if (mPendingRequest == REQUEST_NULL) {
    if (mAccounts.isEmpty()) {
      setNonLabelThemeAndCallSuperCreate(savedInstanceState);
      if (mSetOfRelevantAccountTypes.size() == 1) {
        runAddAccountForAuthenticator(mSetOfRelevantAccountTypes.iterator().next());
      }
 else {
        startChooseAccountTypeActivity();
      }
      return;
    }
    if (!mAlwaysPromptForAccount && mAccounts.size() == 1) {
      Account account=mAccounts.get(0);
      super.onCreate(savedInstanceState);
      setResultAndFinish(account.name,account.type);
      return;
    }
  }
  String[] listItems=getListOfDisplayableOptions(mAccounts);
  mSelectedItemIndex=getItemIndexToSelect(mAccounts,mSelectedAccountName,mSelectedAddNewAccount);
  super.onCreate(savedInstanceState);
  setContentView(R.layout.choose_type_and_account);
  overrideDescriptionIfSupplied(mDescriptionOverride);
  populateUIAccountList(listItems);
  mOkButton=(Button)findViewById(android.R.id.button2);
  mOkButton.setEnabled(mSelectedItemIndex != SELECTED_ITEM_NONE);
}