class WorldWritableDetector extends OpcodeStackDetector {

    private static final String ANDROID_WORLD_WRITABLE_TYPE = "ANDROID_WORLD_WRITABLE";
    private BugReporter bugReporter;

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

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

        //printOpCode(seen);

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