Program: 92676
Project: 92676
Buggy source:
private void createNotification(final Context context,final Intent intent){
  final Uri data=intent.getData();
  final Habit habit=Habit.get(ContentUris.parseId(data));
  final Long timestamp=intent.getLongExtra("String_Node_Str",DateHelper.getStartOfToday());
  final Long reminderTime=intent.getLongExtra("String_Node_Str",DateHelper.getStartOfToday());
  if (habit == null)   return;
  new BaseTask(){
    int todayValue;
    @Override protected void doInBackground(){
      todayValue=habit.checkmarks.getTodayValue();
    }
    @Override protected void onPostExecute(    Void aVoid){
      if (todayValue != Checkmark.UNCHECKED)       return;
      if (!checkWeekday(intent,habit))       return;
      if (!habit.hasReminder())       return;
      Intent contentIntent=new Intent(context,MainActivity.class);
      contentIntent.setData(data);
      PendingIntent contentPendingIntent=PendingIntent.getActivity(context,0,contentIntent,0);
      PendingIntent dismissPendingIntent=buildDismissIntent(context);
      PendingIntent checkIntentPending=buildCheckIntent(context,habit,timestamp);
      PendingIntent snoozeIntentPending=buildSnoozeIntent(context,habit);
      Uri ringtoneUri=ReminderHelper.getRingtoneUri(context);
      NotificationCompat.WearableExtender wearableExtender=new NotificationCompat.WearableExtender().setBackground(BitmapFactory.decodeResource(context.getResources(),R.drawable.stripe));
      Notification notification=new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_notification).setContentTitle(habit.name).setContentText(habit.description).setContentIntent(contentPendingIntent).setDeleteIntent(dismissPendingIntent).addAction(R.drawable.ic_action_check,context.getString(R.string.check),checkIntentPending).addAction(R.drawable.ic_action_snooze,context.getString(R.string.snooze),snoozeIntentPending).setSound(ringtoneUri).extend(wearableExtender).setWhen(reminderTime).setShowWhen(true).build();
      notification.flags|=Notification.FLAG_AUTO_CANCEL;
      NotificationManager notificationManager=(NotificationManager)context.getSystemService(Activity.NOTIFICATION_SERVICE);
      int notificationId=(int)(habit.getId() % Integer.MAX_VALUE);
      notificationManager.notify(notificationId,notification);
      super.onPostExecute(aVoid);
    }
  }
.execute();
}

Fixed version (ground truth):
private void createNotification(final Context context,final Intent intent){
  final Uri data=intent.getData();
  final Habit habit=Habit.get(ContentUris.parseId(data));
  final Long timestamp=intent.getLongExtra("String_Node_Str",DateHelper.getStartOfToday());
  final Long reminderTime=intent.getLongExtra("String_Node_Str",DateHelper.getStartOfToday());
  if (habit == null)   return;
  new BaseTask(){
    int todayValue;
    @Override protected void doInBackground(){
      todayValue=habit.checkmarks.getTodayValue();
    }
    @Override protected void onPostExecute(    Void aVoid){
      if (todayValue != Checkmark.UNCHECKED)       return;
      if (!checkWeekday(intent,habit))       return;
      if (!habit.hasReminder())       return;
      Intent contentIntent=new Intent(context,MainActivity.class);
      contentIntent.setData(data);
      PendingIntent contentPendingIntent=PendingIntent.getActivity(context,0,contentIntent,PendingIntent.FLAG_CANCEL_CURRENT);
      PendingIntent dismissPendingIntent=buildDismissIntent(context);
      PendingIntent checkIntentPending=buildCheckIntent(context,habit,timestamp);
      PendingIntent snoozeIntentPending=buildSnoozeIntent(context,habit);
      Uri ringtoneUri=ReminderHelper.getRingtoneUri(context);
      NotificationCompat.WearableExtender wearableExtender=new NotificationCompat.WearableExtender().setBackground(BitmapFactory.decodeResource(context.getResources(),R.drawable.stripe));
      Notification notification=new NotificationCompat.Builder(context).setSmallIcon(R.drawable.ic_notification).setContentTitle(habit.name).setContentText(habit.description).setContentIntent(contentPendingIntent).setDeleteIntent(dismissPendingIntent).addAction(R.drawable.ic_action_check,context.getString(R.string.check),checkIntentPending).addAction(R.drawable.ic_action_snooze,context.getString(R.string.snooze),snoozeIntentPending).setSound(ringtoneUri).extend(wearableExtender).setWhen(reminderTime).setShowWhen(true).build();
      notification.flags|=Notification.FLAG_AUTO_CANCEL;
      NotificationManager notificationManager=(NotificationManager)context.getSystemService(Activity.NOTIFICATION_SERVICE);
      int notificationId=(int)(habit.getId() % Integer.MAX_VALUE);
      notificationManager.notify(notificationId,notification);
      super.onPostExecute(aVoid);
    }
  }
.execute();
}