<commit_before>/**
 * Copyright (c) 2012-2013 <NAME>
 * Alle Rechte vorbehalten / All Rights Reserved.  Use is subject to license terms.
 *
 * <https://github.com/anba/es6draft>
 */
package com.github.anba.es6draft.compiler.analyzer;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.github.anba.es6draft.ast.Node;
import com.github.anba.es6draft.ast.StatementListItem;

/**
 * Base class for node re-writing classesF
 */
abstract class SubMethod<NODE extends Node> {
    protected static final int MAX_SIZE = 32768;

    protected static final int MAX_STATEMENT_SIZE = 8192;
    protected static final int MAX_EXPR_SIZE = 1024;

    protected static final int STMT_METHOD_SIZE = 15;
    protected static final int EXPR_METHOD_SIZE = 5;

    protected SubMethod() {
    }

    /**
     * Process {@code node} and return the new size
     */
    abstract int processNode(NODE node, int oldSize);

    protected void abortCompilation(int size) {
        throw new CodeSizeException(size);
    }

    protected int validateSize(NODE node) {
        CodeSizeVisitor visitor = new CodeSizeVisitor();<commit_msg>Remove stray 'F' from comment<commit_after>/**
 * Copyright (c) 2012-2013 <NAME>
 * Alle Rechte vorbehalten / All Rights Reserved.  Use is subject to license terms.
 *
 * <https://github.com/anba/es6draft>
 */
package com.github.anba.es6draft.compiler.analyzer;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.github.anba.es6draft.ast.Node;
import com.github.anba.es6draft.ast.StatementListItem;

/**
 * Base class for node re-writing classes
 */
abstract class SubMethod<NODE extends Node> {
    protected static final int MAX_SIZE = 32768;

    protected static final int MAX_STATEMENT_SIZE = 8192;
    protected static final int MAX_EXPR_SIZE = 1024;

    protected static final int STMT_METHOD_SIZE = 15;
    protected static final int EXPR_METHOD_SIZE = 5;

    protected SubMethod() {
    }

    /**
     * Process {@code node} and return the new size
     */
    abstract int processNode(NODE node, int oldSize);

    protected void abortCompilation(int size) {
        throw new CodeSizeException(size);
    }

    protected int validateSize(NODE node) {
        CodeSizeVisitor visitor = new CodeSizeVisitor();
{'fraction_non_alphanumeric': 0.09357720119098256, 'fraction_numerical': 0.023819651212250107, 'mean_word_length': 3.531791907514451, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '7251285', 'n_tokens_mistral': 747, 'n_tokens_neox': 695, 'n_words': 211}