@@ -0,0 +1,1929 @@
+package edu.umd.cs.findbugs.tools;%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStreamReader;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Aimport org.apache.bcel.Constants;%0Aimport org.apache.bcel.classfile.Constant;%0A%0A/*%0A * FindBugs - Find Bugs in Java programs%0A * Copyright (C) 2006, University of Maryland%0A * %0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A * %0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A * %0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%0A */%0A%0A/**%0A * Filter a property database, only passing through the annotations on public or protected methods%0A */%0Apublic class FilterPropertyDatabase %7B%0A%0A    final static int FLAGS = Constants.ACC_PROTECTED %7C Constants.ACC_PUBLIC;%0A    /**%0A     * @param args%0A     * @throws IOException %0A     */%0A    public static void main(String%5B%5D args) throws IOException %7B%0A       BufferedReader in = new BufferedReader(new InputStreamReader(System.in));%0A       Pattern p = Pattern.compile(%22,(%5B0-9%5D+)%7C%22);%0A       while (true) %7B%0A           String s = in.readLine();%0A           if (s == null) break;%0A           Matcher m = p.matcher(s);%0A           if (m.find()) %7B%0A               int value = Integer.parseInt(m.group(1));%0A               if ((value & FLAGS) != 0)%0A                   System.out.println(s);%0A           %7D%0A           %0A       %7D%0A%0A    %7D%0A%0A%7D%0A

Add utility method for filtering a property database