Program: 187422
Project: 187422
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Bundle bundle=intent.getExtras();
  if (bundle != null) {
    Object[] pdus=(Object[])bundle.get("String_Node_Str");
    final SmsMessage[] messages=new SmsMessage[pdus.length];
    for (int i=0; i < pdus.length; i++) {
      messages[i]=SmsMessage.createFromPdu((byte[])pdus[i]);
    }
    if (messages.length > -1) {
      String address=messages[0].getOriginatingAddress();
      if (Prephase3Activity.dba.isTrustedContact((address))) {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        try {
          Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),messages[0].getMessageBody(),Prephase3Activity.INBOX);
          Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),Encryption.aes_decrypt(Prephase3Activity.dba.getRow(ContactRetriever.format(address)).getPublicKey(),messages[0].getMessageBody()),Prephase3Activity.INBOX);
          Prephase3Activity.updateList(context);
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
        }
 catch (        Exception e) {
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
          e.printStackTrace();
        }
      }
 else {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),messages[0].getMessageBody(),Prephase3Activity.INBOX);
      }
    }
  }
  this.abortBroadcast();
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Bundle bundle=intent.getExtras();
  if (bundle != null) {
    Object[] pdus=(Object[])bundle.get("String_Node_Str");
    final SmsMessage[] messages=new SmsMessage[pdus.length];
    for (int i=0; i < pdus.length; i++) {
      messages[i]=SmsMessage.createFromPdu((byte[])pdus[i]);
    }
    if (messages.length > -1) {
      String address=messages[0].getOriginatingAddress();
      if (Prephase3Activity.dba.isTrustedContact((address))) {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        TrustedContact trustedContact=Prephase3Activity.dba.getRow(ContactRetriever.format(address));
        try {
          Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),messages[0].getMessageBody(),Prephase3Activity.INBOX);
          String secretMessage=Encryption.aes_decrypt(trustedContact.getPublicKey(),messages[0].getMessageBody());
          Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),secretMessage,Prephase3Activity.INBOX);
          Prephase3Activity.updateList(context);
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
        }
 catch (        Exception e) {
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
          e.printStackTrace();
        }
      }
 else {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        Prephase3Activity.sendToSelf(context,messages[0].getOriginatingAddress(),messages[0].getMessageBody(),Prephase3Activity.INBOX);
        Prephase3Activity.updateList(context);
      }
    }
  }
  this.abortBroadcast();
}