Fork me on GitHub

CPD Results

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

Duplications

File Line
org/codehaus/mojo/truezip/internal/SelectorUtils.java 89
org/codehaus/mojo/truezip/internal/SelectorUtils.java 162
    public static boolean matchPatternStart( String pattern, String str, boolean isCaseSensitive )
    {
        // When str starts with a File.separator, pattern has to start with a
        // File.separator.
        // When pattern starts with a File.separator, str has to start with a
        // File.separator.
        if ( str.startsWith( File.separator ) != pattern.startsWith( File.separator ) )
        {
            return false;
        }

        Vector patDirs = tokenizePath( pattern );
        Vector strDirs = tokenizePath( str );

        int patIdxStart = 0;
        int patIdxEnd = patDirs.size() - 1;
        int strIdxStart = 0;
        int strIdxEnd = strDirs.size() - 1;

        // up to first '**'
        while ( patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd )
        {
            String patDir = (String) patDirs.elementAt( patIdxStart );
            if ( patDir.equals( "**" ) )
            {
                break;
            }
            if ( !match( patDir, (String) strDirs.elementAt( strIdxStart ), isCaseSensitive ) )
            {