<commit_before>using UnityEngine;
using System.Collections;

public class Utilities : MonoBehaviour {
	//A place for general utilities

	public static bool hasTags(Collider collider, string[] tags){
		foreach (string tag in tags) {
			if (collider.tag == tag) {
				return true;
			}
		}
		return false;
	}

	public static bool hasTags(GameObject obj, string[] tags){
		foreach (string tag in tags) {
			if (obj.tag == tag) {
				return true;
			}
		}
		return false;
	}

	public List<Transform> getDescendentTransforms(Transform parent){
		List<Transform> transforms = new List<Transform> ();
		foreach (Transform child in parent) {
			transforms.Add (child);
			List<Transform> descendents = getDescendentTransforms (child);
			transforms.AddRange (descendents);
		}
		return transforms;
	}

	public List<Transform> getDescendentTransforms(GameObject obj){
		Transform parent = obj.transform;
		return getDescendentTransforms (parent);
	}

	public List<GameObject> getDescendentObjects(Transform parent){
		List<Transform> transformList = getDescendentTransforms (parent);
		List<GameObject> objectList = new List<GameObject> ();
		foreach (Transform t in transformList) {
			objectList.Add (t.gameObject);
			}
		return objectList;
	}

	public List<GameObject> getDescendentObjects(GameObject obj){
		Transform parent = obj.transform;
		return getDescendentObjects (parent);
	}

}<commit_msg>Added static declarations and null protections<commit_after>using UnityEngine;
using System.Collections;

public class Utilities : MonoBehaviour {
	//A place for general utilities

	public static bool hasTags(Collider collider, string[] tags){
		foreach (string tag in tags) {
			if (collider.tag == tag) {
				return true;
			}
		}
		return false;
	}

	public static bool hasTags(GameObject obj, string[] tags){
		foreach (string tag in tags) {
			if (obj.tag == tag) {
				return true;
			}
		}
		return false;
	}

	public static List<Transform> getDescendentTransforms(Transform parent){
		if (parent == null) {
			return new List<Transform> (); //return empty list if passed null
		}
		List<Transform> transforms = new List<Transform> ();
		foreach (Transform child in parent) {
			transforms.Add (child);
			List<Transform> descendents = getDescendentTransforms (child);
			transforms.AddRange (descendents);
		}
		return transforms;
	}

	public static List<Transform> getDescendentTransforms(GameObject obj){
		if (obj == null) {
			return new List<Transform> (); //return empty list if passed null
		}
		Transform parent = obj.transform;
		return getDescendentTransforms (parent);
	}

	public static List<GameObject> getDescendentObjects(Transform parent){
		if (parent == null) {
			return new List<GameObject> (); //return empty list if passed null
		}
		List<Transform> transformList = getDescendentTransforms (parent);
		List<GameObject> objectList = new List<GameObject> ();
		foreach (Transform t in transformList) {
			objectList.Add (t.gameObject);
		}
		return objectList;
	}

	public static List<GameObject> getDescendentObjects(GameObject obj){
		if (obj == null) {
			return new List<GameObject> (); //return empty list if passed null
		}
		Transform parent = obj.transform;
		return getDescendentObjects (parent);
	}

}
{'fraction_non_alphanumeric': 0.10142238713667286, 'fraction_numerical': 0.0, 'mean_word_length': 4.347107438016529, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '4376265', 'n_tokens_mistral': 1057, 'n_tokens_neox': 936, 'n_words': 287}