CPD Results

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

Duplications

File Line
net\sourceforge\plantumldependency\commoncli\option\impl\about\AboutOption.java 124
net\sourceforge\plantumldependency\commoncli\option\impl\help\HelpOption.java 123
net\sourceforge\plantumldependency\commoncli\option\impl\version\VersionOption.java 123
        final AboutOption a = (AboutOption) super.deepClone();
        a.javaProgram = getJavaProgram().deepClone();
        return a;
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    protected StringBuilder getFullUsageAdditions() {
        return new StringBuilder();
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    protected StringBuilder getFullUsageDescriptionAdditions() {
        return new StringBuilder();
    }

    /**
     * Gets the value of <code>javaProgram</code>.
     *
     * @return the value of <code>javaProgram</code>.
     * @see #setJavaProgram(JavaProgram)
     * @since 1.3.0
     */
    private JavaProgram getJavaProgram() {
        return javaProgram;
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    protected StringBuilder getMainUsageAdditions() {
        return new StringBuilder();
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    public int getPriority() {
        return priority;
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    public OptionExecution parseCommandLine(final CommandLine commandLine) throws CommandLineException {
        checkNull(commandLine, COMMAND_LINE_NULL_ERROR);

        OptionExecution optionExecution = null;

        if (commandLine.isOptionActiveAndSpecified(this)) {
            optionExecution = new AboutOptionExecution(getJavaProgram(), getPriority());
File Line
net\sourceforge\plantumldependency\commoncli\option\argument\impl\file\ExistingFileOptionArgumentImpl.java 73
net\sourceforge\plantumldependency\commoncli\option\argument\impl\file\ExistingOrNotFileOptionArgumentImpl.java 73
    public ExistingFileOptionArgumentImpl(final boolean optionArgumentIsMandatory) {
        super(optionArgumentIsMandatory, new StringBuilder(USAGE_DESCRIPTION));
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    protected String getMainUsageDescription() {
        return MAIN_USAGE;
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.3.0
     */
    @Override
    public File parseArgument(final String argument) throws CommandLineException {
        File file = null;

        if (isNotEmpty(argument)) {
            file = new File(argument);
            if (file.isDirectory()) {
                throw new CommandLineException(buildLogString(NON_DIRECTORY_FILE_ARGUMENT_ERROR, argument));
            } else if (file.exists()) {
                LOGGER.log(FINE, buildLogString(FILE_ARGUMENT_SPECIFIED_FINE, argument));
            } else {