Program: 8445
Project: 8445
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.source_label);
  mSourcePrevious=(ImageView)findViewById(R.id.source_previous);
  mSourceNext=(ImageView)findViewById(R.id.source_next);
  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.layout_signature);
  mSignatureStatusImage=(ImageView)findViewById(R.id.ic_signature_status);
  mUserId=(TextView)findViewById(R.id.main_user_id);
  mUserIdRest=(TextView)findViewById(R.id.main_user_id_rest);
  View tmp=findViewById(R.id.source_file);
  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.delete_after_decryption);
  Intent intent=getIntent();
  if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_VIEW)) {
    Uri uri=intent.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=Strings.fromUTF8ByteArray(byteOut.toByteArray());
      mMessage.setText(data);
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
  }
 else   if (intent.getAction() != null && intent.getAction().equals(Apg.Intent.DECRYPT)) {
    Bundle extras=intent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString("String_Node_Str");
    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("String_Node_Str");
    mSubject=extras.getString("String_Node_Str");
  }
  if (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()) {
      data=matcher.group(1);
      mMessage.setText(data);
      Toast.makeText(this,R.string.using_clipboard_content,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 (mMessage.getText().length() > 0) {
    mDecryptButton.performClick();
  }
  updateSource();
}

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.source_label);
  mSourcePrevious=(ImageView)findViewById(R.id.source_previous);
  mSourceNext=(ImageView)findViewById(R.id.source_next);
  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.layout_signature);
  mSignatureStatusImage=(ImageView)findViewById(R.id.ic_signature_status);
  mUserId=(TextView)findViewById(R.id.main_user_id);
  mUserIdRest=(TextView)findViewById(R.id.main_user_id_rest);
  View tmp=findViewById(R.id.source_file);
  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.delete_after_decryption);
  mSource.setInAnimation(null);
  mSource.setOutAnimation(null);
  while (mSource.getCurrentView().getId() != R.id.source_message) {
    mSource.showNext();
  }
  Intent intent=getIntent();
  if (intent.getAction() != null && intent.getAction().equals(Intent.ACTION_VIEW)) {
    Uri uri=intent.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=Strings.fromUTF8ByteArray(byteOut.toByteArray());
      mMessage.setText(data);
    }
 catch (    FileNotFoundException e) {
    }
catch (    IOException e) {
    }
  }
 else   if (intent.getAction() != null && intent.getAction().equals(Apg.Intent.DECRYPT)) {
    Bundle extras=intent.getExtras();
    if (extras == null) {
      extras=new Bundle();
    }
    String data=extras.getString("String_Node_Str");
    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("String_Node_Str");
    mSubject=extras.getString("String_Node_Str");
  }
 else   if (intent.getAction() != null && intent.getAction().equals(Apg.Intent.DECRYPT_FILE)) {
    mSource.setInAnimation(null);
    mSource.setOutAnimation(null);
    while (mSource.getCurrentView().getId() != R.id.source_file) {
      mSource.showNext();
    }
  }
  Log.e("String_Node_Str","String_Node_Str" + mSource.getCurrentView().getId() + "String_Node_Str"+ R.id.source_message+ "String_Node_Str"+ mMessage.getText().length());
  if (mSource.getCurrentView().getId() == R.id.source_message && 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.using_clipboard_content,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 (mSource.getCurrentView().getId() == R.id.source_message && mMessage.getText().length() > 0) {
    mDecryptButton.performClick();
  }
  updateSource();
}