@Override
  public void fromData(DataInput in,
      DeserializationContext context) throws IOException, ClassNotFoundException {
    elementType = context.getDeserializer().readObject(in);
    size = in.readInt();
    assert size >= 0 : size;
    map = createMapForFromData();
    readNumNulls(in);
    // Asif: The size will be including null so the Map should at max contain
    // size - number of nulls
    int numLeft = size - numNulls;

    while (numLeft > 0) {
      Object key = context.getDeserializer().readObject(in);
      int occurrence = in.readInt();
      map.put(key, occurrence);
      numLeft -= occurrence;
    }
  }
@param stats the CachePerfStats to track hash collisions. Should be null unless this is used as
       a query execution-time result set.
geode-core/src/main/java/org/apache/geode/cache/query/internal/ResultsBag.java