<commit_before>package dziennik_szkolny;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JTextField;

import javax.swing.JLabel;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class login_gui {

	private JFrame frame;
	private JTextField txt_pesel;
	private JTextField txt_haslo;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					login_gui window = new login_gui();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public login_gui() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 290, 192);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		txt_pesel = new JTextField();
		txt_pesel.setBounds(69, 48, 154, 20);
		frame.getContentPane().add(txt_pesel);
		txt_pesel.setColumns(10);
		
		JLabel lblPesel = new JLabel("Pesel");
		lblPesel.setBounds(10, 50, 69, 17);
		frame.getContentPane().add(lblPesel);
		
		txt_haslo = new JTextField();
		txt_haslo.setColumns(10);
		txt_haslo.setBounds(69, 79, 154, 20);
		frame.getContentPane().add(txt_haslo);
		
		JLabel lblHaso = new JLabel("Has\u0142o");
		lblHaso.setBounds(10, 78, 69, 17);
		frame.getContentPane().add(lblHaso);
		/**Z<NAME> Logowania**/
		JButton btnZamknij = new JButton("Zamknij");
		btnZamknij.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			frame.dispose();
			}
		});
		btnZamknij.setBounds(20, 110, 108, 29);
		frame.getContentPane().add(btnZamknij);
		
		JButton btnZaloguj = new JButton("Zaloguj");
		btnZaloguj.setBounds(156, 110, 108, 29);
		frame.getContentPane().add(btnZaloguj);
	}
}<commit_msg>Obsługa poprawnego wpisania peselu tzn 11<commit_after>package dziennik_szkolny;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JTextField;

import javax.swing.JLabel;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;


public class login_gui {

	private JFrame frame;
	private JTextField txt_pesel;
	private JPasswordField passwordField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					login_gui window = new login_gui();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public login_gui() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 290, 192);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		txt_pesel = new JTextField();
		txt_pesel.setBounds(69, 48, 154, 20);
		frame.getContentPane().add(txt_pesel);
		txt_pesel.setColumns(10);
		
		JLabel lblPesel = new JLabel("Pesel");
		lblPesel.setBounds(10, 50, 69, 17);
		frame.getContentPane().add(lblPesel);
		
		JLabel lblHaso = new JLabel("Has\u0142o");
		lblHaso.setBounds(10, 78, 45, 17);
		frame.getContentPane().add(lblHaso);
		/**<NAME>**/
		JButton btnZamknij = new JButton("Zamknij");
		btnZamknij.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			frame.dispose();
			}
		});
		btnZamknij.setBounds(20, 110, 108, 29);
		frame.getContentPane().add(btnZamknij);
		
		final JLabel pesel_blad_znak = new JLabel("Bl\u0119dny pesel.");
		pesel_blad_znak.setEnabled(false);
		pesel_blad_znak.setVisible(false);
		pesel_blad_znak.setBounds(79, 23, 108, 14);
		frame.getContentPane().add(pesel_blad_znak);
		

		passwordField = new JPasswordField();
		passwordField.setBounds(69, 76, 154, 20);
		frame.getContentPane().add(passwordField);
		
		JButton btnZaloguj = new JButton("Zaloguj");
		btnZaloguj.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {		
				/**Obsluga wpisania poprawnego numeru pesel tj 11 cyfr**/
					try{
						pesel_blad_znak.setVisible(false);
						long pesel = Long.parseLong(txt_pesel.getText());
						if(txt_pesel.getText().length() != 11)
							throw new NumberFormatException();
						System.out.println(pesel);
					}
					catch(NumberFormatException ex)
					{
						pesel_blad_znak.setVisible(true);
						
					}					
						
				
					
			
			}
		});
		btnZaloguj.setBounds(156, 110, 108, 29);
		frame.getContentPane().add(btnZaloguj);
		
		
	}
}
{'fraction_non_alphanumeric': 0.13217790770515767, 'fraction_numerical': 0.03549801628732512, 'mean_word_length': 3.92798353909465, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5446030', 'n_tokens_mistral': 2110, 'n_tokens_neox': 1699, 'n_words': 322}