CPD Results

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

Duplications

File Line
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 90
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 80
            new PerforceChangesConsumer( getLogger() );

        try
        {
            if ( getLogger().isDebugEnabled() )
            {
                getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) );
            }

            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 99
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 80
        Commandline cl = createOpenedCommandLine( prepo, files.getBasedir(), actualLocation );
        try
        {
            if ( getLogger().isDebugEnabled() )
            {
                getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) );
            }

            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return cl;
File Line
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 90
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 54
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 99
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 80
            new PerforceChangesConsumer( getLogger() );

        try
        {
            if ( getLogger().isDebugEnabled() )
            {
                getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) );
            }

            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 62
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 56
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        if ( consumer.isSuccess() )
        {
            return new EditScmResult( cl.toString(), consumer.getEdits() );
File Line
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 96
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 59
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 104
org/apache/maven/scm/provider/perforce/command/tag/PerforceTagCommand.java 113
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 86
                getLogger().debug( PerforceScmProvider.clean( "Executing " + cl.toString() ) );
            }

            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 51
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 53
        PerforceAddConsumer consumer = new PerforceAddConsumer();
        try
        {
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 52
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 59
        try
        {
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 54
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 61
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 89
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
File Line
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 59
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 54
        try
        {
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 54
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 61
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 107
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 54
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 99
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 61
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 62
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 107
org/apache/maven/scm/provider/perforce/command/tag/PerforceTagCommand.java 115
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 56
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 89
            CommandLineUtils.StringStreamConsumer err = new CommandLineUtils.StringStreamConsumer();
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/checkout/PerforceCheckOutCommand.java 107
                CommandLineUtils.executeCommandLine( cl, new ByteArrayInputStream( changes.getBytes() ), consumer,
                                                     err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 55
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 62
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 90
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new AddScmResult( cl.toString(), consumer.getAdditions() );
File Line
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 108
                CommandLineUtils.executeCommandLine( cl, new ByteArrayInputStream( changes.getBytes() ), consumer,
                                                     err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }

        return new CheckInScmResult( cl.toString(), consumer.isSuccess() ? "Checkin successful" : "Unable to submit",
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 55
org/apache/maven/scm/provider/perforce/command/checkout/PerforceCheckOutCommand.java 107
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 62
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 108
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 90
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 100
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 63
org/apache/maven/scm/provider/perforce/command/tag/PerforceTagCommand.java 116
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 57
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }
File Line
org/apache/maven/scm/provider/perforce/command/add/PerforceAddCommand.java 55
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 100
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 143
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/checkout/PerforceCheckOutCommand.java 107
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 62
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 63
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 108
org/apache/maven/scm/provider/perforce/command/tag/PerforceTagCommand.java 116
org/apache/maven/scm/provider/perforce/command/unedit/PerforceUnEditCommand.java 57
org/apache/maven/scm/provider/perforce/command/update/PerforceUpdateCommand.java 90
            int exitCode = CommandLineUtils.executeCommandLine( cl, consumer, err );

            if ( exitCode != 0 )
            {
                String cmdLine = CommandLineUtils.toString( cl.getCommandline() );

                StringBuilder msg = new StringBuilder( "Exit code: " + exitCode + " - " + err.getOutput() );
                msg.append( '\n' );
                msg.append( "Command line was:" + cmdLine );

                throw new CommandLineException( msg.toString() );
            }
        }
        catch ( CommandLineException e )
        {
            if ( getLogger().isErrorEnabled() )
            {
                getLogger().error( "CommandLineException " + e.getMessage(), e );
            }
        }