<commit_before>package com.wheany;

import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.server.AbstractErrorMessage;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.spring.annotation.SpringView;
import com.vaadin.ui.*;

import javax.annotation.PostConstruct;

@SpringView(name = DefaultView.VIEW_NAME)
public class DefaultView extends VerticalLayout implements View {
    public static final String VIEW_NAME = "";

    @PostConstruct
    void init() {
        HorizontalLayout urlBar = new HorizontalLayout();
        TextField urlField = new TextField("Url to fetch");
        urlField.setWidth(50, Unit.EM);
        urlField.setValue("http://example.com/news");
        urlBar.addComponent(urlField);
        Button fetchButton = new Button("Fetch");
        urlBar.addComponent(fetchButton);
        urlBar.setComponentAlignment(fetchButton, Alignment.BOTTOM_LEFT);
        addComponent(urlBar);

        HorizontalLayout selectorBar = new HorizontalLayout();
        TextField selectorField = new TextField("Selector for items");
        selectorField.setValue("ul.news li");
        selectorField.setWidth(50, Unit.EM);
        selectorBar.addComponent(selectorField);
        Button selectorTestButton = new Button("Test selector");
        selectorBar.addComponent(selectorTestButton);
        selectorBar.setComponentAlignment(selectorTestButton, Alignment.BOTTOM_LEFT);
        addComponent(selectorBar);

        Label itemPreview = new Label("<li class=\"news-item\">\n" +
                "\t<a class=\"news-link\" href=\"http://example.com/news-item1.html\">This is an interesting link</a>\n" +
                "\t<a class=\"unrelated-link\" href=\"http://example.com/pictures-of-kittens\">This is an unrelated link</a>\n" +
                "</li>", ContentMode.PREFORMATTED);
        addComponent(itemPreview);

        HorizontalLayout linkSelectorBar = new HorizontalLayout();
        TextField linkSelectorField = new TextField("Selector for link");
        linkSelectorField.setValue("a.news-link");
        linkSelectorField.setWidth(50, Unit.EM);
        linkSelectorBar.addComponent(linkSelectorField);
        Button linkSelectorTestButton = new Button("Test selector");
        linkSelectorBar.addComponent(linkSelectorTestButton);
        linkSelectorBar.setComponentAlignment(linkSelectorTestButton, Alignment.BOTTOM_LEFT);
        addComponent(linkSelectorBar);

        Label urlPreview = new Label("http://example.com/news-item1.html", ContentMode.PREFORMATTED);
        addComponent(urlPreview);

        HorizontalLayout nextPageSelectorBar = new HorizontalLayout();
        TextField nextPageSelectorField = new TextField("Selector for link");
        nextPageSelectorField.setValue("a.next-page");
        nextPageSelectorField.setWidth(50, Unit.EM);
        nextPageSelectorBar.addComponent(nextPageSelectorField);
        Button nextPageSelectorTestButton = new Button("Test selector");
        nextPageSelectorBar.addComponent(nextPageSelectorTestButton);
        nextPageSelectorBar.setComponentAlignment(nextPageSelectorTestButton, Alignment.BOTTOM_LEFT);

        addComponent(nextPageSelectorBar);

        Label nextPagePreview = new Label("<a class=\"next-page\" href=\"news-page2.html\">", ContentMode.PREFORMATTED);
        addComponent(nextPagePreview);
    }

    @Override
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        // the view is constructed in the init() method()
    }
}<commit_msg>Make ui elements into fields, add a few textfields<commit_after>package com.wheany;

import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.server.AbstractErrorMessage;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.spring.annotation.SpringView;
import com.vaadin.ui.*;

import javax.annotation.PostConstruct;

@SpringView(name = DefaultView.VIEW_NAME)
public class DefaultView extends VerticalLayout implements View {
    public static final String VIEW_NAME = "";
    private TextField urlField;
    private Button fetchButton;
    private TextField selectorField;
    private Button selectorTestButton;
    private Label itemPreview;
    private TextField linkSelectorField;
    private TextField linkAttributeField;
    private Button linkSelectorTestButton;
    private Label urlPreview;
    private TextField nextPageSelectorField;
    private TextField nextPageAttributeField;
    private Button nextPageSelectorTestButton;
    private Label nextPagePreview;

    @PostConstruct
    void init() {
        HorizontalLayout urlBar = new HorizontalLayout();

        urlField = new TextField("Url to fetch");
        urlField.setWidth(50, Unit.EM);
        urlField.setValue("http://example.com/news");

        fetchButton = new Button("Fetch");

        urlBar.addComponent(urlField);
        urlBar.addComponent(fetchButton);
        urlBar.setComponentAlignment(fetchButton, Alignment.BOTTOM_LEFT);
        addComponent(urlBar);

        HorizontalLayout selectorBar = new HorizontalLayout();

        selectorField = new TextField("Selector for items");
        selectorField.setValue("ul.news li");
        selectorField.setWidth(20, Unit.EM);

        selectorTestButton = new Button("Test selector");

        selectorBar.addComponent(selectorField);
        selectorBar.addComponent(selectorTestButton);
        selectorBar.setComponentAlignment(selectorTestButton, Alignment.BOTTOM_LEFT);
        addComponent(selectorBar);

        Label previewHeading = new Label("<strong>Item preview:</strong>", ContentMode.HTML);
        addComponent(previewHeading);

        itemPreview = new Label("<li class=\"news-item\">\n" +
                "\t<a class=\"news-link\" href=\"http://example.com/news-item1.html\">This is an interesting link</a>\n" +
                "\t<a class=\"unrelated-link\" href=\"http://example.com/pictures-of-kittens\">This is an unrelated link</a>\n" +
                "</li>", ContentMode.PREFORMATTED);
        addComponent(itemPreview);

        HorizontalLayout linkSelectorBar = new HorizontalLayout();

        linkSelectorField = new TextField("Selector for link");
        linkSelectorField.setValue("a.news-link");
        linkSelectorField.setWidth(20, Unit.EM);

        linkAttributeField = new TextField("Attribute for link");
        linkAttributeField.setValue("href");
        linkAttributeField.setWidth(10, Unit.EM);

        linkSelectorTestButton = new Button("Test selector");

        linkSelectorBar.addComponent(linkSelectorField);
        linkSelectorBar.addComponent(linkAttributeField);
        linkSelectorBar.addComponent(linkSelectorTestButton);
        linkSelectorBar.setComponentAlignment(linkSelectorTestButton, Alignment.BOTTOM_LEFT);
        addComponent(linkSelectorBar);

        Label urlPreviewHeading = new Label("<strong>URL preview:</strong>", ContentMode.HTML);
        addComponent(urlPreviewHeading);

        urlPreview = new Label("http://example.com/news-item1.html", ContentMode.PREFORMATTED);
        addComponent(urlPreview);

        HorizontalLayout nextPageSelectorBar = new HorizontalLayout();

        nextPageSelectorField = new TextField("Selector for link");
        nextPageSelectorField.setValue("a[rel=next]");
        nextPageSelectorField.setWidth(20, Unit.EM);

        nextPageAttributeField = new TextField("Attribute for link");
        nextPageAttributeField.setValue("href");
        nextPageAttributeField.setWidth(10, Unit.EM);

        nextPageSelectorTestButton = new Button("Test selector");

        nextPageSelectorBar.addComponent(nextPageSelectorField);
        nextPageSelectorBar.addComponent(nextPageSelectorTestButton);
        nextPageSelectorBar.setComponentAlignment(nextPageSelectorTestButton, Alignment.BOTTOM_LEFT);

        addComponent(nextPageSelectorBar);

        Label nextPagePreviewHeading = new Label("<strong>Next page link preview:</strong>", ContentMode.HTML);
        addComponent(nextPagePreviewHeading);

        nextPagePreview = new Label("<a class=\"next-page\" href=\"news-page2.html\" rel=\"next\">", ContentMode.PREFORMATTED);
        addComponent(nextPagePreview);
    }

    @Override
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        // the view is constructed in the init() method()
    }
}
{'fraction_non_alphanumeric': 0.10426143164950921, 'fraction_numerical': 0.0031122815417763947, 'mean_word_length': 3.73908111174135, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '3736130', 'n_tokens_mistral': 2199, 'n_tokens_neox': 2126, 'n_words': 425}