<commit_before>package store.active.asapp;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.RadioGroup;
import android.widget.ViewSwitcher;

public class FirstPageFragment extends Fragment {

	private String image1_url = "http://www.active-store.it/img/slider01.png";
	ImageSwitcher imageSwitcher;
	//array of image resources for the ImageSwitcher
	int imageResources[] = {
			R.drawable.slider01,R.drawable.slider02,
	};
	Animation slide_in_left, slide_out_right;
	int curIndex;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {


		final View rootView = inflater.inflate(R.layout.first_page_fragment, container, false);
		//header with logo of Company
		ImageView imv0 = (ImageView) rootView.findViewById(R.id.imageView0);
		imv0.setImageResource(R.drawable.logo_completo);

		//setting behavior of changing image
		slide_in_left = AnimationUtils.loadAnimation(this.getActivity(), android.R.anim.slide_in_left);
		slide_out_right = AnimationUtils.loadAnimation(this.getActivity(), android.R.anim.slide_out_right);
		imageSwitcher = (ImageSwitcher) rootView.findViewById(R.id.imageSwitcher);

		//inizialize the ImageSwitcher
		imageSwitcher.setFactory(new ViewSwitcher.ViewFactory() {

			@Override
			public View makeView() {

				ImageView imageView = new ImageView(getActivity());
				imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);

				FrameLayout.LayoutParams params = new ImageSwitcher.LayoutParams(
						RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.MATCH_PARENT);

				imageView.setLayoutParams(params);
				return imageView;

			}
		});

		//set Index of the image array for first image to show
		curIndex = 0;
		imageSwitcher.setImageResource(imageResources[curIndex]);
		//set Animation for imageSwitcher

		imageSwitcher.setInAnimation(slide_in_left);
		imageSwitcher.setOutAnimation(slide_out_right);

		//method for automatic switch of the image into the ImageSwitcher
		imageSwitcher.postDelayed(new Runnable() {
			int i = 0;
			public void run() {
				imageSwitcher.setImageResource(i++ % 2 == 0 ? R.drawable.slider01 : R.drawable.slider02);
				imageSwitcher.postDelayed(this, 5000);
			}}, 5000);



		return rootView;
	}


}<commit_msg>BugFix<commit_after>package store.active.asapp;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageSwitcher;
import android.widget.ImageView;
import android.widget.RadioGroup;
import android.widget.ViewSwitcher;

public class FirstPageFragment extends Fragment {

	private String image1_url = "http://www.active-store.it/img/slider01.png";
	ImageSwitcher imageSwitcher;
	//array of image resources for the ImageSwitcher
	int imageResources[] = {
			R.drawable.slider01,R.drawable.slider02,
	};
	Animation slide_in_left, slide_out_right;
	int curIndex;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {


		final View rootView = inflater.inflate(R.layout.first_page_fragment, container, false);
		//header with logo of Company
		ImageView imv0 = (ImageView) rootView.findViewById(R.id.imageView0);
		imv0.setImageResource(R.drawable.logo_completo);

		//setting behavior of ImageSwither to change image
		slide_in_left = AnimationUtils.loadAnimation(this.getActivity(), android.R.anim.slide_in_left);
		slide_out_right = AnimationUtils.loadAnimation(this.getActivity(), android.R.anim.slide_out_right);
		imageSwitcher = (ImageSwitcher) rootView.findViewById(R.id.imageSwitcher);

		//inizialize the ImageSwitcher
		imageSwitcher.setFactory(new ViewSwitcher.ViewFactory() {

			@Override
			public View makeView() {

				ImageView imageView = new ImageView(getActivity());
				imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);

				FrameLayout.LayoutParams params = new ImageSwitcher.LayoutParams(
						RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.MATCH_PARENT);

				imageView.setLayoutParams(params);
				return imageView;

			}
		});

		//set Animation for imageSwitcher
		imageSwitcher.setInAnimation(slide_in_left);
		imageSwitcher.setOutAnimation(slide_out_right);

		//method for automatic switch of the image into the ImageSwitcher
		imageSwitcher.postDelayed(new Runnable() {
			int i = 0;
			public void run() {
				imageSwitcher.setImageResource(i++ % 2 == 0 ? R.drawable.slider01 : R.drawable.slider02);
				imageSwitcher.postDelayed(this, 5000);
			}}, 5000);

		return rootView;
	}


}
{'fraction_non_alphanumeric': 0.09693570999399159, 'fraction_numerical': 0.010214300020028039, 'mean_word_length': 5.2269326683291775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6269833', 'n_tokens_mistral': 1709, 'n_tokens_neox': 1507, 'n_words': 312}