#fixed code
                                public int getSize() {
        synchronized (lock) {
            return size;
        }
    }
#vulnerable code 
                                public int getSize() {
        return size;
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION