<commit_before>package com.example.androidfileexplorer;

import java.io.File;
import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class DirListArrayAdapter extends ArrayAdapter<File> {
	Context mContext;

	public DirListArrayAdapter(Context context, int resource, List<File> objects) {
		super(context, resource, objects);
		this.mContext = context;
	}

	@Override
	public View getView(int pos, View convertView, ViewGroup parent) {
		if (convertView == null) {
			LayoutInflater vi = (LayoutInflater) mContext
					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			convertView = vi.inflate(R.layout.entry, null);
		}
		File f = getItem(pos);
		TextView tv = (TextView) convertView.findViewById(R.id.entry);
		tv.setText(f.getName());
		if (f.isDirectory()) {
			tv.setTextColor(mContext.getResources().getColor(R.color.dir_color));
		} else {
			tv.setTextColor(mContext.getResources()
					.getColor(R.color.file_color));
		}

		return convertView;
	}
}
<commit_msg>implemented view holder pattern for dir list<commit_after>package com.example.androidfileexplorer;

import java.io.File;
import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class DirListArrayAdapter extends ArrayAdapter<File> {
	private final Context mContext;

	static class ViewHolder {
		public TextView text;
	}

	public DirListArrayAdapter(Context context, int resource, List<File> objects) {
		super(context, resource, objects);
		this.mContext = context;
	}

	@Override
	public View getView(int pos, View convertView, ViewGroup parent) {
		if (convertView == null) {
			LayoutInflater vi = (LayoutInflater) mContext
					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			convertView = vi.inflate(R.layout.entry, null);
			ViewHolder holder = new ViewHolder();
			holder.text = (TextView) convertView.findViewById(R.id.entry);
			convertView.setTag(holder);
		}
		ViewHolder holder = (ViewHolder) convertView.getTag();
		File f = getItem(pos);
		holder.text.setText(f.getName());
		if (f.isDirectory()) {
			holder.text.setTextColor(mContext.getResources().getColor(
					R.color.dir_color));
		} else {
			holder.text.setTextColor(mContext.getResources().getColor(
					R.color.file_color));
		}

		return convertView;
	}
}

{'fraction_non_alphanumeric': 0.11350293542074363, 'fraction_numerical': 0.0, 'mean_word_length': 4.985948477751757, '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': '2494740', 'n_tokens_mistral': 869, 'n_tokens_neox': 782, 'n_words': 169}