<commit_before>package fr.inria.spirals.repairnator.step;

import fr.inria.spirals.repairnator.ProjectInspector;
import fr.inria.spirals.repairnator.ProjectState;

import java.util.Date;

/**
 * Created by urli on 03/01/2017.
 */
public abstract class AbstractStep {

    protected ProjectInspector inspector;
    protected ProjectState state;

    protected boolean shouldStop;
    private AbstractStep nextStep;
    private long dateBegin;
    private long dateEnd;

    public AbstractStep(ProjectInspector inspector) {
        this.inspector = inspector;
        this.shouldStop = false;
    }

    public AbstractStep setNextStep(AbstractStep nextStep) {
        this.nextStep = nextStep;
        return nextStep;
    }

    public ProjectState getState() {
        return state;
    }

    public void setState(ProjectState state) {
        this.state = state;
    }

    protected ProjectState executeNextStep() {
        if (this.nextStep != null) {
            this.nextStep.setState(this.state);
            return this.nextStep.execute();<commit_msg>RepairNator: fix to avoid a NPE when getting step state<commit_after>package fr.inria.spirals.repairnator.step;

import fr.inria.spirals.repairnator.ProjectInspector;
import fr.inria.spirals.repairnator.ProjectState;

import java.util.Date;

/**
 * Created by urli on 03/01/2017.
 */
public abstract class AbstractStep {

    protected ProjectInspector inspector;
    protected ProjectState state;

    protected boolean shouldStop;
    private AbstractStep nextStep;
    private long dateBegin;
    private long dateEnd;

    public AbstractStep(ProjectInspector inspector) {
        this.inspector = inspector;
        this.shouldStop = false;
        this.state = ProjectState.NONE;
    }

    public AbstractStep setNextStep(AbstractStep nextStep) {
        this.nextStep = nextStep;
        return nextStep;
    }

    public ProjectState getState() {
        return state;
    }

    public void setState(ProjectState state) {
        this.state = state;
    }

    protected ProjectState executeNextStep() {
        if (this.nextStep != null) {
            this.nextStep.setState(this.state);
            return this.nextStep.execute();
{'fraction_non_alphanumeric': 0.08121597096188747, 'fraction_numerical': 0.007259528130671506, 'mean_word_length': 2.93048128342246, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1466627', 'n_tokens_mistral': 644, 'n_tokens_neox': 611, 'n_words': 150}