code: public void add(StorageDirView dir, long blockId, long blockSizeBytes) {
      Pair<List<Long>, Long> candidate;
      if (mDirCandidates.containsKey(dir)) {
        candidate = mDirCandidates.get(dir);
      } else {
        candidate = new Pair<List<Long>, Long>(new ArrayList<Long>(), 0L);
        mDirCandidates.put(dir, candidate);
      }
  
      candidate.getFirst().add(blockId);
      long blockBytes = candidate.getSecond() + blockSizeBytes;
      candidate.setSecond(blockBytes);
  
      long sum = blockBytes + dir.getAvailableBytes();
      if (mMaxBytes < sum) {
        mMaxBytes = sum;
        mDirWithMaxBytes = dir;
      }
    }
docs: Adds the block in the directory to this collection.
  
  @param dir the dir where the block resides
  @param blockId blockId of the block
  @param blockSizeBytes block size in bytes