<commit_before>package com.ffxivcensus.gatherer;

import com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException;

/**
 * Gatherer worker class that implements Runnable class.
 * <p>
 * A worker that executes parses and writes the corresponding player record to the DB.
 *
 * @author <NAME>
 * @see Player
 * @see GathererController
 */
public class Gatherer implements Runnable {

    /**
     * Default constructor
     */
    public Gatherer() {
    }

    /**
     * Run the Gatherer.
     */
    public void run() {
        int nextID = GathererController.getNextID();
        while (nextID != -1) { //While we still have IDs to parse
            boolean successfulWrite = false;
            while (!successfulWrite){ //Keep looping until record is successfully written
                try {
                    //Parse players and write them to DB
                    GathererController.writeToDB(Player.getPlayer(nextID));
                    successfulWrite = true;
                } catch (MySQLNonTransientConnectionException failWriteEx) { //If record fails to write due to too many connections
                    successfulWrite = false;
                    //Wait a second
                    try {
                        Thread.currentThread().wait(1);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                } catch (Exception e) {
                    successfulWrite = true;
                    System.out.println(e.getMessage());
                }
            }
            //Get the nextID
            nextID = GathererController.getNextID();
        }
    }

}

<commit_msg>Disabled record not found debug line<commit_after>package com.ffxivcensus.gatherer;

import com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException;

/**
 * Gatherer worker class that implements Runnable class.
 * <p>
 * A worker that executes parses and writes the corresponding player record to the DB.
 *
 * @author <NAME>
 * @see Player
 * @see GathererController
 */
public class Gatherer implements Runnable {

    /**
     * Default constructor
     */
    public Gatherer() {
    }

    /**
     * Run the Gatherer.
     */
    public void run() {
        int nextID = GathererController.getNextID();
        while (nextID != -1) { //While we still have IDs to parse
            boolean successfulWrite = false;
            while (!successfulWrite){ //Keep looping until record is successfully written
                try {
                    //Parse players and write them to DB
                    GathererController.writeToDB(Player.getPlayer(nextID));
                    successfulWrite = true;
                } catch (MySQLNonTransientConnectionException failWriteEx) { //If record fails to write due to too many connections
                    successfulWrite = false;
                    //Wait a second
                    try {
                        Thread.currentThread().wait(1);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                } catch (Exception e) {
                    successfulWrite = true;
                    //System.out.println(e.getMessage());
                }
            }
            //Get the nextID
            nextID = GathererController.getNextID();
        }
    }

}


{'fraction_non_alphanumeric': 0.0825228411435308, 'fraction_numerical': 0.0011788977306218685, 'mean_word_length': 1.5908396946564884, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1549607', 'n_tokens_mistral': 847, 'n_tokens_neox': 829, 'n_words': 241}