#vulnerable code 
                                public ThreadPool getOrCreateClientWorkThreadPool(String serviceName, boolean isSharing, int threadNum) {
        if (isSharing) {
            if (defaultWorkThreadPool == null) {
                synchronized (BrpcThreadPoolManager.class) {
                    if (defaultWorkThreadPool == null) {
                        defaultWorkThreadPool = new ThreadPool(threadNum,
                                new CustomThreadFactory("brpc-client-work-thread-default"));
                    }
                }
            }
            return defaultWorkThreadPool;
        }

        ThreadPool threadPool = workThreadPoolMap.get(serviceName);
        if (threadPool != null) {
            return threadPool;
        }
        threadPool = new ThreadPool(threadNum,
                new CustomThreadFactory("brpc-client-work-thread-" + serviceName));
        workThreadPoolMap.put(serviceName, threadPool);
        return threadPool;
    } 
                            #location 11 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public ThreadPool getOrCreateClientWorkThreadPool(String serviceName, boolean isSharing, int threadNum) {
        if (isSharing) {
            if (defaultWorkThreadPool == null) {
                synchronized (BrpcThreadPoolManager.class) {
                    if (defaultWorkThreadPool == null) {
                        defaultWorkThreadPool = new ThreadPool(threadNum,
                                new CustomThreadFactory("brpc-client-work-thread-default"));
                    }
                }
            }
            return defaultWorkThreadPool;
        }

        ThreadPool threadPool;
        if ((threadPool = workThreadPoolMap.get(serviceName)) == null) {
            synchronized (serviceName.intern()) {
                if ((threadPool = workThreadPoolMap.get(serviceName)) == null) {
                    threadPool = new ThreadPool(threadNum,
                            new CustomThreadFactory("brpc-client-work-thread-" + serviceName));
                    workThreadPoolMap.put(serviceName, threadPool);
                }
            }
        }
        return threadPool;
    }