The following document contains the results of PMD's CPD 5.3.2.
File | Line |
---|---|
org/codehaus/mojo/vfs/internal/SelectorUtils.java | 57 |
org/codehaus/mojo/vfs/internal/SelectorUtils.java | 130 |
public static boolean matchPatternStart( String pattern, String str, boolean isCaseSensitive ) { // When str starts with a separator, pattern has to start with a // separator. // When pattern starts with a separator, str has to start with a // separator. if ( str.startsWith( "/" ) != pattern.startsWith( "/" ) ) { return false; } Vector<String> patDirs = tokenizePath( pattern ); Vector<String> 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 ) ) { |