<commit_before>package org.everit.expression.mvel.internal;

import java.io.Serializable;
import java.util.Map;

import org.everit.expression.CompiledExpression;
import org.mvel2.CompileException;
import org.mvel2.MVEL;

public class MvelCompiledExpression implements CompiledExpression {

    private final int lineCount;

    private final int lineOffset;

    private final Serializable mvelExpression;

    public MvelCompiledExpression(final Serializable mvelExpression, final int lineCount, final int lineOffset) {
        this.mvelExpression = mvelExpression;
        this.lineCount = lineCount;
        this.lineOffset = lineOffset;
    }

    @Override
    public Object eval(final Map<String, Object> vars) {
        try {
            return MVEL.executeExpression(mvelExpression, vars);
        } catch (CompileException e) {
            e.setLineNumber(lineCount + e.getLineNumber() - 1);
            e.setColumn(lineOffset + e.getColumn() - 1);
            throw e;
        }
    }

}<commit_msg>Fixing positioning in exception<commit_after>package org.everit.expression.mvel.internal;

import java.io.Serializable;
import java.util.Map;

import org.everit.expression.CompiledExpression;
import org.mvel2.CompileException;
import org.mvel2.MVEL;

public class MvelCompiledExpression implements CompiledExpression {

    private final int lineCount;

    private final int lineOffset;

    private final Serializable mvelExpression;

    public MvelCompiledExpression(final Serializable mvelExpression, final int lineCount, final int lineOffset) {
        this.mvelExpression = mvelExpression;
        this.lineCount = lineCount;
        this.lineOffset = lineOffset;
    }

    @Override
    public Object eval(final Map<String, Object> vars) {
        try {
            return MVEL.executeExpression(mvelExpression, vars);
        } catch (CompileException e) {
            int eLine = e.getLineNumber();
            e.setLineNumber(lineCount + eLine - 1);
            if (eLine == lineCount) {
                e.setColumn(lineOffset + e.getColumn() - 1);
            } else {
                e.setColumn(e.getColumn() + 1);
            }
            throw e;
        }
    }

}
{'fraction_non_alphanumeric': 0.08302919708029197, 'fraction_numerical': 0.004105839416058394, 'mean_word_length': 2.7810344827586206, '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': '2279689', 'n_tokens_mistral': 625, 'n_tokens_neox': 601, 'n_words': 146}