class NormalizationAfterValidationDetector extends OpcodeStackDetector {

    Set<OpcodeStack.Item> validated = new HashSet<OpcodeStack.Item>();

    private BugReporter bugReporter;

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

    @Override
    public void visit(Method obj) {
        validated.clear();
        super.visit(obj);
    }

    private void reportBug() {
        BugInstance bug = new BugInstance(this, "NORMALIZATION_AFTER_VALIDATION", Priorities.LOW_PRIORITY)
                .addClass(this).addMethod(this).addSourceLine(this);
        bugReporter.reportBug(bug);
    }

    @Override
    public void sawOpcode(int seen) {<FILL_FUNCTION_BODY>}
}

        if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("java/util/regex/Pattern")
                && getNameConstantOperand().equals("matcher")) {
            validated.add(stack.getStackItem(0));
        } else if (seen == Const.INVOKESTATIC && getClassConstantOperand().equals("java/text/Normalizer")
                       && getNameConstantOperand().equals("normalize")) {
            if (validated.contains(stack.getStackItem(1))) {
                reportBug();
            }
        }
    
<no_super_class>