<commit_before>package fr.inria.jessy.benchmark.tpcc;

import fr.inria.jessy.Jessy;
import fr.inria.jessy.benchmark.tpcc.entities.*;
import fr.inria.jessy.store.*;
import fr.inria.jessy.transaction.*;

import java.util.*;

public class InsertData extends Transaction {
	
	public InsertData(Jessy jessy) throws Exception{
		super(jessy);
	}

	@Override
	public ExecutionHistory execute() {
		try {
			int i, j, k;
			Random rand = new Random();			
			String key;
			Warehouse wh = new Warehouse();
			
			District dis = new District();
			
			Customer cus = new Customer();
			
			Item it = new Item();
			
			/*for i  warehouses*/
			for(i=0; i<1; i++){			

				wh.setW_ID(Integer.toString(i));
				wh.setW_NAME("Warehouse"+i);
				wh.setW_TAX((int) rand.nextFloat());
				wh.setW_YTD((int) rand.nextFloat());
				key = "W_"+i;  /*W_id*/
				wh.setSecondaryKey(key); /*key = W_id*/
				write(wh);
				
				/*each warehouse has 10 district*/
				for(j=0; i<10; i++){
					
					dis.setD_ID(Integer.toString(j));
					dis.setD_W_ID(wh.getW_ID());
					dis.setD_NAME("D(istrict"+j);
					dis.setD_TAX((int) rand.nextFloat());
					dis.setD_YTD((int) rand.nextFloat());
					dis.setD_NEXT_O(1);
					<commit_msg>minor fix<commit_after>package fr.inria.jessy.benchmark.tpcc;

import fr.inria.jessy.Jessy;
import fr.inria.jessy.benchmark.tpcc.entities.*;
import fr.inria.jessy.transaction.*;

import java.util.*;

public class InsertData extends Transaction {
	
	public InsertData(Jessy jessy) throws Exception{
		super(jessy);
	}

	@Override
	public ExecutionHistory execute() {
		try {
			int i, j, k;
			Random rand = new Random();			
			String key;
			Warehouse wh = new Warehouse();
			
			District dis = new District();
			
			Customer cus = new Customer();
			
			Item it = new Item();
			
			/*for i  warehouses*/
			for(i=0; i<1; i++){			

				wh.setW_ID(Integer.toString(i));
				wh.setW_NAME("Warehouse"+i);
				wh.setW_TAX((int) rand.nextFloat());
				wh.setW_YTD((int) rand.nextFloat());
				key = "W_"+i;  /*W_id*/
				wh.setSecondaryKey(key); /*key = W_id*/
				write(wh);
				
				/*each warehouse has 10 district*/
				for(j=0; i<10; i++){
					
					dis.setD_ID(Integer.toString(j));
					dis.setD_W_ID(wh.getW_ID());
					dis.setD_NAME("District"+j);
					dis.setD_TAX((int) rand.nextFloat());
					dis.setD_YTD((int) rand.nextFloat());
					dis.setD_NEXT_O(1);
					
{'fraction_non_alphanumeric': 0.16176470588235295, 'fraction_numerical': 0.0067226890756302525, 'mean_word_length': 3.035593220338983, 'pattern_counts': {'":': 0, '<': 7, '<?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': '412588', 'n_tokens_mistral': 1125, 'n_tokens_neox': 898, 'n_words': 177}