CPD Results

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

Duplications

File Line
org/apache/jsieve/ComparatorManager.java 139
org/apache/jsieve/TestManager.java 139
            return (ExecutableTest) lookup(name).newInstance();
        } catch (InstantiationException e) {
            throw new LookupException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new LookupException(e.getMessage());
        }
    }

    /**
     * <p>
     * Method getClassName answers the name of the class to which a Test name is
     * mapped.
     * </p>
     * 
     * @param name -
     *                The name of the Test
     * @return String - The name of the class
     * @throws LookupException
     */
    protected String getClassName(String name) throws LookupException {
        String className;
        try {
            className = (String) getClassNameMap().get(name.toLowerCase());
        } catch (SieveConfigurationException e) {
            throw new LookupException(
                    "Lookup failed due to a Configuration Exception: "
                            + e.getMessage());
        }
        if (null == className)
            throw new LookupException("Test named '" + name + "' not mapped.");