Program: 8384
Project: 8384
Buggy source:
private void decryptStart(){
  Log.d(Constants.TAG,"String_Node_Str");
  Intent intent=new Intent(this,KeychainIntentService.class);
  Bundle data=new Bundle();
  intent.setAction(KeychainIntentService.ACTION_DECRYPT_VERIFY);
  if (mContentUri != null) {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_STREAM);
    data.putParcelable(KeychainIntentService.ENCRYPT_PROVIDER_URI,mContentUri);
  }
 else   if (mDecryptTarget == Id.target.file) {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_URI);
    Log.d(Constants.TAG,"String_Node_Str" + mInputFilename + "String_Node_Str"+ mOutputFilename);
    data.putString(KeychainIntentService.ENCRYPT_INPUT_FILE,mInputFilename);
    data.putString(KeychainIntentService.ENCRYPT_OUTPUT_FILE,mOutputFilename);
  }
 else {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_BYTES);
    String message=mMessage.getText().toString();
    data.putByteArray(KeychainIntentService.DECRYPT_CIPHERTEXT_BYTES,message.getBytes());
  }
  data.putLong(KeychainIntentService.ENCRYPT_SECRET_KEY_ID,mSecretKeyId);
  data.putBoolean(KeychainIntentService.DECRYPT_RETURN_BYTES,mReturnBinary);
  data.putBoolean(KeychainIntentService.DECRYPT_ASSUME_SYMMETRIC,mAssumeSymmetricEncryption);
  intent.putExtra(KeychainIntentService.EXTRA_DATA,data);
  KeychainIntentServiceHandler saveHandler=new KeychainIntentServiceHandler(this,R.string.progress_decrypting,ProgressDialog.STYLE_HORIZONTAL){
    public void handleMessage(    Message message){
      super.handleMessage(message);
      if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
        Bundle returnData=message.getData();
        mSignatureKeyId=0;
        mSignatureLayout.setVisibility(View.GONE);
        AppMsg.makeText(DecryptActivity.this,R.string.decryption_successful,AppMsg.STYLE_INFO).show();
        if (mReturnResult) {
          Intent intent=new Intent();
          intent.putExtras(returnData);
          setResult(RESULT_OK,intent);
          finish();
          return;
        }
switch (mDecryptTarget) {
case Id.target.message:
          String decryptedMessage=returnData.getString(KeychainIntentService.RESULT_DECRYPTED_STRING);
        mMessage.setText(decryptedMessage);
      mMessage.setHorizontallyScrolling(false);
    break;
case Id.target.file:
  if (mDeleteAfter.isChecked()) {
    DeleteFileDialogFragment deleteFileDialog=DeleteFileDialogFragment.newInstance(mInputFilename);
    deleteFileDialog.show(getSupportFragmentManager(),"String_Node_Str");
  }
break;
default :
break;
}
PgpDecryptVerifyResult decryptVerifyResult=returnData.getParcelable(KeychainIntentService.RESULT_DECRYPT_VERIFY_RESULT);
OpenPgpSignatureResult signatureResult=decryptVerifyResult.getSignatureResult();
if (signatureResult != null) {
String userId=signatureResult.getUserId();
mSignatureKeyId=signatureResult.getKeyId();
mUserIdRest.setText("String_Node_Str" + PgpKeyHelper.convertKeyIdToHex(mSignatureKeyId));
if (userId == null) {
userId=getResources().getString(R.string.user_id_no_name);
}
String chunks[]=userId.split("String_Node_Str",2);
userId=chunks[0];
if (chunks.length > 1) {
mUserIdRest.setText("String_Node_Str" + chunks[1]);
}
mUserId.setText(userId);
switch (signatureResult.getStatus()) {
case OpenPgpSignatureResult.SIGNATURE_SUCCESS_UNCERTIFIED:
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_ok);
mLookupKey.setVisibility(View.GONE);
break;
}
case OpenPgpSignatureResult.SIGNATURE_UNKNOWN_PUB_KEY:
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
mLookupKey.setVisibility(View.VISIBLE);
AppMsg.makeText(DecryptActivity.this,R.string.unknown_signature,AppMsg.STYLE_ALERT).show();
break;
}
default :
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
mLookupKey.setVisibility(View.GONE);
break;
}
}
mSignatureLayout.setVisibility(View.VISIBLE);
}
}
}
}
;
Messenger messenger=new Messenger(saveHandler);
intent.putExtra(KeychainIntentService.EXTRA_MESSENGER,messenger);
saveHandler.showProgressDialog(this);
startService(intent);
}

Fixed version (ground truth):
private void decryptStart(){
  Log.d(Constants.TAG,"String_Node_Str");
  Intent intent=new Intent(this,KeychainIntentService.class);
  Bundle data=new Bundle();
  intent.setAction(KeychainIntentService.ACTION_DECRYPT_VERIFY);
  if (mContentUri != null) {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_STREAM);
    data.putParcelable(KeychainIntentService.ENCRYPT_PROVIDER_URI,mContentUri);
  }
 else   if (mDecryptTarget == Id.target.file) {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_URI);
    Log.d(Constants.TAG,"String_Node_Str" + mInputFilename + "String_Node_Str"+ mOutputFilename);
    data.putString(KeychainIntentService.ENCRYPT_INPUT_FILE,mInputFilename);
    data.putString(KeychainIntentService.ENCRYPT_OUTPUT_FILE,mOutputFilename);
  }
 else {
    data.putInt(KeychainIntentService.TARGET,KeychainIntentService.TARGET_BYTES);
    String message=mMessage.getText().toString();
    data.putByteArray(KeychainIntentService.DECRYPT_CIPHERTEXT_BYTES,message.getBytes());
  }
  data.putLong(KeychainIntentService.ENCRYPT_SECRET_KEY_ID,mSecretKeyId);
  data.putBoolean(KeychainIntentService.DECRYPT_RETURN_BYTES,mReturnBinary);
  data.putBoolean(KeychainIntentService.DECRYPT_ASSUME_SYMMETRIC,mAssumeSymmetricEncryption);
  intent.putExtra(KeychainIntentService.EXTRA_DATA,data);
  KeychainIntentServiceHandler saveHandler=new KeychainIntentServiceHandler(this,getString(R.string.progress_decrypting),ProgressDialog.STYLE_HORIZONTAL){
    public void handleMessage(    Message message){
      super.handleMessage(message);
      if (message.arg1 == KeychainIntentServiceHandler.MESSAGE_OKAY) {
        Bundle returnData=message.getData();
        mSignatureKeyId=0;
        mSignatureLayout.setVisibility(View.GONE);
        AppMsg.makeText(DecryptActivity.this,R.string.decryption_successful,AppMsg.STYLE_INFO).show();
        if (mReturnResult) {
          Intent intent=new Intent();
          intent.putExtras(returnData);
          setResult(RESULT_OK,intent);
          finish();
          return;
        }
switch (mDecryptTarget) {
case Id.target.message:
          String decryptedMessage=returnData.getString(KeychainIntentService.RESULT_DECRYPTED_STRING);
        mMessage.setText(decryptedMessage);
      mMessage.setHorizontallyScrolling(false);
    break;
case Id.target.file:
  if (mDeleteAfter.isChecked()) {
    DeleteFileDialogFragment deleteFileDialog=DeleteFileDialogFragment.newInstance(mInputFilename);
    deleteFileDialog.show(getSupportFragmentManager(),"String_Node_Str");
  }
break;
default :
break;
}
PgpDecryptVerifyResult decryptVerifyResult=returnData.getParcelable(KeychainIntentService.RESULT_DECRYPT_VERIFY_RESULT);
OpenPgpSignatureResult signatureResult=decryptVerifyResult.getSignatureResult();
if (signatureResult != null) {
String userId=signatureResult.getUserId();
mSignatureKeyId=signatureResult.getKeyId();
mUserIdRest.setText("String_Node_Str" + PgpKeyHelper.convertKeyIdToHex(mSignatureKeyId));
if (userId == null) {
userId=getResources().getString(R.string.user_id_no_name);
}
String chunks[]=userId.split("String_Node_Str",2);
userId=chunks[0];
if (chunks.length > 1) {
mUserIdRest.setText("String_Node_Str" + chunks[1]);
}
mUserId.setText(userId);
switch (signatureResult.getStatus()) {
case OpenPgpSignatureResult.SIGNATURE_SUCCESS_UNCERTIFIED:
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_ok);
mLookupKey.setVisibility(View.GONE);
break;
}
case OpenPgpSignatureResult.SIGNATURE_UNKNOWN_PUB_KEY:
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
mLookupKey.setVisibility(View.VISIBLE);
AppMsg.makeText(DecryptActivity.this,R.string.unknown_signature,AppMsg.STYLE_ALERT).show();
break;
}
default :
{
mSignatureStatusImage.setImageResource(R.drawable.overlay_error);
mLookupKey.setVisibility(View.GONE);
break;
}
}
mSignatureLayout.setVisibility(View.VISIBLE);
}
}
}
}
;
Messenger messenger=new Messenger(saveHandler);
intent.putExtra(KeychainIntentService.EXTRA_MESSENGER,messenger);
saveHandler.showProgressDialog(this);
startService(intent);
}