#vulnerable code 
                                public static Long getUserId()
    {
        return getUser().getUserId().longValue();
    } 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public static Long getUserId()
    {
        return getSysUser().getUserId().longValue();
    }