<commit_before>package mork.gui;

import java.awt.event.ActionEvent;
import java.io.File;

import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;

public class OpenAction extends AbstractAction {

	/**
	 * SUID
	 */
	private static final long serialVersionUID = 1L;
	private final Controller controller;

	public OpenAction(Controller controller) {
		super("Open...");
		this.controller = controller;
	}

	public void actionPerformed(ActionEvent e) {
		ProfileLocator locator = new ProfileLocator();
		String result = locator.locateFirstThunderbirdAddressbookPath();

		JFileChooser chooser = new JFileChooser();
		chooser.setDialogType(JFileChooser.OPEN_DIALOG);

		if (result != null) {
			// We found a Thunderbird profile in the user app data
			chooser.setCurrentDirectory(new File(result));
		}

		FileFilter filter = new FileFilter() {
			@Override
			public boolean accept(File f) {
				if (f.isDirectory())
					return true;
				return f.getName().endsWith("mab");
			}

			@Override
			public String getDescription() {
				return "Mozilla Addressbook (*.mab)";
			}
		};
		chooser.setFileFilter(filter);
		int returnVal = chooser.showOpenDialog(null);
		if (returnVal == JFileChooser.APPROVE_OPTION) {
			System.out.println("You chose to open this file: "
					+ chooser.getSelectedFile().getName());
			controller.openFile(chooser.getSelectedFile());
		}
	}

}
<commit_msg>show hidden files. on linux for instance mozilla profile is in hidden folder<commit_after>package mork.gui;

import java.awt.event.ActionEvent;
import java.io.File;

import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileFilter;

public class OpenAction extends AbstractAction {

	/**
	 * SUID
	 */
	private static final long serialVersionUID = 1L;
	private final Controller controller;

	public OpenAction(Controller controller) {
		super("Open...");
		this.controller = controller;
	}

	public void actionPerformed(ActionEvent e) {
		ProfileLocator locator = new ProfileLocator();
		String result = locator.locateFirstThunderbirdAddressbookPath();

		JFileChooser chooser = new JFileChooser();
		chooser.setDialogType(JFileChooser.OPEN_DIALOG);

		if (result != null) {
			// We found a Thunderbird profile in the user app data
			chooser.setCurrentDirectory(new File(result));
		}

		FileFilter filter = new FileFilter() {
			@Override
			public boolean accept(File f) {
				if (f.isDirectory())
					return true;
				return f.getName().endsWith("mab");
			}

			@Override
			public String getDescription() {
				return "Mozilla Addressbook (*.mab)";
			}
		};
		chooser.setFileFilter(filter);
		chooser.setFileHidingEnabled(false);
		int returnVal = chooser.showOpenDialog(null);
		if (returnVal == JFileChooser.APPROVE_OPTION) {
			System.out.println("You chose to open this file: "
					+ chooser.getSelectedFile().getName());
			controller.openFile(chooser.getSelectedFile());
		}
	}

}

{'fraction_non_alphanumeric': 0.10494026477236035, 'fraction_numerical': 0.0006457862447529867, 'mean_word_length': 3.5491923641703376, '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': '4214118', 'n_tokens_mistral': 1077, 'n_tokens_neox': 916, 'n_words': 219}