<commit_before>import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 * User interface to PasswordGenerator.java
 * 
 * @author <NAME>
 * @version 2.0 9 May 2015
 */
public class MainMenu {
	public static void main(String[] args) {
		PasswordGenerator pass = new PasswordGenerator();
		JFrame frame = new JFrame("Password Generator");
		frame.setLayout(new GridLayout(3, 2));
		frame.setSize(400, 200);

		JFrame frame1 = new JFrame("Password Results");
		frame1.setSize(400, 200);

		JLabel labelOne = new JLabel("Number of passwords: ");
		JTextField fieldOne = new JTextField();

		JLabel labelTwo = new JLabel("Number of words per password: ");
		JTextField fieldTwo = new JTextField();

		JTextArea textArea = new JTextArea();
		JScrollPane scroll = new JScrollPane(textArea);
		frame1.add(scroll);

		JButton button = new JButton("Go!");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try {
					frame1.setVisible(true);
					
					int numPass = Integer.parseInt(fieldOne.getText());
					int numWords = Integer.parseInt(fieldTwo.getText());

					textArea.setText(pass.generatePass(numWords));
					textArea.append("\n"); // formatting

					for (int i = 0; i < numPass - 1; i++) {
						textArea.append(pass.generatePass(numWords));
						textArea.append("\n"); // formatting
					}
				} catch (NumberFormatException e) {
					textArea.setText("You have entered a value that is not a number.");
				}
			}
		});

		JButton button1 = new JButton("Reset");
		button1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				textArea.setText("");
				fieldOne.setText("");
				fieldTwo.setText("");
			}
		});

		frame.add(labelOne);
		frame.add(fieldOne);
		frame.add(labelTwo);
		frame.add(fieldTwo);
		frame.add(button);
		frame.add(button1);

		frame.setVisible(true);

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}<commit_msg>GUI Update -merged Password Generator and Password Results frames into one JFrame.<commit_after>import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 * User interface to PasswordGenerator.java
 * 
 * @author <NAME>
 * @version 2.1 11 May 2015
 */
public class MainMenu {
	public static void main(String[] args) {
		PasswordGenerator pass = new PasswordGenerator();
		
		//master frame
		JFrame frame = new JFrame("Password Generator");
		frame.setLayout(new BorderLayout());
		frame.setSize(700, 200);

		//main menu
		JPanel panel = new JPanel();
		panel.setSize(200, 200);
		panel.setLayout(new GridLayout(3,2));
		
		//password results field
		JPanel panel1 = new JPanel();
		panel1.setSize(200, 200);
		panel1.setLayout(new BorderLayout());

		JLabel labelOne = new JLabel("Number of passwords: ");
		JTextField fieldOne = new JTextField();

		JLabel labelTwo = new JLabel("Number of words per password: ");
		JTextField fieldTwo = new JTextField();

		JTextArea textArea = new JTextArea();
		JScrollPane scroll = new JScrollPane(textArea);

		JButton button = new JButton("Go!");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				try {				
					int numPass = Integer.parseInt(fieldOne.getText());
					int numWords = Integer.parseInt(fieldTwo.getText());

					textArea.setText(pass.generatePass(numWords));
					textArea.append("\n"); // formatting

					//numPass-1 because one password is already added to the text area outside the loop
					for (int i = 0; i < numPass - 1; i++) {
						textArea.append(pass.generatePass(numWords));
						textArea.append("\n"); // formatting
					}
				} catch (NumberFormatException e) {
					textArea.setText("You have entered a value that is not a number.");
				}
			}
		});

		JButton button1 = new JButton("Reset");
		button1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				textArea.setText("");
				fieldOne.setText("");
				fieldTwo.setText("");
			}
		});

		panel.add(labelOne);
		panel.add(fieldOne);
		panel.add(labelTwo);
		panel.add(fieldTwo);
		panel.add(button);
		panel.add(button1);
		panel1.add(scroll);

		frame.add(panel, BorderLayout.WEST);
		frame.add(panel1, BorderLayout.CENTER);
		frame.setVisible(true);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
}
{'fraction_non_alphanumeric': 0.12838682784493538, 'fraction_numerical': 0.015214672780325135, 'mean_word_length': 4.067581837381204, 'pattern_counts': {'":': 0, '<': 7, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6768828', 'n_tokens_mistral': 1759, 'n_tokens_neox': 1467, 'n_words': 357}