<commit_before>package edacc.experiment;

import javax.swing.table.AbstractTableModel;
import java.util.ArrayList;
import edacc.model.Experiment;
import edacc.model.ExperimentDAO;
import java.sql.SQLException;

public class ExperimentTableModel extends AbstractTableModel {

    public static final int COL_ID = 0;
    public static final int COL_NAME = 1;
    public static final int COL_DATE = 2;
    public static final int COL_NUMRUNS = 3;
    public static final int COL_DESCRIPTION = 4;
    public static final int COL_STATUS = 5;
    public static final int COL_PRIORITY = 6;
    public static final int COL_ACTIVE = 7;
    private String[] columns = {"ID", "Name", "Date", "Number of jobs", "Description", "Status", "Priority", "Active"};
    private ArrayList<Experiment> experiments;
    private String[] status;

    public ExperimentTableModel() {
        this.experiments = new ArrayList<Experiment>();
    }

    public void setExperiments(ArrayList<Experiment> experiments) {
        this.experiments = experiments;
        status = new String[experiments.size()];
        this.fireTableDataChanged();
    }

    @Override
    public int getRowCount() {
        return experiments == null ? 0 : experiments.size();
    }

    @Override
    public int getColumnCount() {
        return columns.length;
    }

    @Override
    public String getColumnName(int col) {
        return columns[col];
    }

    @Override
    public Class getColumnClass(int col) {
        if (experiments == null || experiments.isEmpty()) {<commit_msg>bugfix<commit_after>package edacc.experiment;

import javax.swing.table.AbstractTableModel;
import java.util.ArrayList;
import edacc.model.Experiment;
import edacc.model.ExperimentDAO;
import java.sql.SQLException;

public class ExperimentTableModel extends AbstractTableModel {

    public static final int COL_ID = 0;
    public static final int COL_NAME = 1;
    public static final int COL_DATE = 2;
    public static final int COL_NUMRUNS = 3;
    public static final int COL_DESCRIPTION = 4;
    public static final int COL_STATUS = 5;
    public static final int COL_PRIORITY = 6;
    public static final int COL_ACTIVE = 7;
    private String[] columns = {"ID", "Name", "Date", "Number of jobs", "Description", "Status", "Priority", "Active"};
    private ArrayList<Experiment> experiments;
    private String[] status;

    public ExperimentTableModel() {
        this.experiments = new ArrayList<Experiment>();
    }

    public void setExperiments(ArrayList<Experiment> experiments) {
        this.experiments = experiments;
        if (experiments != null) {
            status = new String[experiments.size()];
        }
        this.fireTableDataChanged();
    }

    @Override
    public int getRowCount() {
        return experiments == null ? 0 : experiments.size();
    }

    @Override
    public int getColumnCount() {
        return columns.length;
    }

    @Override
    public String getColumnName(int col) {
        return columns[col];
    }

    @Override
    public Class getColumnClass(int col) {
        if (experiments == null || experiments.isEmpty()) {
{'fraction_non_alphanumeric': 0.09520766773162939, 'fraction_numerical': 0.005750798722044728, 'mean_word_length': 3.248303934871099, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '520659', 'n_tokens_mistral': 877, 'n_tokens_neox': 840, 'n_words': 263}