Program: 8432
Project: 8432
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.decrypt);
  mSource=(ViewFlipper)findViewById(R.id.source);
  mSourceLabel=(TextView)findViewById(R.id.sourceLabel);
  mSourcePrevious=(ImageView)findViewById(R.id.sourcePrevious);
  mSourceNext=(ImageView)findViewById(R.id.sourceNext);
  mSourcePrevious.setClickable(true);
  mSourcePrevious.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      mSource.setInAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_right_in));
      mSource.setOutAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_right_out));
      mSource.showPrevious();
      updateSource();
    }
  }
);
  mSourceNext.setClickable(true);
  OnClickListener nextSourceClickListener=new OnClickListener(){
    @Override public void onClick(    View v){
      mSource.setInAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_left_in));
      mSource.setOutAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_left_out));
      mSource.showNext();
      updateSource();
    }
  }
;
  mSourceNext.setOnClickListener(nextSourceClickListener);
  mSourceLabel.setClickable(true);
  mSourceLabel.setOnClickListener(nextSourceClickListener);
  mMessage=(EditText)findViewById(R.id.message);
  mDecryptButton=(Button)findViewById(R.id.btn_decrypt);
  mReplyButton=(Button)findViewById(R.id.btn_reply);
  mSignatureLayout=(LinearLayout)findViewById(R.id.signature);
  mSignatureStatusImage=(ImageView)findViewById(R.id.ic_signature_status);
  mUserId=(TextView)findViewById(R.id.mainUserId);
  mUserIdRest=(TextView)findViewById(R.id.mainUserIdRest);
  View tmp=findViewById(R.id.sourceFile);
  tmp.measure(View.MeasureSpec.UNSPECIFIED,View.MeasureSpec.UNSPECIFIED);
  int height=tmp.getMeasuredHeight();
  mMessage.setMinimumHeight(height);
  mFilename=(EditText)findViewById(R.id.filename);
  mBrowse=(ImageButton)findViewById(R.id.btn_browse);
  mBrowse.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      openFile();
    }
  }
);
  mDeleteAfter=(CheckBox)findViewById(R.id.deleteAfterDecryption);
  mSource.setInAnimation(null);
  mSource.setOutAnimation(null);
  while (mSource.getCurrentView().getId() != R.id.sourceMessage) {
    mSource.showNext();
  }
  mIntent=getIntent();
  if (Intent.ACTION_VIEW.equals(mIntent.getAction())) {
    Uri uri=mIntent.getData();
    try {
      InputStream attachment=getContentResolver().openInputStream(uri);
      ByteArrayOutputStream byteOut=new ByteArrayOutputStream();
      byte bytes[]=new byte[1 << 16];
      int length;
      while ((length=attachment.read(bytes)) > 0) {
        byteOut.write(bytes,0,length);
      }
      byteOut.close();
      String data=new String(byteOut.toByteArray());
      mMessage.setText(data);
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
  }
 else   if (Intent.ACTION_SEND.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Intent.EXTRA_TEXT);
    if (data != null) {
      mMessage.setText(data);
    }
    mSubject=extras.getString(Intent.EXTRA_SUBJECT);
    if (mSubject.startsWith("String_Node_Str")) {
      mSubject=mSubject.substring(5);
    }
  }
 else   if (Apg.Intent.DECRYPT.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Apg.EXTRA_DATA);
    if (data != null) {
      Matcher matcher=Apg.PGP_MESSAGE.matcher(data);
      if (matcher.matches()) {
        data=matcher.group(1);
        data=data.replaceAll("String_Node_Str","String_Node_Str");
        mMessage.setText(data);
      }
 else {
        matcher=Apg.PGP_SIGNED_MESSAGE.matcher(data);
        if (matcher.matches()) {
          data=matcher.group(1);
          data=data.replaceAll("String_Node_Str","String_Node_Str");
          mMessage.setText(data);
          mDecryptButton.setText(R.string.btn_verify);
        }
      }
    }
    mReplyTo=extras.getString(Apg.EXTRA_REPLY_TO);
    mSubject=extras.getString(Apg.EXTRA_SUBJECT);
  }
 else   if (Apg.Intent.DECRYPT_FILE.equals(mIntent.getAction())) {
    mSource.setInAnimation(null);
    mSource.setOutAnimation(null);
    while (mSource.getCurrentView().getId() != R.id.sourceFile) {
      mSource.showNext();
    }
  }
 else   if (Apg.Intent.DECRYPT_AND_RETURN.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Apg.EXTRA_DATA);
    if (data != null) {
      Matcher matcher=Apg.PGP_MESSAGE.matcher(data);
      if (matcher.matches()) {
        data=matcher.group(1);
        data=data.replaceAll("String_Node_Str","String_Node_Str");
        mMessage.setText(data);
      }
 else {
        matcher=Apg.PGP_SIGNED_MESSAGE.matcher(data);
        if (matcher.matches()) {
          data=matcher.group(1);
          data=data.replaceAll("String_Node_Str","String_Node_Str");
          mMessage.setText(data);
          mDecryptButton.setText(R.string.btn_verify);
        }
      }
    }
    mReplyTo=extras.getString(Apg.EXTRA_REPLY_TO);
    mSubject=extras.getString(Apg.EXTRA_SUBJECT);
    mReturnResult=true;
  }
  if (mSource.getCurrentView().getId() == R.id.sourceMessage && mMessage.getText().length() == 0) {
    ClipboardManager clip=(ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
    String data="String_Node_Str";
    Matcher matcher=Apg.PGP_MESSAGE.matcher(clip.getText());
    if (!matcher.matches()) {
      matcher=Apg.PGP_SIGNED_MESSAGE.matcher(clip.getText());
    }
    if (matcher.matches()) {
      data=matcher.group(1);
      mMessage.setText(data);
      Toast.makeText(this,R.string.usingClipboardContent,Toast.LENGTH_SHORT).show();
    }
  }
  mSignatureLayout.setVisibility(View.GONE);
  mDecryptButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      decryptClicked();
    }
  }
);
  mReplyButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      replyClicked();
    }
  }
);
  mReplyButton.setVisibility(View.INVISIBLE);
  if (mReturnResult) {
    mSourcePrevious.setClickable(false);
    mSourcePrevious.setEnabled(false);
    mSourcePrevious.setVisibility(View.INVISIBLE);
    mSourceNext.setClickable(false);
    mSourceNext.setEnabled(false);
    mSourceNext.setVisibility(View.INVISIBLE);
    mSourceLabel.setClickable(false);
    mSourceLabel.setEnabled(false);
  }
  updateSource();
  if (mSource.getCurrentView().getId() == R.id.sourceMessage && mMessage.getText().length() > 0) {
    mDecryptButton.performClick();
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.decrypt);
  mSource=(ViewFlipper)findViewById(R.id.source);
  mSourceLabel=(TextView)findViewById(R.id.sourceLabel);
  mSourcePrevious=(ImageView)findViewById(R.id.sourcePrevious);
  mSourceNext=(ImageView)findViewById(R.id.sourceNext);
  mSourcePrevious.setClickable(true);
  mSourcePrevious.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      mSource.setInAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_right_in));
      mSource.setOutAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_right_out));
      mSource.showPrevious();
      updateSource();
    }
  }
);
  mSourceNext.setClickable(true);
  OnClickListener nextSourceClickListener=new OnClickListener(){
    @Override public void onClick(    View v){
      mSource.setInAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_left_in));
      mSource.setOutAnimation(AnimationUtils.loadAnimation(DecryptActivity.this,R.anim.push_left_out));
      mSource.showNext();
      updateSource();
    }
  }
;
  mSourceNext.setOnClickListener(nextSourceClickListener);
  mSourceLabel.setClickable(true);
  mSourceLabel.setOnClickListener(nextSourceClickListener);
  mMessage=(EditText)findViewById(R.id.message);
  mDecryptButton=(Button)findViewById(R.id.btn_decrypt);
  mReplyButton=(Button)findViewById(R.id.btn_reply);
  mSignatureLayout=(LinearLayout)findViewById(R.id.signature);
  mSignatureStatusImage=(ImageView)findViewById(R.id.ic_signature_status);
  mUserId=(TextView)findViewById(R.id.mainUserId);
  mUserIdRest=(TextView)findViewById(R.id.mainUserIdRest);
  View tmp=findViewById(R.id.sourceFile);
  tmp.measure(View.MeasureSpec.UNSPECIFIED,View.MeasureSpec.UNSPECIFIED);
  int height=tmp.getMeasuredHeight();
  mMessage.setMinimumHeight(height);
  mFilename=(EditText)findViewById(R.id.filename);
  mBrowse=(ImageButton)findViewById(R.id.btn_browse);
  mBrowse.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      openFile();
    }
  }
);
  mDeleteAfter=(CheckBox)findViewById(R.id.deleteAfterDecryption);
  mSource.setInAnimation(null);
  mSource.setOutAnimation(null);
  while (mSource.getCurrentView().getId() != R.id.sourceMessage) {
    mSource.showNext();
  }
  mIntent=getIntent();
  if (Intent.ACTION_VIEW.equals(mIntent.getAction())) {
    Uri uri=mIntent.getData();
    try {
      InputStream attachment=getContentResolver().openInputStream(uri);
      ByteArrayOutputStream byteOut=new ByteArrayOutputStream();
      byte bytes[]=new byte[1 << 16];
      int length;
      while ((length=attachment.read(bytes)) > 0) {
        byteOut.write(bytes,0,length);
      }
      byteOut.close();
      String data=new String(byteOut.toByteArray());
      mMessage.setText(data);
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
  }
 else   if (Intent.ACTION_SEND.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Intent.EXTRA_TEXT);
    if (data != null) {
      mMessage.setText(data);
    }
    mSubject=extras.getString(Intent.EXTRA_SUBJECT);
    if (mSubject != null && mSubject.startsWith("String_Node_Str")) {
      mSubject=mSubject.substring(5);
    }
  }
 else   if (Apg.Intent.DECRYPT.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Apg.EXTRA_DATA);
    if (data != null) {
      Matcher matcher=Apg.PGP_MESSAGE.matcher(data);
      if (matcher.matches()) {
        data=matcher.group(1);
        data=data.replaceAll("String_Node_Str","String_Node_Str");
        mMessage.setText(data);
      }
 else {
        matcher=Apg.PGP_SIGNED_MESSAGE.matcher(data);
        if (matcher.matches()) {
          data=matcher.group(1);
          data=data.replaceAll("String_Node_Str","String_Node_Str");
          mMessage.setText(data);
          mDecryptButton.setText(R.string.btn_verify);
        }
      }
    }
    mReplyTo=extras.getString(Apg.EXTRA_REPLY_TO);
    mSubject=extras.getString(Apg.EXTRA_SUBJECT);
  }
 else   if (Apg.Intent.DECRYPT_FILE.equals(mIntent.getAction())) {
    mSource.setInAnimation(null);
    mSource.setOutAnimation(null);
    while (mSource.getCurrentView().getId() != R.id.sourceFile) {
      mSource.showNext();
    }
  }
 else   if (Apg.Intent.DECRYPT_AND_RETURN.equals(mIntent.getAction())) {
    Bundle extras=mIntent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString(Apg.EXTRA_DATA);
    if (data != null) {
      Matcher matcher=Apg.PGP_MESSAGE.matcher(data);
      if (matcher.matches()) {
        data=matcher.group(1);
        data=data.replaceAll("String_Node_Str","String_Node_Str");
        mMessage.setText(data);
      }
 else {
        matcher=Apg.PGP_SIGNED_MESSAGE.matcher(data);
        if (matcher.matches()) {
          data=matcher.group(1);
          data=data.replaceAll("String_Node_Str","String_Node_Str");
          mMessage.setText(data);
          mDecryptButton.setText(R.string.btn_verify);
        }
      }
    }
    mReturnResult=true;
  }
  if (mSource.getCurrentView().getId() == R.id.sourceMessage && mMessage.getText().length() == 0) {
    ClipboardManager clip=(ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
    String data="String_Node_Str";
    Matcher matcher=Apg.PGP_MESSAGE.matcher(clip.getText());
    if (!matcher.matches()) {
      matcher=Apg.PGP_SIGNED_MESSAGE.matcher(clip.getText());
    }
    if (matcher.matches()) {
      data=matcher.group(1);
      mMessage.setText(data);
      Toast.makeText(this,R.string.usingClipboardContent,Toast.LENGTH_SHORT).show();
    }
  }
  mSignatureLayout.setVisibility(View.GONE);
  mDecryptButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      decryptClicked();
    }
  }
);
  mReplyButton.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View v){
      replyClicked();
    }
  }
);
  mReplyButton.setVisibility(View.INVISIBLE);
  if (mReturnResult) {
    mSourcePrevious.setClickable(false);
    mSourcePrevious.setEnabled(false);
    mSourcePrevious.setVisibility(View.INVISIBLE);
    mSourceNext.setClickable(false);
    mSourceNext.setEnabled(false);
    mSourceNext.setVisibility(View.INVISIBLE);
    mSourceLabel.setClickable(false);
    mSourceLabel.setEnabled(false);
  }
  updateSource();
  if (mSource.getCurrentView().getId() == R.id.sourceMessage && mMessage.getText().length() > 0) {
    mDecryptButton.performClick();
  }
}