<commit_before>package com.bloatit.web.pages.master.sidebar;

import com.bloatit.framework.webprocessor.components.HtmlDiv;
import com.bloatit.framework.webprocessor.components.advanced.HtmlClearer;
import com.bloatit.framework.webprocessor.components.meta.HtmlElement;
import com.bloatit.framework.webprocessor.url.Url;

public class TwoColumnLayout extends HtmlDiv {

    private final HtmlDiv leftColumn;
    private final HtmlDiv rightColumn;
    private final PluginBox plugins;

    public TwoColumnLayout(final Url url) {
        this(false, url);
    }

    /**
     * Creates a two column layout with, or without a box around it
     * 
     * @param box <i>true</i> if a box should surround the whole layout,
     *            <i>false</i> otherwise
     */
    public TwoColumnLayout(final boolean box, final Url url) {
        super("two_column");
        final HtmlDiv leftColumnBlock = new HtmlDiv((box ? "left_column_block" : "left_column_block_without_box"));
        final HtmlDiv rightColumnBlock = new HtmlDiv("right_column_block");
        leftColumn = new HtmlDiv((box ? "left_column" : "left_column_without_box"));
        rightColumn = new HtmlDiv("right_column");

        plugins = new PluginBox(url);
        rightColumn.add(plugins);

        leftColumnBlock.add(leftColumn);
        rightColumnBlock.add(rightColumn);
        add(leftColumnBlock);
        add(rightColumnBlock);
        add(new HtmlClearer());
    }

    /**
     * Adds an element to the core of the page
     * 
     * @param element the element to add
     */
    public void addLeft(final HtmlElement element) {
        leftColumn.add(element);
    }

    /**<commit_msg>Updating 2 column layout to HtmlLead to avoid stupid errors<commit_after>package com.bloatit.web.pages.master.sidebar;

import com.bloatit.framework.webprocessor.components.HtmlDiv;
import com.bloatit.framework.webprocessor.components.advanced.HtmlClearer;
import com.bloatit.framework.webprocessor.components.meta.HtmlElement;
import com.bloatit.framework.webprocessor.components.meta.HtmlLeaf;
import com.bloatit.framework.webprocessor.url.Url;

public class TwoColumnLayout extends HtmlLeaf {

    private final HtmlDiv leftColumn;
    private final HtmlDiv rightColumn;
    private final PluginBox plugins;

    public TwoColumnLayout(final Url url) {
        this(false, url);
    }

    /**
     * Creates a two column layout with, or without a box around it
     * 
     * @param box <i>true</i> if a box should surround the whole layout,
     *            <i>false</i> otherwise
     */
    public TwoColumnLayout(final boolean box, final Url url) {
        super();

        HtmlDiv master = new HtmlDiv("two_column");
        add(master);

        final HtmlDiv leftColumnBlock = new HtmlDiv((box ? "left_column_block" : "left_column_block_without_box"));
        final HtmlDiv rightColumnBlock = new HtmlDiv("right_column_block");
        leftColumn = new HtmlDiv((box ? "left_column" : "left_column_without_box"));
        rightColumn = new HtmlDiv("right_column");

        plugins = new PluginBox(url);
        rightColumn.add(plugins);

        leftColumnBlock.add(leftColumn);
        rightColumnBlock.add(rightColumn);
        master.add(leftColumnBlock);
        master.add(rightColumnBlock);
        master.add(new HtmlClearer());
    }

    /**
     * Adds an element to the core of the page
     * 
     * @param element the element to add
     */
    public void addLeft(final HtmlElement element) {
        leftColumn.add(element);
    }

    /**
{'fraction_non_alphanumeric': 0.0963549025148347, 'fraction_numerical': 0.00028256569652444194, 'mean_word_length': 3.1019698725376594, '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': '3112263', 'n_tokens_mistral': 1040, 'n_tokens_neox': 1011, 'n_words': 250}