<commit_before>package org.spoofax.jsglr2.parseforest;

import org.metaborg.parsetable.IProduction;
import org.metaborg.parsetable.ProductionType;
import org.spoofax.jsglr2.parser.AbstractParse;
import org.spoofax.jsglr2.stack.IStackNode;

public abstract class ParseForestManager
//@formatter:off
   <ParseForest extends IParseForest,
    ParseNode   extends ParseForest,
    Derivation  extends IDerivation<ParseForest>>
//@formatter:on
{

    abstract public ParseNode createParseNode(AbstractParse<ParseForest, ?> parse, IStackNode stack,
        IProduction production, Derivation firstDerivation);

    abstract public Derivation createDerivation(AbstractParse<ParseForest, ?> parse, IStackNode stack,
        IProduction production, ProductionType productionType, ParseForest[] parseForests);

    abstract public void addDerivation(AbstractParse<ParseForest, ?> parse, ParseNode parseNode, Derivation derivation);

    abstract public ParseForest createCharacterNode(AbstractParse<ParseForest, ?> parse);

    abstract public ParseForest[] parseForestsArray(int length);

    abstract public ParseForest filterStartSymbol(ParseForest parseForest, String startSymbol,
        AbstractParse<ParseForest, ?> parse);

}
<commit_msg>Clarify which stack will be passed to the ParseForestManager<commit_after>package org.spoofax.jsglr2.parseforest;

import org.metaborg.parsetable.IProduction;
import org.metaborg.parsetable.ProductionType;
import org.spoofax.jsglr2.parser.AbstractParse;
import org.spoofax.jsglr2.stack.IStackNode;

public abstract class ParseForestManager
//@formatter:off
   <ParseForest extends IParseForest,
    ParseNode   extends ParseForest,
    Derivation  extends IDerivation<ParseForest>>
//@formatter:on
{

    /**
     * @param stack The parse node will be added to the link _to_ this stack node.
     */
    abstract public ParseNode createParseNode(AbstractParse<ParseForest, ?> parse, IStackNode stack,
        IProduction production, Derivation firstDerivation);

    /**
     * @param stack The derivation will be added to the parse node on the link _to_ this stack node.
     */
    abstract public Derivation createDerivation(AbstractParse<ParseForest, ?> parse, IStackNode stack,
        IProduction production, ProductionType productionType, ParseForest[] parseForests);

    abstract public void addDerivation(AbstractParse<ParseForest, ?> parse, ParseNode parseNode, Derivation derivation);

    abstract public ParseForest createCharacterNode(AbstractParse<ParseForest, ?> parse);

    abstract public ParseForest[] parseForestsArray(int length);

    abstract public ParseForest filterStartSymbol(ParseForest parseForest, String startSymbol,
        AbstractParse<ParseForest, ?> parse);

}

{'fraction_non_alphanumeric': 0.07458866544789762, 'fraction_numerical': 0.0021937842778793418, 'mean_word_length': 5.304147465437788, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3232800', 'n_tokens_mistral': 792, 'n_tokens_neox': 740, 'n_words': 195}