class CookieReadDetector extends OpcodeStackDetector {

    private static final String COOKIE_USAGE_TYPE = "COOKIE_USAGE";

    private BugReporter bugReporter;

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

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


        if (seen == Const.INVOKEVIRTUAL && getClassConstantOperand().equals("javax/servlet/http/Cookie")
                && (getNameConstantOperand().equals("getName") || getNameConstantOperand().equals("getValue") ||
                getNameConstantOperand().equals("getPath"))) {

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