package edu.umd.cs.findbugs;

public class FieldWarningSuppressor extends ClassWarningSuppressor {

    FieldAnnotation field;

    public FieldWarningSuppressor(String bugPattern, ClassAnnotation clazz, FieldAnnotation field) {
        super(bugPattern, clazz);
        this.field = field;
    }

    @Override
    public boolean match(BugInstance bugInstance) {

        if (!super.match(bugInstance))
            return false;

        FieldAnnotation bugField = bugInstance.getPrimaryField();
        if (bugField == null || !field.equals(bugField))
            return false;
        if (DEBUG)
            System.out.println("Suppressing " + bugInstance);
        return true;
    }
}

@@ -291,16 +291,151 @@
 %0A    %7D%0A%0A
+    %0A    @Override%0A    public String toString() %7B%0A        return String.format(%22Supress %25s in %25s.%25s%22, bugPattern, clazz, field);%0A    %7D%0A
     @Ove

add a toString method