class StrutsValidatorFormDetector implements Detector {

    private static final String STRUTS_FORM_VALIDATION_TYPE = "STRUTS_FORM_VALIDATION";

    private BugReporter bugReporter;

    public StrutsValidatorFormDetector(BugReporter bugReporter) {
        this.bugReporter = bugReporter;
    }

    @Override
    public void visitClassContext(ClassContext classContext) {<FILL_FUNCTION_BODY>}

    @Override
    public void report() {

    }
}

        JavaClass javaClass = classContext.getJavaClass();

        boolean isActionForm = InterfaceUtils.isSubtype(javaClass, "org.apache.struts.action.ActionForm");
        boolean isValidatorForm = InterfaceUtils.isSubtype(javaClass, "org.apache.struts.validator.ValidatorForm");
        boolean isDynaValidatorForm = InterfaceUtils.isSubtype(javaClass, "org.apache.struts.validator.DynaValidatorForm");

        if (!isActionForm && !isValidatorForm && !isDynaValidatorForm) return; //Not form implementation

        final String expectedSig = "(Lorg/apache/struts/action/ActionMapping;Ljavax/servlet/http/HttpServletRequest;)Lorg/apache/struts/action/ActionErrors;";
        boolean validateMethodFound = false;
        for (Method m : javaClass.getMethods()) {

            if ("validate".equals(m.getName()) && expectedSig.equals(m.getSignature())) {
                validateMethodFound = true;
            }
        }

        //ValidatorForm without a validate method is just like a regular ActionForm
        if (!validateMethodFound) {
            BugInstance bug = new BugInstance(this, STRUTS_FORM_VALIDATION_TYPE, Priorities.LOW_PRIORITY) //
                    .addClass(javaClass);
            if(isActionForm) {
                bug.addString("ActionForm");
            }
            else if(isValidatorForm) {
                bug.addString("ValidatorForm");
            }
            else if(isDynaValidatorForm) {
                bug.addString("DynaValidatorForm");
            }
            bugReporter.reportBug(bug);
        }
    
<no_super_class>