#vulnerable code 
                                public void init(int size, int packetSize) {
        this.size = size;
        this.maxSize = size;
        this.packetSize = packetSize;
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                public void init(int size, int packetSize) {
        synchronized (lock) {
            this.size = size;
            this.maxSize = size;
            this.packetSize = packetSize;
            lock.notifyAll();
        }
    }