<commit_before>package kr.ac.kaist.se;

import com.opencsv.CSVWriter;
import kr.ac.kaist.se.mc.BaseChecker;
import kr.ac.kaist.se.simulator.DebugTick;
import kr.ac.kaist.se.simulator.NormalDistributor;
import kr.ac.kaist.se.simulator.SIMResult;
import kr.ac.kaist.se.simulator.Simulator;
import kr.ac.kaist.se.simulator.method.SPRTMethod;
import mci.SMCResult;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Executor.java
 * Author: <NAME> <<EMAIL>>
 * <p>
 * Simulation Executor class
 * <p>
 * The MIT License (MIT)
 * <p>
 * Copyright (c) 2016 <NAME>
 * <p>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions: TBD
 */

public class Executor {

    public static double[] ARR_ALPHA_BETA = {0.001};

    public static void Perform_Experiment(NormalDistributor distributor, Simulator sim, String caseName, int bound) throws IOException {

        int endTick = 6000;
        for (double alpha_beta : ARR_ALPHA_BETA) {
            Date nowDate = new Date();
            SimpleDateFormat transFormat = new SimpleDateFormat("yyyyMMddHHmmss");
            String pre = transFormat.format(nowDate);

            for (int trial = 1; trial <= 3; trial++) {

                System.out.println("----------------------------------------------------");
                System.out.println("SoS-level benefit is greater than and equal to " + bound + ".");

                BaseChecker checker = new BaseChecker(endTick, bound, BaseChecker.comparisonType.GREATER_THAN_AND_EQUAL_TO);
                SPRTMethod sprt = new SPRTMethod(alpha_beta, alpha_beta, 0.01); // 신뢰도 99%
                ArrayList<SMCResult> resList = new ArrayList<>();
//        int thetaSet[] = {70,90,95,99};

                for (int t = 1; t < 100; t++) {
                    double theta = 0.01 * t; // theta
                    long start = System.currentTimeMillis();
                    sprt.setExpression(theta);

                    while (!sprt.checkStopCondition()) {
<commit_msg>Before merging<commit_after>package kr.ac.kaist.se;

import com.opencsv.CSVWriter;
import kr.ac.kaist.se.mc.BaseChecker;
import kr.ac.kaist.se.simulator.DebugTick;
import kr.ac.kaist.se.simulator.NormalDistributor;
import kr.ac.kaist.se.simulator.SIMResult;
import kr.ac.kaist.se.simulator.Simulator;
import kr.ac.kaist.se.simulator.method.SPRTMethod;
import mci.SMCResult;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.text.SimpleDateFormat;
import java.util.*;

/**
 * Executor.java
 * Author: <NAME> <<EMAIL>>
 * <p>
 * Simulation Executor class
 * <p>
 * The MIT License (MIT)
 * <p>
 * Copyright (c) 2016 <NAME>
 * <p>
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions: TBD
 */

public class Executor {

    public static double[] ARR_ALPHA_BETA = {0.001};

    public static void Perform_Experiment(NormalDistributor distributor, Simulator sim, String caseName, int bound) throws IOException {

        int endTick = 6000;
        for (double alpha_beta : ARR_ALPHA_BETA) {
            Date nowDate = new Date();
            SimpleDateFormat transFormat = new SimpleDateFormat("yyyyMMddHHmmss");
            String pre = transFormat.format(nowDate);

            for (int trial = 1; trial <= 3; trial++) {

                System.out.println("----------------------------------------------------");
                System.out.println("SoS-level benefit is greater than and equal to " + bound + ".");

                BaseChecker checker = new BaseChecker(endTick, bound, BaseChecker.comparisonType.GREATER_THAN_AND_EQUAL_TO);
                SPRTMethod sprt = new SPRTMethod(alpha_beta, alpha_beta, 0.01); // 신뢰도 99%
                ArrayList<SMCResult> resList = new ArrayList<>();
//        int thetaSet[] = {70,90,95,99};

                for (int t = 80; t < 81; t++) {
                    double theta = 0.01 * t; // theta
                    long start = System.currentTimeMillis();
                    sprt.setExpression(theta);

                    while (!sprt.checkStopCondition()) {

{'fraction_non_alphanumeric': 0.1262944162436548, 'fraction_numerical': 0.013807106598984771, 'mean_word_length': 2.7093373493975905, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 23, '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': '3942935', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1413, 'n_words': 419}