<commit_before>function ddg_spice_mass_on_time (api_result) {
    if (api_result.error) return;

    var details = api_result['query-details'];

    var generate_header = function (query_details) {
	var type = "";
	//Convert the query type to plural and capitalize
	if (query_details.type == "mass") {
	  type = "Masses";
	} else if (query_details.type == "parish") {
	  type = "Parishes";
	} else {
	  type = query_details.type.charAt(0).toUpperCase() + query_details.type.slice(1) + "s";
	}

	//Add the location string
	return type + " near " + query_details.address;
    };

    //Parishes return different info than events, so a different template is in order for those
    var pick_item_template = function (query_details) {
	if (query_details.type == "parish") {
	  return "mass_on_time_church";
	} else {
	  return "mass_on_time";
	}
    };

    //Return if service couldn't find the address given
    if (details.location.lat == 0 && details.location.lng == 0) return;

    var results = api_result.results.filter(function(result) {
					      return result.address != null && result.address !== "";
    });

    if (results.length < 1) return;

    Spice.render({
	data              : api_result,
	header1           : generate_header(details),
	source_name       : "Mass On Time",
	spice_name        : 'mass_on_time',
	source_url        : 'http://massontime.com/nearest/' + details.type +
	  "/25?lat=" + details.location.lat + "&lng=" + details.location.lng,
	template_frame   : 'list',
	template_options : {<commit_msg>MassOnTime: 'filter' command is not available on IE8, so used a loop instead.<commit_after>function ddg_spice_mass_on_time (api_result) {
    if (api_result.error) return;

    var details = api_result['query-details'];

    var generate_header = function (query_details) {
	var type = "";
	//Convert the query type to plural and capitalize
	if (query_details.type == "mass") {
	  type = "Masses";
	} else if (query_details.type == "parish") {
	  type = "Parishes";
	} else {
	  type = query_details.type.charAt(0).toUpperCase() + query_details.type.slice(1) + "s";
	}

	//Add the location string
	return type + " near " + query_details.address;
    };

    //Parishes return different info than events, so a different template is in order for those
    var pick_item_template = function (query_details) {
	if (query_details.type == "parish") {
	  return "mass_on_time_church";
	} else {
	  return "mass_on_time";
	}
    };

    //Return if service couldn't find the address given
    if (details.location.lat == 0 && details.location.lng == 0) return;

    //Filter results with no address
    var results = [];
    for(var i=api_result.results.length-1; i>=0; i--) {
      var result=api_result.results[i];
      if (result.address != null && result.address !== "") {
	results.push(result);
      }
    }

    if (results.length < 1) return;

    Spice.render({
	data              : api_result,
	header1           : generate_header(details),
	source_name       : "Mass On Time",
	spice_name        : 'mass_on_time',
	source_url        : 'http://massontime.com/nearest/' + details.type +
	  "/25?lat=" + details.location.lat + "&lng=" + details.location.lng,
	template_frame   : 'list',
	template_options : {
{'fraction_non_alphanumeric': 0.1336832355665329, 'fraction_numerical': 0.005866008027168879, 'mean_word_length': 3.127388535031847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '2353269', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1038, 'n_words': 263}