class WebViewJavascriptEnabledDetector extends OpcodeStackDetector {

    private static final String ANDROID_WEB_VIEW_JAVASCRIPT_TYPE = "ANDROID_WEB_VIEW_JAVASCRIPT";
    private BugReporter bugReporter;

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

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

        //printOpCode(seen);
        if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("android/webkit/WebSettings") &&
                getNameConstantOperand().equals("setJavaScriptEnabled")) {
            OpcodeStack.Item item = stack.getStackItem(0); //First item on the stack is the last
            if(StackUtils.isConstantInteger(item) && (Integer) item.getConstant() == 1) {
                bugReporter.reportBug(new BugInstance(this, ANDROID_WEB_VIEW_JAVASCRIPT_TYPE, Priorities.NORMAL_PRIORITY) //
                        .addClass(this).addMethod(this).addSourceLine(this));
            }
        }
    
<no_super_class>