<commit_before>/*
 * pasdroid - An open source implementation of Password Maker for the
 * Android platform, written in Java
 * 
 * Copyright (C) 2010 <NAME>
 * http://arik181.github.com/pasdroid
 * http://github.com/arik181/pasdroid
 * http://passwordmaker.org/
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 *  
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * 
 * Written by <NAME> <<EMAIL>>
 * 
 * Original Command Line Client Written by <NAME> 
 * <<EMAIL>> and <NAME>
*/

package net.arik181.pasdroid;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import net.arik181.pasdroid.Fakehash;

public class Interface extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    public void generateHash()
    {
    	Button button = (Button)findViewById(R.id.generate);
        button.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// when the button is clicked:
		    	// get the contents of the first passfield
		    	EditText password = (EditText)findViewById(R.id.password);
		    	String password_string = password.getText().toString();
		    	// get the contents of the second passfield
		    	EditText confirmation = (EditText)findViewById(R.id.confirmation);
		    	String confirmation_string = confirmation.getText().toString();
		    	// Combine the two text elements
		    	String combined= password_string + confirmation_string;
		    	// change the text value of R.id.solution
		    	TextView generated_password =  (TextView)findViewById(R.id.generated_password);
		    	generated_password.setText(combined);
			}
		});
    }
}<commit_msg>Added Generate Button handler to Interface<commit_after>/*
 * pasdroid - An open source implementation of Password Maker for the
 * Android platform, written in Java
 * 
 * Copyright (C) 2010 <NAME>
 * http://arik181.github.com/pasdroid
 * http://github.com/arik181/pasdroid
 * http://passwordmaker.org/
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 *  
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 * 
 * Written by <NAME> <<EMAIL>>
 * 
 * Original Command Line Client Written by <NAME> 
 * <<EMAIL>> and <NAME>
*/

package net.arik181.pasdroid;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import net.arik181.pasdroid.Fakehash;


public class Interface extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        setGenerateButton();
    }

    public void setGenerateButton()
    {
    	Button generateButton = (Button)findViewById(R.id.generate);

    	generateButton.setOnClickListener(new View.OnClickListener() {
    		public void onClick(View v) {
    			TextView password = (TextView)findViewById(R.id.generated_password);
    			password.setText("<PASSWORD>");
    		}
    	});
    }
    
    public void generateHash()
    {
    	Button button = (Button)findViewById(R.id.generate);
        button.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				// when the button is clicked:
		    	// get the contents of the first passfield
		    	EditText password = (EditText)findViewById(R.id.password);
		    	String password_string = password.getText().toString();
		    	// get the contents of the second passfield
		    	EditText confirmation = (EditText)findViewById(R.id.confirmation);
		    	String confirmation_string = confirmation.getText().toString();
		    	// Combine the two text elements
		    	String combined= password_string + confirmation_string;
		    	// change the text value of R.id.solution
		    	TextView generated_password =  (TextView)findViewById(R.id.generated_password);
		    	generated_password.setText(combined);
			}
		});
    }
}
{'fraction_non_alphanumeric': 0.08917197452229299, 'fraction_numerical': 0.01164695177434031, 'mean_word_length': 3.4466019417475726, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '4318952', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1438, 'n_words': 522}