code: private static <K, V> Map<K, V> synchronizedCopyMap(Map<K, V> map) {
  
          if (map == null) {
              return new HashMap<K, V>();
          }
  
          synchronized (map) {
  
              return new HashMap<K, V>(map);
          }
      }
docs: Copies a map while synchronizing on it.<p>
  
  @param map the map to copy
  @return the copied map