<commit_before>contract FamilyResourceControl{
    
    uint public contractStart = 1462744800; // represents 05/09/2016 00:00:00, use e.g. http://www.timestampconvert.com/ to get your start timestamp
    uint public renewalPeriod = 7; // in days
    uint public requiredMarbles = 2; // of each type, every period
    uint public requiredExtraMarbles = 10; // number of extra marbles required for redeeming
    uint[] allowedDays = [1, 4]; // array of days on which the ressource may be used in the following period. If the Contract starts on Monday 00:00, day 0 is monday, day 6 is sunday.

    struct Child {
        uint indianredMarbles; // vocabulary
        uint skyblueMarbles; // instrument 
        uint neonMarbles; // represent extra credit
    }
    
    struct Parent {
        bool canAward; 
    }
    
    address responsibleParent; // this is the owner of the contract
    
    mapping(address => Child) children;
    mapping(address => Parent) parents;
    
    
    // modifiers
    modifier onlyOwner {
        if (msg.sender != responsibleParent)
            throw;
        _
    }
    
    modifier onlyParent {
        if (!parents[msg.sender].canAward)
            throw;
        _
    }
    
    // constructor
    function FamilyResourceControl(){
        responsibleParent = msg.sender; // this is the creator of the contract and the one authorized to add other parents
        parents[responsibleParent].canAward = true;
    }
    
    // cumulative required marbles
    function cumReqMarbles() returns(uint) {
        return ((now - contractStart)/(renewalPeriod * 1 days))*requiredMarbles;
    }
    
    // calculate current day of week (first day => day 0)
    function currentDay() returns(uint){
        return ((now - contractStart)/ 1 days) % (renewalPeriod);
    }
    
    // award a marble
    function awardMarble(bytes32 whatMarble, address goodChild) onlyParent {
        if (whatMarble == "indianredMarble") {
            if (children[goodChild].indianredMarbles >= cumReqMarbles()+2){
                children[goodChild].neonMarbles++;
            } else {
                children[goodChild].indianredMarbles++;
            }
        } else if (whatMarble == "skyblueMarble"){
            if (children[goodChild].skyblueMarbles >= cumReqMarbles()+2){
                children[goodChild].neonMarbles++;
            } else {<commit_msg>revert marble identification to uid<commit_after>contract FamilyResourceControl{
    
    uint public contractStart = 1462744800; // represents 05/09/2016 00:00:00, use e.g. http://www.timestampconvert.com/ to get your start timestamp
    uint public renewalPeriod = 7; // in days
    uint public requiredMarbles = 2; // of each type, every period
    uint public requiredExtraMarbles = 10; // number of extra marbles required for redeeming
    uint[] allowedDays = [1, 4]; // array of days on which the ressource may be used in the following period. If the Contract starts on Monday 00:00, day 0 is monday, day 6 is sunday.

    struct Child {
        uint indianredMarbles; // vocabulary
        uint skyblueMarbles; // instrument 
        uint neonMarbles; // represent extra credit
    }
    
    struct Parent {
        bool canAward; 
    }
    
    address responsibleParent; // this is the owner of the contract
    
    mapping(address => Child) children;
    mapping(address => Parent) parents;
    
    
    // modifiers
    modifier onlyOwner {
        if (msg.sender != responsibleParent)
            throw;
        _
    }
    
    modifier onlyParent {
        if (!parents[msg.sender].canAward)
            throw;
        _
    }
    
    // constructor
    function FamilyResourceControl(){
        responsibleParent = msg.sender; // this is the creator of the contract and the one authorized to add other parents
        parents[responsibleParent].canAward = true;
    }
    
    // cumulative required marbles
    function cumReqMarbles() returns(uint) {
        return ((now - contractStart)/(renewalPeriod * 1 days))*requiredMarbles;
    }
    
    // calculate current day of week (first day => day 0)
    function currentDay() returns(uint){
        return ((now - contractStart)/ 1 days) % (renewalPeriod);
    }
    
    // award a marble
    function awardMarble(uint whatMarble, address goodChild) onlyParent {
        if (whatMarble == 0) {
            if (children[goodChild].indianredMarbles >= cumReqMarbles()+2){
                children[goodChild].neonMarbles++;
            } else {
                children[goodChild].indianredMarbles++;
            }
        } else if (whatMarble == 1){
            if (children[goodChild].skyblueMarbles >= cumReqMarbles()+2){
                children[goodChild].neonMarbles++;
            } else {
{'fraction_non_alphanumeric': 0.09096651926721415, 'fraction_numerical': 0.018109075594862075, 'mean_word_length': 2.2781228433402347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1973127', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1249, 'n_words': 400}