<commit_before>package cz.quinix.condroid.welcome;

import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cz.quinix.condroid.AsyncTaskListener;
import cz.quinix.condroid.R;
import cz.quinix.condroid.conventions.Convention;
import cz.quinix.condroid.conventions.ConventionLoader;
import cz.quinix.condroid.database.DataLoadTask;
import cz.quinix.condroid.database.DataProvider;

public class WelcomeActivity extends Activity implements AsyncTaskListener {

	private DataProvider dataProvider = null;
	public static final String TAG = "Condroid";
	private ProgressDialog pd;
	private List<Convention> conventionList;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		this.setContentView(R.layout.welcome);
		dataProvider = new DataProvider(getApplicationContext());
		if (!dataProvider.hasData()) {
			this.noDataDialog(getString(R.string.noData)+" "+getString(R.string.downloadDialog));
		}
		
		Button refresh = (Button) this.findViewById(R.id.bReload); 
		refresh.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				noDataDialog(getString(R.string.downloadDialog));
				
			}
		});
	}

	private void noDataDialog(String message) {
		AlertDialog.Builder builder = new AlertDialog.Builder(this);
		builder.setMessage(message)<commit_msg>all annotations button is now active<commit_after>package cz.quinix.condroid.welcome;

import java.util.List;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cz.quinix.condroid.AsyncTaskListener;
import cz.quinix.condroid.R;
import cz.quinix.condroid.annotations.AllAnotations;
import cz.quinix.condroid.conventions.Convention;
import cz.quinix.condroid.conventions.ConventionLoader;
import cz.quinix.condroid.database.DataLoadTask;
import cz.quinix.condroid.database.DataProvider;

public class WelcomeActivity extends Activity implements AsyncTaskListener {

	private DataProvider dataProvider = null;
	public static final String TAG = "Condroid";
	private ProgressDialog pd;
	private List<Convention> conventionList;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		this.setContentView(R.layout.welcome);
		dataProvider = DataProvider.getInstance(getApplicationContext());
		if (!dataProvider.hasData()) {
			this.noDataDialog(getString(R.string.noData)+" "+getString(R.string.downloadDialog));
		}
		
		Button refresh = (Button) this.findViewById(R.id.bReload); 
		refresh.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				noDataDialog(getString(R.string.downloadDialog));
				
			}
		});
		
		Button all = (Button) findViewById(R.id.bShowAll);
		all.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				Intent intent = new Intent(WelcomeActivity.this, AllAnotations.class);
				startActivity(intent);
				
			}
		});
	}

	private void noDataDialog(String message) {
		AlertDialog.Builder builder = new AlertDialog.Builder(this);
		builder.setMessage(message)
{'fraction_non_alphanumeric': 0.10228233305156383, 'fraction_numerical': 0.0, 'mean_word_length': 5.610800744878957, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7481910', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1005, 'n_words': 205}