#vulnerable code 
                              public void getHTable(String table) throws IOException {
    final TableName tName = TableName.valueOf(table);
    this.currentTable = this.connection.getTable(tName);
    // suggestions from
    // http://ryantwopointoh.blogspot.com/2009/01/
    // performance-of-hbase-importing.html
    if (clientSideBuffering) {
      final BufferedMutatorParams p = new BufferedMutatorParams(tName);
      p.writeBufferSize(writeBufferSize);
      this.bufferedMutator = this.connection.getBufferedMutator(p);
    }
  } 
                            #location 7 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                              public void getHTable(String table) throws IOException {
    final TableName tName = TableName.valueOf(table);
    synchronized (CONNECTION_LOCK) {
      this.currentTable = connection.getTable(tName);
      if (clientSideBuffering) {
        final BufferedMutatorParams p = new BufferedMutatorParams(tName);
        p.writeBufferSize(writeBufferSize);
        this.bufferedMutator = connection.getBufferedMutator(p);
      }
    }
  }