<commit_before>package org.carrot2.workbench.core.jobs;

import java.util.Map;

import org.carrot2.core.*;
import org.carrot2.workbench.core.helpers.ComponentLoader;
import org.carrot2.workbench.core.ui.SearchParameters;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.Job;

public class ProcessingJob extends Job
{
    private ProcessingComponent source;
    private ProcessingComponent algorithm;
    private Map<String, Object> attributes;

    public ProcessingJob(String name, SearchParameters search)
    {
        super(name);
        source = ComponentLoader.SOURCE_LOADER.getExecutableComponent(search.getSourceCaption());
        algorithm =
            ComponentLoader.ALGORITHM_LOADER.getExecutableComponent(search.getAlgorithmCaption());
        attributes = search.getAttributes();
    }

    @Override
    protected IStatus run(IProgressMonitor monitor)
    {
        IStatus status;
        monitor.beginTask("Processing of a query", 1);
        try
        {
            final SimpleController controller = new SimpleController();
            final ProcessingResult result =
                controller.process(attributes, source, algorithm);
            status = new ProcessingStatus(result);
        }
        catch (ProcessingException ex)
        {
            status = new ProcessingStatus(ex);
        }
        monitor.worked(1);
        monitor.done();
        return status;
    }
}<commit_msg>changed progress bar to indeterminate one - makes more sense, since there is no progress reporting so far<commit_after>package org.carrot2.workbench.core.jobs;

import java.util.Map;

import org.carrot2.core.*;
import org.carrot2.workbench.core.helpers.ComponentLoader;
import org.carrot2.workbench.core.ui.SearchParameters;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.jobs.Job;

public class ProcessingJob extends Job
{
    private ProcessingComponent source;
    private ProcessingComponent algorithm;
    private Map<String, Object> attributes;

    public ProcessingJob(String name, SearchParameters search)
    {
        super(name);
        source =
            ComponentLoader.SOURCE_LOADER.getExecutableComponent(search
                .getSourceCaption());
        algorithm =
            ComponentLoader.ALGORITHM_LOADER.getExecutableComponent(search
                .getAlgorithmCaption());
        attributes = search.getAttributes();
    }

    @Override
    protected IStatus run(IProgressMonitor monitor)
    {
        IStatus status;
        monitor.beginTask("Processing of a query", IProgressMonitor.UNKNOWN);
        try
        {
            final SimpleController controller = new SimpleController();
            final ProcessingResult result =
                controller.process(attributes, source, algorithm);
            status = new ProcessingStatus(result);
        }
        catch (ProcessingException ex)
        {
            status = new ProcessingStatus(ex);
        }
        monitor.done();
        return status;
    }
}
{'fraction_non_alphanumeric': 0.08269476372924649, 'fraction_numerical': 0.0031928480204342275, 'mean_word_length': 2.8394607843137254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4828450', 'n_tokens_mistral': 808, 'n_tokens_neox': 779, 'n_words': 177}