CPD Report

Found a 100 line (209 tokens) duplication in the following files: 
Starting at line 37 of /home/lukas/maven/m1/trunk/core/src/java/org/apache/maven/jelly/tags/maven/GetTag.java
Starting at line 38 of /home/lukas/maven/m1/trunk/core/src/java/org/apache/maven/jelly/tags/maven/PluginVarTag.java

    private static final Log LOGGER = LogFactory.getLog( PluginVarTag.class );

    /** the variable to set*/
    private String var;

    /** the plugin to get the variable from*/
    private String plugin;

    /** the name of the plugin property to retrieve */
    private String property;

    /**
     * @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput)
     * @deprecated replaced by the GetTag tag
     */
    public void doTag( XMLOutput output )
        throws JellyTagException
    {
        checkAttribute( var, "var" );
        checkAttribute( plugin, "plugin" );
        checkAttribute( property, "property" );
        Project project = getMavenContext().getProject();
        try
        {
            MavenJellyContext context = project.getPluginContext( plugin );
            if ( context != null )
            {
                Object value = context.getVariable( property );
                getContext().setVariable( var, value );
            }
            else
            {
                LOGGER.error( "context for plugin '" + plugin + "' in project '" + project + "' is null" );
            }
        }
        catch ( UnknownPluginException e )
        {
            LOGGER.error( "Plugin '" + plugin + "' in project '" + project + "' is not available" );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "Error loading plugin", e );
        }
    }

    /**
     * @return the plugin to retrieve the property from.
     * @deprecated replaced by the GetTag tag
     */
    public String getPlugin()
    {
        return plugin;
    }

    /**
     * @return the name of the property being retrieved
     * @deprecated replaced by the GetTag tag
     */
    public String getProperty()
    {
        return property;
    }

    /**
     * @return the variable name to set
     * @deprecated replaced by the GetTag tag
     */
    public String getVar()
    {
        return var;
    }

    /**
     * @param pluginId the id of the plugin to retrieve the property from
     * @deprecated replaced by the GetTag tag
     */
    public void setPlugin( String pluginId )
    {
        plugin = pluginId;
    }

    /**
     * @param propertyName the name of the property being retrieved
     * @deprecated replaced by the GetTag tag
     */
    public void setProperty( String propertyName )
    {
        property = propertyName;
    }

    /**
     * @param variable the variable name to set
     * @deprecated replaced by the GetTag tag
     */
    public void setVar( String variable )
    {
        this.var = variable;
    }

}