<commit_before>package link.standen.michael.fatesheets.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import link.standen.michael.fatesheets.R;
import link.standen.michael.fatesheets.activity.CoreCharacterEditActivity;
import link.standen.michael.fatesheets.adapter.DeletableStringArrayAdapter;
import link.standen.michael.fatesheets.model.CoreCharacter;

/**
 * A fragment for managing a characters stunts.
 */
public class CoreCharacterEditStuntsFragment extends CoreCharacterEditAbstractFragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
							 Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.core_character_edit_stunts, container, false);

		final CoreCharacter character = getCharacter();

		// Stunts
		final DeletableStringArrayAdapter stuntListAdapter = new DeletableStringArrayAdapter((CoreCharacterEditActivity) getContext(),
				R.layout.core_character_edit_stunts_list_item, getCharacter().getStunts());
		((ListView) rootView.findViewById(R.id.stunts_list)).setAdapter(stuntListAdapter);

		rootView.findViewById(R.id.add_stunt).setOnClickListener(new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				character.getStunts().add("");
				stuntListAdapter.notifyDataSetChanged();
			}
		});

		// Extras
		final DeletableStringArrayAdapter extraListAdapter = new DeletableStringArrayAdapter((CoreCharacterEditActivity) getContext(),
				R.layout.core_character_edit_extras_list_item, getCharacter().getExtras());
		((ListView) rootView.findViewById(R.id.extras_list)).setAdapter(extraListAdapter);

		rootView.findViewById(R.id.add_extra).setOnClickListener(new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				character.getExtras().add("");
				stuntListAdapter.notifyDataSetChanged();
			}
		});

		return rootView;<commit_msg>Corrected add button notifying extra list<commit_after>package link.standen.michael.fatesheets.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import link.standen.michael.fatesheets.R;
import link.standen.michael.fatesheets.activity.CoreCharacterEditActivity;
import link.standen.michael.fatesheets.adapter.DeletableStringArrayAdapter;
import link.standen.michael.fatesheets.model.CoreCharacter;

/**
 * A fragment for managing a characters stunts.
 */
public class CoreCharacterEditStuntsFragment extends CoreCharacterEditAbstractFragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
							 Bundle savedInstanceState) {
		View rootView = inflater.inflate(R.layout.core_character_edit_stunts, container, false);

		final CoreCharacter character = getCharacter();

		// Stunts
		final DeletableStringArrayAdapter stuntListAdapter = new DeletableStringArrayAdapter((CoreCharacterEditActivity) getContext(),
				R.layout.core_character_edit_stunts_list_item, getCharacter().getStunts());
		((ListView) rootView.findViewById(R.id.stunts_list)).setAdapter(stuntListAdapter);

		rootView.findViewById(R.id.add_stunt).setOnClickListener(new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				character.getStunts().add("");
				stuntListAdapter.notifyDataSetChanged();
			}
		});

		// Extras
		final DeletableStringArrayAdapter extraListAdapter = new DeletableStringArrayAdapter((CoreCharacterEditActivity) getContext(),
				R.layout.core_character_edit_extras_list_item, getCharacter().getExtras());
		((ListView) rootView.findViewById(R.id.extras_list)).setAdapter(extraListAdapter);

		rootView.findViewById(R.id.add_extra).setOnClickListener(new View.OnClickListener(){
			@Override
			public void onClick(View v) {
				character.getExtras().add("");
				extraListAdapter.notifyDataSetChanged();
			}
		});

		return rootView;
{'fraction_non_alphanumeric': 0.10155857214680744, 'fraction_numerical': 0.0, 'mean_word_length': 6.260948905109489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3233649', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1115, 'n_words': 188}