<commit_before>pragma solidity ^0.4.11;

import "./mortal.sol";
import "./Storage.sol";

/// @title Embassy contract
/// version 0.1
/// Embassies are assigned to a country and can create Visa Offerings
/// and grant Visa.
contract Embassy is owned, mortal {
    address usedStorage;
    address nationCtrl;

    mapping (address => uint) embassiesOfCountry;

    modifier onlyEmbassy() {
        require(embassiesOfCountry[msg.sender] != 0);
        _;
    }

    modifier onlyNation() {
        require(msg.sender == nationCtrl);
        _;
    }

    function Embassy() {
        usedStorage = '0x008aB18490E729bBea993817E0c2B3c19c877115';
    }
    function setStorage(address _store) onlyOwner() returns (bool) {
        usedStorage = _store;
        return true;
    }

    function setNation(address _nation) onlyOwner() returns (bool) {
        nationCtrl = _nation;
        return true;
    }
}<commit_msg>createVisaOffering & verifyPass<commit_after>pragma solidity ^0.4.11;

import "./mortal.sol";
import "./Storage.sol";

/// @title Embassy contract
/// version 0.1
/// Embassies are assigned to a country and can create Visa Offerings
/// and grant Visa.
contract Embassy is owned, mortal {
    address usedStorage;
    address nationCtrl;

    mapping (address => uint) embassiesOfCountry;

    modifier onlyEmbassy() {
        require(embassiesOfCountry[msg.sender] != 0);
        _;
    }

    modifier onlyNation() {
        require(msg.sender == nationCtrl);
        _;
    }

    function Embassy() {
        usedStorage = '0x008aB18490E729bBea993817E0c2B3c19c877115';
    }
    function setStorage(address _store) onlyOwner() returns (bool) {
        usedStorage = _store;
        return true;
    }

    function setNation(address _nation) onlyOwner() returns (bool) {
        nationCtrl = _nation;
        return true;
    }

    function createVisaOffering(uint _country, bytes32 _identifier, string _description, uint _validity, uint _price, string _conditions) {
        require(embassiesOfCountry[msg.sender] == _country);
        Storage(usedStorage).createVisaOffering( _country, _identifier, _description, _validity, _price, _conditions);

    }

    function verifyPass(address _owner, bytes32 _hashedPassport) {
        var (,h,) = Storage(usedStorage).passByOwner(owner);
        require(bytes32 (h) == _hashedPassport);
        Storage(usedStorage).updatePassport(_owner, _hashedPassport, true);
    }
}
{'fraction_non_alphanumeric': 0.10509031198686371, 'fraction_numerical': 0.03201970443349754, 'mean_word_length': 3.014827018121911, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '314131', 'n_tokens_mistral': 800, 'n_tokens_neox': 730, 'n_words': 179}