class EnabledExtensionsInApacheXmlRpcDetector extends OpcodeStackDetector {

    private static final String RPC_ENABLED_EXTENSIONS = "RPC_ENABLED_EXTENSIONS";
    private static final InvokeMatcherBuilder ENABLE_EXTENSIONS = invokeInstruction()
            .atClass(
                    "org.apache.xmlrpc.client.XmlRpcClientConfigImpl",
                    "org.apache.xmlrpc.server.XmlRpcServerConfigImpl"
            )
            .atMethod("setEnabledForExtensions");

    private BugReporter bugReporter;

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

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


        if (seen == Const.INVOKEVIRTUAL && ENABLE_EXTENSIONS.matches(this)) {
            final OpcodeStack.Item item = stack.getStackItem(0);
            /* item has signature of Integer, check "instanceof" added to prevent cast from throwing exceptions */
            if ((item.getConstant() == null)
                    || ((item.getConstant() instanceof Integer) && (((Integer) item.getConstant()).intValue()  == 1))) {
                bugReporter.reportBug(new BugInstance(this, RPC_ENABLED_EXTENSIONS, Priorities.HIGH_PRIORITY) //
                        .addClass(this).addMethod(this).addSourceLine(this));
            }
        }
    
<no_super_class>