<commit_before>package org.apache.maven.plugins.enforcer;

import org.apache.maven.enforcer.rule.api.EnforcerRule;
import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;

import java.util.*;

/**
 * @author ceilfors
 */
public class RequireDepMgt extends AbstractStandardEnforcerRule {

    /**
     * If true, this rule will fail if the version managed by dependency management is being overridden.
     */
    public boolean checkVersion;
    /**
     * The list of artifact to be ignored in <tt>groupId:artifactId:type</tt> format.
     */
    public List<String> ignoreArtifacts = new ArrayList<String>();
    /**
     * Specify the scope to be ignored. By default ignoring test scope.
     */
    public List<String> ignoreScopes = Arrays.asList("test");

    @Override
    @SuppressWarnings("unchecked")
    public void execute(final EnforcerRuleHelper helper) throws EnforcerRuleException {
        final String newLine = System.getProperty("line.separator");

        try {
            MavenProject project = (MavenProject) helper.evaluate("${project}");
            DependencyManagement depMgt = project.getDependencyManagement();
            Map<String, Dependency> depMgtMap =<commit_msg>javadoc.<commit_after>package org.apache.maven.plugins.enforcer;

import org.apache.maven.enforcer.rule.api.EnforcerRule;
import org.apache.maven.enforcer.rule.api.EnforcerRuleException;
import org.apache.maven.enforcer.rule.api.EnforcerRuleHelper;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;

import java.util.*;

/**
 * This rule verifies if dependency management is used.
 * @author ceilfors
 */
public class RequireDepMgt extends AbstractStandardEnforcerRule {

    /**
     * If true, this rule will fail if the version managed by dependency management is being overridden.
     */
    public boolean checkVersion;
    /**
     * The list of artifact to be ignored in <tt>groupId:artifactId:type</tt> format.
     */
    public List<String> ignoreArtifacts = new ArrayList<String>();
    /**
     * Specify the scope to be ignored. By default ignoring test scope.
     */
    public List<String> ignoreScopes = Arrays.asList("test");

    @Override
    @SuppressWarnings("unchecked")
    public void execute(final EnforcerRuleHelper helper) throws EnforcerRuleException {
        final String newLine = System.getProperty("line.separator");

        try {
            MavenProject project = (MavenProject) helper.evaluate("${project}");
            DependencyManagement depMgt = project.getDependencyManagement();
            Map<String, Dependency> depMgtMap =
{'fraction_non_alphanumeric': 0.09911678115799803, 'fraction_numerical': 0.0, 'mean_word_length': 3.924315619967794, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '6647688', 'n_tokens_mistral': 873, 'n_tokens_neox': 829, 'n_words': 204}