code: public void fillVMIndex(TIntIntHashMap index, int p) {
          for (Node n : scope) {
              for (VM v : parent.getRunningVMs(n)) {
                  index.put(v.id(), p);
              }
              for (VM v : parent.getSleepingVMs(n)) {
                  index.put(v.id(), p);
              }
          }
          for (VM v : ready) {
              index.put(v.id(), p);
          }
      }
docs: Fill an index with the VM presents in this mapping
  
  @param index the index to fill
  @param p     the index value to use for each VM in the mapping