class WeakFilenameUtilsMethodDetector extends OpcodeStackDetector {

    private static final String WEAK_FILENAMEUTILS_TYPE = "WEAK_FILENAMEUTILS";

    private BugReporter bugReporter;

    private static final InvokeMatcherBuilder FILENAMEUTILS_NULL_METHOD = invokeInstruction().atClass("org/apache/commons/io/FilenameUtils")
            .atMethod("normalize","getExtension","isExtension","getName","getBaseName");

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

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


        if (seen == Const.INVOKESTATIC && FILENAMEUTILS_NULL_METHOD.matches(this)) {

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