<commit_before>package com.main.src;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.EventQueue;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.KeyStroke;

public class Screen extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static final String EXIT = "Exit";
	private JFrame f = new JFrame("FullScreenTest");
	private Action exit = new AbstractAction(EXIT) {

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		@Override
		public void actionPerformed(ActionEvent e) {
			f.dispatchEvent(new WindowEvent(f, WindowEvent.WINDOW_CLOSING));
		}
	};

//	private JButton b = new JButton(exit);

	public Screen() {
		
//		Uncomment to add a exit button	
//		this.add(b);
//		f.getRootPane().setDefaultButton(b);
		
		//Press "Q" to exit the window
		this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Q, 0), EXIT);	
		this.getActionMap().put(EXIT, exit);
		
//		Uncomment to get a tool tip about mouse position
		/*
		this.addMouseMotionListener(new MouseAdapter() {

			@Override
			public void mouseMoved(MouseEvent e) {
				Screen.this.setToolTipText("(" + e.getX() + "," + e.getY()
						+ ")");
			}
		});
		*/
	}

	private void display() {
		GraphicsEnvironment env = GraphicsEnvironment
				.getLocalGraphicsEnvironment();
		GraphicsDevice dev = env.getDefaultScreenDevice();
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setBackground(Color.darkGray);
		f.setResizable(false);
		f.setUndecorated(true);
		
		//Hide Cursor
		BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);<commit_msg>Fixed a small formatting error and added the ability to close the window either with the "Q" key or the "ESC" Key.<commit_after>package com.main.src;

import java.awt.Color;
import java.awt.Cursor;
import java.awt.EventQueue;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.KeyStroke;

public class Screen extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static final String EXIT = "Exit";
	private JFrame f = new JFrame("FullScreenTest");
	private Action exit = new AbstractAction(EXIT) {

		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		@Override
		public void actionPerformed(ActionEvent e) {
			f.dispatchEvent(new WindowEvent(f, WindowEvent.WINDOW_CLOSING));
		}
	};

//	private JButton b = new JButton(exit);

	public Screen() {
		
//		Uncomment to add a exit button	
//		this.add(b);
//		f.getRootPane().setDefaultButton(b);
		
		//Press "Q" or "ESC" to exit the window
		this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Q, 0), EXIT);	
		this.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), EXIT);	
		this.getActionMap().put(EXIT, exit);
		
//		Uncomment to get a tool tip about mouse position
		/*
		this.addMouseMotionListener(new MouseAdapter() {

			@Override
			public void mouseMoved(MouseEvent e) {
				Screen.this.setToolTipText("(" + e.getX() + "," + e.getY()
						+ ")");
			}
		});
		*/
	}

	private void display() {
		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
		GraphicsDevice dev = env.getDefaultScreenDevice();
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setBackground(Color.darkGray);
		f.setResizable(false);
		f.setUndecorated(true);
		
		//Hide Cursor
		BufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
{'fraction_non_alphanumeric': 0.12090211578702627, 'fraction_numerical': 0.0034875610323180655, 'mean_word_length': 4.272058823529412, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2947601', 'n_tokens_mistral': 1534, 'n_tokens_neox': 1402, 'n_words': 320}