<commit_before>package com.Pirhotau.Debug;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.JCheckBox;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 * Must display DebugData
 * 
 * @author blanc_adm
 *
 */
final class DebugWindow extends JFrame {
	private static final long serialVersionUID = 1L;
	private JTable table;
	private DebugData data;
	
	private static final boolean ALWAYS_ON_TOP = true;
	
	
	
	/**
	 * Constructor
	 */
	DebugWindow(DebugData data) {
		JPanel panelButtons = new JPanel();
		this.data = data;
		SpringLayout springLayout = new SpringLayout();
		springLayout.putConstraint(SpringLayout.WEST, panelButtons, 5, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panelButtons, -5, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panelButtons, -5, SpringLayout.EAST, getContentPane());
		getContentPane().setLayout(springLayout);
		
		JPanel panelTable = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panelButtons, 5, SpringLayout.SOUTH, panelTable);
		springLayout.putConstraint(SpringLayout.NORTH, panelTable, 5, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, panelTable, 5, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panelTable, -35, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panelTable, -5, SpringLayout.EAST, getContentPane());
		getContentPane().add(panelTable);
		panelTable.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane = new JScrollPane();
		panelTable.add(scrollPane, BorderLayout.CENTER);
		springLayout.putConstraint(SpringLayout.NORTH, scrollPane, 0, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, scrollPane, 0, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, scrollPane, 361, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, scrollPane, 384, SpringLayout.WEST, getContentPane());
		
		this.table = new JTable(this.data);
		scrollPane.setViewportView(this.table);
		getContentPane().add(panelButtons);
		SpringLayout sl_panelButtons = new SpringLayout();
		panelButtons.setLayout(sl_panelButtons);
		
		JCheckBox cbAlwaysOnTop = new JCheckBox("Always on top");
		cbAlwaysOnTop.setSelected(ALWAYS_ON_TOP);
		this.setAlwaysOnTop(ALWAYS_ON_TOP);
		sl_panelButtons.putConstraint(SpringLayout.WEST, cbAlwaysOnTop, 5, SpringLayout.WEST, panelButtons);
		sl_panelButtons.putConstraint(SpringLayout.EAST, cbAlwaysOnTop, -5, SpringLayout.EAST, panelButtons);
		cbAlwaysOnTop.setHorizontalAlignment(SwingConstants.CENTER);
		sl_panelButtons.putConstraint(SpringLayout.NORTH, cbAlwaysOnTop, 0, SpringLayout.NORTH, panelButtons);
		panelButtons.add(cbAlwaysOnTop);
		
		cbAlwaysOnTop.addChangeListener(new ChangeListener() {<commit_msg>Fix a random error in DebugWindow<commit_after>package com.Pirhotau.Debug;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.SpringLayout;
import javax.swing.JCheckBox;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 * Must display DebugData
 * 
 * @author blanc_adm
 *
 */
final class DebugWindow extends JFrame {
	private static final long serialVersionUID = 1L;
	private JTable table;
	private DebugData data;
	
	private static final boolean ALWAYS_ON_TOP = true;
	
	private JCheckBox cbAlwaysOnTop;
	
	/**
	 * Constructor
	 */
	DebugWindow(DebugData data) {
		JPanel panelButtons = new JPanel();
		this.data = data;
		SpringLayout springLayout = new SpringLayout();
		springLayout.putConstraint(SpringLayout.WEST, panelButtons, 5, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panelButtons, -5, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panelButtons, -5, SpringLayout.EAST, getContentPane());
		getContentPane().setLayout(springLayout);
		
		JPanel panelTable = new JPanel();
		springLayout.putConstraint(SpringLayout.NORTH, panelButtons, 5, SpringLayout.SOUTH, panelTable);
		springLayout.putConstraint(SpringLayout.NORTH, panelTable, 5, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, panelTable, 5, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, panelTable, -35, SpringLayout.SOUTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, panelTable, -5, SpringLayout.EAST, getContentPane());
		getContentPane().add(panelTable);
		panelTable.setLayout(new BorderLayout(0, 0));
		
		JScrollPane scrollPane = new JScrollPane();
		panelTable.add(scrollPane, BorderLayout.CENTER);
		springLayout.putConstraint(SpringLayout.NORTH, scrollPane, 0, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.WEST, scrollPane, 0, SpringLayout.WEST, getContentPane());
		springLayout.putConstraint(SpringLayout.SOUTH, scrollPane, 361, SpringLayout.NORTH, getContentPane());
		springLayout.putConstraint(SpringLayout.EAST, scrollPane, 384, SpringLayout.WEST, getContentPane());
		
		this.table = new JTable(this.data);
		scrollPane.setViewportView(this.table);
		getContentPane().add(panelButtons);
		SpringLayout sl_panelButtons = new SpringLayout();
		panelButtons.setLayout(sl_panelButtons);
		
		cbAlwaysOnTop = new JCheckBox("Always on top");
		cbAlwaysOnTop.setSelected(ALWAYS_ON_TOP);
		this.setAlwaysOnTop(ALWAYS_ON_TOP);
		sl_panelButtons.putConstraint(SpringLayout.WEST, cbAlwaysOnTop, 5, SpringLayout.WEST, panelButtons);
		sl_panelButtons.putConstraint(SpringLayout.EAST, cbAlwaysOnTop, -5, SpringLayout.EAST, panelButtons);
		cbAlwaysOnTop.setHorizontalAlignment(SwingConstants.CENTER);
		sl_panelButtons.putConstraint(SpringLayout.NORTH, cbAlwaysOnTop, 0, SpringLayout.NORTH, panelButtons);
		panelButtons.add(cbAlwaysOnTop);
		
		cbAlwaysOnTop.addChangeListener(new ChangeListener() {
{'fraction_non_alphanumeric': 0.10718809373020899, 'fraction_numerical': 0.007283090563647878, 'mean_word_length': 6.750920245398773, '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': '3827183', 'n_tokens_mistral': 2088, 'n_tokens_neox': 1920, 'n_words': 357}