Program: 143799
Project: 143799
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  mContext=getApplicationContext();
  Global.conversationsList.clear();
  loadConversationsList();
  notificationsId=new HashMap<String,Integer>();
  userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
  activ_notif=userPref.getBoolean(LheidoUtils.receiver_notification_key,true);
  vibrate=userPref.getBoolean(LheidoUtils.vibration_key,true);
  v=(Vibrator)mContext.getSystemService(Context.VIBRATOR_SERVICE);
  mBroadcast=new MainServiceReceiver(){
    @Override protected void customReceiveSms(    String new_name,    String phone,    String body,    long date){
      userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
      activ_notif=userPref.getBoolean(LheidoUtils.receiver_notification_key,true);
      Toast.makeText(mContext,"String_Node_Str" + new_name,Toast.LENGTH_LONG).show();
      if (activ_notif) {
        if (!notificationsId.containsKey(phone))         notificationsId.put(phone,notificationsId.size());
        Intent notificationIntent=new Intent(mContext,MainLheidoSMS.class);
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
        PendingIntent pIntent=PendingIntent.getActivity(mContext,0,notificationIntent,0);
        Intent openAction=new Intent(mContext,MainLheidoSMS.class);
        openAction.putExtra("String_Node_Str",new_name);
        openAction.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
        PendingIntent openPending=PendingIntent.getActivity(mContext,0,openAction,PendingIntent.FLAG_CANCEL_CURRENT);
        showNotification(body,new_name,phone,pIntent,openPending);
      }
      playNotificationSound();
      moveConversationOnTop(phone,true);
      LheidoUtils.Send.receiveNewMessage(mContext);
      Time d=new Time();
      d.set(date);
      LheidoUtils.Send.notifyReceiveSms(mContext,new Message(-1,body,phone,1,d));
    }
    @Override protected void customDeliveredSms(    long id){
      userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
      Toast.makeText(mContext,"String_Node_Str",Toast.LENGTH_SHORT).show();
      LheidoUtils.Send.notifyDeliveredSms(mContext,id);
      if (userPref.getBoolean("String_Node_Str",true)) {
        try {
          long[] pattern={0,100,100,100,100,100,100,100,10};
          v.vibrate(pattern,-1);
        }
 catch (        Exception e) {
          Toast.makeText(mContext,e.getMessage(),Toast.LENGTH_LONG).show();
        }
      }
    }
    @Override protected void customNewMessageRead(    int position,    String phone){
      cancelNotif(phone);
      int i=0;
      int size=Global.conversationsList.size();
      while (i < size && !PhoneNumberUtils.compare(Global.conversationsList.get(i).getPhone(),phone)) {
        i++;
      }
      if (i < size && PhoneNumberUtils.compare(Global.conversationsList.get(i).getPhone(),phone)) {
        Global.conversationsList.get(i).markNewMessage(false);
      }
      LheidoUtils.Send.notifyDataChanged(mContext);
    }
    @Override protected void customSentSms(){
    }
    @Override protected void customReceiveMms(    String new_name,    String phone,    String body,    long date){
      Toast.makeText(mContext,"String_Node_Str" + new_name,Toast.LENGTH_LONG).show();
      if (activ_notif) {
        Intent notificationIntent=new Intent(mContext,MainLheidoSMS.class);
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
        PendingIntent pIntent=PendingIntent.getActivity(mContext,0,notificationIntent,0);
        Intent openAction=new Intent(mContext,MainLheidoSMS.class);
        openAction.putExtra("String_Node_Str",new_name);
        PendingIntent openPending=PendingIntent.getActivity(mContext,0,openAction,0);
        showNotification("String_Node_Str",new_name,phone,pIntent,openPending);
      }
      playNotificationSound();
      LheidoUtils.Send.receiveNewMessage(mContext);
    }
    @Override protected void customUserNewMessage(    String phone){
      moveConversationOnTop(phone,false);
      LheidoUtils.Send.receiveNewMessage(mContext);
    }
    @Override protected void customCancelVibrator(){
      v.cancel();
    }
  }
;
  filter=mBroadcast.getIntentFilter(3000);
  getApplicationContext().registerReceiver(mBroadcast,filter);
  Toast.makeText(mContext,"String_Node_Str",Toast.LENGTH_SHORT).show();
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  mContext=getApplicationContext();
  Global.conversationsList.clear();
  loadConversationsList();
  notificationsId=new HashMap<String,Integer>();
  userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
  activ_notif=userPref.getBoolean(LheidoUtils.receiver_notification_key,true);
  vibrate=userPref.getBoolean(LheidoUtils.vibration_key,true);
  v=(Vibrator)mContext.getSystemService(Context.VIBRATOR_SERVICE);
  mBroadcast=new MainServiceReceiver(){
    @Override protected void customReceiveSms(    String new_name,    String phone,    String body,    long date){
      userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
      activ_notif=userPref.getBoolean(LheidoUtils.receiver_notification_key,true);
      Toast.makeText(mContext,"String_Node_Str" + new_name,Toast.LENGTH_LONG).show();
      if (activ_notif) {
        if (!notificationsId.containsKey(phone))         notificationsId.put(phone,notificationsId.size());
        Intent notificationIntent=new Intent(mContext,MainLheidoSMS.class);
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
        PendingIntent pIntent=PendingIntent.getActivity(mContext,0,notificationIntent,0);
        Intent openAction=new Intent(mContext,MainLheidoSMS.class);
        openAction.putExtra("String_Node_Str",new_name);
        openAction.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
        PendingIntent openPending=PendingIntent.getActivity(mContext,0,openAction,PendingIntent.FLAG_CANCEL_CURRENT);
        showNotification(body,new_name,phone,pIntent,openPending);
      }
      playNotificationSound();
      moveConversationOnTop(phone,true);
      LheidoUtils.Send.receiveNewMessage(mContext);
      Time d=new Time();
      d.set(date);
      LheidoUtils.Send.notifyReceiveSms(mContext,new Message(-1,body,phone,1,d));
    }
    @Override protected void customDeliveredSms(    long id){
      userPref=PreferenceManager.getDefaultSharedPreferences(mContext);
      Toast.makeText(mContext,"String_Node_Str",Toast.LENGTH_SHORT).show();
      LheidoUtils.Send.notifyDeliveredSms(mContext,id);
      if (userPref.getBoolean("String_Node_Str",true)) {
        try {
          long[] pattern={0,100,100,100,100,100,100,100,10};
          v.vibrate(pattern,-1);
        }
 catch (        Exception e) {
          Toast.makeText(mContext,e.getMessage(),Toast.LENGTH_LONG).show();
        }
      }
    }
    @Override protected void customNewMessageRead(    int position,    String phone){
      cancelNotif(phone);
      int i=0;
      int size=Global.conversationsList.size();
      while (i < size && !PhoneNumberUtils.compare(Global.conversationsList.get(i).getPhone(),phone)) {
        i++;
      }
      if (i < size && PhoneNumberUtils.compare(Global.conversationsList.get(i).getPhone(),phone)) {
        Global.conversationsList.get(i).markNewMessage(false);
      }
      LheidoUtils.Send.notifyDataChanged(mContext);
    }
    @Override protected void customSentSms(){
    }
    @Override protected void customReceiveMms(    String new_name,    String phone,    String body,    long date){
      Toast.makeText(mContext,"String_Node_Str" + new_name,Toast.LENGTH_LONG).show();
      if (activ_notif) {
        Intent notificationIntent=new Intent(mContext,MainLheidoSMS.class);
        notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
        PendingIntent pIntent=PendingIntent.getActivity(mContext,0,notificationIntent,0);
        Intent openAction=new Intent(mContext,MainLheidoSMS.class);
        openAction.putExtra("String_Node_Str",new_name);
        PendingIntent openPending=PendingIntent.getActivity(mContext,0,openAction,0);
        showNotification("String_Node_Str",new_name,phone,pIntent,openPending);
      }
      playNotificationSound();
      LheidoUtils.Send.receiveNewMessage(mContext);
    }
    @Override protected void customUserNewMessage(    String phone){
      moveConversationOnTop(phone,false);
      LheidoUtils.Send.receiveNewMessage(mContext);
    }
    @Override protected void customCancelVibrator(){
      v.cancel();
    }
  }
;
  filter=mBroadcast.getIntentFilter(3000);
  getApplicationContext().registerReceiver(mBroadcast,filter);
  Toast.makeText(mContext,"String_Node_Str",Toast.LENGTH_SHORT).show();
}