if (matcher.matches())
if (matcher.find())
    private boolean doAcceptanceCheck (String nameOrPath)    {        boolean match = false;        boolean found = false;        // Check for rejects first.        for (Pattern pattern : rejectPatterns)        {            Matcher matcher = pattern.matcher (nameOrPath);            if (matcher.matches())            {                match = false;                found = true;                break;            }        }        if (! found)        {            // Check for accepts.            if (acceptPatterns.size() == 0)                match = true;            else            {                for (Pattern pattern : acceptPatterns)                {                    Matcher matcher = pattern.matcher (nameOrPath);                    if (matcher.find())                    {                        match = true;                        break;                    }                }            }        }        return match;    }