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

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import fr.inria.spirals.repairnator.process.inspectors.ProjectInspector;
import fr.inria.spirals.repairnator.process.maven.MavenHelper;
import fr.inria.spirals.repairnator.process.testinformation.FailureLocation;
import fr.inria.spirals.repairnator.process.testinformation.FailureType;
import fr.inria.spirals.repairnator.states.PipelineState;
import org.apache.commons.io.FileUtils;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by urli on 10/07/2017.
 */
public class NPERepair extends AbstractStep {
    private static final String NPEFIX_GOAL = "fr.inria.gforge.spirals:npefix-maven:1.2:npefix";

    public NPERepair(ProjectInspector inspector) {
        super(inspector);
    }

    public NPERepair(ProjectInspector inspector, String name) {
        super(inspector, name);
    }

    private boolean isThereNPE() {
        for (FailureLocation failureLocation : this.inspector.getJobStatus().getFailureLocations()) {
            for (FailureType failureType : failureLocation.getFailures()) {
                if (failureType.getFailureName().equals("java.lang.NullPointerException")) {
                    return true;
                }
            }
        }
        return false;
    }

    @Override
    protected void businessExecute() {
        this.getLogger().debug("Entrance in NPERepair step...");<commit_msg>Change again version for NPE fix<commit_after>package fr.inria.spirals.repairnator.process.step;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import fr.inria.spirals.repairnator.process.inspectors.ProjectInspector;
import fr.inria.spirals.repairnator.process.maven.MavenHelper;
import fr.inria.spirals.repairnator.process.testinformation.FailureLocation;
import fr.inria.spirals.repairnator.process.testinformation.FailureType;
import fr.inria.spirals.repairnator.states.PipelineState;
import org.apache.commons.io.FileUtils;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by urli on 10/07/2017.
 */
public class NPERepair extends AbstractStep {
    private static final String NPEFIX_GOAL = "fr.inria.gforge.spirals:npefix-maven:1.3:npefix";

    public NPERepair(ProjectInspector inspector) {
        super(inspector);
    }

    public NPERepair(ProjectInspector inspector, String name) {
        super(inspector, name);
    }

    private boolean isThereNPE() {
        for (FailureLocation failureLocation : this.inspector.getJobStatus().getFailureLocations()) {
            for (FailureType failureType : failureLocation.getFailures()) {
                if (failureType.getFailureName().equals("java.lang.NullPointerException")) {
                    return true;
                }
            }
        }
        return false;
    }

    @Override
    protected void businessExecute() {
        this.getLogger().debug("Entrance in NPERepair step...");
{'fraction_non_alphanumeric': 0.10510776498376144, 'fraction_numerical': 0.00590493061706525, 'mean_word_length': 3.6410958904109587, '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': '5049374', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1020, 'n_words': 180}