#vulnerable code 
                                LogRecordSet.Writer getLogRecordSetWriter() {
        return recordSetWriter;
    } 
                            #location 2 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                String getStream(int streamId) {
        return streams.get(streamId);
    }