<commit_before>class Utility
{
  static void removeEmptyParams(def params)
  {
    def nullMap = params?.findAll { entry ->(entry.value == "" || entry.value == "null")}
    nullMap?.each {params?.remove(it.key)}
   
  }
}<commit_msg>Added a submap for the WMS params<commit_after>import org.apache.commons.collections.map.CaseInsensitiveMap

class Utility
{
  static void removeEmptyParams(def params)
  {
    def nullMap = params?.findAll { entry ->(entry.value == "" || entry.value == "null")}
    nullMap?.each {params?.remove(it.key)}
  }
  /**
   * This will extract all WMS paramters this includes GetMap, GetCapabilities, and
   * GetFeatureInfo REQUESTS.  It will do this in a case insensitive way and return
   * a new map
   */
  static Map keepOnlyWMSParams(def map)
  {
    def tempParams = new CaseInsensitiveMap()
    map.each { tempParams.put(it.key, it.value)}

    return tempParams.subMap(["version","request","layers","styles",
                              "srs","crs","bbox", "width", "height", "format",
                              "transparent", "bgcolor", "exceptions", "time",
                              "elevation", "updatesequence", "query_layers",
                              "info_format", "i", "j"
                              ])
  }
  static Map keepOnlyGetMapWMSParams(def map, def additionalParamList)
  {
    def tempParams = new CaseInsensitiveMap()
    map.each { tempParams.put(it.key, it.value)}
    def listOfParams = ["version","request","layers","styles",
                              "srs","bbox", "width", "height", "format",
                              "transparent", "bgcolor", "exceptions", "time",
                              "elevation"
                              ]
    if(additionalParam)
    {
      additionalParamters.each{
        listOfParams.add(it) 
      }
    }

    return tempParams.subMap()
  }
}
{'fraction_non_alphanumeric': 0.13240790176187933, 'fraction_numerical': 0.0, 'mean_word_length': 2.192504258943782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4992947', 'n_tokens_mistral': 550, 'n_tokens_neox': 538, 'n_words': 122}