<commit_before>package net.CraftRepo.Overwatch;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.bukkit.block.Block;
import org.bukkit.entity.Player;

public class RollbackThread extends Thread 
{
	private String target;
	private int rollbackID;
	@SuppressWarnings("unused")
	private ResultSet result;
	private Player sender;
	private String time;

	public RollbackThread(String target, Player sender)
	{
		this.target = target;
		this.sender = sender;
		Overwatchmain.config.load();
		try 
		{
			if (time == null)
			{
				rollbackID = MySQLConnection.sqlGet("SELECT * FROM ow_players WHERE 'player' = '" + target + "';").getInt("player");
				result = MySQLConnection.sqlGet("SELECT * FROM ow_block WHERE 'user_id' = '" + rollbackID + "';");
			}
			else
			{
				rollbackID = MySQLConnection.sqlGet("SELECT * FROM ow_players WHERE 'player' = '" + target + "';").getInt("player");
				result = MySQLConnection.sqlGet("SELECT * FROM ow_block WHERE 'user_id' = '" + rollbackID + "';");
			}
		} 
		catch (SQLException e) 
		{
			sender.sendMessage(Overwatchmain.logPrefix + "Error rolling player " + target + ". See console for details.");
			Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
			e.printStackTrace();
			this.interrupt();
		}
	}

	/**
	 * @param time the time to rollback
	 */
	public void setTime(String time)
	{
		this.time = time;
	}

	public void run()
	{	
		// Add Code to rollback the blocks. When done, make sure to result.close() to close the resultset and MySQLConnection.st.close() to close the statements!
		for(int i=1;i<=100;i++)
		{
			try 
			{
				result.next();
				Block temp = sender.getWorld().getBlockAt(result.getInt("x"), result.getInt("y"), result.getInt("z"));
				temp.setTypeIdAndData(result.getInt("item_id"), result.getByte("data"), false);
				if(result.isLast())
					break;
			} catch (SQLException e) 
			{
				sender.sendMessage(Overwatchmain.logPrefix + "Error rolling player " + target + ". See console for details.");
				Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
				e.printStackTrace();
				this.interrupt();
			}
		}
		try {
			if(result.isLast())
			{
				result.close();
				MySQLConnection.st.close();
				this.interrupt();
			}
		} catch (SQLException e) {
			sender.sendMessage(Overwatchmain.logPrefix + "Error rolling player " + target + ". See console for details.");
			Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
			e.printStackTrace();
			this.interrupt();
		}
	}
}
<commit_msg>Fixed formatting to meet our standards.<commit_after>package net.CraftRepo.Overwatch;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.bukkit.block.Block;
import org.bukkit.entity.Player;

public class RollbackThread extends Thread 
{
	private String target;
	private int rollbackID;
	private ResultSet result;
	private Player sender;
	private String time;

	public RollbackThread(String target, Player sender)
	{
		this.target = target;
		this.sender = sender;
		Overwatchmain.config.load();
		try 
		{
			if (time == null)
			{
				rollbackID = MySQLConnection.sqlGet("SELECT * FROM ow_players WHERE 'player' = '" + target + "';").getInt("player");
				result = MySQLConnection.sqlGet("SELECT * FROM ow_block WHERE 'user_id' = '" + rollbackID + "';");
			}
			else
			{
				rollbackID = MySQLConnection.sqlGet("SELECT * FROM ow_players WHERE 'player' = '" + target + "';").getInt("player");
				result = MySQLConnection.sqlGet("SELECT * FROM ow_block WHERE 'user_id' = '" + rollbackID + "';");
			}
		} 
		catch (SQLException e) 
		{
			sender.sendMessage(Overwatchmain.logPrefix + "Error rolling player " + target + ". See console for details.");
			Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
			e.printStackTrace();
			this.interrupt();
		}
	}

	/**
	 * @param time the time to rollback
	 */
	public void setTime(String time)
	{
		this.time = time;
	}

	public void run()
	{	
		// Add Code to rollback the blocks. When done, make sure to result.close() to close the resultset and MySQLConnection.st.close() to close the statements!
		for(int i=1;i<=100;i++)
		{
			try 
			{
				result.next();
				Block temp = sender.getWorld().getBlockAt(result.getInt("x"), result.getInt("y"), result.getInt("z"));
				temp.setTypeIdAndData(result.getInt("item_id"), result.getByte("data"), false);
				if(result.isLast())
				{
					break;
				}
			} 
			catch (SQLException e) 
			{
				sender.sendMessage(Overwatchmain.logPrefix + " Error rolling player " + target + ". See console for details.");
				Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
				e.printStackTrace();
				this.interrupt();
			}
		}
		try 
		{
			if(result.isLast())
			{
				result.close();
				MySQLConnection.st.close();
				this.interrupt();
			}
		}
		catch (SQLException e) 
		{
			sender.sendMessage(Overwatchmain.logPrefix + " Error rolling player " + target + ". See console for details.");
			Overwatchmain.log.warning(Overwatchmain.logPrefix + " Error accessing the MySQL DB.");
			e.printStackTrace();
			this.interrupt();
		}
	}
}

{'fraction_non_alphanumeric': 0.13948126801152738, 'fraction_numerical': 0.001536983669548511, 'mean_word_length': 3.6111603188662533, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2487102', 'n_tokens_mistral': 1901, 'n_tokens_neox': 1629, 'n_words': 388}