<commit_before>import sys
import random
import math
import matplotlib.pyplot as plt

#Constants
CYCLES = 10 ** 4

class EnvironmentData():
    #Defs
    __ENVIRONMENT_LIST = None
    __SIZE = 1000
    __LOW_VALUE = 1
    __HIGH_VALUE = 100
    
    def __init__(self):
        self.__generateData()
        self.__sort()
    
    def getEnvironmentList(self):
        return self.__ENVIRONMENT_LIST

    def __generateData(self):
        self.__ENVIRONMENT_LIST = list()
        
        for i in xrange(EnvironmentData.__SIZE):
             self.__ENVIRONMENT_LIST.append((random.randint(EnvironmentData.__LOW_VALUE, EnvironmentData.__HIGH_VALUE),\
                                             random.randint(EnvironmentData.__LOW_VALUE, EnvironmentData.__HIGH_VALUE)))

    def __sort(self):
        self.__ENVIRONMENT_LIST.sort()
        
    @staticmethod
    def getLow():
        return EnvironmentData.__LOW_VALUE

    @staticmethod
    def getHigh():
        return EnvironmentData.__HIGH_VALUE

class Mutation:
    #Defs
    __ENVIRONMENT_LIST = None
    
    def __init__(self, env_list):
        self.__ENVIRONMENT_LIST = env_list 
        self.__hit_set = set()
        self.__equal_node = None
        self.__height = random.randint(EnvironmentData.getLow(), EnvironmentData.getHigh())
        self.__inclination = random.randint(EnvironmentData.getLow(), EnvironmentData.getHigh())
        self.__checkSurvivalRate()
    
    def race(self, mutation):
        self_survival_rate = self.getSurvivalRate()
        mutation_survival_rate = mutation.getSurvivalRate()
        
        print "race m1:%d vs m2:%d" % (self_survival_rate, mutation_survival_rate)
        if mutation_survival_rate > self_survival_rate:
            self.__equal_node = None
            return mutation
        
        if mutation_survival_rate == self_survival_rate:
            self.__equal_node = mutation
        
        del mutation
        return self
        <commit_msg>Changed print message and some field names.<commit_after>import sys
import random
import math
import matplotlib.pyplot as plt

#Constants
CYCLES = 10 ** 4

class EnvironmentData():
    #Defs
    __ENVIRONMENT_LIST = None
    __NUMBER_OF_POINTS = 1000
    __LOW_BOUND = 1
    __HIGH_BOUND = 100
    
    def __init__(self):
        self.__generateData()
        self.__sort()
    
    def getEnvironmentList(self):
        return self.__ENVIRONMENT_LIST

    def __generateData(self):
        self.__ENVIRONMENT_LIST = list()
        
        for i in xrange(EnvironmentData.__NUMBER_OF_POINTS):
             self.__ENVIRONMENT_LIST.append((random.randint(EnvironmentData.__LOW_BOUND, EnvironmentData.__HIGH_BOUND),\
                                             random.randint(EnvironmentData.__LOW_BOUND, EnvironmentData.__HIGH_BOUND)))

    def __sort(self):
        self.__ENVIRONMENT_LIST.sort()
        
    @staticmethod
    def getLow():
        return EnvironmentData.__LOW_BOUND

    @staticmethod
    def getHigh():
        return EnvironmentData.__HIGH_BOUND

class Mutation:
    #Defs
    __ENVIRONMENT_LIST = None
    
    def __init__(self, env_list):
        self.__ENVIRONMENT_LIST = env_list 
        self.__hit_set = set()
        self.__equal_node = None
        self.__height = random.randint(EnvironmentData.getLow(), EnvironmentData.getHigh())
        self.__inclination = random.randint(EnvironmentData.getLow(), EnvironmentData.getHigh())
        self.__checkSurvivalRate()
    
    def race(self, mutation):
        self_survival_rate = self.getSurvivalRate()
        mutation_survival_rate = mutation.getSurvivalRate()
        
        print "race m1 hit %d points and m2 hit %d points" % (self_survival_rate, mutation_survival_rate)
        if mutation_survival_rate > self_survival_rate:
            self.__equal_node = None
            return mutation
        
        if mutation_survival_rate == self_survival_rate:
            self.__equal_node = mutation
        
        del mutation
        return self
        
{'fraction_non_alphanumeric': 0.07450784948916023, 'fraction_numerical': 0.00647894343384002, 'mean_word_length': 2.4543889845094666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2952261', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1144, 'n_words': 230}