#vulnerable code 
                              public void updateWinrate() {
    Leelaz.WinrateStats stats = Lizzie.leelaz.getWinrateStats();
    if (stats.maxWinrate >= 0 && stats.totalPlayouts > history.getData().getPlayouts()) {
      history.getData().winrate = stats.maxWinrate;
      // we won't set playouts here. but setting winrate is ok... it shows the user that we are
      // computing. i think its fine.
      if (!Lizzie.config.holdWinrateToMove) {
        history.getData().setPlayouts(stats.totalPlayouts);
      }
    }
  } 
                            #location 4 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                              public void updateWinrate() {
    Leelaz.WinrateStats stats = Lizzie.leelaz.getWinrateStats();
    if (stats.maxWinrate >= 0 && stats.totalPlayouts > history.getData().getPlayouts()) {
      history.getData().winrate = stats.maxWinrate;
      // we won't set playouts here. but setting winrate is ok... it shows the user that we are
      // computing. i think its fine.
    }
  }