<commit_before>using System;
using System.Collections;
using System.Collections.Generic;
using Android.Content;
using Android.Content.Res;
using Android.Database;

namespace Xamarin.Contacts
{
	internal class ContactReader
		: IEnumerable<Contact>
	{
		public ContactReader (bool useRawContacts, ContentQueryTranslator translator, ContentResolver content, Resources resources)
		{
			this.rawContacts = useRawContacts;
			this.translator = translator;
			this.content = content;
			this.resources = resources;
		}

		public IEnumerator<Contact> GetEnumerator()
		{
			try
			{
				while (this.cursor.MoveToNext())
					yield return ContactHelper.GetContact (this.rawContacts, this.content, this.resources, this.cursor);
			}
			finally
			{
				this.cursor.Close();
			}
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		private readonly bool rawContacts;
		private readonly ContentQueryTranslator translator;
		private readonly ICursor cursor;
		private readonly ContentResolver content;
		private readonly Resources resources;
	}
}<commit_msg>Fix ContactReader<commit_after>using System;
using System.Collections;
using System.Collections.Generic;
using Android.Content;
using Android.Content.Res;
using Android.Database;

namespace Xamarin.Contacts
{
	internal class ContactReader
		: IEnumerable<Contact>
	{
		public ContactReader (bool useRawContacts, ContentQueryTranslator translator, ContentResolver content, Resources resources)
		{
			this.rawContacts = useRawContacts;
			this.translator = translator;
			this.content = content;
			this.resources = resources;
		}

		public IEnumerator<Contact> GetEnumerator()
		{
			ICursor cursor = null;
			try
			{
				cursor = this.content.Query (this.translator.Table, this.translator.Projections, this.translator.QueryString,
				                             this.translator.ClauseParameters, this.translator.SortString);

				while (cursor.MoveToNext())
					yield return ContactHelper.GetContact (this.rawContacts, this.content, this.resources, cursor);
			}
			finally
			{
				if (cursor != null)
					cursor.Close();
			}
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}

		private readonly bool rawContacts;
		private readonly ContentQueryTranslator translator;
		private readonly ContentResolver content;
		private readonly Resources resources;
	}
}
{'fraction_non_alphanumeric': 0.08333333333333333, 'fraction_numerical': 0.0, 'mean_word_length': 4.133909287257019, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4146950', 'n_tokens_mistral': 780, 'n_tokens_neox': 670, 'n_words': 160}