class GroovyShellDetector extends OpcodeStackDetector {

    private static final String GROOVY_SHELL_TYPE = "GROOVY_SHELL";

    private BugReporter bugReporter;

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

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

        //printOpCode(seen);
        if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("groovy/lang/GroovyShell")) {

            if(getNameConstantOperand().equals("evaluate") || getNameConstantOperand().equals("parse")) {
                bugReporter.reportBug(new BugInstance(this, GROOVY_SHELL_TYPE, Priorities.NORMAL_PRIORITY) //
                        .addClass(this).addMethod(this).addSourceLine(this));
            }

        }
        else if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("groovy/lang/GroovyClassLoader")) {

            if(getNameConstantOperand().equals("parseClass")) {
                bugReporter.reportBug(new BugInstance(this, GROOVY_SHELL_TYPE, Priorities.NORMAL_PRIORITY) //
                        .addClass(this).addMethod(this).addSourceLine(this));
            }

        }
    
<no_super_class>