<commit_before>package io.taig.android.widget.ops

trait ViewGroup
{
	def viewGroup: android.view.ViewGroup

	/**
	 * Recursively discovers all children of this view and flattens them into a one dimensional collection in no
	 * particular order
	 */
	def children =
	{
		def discover( view: android.view.ViewGroup ): Seq[android.view.View] =
		{
			( 0 to view.getChildCount - 1 )
				.map( view.getChildAt ) match
			{
				case group: android.view.ViewGroup => group +: discover( group )
				case _ => Seq( view )
			}
		}

		discover( viewGroup )
	}

	/**
	 * Add view as first child
	 */
	def prependView( view: android.view.View ) = viewGroup.addView( view, 0 )

	/**
	 * Add view as first child
	 */
	def prependView( view: android.view.View, parameters: android.view.ViewGroup.LayoutParams ) =
	{
		viewGroup.addView( view, 0, parameters )
	}

	/**
	 * Add view as last child
	 */
	def appendView( view: android.view.View ) = viewGroup.addView( view, viewGroup.getChildCount - 1 )

	/**
	 * Add view as last child
	 */
	def appendView( view: android.view.View, parameters: android.view.ViewGroup.LayoutParams ) =
	{
		viewGroup.addView( view, viewGroup.getChildCount - 1, parameters )
	}
}<commit_msg>Bugfix for appendView<commit_after>package io.taig.android.widget.ops

trait ViewGroup
{
	def viewGroup: android.view.ViewGroup

	/**
	 * Recursively discovers all children of this view and flattens them into a one dimensional collection in no
	 * particular order
	 */
	def children =
	{
		def discover( view: android.view.ViewGroup ): Seq[android.view.View] =
		{
			( 0 to view.getChildCount - 1 )
				.map( view.getChildAt ) match
			{
				case group: android.view.ViewGroup => group +: discover( group )
				case _ => Seq( view )
			}
		}

		discover( viewGroup )
	}

	/**
	 * Add view as first child
	 */
	def prependView( view: android.view.View ) = viewGroup.addView( view, 0 )

	/**
	 * Add view as first child
	 */
	def prependView( view: android.view.View, parameters: android.view.ViewGroup.LayoutParams ) =
	{
		viewGroup.addView( view, 0, parameters )
	}

	/**
	 * Add view as last child
	 */
	def appendView( view: android.view.View ) = viewGroup.addView( view, viewGroup.getChildCount )

	/**
	 * Add view as last child
	 */
	def appendView( view: android.view.View, parameters: android.view.ViewGroup.LayoutParams ) =
	{
		viewGroup.addView( view, viewGroup.getChildCount, parameters )
	}
}

{'fraction_non_alphanumeric': 0.11842650103519668, 'fraction_numerical': 0.004140786749482402, 'mean_word_length': 3.1944444444444446, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2011478', 'n_tokens_mistral': 869, 'n_tokens_neox': 778, 'n_words': 214}