<commit_before>package nabhack.localz.activity;

import nabhack.localz.LocalzApp;
import nabhack.localz.R;
import nabhack.localz.activity.FacebookFragment.IFacebookSessionCallback;
import nabhack.localz.ui.SimpleTextDialog;

import org.json.JSONException;
import org.json.JSONObject;

import android.app.ActionBar;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.facebook.FacebookRequestError;
import com.facebook.HttpMethod;
import com.facebook.Request;
import com.facebook.RequestAsyncTask;
import com.facebook.Response;
import com.facebook.Session;
import com.facebook.SessionState;
import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.App;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.OptionsMenu;
import com.googlecode.androidannotations.annotations.UiThread;
import com.googlecode.androidannotations.annotations.ViewById;

@OptionsMenu(R.menu.deal_details)
@EActivity(R.layout.activity_secure_deal)
public class SecureDealActivity extends FragmentActivity implements
		IFacebookSessionCallback{

	public static final String DEALID_INTENT_EXTRAS = "dealid";
	
	static final float FADE_DEGREE = 0.35f;

	private static final String TAG = DealDetailsActivity2.class.getSimpleName();

	@App
	LocalzApp application;

	FacebookFragment facebookFragment;

	boolean isLoggingIn;

	boolean isNewFacebookLogin;

	DealDetailsFragment2 dealDetailsFragment;
	
	@ViewById(R.id.secureDeal)
	TextView secureDeal;

	@AfterViews
	void setupView() {
		dealDetailsFragment = new DealDetailsFragment2_();
		facebookFragment = new FacebookFragment_();
		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
		ft.add(R.id.sec_deal_details_fragment, dealDetailsFragment);
		ft.add(R.id.sec_facebook_fragment, facebookFragment);
		ft.commit();
		dealDetailsFragment.setDeal(application.getCurrentDeal());
		secureDeal.setText("Claim deal!");
	}
	

	@Click(R.id.secureDeal)
	void secureDeal() {
		Intent intent = new Intent(SecureDealActivity.this, RedeemActivity_.class);
		Bundle extras = new Bundle();
		extras.putString(DEALID_INTENT_EXTRAS, "5");
		intent.putExtras(extras);
		startActivity(intent);
	}


	void initMenuOPtions() {<commit_msg>Fix header<commit_after>package nabhack.localz.activity;

import nabhack.localz.LocalzApp;
import nabhack.localz.R;
import nabhack.localz.activity.FacebookFragment.IFacebookSessionCallback;
import nabhack.localz.ui.SimpleTextDialog;

import org.json.JSONException;
import org.json.JSONObject;

import android.app.ActionBar;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.facebook.FacebookRequestError;
import com.facebook.HttpMethod;
import com.facebook.Request;
import com.facebook.RequestAsyncTask;
import com.facebook.Response;
import com.facebook.Session;
import com.facebook.SessionState;
import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.App;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.OptionsMenu;
import com.googlecode.androidannotations.annotations.UiThread;
import com.googlecode.androidannotations.annotations.ViewById;

@OptionsMenu(R.menu.deal_details)
@EActivity(R.layout.activity_secure_deal)
public class SecureDealActivity extends FragmentActivity implements
		IFacebookSessionCallback{

	public static final String DEALID_INTENT_EXTRAS = "dealid";
	
	static final float FADE_DEGREE = 0.35f;

	private static final String TAG = DealDetailsActivity2.class.getSimpleName();

	@App
	LocalzApp application;

	FacebookFragment facebookFragment;

	boolean isLoggingIn;

	boolean isNewFacebookLogin;

	DealDetailsFragment2 dealDetailsFragment;
	
	@ViewById(R.id.secureDeal)
	TextView secureDeal;

	@AfterViews
	void setupView() {
		dealDetailsFragment = new DealDetailsFragment2_();
		facebookFragment = new FacebookFragment_();
		FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
		ft.add(R.id.sec_deal_details_fragment, dealDetailsFragment);
		ft.add(R.id.sec_facebook_fragment, facebookFragment);
		ft.commit();
		dealDetailsFragment.setDeal(application.getCurrentDeal());
		secureDeal.setText("Claim deal!");
	}
	

	@Click(R.id.secureDeal)
	void secureDeal() {
		Intent intent = new Intent(SecureDealActivity.this, RedeemActivity_.class);
		Bundle extras = new Bundle();
		extras.putString(DEALID_INTENT_EXTRAS, "5");
		intent.putExtras(extras);
		startActivity(intent);
	}


	@AfterViews
	void initMenuOPtions() {
{'fraction_non_alphanumeric': 0.09283088235294118, 'fraction_numerical': 0.0033088235294117647, 'mean_word_length': 6.90843023255814, '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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2363065', 'n_tokens_mistral': 1691, 'n_tokens_neox': 1584, 'n_words': 294}