#fixed code
                                public boolean lock(long seckillId) {
        try {
            if (threadLock.get() == null) {
                Map<Long, InterProcessMutex> map = new HashMap();
                map.put(seckillId,new InterProcessMutex(client,ROOT_LOCK_PATH+"/"+String.valueOf(seckillId)));
                threadLock.set(map);
            }else{
                threadLock.get().get(seckillId).acquire(2L, TimeUnit.SECONDS);
            }
            return true;
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return false;
        }
    }
#vulnerable code 
                                public boolean lock(long seckillId) {
        try {
            if (lockMap.get(seckillId) == null) {
                lockMap.put(seckillId, new InterProcessMutex(client, ROOT_LOCK_PATH+"/"+String.valueOf(seckillId)));
            }
            lockMap.get(seckillId).acquire(2L, TimeUnit.SECONDS);
            return true;
        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return false;
        }
    } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE