<commit_before>import ceylon.formatter { FormattingWriter { QueueElement=QueueElement, Token=Token, LineBreak=LineBreak } }

"A strategy to break a series of tokens into multiple lines to accomodate a maximum line length."
shared abstract class LineBreakStrategy() {

    "Determine where the next line break should occur, or return `null` if no line break should
     occur (e. g. because there aren’t enough tokens).
     
     If the returned value `i` exists, it means that tokens `0..i` should be taken from the elements
     and written out; if the element at that index does not contain a line break, a [[LineBreak]] should
     be inserted there first.
     
     To clarify:
     
     * If `elements[i]` is neither a [[LineBreak]] nor a [[Token]] with more than one line,
       a `LineBreak` should be inserted at `elements[i]`;
     * then (this is independent of the “if” above), `elements[0..i]` should be removed and written."
    shared formal Integer? lineBreakLocation(
        "The tokens of the line."
        QueueElement[] elements,
        "The initial line length (usually indentation)."
        Integer offset,
        "The maximum line length."
        see(`value FormattingOptions.maxLineLength`)
        Integer maxLineLength);
}

shared LineBreakStrategy? parseLineBreakStrategy(String string) {
    if (string == "default") {
        return DefaultLineBreaks();
    }
    throw Exception("Unknown line breaking strategy '``string``'!");
}
<commit_msg>Remove two warnings<commit_after>import ceylon.formatter { FormattingWriter { QueueElement=QueueElement } }

"A strategy to break a series of tokens into multiple lines to accomodate a maximum line length."
shared abstract class LineBreakStrategy() {

    "Determine where the next line break should occur, or return `null` if no line break should
     occur (e. g. because there aren’t enough tokens).
     
     If the returned value `i` exists, it means that tokens `0..i` should be taken from the elements
     and written out; if the element at that index does not contain a line break, a
     [[LineBreak|ceylon.formatter::FormattingWriter.LineBreak]] should be inserted there first.
     
     To clarify:
     
     * If `elements[i]` is neither a [[LineBreak|ceylon.formatter::FormattingWriter.LineBreak]] nor a
       [[Token|ceylon.formatter::FormattingWriter.Token]] with more than one line,
       a `LineBreak` should be inserted at `elements[i]`;
     * then (this is independent of the “if” above), `elements[0..i]` should be removed and written."
    shared formal Integer? lineBreakLocation(
        "The tokens of the line."
        QueueElement[] elements,
        "The initial line length (usually indentation)."
        Integer offset,
        "The maximum line length."
        see(`value FormattingOptions.maxLineLength`)
        Integer maxLineLength);
}

shared LineBreakStrategy? parseLineBreakStrategy(String string) {
    if (string == "default") {
        return DefaultLineBreaks();
    }
    throw Exception("Unknown line breaking strategy '``string``'!");
}

{'fraction_non_alphanumeric': 0.08951822916666667, 'fraction_numerical': 0.0013020833333333333, 'mean_word_length': 3.3774928774928776, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6717071', 'n_tokens_mistral': 807, 'n_tokens_neox': 787, 'n_words': 338}