code: List<PackageDoc> getPkgList(Map<String,List<PackageDoc>> map, String groupname) {
          List<PackageDoc> list = map.get(groupname);
          if (list == null) {
              list = new ArrayList<PackageDoc>();
              map.put(groupname, list);
          }
          return list;
      }
docs: For the given group name, return the package list, on which it is mapped.
  Create a new list, if not found.
  
  @param map Map to be searched for gorup name.
  @param groupname Group name to search.