#vulnerable code 
                               public static void beginRequest(HttpServletRequest request) {
      ManagerImpl manager = (ManagerImpl) JNDI.lookup("manager");
      SessionContext sessionContext = (SessionContext) manager.getContext(SessionScoped.class);
      BeanMap sessionBeans = (BeanMap) request.getAttribute(SESSION_BEANMAP_KEY);
      sessionContext.setBeans(sessionBeans);
   } 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                               public static void beginRequest(HttpServletRequest request) {
   }