code: public static Map<String, String> mapStringToMap(String map) {
      String[] m = map.split("[,;]");
      Map<String, String> res = new HashMap<String, String>();
      for (String str : m) {
        int index = str.lastIndexOf('=');
        String key = str.substring(0, index);
        String val = str.substring(index + 1);
        res.put(key.trim(), val.trim());
      }
      return res;
    }
docs: Takes a string of the form "x1=y1,x2=y2,..." and returns Map
  @param map A string of the form "x1=y1,x2=y2,..."
  @return  A Map m is returned such that m.get(xn) = yn