Program: 187458
Project: 187458
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 mess=messages[0].getOriginatingAddress();
      mess=mess.substring(1,mess.length());
      if (dba.isTrustedContact(mess)) {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        try {
          sendToSelf(messages[0].getOriginatingAddress(),messages[0].getMessageBody());
          sendToSelf(messages[0].getOriginatingAddress(),Encryption.aes_decrypt(PASSWORD,messages[0].getMessageBody()));
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
          msgList=getSMS();
          list.setAdapter(new ArrayAdapter<String>(getBaseContext(),android.R.layout.test_list_item,messageMaker(msgList)));
          list.setItemsCanFocus(false);
        }
 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();
        msgList=getSMS();
        list.setAdapter(new ArrayAdapter<String>(getBaseContext(),android.R.layout.test_list_item,messageMaker(msgList)));
        list.setItemsCanFocus(false);
      }
    }
  }
  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 mess=messages[0].getOriginatingAddress();
      if (dba.isTrustedContact(mess)) {
        Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
        Toast.makeText(context,messages[0].getMessageBody(),Toast.LENGTH_LONG).show();
        try {
          sendToSelf(messages[0].getOriginatingAddress(),messages[0].getMessageBody());
          sendToSelf(messages[0].getOriginatingAddress(),Encryption.aes_decrypt(PASSWORD,messages[0].getMessageBody()));
          Toast.makeText(context,"String_Node_Str",Toast.LENGTH_LONG).show();
          msgList=getSMS();
          list.setAdapter(new ArrayAdapter<String>(getBaseContext(),android.R.layout.test_list_item,messageMaker(msgList)));
          list.setItemsCanFocus(false);
        }
 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();
        msgList=getSMS();
        list.setAdapter(new ArrayAdapter<String>(getBaseContext(),android.R.layout.test_list_item,messageMaker(msgList)));
        list.setItemsCanFocus(false);
      }
    }
  }
  this.abortBroadcast();
}