<commit_before>package de.stephanlindauer.criticalmass.notifications.reminder;


import java.util.*;

public class NextEventTimeCalculator {
    public static ArrayList<Date> getNextThreeCriticalMassDates() {
        Calendar calendar = new GregorianCalendar().getInstance();
        calendar.setTimeZone(TimeZone.getDefault());
        calendar.set(Calendar.HOUR_OF_DAY, 18);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);

        ArrayList<Date> dateList = new ArrayList<Date>();

        while (dateList.size() < 3) {
            if (isLastFridayOfTheMonth(calendar)) {
                Date asDate = new Date(calendar.getTimeInMillis());
                if( asDate.getTime() > new Date().getTime() ){
                    dateList.add(asDate);
                }
            }

            calendar.add(Calendar.DAY_OF_YEAR, 1);
        }

        return dateList;
    }

    private static boolean isLastFridayOfTheMonth(Calendar calendar) {
        GregorianCalendar calendarOneWeekAfter;
        calendarOneWeekAfter = (GregorianCalendar) calendar.clone();<commit_msg>auto format<commit_after>package de.stephanlindauer.criticalmass.notifications.reminder;


import java.util.*;

public class NextEventTimeCalculator {
    public static ArrayList<Date> getNextThreeCriticalMassDates() {
        Calendar calendar = new GregorianCalendar().getInstance();
        calendar.setTimeZone(TimeZone.getDefault());
        calendar.set(Calendar.HOUR_OF_DAY, 18);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);

        ArrayList<Date> dateList = new ArrayList<Date>();

        while (dateList.size() < 3) {
            if (isLastFridayOfTheMonth(calendar)) {
                Date asDate = new Date(calendar.getTimeInMillis());
                if (asDate.getTime() > new Date().getTime()) {
                    dateList.add(asDate);
                }
            }

            calendar.add(Calendar.DAY_OF_YEAR, 1);
        }

        return dateList;
    }

    private static boolean isLastFridayOfTheMonth(Calendar calendar) {
        GregorianCalendar calendarOneWeekAfter;
        calendarOneWeekAfter = (GregorianCalendar) calendar.clone();
{'fraction_non_alphanumeric': 0.1036970243462579, 'fraction_numerical': 0.005410279531109108, 'mean_word_length': 2.637704918032787, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6444361', 'n_tokens_mistral': 636, 'n_tokens_neox': 589, 'n_words': 108}