Program: 8448
Project: 8448
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.edit_key);
  Vector<String> userIds=new Vector<String>();
  Vector<PGPSecretKey> keys=new Vector<PGPSecretKey>();
  Intent intent=getIntent();
  long keyId=0;
  if (intent.getExtras() != null) {
    keyId=intent.getExtras().getLong("String_Node_Str");
  }
  if (keyId != 0) {
    PGPSecretKey masterKey=null;
    mKeyRing=Apg.getSecretKeyRing(keyId);
    if (mKeyRing != null) {
      masterKey=Apg.getMasterKey(mKeyRing);
      for (      PGPSecretKey key : new IterableIterator<PGPSecretKey>(mKeyRing.getSecretKeys())) {
        keys.add(key);
      }
    }
    if (masterKey != null) {
      for (      String userId : new IterableIterator<String>(masterKey.getUserIDs())) {
        userIds.add(userId);
      }
    }
  }
  if (Apg.getPassPhrase() == null) {
    Apg.setPassPhrase("String_Node_Str");
  }
  mSaveButton=(Button)findViewById(R.id.btn_save);
  mDiscardButton=(Button)findViewById(R.id.btn_discard);
  mSaveButton.setOnClickListener(this);
  mDiscardButton.setOnClickListener(this);
  LayoutInflater inflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  LinearLayout container=(LinearLayout)findViewById(R.id.container);
  mUserIds=(SectionView)inflater.inflate(R.layout.edit_key_section,container,false);
  mUserIds.setType(SectionView.TYPE_USER_ID);
  mUserIds.setUserIds(userIds);
  container.addView(mUserIds);
  mKeys=(SectionView)inflater.inflate(R.layout.edit_key_section,container,false);
  mKeys.setType(SectionView.TYPE_KEY);
  mKeys.setKeys(keys);
  container.addView(mKeys);
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.edit_key);
  Vector<String> userIds=new Vector<String>();
  Vector<PGPSecretKey> keys=new Vector<PGPSecretKey>();
  Intent intent=getIntent();
  long keyId=0;
  if (intent.getExtras() != null) {
    keyId=intent.getExtras().getLong("String_Node_Str");
  }
  if (keyId == 0) {
    Apg.setPassPhrase(null);
  }
 else {
    PGPSecretKey masterKey=null;
    mKeyRing=Apg.getSecretKeyRing(keyId);
    if (mKeyRing != null) {
      masterKey=Apg.getMasterKey(mKeyRing);
      for (      PGPSecretKey key : new IterableIterator<PGPSecretKey>(mKeyRing.getSecretKeys())) {
        keys.add(key);
      }
    }
    if (masterKey != null) {
      for (      String userId : new IterableIterator<String>(masterKey.getUserIDs())) {
        userIds.add(userId);
      }
    }
  }
  if (Apg.getPassPhrase() == null) {
    Apg.setPassPhrase("String_Node_Str");
  }
  mSaveButton=(Button)findViewById(R.id.btn_save);
  mDiscardButton=(Button)findViewById(R.id.btn_discard);
  mSaveButton.setOnClickListener(this);
  mDiscardButton.setOnClickListener(this);
  LayoutInflater inflater=(LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  LinearLayout container=(LinearLayout)findViewById(R.id.container);
  mUserIds=(SectionView)inflater.inflate(R.layout.edit_key_section,container,false);
  mUserIds.setType(SectionView.TYPE_USER_ID);
  mUserIds.setUserIds(userIds);
  container.addView(mUserIds);
  mKeys=(SectionView)inflater.inflate(R.layout.edit_key_section,container,false);
  mKeys.setType(SectionView.TYPE_KEY);
  mKeys.setKeys(keys);
  container.addView(mKeys);
  Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
}