Program: 8630
Project: 8630
Buggy source:
@Override public void onBindViewHolder(MonthAdapter.ViewHolder holder,int position){
  int originalPosition=position;
  if (Utils.isWeekOfYearEnabled()) {
    if (position % 8 == 0) {
      int row=position / 8;
      if (row > 0 && row <= weeksCount) {
        holder.num.setText(Utils.formatNumber(weekOfYearStart + row - 1));
        holder.num.setTextColor(ContextCompat.getColor(context,colorDayName.resourceId));
        holder.num.setTextSize(12);
        holder.num.setBackgroundResource(0);
        holder.num.setVisibility(View.VISIBLE);
      }
 else       setEmpty(holder);
      return;
    }
    position=fixForWeekOfYearNumber(position);
  }
  if (totalDays < position - 6 - startingDayOfWeek) {
    setEmpty(holder);
  }
 else   if (isPositionHeader(position)) {
    holder.num.setText(Utils.getInitialOfWeekDay(Utils.fixDayOfWeek(position)));
    holder.num.setTextColor(ContextCompat.getColor(context,colorDayName.resourceId));
    holder.num.setTextSize(20);
    holder.today.setVisibility(View.GONE);
    holder.num.setBackgroundResource(0);
    holder.event.setVisibility(View.GONE);
    holder.num.setVisibility(View.VISIBLE);
  }
 else {
    if (position - 7 - startingDayOfWeek >= 0) {
      holder.num.setText(Utils.formatNumber(1 + position - 7 - startingDayOfWeek));
      holder.num.setVisibility(View.VISIBLE);
      DayEntity day=days.get(position - 7 - startingDayOfWeek);
      holder.num.setTextSize(isArabicDigit ? 20 : 25);
      List<AbstractEvent> events=Utils.getEvents(day.getJdn());
      boolean isEvent=false, isHoliday=false;
      if (Utils.isWeekEnd(day.getDayOfWeek()) || !TextUtils.isEmpty(Utils.getEventsTitle(events,true))) {
        isHoliday=false;
      }
      if (events.size() > 0) {
        isEvent=true;
      }
      holder.event.setVisibility(isEvent ? View.VISIBLE : View.GONE);
      holder.today.setVisibility(day.isToday() ? View.VISIBLE : View.GONE);
      if (originalPosition == selectedDay) {
        holder.num.setBackgroundResource(shapeSelectDay.resourceId);
        holder.num.setTextColor(ContextCompat.getColor(context,isHoliday ? colorTextHoliday.resourceId : colorPrimary.resourceId));
      }
 else {
        holder.num.setBackgroundResource(0);
        holder.num.setTextColor(ContextCompat.getColor(context,isHoliday ? colorHoliday.resourceId : colorTextDay.resourceId));
      }
    }
 else {
      setEmpty(holder);
    }
  }
}

Fixed version (ground truth):
@Override public void onBindViewHolder(MonthAdapter.ViewHolder holder,int position){
  int originalPosition=position;
  if (Utils.isWeekOfYearEnabled()) {
    if (position % 8 == 0) {
      int row=position / 8;
      if (row > 0 && row <= weeksCount) {
        holder.num.setText(Utils.formatNumber(weekOfYearStart + row - 1));
        holder.num.setTextColor(ContextCompat.getColor(context,colorDayName.resourceId));
        holder.num.setTextSize(12);
        holder.num.setBackgroundResource(0);
        holder.num.setVisibility(View.VISIBLE);
      }
 else       setEmpty(holder);
      return;
    }
    position=fixForWeekOfYearNumber(position);
  }
  if (totalDays < position - 6 - startingDayOfWeek) {
    setEmpty(holder);
  }
 else   if (isPositionHeader(position)) {
    holder.num.setText(Utils.getInitialOfWeekDay(Utils.fixDayOfWeek(position)));
    holder.num.setTextColor(ContextCompat.getColor(context,colorDayName.resourceId));
    holder.num.setTextSize(20);
    holder.today.setVisibility(View.GONE);
    holder.num.setBackgroundResource(0);
    holder.event.setVisibility(View.GONE);
    holder.num.setVisibility(View.VISIBLE);
  }
 else {
    if (position - 7 - startingDayOfWeek >= 0) {
      holder.num.setText(Utils.formatNumber(1 + position - 7 - startingDayOfWeek));
      holder.num.setVisibility(View.VISIBLE);
      DayEntity day=days.get(position - 7 - startingDayOfWeek);
      holder.num.setTextSize(isArabicDigit ? 20 : 25);
      List<AbstractEvent> events=Utils.getEvents(day.getJdn());
      boolean isEvent=false, isHoliday=false;
      if (Utils.isWeekEnd(day.getDayOfWeek()) || !TextUtils.isEmpty(Utils.getEventsTitle(events,true))) {
        isHoliday=true;
      }
      if (events.size() > 0) {
        isEvent=true;
      }
      holder.event.setVisibility(isEvent ? View.VISIBLE : View.GONE);
      holder.today.setVisibility(day.isToday() ? View.VISIBLE : View.GONE);
      if (originalPosition == selectedDay) {
        holder.num.setBackgroundResource(shapeSelectDay.resourceId);
        holder.num.setTextColor(ContextCompat.getColor(context,isHoliday ? colorTextHoliday.resourceId : colorPrimary.resourceId));
      }
 else {
        holder.num.setBackgroundResource(0);
        holder.num.setTextColor(ContextCompat.getColor(context,isHoliday ? colorHoliday.resourceId : colorTextDay.resourceId));
      }
    }
 else {
      setEmpty(holder);
    }
  }
}