<commit_before>/*******************************************************************************
 * Copyright (c) 2016 <NAME> - github.com/shpralex
 * This program and the accompanying materials
 * are made available under the terms of the The MIT License (MIT)
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *******************************************************************************/
package com.sproutlife.action;

import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import com.sproutlife.io.GenomeIo;
import com.sproutlife.panel.PanelController;

@SuppressWarnings("serial")
public class SaveGenomeAction extends AbstractAction {
    
    protected PanelController controller;
    
    private JFileChooser chooser = null;
    
    public SaveGenomeAction(PanelController controller, String name) {
        super(name);
        this.controller = controller;
        
    }
    
    public SaveGenomeAction(PanelController controller) {
        this(controller, "Save Genome");
    }
    
    public void initChooser() {
        File cd = null;
        if (chooser!=null) {
            cd = chooser.getCurrentDirectory();
        }
        chooser = new JFileChooser();
        if (cd==null) {
            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
        }
        else {
            chooser.setCurrentDirectory(cd);
        }
        chooser.setAcceptAllFileFilterUsed(false);
        String date = new SimpleDateFormat(" yyyy-MM-dd HHmm").format(new Date());<commit_msg>format<commit_after>/*******************************************************************************
 * Copyright (c) 2016 <NAME> - github.com/shpralex
 * This program and the accompanying materials
 * are made available under the terms of the The MIT License (MIT)
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *******************************************************************************/
package com.sproutlife.action;

import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.swing.AbstractAction;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

import com.sproutlife.io.GenomeIo;
import com.sproutlife.panel.PanelController;

@SuppressWarnings("serial")
public class SaveGenomeAction extends AbstractAction {
    
    protected PanelController controller;
    
    private JFileChooser chooser = null;
    
    public SaveGenomeAction(PanelController controller, String name) {
        super(name);
        this.controller = controller;
    }
    
    public SaveGenomeAction(PanelController controller) {
        this(controller, "Save Genome");
    }
    
    public void initChooser() {
        File cd = null;
        if (chooser!=null) {
            cd = chooser.getCurrentDirectory();
        }
        chooser = new JFileChooser();
        if (cd==null) {
            chooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
        }
        else {
            chooser.setCurrentDirectory(cd);
        }
        chooser.setAcceptAllFileFilterUsed(false);
        String date = new SimpleDateFormat(" yyyy-MM-dd HHmm").format(new Date());
{'fraction_non_alphanumeric': 0.17144463181562675, 'fraction_numerical': 0.0022484541877459247, 'mean_word_length': 3.5279898218829517, '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': '5823563', 'n_tokens_mistral': 927, 'n_tokens_neox': 898, 'n_words': 239}