protected static boolean matchPatternStart(String pattern, String str) { return SelectorUtils.matchPatternStart(pattern, str); } /** * Test whether or not a given path matches the start of a given * pattern up to the first "**". * <p> * This is not a general purpose test and should only be used if you * can live with false positives. For example, <code>pattern=**\a</code> * and <code>str=b</code> will yield <code>true</code>. * * @param pattern The pattern to match against. Must not be * <code>null</code>. * @param str The path to match, as a String. Must not be * <code>null</code>. * @param isCaseSensitive Whether or not matching should be performed * case sensitively. * * @return whether or not a given path matches the start of a given * pattern up to the first "**". */ protected static boolean matchPatternStart(String pattern, String str, boolean isCaseSensitive) { return SelectorUtils.matchPatternStart(pattern, str, isCaseSensitive);
protected static boolean matchPath(String pattern, String str) { return SelectorUtils.matchPath(pattern, str); } /** * Test whether or not a given path matches a given pattern. * * @param pattern The pattern to match against. Must not be * <code>null</code>. * @param str The path to match, as a String. Must not be * <code>null</code>. * @param isCaseSensitive Whether or not matching should be performed * case sensitively. * * @return <code>true</code> if the pattern matches against the string, * or <code>false</code> otherwise. */ protected static boolean matchPath(String pattern, String str, boolean isCaseSensitive) { return SelectorUtils.matchPath(pattern, str, isCaseSensitive);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected static boolean matchPatternStart(String pattern, String str) {
1
protected static boolean matchPath(String pattern, String str) {
2
        return SelectorUtils.matchPatternStart(pattern, str);
2
        return SelectorUtils.matchPath(pattern, str);
3
    }
3
    }
4
    /**
4
    /**
5
     * Test whether or not a given path matches the start of a given
5
     * Test whether or not a given path matches 
6
     * pattern up to the first "**".
7
     * <p>
8
     * This is not a general purpose test and should only be used if you
9
     * can live with false positives. For example, <code>pattern=**\a</code>
10
     * and <code>str=b</code> will yield <code>true</code>.
6
a given pattern.
11
     *
7
     *
12
     * @param pattern The pattern to match against. Must not be
8
     * @param pattern The pattern to match against. Must not be
13
     *                <code>null</code>.
9
     *                <code>null</code>.
14
     * @param str     The path to match, as a String. Must not be
10
     * @param str     The path to match, as a String. Must not be
15
     *                <code>null</code>.
11
     *                <code>null</code>.
16
     * @param isCaseSensitive Whether or not matching should be performed
12
     * @param isCaseSensitive Whether or not matching should be performed
17
     *                        case sensitively.
13
     *                        case sensitively.
18
     *
14
     *
19
     * @return whether or not a given path matches the start of a given
15
     * @return <code>true</code> if the pattern matches 
20
     * pattern up to the first "**"
16
against the string,
21
.
17
     *         or <code>false</code> otherwise.
22
     */
18
     */
23
    protected static boolean matchPatternStart(String pattern, String str,
19
    protected static boolean matchPath(String pattern, String str,
24
                                               boolean isCaseSensitive) {
20
                                       boolean isCaseSensitive) {
25
        return SelectorUtils.matchPatternStart(pattern, str, isCaseSensitive);
21
        return SelectorUtils.matchPath(pattern, str, isCaseSensitive);
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0