<commit_before>package org.apache.maven.report.projectinfo;

import java.util.Formatter;
import java.util.Locale;

import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.plexus.i18n.I18N;

/**
 * Generates the Dependency code snippets to be added to build tools.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Id$
 * @since 2.4.1
 * @goal dependency-info
 */
public final class DependencyInformationReport
    extends AbstractProjectInfoReport
{

    private static final String DEPENDNECY_INFO = "dependency-info";

    /**
     * @parameter default-value="${project.groupId}"
     * @required
     */
    protected String groupId;

    /**
     * @parameter default-value="${project.artifactId}"
     * @required
     */
    protected String artifactId;

    /**
     * @parameter default-value="${project.version}"
     * @required
     */
    protected String version;

    /**
     * @parameter default-value="${project.packaging}"
     * @required
     */
    protected String packaging;

    // ----------------------------------------------------------------------
    // Public methods
    // ----------------------------------------------------------------------

    /**
     * {@inheritDoc}
     */
    public String getOutputName()
    {
        return DEPENDNECY_INFO;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected String getI18Nsection()
    {
        return DEPENDNECY_INFO;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void executeReport( Locale locale )
        throws MavenReportException
    {
        new DependencyInformationRenderer( getSink(), getI18N( locale ), locale,
                                           groupId, artifactId, version, packaging )
            .render();
    }

    // ----------------------------------------------------------------------
    // Private
    // ----------------------------------------------------------------------

    private static final class  DependencyInformationRenderer
        extends AbstractProjectInfoRenderer
    {

        private final String groupId;

        private final String artifactId;

        private final String version;

        private final String packaging;

        public DependencyInformationRenderer( Sink sink, I18N i18n, Locale locale,
                                              String groupId, String artifactId, String version, String packaging )
        {
            super( sink, i18n, locale );
            this.groupId = groupId;
            this.artifactId = artifactId;
            this.version = version;
            this.packaging = packaging;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected String getI18Nsection()
        {
            return DEPENDNECY_INFO;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected void renderBody()
        {
            startSection( getTitle() );

            renderDependencyInfo( "Apache Maven", new Formatter()
                                                        .format( "<dependency>%n" )
                                                        .format( "  <groupId>%s</groupId>%n", groupId )
                                                        .format( "  <artifactId>%s</artifactId>%n", artifactId )
                                                        .format( "  <version>%s</version>%n", version )
                                                        .format( "  <packaging>%s</packaging>%n", packaging )
                                                        .format( "</dependency>" ) );
<commit_msg>typo<commit_after>package org.apache.maven.report.projectinfo;

import java.util.Formatter;
import java.util.Locale;

import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.plexus.i18n.I18N;

/**
 * Generates the Dependency code snippets to be added to build tools.
 *
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @version $Id$
 * @since 2.4.1
 * @goal dependency-info
 */
public final class DependencyInformationReport
    extends AbstractProjectInfoReport
{

    private static final String DEPENDENCY_INFO = "dependency-info";

    /**
     * @parameter default-value="${project.groupId}"
     * @required
     */
    protected String groupId;

    /**
     * @parameter default-value="${project.artifactId}"
     * @required
     */
    protected String artifactId;

    /**
     * @parameter default-value="${project.version}"
     * @required
     */
    protected String version;

    /**
     * @parameter default-value="${project.packaging}"
     * @required
     */
    protected String packaging;

    // ----------------------------------------------------------------------
    // Public methods
    // ----------------------------------------------------------------------

    /**
     * {@inheritDoc}
     */
    public String getOutputName()
    {
        return DEPENDENCY_INFO;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected String getI18Nsection()
    {
        return DEPENDENCY_INFO;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected void executeReport( Locale locale )
        throws MavenReportException
    {
        new DependencyInformationRenderer( getSink(), getI18N( locale ), locale,
                                           groupId, artifactId, version, packaging )
            .render();
    }

    // ----------------------------------------------------------------------
    // Private
    // ----------------------------------------------------------------------

    private static final class  DependencyInformationRenderer
        extends AbstractProjectInfoRenderer
    {

        private final String groupId;

        private final String artifactId;

        private final String version;

        private final String packaging;

        public DependencyInformationRenderer( Sink sink, I18N i18n, Locale locale,
                                              String groupId, String artifactId, String version, String packaging )
        {
            super( sink, i18n, locale );
            this.groupId = groupId;
            this.artifactId = artifactId;
            this.version = version;
            this.packaging = packaging;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected String getI18Nsection()
        {
            return DEPENDENCY_INFO;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        protected void renderBody()
        {
            startSection( getTitle() );

            renderDependencyInfo( "Apache Maven", new Formatter()
                                                        .format( "<dependency>%n" )
                                                        .format( "  <groupId>%s</groupId>%n", groupId )
                                                        .format( "  <artifactId>%s</artifactId>%n", artifactId )
                                                        .format( "  <version>%s</version>%n", version )
                                                        .format( "  <packaging>%s</packaging>%n", packaging )
                                                        .format( "</dependency>" ) );

{'fraction_non_alphanumeric': 0.1715135939402137, 'fraction_numerical': 0.005139997294738266, 'mean_word_length': 1.272978788810329, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4946355', 'n_tokens_mistral': 1770, 'n_tokens_neox': 1683, 'n_words': 380}