CPD Results

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

Duplications

File Line
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 88
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 97
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 88
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 55
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 97
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 63
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 94
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 60
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 102
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 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 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/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/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/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 105
            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 97
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 61
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 63
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 105
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 106
                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 106
                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/changelog/PerforceChangeLogCommand.java 98
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 64
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/checkout/PerforceCheckOutCommand.java 106
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 62
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 106
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/add/PerforceAddCommand.java 55
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 98
org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommand.java 141
org/apache/maven/scm/provider/perforce/command/checkin/PerforceCheckInCommand.java 82
org/apache/maven/scm/provider/perforce/command/checkout/PerforceCheckOutCommand.java 106
org/apache/maven/scm/provider/perforce/command/diff/PerforceDiffCommand.java 62
org/apache/maven/scm/provider/perforce/command/edit/PerforceEditCommand.java 64
org/apache/maven/scm/provider/perforce/command/status/PerforceStatusCommand.java 106
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 );
            }
        }