class FreemarkerDetector extends OpcodeStackDetector {

    private static final String FREEMARKER_TYPE = "TEMPLATE_INJECTION_FREEMARKER";

    private BugReporter bugReporter;

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

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

        //printOpCode(seen);

//  FreemarkerDetector: [0113]  invokevirtual   freemarker/template/Template.process (Ljava/lang/Object;Ljava/io/Writer;)V

        if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("freemarker/template/Template")
                && getNameConstantOperand().equals("process")) {

            bugReporter.reportBug(new BugInstance(this, FREEMARKER_TYPE, Priorities.NORMAL_PRIORITY) //
                    .addClass(this).addMethod(this).addSourceLine(this));
        }
    
<no_super_class>