<commit_before>package dyl.anjon.es.traintrack.adapters;

import java.util.ArrayList;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import dyl.anjon.es.traintrack.R;
import dyl.anjon.es.traintrack.models.Schedule;
import dyl.anjon.es.traintrack.models.ScheduleLocation;
import dyl.anjon.es.traintrack.models.Station;

public class ScheduleRowAdapter extends BaseAdapter {

	private ArrayList<Schedule> schedules;
	private LayoutInflater inflater = null;
	private Station station;

	/**
	 * @param inflater
	 * @param schedules
	 *            to be displayed
	 * @param station
	 *            the schedule is being seen from
	 */
	public ScheduleRowAdapter(LayoutInflater inflater,
			ArrayList<Schedule> schedules, Station station) {
		this.schedules = schedules;
		this.inflater = inflater;
		this.station = station;
	}

	public int getCount() {
		return schedules.size();
	}

	public Schedule getItem(int position) {
		return schedules.get(position);
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		final View v = inflater.inflate(R.layout.row_schedule, null);
		final Schedule schedule = schedules.get(position);
		final ScheduleLocation scheduleLocation = schedule.at(
				inflater.getContext(), station);
		final TextView destination = (TextView) v
				.findViewById(R.id.destination);
		ScheduleLocation destinationScheduleLocation = schedule
				.getDestination(inflater.getContext());
		if (destinationScheduleLocation.getStation().equals(station)) {
			destination.setText("Terminates Here");
		} else {
			destination.setText(destinationScheduleLocation.toString());
		}
		final TextView time = (TextView) v.findViewById(R.id.time);
		time.setText(scheduleLocation.getTime());
		final TextView platform = (TextView) v.findViewById(R.id.platform);
		platform.setText(scheduleLocation.getPlatform());
		return v;
	}
}
<commit_msg>adds origin to schedule row<commit_after>package dyl.anjon.es.traintrack.adapters;

import java.util.ArrayList;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import dyl.anjon.es.traintrack.R;
import dyl.anjon.es.traintrack.models.Schedule;
import dyl.anjon.es.traintrack.models.ScheduleLocation;
import dyl.anjon.es.traintrack.models.Station;

public class ScheduleRowAdapter extends BaseAdapter {

	private ArrayList<Schedule> schedules;
	private LayoutInflater inflater = null;
	private Station station;

	/**
	 * @param inflater
	 * @param schedules
	 *            to be displayed
	 * @param station
	 *            the schedule is being seen from
	 */
	public ScheduleRowAdapter(LayoutInflater inflater,
			ArrayList<Schedule> schedules, Station station) {
		this.schedules = schedules;
		this.inflater = inflater;
		this.station = station;
	}

	public int getCount() {
		return schedules.size();
	}

	public Schedule getItem(int position) {
		return schedules.get(position);
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		final View v = inflater.inflate(R.layout.row_schedule, null);
		final Schedule schedule = schedules.get(position);
		final ScheduleLocation scheduleLocation = schedule.at(
				inflater.getContext(), station);

		final TextView destination = (TextView) v
				.findViewById(R.id.destination);
		ScheduleLocation destinationScheduleLocation = schedule
				.getDestination(inflater.getContext());
		if (destinationScheduleLocation.getStation().equals(station)) {
			destination.setText("Terminates Here");
		} else {
			destination.setText(destinationScheduleLocation.toString());
		}

		final TextView origin = (TextView) v.findViewById(R.id.origin);
		ScheduleLocation originScheduleLocation = schedule.getOrigin(inflater
				.getContext());
		if (originScheduleLocation.getStation().equals(station)) {
			origin.setText("Starts Here");
		} else {
			origin.setText("From " + originScheduleLocation.toString());
		}

		final TextView time = (TextView) v.findViewById(R.id.time);
		time.setText(scheduleLocation.getTime());

		final TextView platform = (TextView) v.findViewById(R.id.platform);
		platform.setText(scheduleLocation.getPlatform());

		return v;
	}
}

{'fraction_non_alphanumeric': 0.10510916047715507, 'fraction_numerical': 0.0, 'mean_word_length': 4.771428571428571, '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': '3520707', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1245, 'n_words': 290}