CPD Results

The following document contains the results of PMD's CPD 5.0.5.

Duplications

File Line
org\andromda\cartridges\spring\metafacades\SpringQueueLogic.java 116
org\andromda\cartridges\spring\metafacades\SpringTopicLogic.java 116
    public boolean isSpringQueueMetaType()
    {
        return true;
    }

    // --------------- attributes ---------------------

   /**
    * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getBeanName()
    * @return String
    */
    protected abstract String handleGetBeanName();

    private String __beanName1a;
    private boolean __beanName1aSet = false;

    /**
     * The bean name of this Spring Queue.
     * @return (String)handleGetBeanName()
     */
    public final String getBeanName()
    {
        String beanName1a = this.__beanName1a;
        if (!this.__beanName1aSet)
        {
            // beanName has no pre constraints
            beanName1a = handleGetBeanName();
            // beanName has no post constraints
            this.__beanName1a = beanName1a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__beanName1aSet = true;
            }
        }
        return beanName1a;
    }

   /**
    * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateBeanName()
    * @return String
    */
    protected abstract String handleGetTemplateBeanName();

    private String __templateBeanName2a;
    private boolean __templateBeanName2aSet = false;

    /**
     * The JMS template bean name for this Queue.
     * @return (String)handleGetTemplateBeanName()
     */
    public final String getTemplateBeanName()
    {
        String templateBeanName2a = this.__templateBeanName2a;
        if (!this.__templateBeanName2aSet)
        {
            // templateBeanName has no pre constraints
            templateBeanName2a = handleGetTemplateBeanName();
            // templateBeanName has no post constraints
            this.__templateBeanName2a = templateBeanName2a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__templateBeanName2aSet = true;
            }
        }
        return templateBeanName2a;
    }

   /**
    * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateGetterName()
    * @return String
    */
    protected abstract String handleGetTemplateGetterName();

    private String __templateGetterName3a;
    private boolean __templateGetterName3aSet = false;

    /**
     * The JMS template "getter" name.
     * @return (String)handleGetTemplateGetterName()
     */
    public final String getTemplateGetterName()
    {
        String templateGetterName3a = this.__templateGetterName3a;
        if (!this.__templateGetterName3aSet)
        {
            // templateGetterName has no pre constraints
            templateGetterName3a = handleGetTemplateGetterName();
            // templateGetterName has no post constraints
            this.__templateGetterName3a = templateGetterName3a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__templateGetterName3aSet = true;
            }
        }
        return templateGetterName3a;
    }

   /**
    * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateSetterName()
    * @return String
    */
    protected abstract String handleGetTemplateSetterName();

    private String __templateSetterName4a;
    private boolean __templateSetterName4aSet = false;

    /**
     * The JMS template "setter" name.
     * @return (String)handleGetTemplateSetterName()
     */
    public final String getTemplateSetterName()
    {
        String templateSetterName4a = this.__templateSetterName4a;
        if (!this.__templateSetterName4aSet)
        {
            // templateSetterName has no pre constraints
            templateSetterName4a = handleGetTemplateSetterName();
            // templateSetterName has no post constraints
            this.__templateSetterName4a = templateSetterName4a;
            if (isMetafacadePropertyCachingEnabled())
            {
                this.__templateSetterName4aSet = true;
            }
        }
        return templateSetterName4a;
    }

    /**
     * @return true
     * @see Queue
     */
    public boolean isQueueMetaType()
File Line
org\andromda\cartridges\spring\metafacades\SpringQueryOperationLogic.java 1233
org\andromda\cartridges\spring\metafacades\SpringServiceLogic.java 2819
                + this.THIS().toString() + ": " + th.getMessage(), th);
        }
    }

    /**
     * The property that stores the name of the metafacade.
     */
    private static final String NAME_PROPERTY = "name";
    private static final String FQNAME_PROPERTY = "fullyQualifiedName";

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        final StringBuilder toString = new StringBuilder(this.getClass().getName());
        toString.append("[");
        try
        {
            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
        }
        catch (final Throwable tryAgain)
        {
            try
            {
                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
            }
            catch (final Throwable ignore)
            {
                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
            }
        }
        toString.append("]");
        return toString.toString();
    }
}
File Line
org\andromda\cartridges\spring\metafacades\SpringQueueLogicImpl.java 21
org\andromda\cartridges\spring\metafacades\SpringTopicLogicImpl.java 21
    public SpringQueueLogicImpl (Object metaObject, String context)
    {
        super (metaObject, context);
    }

    /**
     * @return StringUtilsHelper.lowerCamelCaseName(this.getName())
     * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getBeanName()
     */
    protected String handleGetBeanName()
    {
        return StringUtilsHelper.lowerCamelCaseName(this.getName());
    }

    /**
     * @return lowerCamelCaseName(this.getTemplatePattern().replaceAll("\\{0\\}", getName()))
     * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateBeanName()
     */
    protected String handleGetTemplateBeanName()
    {
        return StringUtilsHelper.lowerCamelCaseName(this.getTemplatePattern().replaceAll(
            "\\{0\\}",
            this.getName()));
    }

    /**
     * @return "get" + StringUtilsHelper.capitalize(this.getTemplateBeanName())
     * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateGetterName()
     */
    protected String handleGetTemplateGetterName()
    {
        return "get" + StringUtils.capitalize(this.getTemplateBeanName());
    }

    /**
     * @return "set" + StringUtilsHelper.capitalize(this.getTemplateBeanName())
     * @see org.andromda.cartridges.spring.metafacades.SpringQueue#getTemplateSetterName()
     */
    protected String handleGetTemplateSetterName()
    {
        return "set" + StringUtils.capitalize(this.getTemplateBeanName());
    }

    /**
     * Gets the value of the {@link SpringGlobals#JMS_DESTINATION_TEMPLATE_PATTERN}
     *
     * @return the template name pattern.
     */
    private String getTemplatePattern()
    {
        return String.valueOf(this.getConfiguredProperty(SpringGlobals.JMS_DESTINATION_TEMPLATE_PATTERN));
    }
}
File Line
org\andromda\cartridges\spring\metafacades\SpringCriteriaAttributeLogic.java 1201
org\andromda\cartridges\spring\metafacades\SpringCriteriaSearchLogic.java 1268
org\andromda\cartridges\spring\metafacades\SpringDependencyLogic.java 1051
org\andromda\cartridges\spring\metafacades\SpringEntityLogic.java 2489
org\andromda\cartridges\spring\metafacades\SpringEntityOperationLogic.java 1305
org\andromda\cartridges\spring\metafacades\SpringManageableEntityAssociationEndLogic.java 1154
org\andromda\cartridges\spring\metafacades\SpringManageableEntityAttributeLogic.java 996
org\andromda\cartridges\spring\metafacades\SpringManageableEntityLogic.java 3011
org\andromda\cartridges\spring\metafacades\SpringQueueLogic.java 1418
org\andromda\cartridges\spring\metafacades\SpringServiceOperationLogic.java 1799
org\andromda\cartridges\spring\metafacades\SpringTopicLogic.java 1418
        this.getSuperAttributeFacade().validateInvariants(validationMessages);
    }

    /**
     * The property that stores the name of the metafacade.
     */
    private static final String NAME_PROPERTY = "name";
    private static final String FQNAME_PROPERTY = "fullyQualifiedName";

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        final StringBuilder toString = new StringBuilder(this.getClass().getName());
        toString.append("[");
        try
        {
            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
        }
        catch (final Throwable tryAgain)
        {
            try
            {
                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
            }
            catch (final Throwable ignore)
            {
                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
            }
        }
        toString.append("]");
        return toString.toString();
    }
}
File Line
org\andromda\cartridges\spring\metafacades\SpringCriteriaAttributeLogic.java 1202
org\andromda\cartridges\spring\metafacades\SpringCriteriaSearchLogic.java 1269
org\andromda\cartridges\spring\metafacades\SpringDependencyLogic.java 1052
org\andromda\cartridges\spring\metafacades\SpringEntityLogic.java 2490
org\andromda\cartridges\spring\metafacades\SpringEntityOperationLogic.java 1306
org\andromda\cartridges\spring\metafacades\SpringManageableEntityAssociationEndLogic.java 1155
org\andromda\cartridges\spring\metafacades\SpringManageableEntityAttributeLogic.java 997
org\andromda\cartridges\spring\metafacades\SpringManageableEntityLogic.java 3012
org\andromda\cartridges\spring\metafacades\SpringQueryOperationLogic.java 1235
org\andromda\cartridges\spring\metafacades\SpringQueueLogic.java 1419
org\andromda\cartridges\spring\metafacades\SpringServiceLogic.java 2821
org\andromda\cartridges\spring\metafacades\SpringServiceOperationLogic.java 1800
org\andromda\cartridges\spring\metafacades\SpringTopicLogic.java 1419
    }

    /**
     * The property that stores the name of the metafacade.
     */
    private static final String NAME_PROPERTY = "name";
    private static final String FQNAME_PROPERTY = "fullyQualifiedName";

    /**
     * @see Object#toString()
     */
    @Override
    public String toString()
    {
        final StringBuilder toString = new StringBuilder(this.getClass().getName());
        toString.append("[");
        try
        {
            toString.append(Introspector.instance().getProperty(this, FQNAME_PROPERTY));
        }
        catch (final Throwable tryAgain)
        {
            try
            {
                toString.append(Introspector.instance().getProperty(this, NAME_PROPERTY));
            }
            catch (final Throwable ignore)
            {
                // - just ignore when the metafacade doesn't have a name or fullyQualifiedName property
            }
        }
        toString.append("]");
        return toString.toString();
    }
}