code: private static ArrayList<Integer> chooseTrackSample(SlotReference slot, Client client, int count) throws IOException {
          int tracksLeft = count;
          int samplesNeeded = Math.min(tracksLeft, MetadataFinder.getInstance().getAutoAttachProbeCount());
          ArrayList<Integer> tracksToSample = new ArrayList<Integer>(samplesNeeded);
          int offset = 0;
          Random random = new Random();
          while (samplesNeeded > 0) {
              int rand = random.nextInt(tracksLeft);
              if (rand < samplesNeeded) {
                  --samplesNeeded;
                  tracksToSample.add(findTrackIdAtOffset(slot, client, offset));
              }
              --tracksLeft;
              ++offset;
          }
          return tracksToSample;
      }
docs: Pick a random sample of tracks to compare against the cache, to see if it matches the attached database. We
  will choose whichever is the smaller of the number configured in {@link MetadataFinder#getAutoAttachProbeCount()} or the
  total number available in the database or playlist being compared with the cache file.
  
  @param slot the player slot in which the database we are comparing to our cache is found
  @param client the connection to the player for performing database queries to find track IDs
  @param count the number of tracks available to sample
  
  @return the IDs of the tracks we have chosen to compare
  
  @throws IOException if there is a problem communicating with the player