<commit_before>package eu.hansolo.enzo.qlocktwo;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;


/**
 * Created by
 * User: hansolo
 * Date: 27.02.13
 * Time: 15:44
 */
public class QlockGerman implements Qlock {
    private static final QlockTwo.Language LANGUAGE = QlockTwo.Language.GERMAN;
    private static final String[][] MATRIX = {
        {"E", "S", "K", "I", "S", "T", "A", "F", "Ü", "N", "F"},
        {"Z", "E", "H", "N", "Z", "W", "A", "N", "Z", "I", "G"},
        {"D", "R", "E", "I", "V", "I", "E", "R", "T", "E", "L"},
        {"V", "O", "R", "F", "U", "N", "K", "N", "A", "C", "H"},
        {"H", "A", "L", "B", "A", "E", "L", "F", "Ü", "N", "F"},
        {"E", "I", "N", "S", "X", "Ä", "M", "Z", "W", "E", "I"},
        {"D", "R", "E", "I", "A", "U", "J", "V", "I", "E", "R"},
        {"S", "E", "C", "H", "S", "N", "L", "A", "C", "H", "T"},
        {"S", "I", "E", "B", "E", "N", "Z", "W", "Ö", "L", "F"},
        {"Z", "E", "H", "N", "E", "U", "N", "K", "U", "H", "R"}
    };
    private boolean p1;
    private boolean p2;
    private boolean p3;
    private boolean p4;
    private final ConcurrentHashMap<Integer, String> LOOKUP;
    private List<QlockWord> timeList;


    public QlockGerman() {
        LOOKUP = new ConcurrentHashMap<>();
        LOOKUP.putAll(QlockTwo.Language.GERMAN.getLookup());
        timeList = new ArrayList<>(10);
    }

    @Override public String[][] getMatrix() {
        return MATRIX;
    }

    @Override public List<QlockWord> getTime(int minute, int hour) {
        if (hour > 12) {
            hour -= 12;
        }
        if (hour <= 0) {
            hour += 12;
        }

        if (minute > 60) {
            minute -= 60;
            hour++;
        }
        if (minute < 0) {
            minute += 60;
            hour--;
        }

        if (minute %5 == 0) {
            p1 = false;
            p2 = false;
            p3 = false;
            p4 = false;
        }

        if (minute %10 == 1 || minute %10 == 6) {
            p1 = true;
        }

        if (minute %10 == 2 || minute %10 == 7) {
            p1 = true;
            p2 = true;
        }

        if (minute %10 == 3 || minute %10 == 8) {
            p1 = true;
            p2 = true;
            p3 = true;
        }

        if (minute %10 == 4 || minute %10 == 9) {
            p1 = true;
            p2 = true;
            p3 = true;
            p4 = true;
        }

        minute -= minute%5;

        timeList.clear();

        timeList.add(QlockLanguage.ES);
        timeList.add(QlockLanguage.IST);
        switch (minute) {
            case 0:
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                timeList.add(QlockLanguage.UHR);
                break;
            case 5:
                timeList.add(QlockLanguage.FÜNF1);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 10:
                timeList.add(QlockLanguage.ZEHN);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 15:
                timeList.add(QlockLanguage.VIERTEL);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 20:
                timeList.add(QlockLanguage.ZWANZIG);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 25:
                timeList.add(QlockLanguage.FÜNF1);
                timeList.add(QlockLanguage.VOR);
                timeList.add(QlockLanguage.HALB);
                addHour(timeList, hour);
                break;
            case 30:
                timeList.add(QlockLanguage.HALB);
                addHour(timeList, hour);<commit_msg>small fix in German QlockTwo<commit_after>package eu.hansolo.enzo.qlocktwo;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;


/**
 * Created by
 * User: hansolo
 * Date: 27.02.13
 * Time: 15:44
 */
public class QlockGerman implements Qlock {
    private static final QlockTwo.Language LANGUAGE = QlockTwo.Language.GERMAN;
    private static final String[][] MATRIX = {
        {"E", "S", "K", "I", "S", "T", "A", "F", "Ü", "N", "F"},
        {"Z", "E", "H", "N", "Z", "W", "A", "N", "Z", "I", "G"},
        {"D", "R", "E", "I", "V", "I", "E", "R", "T", "E", "L"},
        {"V", "O", "R", "F", "U", "N", "K", "N", "A", "C", "H"},
        {"H", "A", "L", "B", "A", "E", "L", "F", "Ü", "N", "F"},
        {"E", "I", "N", "S", "X", "Ä", "M", "Z", "W", "E", "I"},
        {"D", "R", "E", "I", "A", "U", "J", "V", "I", "E", "R"},
        {"S", "E", "C", "H", "S", "N", "L", "A", "C", "H", "T"},
        {"S", "I", "E", "B", "E", "N", "Z", "W", "Ö", "L", "F"},
        {"Z", "E", "H", "N", "E", "U", "N", "K", "U", "H", "R"}
    };
    private boolean p1;
    private boolean p2;
    private boolean p3;
    private boolean p4;
    private final ConcurrentHashMap<Integer, String> LOOKUP;
    private List<QlockWord> timeList;


    public QlockGerman() {
        LOOKUP = new ConcurrentHashMap<>();
        LOOKUP.putAll(QlockTwo.Language.GERMAN.getLookup());
        timeList = new ArrayList<>(10);
    }

    @Override public String[][] getMatrix() {
        return MATRIX;
    }

    @Override public List<QlockWord> getTime(int minute, int hour) {
        if (hour > 12) {
            hour -= 12;
        }
        if (hour <= 0) {
            hour += 12;
        }

        if (minute > 60) {
            minute -= 60;
            hour++;
        }
        if (minute < 0) {
            minute += 60;
            hour--;
        }

        if (minute %5 == 0) {
            p1 = false;
            p2 = false;
            p3 = false;
            p4 = false;
        }

        if (minute %10 == 1 || minute %10 == 6) {
            p1 = true;
        }

        if (minute %10 == 2 || minute %10 == 7) {
            p1 = true;
            p2 = true;
        }

        if (minute %10 == 3 || minute %10 == 8) {
            p1 = true;
            p2 = true;
            p3 = true;
        }

        if (minute %10 == 4 || minute %10 == 9) {
            p1 = true;
            p2 = true;
            p3 = true;
            p4 = true;
        }

        minute -= minute%5;

        timeList.clear();

        timeList.add(QlockLanguage.ES);
        timeList.add(QlockLanguage.IST);
        switch (minute) {
            case 0:
                timeList.add(hour == 10 ? QlockLanguage.ZEHN1 : QlockLanguage.valueOf(LOOKUP.get(hour)));
                timeList.add(QlockLanguage.UHR);
                break;
            case 5:
                timeList.add(QlockLanguage.FÜNF1);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 10:
                timeList.add(QlockLanguage.ZEHN);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 15:
                timeList.add(QlockLanguage.VIERTEL);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 20:
                timeList.add(QlockLanguage.ZWANZIG);
                timeList.add(QlockLanguage.NACH);
                timeList.add(QlockLanguage.valueOf(LOOKUP.get(hour)));
                break;
            case 25:
                timeList.add(QlockLanguage.FÜNF1);
                timeList.add(QlockLanguage.VOR);
                timeList.add(QlockLanguage.HALB);
                addHour(timeList, hour);
                break;
            case 30:
                timeList.add(QlockLanguage.HALB);
                addHour(timeList, hour);
{'fraction_non_alphanumeric': 0.18052462261816382, 'fraction_numerical': 0.021405592675080427, 'mean_word_length': 1.5611533586818758, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4660600', 'n_tokens_mistral': 2874, 'n_tokens_neox': 2696, 'n_words': 636}