code
stringlengths
1
1.49M
file_id
stringlengths
42
46
node_count
int64
0
7.38k
total_lines
int64
1
20.9k
vector_dim
int64
15
15
vector_labels
stringclasses
1 value
nodes
stringlengths
2
3.75M
connections
stringlengths
2
964k
# -*- coding: utf-8 -*- from django.http import HttpRequest class RegisterVars(dict): """ This class provides a simplified mechanism to build context processors that only add variables or functions without processing a request. Your module should have a global instance of this class called 'register'. You can then add the 'register' variable as a context processor in your settings.py. How to use: >>> register = RegisterVars() >>> def func(): ... pass >>> register(func) # doctest:+ELLIPSIS <function func at ...> >>> @register ... def otherfunc(): ... pass >>> register['otherfunc'] is otherfunc True Alternatively you can specify the name of the function with either of: def func(...): ... register(func, 'new_name') @register('new_name') def ... You can even pass a dict or RegisterVars instance: register(othermodule.register) register({'myvar': myvar}) """ def __call__(self, item=None, name=None): # Allow for using a RegisterVars instance as a context processor if isinstance(item, HttpRequest): return self if name is None and isinstance(item, basestring): # @register('as_name') # first param (item) contains the name name, item = item, name elif name is None and isinstance(item, dict): # register(somedict) or register(othermodule.register) return self.update(item) if item is None and isinstance(name, basestring): # @register(name='as_name') return lambda func: self(func, name) self[name or item.__name__] = item return item
ajibawa-2023/Python-Code-Large/train/row_251
14
51
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_251:ImportFrom_L2_C0", "label": "from django.http import HttpRequest", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0392, 0.0196, 0, 0.66, 0.0, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import_names": ["HttpRequest"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.http import HttpRequest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:ClassDef_L4_C0", "label": "RegisterVars", "type": "class", "loc": [4, 51], "level": 0, "parent": null, "vector": [3, 0, 0.5392, 0.9412, 0, 0.66, 1.0, 391, 0, 1, 0, 0, 827, 0, 6], "semantic": {"name": "RegisterVars", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RegisterVars(dict):\n \"\"\"\n This class provides a simplified mechanism to build context processors\n that only add variables or functions without processing a request.\n \n Your module should have a global instance of this class called 'register'.\n You can then add the 'register' variable as a context processor in your\n settings.py."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Expr_L5_C4", "label": "expression", "type": "expression", "loc": [5, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:ClassDef_L4_C0", "vector": [8, 1, 0.402, 0.6275, 1, 0.97, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This class provides a simplified mechanism to build context processors\n that only add variables or functions without processing a request.\n \n Your module should have a global instance of this class called 'register'.\n You can then add the 'register' variable as a context processor in your\n settings.py.\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "label": "__call__", "type": "function", "loc": [37, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:ClassDef_L4_C0", "vector": [2, 1, 0.8627, 0.2941, 1, 0.97, 1.0, 319, 0, 3, 1, 0, 0, 0, 6], "semantic": {"name": "__call__", "arg_names": ["self", "item", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __call__(self, item=None, name=None):\n # Allow for using a RegisterVars instance as a context processor\n if isinstance(item, HttpRequest):\n return self\n if name is None and isinstance(item, basestring):\n # @register('as_name') # first param (item) contains the name\n name, item = item, name\n elif name is None and isinstance(item, dict):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:If_L39_C8", "label": "if", "type": "if", "loc": [39, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "vector": [4, 2, 0.7745, 0.0392, 2, 0.58, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(item, HttpRequest):\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L40_C12", "label": "return", "type": "return", "loc": [40, 40], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:If_L39_C8", "vector": [13, 3, 0.7843, 0.0196, 3, 0.5, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8", "label": "if", "type": "if", "loc": [41, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "vector": [4, 2, 0.8529, 0.1176, 2, 0.58, 0.25, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name is None and isinstance(item, basestring):\n # @register('as_name') # first param (item) contains the name\n name, item = item, name\n elif name is None and isinstance(item, dict):\n # register(somedict) or register(othermodule.register)\n return self.update(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Assign_L43_C12", "label": "name, item =", "type": "assigned_variable", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8", "vector": [14, 3, 0.8431, 0.0196, 3, 0.56, 0.0, 587, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "name, item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " name, item = item, name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:If_L44_C8", "label": "if", "type": "if", "loc": [44, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8", "vector": [4, 3, 0.8824, 0.0588, 3, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif name is None and isinstance(item, dict):\n # register(somedict) or register(othermodule.register)\n return self.update(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L46_C12", "label": "return", "type": "return", "loc": [46, 46], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:If_L44_C8", "vector": [13, 4, 0.902, 0.0196, 4, 0.32, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.update(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:If_L47_C8", "label": "if", "type": "if", "loc": [47, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "vector": [4, 2, 0.9412, 0.0588, 2, 0.58, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if item is None and isinstance(name, basestring):\n # @register(name='as_name')\n return lambda func: self(func, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L49_C12", "label": "return", "type": "return", "loc": [49, 49], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:If_L47_C8", "vector": [13, 3, 0.9608, 0.0196, 3, 0.84, 0.0, 0, 9, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return lambda func: self(func, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Assign_L50_C8", "label": "assign", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "vector": [14, 2, 0.9804, 0.0196, 2, 0.58, 0.75, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self[name or item.__name__] = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L51_C8", "label": "return", "type": "return", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "vector": [13, 2, 1.0, 0.0196, 2, 0.58, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return item"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_251:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Expr_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_251:If_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Assign_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_251:If_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:If_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L46_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_251:If_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L49_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_251:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_251:Return_L51_C8"}]
# -*- coding: utf-8 -*- from appenginepatcher import on_production_server, have_appserver import os DEBUG = not on_production_server # The MEDIA_VERSION will get integrated via %d MEDIA_URL = '/media/%d/' # The MEDIA_URL will get integrated via %s ADMIN_MEDIA_PREFIX = '%sadmin_media/' ADMINS = () DATABASE_ENGINE = 'appengine' DATABASE_SUPPORTS_TRANSACTIONS = False # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = 'user' EMAIL_HOST_PASSWORD = 'password' EMAIL_USE_TLS = True DEFAULT_FROM_EMAIL = 'user@localhost' SERVER_EMAIL = 'user@localhost' LOGIN_REQUIRED_PREFIXES = () NO_LOGIN_REQUIRED_PREFIXES = () ROOT_URLCONF = 'urls' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'ragendja.template.app_prefixed_loader', 'django.template.loaders.app_directories.load_template_source', ) PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(__file__)))) COMMON_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) MAIN_DIRS = (PROJECT_DIR, COMMON_DIR) TEMPLATE_DIRS = tuple([os.path.join(dir, 'templates') for dir in MAIN_DIRS]) LOCALE_PATHS = ( os.path.join(PROJECT_DIR, 'media', 'locale'), ) + tuple([os.path.join(dir, 'locale') for dir in TEMPLATE_DIRS]) FILE_UPLOAD_HANDLERS = ( 'django.core.files.uploadhandler.MemoryFileUploadHandler', ) CACHE_BACKEND = 'memcached://?timeout=0' COMBINE_MEDIA = {} if not on_production_server: INTERNAL_IPS = ('127.0.0.1',) IGNORE_APP_SETTINGS = ()
ajibawa-2023/Python-Code-Large/train/row_252
31
61
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_252:ImportFrom_L2_C0", "label": "from appenginepatcher import on_production_server, have_appserver", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0328, 0.0164, 0, 0.66, 0.0, 519, 0, 2, 0, 0, 519, 0, 0], "semantic": {"name": "appenginepatcher", "arg_names": [], "import_names": ["on_production_server", "have_appserver"], "rhs_call_name": "", "annotation": ""}, "snippet": "from appenginepatcher import on_production_server, have_appserver"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0492, 0.0164, 0, 0.66, 0.0345, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L4_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0656, 0.0164, 0, 0.66, 0.069, 309, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEBUG = not on_production_server"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L7_C0", "label": "MEDIA_URL =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.1148, 0.0164, 0, 0.66, 0.1034, 120, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MEDIA_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MEDIA_URL = '/media/%d/'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L9_C0", "label": "ADMIN_MEDIA_PREFIX =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.1475, 0.0164, 0, 0.66, 0.1379, 396, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ADMIN_MEDIA_PREFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ADMIN_MEDIA_PREFIX = '%sadmin_media/'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L11_C0", "label": "ADMINS =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.1803, 0.0164, 0, 0.66, 0.1724, 223, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "ADMINS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ADMINS = ()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L13_C0", "label": "DATABASE_ENGINE =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.2131, 0.0164, 0, 0.66, 0.2069, 96, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DATABASE_ENGINE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DATABASE_ENGINE = 'appengine'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L14_C0", "label": "DATABASE_SUPPORTS_TRANSACTIONS =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.2295, 0.0164, 0, 0.66, 0.2414, 140, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "DATABASE_SUPPORTS_TRANSACTIONS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DATABASE_SUPPORTS_TRANSACTIONS = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L18_C0", "label": "USE_I18N =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.2951, 0.0164, 0, 0.66, 0.2759, 547, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "USE_I18N", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "USE_I18N = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L20_C0", "label": "EMAIL_HOST =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.3279, 0.0164, 0, 0.66, 0.3103, 55, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "EMAIL_HOST", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EMAIL_HOST = 'localhost'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L21_C0", "label": "EMAIL_PORT =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.3443, 0.0164, 0, 0.66, 0.3448, 267, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "EMAIL_PORT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EMAIL_PORT = 25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L22_C0", "label": "EMAIL_HOST_USER =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.3607, 0.0164, 0, 0.66, 0.3793, 88, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "EMAIL_HOST_USER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EMAIL_HOST_USER = 'user'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L23_C0", "label": "EMAIL_HOST_PASSWORD =", "type": "assigned_variable", "loc": [23, 23], "level": 0, "parent": null, "vector": [14, 0, 0.377, 0.0164, 0, 0.66, 0.4138, 772, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "EMAIL_HOST_PASSWORD", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EMAIL_HOST_PASSWORD = 'password'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L24_C0", "label": "EMAIL_USE_TLS =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.3934, 0.0164, 0, 0.66, 0.4483, 611, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "EMAIL_USE_TLS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "EMAIL_USE_TLS = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L25_C0", "label": "DEFAULT_FROM_EMAIL =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.4098, 0.0164, 0, 0.66, 0.4828, 396, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DEFAULT_FROM_EMAIL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_FROM_EMAIL = 'user@localhost'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L26_C0", "label": "SERVER_EMAIL =", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.4262, 0.0164, 0, 0.66, 0.5172, 177, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SERVER_EMAIL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SERVER_EMAIL = 'user@localhost'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L28_C0", "label": "LOGIN_REQUIRED_PREFIXES =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.459, 0.0164, 0, 0.66, 0.5517, 798, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "LOGIN_REQUIRED_PREFIXES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LOGIN_REQUIRED_PREFIXES = ()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L29_C0", "label": "NO_LOGIN_REQUIRED_PREFIXES =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.4754, 0.0164, 0, 0.66, 0.5862, 350, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "NO_LOGIN_REQUIRED_PREFIXES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "NO_LOGIN_REQUIRED_PREFIXES = ()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L31_C0", "label": "ROOT_URLCONF =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.5082, 0.0164, 0, 0.66, 0.6207, 281, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ROOT_URLCONF", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ROOT_URLCONF = 'urls'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L33_C0", "label": "TEMPLATE_LOADERS =", "type": "assigned_variable", "loc": [33, 37], "level": 0, "parent": null, "vector": [14, 0, 0.5738, 0.082, 0, 0.66, 0.6552, 473, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "TEMPLATE_LOADERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_LOADERS = (\n 'django.template.loaders.filesystem.load_template_source',\n 'ragendja.template.app_prefixed_loader',\n 'django.template.loaders.app_directories.load_template_source',\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L39_C0", "label": "PROJECT_DIR = dirname()", "type": "assigned_variable", "loc": [39, 40], "level": 0, "parent": null, "vector": [14, 0, 0.6475, 0.0328, 0, 0.66, 0.6897, 890, 3, 1, 0, 0, 959, 10, 4], "semantic": {"name": "PROJECT_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "dirname", "annotation": ""}, "snippet": "PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(\n os.path.dirname(__file__))))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L41_C0", "label": "COMMON_DIR = dirname()", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.6721, 0.0164, 0, 0.66, 0.7241, 676, 3, 1, 0, 0, 959, 10, 3], "semantic": {"name": "COMMON_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "dirname", "annotation": ""}, "snippet": "COMMON_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L42_C0", "label": "MAIN_DIRS =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.6885, 0.0164, 0, 0.66, 0.7586, 897, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "MAIN_DIRS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MAIN_DIRS = (PROJECT_DIR, COMMON_DIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L44_C0", "label": "TEMPLATE_DIRS = tuple()", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.7213, 0.0164, 0, 0.66, 0.7931, 910, 3, 1, 0, 0, 259, 10, 2], "semantic": {"name": "TEMPLATE_DIRS", "arg_names": [], "import_names": [], "rhs_call_name": "tuple", "annotation": ""}, "snippet": "TEMPLATE_DIRS = tuple([os.path.join(dir, 'templates') for dir in MAIN_DIRS])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L46_C0", "label": "LOCALE_PATHS =", "type": "assigned_variable", "loc": [46, 48], "level": 0, "parent": null, "vector": [14, 0, 0.7705, 0.0492, 0, 0.66, 0.8276, 801, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "LOCALE_PATHS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LOCALE_PATHS = (\n os.path.join(PROJECT_DIR, 'media', 'locale'),\n) + tuple([os.path.join(dir, 'locale') for dir in TEMPLATE_DIRS])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L50_C0", "label": "FILE_UPLOAD_HANDLERS =", "type": "assigned_variable", "loc": [50, 52], "level": 0, "parent": null, "vector": [14, 0, 0.8361, 0.0492, 0, 0.66, 0.8621, 216, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "FILE_UPLOAD_HANDLERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FILE_UPLOAD_HANDLERS = (\n 'django.core.files.uploadhandler.MemoryFileUploadHandler',\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L54_C0", "label": "CACHE_BACKEND =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.8852, 0.0164, 0, 0.66, 0.8966, 820, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CACHE_BACKEND", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CACHE_BACKEND = 'memcached://?timeout=0'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L56_C0", "label": "COMBINE_MEDIA =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.918, 0.0164, 0, 0.66, 0.931, 188, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "COMBINE_MEDIA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMBINE_MEDIA = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:If_L58_C0", "label": "if", "type": "if", "loc": [58, 59], "level": 0, "parent": null, "vector": [4, 0, 0.959, 0.0328, 0, 0.66, 0.9655, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not on_production_server:\n INTERNAL_IPS = ('127.0.0.1',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L59_C4", "label": "INTERNAL_IPS =", "type": "assigned_variable", "loc": [59, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_252:If_L58_C0", "vector": [14, 1, 0.9672, 0.0164, 1, 0.89, 0.0, 939, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "INTERNAL_IPS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " INTERNAL_IPS = ('127.0.0.1',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L61_C0", "label": "IGNORE_APP_SETTINGS =", "type": "assigned_variable", "loc": [61, 61], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0164, 0, 0.66, 1.0, 686, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "IGNORE_APP_SETTINGS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "IGNORE_APP_SETTINGS = ()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_252:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_252:Assign_L59_C4"}]
from django.conf import settings from django.http import HttpResponseServerError from ragendja.template import render_to_string def server_error(request, *args, **kwargs): debugkey = request.REQUEST.get('debugkey') if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None): import sys from django.views import debug return debug.technical_500_response(request, *sys.exc_info()) return HttpResponseServerError(render_to_string(request, '500.html')) def maintenance(request, *args, **kwargs): return HttpResponseServerError(render_to_string(request, 'maintenance.html'))
ajibawa-2023/Python-Code-Large/train/row_253
12
15
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_253:ImportFrom_L1_C0", "label": "from django.conf import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0667, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.conf import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:ImportFrom_L2_C0", "label": "from django.http import HttpResponseServerError", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0667, 0, 0.66, 0.25, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import_names": ["HttpResponseServerError"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.http import HttpResponseServerError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:ImportFrom_L3_C0", "label": "from ragendja.template import render_to_string", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0667, 0, 0.66, 0.5, 136, 0, 1, 0, 0, 136, 0, 0], "semantic": {"name": "ragendja.template", "arg_names": [], "import_names": ["render_to_string"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ragendja.template import render_to_string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "label": "server_error", "type": "function", "loc": [5, 11], "level": 0, "parent": null, "vector": [2, 0, 0.5333, 0.4667, 0, 0.66, 0.75, 247, 0, 3, 1, 0, 0, 0, 6], "semantic": {"name": "server_error", "arg_names": ["request", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def server_error(request, *args, **kwargs):\n debugkey = request.REQUEST.get('debugkey')\n if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None):\n import sys\n from django.views import debug\n return debug.technical_500_response(request, *sys.exc_info())\n return HttpResponseServerError(render_to_string(request, '500.html'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:Assign_L6_C4", "label": "debugkey = get()", "type": "assigned_variable", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "vector": [14, 1, 0.4, 0.0667, 1, 0.56, 0.0, 775, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "debugkey", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " debugkey = request.REQUEST.get('debugkey')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "label": "if", "type": "if", "loc": [7, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "vector": [4, 1, 0.5667, 0.2667, 1, 0.56, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if debugkey and debugkey == getattr(settings, 'DEBUGKEY', None):\n import sys\n from django.views import debug\n return debug.technical_500_response(request, *sys.exc_info())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:Import_L8_C8", "label": "sys import sys", "type": "import", "loc": [8, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "vector": [1, 2, 0.5333, 0.0667, 2, 0.12, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": " import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:ImportFrom_L9_C8", "label": "from django.views import debug", "type": "import", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "vector": [1, 2, 0.6, 0.0667, 2, 0.12, 0.5, 959, 0, 1, 0, 0, 959, 0, 0], "semantic": {"name": "django.views", "arg_names": [], "import_names": ["debug"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django.views import debug"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L10_C8", "label": "return", "type": "return", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "vector": [13, 2, 0.6667, 0.0667, 2, 0.12, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return debug.technical_500_response(request, *sys.exc_info())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L11_C4", "label": "return", "type": "return", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "vector": [13, 1, 0.7333, 0.0667, 1, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return HttpResponseServerError(render_to_string(request, '500.html'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L13_C0", "label": "maintenance", "type": "function", "loc": [13, 15], "level": 0, "parent": null, "vector": [2, 0, 0.9333, 0.2, 0, 0.66, 1.0, 40, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "maintenance", "arg_names": ["request", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def maintenance(request, *args, **kwargs):\n return HttpResponseServerError(render_to_string(request,\n 'maintenance.html'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L14_C4", "label": "return", "type": "return", "loc": [14, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L13_C0", "vector": [13, 1, 0.9667, 0.1333, 1, 0.33, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return HttpResponseServerError(render_to_string(request,\n 'maintenance.html'))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_253:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_253:Import_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_253:ImportFrom_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:If_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_253:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_253:Return_L14_C4"}]
# -*- coding: utf-8 -*- from django.conf import settings from django.utils.cache import patch_cache_control from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError from google.appengine.ext import db from ragendja.template import render_to_response from ragendja.views import server_error, maintenance LOGIN_REQUIRED_PREFIXES = getattr(settings, 'LOGIN_REQUIRED_PREFIXES', ()) NO_LOGIN_REQUIRED_PREFIXES = getattr(settings, 'NO_LOGIN_REQUIRED_PREFIXES', ()) class LoginRequiredMiddleware(object): """ Redirects to login page if request path begins with a LOGIN_REQURED_PREFIXES prefix. You can also specify NO_LOGIN_REQUIRED_PREFIXES which take precedence. """ def process_request(self, request): for prefix in NO_LOGIN_REQUIRED_PREFIXES: if request.path.startswith(prefix): return None for prefix in LOGIN_REQUIRED_PREFIXES: if request.path.startswith(prefix) and \ not request.user.is_authenticated(): from django.contrib.auth.views import redirect_to_login return redirect_to_login(request.get_full_path()) return None class NoHistoryCacheMiddleware(object): """ If user is authenticated we disable browser caching of pages in history. """ def process_response(self, request, response): if 'Expires' not in response and \ 'Cache-Control' not in response and \ hasattr(request, 'session') and \ request.user.is_authenticated(): patch_cache_control(response, no_store=True, no_cache=True, must_revalidate=True, max_age=0) return response class ErrorMiddleware(object): """Displays a default template on CapabilityDisabledError.""" def process_exception(self, request, exception): if isinstance(exception, CapabilityDisabledError): return maintenance(request) elif isinstance(exception, db.Timeout): return server_error(request)
ajibawa-2023/Python-Code-Large/train/row_254
32
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L2_C0", "label": "from django.conf import settings", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0208, 0, 0.66, 0.0, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "django.conf", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.conf import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L3_C0", "label": "from django.utils.cache import patch_cache_control", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0625, 0.0208, 0, 0.66, 0.1, 53, 0, 1, 0, 0, 53, 0, 0], "semantic": {"name": "django.utils.cache", "arg_names": [], "import_names": ["patch_cache_control"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.utils.cache import patch_cache_control"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L4_C0", "label": "from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0208, 0, 0.66, 0.2, 194, 0, 1, 0, 0, 194, 0, 0], "semantic": {"name": "google.appengine.runtime.apiproxy_errors", "arg_names": [], "import_names": ["CapabilityDisabledError"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.runtime.apiproxy_errors import CapabilityDisabledError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L5_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1042, 0.0208, 0, 0.66, 0.3, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [], "import_names": ["db"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext import db"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L6_C0", "label": "from ragendja.template import render_to_response", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0208, 0, 0.66, 0.4, 136, 0, 1, 0, 0, 136, 0, 0], "semantic": {"name": "ragendja.template", "arg_names": [], "import_names": ["render_to_response"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ragendja.template import render_to_response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L7_C0", "label": "from ragendja.views import server_error, maintenance", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1458, 0.0208, 0, 0.66, 0.5, 564, 0, 2, 0, 0, 564, 0, 0], "semantic": {"name": "ragendja.views", "arg_names": [], "import_names": ["server_error", "maintenance"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ragendja.views import server_error, maintenance"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Assign_L9_C0", "label": "LOGIN_REQUIRED_PREFIXES = getattr()", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.1875, 0.0208, 0, 0.66, 0.6, 798, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "LOGIN_REQUIRED_PREFIXES", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": "LOGIN_REQUIRED_PREFIXES = getattr(settings, 'LOGIN_REQUIRED_PREFIXES', ())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Assign_L10_C0", "label": "NO_LOGIN_REQUIRED_PREFIXES = getattr()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.2083, 0.0208, 0, 0.66, 0.7, 350, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "NO_LOGIN_REQUIRED_PREFIXES", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": "NO_LOGIN_REQUIRED_PREFIXES = getattr(settings, 'NO_LOGIN_REQUIRED_PREFIXES', ())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L12_C0", "label": "LoginRequiredMiddleware", "type": "class", "loc": [12, 27], "level": 0, "parent": null, "vector": [3, 0, 0.4062, 0.3333, 0, 0.66, 0.8, 12, 0, 1, 0, 0, 186, 0, 5], "semantic": {"name": "LoginRequiredMiddleware", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LoginRequiredMiddleware(object):\n \"\"\"\n Redirects to login page if request path begins with a\n LOGIN_REQURED_PREFIXES prefix. You can also specify\n NO_LOGIN_REQUIRED_PREFIXES which take precedence.\n \"\"\"\n def process_request(self, request):\n for prefix in NO_LOGIN_REQUIRED_PREFIXES:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L13_C4", "label": "expression", "type": "expression", "loc": [13, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L12_C0", "vector": [8, 1, 0.3125, 0.1042, 1, 0.49, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Redirects to login page if request path begins with a\n LOGIN_REQURED_PREFIXES prefix. You can also specify\n NO_LOGIN_REQUIRED_PREFIXES which take precedence.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "label": "process_request", "type": "function", "loc": [18, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L12_C0", "vector": [2, 1, 0.4688, 0.2083, 1, 0.49, 1.0, 81, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "process_request", "arg_names": ["self", "request"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process_request(self, request):\n for prefix in NO_LOGIN_REQUIRED_PREFIXES:\n if request.path.startswith(prefix):\n return None\n for prefix in LOGIN_REQUIRED_PREFIXES:\n if request.path.startswith(prefix) and \\\n not request.user.is_authenticated():\n from django.contrib.auth.views import redirect_to_login"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:For_L19_C8", "label": "for prefix", "type": "for", "loc": [19, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "vector": [6, 2, 0.4167, 0.0625, 2, 0.75, 0.0, 284, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "prefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for prefix in NO_LOGIN_REQUIRED_PREFIXES:\n if request.path.startswith(prefix):\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:If_L20_C12", "label": "if", "type": "if", "loc": [20, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:For_L19_C8", "vector": [4, 3, 0.4271, 0.0417, 3, 0.61, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if request.path.startswith(prefix):\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L21_C16", "label": "return", "type": "return", "loc": [21, 21], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L20_C12", "vector": [13, 4, 0.4375, 0.0208, 4, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:For_L22_C8", "label": "for prefix", "type": "for", "loc": [22, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "vector": [6, 2, 0.5, 0.1042, 2, 0.75, 0.5, 284, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "prefix", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for prefix in LOGIN_REQUIRED_PREFIXES:\n if request.path.startswith(prefix) and \\\n not request.user.is_authenticated():\n from django.contrib.auth.views import redirect_to_login\n return redirect_to_login(request.get_full_path())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12", "label": "if", "type": "if", "loc": [23, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:For_L22_C8", "vector": [4, 3, 0.5104, 0.0833, 3, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if request.path.startswith(prefix) and \\\n not request.user.is_authenticated():\n from django.contrib.auth.views import redirect_to_login\n return redirect_to_login(request.get_full_path())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L25_C16", "label": "from django.contrib.auth.views import redirect_to_login", "type": "import", "loc": [25, 25], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12", "vector": [1, 4, 0.5208, 0.0208, 4, 0.92, 0.0, 745, 0, 1, 0, 0, 745, 0, 0], "semantic": {"name": "django.contrib.auth.views", "arg_names": [], "import_names": ["redirect_to_login"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django.contrib.auth.views import redirect_to_login"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L26_C16", "label": "return", "type": "return", "loc": [26, 26], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12", "vector": [13, 4, 0.5417, 0.0208, 4, 0.92, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return redirect_to_login(request.get_full_path())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L27_C8", "label": "return", "type": "return", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "vector": [13, 2, 0.5625, 0.0208, 2, 0.75, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L29_C0", "label": "NoHistoryCacheMiddleware", "type": "class", "loc": [29, 40], "level": 0, "parent": null, "vector": [3, 0, 0.7188, 0.25, 0, 0.66, 0.9, 938, 0, 1, 0, 0, 186, 0, 3], "semantic": {"name": "NoHistoryCacheMiddleware", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class NoHistoryCacheMiddleware(object):\n \"\"\"\n If user is authenticated we disable browser caching of pages in history.\n \"\"\"\n def process_response(self, request, response):\n if 'Expires' not in response and \\\n 'Cache-Control' not in response and \\\n hasattr(request, 'session') and \\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L30_C4", "label": "expression", "type": "expression", "loc": [30, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L29_C0", "vector": [8, 1, 0.6458, 0.0625, 1, 0.03, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n If user is authenticated we disable browser caching of pages in history.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4", "label": "process_response", "type": "function", "loc": [33, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L29_C0", "vector": [2, 1, 0.7604, 0.1667, 1, 0.03, 1.0, 298, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "process_response", "arg_names": ["self", "request", "response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process_response(self, request, response):\n if 'Expires' not in response and \\\n 'Cache-Control' not in response and \\\n hasattr(request, 'session') and \\\n request.user.is_authenticated():\n patch_cache_control(response,\n no_store=True, no_cache=True, must_revalidate=True, max_age=0)\n return response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:If_L34_C8", "label": "if", "type": "if", "loc": [34, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4", "vector": [4, 2, 0.7604, 0.125, 2, 0.88, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'Expires' not in response and \\\n 'Cache-Control' not in response and \\\n hasattr(request, 'session') and \\\n request.user.is_authenticated():\n patch_cache_control(response,\n no_store=True, no_cache=True, must_revalidate=True, max_age=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L38_C12", "label": "patch_cache_control()", "type": "expression", "loc": [38, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L34_C8", "vector": [8, 3, 0.8021, 0.0417, 3, 0.25, 0.0, 84, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "patch_cache_control", "arg_names": [], "import_names": [], "rhs_call_name": "patch_cache_control", "annotation": ""}, "snippet": " patch_cache_control(response,\n no_store=True, no_cache=True, must_revalidate=True, max_age=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L40_C8", "label": "return", "type": "return", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4", "vector": [13, 2, 0.8333, 0.0208, 2, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return response"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L42_C0", "label": "ErrorMiddleware", "type": "class", "loc": [42, 48], "level": 0, "parent": null, "vector": [3, 0, 0.9375, 0.1458, 0, 0.66, 1.0, 729, 0, 1, 0, 0, 186, 0, 4], "semantic": {"name": "ErrorMiddleware", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ErrorMiddleware(object):\n \"\"\"Displays a default template on CapabilityDisabledError.\"\"\"\n def process_exception(self, request, exception):\n if isinstance(exception, CapabilityDisabledError):\n return maintenance(request)\n elif isinstance(exception, db.Timeout):\n return server_error(request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L43_C4", "label": "expression", "type": "expression", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L42_C0", "vector": [8, 1, 0.8958, 0.0208, 1, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Displays a default template on CapabilityDisabledError.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L44_C4", "label": "process_exception", "type": "function", "loc": [44, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L42_C0", "vector": [2, 1, 0.9583, 0.1042, 1, 0.41, 1.0, 751, 0, 3, 1, 0, 0, 0, 4], "semantic": {"name": "process_exception", "arg_names": ["self", "request", "exception"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process_exception(self, request, exception):\n if isinstance(exception, CapabilityDisabledError):\n return maintenance(request)\n elif isinstance(exception, db.Timeout):\n return server_error(request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8", "label": "if", "type": "if", "loc": [45, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L44_C4", "vector": [4, 2, 0.9688, 0.0833, 2, 0.85, 0.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(exception, CapabilityDisabledError):\n return maintenance(request)\n elif isinstance(exception, db.Timeout):\n return server_error(request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L46_C12", "label": "return", "type": "return", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8", "vector": [13, 3, 0.9583, 0.0208, 3, 0.38, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return maintenance(request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:If_L47_C8", "label": "if", "type": "if", "loc": [47, 48], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8", "vector": [4, 3, 0.9896, 0.0417, 3, 0.38, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(exception, db.Timeout):\n return server_error(request)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L48_C12", "label": "return", "type": "return", "loc": [48, 48], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_254:If_L47_C8", "vector": [13, 4, 1.0, 0.0208, 4, 0.27, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return server_error(request)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:For_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:For_L19_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:If_L20_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L20_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L21_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:For_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:For_L22_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_254:ImportFrom_L25_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L23_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L26_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:If_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L34_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:ClassDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:FunctionDef_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L46_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L45_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:If_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_254:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_254:Return_L48_C12"}]
# -*- coding: utf-8 -*- from settings import * import sys if '%d' in MEDIA_URL: MEDIA_URL = MEDIA_URL % MEDIA_VERSION if '%s' in ADMIN_MEDIA_PREFIX: ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL TEMPLATE_DEBUG = DEBUG MANAGERS = ADMINS # You can override Django's or some apps' locales with these folders: if os.path.exists(os.path.join(COMMON_DIR, 'locale_overrides_common')): INSTALLED_APPS += ('locale_overrides_common',) if os.path.exists(os.path.join(PROJECT_DIR, 'locale_overrides')): INSTALLED_APPS += ('locale_overrides',) # Add admin interface media files if necessary if 'django.contrib.admin' in INSTALLED_APPS: INSTALLED_APPS += ('django_aep_export.admin_media',) # Always add Django templates (exported from zip) INSTALLED_APPS += ( 'django_aep_export.django_templates', ) # Convert all COMBINE_MEDIA to lists for key, value in COMBINE_MEDIA.items(): if not isinstance(value, list): COMBINE_MEDIA[key] = list(value) # Add start markers, so apps can insert JS/CSS at correct position def add_app_media(combine, *appmedia): if on_production_server: return COMBINE_MEDIA.setdefault(combine, []) if '!START!' not in COMBINE_MEDIA[combine]: COMBINE_MEDIA[combine].insert(0, '!START!') index = COMBINE_MEDIA[combine].index('!START!') COMBINE_MEDIA[combine][index:index] = appmedia def add_uncombined_app_media(app): """Copy all media files directly""" if on_production_server: return path = os.path.join( os.path.dirname(__import__(app, {}, {}, ['']).__file__), 'media') app = app.rsplit('.', 1)[-1] for root, dirs, files in os.walk(path): for file in files: if file.endswith(('.css', '.js')): base = os.path.join(root, file)[len(path):].replace(os.sep, '/').lstrip('/') target = '%s/%s' % (app, base) add_app_media(target, target) if have_appserver or on_production_server: check_app_imports = None else: def check_app_imports(app): before = sys.modules.keys() __import__(app, {}, {}, ['']) after = sys.modules.keys() added = [key[len(app)+1:] for key in after if key not in before and key.startswith(app + '.') and key[len(app)+1:]] if added: import logging logging.warn('The app "%(app)s" contains imports in ' 'its __init__.py (at least %(added)s). This can cause ' 'strange bugs due to recursive imports! You should ' 'either do the import lazily (within functions) or ' 'ignore the app settings/urlsauto with ' 'IGNORE_APP_SETTINGS and IGNORE_APP_URLSAUTO in ' 'your settings.py.' % {'app': app, 'added': ', '.join(added)}) # Import app-specific settings _globals = globals() class _Module(object): def __setattr__(self, key, value): _globals[key] = value def __getattribute__(self, key): return _globals[key] def __hasattr__(self, key): return key in _globals settings = _Module() for app in INSTALLED_APPS: # This is an optimization. Django's apps don't have special settings. # Also, allow for ignoring some apps' settings. if app.startswith('django.') or app.endswith('.*') or \ app == 'appenginepatcher' or app in IGNORE_APP_SETTINGS: continue try: # First we check if __init__.py doesn't import anything if check_app_imports: check_app_imports(app) __import__(app + '.settings', {}, {}, ['']) except ImportError: pass # Remove start markers for key, value in COMBINE_MEDIA.items(): if '!START!' in value: value.remove('!START!') try: from settings_overrides import * except ImportError: pass
ajibawa-2023/Python-Code-Large/train/row_255
64
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_255:ImportFrom_L2_C0", "label": "from settings import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.018, 0.009, 0, 0.66, 0.0, 168, 0, 1, 0, 0, 168, 0, 0], "semantic": {"name": "settings", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from settings import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.027, 0.009, 0, 0.66, 0.0556, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L5_C0", "label": "if", "type": "if", "loc": [5, 6], "level": 0, "parent": null, "vector": [4, 0, 0.0495, 0.018, 0, 0.66, 0.1111, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if '%d' in MEDIA_URL:\n MEDIA_URL = MEDIA_URL % MEDIA_VERSION"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L6_C4", "label": "MEDIA_URL =", "type": "assigned_variable", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L5_C0", "vector": [14, 1, 0.0541, 0.009, 1, 0.52, 0.0, 120, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "MEDIA_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " MEDIA_URL = MEDIA_URL % MEDIA_VERSION"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L7_C0", "label": "if", "type": "if", "loc": [7, 8], "level": 0, "parent": null, "vector": [4, 0, 0.0676, 0.018, 0, 0.66, 0.1667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if '%s' in ADMIN_MEDIA_PREFIX:\n ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L8_C4", "label": "ADMIN_MEDIA_PREFIX =", "type": "assigned_variable", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L7_C0", "vector": [14, 1, 0.0721, 0.009, 1, 0.91, 0.0, 396, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ADMIN_MEDIA_PREFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ADMIN_MEDIA_PREFIX = ADMIN_MEDIA_PREFIX % MEDIA_URL"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L10_C0", "label": "TEMPLATE_DEBUG =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0901, 0.009, 0, 0.66, 0.2222, 7, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TEMPLATE_DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_DEBUG = DEBUG"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L11_C0", "label": "MANAGERS =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.0991, 0.009, 0, 0.66, 0.2778, 275, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "MANAGERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MANAGERS = ADMINS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L14_C0", "label": "if", "type": "if", "loc": [14, 15], "level": 0, "parent": null, "vector": [4, 0, 0.1306, 0.018, 0, 0.66, 0.3333, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if os.path.exists(os.path.join(COMMON_DIR, 'locale_overrides_common')):\n INSTALLED_APPS += ('locale_overrides_common',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L16_C0", "label": "if", "type": "if", "loc": [16, 17], "level": 0, "parent": null, "vector": [4, 0, 0.1486, 0.018, 0, 0.66, 0.3889, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if os.path.exists(os.path.join(PROJECT_DIR, 'locale_overrides')):\n INSTALLED_APPS += ('locale_overrides',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L20_C0", "label": "if", "type": "if", "loc": [20, 21], "level": 0, "parent": null, "vector": [4, 0, 0.1847, 0.018, 0, 0.66, 0.4444, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if 'django.contrib.admin' in INSTALLED_APPS:\n INSTALLED_APPS += ('django_aep_export.admin_media',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:For_L29_C0", "label": "for key, value", "type": "for", "loc": [29, 31], "level": 0, "parent": null, "vector": [6, 0, 0.2703, 0.027, 0, 0.66, 0.5556, 839, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "key, value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for key, value in COMBINE_MEDIA.items():\n if not isinstance(value, list):\n COMBINE_MEDIA[key] = list(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L30_C4", "label": "if", "type": "if", "loc": [30, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L29_C0", "vector": [4, 1, 0.2748, 0.018, 1, 0.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(value, list):\n COMBINE_MEDIA[key] = list(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L31_C8", "label": " = list()", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L30_C4", "vector": [14, 2, 0.2793, 0.009, 2, 0.49, 0.0, 0, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": " COMBINE_MEDIA[key] = list(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "label": "add_app_media", "type": "function", "loc": [34, 41], "level": 0, "parent": null, "vector": [2, 0, 0.3378, 0.0721, 0, 0.66, 0.6111, 197, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "add_app_media", "arg_names": ["combine", "appmedia"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def add_app_media(combine, *appmedia):\n if on_production_server:\n return\n COMBINE_MEDIA.setdefault(combine, [])\n if '!START!' not in COMBINE_MEDIA[combine]:\n COMBINE_MEDIA[combine].insert(0, '!START!')\n index = COMBINE_MEDIA[combine].index('!START!')\n COMBINE_MEDIA[combine][index:index] = appmedia"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L35_C4", "label": "if", "type": "if", "loc": [35, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "vector": [4, 1, 0.3198, 0.018, 1, 0.87, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if on_production_server:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L36_C8", "label": "return", "type": "return", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L35_C4", "vector": [13, 2, 0.3243, 0.009, 2, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L37_C4", "label": "setdefault()", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "vector": [8, 1, 0.3333, 0.009, 1, 0.87, 0.25, 262, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setdefault", "arg_names": [], "import_names": [], "rhs_call_name": "setdefault", "annotation": ""}, "snippet": " COMBINE_MEDIA.setdefault(combine, [])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L38_C4", "label": "if", "type": "if", "loc": [38, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "vector": [4, 1, 0.3468, 0.018, 1, 0.87, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '!START!' not in COMBINE_MEDIA[combine]:\n COMBINE_MEDIA[combine].insert(0, '!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L39_C8", "label": "insert()", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L38_C4", "vector": [8, 2, 0.3514, 0.009, 2, 0.43, 0.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " COMBINE_MEDIA[combine].insert(0, '!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L40_C4", "label": "index = index()", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "vector": [14, 1, 0.3604, 0.009, 1, 0.87, 0.75, 780, 3, 1, 0, 0, 780, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "index", "annotation": ""}, "snippet": " index = COMBINE_MEDIA[combine].index('!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L41_C4", "label": "assign", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "vector": [14, 1, 0.3694, 0.009, 1, 0.87, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " COMBINE_MEDIA[combine][index:index] = appmedia"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "label": "add_uncombined_app_media", "type": "function", "loc": [43, 56], "level": 0, "parent": null, "vector": [2, 0, 0.4459, 0.1261, 0, 0.66, 0.6667, 204, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "add_uncombined_app_media", "arg_names": ["app"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def add_uncombined_app_media(app):\n \"\"\"Copy all media files directly\"\"\"\n if on_production_server:\n return\n path = os.path.join(\n os.path.dirname(__import__(app, {}, {}, ['']).__file__), 'media')\n app = app.rsplit('.', 1)[-1]\n for root, dirs, files in os.walk(path):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L44_C4", "label": "expression", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "vector": [8, 1, 0.3964, 0.009, 1, 0.52, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Copy all media files directly\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L45_C4", "label": "if", "type": "if", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "vector": [4, 1, 0.4099, 0.018, 1, 0.52, 0.25, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if on_production_server:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L46_C8", "label": "return", "type": "return", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L45_C4", "vector": [13, 2, 0.4144, 0.009, 2, 0.45, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L47_C4", "label": "path = join()", "type": "assigned_variable", "loc": [47, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "vector": [14, 1, 0.4279, 0.018, 1, 0.52, 0.5, 358, 3, 2, 0, 0, 933, 10, 3], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " path = os.path.join(\n os.path.dirname(__import__(app, {}, {}, ['']).__file__), 'media')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L49_C4", "label": "app =", "type": "assigned_variable", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "vector": [14, 1, 0.4414, 0.009, 1, 0.52, 0.75, 494, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "app", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " app = app.rsplit('.', 1)[-1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:For_L50_C4", "label": "for root, dirs, files", "type": "for", "loc": [50, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "vector": [6, 1, 0.4775, 0.0631, 1, 0.52, 1.0, 129, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "root, dirs, files", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for root, dirs, files in os.walk(path):\n for file in files:\n if file.endswith(('.css', '.js')):\n base = os.path.join(root, file)[len(path):].replace(os.sep,\n '/').lstrip('/')\n target = '%s/%s' % (app, base)\n add_app_media(target, target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:For_L51_C8", "label": "for file", "type": "for", "loc": [51, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L50_C4", "vector": [6, 2, 0.482, 0.0541, 2, 0.06, 0.0, 107, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for file in files:\n if file.endswith(('.css', '.js')):\n base = os.path.join(root, file)[len(path):].replace(os.sep,\n '/').lstrip('/')\n target = '%s/%s' % (app, base)\n add_app_media(target, target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "label": "if", "type": "if", "loc": [52, 56], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L51_C8", "vector": [4, 3, 0.4865, 0.045, 3, 0.57, 0.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if file.endswith(('.css', '.js')):\n base = os.path.join(root, file)[len(path):].replace(os.sep,\n '/').lstrip('/')\n target = '%s/%s' % (app, base)\n add_app_media(target, target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L53_C16", "label": "base = lstrip()", "type": "assigned_variable", "loc": [53, 54], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "vector": [14, 4, 0.482, 0.018, 4, 0.73, 0.0, 47, 3, 1, 0, 0, 313, 10, 4], "semantic": {"name": "base", "arg_names": [], "import_names": [], "rhs_call_name": "lstrip", "annotation": ""}, "snippet": " base = os.path.join(root, file)[len(path):].replace(os.sep,\n '/').lstrip('/')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L55_C16", "label": "target =", "type": "assigned_variable", "loc": [55, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "vector": [14, 4, 0.4955, 0.009, 4, 0.73, 0.5, 766, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " target = '%s/%s' % (app, base)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L56_C16", "label": "add_app_media()", "type": "expression", "loc": [56, 56], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "vector": [8, 4, 0.5045, 0.009, 4, 0.73, 1.0, 197, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_app_media", "arg_names": [], "import_names": [], "rhs_call_name": "add_app_media", "annotation": ""}, "snippet": " add_app_media(target, target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L58_C0", "label": "if", "type": "if", "loc": [58, 76], "level": 0, "parent": null, "vector": [4, 0, 0.6036, 0.1712, 0, 0.66, 0.7222, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if have_appserver or on_production_server:\n check_app_imports = None\nelse:\n def check_app_imports(app):\n before = sys.modules.keys()\n __import__(app, {}, {}, [''])\n after = sys.modules.keys()\n added = [key[len(app)+1:] for key in after if key not in before and"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L59_C4", "label": "check_app_imports =", "type": "assigned_variable", "loc": [59, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L58_C0", "vector": [14, 1, 0.5315, 0.009, 1, 0.04, 0.0, 587, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "check_app_imports", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " check_app_imports = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "label": "check_app_imports", "type": "function", "loc": [61, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L58_C0", "vector": [2, 1, 0.6171, 0.1441, 1, 0.04, 1.0, 587, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "check_app_imports", "arg_names": ["app"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def check_app_imports(app):\n before = sys.modules.keys()\n __import__(app, {}, {}, [''])\n after = sys.modules.keys()\n added = [key[len(app)+1:] for key in after if key not in before and\n key.startswith(app + '.') and key[len(app)+1:]]\n if added:\n import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L62_C8", "label": "before = keys()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "vector": [14, 2, 0.5586, 0.009, 2, 0.87, 0.0, 255, 3, 0, 0, 0, 204, 10, 1], "semantic": {"name": "before", "arg_names": [], "import_names": [], "rhs_call_name": "keys", "annotation": ""}, "snippet": " before = sys.modules.keys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L63_C8", "label": "__import__()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "vector": [8, 2, 0.5676, 0.009, 2, 0.87, 0.25, 744, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "__import__", "arg_names": [], "import_names": [], "rhs_call_name": "__import__", "annotation": ""}, "snippet": " __import__(app, {}, {}, [''])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L64_C8", "label": "after = keys()", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "vector": [14, 2, 0.5766, 0.009, 2, 0.87, 0.5, 937, 3, 0, 0, 0, 204, 10, 1], "semantic": {"name": "after", "arg_names": [], "import_names": [], "rhs_call_name": "keys", "annotation": ""}, "snippet": " after = sys.modules.keys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L65_C8", "label": "added =", "type": "assigned_variable", "loc": [65, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "vector": [14, 2, 0.5901, 0.018, 2, 0.87, 0.75, 845, 5, 0, 0, 0, 0, 0, 3], "semantic": {"name": "added", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " added = [key[len(app)+1:] for key in after if key not in before and\n key.startswith(app + '.') and key[len(app)+1:]]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8", "label": "if", "type": "if", "loc": [67, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "vector": [4, 2, 0.6441, 0.0901, 2, 0.87, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if added:\n import logging\n logging.warn('The app \"%(app)s\" contains imports in '\n 'its __init__.py (at least %(added)s). This can cause '\n 'strange bugs due to recursive imports! You should '\n 'either do the import lazily (within functions) or '\n 'ignore the app settings/urlsauto with '\n 'IGNORE_APP_SETTINGS and IGNORE_APP_URLSAUTO in '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Import_L68_C12", "label": "logging import logging", "type": "import", "loc": [68, 68], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8", "vector": [1, 3, 0.6126, 0.009, 3, 0.75, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": " import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L69_C12", "label": "warn()", "type": "expression", "loc": [69, 76], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8", "vector": [8, 3, 0.6532, 0.0721, 3, 0.75, 1.0, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('The app \"%(app)s\" contains imports in '\n 'its __init__.py (at least %(added)s). This can cause '\n 'strange bugs due to recursive imports! You should '\n 'either do the import lazily (within functions) or '\n 'ignore the app settings/urlsauto with '\n 'IGNORE_APP_SETTINGS and IGNORE_APP_URLSAUTO in '\n 'your settings.py.'\n % {'app': app, 'added': ', '.join(added)})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L79_C0", "label": "_globals = globals()", "type": "assigned_variable", "loc": [79, 79], "level": 0, "parent": null, "vector": [14, 0, 0.7117, 0.009, 0, 0.66, 0.7778, 862, 3, 0, 0, 0, 926, 10, 1], "semantic": {"name": "_globals", "arg_names": [], "import_names": [], "rhs_call_name": "globals", "annotation": ""}, "snippet": "_globals = globals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "label": "_Module", "type": "class", "loc": [80, 86], "level": 0, "parent": null, "vector": [3, 0, 0.7477, 0.0631, 0, 0.66, 0.8333, 706, 0, 3, 0, 0, 186, 0, 0], "semantic": {"name": "_Module", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class _Module(object):\n def __setattr__(self, key, value):\n _globals[key] = value\n def __getattribute__(self, key):\n return _globals[key]\n def __hasattr__(self, key):\n return key in _globals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L81_C4", "label": "__setattr__", "type": "function", "loc": [81, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "vector": [2, 1, 0.7342, 0.018, 1, 0.93, 0.0, 112, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__setattr__", "arg_names": ["self", "key", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __setattr__(self, key, value):\n _globals[key] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L82_C8", "label": "assign", "type": "assigned_variable", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L81_C4", "vector": [14, 2, 0.7387, 0.009, 2, 0.93, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _globals[key] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L83_C4", "label": "__getattribute__", "type": "function", "loc": [83, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "vector": [2, 1, 0.7523, 0.018, 1, 0.93, 0.5, 93, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__getattribute__", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __getattribute__(self, key):\n return _globals[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L84_C8", "label": "return", "type": "return", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L83_C4", "vector": [13, 2, 0.7568, 0.009, 2, 0.12, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _globals[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L85_C4", "label": "__hasattr__", "type": "function", "loc": [85, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "vector": [2, 1, 0.7703, 0.018, 1, 0.93, 1.0, 565, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "__hasattr__", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __hasattr__(self, key):\n return key in _globals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L86_C8", "label": "return", "type": "return", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L85_C4", "vector": [13, 2, 0.7748, 0.009, 2, 0.65, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return key in _globals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L87_C0", "label": "settings = _Module()", "type": "assigned_variable", "loc": [87, 87], "level": 0, "parent": null, "vector": [14, 0, 0.7838, 0.009, 0, 0.66, 0.8889, 168, 3, 0, 0, 0, 706, 10, 1], "semantic": {"name": "settings", "arg_names": [], "import_names": [], "rhs_call_name": "_Module", "annotation": ""}, "snippet": "settings = _Module()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:For_L89_C0", "label": "for app", "type": "for", "loc": [89, 101], "level": 0, "parent": null, "vector": [6, 0, 0.8559, 0.1171, 0, 0.66, 0.9444, 494, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "app", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for app in INSTALLED_APPS:\n # This is an optimization. Django's apps don't have special settings.\n # Also, allow for ignoring some apps' settings.\n if app.startswith('django.') or app.endswith('.*') or \\\n app == 'appenginepatcher' or app in IGNORE_APP_SETTINGS:\n continue\n try:\n # First we check if __init__.py doesn't import anything"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L92_C4", "label": "if", "type": "if", "loc": [92, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L89_C0", "vector": [4, 1, 0.8378, 0.027, 1, 0.84, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if app.startswith('django.') or app.endswith('.*') or \\\n app == 'appenginepatcher' or app in IGNORE_APP_SETTINGS:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4", "label": "try", "type": "try", "loc": [95, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L89_C0", "vector": [7, 1, 0.8829, 0.0631, 1, 0.84, 1.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n # First we check if __init__.py doesn't import anything\n if check_app_imports:\n check_app_imports(app)\n __import__(app + '.settings', {}, {}, [''])\n except ImportError:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L97_C8", "label": "if", "type": "if", "loc": [97, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4", "vector": [4, 2, 0.8784, 0.018, 2, 0.5, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if check_app_imports:\n check_app_imports(app)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L98_C12", "label": "check_app_imports()", "type": "expression", "loc": [98, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L97_C8", "vector": [8, 3, 0.8829, 0.009, 3, 0.76, 0.0, 587, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "check_app_imports", "arg_names": [], "import_names": [], "rhs_call_name": "check_app_imports", "annotation": ""}, "snippet": " check_app_imports(app)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L99_C8", "label": "__import__()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4", "vector": [8, 2, 0.8919, 0.009, 2, 0.5, 1.0, 744, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "__import__", "arg_names": [], "import_names": [], "rhs_call_name": "__import__", "annotation": ""}, "snippet": " __import__(app + '.settings', {}, {}, [''])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:For_L104_C0", "label": "for key, value", "type": "for", "loc": [104, 106], "level": 0, "parent": null, "vector": [6, 0, 0.9459, 0.027, 0, 0.66, 1.0, 839, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "key, value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for key, value in COMBINE_MEDIA.items():\n if '!START!' in value:\n value.remove('!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:If_L105_C4", "label": "if", "type": "if", "loc": [105, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:For_L104_C0", "vector": [4, 1, 0.9505, 0.018, 1, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '!START!' in value:\n value.remove('!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L106_C8", "label": "remove()", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:If_L105_C4", "vector": [8, 2, 0.955, 0.009, 2, 0.74, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " value.remove('!START!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L108_C0", "label": "try", "type": "try", "loc": [108, 111], "level": 0, "parent": null, "vector": [7, 0, 0.9865, 0.036, 0, 0.66, 1.0556, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from settings_overrides import *\nexcept ImportError:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_255:ImportFrom_L109_C4", "label": "from settings_overrides import *", "type": "import", "loc": [109, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L108_C0", "vector": [1, 1, 0.982, 0.009, 1, 0.54, 0.0, 803, 0, 1, 0, 0, 803, 0, 0], "semantic": {"name": "settings_overrides", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": " from settings_overrides import *"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L34_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:For_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:For_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L51_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L53_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L55_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L52_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L56_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L61_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Import_L68_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L67_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L81_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Assign_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L83_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:ClassDef_L80_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Return_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L89_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L89_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L97_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L98_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:For_L104_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:If_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:If_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_255:Expr_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_255:Try_L108_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_255:ImportFrom_L109_C4"}]
# -*- coding: utf-8 -*- from django.db.models import signals from django.http import Http404 from django.utils import simplejson from google.appengine.ext import db from ragendja.pyutils import getattr_by_path from random import choice from string import ascii_letters, digits def get_filters(*filters): """Helper method for get_filtered.""" if len(filters) % 2 == 1: raise ValueError('You must supply an even number of arguments!') return zip(filters[::2], filters[1::2]) def get_filtered(data, *filters): """Helper method for get_xxx_or_404.""" for filter in get_filters(*filters): data.filter(*filter) return data def get_object(model, *filters_or_key, **kwargs): if kwargs.get('key_name'): item = model.get_by_key_name(kwargs.get('key_name'), parent=kwargs.get('parent')) elif kwargs.get('id'): item = model.get_by_id(kwargs.get('id'), parent=kwargs.get('parent')) elif len(filters_or_key) > 1: item = get_filtered(model.all(), *filters_or_key).get() else: error = None if isinstance(filters_or_key[0], (tuple, list)): error = [None for index in range(len(filters_or_key[0]))] try: item = model.get(filters_or_key[0]) except (db.BadKeyError, db.KindError): return error return item def get_object_or_404(model, *filters_or_key, **kwargs): item = get_object(model, *filters_or_key, **kwargs) if not item: raise Http404('Object does not exist!') return item def get_object_list(model, *filters): return get_filtered(model.all(), *filters) def get_list_or_404(model, *filters): data = get_object_list(model, *filters) if not data.count(1): raise Http404('No objects found!') return data KEY_NAME_PREFIX = 'k' def generate_key_name(*values): """ Escapes a string such that it can be used safely as a key_name. You can pass multiple values in order to build a path. """ return KEY_NAME_PREFIX + '/'.join( [value.replace('%', '%1').replace('/', '%2') for value in values]) def transaction(func): """Decorator that always runs the given function in a transaction.""" def _transaction(*args, **kwargs): return db.run_in_transaction(func, *args, **kwargs) # In case you need to run it without a transaction you can call # <func>.non_transactional(...) _transaction.non_transactional = func return _transaction @transaction def db_add(model, key_name, parent=None, **kwargs): """ This function creates an object transactionally if it does not exist in the datastore. Otherwise it returns None. """ existing = model.get_by_key_name(key_name, parent=parent) if not existing: new_entity = model(parent=parent, key_name=key_name, **kwargs) new_entity.put() return new_entity return None def db_create(model, parent=None, key_name_format=u'%s', non_transactional=False, **kwargs): """ Creates a new model instance with a random key_name and puts it into the datastore. """ func = non_transactional and db_add.non_transactional or db_add charset = ascii_letters + digits while True: # The key_name is 16 chars long. Make sure that the first char doesn't # begin with a digit. key_name = key_name_format % (choice(ascii_letters) + ''.join([choice(charset) for i in range(15)])) result = func(model, key_name, parent=parent, **kwargs) if result: return result def prefetch_references(object_list, references, cache=None): """ Dereferences the given (Key)ReferenceProperty fields of a list of objects in as few get() calls as possible. """ if object_list and references: if not isinstance(references, (list, tuple)): references = (references,) model = object_list[0].__class__ targets = {} # Collect models and keys of all reference properties. # Storage format of targets: models -> keys -> instance, property for name in set(references): property = getattr(model, name) is_key_reference = isinstance(property, KeyReferenceProperty) if is_key_reference: target_model = property.target_model else: target_model = property.reference_class prefetch = targets.setdefault(target_model.kind(), (target_model, {}))[1] for item in object_list: if is_key_reference: # Check if we already dereferenced the property if hasattr(item, '_ref_cache_for_' + property.target_name): continue key = getattr(item, property.target_name) if property.use_key_name and key: key = db.Key.from_path(target_model.kind(), key) else: if ReferenceProperty.is_resolved(property, item): continue key = property.get_value_for_datastore(item) if key: # Check if we already have a matching item in cache if cache: found_cached = None for cached_item in cache: if cached_item.key() == key: found_cached = cached_item if found_cached: setattr(item, name, found_cached) continue # No item found in cache. Retrieve it. key = str(key) prefetch[key] = prefetch.get(key, ()) + ((item, name),) for target_model, prefetch in targets.values(): prefetched_items = target_model.get(prefetch.keys()) for prefetched, group in zip(prefetched_items, prefetch.values()): for item, reference in group: # If prefetched is None we only update the cache if not prefetched: property = getattr(model, reference) if isinstance(property, KeyReferenceProperty): setattr(item, '_ref_cache_for_' + property.target_name, None) else: continue setattr(item, reference, prefetched) return object_list # Deprecated due to uglyness! :) class KeyReferenceProperty(object): """ Creates a cached accessor for a model referenced by a string property that stores a str(key) or key_name. This is useful if you need to work with the key of a referenced object, but mustn't get() it from the datastore. You can also integrate properties of the referenced model into the referencing model, so you don't need to dereference the model within a transaction. Note that if the referenced model's properties change you won't be notified, automatically. """ def __init__(self, property, model, use_key_name=True, integrate={}): if isinstance(property, basestring): self.target_name = property else: # Monkey-patch the target property, so we can monkey-patch the # model class, so we can detect when the user wants to set our # KeyReferenceProperty via the model constructor. # What an ugly hack; but this is the simplest implementation. :( # One alternative would be to implement a proxy model that # provides direct access to the key, but this won't work with # isinstance(). Maybe that's an option for Python 3000. # Yet another alternative would be to force the user to choose # either .key_name or .reference manually. That's rather ugly, too. self.target_name = None myself = self old_config = property.__property_config__ def __property_config__(model_class, property_name): myself.target_name = property_name my_name = None for key, value in model_class.__dict__.items(): if value is myself: my_name = key break old_init = model_class.__init__ def __init__(self, *args, **kwargs): if my_name in kwargs: setattr(self, my_name, kwargs[my_name]) kwargs[property_name] = getattr(self, property_name) for destination, source in myself.integrate.items(): integrate_value = None if kwargs[my_name]: try: property = getattr(self.__class__, source) except: property = None if property and isinstance(property, db.ReferenceProperty): integrate_value = property.get_value_for_datastore(self) else: integrate_value = getattr_by_path( kwargs[my_name], source) kwargs[destination] = integrate_value old_init(self, *args, **kwargs) model_class.__init__ = __init__ old_config(model_class, property_name) property.__property_config__ = __property_config__ self.target_model = model self.use_key_name = use_key_name self.integrate = integrate def __get__(self, instance, unused): if instance is None: return self attr = getattr(instance, self.target_name) cache = getattr(instance, '_ref_cache_for_' + self.target_name, None) if not cache: cache_key = cache elif self.use_key_name: cache_key = cache.key().name() else: cache_key = str(cache.key()) if attr != cache_key: if self.use_key_name: cache = self.target_model.get_by_key_name(attr) else: cache = self.target_model.get(attr) setattr(instance, '_ref_cache_for_' + self.target_name, cache) return cache def __set__(self, instance, value): if value and not isinstance(value, db.Model): raise ValueError('You must supply a Model instance.') if not value: key = None elif self.use_key_name: key = value.key().name() else: key = str(value.key()) setattr(instance, '_ref_cache_for_' + self.target_name, value) setattr(instance, self.target_name, key) for destination, source in self.integrate.items(): integrate_value = None if value: try: property = getattr(value.__class__, source) except: property = None if property and isinstance(property, db.ReferenceProperty): integrate_value = property.get_value_for_datastore(value) else: integrate_value = getattr_by_path(value, source) setattr(instance, destination, integrate_value) # Don't use this, yet. It's not part of the official API! class ReferenceProperty(db.ReferenceProperty): def __init__(self, reference_class, integrate={}, **kwargs): self.integrate = integrate super(ReferenceProperty, self).__init__(reference_class, **kwargs) @classmethod def is_resolved(cls, property, instance): try: if not hasattr(instance, property.__id_attr_name()) or \ not getattr(instance, property.__id_attr_name()): return True return bool(getattr(instance, property.__resolved_attr_name())) except: import logging logging.exception('ReferenceProperty implementation changed! ' 'Update ragendja.dbutils.ReferenceProperty.' 'is_resolved! Exception was:') return False def __set__(self, instance, value): super(ReferenceProperty, self).__set__(instance, value) for destination, source in self.integrate.items(): integrate_value = None if value: try: property = getattr(value.__class__, source) except: property = None if property and isinstance(property, db.ReferenceProperty): integrate_value = property.get_value_for_datastore(value) else: integrate_value = getattr_by_path(value, source) setattr(instance, destination, integrate_value) def to_json_data(model_instance, property_list): """ Converts a models into dicts for use with JSONResponse. You can either pass a single model instance and get a single dict or a list of models and get a list of dicts. For security reasons only the properties in the property_list will get added. If the value of the property has a json_data function its result will be added, instead. """ if hasattr(model_instance, '__iter__'): return [to_json_data(item, property_list) for item in model_instance] json_data = {} for property in property_list: property_instance = None try: property_instance = getattr(model_instance.__class__, property.split('.', 1)[0]) except: pass key_access = property[len(property.split('.', 1)[0]):] if isinstance(property_instance, db.ReferenceProperty) and \ key_access in ('.key', '.key.name'): key = property_instance.get_value_for_datastore(model_instance) if key_access == '.key': json_data[property] = str(key) else: json_data[property] = key.name() continue value = getattr_by_path(model_instance, property, None) value = getattr_by_path(value, 'json_data', value) json_data[property] = value return json_data def _get_included_cleanup_entities(entities, rels_seen, to_delete, to_put): # Models can define a CLEANUP_REFERENCES attribute if they have # reference properties that must get geleted with the model. include_references = getattr(entities[0], 'CLEANUP_REFERENCES', None) if include_references: if not isinstance(include_references, (list, tuple)): include_references = (include_references,) prefetch_references(entities, include_references) for entity in entities: for name in include_references: subentity = getattr(entity, name) to_delete.append(subentity) get_cleanup_entities(subentity, rels_seen=rels_seen, to_delete=to_delete, to_put=to_put) def get_cleanup_entities(instance, rels_seen=None, to_delete=None, to_put=None): if not instance or getattr(instance, '__handling_delete', False): return [], [], [] if to_delete is None: to_delete = [] if to_put is None: to_put = [] if rels_seen is None: rels_seen = [] # Delete many-to-one relations for related in instance._meta.get_all_related_objects(): # Check if we already have fetched some of the entities seen = (instance.key(), related.opts, related.field.name) if seen in rels_seen: continue rels_seen.append(seen) entities = getattr(instance, related.get_accessor_name(), related.model.all().filter(related.field.name + ' =', instance)) entities = entities.fetch(501) for entity in entities[:]: # Check if we might already have fetched this entity for item in to_delete: if item.key() == entity.key(): entities.remove(entity) break for item in to_put: if item.key() == entity.key(): to_put.remove(item) break to_delete.extend(entities) if len(to_delete) > 200: raise Exception("Can't delete so many entities at once!") if not entities: continue for entity in entities: get_cleanup_entities(entity, rels_seen=rels_seen, to_delete=to_delete, to_put=to_put) _get_included_cleanup_entities(entities, rels_seen, to_delete, to_put) # Clean up many-to-many relations for related in instance._meta.get_all_related_many_to_many_objects(): seen = (instance.key(), related.opts, related.field.name) if seen in rels_seen: continue rels_seen.append(seen) entities = getattr(instance, related.get_accessor_name(), related.model.all().filter(related.field.name + ' =', instance)) entities = entities.fetch(501) for entity in entities[:]: # Check if we might already have fetched this entity for item in to_put + to_delete: if item.key() == entity.key(): entities.remove(entity) entity = item break # We assume that data is a list. Remove instance from the list. data = getattr(entity, related.field.name) data = [item for item in data if (isinstance(item, db.Key) and item != instance.key()) or item.key() != instance.key()] setattr(entity, related.field.name, data) to_put.extend(entities) if len(to_put) > 200: raise Exception("Can't change so many entities at once!") return rels_seen, to_delete, to_put def cleanup_relations(instance, **kwargs): if getattr(instance, '__handling_delete', False): return rels_seen, to_delete, to_put = get_cleanup_entities(instance) _get_included_cleanup_entities((instance,), rels_seen, to_delete, to_put) for entity in [instance] + to_delete: entity.__handling_delete = True if to_delete: db.delete(to_delete) for entity in [instance] + to_delete: del entity.__handling_delete if to_put: db.put(to_put) class FakeModel(object): """A fake model class which is stored as a string. This can be useful if you need to emulate some model whose entities get generated by syncdb and are never modified afterwards. For example: ContentType and Permission. Use this with FakeModelProperty and FakeModelListProperty (the latter simulates a many-to-many relation). """ # Important: If you want to change your fields at a later point you have # to write a converter which upgrades your datastore schema. fields = ('value',) def __init__(self, **kwargs): if sorted(kwargs.keys()) != sorted(self.fields): raise ValueError('You have to pass the following values to ' 'the constructor: %s' % ', '.join(self.fields)) for key, value in kwargs.items(): setattr(self, key, value) class _meta(object): installed = True def get_value_for_datastore(self): return simplejson.dumps([getattr(self, field) for field in self.fields]) @property def pk(self): return self.get_value_for_datastore() @property def id(self): return self.pk @classmethod def load(cls, value): return simplejson.loads(value) @classmethod def make_value_from_datastore(cls, value): return cls(**dict(zip(cls.fields, cls.load(value)))) def __repr__(self): return '<%s: %s>' % (self.__class__.__name__, ' | '.join([unicode(getattr(self, field)) for field in self.fields])) class FakeModelProperty(db.Property): data_type = basestring def __init__(self, model, raw=False, *args, **kwargs): self.raw = raw self.model = model super(FakeModelProperty, self).__init__(*args, **kwargs) def validate(self, value): if isinstance(value, basestring): value = self.make_value_from_datastore(value) if not isinstance(value, self.model): raise db.BadValueError('Value must be of type %s' % self.model.__name__) if self.validator is not None: self.validator(value) return value def get_value_for_datastore(self, model_instance): fake_model = getattr(model_instance, self.name) if not fake_model: return None if not self.indexed: return db.Text(fake_model.get_value_for_datastore()) return fake_model.get_value_for_datastore() def make_value_from_datastore(self, value): if not value: return None return self.model.make_value_from_datastore(unicode(value)) def get_value_for_form(self, instance): return self.get_value_for_datastore(instance) def make_value_from_form(self, value): return value def __set__(self, model_instance, value): if isinstance(value, basestring): value = self.make_value_from_datastore(value) super(FakeModelProperty, self).__set__(model_instance, value) @classmethod def get_fake_defaults(self, fake_model, multiple=False, **kwargs): from ragendja import forms form = multiple and forms.FakeModelMultipleChoiceField or \ forms.FakeModelChoiceField defaults = {'form_class': form, 'fake_model': fake_model} defaults.update(kwargs) return defaults def get_form_field(self, **kwargs): if self.raw: from django import forms defaults = kwargs defaults['widget'] = forms.TextInput(attrs={'size': 80}) else: defaults = FakeModelProperty.get_fake_defaults(self.model, **kwargs) return super(FakeModelProperty, self).get_form_field(**defaults) class FakeModelListProperty(db.ListProperty): fake_item_type = basestring def __init__(self, model, *args, **kwargs): self.model = model if not kwargs.get('indexed', True): self.fake_item_type = db.Text super(FakeModelListProperty, self).__init__( self.__class__.fake_item_type, *args, **kwargs) def validate(self, value): new_value = [] for item in value: if isinstance(item, basestring): item = self.make_value_from_datastore([item])[0] if not isinstance(item, self.model): raise db.BadValueError('Value must be of type %s' % self.model.__name__) new_value.append(item) if self.validator is not None: self.validator(new_value) return new_value def get_value_for_datastore(self, model_instance): fake_models = getattr(model_instance, self.name) if not self.indexed: return [db.Text(fake_model.get_value_for_datastore()) for fake_model in fake_models] return [fake_model.get_value_for_datastore() for fake_model in fake_models] def make_value_from_datastore(self, value): return [self.model.make_value_from_datastore(unicode(item)) for item in value] def get_value_for_form(self, instance): return self.get_value_for_datastore(instance) def make_value_from_form(self, value): return value def get_form_field(self, **kwargs): defaults = FakeModelProperty.get_fake_defaults(self.model, multiple=True, **kwargs) defaults['required'] = False return super(FakeModelListProperty, self).get_form_field(**defaults) class KeyListProperty(db.ListProperty): """Simulates a many-to-many relation using a list property. On the model level you interact with keys, but when used in a ModelForm you get a ModelMultipleChoiceField (as if it were a ManyToManyField).""" def __init__(self, reference_class, *args, **kwargs): self._reference_class = reference_class super(KeyListProperty, self).__init__(db.Key, *args, **kwargs) @property def reference_class(self): if isinstance(self._reference_class, basestring): from django.db import models self._reference_class = models.get_model( *self._reference_class.split('.', 1)) return self._reference_class def validate(self, value): new_value = [] for item in value: if isinstance(item, basestring): item = db.Key(item) if isinstance(item, self.reference_class): item = item.key() if not isinstance(item, db.Key): raise db.BadValueError('Value must be a key or of type %s' % self.reference_class.__name__) new_value.append(item) return super(KeyListProperty, self).validate(new_value) def get_form_field(self, **kwargs): from django import forms defaults = {'form_class': forms.ModelMultipleChoiceField, 'queryset': self.reference_class.all(), 'required': False} defaults.update(kwargs) return super(KeyListProperty, self).get_form_field(**defaults)
ajibawa-2023/Python-Code-Large/train/row_256
414
640
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L2_C0", "label": "from django.db.models import signals", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0031, 0.0016, 0, 0.66, 0.0, 680, 0, 1, 0, 0, 680, 0, 0], "semantic": {"name": "django.db.models", "arg_names": [], "import_names": ["signals"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.db.models import signals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L3_C0", "label": "from django.http import Http404", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0047, 0.0016, 0, 0.66, 0.0357, 779, 0, 1, 0, 0, 779, 0, 0], "semantic": {"name": "django.http", "arg_names": [], "import_names": ["Http404"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.http import Http404"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L4_C0", "label": "from django.utils import simplejson", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0063, 0.0016, 0, 0.66, 0.0714, 944, 0, 1, 0, 0, 944, 0, 0], "semantic": {"name": "django.utils", "arg_names": [], "import_names": ["simplejson"], "rhs_call_name": "", "annotation": ""}, "snippet": "from django.utils import simplejson"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L5_C0", "label": "from google.appengine.ext import db", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0078, 0.0016, 0, 0.66, 0.1071, 167, 0, 1, 0, 0, 167, 0, 0], "semantic": {"name": "google.appengine.ext", "arg_names": [], "import_names": ["db"], "rhs_call_name": "", "annotation": ""}, "snippet": "from google.appengine.ext import db"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L6_C0", "label": "from ragendja.pyutils import getattr_by_path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0094, 0.0016, 0, 0.66, 0.1429, 223, 0, 1, 0, 0, 223, 0, 0], "semantic": {"name": "ragendja.pyutils", "arg_names": [], "import_names": ["getattr_by_path"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ragendja.pyutils import getattr_by_path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L7_C0", "label": "from random import choice", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0109, 0.0016, 0, 0.66, 0.1786, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["choice"], "rhs_call_name": "", "annotation": ""}, "snippet": "from random import choice"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L8_C0", "label": "from string import ascii_letters, digits", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0125, 0.0016, 0, 0.66, 0.2143, 890, 0, 2, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["ascii_letters", "digits"], "rhs_call_name": "", "annotation": ""}, "snippet": "from string import ascii_letters, digits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "label": "get_filters", "type": "function", "loc": [10, 14], "level": 0, "parent": null, "vector": [2, 0, 0.0187, 0.0078, 0, 0.66, 0.25, 19, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "get_filters", "arg_names": ["filters"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_filters(*filters):\n \"\"\"Helper method for get_filtered.\"\"\"\n if len(filters) % 2 == 1:\n raise ValueError('You must supply an even number of arguments!')\n return zip(filters[::2], filters[1::2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L11_C4", "label": "expression", "type": "expression", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "vector": [8, 1, 0.0172, 0.0016, 1, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Helper method for get_filtered.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L12_C4", "label": "if", "type": "if", "loc": [12, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "vector": [4, 1, 0.0195, 0.0031, 1, 0.35, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(filters) % 2 == 1:\n raise ValueError('You must supply an even number of arguments!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L14_C4", "label": "return", "type": "return", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "vector": [13, 1, 0.0219, 0.0016, 1, 0.35, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return zip(filters[::2], filters[1::2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "label": "get_filtered", "type": "function", "loc": [16, 20], "level": 0, "parent": null, "vector": [2, 0, 0.0281, 0.0078, 0, 0.66, 0.2857, 917, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "get_filtered", "arg_names": ["data", "filters"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_filtered(data, *filters):\n \"\"\"Helper method for get_xxx_or_404.\"\"\"\n for filter in get_filters(*filters):\n data.filter(*filter)\n return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L17_C4", "label": "expression", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "vector": [8, 1, 0.0266, 0.0016, 1, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Helper method for get_xxx_or_404.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L18_C4", "label": "for filter", "type": "for", "loc": [18, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "vector": [6, 1, 0.0289, 0.0031, 1, 0.77, 0.5, 526, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "filter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for filter in get_filters(*filters):\n data.filter(*filter)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L19_C8", "label": "filter()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L18_C4", "vector": [8, 2, 0.0297, 0.0016, 2, 0.87, 0.0, 526, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "filter", "arg_names": [], "import_names": [], "rhs_call_name": "filter", "annotation": ""}, "snippet": " data.filter(*filter)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L20_C4", "label": "return", "type": "return", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "vector": [13, 1, 0.0312, 0.0016, 1, 0.77, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L22_C0", "label": "get_object", "type": "function", "loc": [22, 39], "level": 0, "parent": null, "vector": [2, 0, 0.0477, 0.0281, 0, 0.66, 0.3214, 237, 0, 3, 1, 0, 0, 0, 16], "semantic": {"name": "get_object", "arg_names": ["model", "filters_or_key", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_object(model, *filters_or_key, **kwargs):\n if kwargs.get('key_name'):\n item = model.get_by_key_name(kwargs.get('key_name'),\n parent=kwargs.get('parent'))\n elif kwargs.get('id'):\n item = model.get_by_id(kwargs.get('id'),\n parent=kwargs.get('parent'))\n elif len(filters_or_key) > 1:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4", "label": "if", "type": "if", "loc": [23, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L22_C0", "vector": [4, 1, 0.0477, 0.025, 1, 0.99, 0.0, 0, 3, 0, 0, 0, 0, 0, 16], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if kwargs.get('key_name'):\n item = model.get_by_key_name(kwargs.get('key_name'),\n parent=kwargs.get('parent'))\n elif kwargs.get('id'):\n item = model.get_by_id(kwargs.get('id'),\n parent=kwargs.get('parent'))\n elif len(filters_or_key) > 1:\n item = get_filtered(model.all(), *filters_or_key).get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L24_C8", "label": "item = get_by_key_name()", "type": "assigned_variable", "loc": [24, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4", "vector": [14, 2, 0.0383, 0.0031, 2, 0.46, 0.0, 434, 3, 2, 0, 0, 899, 10, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "get_by_key_name", "annotation": ""}, "snippet": " item = model.get_by_key_name(kwargs.get('key_name'),\n parent=kwargs.get('parent'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4", "label": "if", "type": "if", "loc": [26, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4", "vector": [4, 2, 0.05, 0.0203, 2, 0.46, 1.0, 0, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif kwargs.get('id'):\n item = model.get_by_id(kwargs.get('id'),\n parent=kwargs.get('parent'))\n elif len(filters_or_key) > 1:\n item = get_filtered(model.all(), *filters_or_key).get()\n else:\n error = None\n if isinstance(filters_or_key[0], (tuple, list)):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L27_C8", "label": "item = get_by_id()", "type": "assigned_variable", "loc": [27, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4", "vector": [14, 3, 0.043, 0.0031, 3, 0.08, 0.0, 434, 3, 2, 0, 0, 397, 10, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "get_by_id", "annotation": ""}, "snippet": " item = model.get_by_id(kwargs.get('id'),\n parent=kwargs.get('parent'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "label": "if", "type": "if", "loc": [29, 38], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4", "vector": [4, 3, 0.0523, 0.0156, 3, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif len(filters_or_key) > 1:\n item = get_filtered(model.all(), *filters_or_key).get()\n else:\n error = None\n if isinstance(filters_or_key[0], (tuple, list)):\n error = [None for index in range(len(filters_or_key[0]))]\n try:\n item = model.get(filters_or_key[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L30_C8", "label": "item = get()", "type": "assigned_variable", "loc": [30, 30], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "vector": [14, 4, 0.0469, 0.0016, 4, 0.65, 0.0, 434, 3, 0, 0, 0, 607, 10, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " item = get_filtered(model.all(), *filters_or_key).get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L32_C8", "label": "error =", "type": "assigned_variable", "loc": [32, 32], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "vector": [14, 4, 0.05, 0.0016, 4, 0.65, 0.3333, 771, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L33_C8", "label": "if", "type": "if", "loc": [33, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "vector": [4, 4, 0.0523, 0.0031, 4, 0.65, 0.6667, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(filters_or_key[0], (tuple, list)):\n error = [None for index in range(len(filters_or_key[0]))]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L34_C12", "label": "error =", "type": "assigned_variable", "loc": [34, 34], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L33_C8", "vector": [14, 5, 0.0531, 0.0016, 5, 0.3, 0.0, 771, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "error", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error = [None for index in range(len(filters_or_key[0]))]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8", "label": "try", "type": "try", "loc": [35, 38], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "vector": [7, 4, 0.057, 0.0063, 4, 0.65, 1.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n item = model.get(filters_or_key[0])\n except (db.BadKeyError, db.KindError):\n return error"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L36_C12", "label": "item = get()", "type": "assigned_variable", "loc": [36, 36], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8", "vector": [14, 5, 0.0563, 0.0016, 5, 0.39, 0.0, 434, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " item = model.get(filters_or_key[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L38_C12", "label": "return", "type": "return", "loc": [38, 38], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8", "vector": [13, 5, 0.0594, 0.0016, 5, 0.39, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L39_C4", "label": "return", "type": "return", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L22_C0", "vector": [13, 1, 0.0609, 0.0016, 1, 0.99, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "label": "get_object_or_404", "type": "function", "loc": [41, 45], "level": 0, "parent": null, "vector": [2, 0, 0.0672, 0.0078, 0, 0.66, 0.3571, 611, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "get_object_or_404", "arg_names": ["model", "filters_or_key", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_object_or_404(model, *filters_or_key, **kwargs):\n item = get_object(model, *filters_or_key, **kwargs)\n if not item:\n raise Http404('Object does not exist!')\n return item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L42_C4", "label": "item = get_object()", "type": "assigned_variable", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "vector": [14, 1, 0.0656, 0.0016, 1, 0.47, 0.0, 434, 3, 3, 0, 0, 237, 10, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "get_object", "annotation": ""}, "snippet": " item = get_object(model, *filters_or_key, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L43_C4", "label": "if", "type": "if", "loc": [43, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "vector": [4, 1, 0.068, 0.0031, 1, 0.47, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not item:\n raise Http404('Object does not exist!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L45_C4", "label": "return", "type": "return", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "vector": [13, 1, 0.0703, 0.0016, 1, 0.47, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L47_C0", "label": "get_object_list", "type": "function", "loc": [47, 48], "level": 0, "parent": null, "vector": [2, 0, 0.0742, 0.0031, 0, 0.66, 0.3929, 350, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "get_object_list", "arg_names": ["model", "filters"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_object_list(model, *filters):\n return get_filtered(model.all(), *filters)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L48_C4", "label": "return", "type": "return", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L47_C0", "vector": [13, 1, 0.075, 0.0016, 1, 0.86, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return get_filtered(model.all(), *filters)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "label": "get_list_or_404", "type": "function", "loc": [50, 54], "level": 0, "parent": null, "vector": [2, 0, 0.0813, 0.0078, 0, 0.66, 0.4286, 174, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_list_or_404", "arg_names": ["model", "filters"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_list_or_404(model, *filters):\n data = get_object_list(model, *filters)\n if not data.count(1):\n raise Http404('No objects found!')\n return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L51_C4", "label": "data = get_object_list()", "type": "assigned_variable", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "vector": [14, 1, 0.0797, 0.0016, 1, 0.75, 0.0, 929, 3, 2, 0, 0, 350, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "get_object_list", "annotation": ""}, "snippet": " data = get_object_list(model, *filters)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L52_C4", "label": "if", "type": "if", "loc": [52, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "vector": [4, 1, 0.082, 0.0031, 1, 0.75, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not data.count(1):\n raise Http404('No objects found!')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L54_C4", "label": "return", "type": "return", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "vector": [13, 1, 0.0844, 0.0016, 1, 0.75, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L56_C0", "label": "KEY_NAME_PREFIX =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.0875, 0.0016, 0, 0.66, 0.4643, 568, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "KEY_NAME_PREFIX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KEY_NAME_PREFIX = 'k'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L57_C0", "label": "generate_key_name", "type": "function", "loc": [57, 64], "level": 0, "parent": null, "vector": [2, 0, 0.0945, 0.0125, 0, 0.66, 0.5, 620, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "generate_key_name", "arg_names": ["values"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def generate_key_name(*values):\n \"\"\"\n Escapes a string such that it can be used safely as a key_name.\n \n You can pass multiple values in order to build a path.\n \"\"\"\n return KEY_NAME_PREFIX + '/'.join(\n [value.replace('%', '%1').replace('/', '%2') for value in values])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L58_C4", "label": "expression", "type": "expression", "loc": [58, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L57_C0", "vector": [8, 1, 0.0938, 0.0078, 1, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Escapes a string such that it can be used safely as a key_name.\n \n You can pass multiple values in order to build a path.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L63_C4", "label": "return", "type": "return", "loc": [63, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L57_C0", "vector": [13, 1, 0.0992, 0.0031, 1, 0.24, 1.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return KEY_NAME_PREFIX + '/'.join(\n [value.replace('%', '%1').replace('/', '%2') for value in values])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "label": "transaction", "type": "function", "loc": [66, 73], "level": 0, "parent": null, "vector": [2, 0, 0.1086, 0.0125, 0, 0.66, 0.5357, 502, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "transaction", "arg_names": ["func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def transaction(func):\n \"\"\"Decorator that always runs the given function in a transaction.\"\"\"\n def _transaction(*args, **kwargs):\n return db.run_in_transaction(func, *args, **kwargs)\n # In case you need to run it without a transaction you can call\n # <func>.non_transactional(...)\n _transaction.non_transactional = func\n return _transaction"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L67_C4", "label": "expression", "type": "expression", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "vector": [8, 1, 0.1047, 0.0016, 1, 0.48, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Decorator that always runs the given function in a transaction.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L68_C4", "label": "_transaction", "type": "function", "loc": [68, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "vector": [2, 1, 0.107, 0.0031, 1, 0.48, 0.3333, 581, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "_transaction", "arg_names": ["args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _transaction(*args, **kwargs):\n return db.run_in_transaction(func, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L69_C8", "label": "return", "type": "return", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L68_C4", "vector": [13, 2, 0.1078, 0.0016, 2, 0.6, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return db.run_in_transaction(func, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L72_C4", "label": "_transaction.non_transactional =", "type": "assigned_variable", "loc": [72, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "vector": [14, 1, 0.1125, 0.0016, 1, 0.48, 0.6667, 616, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_transaction.non_transactional", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _transaction.non_transactional = func"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L73_C4", "label": "return", "type": "return", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "vector": [13, 1, 0.1141, 0.0016, 1, 0.48, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _transaction"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "label": "db_add", "type": "function", "loc": [76, 86], "level": 0, "parent": null, "vector": [2, 0, 0.1266, 0.0172, 0, 0.66, 0.5714, 865, 0, 4, 1, 0, 0, 0, 3], "semantic": {"name": "db_add", "arg_names": ["model", "key_name", "parent", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def db_add(model, key_name, parent=None, **kwargs):\n \"\"\"\n This function creates an object transactionally if it does not exist in\n the datastore. Otherwise it returns None.\n \"\"\"\n existing = model.get_by_key_name(key_name, parent=parent)\n if not existing:\n new_entity = model(parent=parent, key_name=key_name, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L77_C4", "label": "expression", "type": "expression", "loc": [77, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "vector": [8, 1, 0.1227, 0.0063, 1, 0.17, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n This function creates an object transactionally if it does not exist in\n the datastore. Otherwise it returns None.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L81_C4", "label": "existing = get_by_key_name()", "type": "assigned_variable", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "vector": [14, 1, 0.1266, 0.0016, 1, 0.17, 0.3333, 586, 3, 2, 0, 0, 899, 10, 1], "semantic": {"name": "existing", "arg_names": [], "import_names": [], "rhs_call_name": "get_by_key_name", "annotation": ""}, "snippet": " existing = model.get_by_key_name(key_name, parent=parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "label": "if", "type": "if", "loc": [82, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "vector": [4, 1, 0.1305, 0.0063, 1, 0.17, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not existing:\n new_entity = model(parent=parent, key_name=key_name, **kwargs)\n new_entity.put()\n return new_entity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L83_C8", "label": "new_entity = model()", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "vector": [14, 2, 0.1297, 0.0016, 2, 0.34, 0.0, 842, 3, 3, 0, 0, 722, 10, 1], "semantic": {"name": "new_entity", "arg_names": [], "import_names": [], "rhs_call_name": "model", "annotation": ""}, "snippet": " new_entity = model(parent=parent, key_name=key_name, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L84_C8", "label": "put()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "vector": [8, 2, 0.1313, 0.0016, 2, 0.34, 0.5, 636, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " new_entity.put()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L85_C8", "label": "return", "type": "return", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "vector": [13, 2, 0.1328, 0.0016, 2, 0.34, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return new_entity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L86_C4", "label": "return", "type": "return", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "vector": [13, 1, 0.1344, 0.0016, 1, 0.17, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "label": "db_create", "type": "function", "loc": [88, 103], "level": 0, "parent": null, "vector": [2, 0, 0.1492, 0.025, 0, 0.66, 0.6071, 18, 0, 5, 1, 0, 0, 0, 5], "semantic": {"name": "db_create", "arg_names": ["model", "parent", "key_name_format", "non_transactional", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def db_create(model, parent=None, key_name_format=u'%s',\n non_transactional=False, **kwargs):\n \"\"\"\n Creates a new model instance with a random key_name and puts it into the\n datastore.\n \"\"\"\n func = non_transactional and db_add.non_transactional or db_add\n charset = ascii_letters + digits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L90_C4", "label": "expression", "type": "expression", "loc": [90, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "vector": [8, 1, 0.143, 0.0063, 1, 0.72, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Creates a new model instance with a random key_name and puts it into the\n datastore.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L94_C4", "label": "func =", "type": "assigned_variable", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "vector": [14, 1, 0.1469, 0.0016, 1, 0.72, 0.3333, 856, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "func", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " func = non_transactional and db_add.non_transactional or db_add"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L95_C4", "label": "charset =", "type": "assigned_variable", "loc": [95, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "vector": [14, 1, 0.1484, 0.0016, 1, 0.72, 0.6667, 205, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "charset", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " charset = ascii_letters + digits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "label": "while", "type": "while", "loc": [96, 103], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "vector": [5, 1, 0.1555, 0.0125, 1, 0.72, 1.0, 0, 1, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n # The key_name is 16 chars long. Make sure that the first char doesn't\n # begin with a digit.\n key_name = key_name_format % (choice(ascii_letters) +\n ''.join([choice(charset) for i in range(15)]))\n result = func(model, key_name, parent=parent, **kwargs)\n if result:\n return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L99_C8", "label": "key_name =", "type": "assigned_variable", "loc": [99, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "vector": [14, 2, 0.1555, 0.0031, 2, 0.68, 0.0, 302, 4, 0, 0, 0, 0, 0, 4], "semantic": {"name": "key_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key_name = key_name_format % (choice(ascii_letters) +\n ''.join([choice(charset) for i in range(15)]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L101_C8", "label": "result = func()", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "vector": [14, 2, 0.1578, 0.0016, 2, 0.68, 0.5, 51, 3, 4, 0, 0, 856, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "func", "annotation": ""}, "snippet": " result = func(model, key_name, parent=parent, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L102_C8", "label": "if", "type": "if", "loc": [102, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "vector": [4, 2, 0.1602, 0.0031, 2, 0.68, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if result:\n return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L103_C12", "label": "return", "type": "return", "loc": [103, 103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L102_C8", "vector": [13, 3, 0.1609, 0.0016, 3, 0.26, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "label": "prefetch_references", "type": "function", "loc": [105, 164], "level": 0, "parent": null, "vector": [2, 0, 0.2102, 0.0938, 0, 0.66, 0.6429, 778, 0, 3, 1, 0, 0, 0, 25], "semantic": {"name": "prefetch_references", "arg_names": ["object_list", "references", "cache"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def prefetch_references(object_list, references, cache=None):\n \"\"\"\n Dereferences the given (Key)ReferenceProperty fields of a list of objects\n in as few get() calls as possible.\n \"\"\"\n if object_list and references:\n if not isinstance(references, (list, tuple)):\n references = (references,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L106_C4", "label": "expression", "type": "expression", "loc": [106, 109], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "vector": [8, 1, 0.168, 0.0063, 1, 0.04, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Dereferences the given (Key)ReferenceProperty fields of a list of objects\n in as few get() calls as possible.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "label": "if", "type": "if", "loc": [110, 163], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "vector": [4, 1, 0.2133, 0.0844, 1, 0.04, 0.5, 0, 0, 0, 0, 0, 0, 0, 25], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if object_list and references:\n if not isinstance(references, (list, tuple)):\n references = (references,)\n model = object_list[0].__class__\n targets = {}\n # Collect models and keys of all reference properties.\n # Storage format of targets: models -> keys -> instance, property\n for name in set(references):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L111_C8", "label": "if", "type": "if", "loc": [111, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "vector": [4, 2, 0.1742, 0.0031, 2, 0.03, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(references, (list, tuple)):\n references = (references,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L112_C12", "label": "references =", "type": "assigned_variable", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L111_C8", "vector": [14, 3, 0.175, 0.0016, 3, 0.45, 0.0, 500, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "references", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " references = (references,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L113_C8", "label": "model =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "vector": [14, 2, 0.1766, 0.0016, 2, 0.03, 0.25, 722, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " model = object_list[0].__class__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L114_C8", "label": "targets =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "vector": [14, 2, 0.1781, 0.0016, 2, 0.03, 0.5, 409, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "targets", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " targets = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "label": "for name", "type": "for", "loc": [117, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "vector": [6, 2, 0.2086, 0.0531, 2, 0.03, 0.75, 57, 3, 0, 0, 0, 0, 0, 15], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in set(references):\n property = getattr(model, name)\n is_key_reference = isinstance(property, KeyReferenceProperty)\n if is_key_reference:\n target_model = property.target_model\n else:\n target_model = property.reference_class\n prefetch = targets.setdefault(target_model.kind(),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L118_C12", "label": "property = getattr()", "type": "assigned_variable", "loc": [118, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "vector": [14, 3, 0.1844, 0.0016, 3, 0.47, 0.0, 244, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property = getattr(model, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L119_C12", "label": "is_key_reference = isinstance()", "type": "assigned_variable", "loc": [119, 119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "vector": [14, 3, 0.1859, 0.0016, 3, 0.47, 0.25, 701, 3, 2, 0, 0, 552, 10, 1], "semantic": {"name": "is_key_reference", "arg_names": [], "import_names": [], "rhs_call_name": "isinstance", "annotation": ""}, "snippet": " is_key_reference = isinstance(property, KeyReferenceProperty)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12", "label": "if", "type": "if", "loc": [120, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "vector": [4, 3, 0.1898, 0.0063, 3, 0.47, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if is_key_reference:\n target_model = property.target_model\n else:\n target_model = property.reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L121_C16", "label": "target_model =", "type": "assigned_variable", "loc": [121, 121], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12", "vector": [14, 4, 0.1891, 0.0016, 4, 0.45, 0.0, 448, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "target_model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " target_model = property.target_model"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L123_C16", "label": "target_model =", "type": "assigned_variable", "loc": [123, 123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12", "vector": [14, 4, 0.1922, 0.0016, 4, 0.45, 1.0, 448, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "target_model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " target_model = property.reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L124_C12", "label": "prefetch =", "type": "assigned_variable", "loc": [124, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "vector": [14, 3, 0.1945, 0.0031, 3, 0.47, 0.75, 786, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "prefetch", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " prefetch = targets.setdefault(target_model.kind(),\n (target_model, {}))[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12", "label": "for item", "type": "for", "loc": [126, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "vector": [6, 3, 0.2156, 0.0391, 3, 0.47, 1.0, 434, 2, 0, 0, 0, 0, 0, 10], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in object_list:\n if is_key_reference:\n # Check if we already dereferenced the property\n if hasattr(item, '_ref_cache_for_' + property.target_name):\n continue\n key = getattr(item, property.target_name)\n if property.use_key_name and key:\n key = db.Key.from_path(target_model.kind(), key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "label": "if", "type": "if", "loc": [127, 137], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12", "vector": [4, 4, 0.2062, 0.0172, 4, 0.0, 0.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if is_key_reference:\n # Check if we already dereferenced the property\n if hasattr(item, '_ref_cache_for_' + property.target_name):\n continue\n key = getattr(item, property.target_name)\n if property.use_key_name and key:\n key = db.Key.from_path(target_model.kind(), key)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L129_C20", "label": "if", "type": "if", "loc": [129, 130], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "vector": [4, 5, 0.2023, 0.0031, 5, 0.13, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(item, '_ref_cache_for_' + property.target_name):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L131_C20", "label": "key = getattr()", "type": "assigned_variable", "loc": [131, 131], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "vector": [14, 5, 0.2047, 0.0016, 5, 0.13, 0.25, 230, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " key = getattr(item, property.target_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L132_C20", "label": "if", "type": "if", "loc": [132, 133], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "vector": [4, 5, 0.207, 0.0031, 5, 0.13, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if property.use_key_name and key:\n key = db.Key.from_path(target_model.kind(), key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L133_C24", "label": "key = from_path()", "type": "assigned_variable", "loc": [133, 133], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L132_C20", "vector": [14, 6, 0.2078, 0.0016, 6, 0.0, 0.0, 230, 3, 2, 0, 0, 359, 10, 2], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "from_path", "annotation": ""}, "snippet": " key = db.Key.from_path(target_model.kind(), key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L135_C20", "label": "if", "type": "if", "loc": [135, 136], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "vector": [4, 5, 0.2117, 0.0031, 5, 0.13, 0.75, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ReferenceProperty.is_resolved(property, item):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L137_C20", "label": "key = get_value_for_datastore()", "type": "assigned_variable", "loc": [137, 137], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "vector": [14, 5, 0.2141, 0.0016, 5, 0.13, 1.0, 230, 3, 1, 0, 0, 18, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "get_value_for_datastore", "annotation": ""}, "snippet": " key = property.get_value_for_datastore(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "label": "if", "type": "if", "loc": [138, 150], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12", "vector": [4, 4, 0.225, 0.0203, 4, 0.0, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key:\n # Check if we already have a matching item in cache\n if cache:\n found_cached = None\n for cached_item in cache:\n if cached_item.key() == key:\n found_cached = cached_item\n if found_cached:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "label": "if", "type": "if", "loc": [140, 147], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "vector": [4, 5, 0.2242, 0.0125, 5, 0.52, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cache:\n found_cached = None\n for cached_item in cache:\n if cached_item.key() == key:\n found_cached = cached_item\n if found_cached:\n setattr(item, name, found_cached)\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L141_C24", "label": "found_cached =", "type": "assigned_variable", "loc": [141, 141], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "vector": [14, 6, 0.2203, 0.0016, 6, 0.8, 0.0, 309, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "found_cached", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found_cached = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L142_C24", "label": "for cached_item", "type": "for", "loc": [142, 144], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "vector": [6, 6, 0.2234, 0.0047, 6, 0.8, 0.5, 255, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cached_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for cached_item in cache:\n if cached_item.key() == key:\n found_cached = cached_item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L143_C28", "label": "if", "type": "if", "loc": [143, 144], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L142_C24", "vector": [4, 7, 0.2242, 0.0031, 7, 0.69, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cached_item.key() == key:\n found_cached = cached_item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L144_C32", "label": "found_cached =", "type": "assigned_variable", "loc": [144, 144], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L143_C28", "vector": [14, 8, 0.225, 0.0016, 8, 0.72, 0.0, 309, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "found_cached", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " found_cached = cached_item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L145_C24", "label": "if", "type": "if", "loc": [145, 147], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "vector": [4, 6, 0.2281, 0.0047, 6, 0.8, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if found_cached:\n setattr(item, name, found_cached)\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L146_C28", "label": "setattr()", "type": "expression", "loc": [146, 146], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L145_C24", "vector": [8, 7, 0.2281, 0.0016, 7, 0.99, 0.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(item, name, found_cached)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L149_C20", "label": "key = str()", "type": "assigned_variable", "loc": [149, 149], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "vector": [14, 5, 0.2328, 0.0016, 5, 0.52, 0.5, 230, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " key = str(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L150_C20", "label": "assign", "type": "assigned_variable", "loc": [150, 150], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "vector": [14, 5, 0.2344, 0.0016, 5, 0.52, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " prefetch[key] = prefetch.get(key, ()) + ((item, name),)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8", "label": "for target_model, prefetch", "type": "for", "loc": [151, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "vector": [6, 2, 0.2453, 0.0203, 2, 0.03, 1.0, 909, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "target_model, prefetch", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for target_model, prefetch in targets.values():\n prefetched_items = target_model.get(prefetch.keys())\n for prefetched, group in zip(prefetched_items, prefetch.values()):\n for item, reference in group:\n # If prefetched is None we only update the cache\n if not prefetched:\n property = getattr(model, reference)\n if isinstance(property, KeyReferenceProperty):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L152_C12", "label": "prefetched_items = get()", "type": "assigned_variable", "loc": [152, 152], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8", "vector": [14, 3, 0.2375, 0.0016, 3, 0.25, 0.0, 389, 3, 1, 0, 0, 607, 10, 2], "semantic": {"name": "prefetched_items", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " prefetched_items = target_model.get(prefetch.keys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L153_C12", "label": "for prefetched, group", "type": "for", "loc": [153, 163], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8", "vector": [6, 3, 0.2469, 0.0172, 3, 0.25, 1.0, 835, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "prefetched, group", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for prefetched, group in zip(prefetched_items, prefetch.values()):\n for item, reference in group:\n # If prefetched is None we only update the cache\n if not prefetched:\n property = getattr(model, reference)\n if isinstance(property, KeyReferenceProperty):\n setattr(item,\n '_ref_cache_for_' + property.target_name, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16", "label": "for item, reference", "type": "for", "loc": [154, 163], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L153_C12", "vector": [6, 4, 0.2477, 0.0156, 4, 0.26, 0.0, 105, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "item, reference", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item, reference in group:\n # If prefetched is None we only update the cache\n if not prefetched:\n property = getattr(model, reference)\n if isinstance(property, KeyReferenceProperty):\n setattr(item,\n '_ref_cache_for_' + property.target_name, None)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20", "label": "if", "type": "if", "loc": [156, 162], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16", "vector": [4, 5, 0.2484, 0.0109, 5, 0.93, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not prefetched:\n property = getattr(model, reference)\n if isinstance(property, KeyReferenceProperty):\n setattr(item,\n '_ref_cache_for_' + property.target_name, None)\n else:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L157_C24", "label": "property = getattr()", "type": "assigned_variable", "loc": [157, 157], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20", "vector": [14, 6, 0.2453, 0.0016, 6, 0.56, 0.0, 244, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property = getattr(model, reference)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L158_C24", "label": "if", "type": "if", "loc": [158, 162], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20", "vector": [4, 6, 0.25, 0.0078, 6, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(property, KeyReferenceProperty):\n setattr(item,\n '_ref_cache_for_' + property.target_name, None)\n else:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L159_C28", "label": "setattr()", "type": "expression", "loc": [159, 160], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L158_C24", "vector": [8, 7, 0.2492, 0.0031, 7, 0.74, 0.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(item,\n '_ref_cache_for_' + property.target_name, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L163_C20", "label": "setattr()", "type": "expression", "loc": [163, 163], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16", "vector": [8, 5, 0.2547, 0.0016, 5, 0.93, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(item, reference, prefetched)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L164_C4", "label": "return", "type": "return", "loc": [164, 164], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "vector": [13, 1, 0.2562, 0.0016, 1, 0.04, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return object_list"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "label": "KeyReferenceProperty", "type": "class", "loc": [167, 269], "level": 0, "parent": null, "vector": [3, 0, 0.3406, 0.1609, 0, 0.66, 0.6786, 865, 0, 5, 0, 0, 186, 0, 34], "semantic": {"name": "KeyReferenceProperty", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class KeyReferenceProperty(object):\n \"\"\"\n Creates a cached accessor for a model referenced by a string property\n that stores a str(key) or key_name. This is useful if you need to work with\n the key of a referenced object, but mustn't get() it from the datastore.\n\n You can also integrate properties of the referenced model into the\n referencing model, so you don't need to dereference the model within a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L168_C4", "label": "expression", "type": "expression", "loc": [168, 177], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "vector": [8, 1, 0.2695, 0.0156, 1, 0.3, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Creates a cached accessor for a model referenced by a string property\n that stores a str(key) or key_name. This is useful if you need to work with\n the key of a referenced object, but mustn't get() it from the datastore.\n\n You can also integrate properties of the referenced model into the\n referencing model, so you don't need to dereference the model within a\n transaction. Note that if the referenced model's properties change you"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "label": "__init__", "type": "function", "loc": [178, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "vector": [2, 1, 0.3148, 0.075, 1, 0.3, 0.3333, 555, 0, 5, 0, 0, 0, 0, 11], "semantic": {"name": "__init__", "arg_names": ["self", "property", "model", "use_key_name", "integrate"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, property, model, use_key_name=True, integrate={}):\n if isinstance(property, basestring):\n self.target_name = property\n else:\n # Monkey-patch the target property, so we can monkey-patch the\n # model class, so we can detect when the user wants to set our\n # KeyReferenceProperty via the model constructor.\n # What an ugly hack; but this is the simplest implementation. :("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "label": "if", "type": "if", "loc": [179, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "vector": [4, 2, 0.3133, 0.0688, 2, 0.91, 0.0, 0, 3, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(property, basestring):\n self.target_name = property\n else:\n # Monkey-patch the target property, so we can monkey-patch the\n # model class, so we can detect when the user wants to set our\n # KeyReferenceProperty via the model constructor.\n # What an ugly hack; but this is the simplest implementation. :(\n # One alternative would be to implement a proxy model that"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L180_C12", "label": "self.target_name =", "type": "assigned_variable", "loc": [180, 180], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [14, 3, 0.2812, 0.0016, 3, 0.56, 0.0, 501, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.target_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.target_name = property"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L191_C12", "label": "self.target_name =", "type": "assigned_variable", "loc": [191, 191], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [14, 3, 0.2984, 0.0016, 3, 0.56, 0.2, 501, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.target_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.target_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L192_C12", "label": "myself =", "type": "assigned_variable", "loc": [192, 192], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [14, 3, 0.3, 0.0016, 3, 0.56, 0.4, 55, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "myself", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " myself = self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L193_C12", "label": "old_config =", "type": "assigned_variable", "loc": [193, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [14, 3, 0.3016, 0.0016, 3, 0.56, 0.6, 152, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "old_config", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " old_config = property.__property_config__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "label": "__property_config__", "type": "function", "loc": [194, 221], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [2, 3, 0.3242, 0.0437, 3, 0.56, 0.8, 158, 0, 2, 0, 0, 0, 0, 10], "semantic": {"name": "__property_config__", "arg_names": ["model_class", "property_name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __property_config__(model_class, property_name):\n myself.target_name = property_name\n my_name = None\n for key, value in model_class.__dict__.items():\n if value is myself:\n my_name = key\n break\n old_init = model_class.__init__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L195_C16", "label": "myself.target_name =", "type": "assigned_variable", "loc": [195, 195], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [14, 4, 0.3047, 0.0016, 4, 0.1, 0.0, 225, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "myself.target_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " myself.target_name = property_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L196_C16", "label": "my_name =", "type": "assigned_variable", "loc": [196, 196], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [14, 4, 0.3063, 0.0016, 4, 0.1, 0.1667, 3, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "my_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " my_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L197_C16", "label": "for key, value", "type": "for", "loc": [197, 200], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [6, 4, 0.3102, 0.0063, 4, 0.1, 0.3333, 839, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "key, value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, value in model_class.__dict__.items():\n if value is myself:\n my_name = key\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L198_C20", "label": "if", "type": "if", "loc": [198, 200], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L197_C16", "vector": [4, 5, 0.3109, 0.0047, 5, 0.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value is myself:\n my_name = key\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L199_C24", "label": "my_name =", "type": "assigned_variable", "loc": [199, 199], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L198_C20", "vector": [14, 6, 0.3109, 0.0016, 6, 0.16, 0.0, 3, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "my_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " my_name = key"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L201_C16", "label": "old_init =", "type": "assigned_variable", "loc": [201, 201], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [14, 4, 0.3141, 0.0016, 4, 0.1, 0.5, 433, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "old_init", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " old_init = model_class.__init__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16", "label": "__init__", "type": "function", "loc": [202, 219], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [2, 4, 0.3289, 0.0281, 4, 0.1, 0.6667, 555, 0, 3, 0, 0, 0, 0, 8], "semantic": {"name": "__init__", "arg_names": ["self", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, *args, **kwargs):\n if my_name in kwargs:\n setattr(self, my_name, kwargs[my_name])\n kwargs[property_name] = getattr(self, property_name)\n for destination, source in myself.integrate.items():\n integrate_value = None\n if kwargs[my_name]:\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "label": "if", "type": "if", "loc": [203, 218], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16", "vector": [4, 5, 0.3289, 0.025, 5, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if my_name in kwargs:\n setattr(self, my_name, kwargs[my_name])\n kwargs[property_name] = getattr(self, property_name)\n for destination, source in myself.integrate.items():\n integrate_value = None\n if kwargs[my_name]:\n try:\n property = getattr(self.__class__, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L204_C24", "label": "setattr()", "type": "expression", "loc": [204, 204], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "vector": [8, 6, 0.3187, 0.0016, 6, 0.77, 0.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(self, my_name, kwargs[my_name])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L205_C24", "label": " = getattr()", "type": "assigned_variable", "loc": [205, 205], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "vector": [14, 6, 0.3203, 0.0016, 6, 0.77, 0.5, 0, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " kwargs[property_name] = getattr(self, property_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "label": "for destination, source", "type": "for", "loc": [206, 218], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "vector": [6, 6, 0.3312, 0.0203, 6, 0.77, 1.0, 409, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "destination, source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for destination, source in myself.integrate.items():\n integrate_value = None\n if kwargs[my_name]:\n try:\n property = getattr(self.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L207_C28", "label": "integrate_value =", "type": "assigned_variable", "loc": [207, 207], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "vector": [14, 7, 0.3234, 0.0016, 7, 0.42, 0.0, 675, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " integrate_value = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28", "label": "if", "type": "if", "loc": [208, 217], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "vector": [4, 7, 0.332, 0.0156, 7, 0.42, 0.5, 0, 6, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if kwargs[my_name]:\n try:\n property = getattr(self.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(self)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32", "label": "try", "type": "try", "loc": [209, 212], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28", "vector": [7, 8, 0.3289, 0.0063, 8, 0.74, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n property = getattr(self.__class__, source)\n except:\n property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L210_C36", "label": "property = getattr()", "type": "assigned_variable", "loc": [210, 210], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32", "vector": [14, 9, 0.3281, 0.0016, 9, 0.11, 0.0, 244, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property = getattr(self.__class__, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L212_C36", "label": "property =", "type": "assigned_variable", "loc": [212, 212], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32", "vector": [14, 9, 0.3312, 0.0016, 9, 0.11, 0.0, 244, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32", "label": "if", "type": "if", "loc": [213, 217], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28", "vector": [4, 8, 0.3359, 0.0078, 8, 0.74, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(self)\n else:\n integrate_value = getattr_by_path(\n kwargs[my_name], source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L214_C36", "label": "integrate_value = get_value_for_datastore()", "type": "assigned_variable", "loc": [214, 214], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32", "vector": [14, 9, 0.3344, 0.0016, 9, 0.72, 0.0, 675, 3, 1, 0, 0, 18, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "get_value_for_datastore", "annotation": ""}, "snippet": " integrate_value = property.get_value_for_datastore(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L216_C36", "label": "integrate_value = getattr_by_path()", "type": "assigned_variable", "loc": [216, 217], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32", "vector": [14, 9, 0.3383, 0.0031, 9, 0.72, 1.0, 675, 3, 2, 0, 0, 709, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "getattr_by_path", "annotation": ""}, "snippet": " integrate_value = getattr_by_path(\n kwargs[my_name], source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L218_C28", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "vector": [14, 7, 0.3406, 0.0016, 7, 0.42, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kwargs[destination] = integrate_value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L219_C20", "label": "old_init()", "type": "expression", "loc": [219, 219], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16", "vector": [8, 5, 0.3422, 0.0016, 5, 0.5, 1.0, 433, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "old_init", "arg_names": [], "import_names": [], "rhs_call_name": "old_init", "annotation": ""}, "snippet": " old_init(self, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L220_C16", "label": "model_class.__init__ =", "type": "assigned_variable", "loc": [220, 220], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [14, 4, 0.3438, 0.0016, 4, 0.1, 0.8333, 347, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "model_class.__init__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " model_class.__init__ = __init__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L221_C16", "label": "old_config()", "type": "expression", "loc": [221, 221], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "vector": [8, 4, 0.3453, 0.0016, 4, 0.1, 1.0, 152, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "old_config", "arg_names": [], "import_names": [], "rhs_call_name": "old_config", "annotation": ""}, "snippet": " old_config(model_class, property_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L222_C12", "label": "property.__property_config__ =", "type": "assigned_variable", "loc": [222, 222], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "vector": [14, 3, 0.3469, 0.0016, 3, 0.56, 1.0, 225, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "property.__property_config__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " property.__property_config__ = __property_config__"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L223_C8", "label": "self.target_model =", "type": "assigned_variable", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "vector": [14, 2, 0.3484, 0.0016, 2, 0.91, 0.3333, 56, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.target_model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.target_model = model"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L224_C8", "label": "self.use_key_name =", "type": "assigned_variable", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "vector": [14, 2, 0.35, 0.0016, 2, 0.91, 0.6667, 292, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.use_key_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.use_key_name = use_key_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L225_C8", "label": "self.integrate =", "type": "assigned_variable", "loc": [225, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "vector": [14, 2, 0.3516, 0.0016, 2, 0.91, 1.0, 217, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.integrate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.integrate = integrate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "label": "__get__", "type": "function", "loc": [227, 244], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "vector": [2, 1, 0.368, 0.0281, 1, 0.3, 0.6667, 93, 0, 3, 1, 0, 0, 0, 9], "semantic": {"name": "__get__", "arg_names": ["self", "instance", "unused"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __get__(self, instance, unused):\n if instance is None:\n return self\n attr = getattr(instance, self.target_name)\n cache = getattr(instance, '_ref_cache_for_' + self.target_name, None)\n if not cache:\n cache_key = cache\n elif self.use_key_name:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L228_C8", "label": "if", "type": "if", "loc": [228, 229], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [4, 2, 0.357, 0.0031, 2, 0.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if instance is None:\n return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L229_C12", "label": "return", "type": "return", "loc": [229, 229], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L228_C8", "vector": [13, 3, 0.3578, 0.0016, 3, 0.79, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L230_C8", "label": "attr = getattr()", "type": "assigned_variable", "loc": [230, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [14, 2, 0.3594, 0.0016, 2, 0.9, 0.2, 400, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "attr", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " attr = getattr(instance, self.target_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L231_C8", "label": "cache = getattr()", "type": "assigned_variable", "loc": [231, 231], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [14, 2, 0.3609, 0.0016, 2, 0.9, 0.4, 419, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "cache", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " cache = getattr(instance, '_ref_cache_for_' + self.target_name, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8", "label": "if", "type": "if", "loc": [232, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [4, 2, 0.3664, 0.0094, 2, 0.9, 0.6, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not cache:\n cache_key = cache\n elif self.use_key_name:\n cache_key = cache.key().name()\n else:\n cache_key = str(cache.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L233_C12", "label": "cache_key =", "type": "assigned_variable", "loc": [233, 233], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8", "vector": [14, 3, 0.3641, 0.0016, 3, 0.46, 0.0, 62, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cache_key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cache_key = cache"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8", "label": "if", "type": "if", "loc": [234, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8", "vector": [4, 3, 0.368, 0.0063, 3, 0.46, 1.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.use_key_name:\n cache_key = cache.key().name()\n else:\n cache_key = str(cache.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L235_C12", "label": "cache_key = name()", "type": "assigned_variable", "loc": [235, 235], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8", "vector": [14, 4, 0.3672, 0.0016, 4, 0.7, 0.0, 62, 3, 0, 0, 0, 57, 10, 2], "semantic": {"name": "cache_key", "arg_names": [], "import_names": [], "rhs_call_name": "name", "annotation": ""}, "snippet": " cache_key = cache.key().name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L237_C12", "label": "cache_key = str()", "type": "assigned_variable", "loc": [237, 237], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8", "vector": [14, 4, 0.3703, 0.0016, 4, 0.7, 1.0, 62, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "cache_key", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " cache_key = str(cache.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8", "label": "if", "type": "if", "loc": [238, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [4, 2, 0.3758, 0.0094, 2, 0.9, 0.8, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if attr != cache_key:\n if self.use_key_name:\n cache = self.target_model.get_by_key_name(attr)\n else:\n cache = self.target_model.get(attr)\n setattr(instance, '_ref_cache_for_' + self.target_name, cache)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12", "label": "if", "type": "if", "loc": [239, 242], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8", "vector": [4, 3, 0.3758, 0.0063, 3, 0.06, 0.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.use_key_name:\n cache = self.target_model.get_by_key_name(attr)\n else:\n cache = self.target_model.get(attr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L240_C16", "label": "cache = get_by_key_name()", "type": "assigned_variable", "loc": [240, 240], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12", "vector": [14, 4, 0.375, 0.0016, 4, 0.12, 0.0, 419, 3, 1, 0, 0, 899, 10, 1], "semantic": {"name": "cache", "arg_names": [], "import_names": [], "rhs_call_name": "get_by_key_name", "annotation": ""}, "snippet": " cache = self.target_model.get_by_key_name(attr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L242_C16", "label": "cache = get()", "type": "assigned_variable", "loc": [242, 242], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12", "vector": [14, 4, 0.3781, 0.0016, 4, 0.12, 1.0, 419, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "cache", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " cache = self.target_model.get(attr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L243_C12", "label": "setattr()", "type": "expression", "loc": [243, 243], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8", "vector": [8, 3, 0.3797, 0.0016, 3, 0.06, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(instance, '_ref_cache_for_' + self.target_name, cache)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L244_C8", "label": "return", "type": "return", "loc": [244, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "vector": [13, 2, 0.3812, 0.0016, 2, 0.9, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cache"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "label": "__set__", "type": "function", "loc": [246, 269], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "vector": [2, 1, 0.4023, 0.0375, 1, 0.3, 1.0, 145, 0, 3, 0, 0, 0, 0, 14], "semantic": {"name": "__set__", "arg_names": ["self", "instance", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __set__(self, instance, value):\n if value and not isinstance(value, db.Model):\n raise ValueError('You must supply a Model instance.')\n if not value:\n key = None\n elif self.use_key_name:\n key = value.key().name()\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L247_C8", "label": "if", "type": "if", "loc": [247, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "vector": [4, 2, 0.3867, 0.0031, 2, 0.52, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value and not isinstance(value, db.Model):\n raise ValueError('You must supply a Model instance.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8", "label": "if", "type": "if", "loc": [249, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "vector": [4, 2, 0.393, 0.0094, 2, 0.52, 0.25, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not value:\n key = None\n elif self.use_key_name:\n key = value.key().name()\n else:\n key = str(value.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L250_C12", "label": "key =", "type": "assigned_variable", "loc": [250, 250], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8", "vector": [14, 3, 0.3906, 0.0016, 3, 0.16, 0.0, 230, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8", "label": "if", "type": "if", "loc": [251, 254], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8", "vector": [4, 3, 0.3945, 0.0063, 3, 0.16, 1.0, 0, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.use_key_name:\n key = value.key().name()\n else:\n key = str(value.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L252_C12", "label": "key = name()", "type": "assigned_variable", "loc": [252, 252], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8", "vector": [14, 4, 0.3937, 0.0016, 4, 0.86, 0.0, 230, 3, 0, 0, 0, 57, 10, 2], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "name", "annotation": ""}, "snippet": " key = value.key().name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L254_C12", "label": "key = str()", "type": "assigned_variable", "loc": [254, 254], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8", "vector": [14, 4, 0.3969, 0.0016, 4, 0.86, 1.0, 230, 3, 1, 0, 0, 52, 10, 2], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " key = str(value.key())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L255_C8", "label": "setattr()", "type": "expression", "loc": [255, 255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "vector": [8, 2, 0.3984, 0.0016, 2, 0.52, 0.5, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(instance, '_ref_cache_for_' + self.target_name, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L256_C8", "label": "setattr()", "type": "expression", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "vector": [8, 2, 0.4, 0.0016, 2, 0.52, 0.75, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(instance, self.target_name, key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "label": "for destination, source", "type": "for", "loc": [258, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "vector": [6, 2, 0.4117, 0.0187, 2, 0.52, 1.0, 409, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "destination, source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for destination, source in self.integrate.items():\n integrate_value = None\n if value:\n try:\n property = getattr(value.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L259_C12", "label": "integrate_value =", "type": "assigned_variable", "loc": [259, 259], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "vector": [14, 3, 0.4047, 0.0016, 3, 0.55, 0.0, 675, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " integrate_value = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12", "label": "if", "type": "if", "loc": [260, 268], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "vector": [4, 3, 0.4125, 0.0141, 3, 0.55, 0.5, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value:\n try:\n property = getattr(value.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(value)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16", "label": "try", "type": "try", "loc": [261, 264], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12", "vector": [7, 4, 0.4102, 0.0063, 4, 0.51, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n property = getattr(value.__class__, source)\n except:\n property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L262_C20", "label": "property = getattr()", "type": "assigned_variable", "loc": [262, 262], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16", "vector": [14, 5, 0.4094, 0.0016, 5, 0.27, 0.0, 244, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property = getattr(value.__class__, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L264_C20", "label": "property =", "type": "assigned_variable", "loc": [264, 264], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16", "vector": [14, 5, 0.4125, 0.0016, 5, 0.27, 0.0, 244, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16", "label": "if", "type": "if", "loc": [265, 268], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12", "vector": [4, 4, 0.4164, 0.0063, 4, 0.51, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(value)\n else:\n integrate_value = getattr_by_path(value, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L266_C20", "label": "integrate_value = get_value_for_datastore()", "type": "assigned_variable", "loc": [266, 266], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16", "vector": [14, 5, 0.4156, 0.0016, 5, 0.18, 0.0, 675, 3, 1, 0, 0, 18, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "get_value_for_datastore", "annotation": ""}, "snippet": " integrate_value = property.get_value_for_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L268_C20", "label": "integrate_value = getattr_by_path()", "type": "assigned_variable", "loc": [268, 268], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16", "vector": [14, 5, 0.4188, 0.0016, 5, 0.18, 1.0, 675, 3, 2, 0, 0, 709, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "getattr_by_path", "annotation": ""}, "snippet": " integrate_value = getattr_by_path(value, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L269_C12", "label": "setattr()", "type": "expression", "loc": [269, 269], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "vector": [8, 3, 0.4203, 0.0016, 3, 0.55, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(instance, destination, integrate_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "label": "ReferenceProperty", "type": "class", "loc": [272, 305], "level": 0, "parent": null, "vector": [3, 0, 0.4508, 0.0531, 0, 0.66, 0.7143, 167, 0, 3, 0, 0, 363, 0, 18], "semantic": {"name": "ReferenceProperty", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ReferenceProperty(db.ReferenceProperty):\n def __init__(self, reference_class, integrate={}, **kwargs):\n self.integrate = integrate\n super(ReferenceProperty, self).__init__(reference_class, **kwargs)\n\n @classmethod\n def is_resolved(cls, property, instance):\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4", "label": "__init__", "type": "function", "loc": [273, 275], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "vector": [2, 1, 0.4281, 0.0047, 1, 0.63, 0.0, 555, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "reference_class", "integrate", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, reference_class, integrate={}, **kwargs):\n self.integrate = integrate\n super(ReferenceProperty, self).__init__(reference_class, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L274_C8", "label": "self.integrate =", "type": "assigned_variable", "loc": [274, 274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4", "vector": [14, 2, 0.4281, 0.0016, 2, 0.44, 0.0, 217, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.integrate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.integrate = integrate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L275_C8", "label": "__init__()", "type": "expression", "loc": [275, 275], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4", "vector": [8, 2, 0.4297, 0.0016, 2, 0.44, 1.0, 555, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(ReferenceProperty, self).__init__(reference_class, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4", "label": "is_resolved", "type": "function", "loc": [278, 289], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "vector": [2, 1, 0.443, 0.0187, 1, 0.63, 0.5, 481, 0, 3, 1, 0, 0, 0, 8], "semantic": {"name": "is_resolved", "arg_names": ["cls", "property", "instance"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def is_resolved(cls, property, instance):\n try:\n if not hasattr(instance, property.__id_attr_name()) or \\\n not getattr(instance, property.__id_attr_name()):\n return True\n return bool(getattr(instance, property.__resolved_attr_name()))\n except:\n import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "label": "try", "type": "try", "loc": [279, 288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4", "vector": [7, 2, 0.443, 0.0156, 2, 0.48, 0.0, 0, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n if not hasattr(instance, property.__id_attr_name()) or \\\n not getattr(instance, property.__id_attr_name()):\n return True\n return bool(getattr(instance, property.__resolved_attr_name()))\n except:\n import logging\n logging.exception('ReferenceProperty implementation changed! '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L280_C12", "label": "if", "type": "if", "loc": [280, 282], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "vector": [4, 3, 0.4391, 0.0047, 3, 0.45, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not hasattr(instance, property.__id_attr_name()) or \\\n not getattr(instance, property.__id_attr_name()):\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L282_C16", "label": "return", "type": "return", "loc": [282, 282], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L280_C12", "vector": [13, 4, 0.4406, 0.0016, 4, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L283_C12", "label": "return", "type": "return", "loc": [283, 283], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "vector": [13, 3, 0.4422, 0.0016, 3, 0.45, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return bool(getattr(instance, property.__resolved_attr_name()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Import_L285_C12", "label": "logging import logging", "type": "import", "loc": [285, 285], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "vector": [1, 3, 0.4453, 0.0016, 3, 0.45, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": " import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L286_C12", "label": "exception()", "type": "expression", "loc": [286, 288], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "vector": [8, 3, 0.4484, 0.0047, 3, 0.45, 1.0, 69, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exception", "arg_names": [], "import_names": [], "rhs_call_name": "exception", "annotation": ""}, "snippet": " logging.exception('ReferenceProperty implementation changed! '\n 'Update ragendja.dbutils.ReferenceProperty.'\n 'is_resolved! Exception was:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L289_C8", "label": "return", "type": "return", "loc": [289, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4", "vector": [13, 2, 0.4516, 0.0016, 2, 0.48, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4", "label": "__set__", "type": "function", "loc": [291, 305], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "vector": [2, 1, 0.4656, 0.0234, 1, 0.63, 1.0, 145, 0, 3, 0, 0, 0, 0, 8], "semantic": {"name": "__set__", "arg_names": ["self", "instance", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __set__(self, instance, value):\n super(ReferenceProperty, self).__set__(instance, value)\n\n for destination, source in self.integrate.items():\n integrate_value = None\n if value:\n try:\n property = getattr(value.__class__, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L292_C8", "label": "__set__()", "type": "expression", "loc": [292, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4", "vector": [8, 2, 0.4562, 0.0016, 2, 0.47, 0.0, 145, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__set__", "arg_names": [], "import_names": [], "rhs_call_name": "__set__", "annotation": ""}, "snippet": " super(ReferenceProperty, self).__set__(instance, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "label": "for destination, source", "type": "for", "loc": [294, 305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4", "vector": [6, 2, 0.468, 0.0187, 2, 0.47, 1.0, 409, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "destination, source", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for destination, source in self.integrate.items():\n integrate_value = None\n if value:\n try:\n property = getattr(value.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L295_C12", "label": "integrate_value =", "type": "assigned_variable", "loc": [295, 295], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "vector": [14, 3, 0.4609, 0.0016, 3, 0.62, 0.0, 675, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " integrate_value = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12", "label": "if", "type": "if", "loc": [296, 304], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "vector": [4, 3, 0.4688, 0.0141, 3, 0.62, 0.5, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value:\n try:\n property = getattr(value.__class__, source)\n except:\n property = None\n if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(value)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16", "label": "try", "type": "try", "loc": [297, 300], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12", "vector": [7, 4, 0.4664, 0.0063, 4, 0.88, 0.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n property = getattr(value.__class__, source)\n except:\n property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L298_C20", "label": "property = getattr()", "type": "assigned_variable", "loc": [298, 298], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16", "vector": [14, 5, 0.4656, 0.0016, 5, 0.05, 0.0, 244, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property = getattr(value.__class__, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L300_C20", "label": "property =", "type": "assigned_variable", "loc": [300, 300], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16", "vector": [14, 5, 0.4688, 0.0016, 5, 0.05, 0.0, 244, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " property = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16", "label": "if", "type": "if", "loc": [301, 304], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12", "vector": [4, 4, 0.4727, 0.0063, 4, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if property and isinstance(property, db.ReferenceProperty):\n integrate_value = property.get_value_for_datastore(value)\n else:\n integrate_value = getattr_by_path(value, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L302_C20", "label": "integrate_value = get_value_for_datastore()", "type": "assigned_variable", "loc": [302, 302], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16", "vector": [14, 5, 0.4719, 0.0016, 5, 0.82, 0.0, 675, 3, 1, 0, 0, 18, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "get_value_for_datastore", "annotation": ""}, "snippet": " integrate_value = property.get_value_for_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L304_C20", "label": "integrate_value = getattr_by_path()", "type": "assigned_variable", "loc": [304, 304], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16", "vector": [14, 5, 0.475, 0.0016, 5, 0.82, 1.0, 675, 3, 2, 0, 0, 709, 10, 1], "semantic": {"name": "integrate_value", "arg_names": [], "import_names": [], "rhs_call_name": "getattr_by_path", "annotation": ""}, "snippet": " integrate_value = getattr_by_path(value, source)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L305_C12", "label": "setattr()", "type": "expression", "loc": [305, 305], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "vector": [8, 3, 0.4766, 0.0016, 3, 0.62, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(instance, destination, integrate_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "label": "to_json_data", "type": "function", "loc": [307, 340], "level": 0, "parent": null, "vector": [2, 0, 0.5055, 0.0531, 0, 0.66, 0.75, 38, 0, 2, 1, 0, 0, 0, 12], "semantic": {"name": "to_json_data", "arg_names": ["model_instance", "property_list"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def to_json_data(model_instance, property_list):\n \"\"\"\n Converts a models into dicts for use with JSONResponse.\n\n You can either pass a single model instance and get a single dict\n or a list of models and get a list of dicts.\n\n For security reasons only the properties in the property_list will get"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L308_C4", "label": "expression", "type": "expression", "loc": [308, 317], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "vector": [8, 1, 0.4883, 0.0156, 1, 0.4, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Converts a models into dicts for use with JSONResponse.\n\n You can either pass a single model instance and get a single dict\n or a list of models and get a list of dicts.\n\n For security reasons only the properties in the property_list will get\n added. If the value of the property has a json_data function its result"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L318_C4", "label": "if", "type": "if", "loc": [318, 319], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "vector": [4, 1, 0.4977, 0.0031, 1, 0.4, 0.25, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hasattr(model_instance, '__iter__'):\n return [to_json_data(item, property_list) for item in model_instance]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L319_C8", "label": "return", "type": "return", "loc": [319, 319], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L318_C4", "vector": [13, 2, 0.4984, 0.0016, 2, 0.34, 0.0, 0, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [to_json_data(item, property_list) for item in model_instance]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L320_C4", "label": "json_data =", "type": "assigned_variable", "loc": [320, 320], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "vector": [14, 1, 0.5, 0.0016, 1, 0.4, 0.5, 516, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "json_data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " json_data = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "label": "for property", "type": "for", "loc": [321, 339], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "vector": [6, 1, 0.5156, 0.0297, 1, 0.4, 0.75, 244, 2, 0, 0, 0, 0, 0, 10], "semantic": {"name": "property", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for property in property_list:\n property_instance = None\n try:\n property_instance = getattr(model_instance.__class__,\n property.split('.', 1)[0])\n except:\n pass\n key_access = property[len(property.split('.', 1)[0]):]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L322_C8", "label": "property_instance =", "type": "assigned_variable", "loc": [322, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [14, 2, 0.5031, 0.0016, 2, 0.15, 0.0, 993, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "property_instance", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " property_instance = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L323_C8", "label": "try", "type": "try", "loc": [323, 327], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [7, 2, 0.5078, 0.0078, 2, 0.15, 0.1667, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n property_instance = getattr(model_instance.__class__,\n property.split('.', 1)[0])\n except:\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L324_C12", "label": "property_instance = getattr()", "type": "assigned_variable", "loc": [324, 325], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L323_C8", "vector": [14, 3, 0.507, 0.0031, 3, 0.26, 0.0, 993, 3, 2, 0, 0, 121, 10, 2], "semantic": {"name": "property_instance", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " property_instance = getattr(model_instance.__class__,\n property.split('.', 1)[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L328_C8", "label": "key_access =", "type": "assigned_variable", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [14, 2, 0.5125, 0.0016, 2, 0.15, 0.3333, 679, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "key_access", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key_access = property[len(property.split('.', 1)[0]):]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8", "label": "if", "type": "if", "loc": [329, 336], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [4, 2, 0.5195, 0.0125, 2, 0.15, 0.5, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(property_instance, db.ReferenceProperty) and \\\n key_access in ('.key', '.key.name'):\n key = property_instance.get_value_for_datastore(model_instance)\n if key_access == '.key':\n json_data[property] = str(key)\n else:\n json_data[property] = key.name()\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L331_C12", "label": "key = get_value_for_datastore()", "type": "assigned_variable", "loc": [331, 331], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8", "vector": [14, 3, 0.5172, 0.0016, 3, 0.66, 0.0, 230, 3, 1, 0, 0, 18, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "get_value_for_datastore", "annotation": ""}, "snippet": " key = property_instance.get_value_for_datastore(model_instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12", "label": "if", "type": "if", "loc": [332, 335], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8", "vector": [4, 3, 0.5211, 0.0063, 3, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key_access == '.key':\n json_data[property] = str(key)\n else:\n json_data[property] = key.name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L333_C16", "label": " = str()", "type": "assigned_variable", "loc": [333, 333], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12", "vector": [14, 4, 0.5203, 0.0016, 4, 0.82, 0.0, 0, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " json_data[property] = str(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L335_C16", "label": " = name()", "type": "assigned_variable", "loc": [335, 335], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12", "vector": [14, 4, 0.5234, 0.0016, 4, 0.82, 1.0, 0, 3, 0, 0, 0, 57, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "name", "annotation": ""}, "snippet": " json_data[property] = key.name()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L337_C8", "label": "value = getattr_by_path()", "type": "assigned_variable", "loc": [337, 337], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [14, 2, 0.5266, 0.0016, 2, 0.15, 0.6667, 441, 3, 3, 0, 0, 709, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "getattr_by_path", "annotation": ""}, "snippet": " value = getattr_by_path(model_instance, property, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L338_C8", "label": "value = getattr_by_path()", "type": "assigned_variable", "loc": [338, 338], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [14, 2, 0.5281, 0.0016, 2, 0.15, 0.8333, 441, 3, 3, 0, 0, 709, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "getattr_by_path", "annotation": ""}, "snippet": " value = getattr_by_path(value, 'json_data', value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L339_C8", "label": "assign", "type": "assigned_variable", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "vector": [14, 2, 0.5297, 0.0016, 2, 0.15, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " json_data[property] = value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L340_C4", "label": "return", "type": "return", "loc": [340, 340], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "vector": [13, 1, 0.5312, 0.0016, 1, 0.4, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return json_data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L342_C0", "label": "_get_included_cleanup_entities", "type": "function", "loc": [342, 355], "level": 0, "parent": null, "vector": [2, 0, 0.5445, 0.0219, 0, 0.66, 0.7857, 743, 0, 4, 0, 0, 0, 0, 6], "semantic": {"name": "_get_included_cleanup_entities", "arg_names": ["entities", "rels_seen", "to_delete", "to_put"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _get_included_cleanup_entities(entities, rels_seen, to_delete, to_put):\n # Models can define a CLEANUP_REFERENCES attribute if they have\n # reference properties that must get geleted with the model.\n include_references = getattr(entities[0], 'CLEANUP_REFERENCES', None)\n if include_references:\n if not isinstance(include_references, (list, tuple)):\n include_references = (include_references,)\n prefetch_references(entities, include_references)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L345_C4", "label": "include_references = getattr()", "type": "assigned_variable", "loc": [345, 345], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L342_C0", "vector": [14, 1, 0.5391, 0.0016, 1, 0.2, 0.0, 845, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "include_references", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " include_references = getattr(entities[0], 'CLEANUP_REFERENCES', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "label": "if", "type": "if", "loc": [346, 355], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L342_C0", "vector": [4, 1, 0.5477, 0.0156, 1, 0.2, 1.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if include_references:\n if not isinstance(include_references, (list, tuple)):\n include_references = (include_references,)\n prefetch_references(entities, include_references)\n for entity in entities:\n for name in include_references:\n subentity = getattr(entity, name)\n to_delete.append(subentity)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L347_C8", "label": "if", "type": "if", "loc": [347, 348], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "vector": [4, 2, 0.543, 0.0031, 2, 0.54, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(include_references, (list, tuple)):\n include_references = (include_references,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L348_C12", "label": "include_references =", "type": "assigned_variable", "loc": [348, 348], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L347_C8", "vector": [14, 3, 0.5437, 0.0016, 3, 0.76, 0.0, 845, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "include_references", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " include_references = (include_references,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L349_C8", "label": "prefetch_references()", "type": "expression", "loc": [349, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "vector": [8, 2, 0.5453, 0.0016, 2, 0.54, 0.5, 778, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "prefetch_references", "arg_names": [], "import_names": [], "rhs_call_name": "prefetch_references", "annotation": ""}, "snippet": " prefetch_references(entities, include_references)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L350_C8", "label": "for entity", "type": "for", "loc": [350, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "vector": [6, 2, 0.5508, 0.0094, 2, 0.54, 1.0, 214, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in entities:\n for name in include_references:\n subentity = getattr(entity, name)\n to_delete.append(subentity)\n get_cleanup_entities(subentity, rels_seen=rels_seen,\n to_delete=to_delete, to_put=to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "label": "for name", "type": "for", "loc": [351, 355], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L350_C8", "vector": [6, 3, 0.5516, 0.0078, 3, 0.63, 0.0, 57, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in include_references:\n subentity = getattr(entity, name)\n to_delete.append(subentity)\n get_cleanup_entities(subentity, rels_seen=rels_seen,\n to_delete=to_delete, to_put=to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L352_C16", "label": "subentity = getattr()", "type": "assigned_variable", "loc": [352, 352], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "vector": [14, 4, 0.55, 0.0016, 4, 0.04, 0.0, 980, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "subentity", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " subentity = getattr(entity, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L353_C16", "label": "append()", "type": "expression", "loc": [353, 353], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "vector": [8, 4, 0.5516, 0.0016, 4, 0.04, 0.5, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " to_delete.append(subentity)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L354_C16", "label": "get_cleanup_entities()", "type": "expression", "loc": [354, 355], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "vector": [8, 4, 0.5539, 0.0031, 4, 0.04, 1.0, 358, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "get_cleanup_entities", "arg_names": [], "import_names": [], "rhs_call_name": "get_cleanup_entities", "annotation": ""}, "snippet": " get_cleanup_entities(subentity, rels_seen=rels_seen,\n to_delete=to_delete, to_put=to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "label": "get_cleanup_entities", "type": "function", "loc": [357, 431], "level": 0, "parent": null, "vector": [2, 0, 0.6156, 0.1172, 0, 0.66, 0.8214, 358, 0, 4, 1, 0, 0, 0, 40], "semantic": {"name": "get_cleanup_entities", "arg_names": ["instance", "rels_seen", "to_delete", "to_put"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_cleanup_entities(instance, rels_seen=None, to_delete=None, to_put=None):\n if not instance or getattr(instance, '__handling_delete', False):\n return [], [], []\n\n if to_delete is None:\n to_delete = []\n if to_put is None:\n to_put = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L358_C4", "label": "if", "type": "if", "loc": [358, 359], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [4, 1, 0.5602, 0.0031, 1, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not instance or getattr(instance, '__handling_delete', False):\n return [], [], []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L359_C8", "label": "return", "type": "return", "loc": [359, 359], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L358_C4", "vector": [13, 2, 0.5609, 0.0016, 2, 0.55, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [], [], []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L361_C4", "label": "if", "type": "if", "loc": [361, 362], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [4, 1, 0.5648, 0.0031, 1, 0.16, 0.1667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if to_delete is None:\n to_delete = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L362_C8", "label": "to_delete =", "type": "assigned_variable", "loc": [362, 362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L361_C4", "vector": [14, 2, 0.5656, 0.0016, 2, 0.64, 0.0, 510, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "to_delete", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " to_delete = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L363_C4", "label": "if", "type": "if", "loc": [363, 364], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [4, 1, 0.568, 0.0031, 1, 0.16, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if to_put is None:\n to_put = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L364_C8", "label": "to_put =", "type": "assigned_variable", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L363_C4", "vector": [14, 2, 0.5687, 0.0016, 2, 0.25, 0.0, 482, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "to_put", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " to_put = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L365_C4", "label": "if", "type": "if", "loc": [365, 366], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [4, 1, 0.5711, 0.0031, 1, 0.16, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rels_seen is None:\n rels_seen = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L366_C8", "label": "rels_seen =", "type": "assigned_variable", "loc": [366, 366], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L365_C4", "vector": [14, 2, 0.5719, 0.0016, 2, 0.15, 0.0, 470, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "rels_seen", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rels_seen = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "label": "for related", "type": "for", "loc": [369, 400], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [6, 1, 0.6008, 0.05, 1, 0.16, 0.6667, 462, 3, 0, 0, 0, 0, 0, 19], "semantic": {"name": "related", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for related in instance._meta.get_all_related_objects():\n # Check if we already have fetched some of the entities\n seen = (instance.key(), related.opts, related.field.name)\n if seen in rels_seen:\n continue\n rels_seen.append(seen)\n\n entities = getattr(instance, related.get_accessor_name(),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L371_C8", "label": "seen =", "type": "assigned_variable", "loc": [371, 371], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [14, 2, 0.5797, 0.0016, 2, 0.94, 0.0, 212, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "seen", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " seen = (instance.key(), related.opts, related.field.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L372_C8", "label": "if", "type": "if", "loc": [372, 373], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [4, 2, 0.582, 0.0031, 2, 0.94, 0.1, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if seen in rels_seen:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L374_C8", "label": "append()", "type": "expression", "loc": [374, 374], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [8, 2, 0.5844, 0.0016, 2, 0.94, 0.2, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " rels_seen.append(seen)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L376_C8", "label": "entities = getattr()", "type": "assigned_variable", "loc": [376, 377], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [14, 2, 0.5883, 0.0031, 2, 0.94, 0.3, 744, 3, 3, 0, 0, 121, 10, 4], "semantic": {"name": "entities", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " entities = getattr(instance, related.get_accessor_name(),\n related.model.all().filter(related.field.name + ' =', instance))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L378_C8", "label": "entities = fetch()", "type": "assigned_variable", "loc": [378, 378], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [14, 2, 0.5906, 0.0016, 2, 0.94, 0.4, 744, 3, 1, 0, 0, 587, 10, 1], "semantic": {"name": "entities", "arg_names": [], "import_names": [], "rhs_call_name": "fetch", "annotation": ""}, "snippet": " entities = entities.fetch(501)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8", "label": "for entity", "type": "for", "loc": [379, 388], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [6, 2, 0.5992, 0.0156, 2, 0.94, 0.5, 214, 6, 0, 0, 0, 0, 0, 6], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in entities[:]:\n # Check if we might already have fetched this entity\n for item in to_delete:\n if item.key() == entity.key():\n entities.remove(entity)\n break\n for item in to_put:\n if item.key() == entity.key():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L381_C12", "label": "for item", "type": "for", "loc": [381, 384], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8", "vector": [6, 3, 0.5977, 0.0063, 3, 0.94, 0.0, 434, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in to_delete:\n if item.key() == entity.key():\n entities.remove(entity)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L382_C16", "label": "if", "type": "if", "loc": [382, 384], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L381_C12", "vector": [4, 4, 0.5984, 0.0047, 4, 0.07, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if item.key() == entity.key():\n entities.remove(entity)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L383_C20", "label": "remove()", "type": "expression", "loc": [383, 383], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L382_C16", "vector": [8, 5, 0.5984, 0.0016, 5, 0.16, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " entities.remove(entity)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L385_C12", "label": "for item", "type": "for", "loc": [385, 388], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8", "vector": [6, 3, 0.6039, 0.0063, 3, 0.94, 1.0, 434, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in to_put:\n if item.key() == entity.key():\n to_put.remove(item)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L386_C16", "label": "if", "type": "if", "loc": [386, 388], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L385_C12", "vector": [4, 4, 0.6047, 0.0047, 4, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if item.key() == entity.key():\n to_put.remove(item)\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L387_C20", "label": "remove()", "type": "expression", "loc": [387, 387], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L386_C16", "vector": [8, 5, 0.6047, 0.0016, 5, 0.37, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " to_put.remove(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L390_C8", "label": "extend()", "type": "expression", "loc": [390, 390], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [8, 2, 0.6094, 0.0016, 2, 0.94, 0.6, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " to_delete.extend(entities)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L391_C8", "label": "if", "type": "if", "loc": [391, 392], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [4, 2, 0.6117, 0.0031, 2, 0.94, 0.7, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(to_delete) > 200:\n raise Exception(\"Can't delete so many entities at once!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L394_C8", "label": "if", "type": "if", "loc": [394, 395], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [4, 2, 0.6164, 0.0031, 2, 0.94, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not entities:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L396_C8", "label": "for entity", "type": "for", "loc": [396, 398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [6, 2, 0.6203, 0.0047, 2, 0.94, 0.9, 214, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in entities:\n get_cleanup_entities(entity, rels_seen=rels_seen,\n to_delete=to_delete, to_put=to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L397_C12", "label": "get_cleanup_entities()", "type": "expression", "loc": [397, 398], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L396_C8", "vector": [8, 3, 0.6211, 0.0031, 3, 0.39, 0.0, 358, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "get_cleanup_entities", "arg_names": [], "import_names": [], "rhs_call_name": "get_cleanup_entities", "annotation": ""}, "snippet": " get_cleanup_entities(entity, rels_seen=rels_seen,\n to_delete=to_delete, to_put=to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L400_C8", "label": "_get_included_cleanup_entities()", "type": "expression", "loc": [400, 400], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "vector": [8, 2, 0.625, 0.0016, 2, 0.94, 1.0, 743, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_get_included_cleanup_entities", "arg_names": [], "import_names": [], "rhs_call_name": "_get_included_cleanup_entities", "annotation": ""}, "snippet": " _get_included_cleanup_entities(entities, rels_seen, to_delete, to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "label": "for related", "type": "for", "loc": [404, 429], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [6, 1, 0.6508, 0.0406, 1, 0.16, 0.8333, 462, 3, 0, 0, 0, 0, 0, 20], "semantic": {"name": "related", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for related in instance._meta.get_all_related_many_to_many_objects():\n seen = (instance.key(), related.opts, related.field.name)\n if seen in rels_seen:\n continue\n rels_seen.append(seen)\n entities = getattr(instance, related.get_accessor_name(),\n related.model.all().filter(related.field.name + ' =', instance))\n entities = entities.fetch(501)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L405_C8", "label": "seen =", "type": "assigned_variable", "loc": [405, 405], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [14, 2, 0.6328, 0.0016, 2, 0.62, 0.0, 212, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "seen", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " seen = (instance.key(), related.opts, related.field.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L406_C8", "label": "if", "type": "if", "loc": [406, 407], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [4, 2, 0.6352, 0.0031, 2, 0.62, 0.1429, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if seen in rels_seen:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L408_C8", "label": "append()", "type": "expression", "loc": [408, 408], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [8, 2, 0.6375, 0.0016, 2, 0.62, 0.2857, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " rels_seen.append(seen)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L409_C8", "label": "entities = getattr()", "type": "assigned_variable", "loc": [409, 410], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [14, 2, 0.6398, 0.0031, 2, 0.62, 0.4286, 744, 3, 3, 0, 0, 121, 10, 4], "semantic": {"name": "entities", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " entities = getattr(instance, related.get_accessor_name(),\n related.model.all().filter(related.field.name + ' =', instance))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L411_C8", "label": "entities = fetch()", "type": "assigned_variable", "loc": [411, 411], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [14, 2, 0.6422, 0.0016, 2, 0.62, 0.5714, 744, 3, 1, 0, 0, 587, 10, 1], "semantic": {"name": "entities", "arg_names": [], "import_names": [], "rhs_call_name": "fetch", "annotation": ""}, "snippet": " entities = entities.fetch(501)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "label": "for entity", "type": "for", "loc": [412, 426], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [6, 2, 0.6547, 0.0234, 2, 0.62, 0.7143, 214, 6, 0, 0, 0, 0, 0, 9], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in entities[:]:\n # Check if we might already have fetched this entity\n for item in to_put + to_delete:\n if item.key() == entity.key():\n entities.remove(entity)\n entity = item\n break\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L414_C12", "label": "for item", "type": "for", "loc": [414, 418], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "vector": [6, 3, 0.65, 0.0078, 3, 0.95, 0.0, 434, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in to_put + to_delete:\n if item.key() == entity.key():\n entities.remove(entity)\n entity = item\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16", "label": "if", "type": "if", "loc": [415, 418], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L414_C12", "vector": [4, 4, 0.6508, 0.0063, 4, 0.54, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if item.key() == entity.key():\n entities.remove(entity)\n entity = item\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L416_C20", "label": "remove()", "type": "expression", "loc": [416, 416], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16", "vector": [8, 5, 0.65, 0.0016, 5, 0.7, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " entities.remove(entity)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L417_C20", "label": "entity =", "type": "assigned_variable", "loc": [417, 417], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16", "vector": [14, 5, 0.6516, 0.0016, 5, 0.7, 1.0, 214, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " entity = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L421_C12", "label": "data = getattr()", "type": "assigned_variable", "loc": [421, 421], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "vector": [14, 3, 0.6578, 0.0016, 3, 0.95, 0.3333, 929, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " data = getattr(entity, related.field.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L422_C12", "label": "data =", "type": "assigned_variable", "loc": [422, 425], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "vector": [14, 3, 0.6617, 0.0063, 3, 0.95, 0.6667, 929, 5, 0, 0, 0, 0, 0, 4], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data = [item for item in data\n if (isinstance(item, db.Key) and\n item != instance.key()) or\n item.key() != instance.key()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L426_C12", "label": "setattr()", "type": "expression", "loc": [426, 426], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "vector": [8, 3, 0.6656, 0.0016, 3, 0.95, 1.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(entity, related.field.name, data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L427_C8", "label": "extend()", "type": "expression", "loc": [427, 427], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [8, 2, 0.6672, 0.0016, 2, 0.62, 0.8571, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "extend", "arg_names": [], "import_names": [], "rhs_call_name": "extend", "annotation": ""}, "snippet": " to_put.extend(entities)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L428_C8", "label": "if", "type": "if", "loc": [428, 429], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "vector": [4, 2, 0.6695, 0.0031, 2, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(to_put) > 200:\n raise Exception(\"Can't change so many entities at once!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L431_C4", "label": "return", "type": "return", "loc": [431, 431], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "vector": [13, 1, 0.6734, 0.0016, 1, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rels_seen, to_delete, to_put"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "label": "cleanup_relations", "type": "function", "loc": [433, 445], "level": 0, "parent": null, "vector": [2, 0, 0.6859, 0.0203, 0, 0.66, 0.8571, 994, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "cleanup_relations", "arg_names": ["instance", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def cleanup_relations(instance, **kwargs):\n if getattr(instance, '__handling_delete', False):\n return\n rels_seen, to_delete, to_put = get_cleanup_entities(instance)\n _get_included_cleanup_entities((instance,), rels_seen, to_delete, to_put)\n for entity in [instance] + to_delete:\n entity.__handling_delete = True\n if to_delete:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L434_C4", "label": "if", "type": "if", "loc": [434, 435], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [4, 1, 0.6789, 0.0031, 1, 0.46, 0.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if getattr(instance, '__handling_delete', False):\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L435_C8", "label": "return", "type": "return", "loc": [435, 435], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L434_C4", "vector": [13, 2, 0.6797, 0.0016, 2, 0.44, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L436_C4", "label": "rels_seen, to_delete, to_put = get_cleanup_entities()", "type": "assigned_variable", "loc": [436, 436], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [14, 1, 0.6813, 0.0016, 1, 0.46, 0.1667, 242, 3, 1, 0, 0, 358, 10, 1], "semantic": {"name": "rels_seen, to_delete, to_put", "arg_names": [], "import_names": [], "rhs_call_name": "get_cleanup_entities", "annotation": ""}, "snippet": " rels_seen, to_delete, to_put = get_cleanup_entities(instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L437_C4", "label": "_get_included_cleanup_entities()", "type": "expression", "loc": [437, 437], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [8, 1, 0.6828, 0.0016, 1, 0.46, 0.3333, 743, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_get_included_cleanup_entities", "arg_names": [], "import_names": [], "rhs_call_name": "_get_included_cleanup_entities", "annotation": ""}, "snippet": " _get_included_cleanup_entities((instance,), rels_seen, to_delete, to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L438_C4", "label": "for entity", "type": "for", "loc": [438, 439], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [6, 1, 0.6852, 0.0031, 1, 0.46, 0.5, 214, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in [instance] + to_delete:\n entity.__handling_delete = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L439_C8", "label": "entity.__handling_delete =", "type": "assigned_variable", "loc": [439, 439], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L438_C4", "vector": [14, 2, 0.6859, 0.0016, 2, 0.4, 0.0, 836, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "entity.__handling_delete", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " entity.__handling_delete = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L440_C4", "label": "if", "type": "if", "loc": [440, 441], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [4, 1, 0.6883, 0.0031, 1, 0.46, 0.6667, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if to_delete:\n db.delete(to_delete)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L441_C8", "label": "delete()", "type": "expression", "loc": [441, 441], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L440_C4", "vector": [8, 2, 0.6891, 0.0016, 2, 0.75, 0.0, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " db.delete(to_delete)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L442_C4", "label": "for entity", "type": "for", "loc": [442, 443], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [6, 1, 0.6914, 0.0031, 1, 0.46, 0.8333, 214, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "entity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for entity in [instance] + to_delete:\n del entity.__handling_delete"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L444_C4", "label": "if", "type": "if", "loc": [444, 445], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "vector": [4, 1, 0.6945, 0.0031, 1, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if to_put:\n db.put(to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L445_C8", "label": "put()", "type": "expression", "loc": [445, 445], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L444_C4", "vector": [8, 2, 0.6953, 0.0016, 2, 0.3, 0.0, 636, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "put", "arg_names": [], "import_names": [], "rhs_call_name": "put", "annotation": ""}, "snippet": " db.put(to_put)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "label": "FakeModel", "type": "class", "loc": [447, 494], "level": 0, "parent": null, "vector": [3, 0, 0.7352, 0.075, 0, 0.66, 0.8929, 317, 0, 7, 0, 0, 186, 0, 18], "semantic": {"name": "FakeModel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FakeModel(object):\n \"\"\"A fake model class which is stored as a string.\n\n This can be useful if you need to emulate some model whose entities\n get generated by syncdb and are never modified afterwards.\n For example: ContentType and Permission.\n\n Use this with FakeModelProperty and FakeModelListProperty (the latter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L448_C4", "label": "expression", "type": "expression", "loc": [448, 456], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [8, 1, 0.7063, 0.0141, 1, 0.28, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"A fake model class which is stored as a string.\n\n This can be useful if you need to emulate some model whose entities\n get generated by syncdb and are never modified afterwards.\n For example: ContentType and Permission.\n\n Use this with FakeModelProperty and FakeModelListProperty (the latter\n simulates a many-to-many relation)."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L459_C4", "label": "fields =", "type": "assigned_variable", "loc": [459, 459], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [14, 1, 0.7172, 0.0016, 1, 0.28, 0.1111, 358, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "fields", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fields = ('value',)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4", "label": "__init__", "type": "function", "loc": [461, 467], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.725, 0.0109, 1, 0.28, 0.2222, 555, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "__init__", "arg_names": ["self", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, **kwargs):\n if sorted(kwargs.keys()) != sorted(self.fields):\n raise ValueError('You have to pass the following values to '\n 'the constructor: %s' % ', '.join(self.fields))\n\n for key, value in kwargs.items():\n setattr(self, key, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L462_C8", "label": "if", "type": "if", "loc": [462, 464], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4", "vector": [4, 2, 0.7234, 0.0047, 2, 0.12, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if sorted(kwargs.keys()) != sorted(self.fields):\n raise ValueError('You have to pass the following values to '\n 'the constructor: %s' % ', '.join(self.fields))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L466_C8", "label": "for key, value", "type": "for", "loc": [466, 467], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4", "vector": [6, 2, 0.7289, 0.0031, 2, 0.12, 1.0, 839, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "key, value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, value in kwargs.items():\n setattr(self, key, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L467_C12", "label": "setattr()", "type": "expression", "loc": [467, 467], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L466_C8", "vector": [8, 3, 0.7297, 0.0016, 3, 0.65, 0.0, 501, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setattr", "arg_names": [], "import_names": [], "rhs_call_name": "setattr", "annotation": ""}, "snippet": " setattr(self, key, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L469_C4", "label": "_meta", "type": "class", "loc": [469, 470], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [3, 1, 0.7336, 0.0031, 1, 0.28, 0.3333, 386, 0, 0, 0, 0, 186, 0, 0], "semantic": {"name": "_meta", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " class _meta(object):\n installed = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L470_C8", "label": "installed =", "type": "assigned_variable", "loc": [470, 470], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L469_C4", "vector": [14, 2, 0.7344, 0.0016, 2, 0.11, 0.0, 295, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "installed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " installed = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L472_C4", "label": "get_value_for_datastore", "type": "function", "loc": [472, 473], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.7383, 0.0031, 1, 0.28, 0.4444, 18, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "get_value_for_datastore", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_value_for_datastore(self):\n return simplejson.dumps([getattr(self, field) for field in self.fields])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L473_C8", "label": "return", "type": "return", "loc": [473, 473], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L472_C4", "vector": [13, 2, 0.7391, 0.0016, 2, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return simplejson.dumps([getattr(self, field) for field in self.fields])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L476_C4", "label": "pk", "type": "function", "loc": [476, 477], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.7445, 0.0031, 1, 0.28, 0.5556, 164, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "pk", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def pk(self):\n return self.get_value_for_datastore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L477_C8", "label": "return", "type": "return", "loc": [477, 477], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L476_C4", "vector": [13, 2, 0.7453, 0.0016, 2, 0.11, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_value_for_datastore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L480_C4", "label": "id", "type": "function", "loc": [480, 481], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.7508, 0.0031, 1, 0.28, 0.6667, 941, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "id", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def id(self):\n return self.pk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L481_C8", "label": "return", "type": "return", "loc": [481, 481], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L480_C4", "vector": [13, 2, 0.7516, 0.0016, 2, 0.78, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.pk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L484_C4", "label": "load", "type": "function", "loc": [484, 485], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.757, 0.0031, 1, 0.28, 0.7778, 37, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "load", "arg_names": ["cls", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def load(cls, value):\n return simplejson.loads(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L485_C8", "label": "return", "type": "return", "loc": [485, 485], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L484_C4", "vector": [13, 2, 0.7578, 0.0016, 2, 0.4, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return simplejson.loads(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L488_C4", "label": "make_value_from_datastore", "type": "function", "loc": [488, 489], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.7633, 0.0031, 1, 0.28, 0.8889, 331, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "make_value_from_datastore", "arg_names": ["cls", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def make_value_from_datastore(cls, value):\n return cls(**dict(zip(cls.fields, cls.load(value))))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L489_C8", "label": "return", "type": "return", "loc": [489, 489], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L488_C4", "vector": [13, 2, 0.7641, 0.0016, 2, 0.82, 0.0, 0, 3, 0, 0, 0, 0, 10, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cls(**dict(zip(cls.fields, cls.load(value))))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L491_C4", "label": "__repr__", "type": "function", "loc": [491, 494], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "vector": [2, 1, 0.7695, 0.0063, 1, 0.28, 1.0, 204, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "__repr__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __repr__(self):\n return '<%s: %s>' % (self.__class__.__name__,\n ' | '.join([unicode(getattr(self, field))\n for field in self.fields]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L492_C8", "label": "return", "type": "return", "loc": [492, 494], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L491_C4", "vector": [13, 2, 0.7703, 0.0047, 2, 0.17, 0.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '<%s: %s>' % (self.__class__.__name__,\n ' | '.join([unicode(getattr(self, field))\n for field in self.fields]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "label": "FakeModelProperty", "type": "class", "loc": [496, 554], "level": 0, "parent": null, "vector": [3, 0, 0.8203, 0.0922, 0, 0.66, 0.9286, 795, 0, 9, 0, 0, 394, 0, 23], "semantic": {"name": "FakeModelProperty", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FakeModelProperty(db.Property):\n data_type = basestring\n\n def __init__(self, model, raw=False, *args, **kwargs):\n self.raw = raw\n self.model = model\n super(FakeModelProperty, self).__init__(*args, **kwargs)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L497_C4", "label": "data_type =", "type": "assigned_variable", "loc": [497, 497], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [14, 1, 0.7766, 0.0016, 1, 0.4, 0.0, 5, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "data_type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data_type = basestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "label": "__init__", "type": "function", "loc": [499, 502], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.782, 0.0063, 1, 0.4, 0.1111, 555, 0, 5, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "model", "raw", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, model, raw=False, *args, **kwargs):\n self.raw = raw\n self.model = model\n super(FakeModelProperty, self).__init__(*args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L500_C8", "label": "self.raw =", "type": "assigned_variable", "loc": [500, 500], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "vector": [14, 2, 0.7812, 0.0016, 2, 0.93, 0.0, 22, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.raw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.raw = raw"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L501_C8", "label": "self.model =", "type": "assigned_variable", "loc": [501, 501], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "vector": [14, 2, 0.7828, 0.0016, 2, 0.93, 0.5, 81, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.model = model"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L502_C8", "label": "__init__()", "type": "expression", "loc": [502, 502], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "vector": [8, 2, 0.7844, 0.0016, 2, 0.93, 1.0, 555, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(FakeModelProperty, self).__init__(*args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "label": "validate", "type": "function", "loc": [504, 512], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.7937, 0.0141, 1, 0.4, 0.2222, 628, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "validate", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def validate(self, value):\n if isinstance(value, basestring):\n value = self.make_value_from_datastore(value)\n if not isinstance(value, self.model):\n raise db.BadValueError('Value must be of type %s' %\n self.model.__name__)\n if self.validator is not None:\n self.validator(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L505_C8", "label": "if", "type": "if", "loc": [505, 506], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "vector": [4, 2, 0.7898, 0.0031, 2, 0.43, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, basestring):\n value = self.make_value_from_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L506_C12", "label": "value = make_value_from_datastore()", "type": "assigned_variable", "loc": [506, 506], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L505_C8", "vector": [14, 3, 0.7906, 0.0016, 3, 0.16, 0.0, 441, 3, 1, 0, 0, 331, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "make_value_from_datastore", "annotation": ""}, "snippet": " value = self.make_value_from_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L507_C8", "label": "if", "type": "if", "loc": [507, 509], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "vector": [4, 2, 0.7937, 0.0047, 2, 0.43, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(value, self.model):\n raise db.BadValueError('Value must be of type %s' %\n self.model.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L510_C8", "label": "if", "type": "if", "loc": [510, 511], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "vector": [4, 2, 0.7977, 0.0031, 2, 0.43, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.validator is not None:\n self.validator(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L511_C12", "label": "validator()", "type": "expression", "loc": [511, 511], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L510_C8", "vector": [8, 3, 0.7984, 0.0016, 3, 0.51, 0.0, 145, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "validator", "annotation": ""}, "snippet": " self.validator(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L512_C8", "label": "return", "type": "return", "loc": [512, 512], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "vector": [13, 2, 0.8, 0.0016, 2, 0.43, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "label": "get_value_for_datastore", "type": "function", "loc": [514, 520], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8078, 0.0109, 1, 0.4, 0.3333, 18, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "get_value_for_datastore", "arg_names": ["self", "model_instance"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_value_for_datastore(self, model_instance):\n fake_model = getattr(model_instance, self.name)\n if not fake_model:\n return None\n if not self.indexed:\n return db.Text(fake_model.get_value_for_datastore())\n return fake_model.get_value_for_datastore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L515_C8", "label": "fake_model = getattr()", "type": "assigned_variable", "loc": [515, 515], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "vector": [14, 2, 0.8047, 0.0016, 2, 0.75, 0.0, 288, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "fake_model", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " fake_model = getattr(model_instance, self.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L516_C8", "label": "if", "type": "if", "loc": [516, 517], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "vector": [4, 2, 0.807, 0.0031, 2, 0.75, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not fake_model:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L517_C12", "label": "return", "type": "return", "loc": [517, 517], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L516_C8", "vector": [13, 3, 0.8078, 0.0016, 3, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L518_C8", "label": "if", "type": "if", "loc": [518, 519], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "vector": [4, 2, 0.8102, 0.0031, 2, 0.75, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.indexed:\n return db.Text(fake_model.get_value_for_datastore())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L519_C12", "label": "return", "type": "return", "loc": [519, 519], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L518_C8", "vector": [13, 3, 0.8109, 0.0016, 3, 0.68, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return db.Text(fake_model.get_value_for_datastore())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L520_C8", "label": "return", "type": "return", "loc": [520, 520], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "vector": [13, 2, 0.8125, 0.0016, 2, 0.75, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return fake_model.get_value_for_datastore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4", "label": "make_value_from_datastore", "type": "function", "loc": [522, 525], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.818, 0.0063, 1, 0.4, 0.4444, 331, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "make_value_from_datastore", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def make_value_from_datastore(self, value):\n if not value:\n return None\n return self.model.make_value_from_datastore(unicode(value))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L523_C8", "label": "if", "type": "if", "loc": [523, 524], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4", "vector": [4, 2, 0.818, 0.0031, 2, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not value:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L524_C12", "label": "return", "type": "return", "loc": [524, 524], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L523_C8", "vector": [13, 3, 0.8187, 0.0016, 3, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L525_C8", "label": "return", "type": "return", "loc": [525, 525], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4", "vector": [13, 2, 0.8203, 0.0016, 2, 0.0, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.model.make_value_from_datastore(unicode(value))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L527_C4", "label": "get_value_for_form", "type": "function", "loc": [527, 528], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8242, 0.0031, 1, 0.4, 0.5556, 903, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "get_value_for_form", "arg_names": ["self", "instance"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_value_for_form(self, instance):\n return self.get_value_for_datastore(instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L528_C8", "label": "return", "type": "return", "loc": [528, 528], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L527_C4", "vector": [13, 2, 0.825, 0.0016, 2, 0.6, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_value_for_datastore(instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L530_C4", "label": "make_value_from_form", "type": "function", "loc": [530, 531], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8289, 0.0031, 1, 0.4, 0.6667, 650, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "make_value_from_form", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def make_value_from_form(self, value):\n return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L531_C8", "label": "return", "type": "return", "loc": [531, 531], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L530_C4", "vector": [13, 2, 0.8297, 0.0016, 2, 0.54, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4", "label": "__set__", "type": "function", "loc": [533, 536], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8352, 0.0063, 1, 0.4, 0.7778, 145, 0, 3, 0, 0, 0, 0, 4], "semantic": {"name": "__set__", "arg_names": ["self", "model_instance", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __set__(self, model_instance, value):\n if isinstance(value, basestring):\n value = self.make_value_from_datastore(value)\n super(FakeModelProperty, self).__set__(model_instance, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L534_C8", "label": "if", "type": "if", "loc": [534, 535], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4", "vector": [4, 2, 0.8352, 0.0031, 2, 0.16, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, basestring):\n value = self.make_value_from_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L535_C12", "label": "value = make_value_from_datastore()", "type": "assigned_variable", "loc": [535, 535], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L534_C8", "vector": [14, 3, 0.8359, 0.0016, 3, 0.71, 0.0, 441, 3, 1, 0, 0, 331, 10, 1], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "make_value_from_datastore", "annotation": ""}, "snippet": " value = self.make_value_from_datastore(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L536_C8", "label": "__set__()", "type": "expression", "loc": [536, 536], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4", "vector": [8, 2, 0.8375, 0.0016, 2, 0.16, 1.0, 145, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__set__", "arg_names": [], "import_names": [], "rhs_call_name": "__set__", "annotation": ""}, "snippet": " super(FakeModelProperty, self).__set__(model_instance, value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "label": "get_fake_defaults", "type": "function", "loc": [539, 545], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8469, 0.0109, 1, 0.4, 0.8889, 13, 0, 4, 1, 0, 0, 0, 1], "semantic": {"name": "get_fake_defaults", "arg_names": ["self", "fake_model", "multiple", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_fake_defaults(self, fake_model, multiple=False, **kwargs):\n from ragendja import forms\n form = multiple and forms.FakeModelMultipleChoiceField or \\\n forms.FakeModelChoiceField\n defaults = {'form_class': form, 'fake_model': fake_model}\n defaults.update(kwargs)\n return defaults"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L540_C8", "label": "from ragendja import forms", "type": "import", "loc": [540, 540], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "vector": [1, 2, 0.8438, 0.0016, 2, 0.66, 0.0, 922, 0, 1, 0, 0, 922, 0, 0], "semantic": {"name": "ragendja", "arg_names": [], "import_names": ["forms"], "rhs_call_name": "", "annotation": ""}, "snippet": " from ragendja import forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L541_C8", "label": "form =", "type": "assigned_variable", "loc": [541, 542], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "vector": [14, 2, 0.8461, 0.0031, 2, 0.66, 0.25, 761, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "form", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " form = multiple and forms.FakeModelMultipleChoiceField or \\\n forms.FakeModelChoiceField"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L543_C8", "label": "defaults =", "type": "assigned_variable", "loc": [543, 543], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "vector": [14, 2, 0.8484, 0.0016, 2, 0.66, 0.5, 233, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaults = {'form_class': form, 'fake_model': fake_model}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L544_C8", "label": "update()", "type": "expression", "loc": [544, 544], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "vector": [8, 2, 0.85, 0.0016, 2, 0.66, 0.75, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " defaults.update(kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L545_C8", "label": "return", "type": "return", "loc": [545, 545], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "vector": [13, 2, 0.8516, 0.0016, 2, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return defaults"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4", "label": "get_form_field", "type": "function", "loc": [547, 554], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "vector": [2, 1, 0.8602, 0.0125, 1, 0.4, 1.0, 763, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "get_form_field", "arg_names": ["self", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_form_field(self, **kwargs):\n if self.raw:\n from django import forms\n defaults = kwargs\n defaults['widget'] = forms.TextInput(attrs={'size': 80})\n else:\n defaults = FakeModelProperty.get_fake_defaults(self.model, **kwargs)\n return super(FakeModelProperty, self).get_form_field(**defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "label": "if", "type": "if", "loc": [548, 553], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4", "vector": [4, 2, 0.8602, 0.0094, 2, 0.98, 0.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.raw:\n from django import forms\n defaults = kwargs\n defaults['widget'] = forms.TextInput(attrs={'size': 80})\n else:\n defaults = FakeModelProperty.get_fake_defaults(self.model, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L549_C10", "label": "from django import forms", "type": "import", "loc": [549, 549], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "vector": [1, 3, 0.8578, 0.0016, 3, 0.45, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django import forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L550_C10", "label": "defaults =", "type": "assigned_variable", "loc": [550, 550], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "vector": [14, 3, 0.8594, 0.0016, 3, 0.45, 0.3333, 233, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaults = kwargs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L551_C10", "label": " = TextInput()", "type": "assigned_variable", "loc": [551, 551], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "vector": [14, 3, 0.8609, 0.0016, 3, 0.45, 0.6667, 0, 3, 1, 0, 0, 438, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "TextInput", "annotation": ""}, "snippet": " defaults['widget'] = forms.TextInput(attrs={'size': 80})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L553_C10", "label": "defaults = get_fake_defaults()", "type": "assigned_variable", "loc": [553, 553], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "vector": [14, 3, 0.8641, 0.0016, 3, 0.45, 1.0, 233, 3, 2, 0, 0, 13, 10, 1], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "get_fake_defaults", "annotation": ""}, "snippet": " defaults = FakeModelProperty.get_fake_defaults(self.model, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L554_C8", "label": "return", "type": "return", "loc": [554, 554], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4", "vector": [13, 2, 0.8656, 0.0016, 2, 0.98, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return super(FakeModelProperty, self).get_form_field(**defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "label": "FakeModelListProperty", "type": "class", "loc": [556, 601], "level": 0, "parent": null, "vector": [3, 0, 0.9039, 0.0719, 0, 0.66, 0.9643, 366, 0, 7, 0, 0, 451, 0, 19], "semantic": {"name": "FakeModelListProperty", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FakeModelListProperty(db.ListProperty):\n fake_item_type = basestring\n\n def __init__(self, model, *args, **kwargs):\n self.model = model\n if not kwargs.get('indexed', True):\n self.fake_item_type = db.Text\n super(FakeModelListProperty, self).__init__("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L557_C4", "label": "fake_item_type =", "type": "assigned_variable", "loc": [557, 557], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [14, 1, 0.8703, 0.0016, 1, 0.53, 0.0, 309, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "fake_item_type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " fake_item_type = basestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "label": "__init__", "type": "function", "loc": [559, 564], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.8773, 0.0094, 1, 0.53, 0.1429, 555, 0, 4, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "model", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, model, *args, **kwargs):\n self.model = model\n if not kwargs.get('indexed', True):\n self.fake_item_type = db.Text\n super(FakeModelListProperty, self).__init__(\n self.__class__.fake_item_type, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L560_C8", "label": "self.model =", "type": "assigned_variable", "loc": [560, 560], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "vector": [14, 2, 0.875, 0.0016, 2, 0.22, 0.0, 81, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.model = model"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L561_C8", "label": "if", "type": "if", "loc": [561, 562], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "vector": [4, 2, 0.8773, 0.0031, 2, 0.22, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not kwargs.get('indexed', True):\n self.fake_item_type = db.Text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L562_C12", "label": "self.fake_item_type =", "type": "assigned_variable", "loc": [562, 562], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L561_C8", "vector": [14, 3, 0.8781, 0.0016, 3, 0.06, 0.0, 693, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.fake_item_type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.fake_item_type = db.Text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L563_C8", "label": "__init__()", "type": "expression", "loc": [563, 564], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "vector": [8, 2, 0.8805, 0.0031, 2, 0.22, 1.0, 555, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(FakeModelListProperty, self).__init__(\n self.__class__.fake_item_type, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "label": "validate", "type": "function", "loc": [566, 577], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.893, 0.0187, 1, 0.53, 0.2857, 628, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "validate", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def validate(self, value):\n new_value = []\n for item in value:\n if isinstance(item, basestring):\n item = self.make_value_from_datastore([item])[0]\n if not isinstance(item, self.model):\n raise db.BadValueError('Value must be of type %s' %\n self.model.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L567_C8", "label": "new_value =", "type": "assigned_variable", "loc": [567, 567], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "vector": [14, 2, 0.8859, 0.0016, 2, 0.26, 0.0, 832, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "new_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " new_value = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "label": "for item", "type": "for", "loc": [568, 574], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "vector": [6, 2, 0.8922, 0.0109, 2, 0.26, 0.3333, 434, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in value:\n if isinstance(item, basestring):\n item = self.make_value_from_datastore([item])[0]\n if not isinstance(item, self.model):\n raise db.BadValueError('Value must be of type %s' %\n self.model.__name__)\n new_value.append(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L569_C12", "label": "if", "type": "if", "loc": [569, 570], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "vector": [4, 3, 0.8898, 0.0031, 3, 0.6, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(item, basestring):\n item = self.make_value_from_datastore([item])[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L570_C16", "label": "item =", "type": "assigned_variable", "loc": [570, 570], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L569_C12", "vector": [14, 4, 0.8906, 0.0016, 4, 0.06, 0.0, 434, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " item = self.make_value_from_datastore([item])[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L571_C12", "label": "if", "type": "if", "loc": [571, 573], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "vector": [4, 3, 0.8938, 0.0047, 3, 0.6, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(item, self.model):\n raise db.BadValueError('Value must be of type %s' %\n self.model.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L574_C12", "label": "append()", "type": "expression", "loc": [574, 574], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "vector": [8, 3, 0.8969, 0.0016, 3, 0.6, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " new_value.append(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L575_C8", "label": "if", "type": "if", "loc": [575, 576], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "vector": [4, 2, 0.8992, 0.0031, 2, 0.26, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.validator is not None:\n self.validator(new_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L576_C12", "label": "validator()", "type": "expression", "loc": [576, 576], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L575_C8", "vector": [8, 3, 0.9, 0.0016, 3, 0.28, 0.0, 145, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "validator", "annotation": ""}, "snippet": " self.validator(new_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L577_C8", "label": "return", "type": "return", "loc": [577, 577], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "vector": [13, 2, 0.9016, 0.0016, 2, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return new_value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "label": "get_value_for_datastore", "type": "function", "loc": [579, 585], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.9094, 0.0109, 1, 0.53, 0.4286, 18, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "get_value_for_datastore", "arg_names": ["self", "model_instance"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_value_for_datastore(self, model_instance):\n fake_models = getattr(model_instance, self.name)\n if not self.indexed:\n return [db.Text(fake_model.get_value_for_datastore())\n for fake_model in fake_models]\n return [fake_model.get_value_for_datastore()\n for fake_model in fake_models]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L580_C8", "label": "fake_models = getattr()", "type": "assigned_variable", "loc": [580, 580], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "vector": [14, 2, 0.9062, 0.0016, 2, 0.31, 0.0, 114, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "fake_models", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " fake_models = getattr(model_instance, self.name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L581_C8", "label": "if", "type": "if", "loc": [581, 583], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "vector": [4, 2, 0.9094, 0.0047, 2, 0.31, 0.5, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.indexed:\n return [db.Text(fake_model.get_value_for_datastore())\n for fake_model in fake_models]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L582_C12", "label": "return", "type": "return", "loc": [582, 583], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L581_C8", "vector": [13, 3, 0.9102, 0.0031, 3, 0.98, 0.0, 0, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [db.Text(fake_model.get_value_for_datastore())\n for fake_model in fake_models]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L584_C8", "label": "return", "type": "return", "loc": [584, 585], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "vector": [13, 2, 0.9133, 0.0031, 2, 0.31, 1.0, 0, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [fake_model.get_value_for_datastore()\n for fake_model in fake_models]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L587_C4", "label": "make_value_from_datastore", "type": "function", "loc": [587, 589], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.9187, 0.0047, 1, 0.53, 0.5714, 331, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "make_value_from_datastore", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def make_value_from_datastore(self, value):\n return [self.model.make_value_from_datastore(unicode(item))\n for item in value]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L588_C8", "label": "return", "type": "return", "loc": [588, 589], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L587_C4", "vector": [13, 2, 0.9195, 0.0031, 2, 0.63, 0.0, 0, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return [self.model.make_value_from_datastore(unicode(item))\n for item in value]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L591_C4", "label": "get_value_for_form", "type": "function", "loc": [591, 592], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.9242, 0.0031, 1, 0.53, 0.7143, 903, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "get_value_for_form", "arg_names": ["self", "instance"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_value_for_form(self, instance):\n return self.get_value_for_datastore(instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L592_C8", "label": "return", "type": "return", "loc": [592, 592], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L591_C4", "vector": [13, 2, 0.925, 0.0016, 2, 0.58, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.get_value_for_datastore(instance)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L594_C4", "label": "make_value_from_form", "type": "function", "loc": [594, 595], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.9289, 0.0031, 1, 0.53, 0.8571, 650, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "make_value_from_form", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def make_value_from_form(self, value):\n return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L595_C8", "label": "return", "type": "return", "loc": [595, 595], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L594_C4", "vector": [13, 2, 0.9297, 0.0016, 2, 0.7, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "label": "get_form_field", "type": "function", "loc": [597, 601], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "vector": [2, 1, 0.9359, 0.0078, 1, 0.53, 1.0, 763, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "get_form_field", "arg_names": ["self", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_form_field(self, **kwargs):\n defaults = FakeModelProperty.get_fake_defaults(self.model,\n multiple=True, **kwargs)\n defaults['required'] = False\n return super(FakeModelListProperty, self).get_form_field(**defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L598_C8", "label": "defaults = get_fake_defaults()", "type": "assigned_variable", "loc": [598, 599], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "vector": [14, 2, 0.9352, 0.0031, 2, 0.02, 0.0, 233, 3, 3, 0, 0, 13, 10, 1], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "get_fake_defaults", "annotation": ""}, "snippet": " defaults = FakeModelProperty.get_fake_defaults(self.model,\n multiple=True, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L600_C8", "label": "assign", "type": "assigned_variable", "loc": [600, 600], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "vector": [14, 2, 0.9375, 0.0016, 2, 0.02, 0.5, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaults['required'] = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L601_C8", "label": "return", "type": "return", "loc": [601, 601], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "vector": [13, 2, 0.9391, 0.0016, 2, 0.02, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return super(FakeModelListProperty, self).get_form_field(**defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "label": "KeyListProperty", "type": "class", "loc": [603, 640], "level": 0, "parent": null, "vector": [3, 0, 0.9711, 0.0594, 0, 0.66, 1.0, 284, 0, 4, 0, 0, 451, 0, 18], "semantic": {"name": "KeyListProperty", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class KeyListProperty(db.ListProperty):\n \"\"\"Simulates a many-to-many relation using a list property.\n \n On the model level you interact with keys, but when used in a ModelForm\n you get a ModelMultipleChoiceField (as if it were a ManyToManyField).\"\"\"\n\n def __init__(self, reference_class, *args, **kwargs):\n self._reference_class = reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L604_C4", "label": "expression", "type": "expression", "loc": [604, 607], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "vector": [8, 1, 0.9461, 0.0063, 1, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Simulates a many-to-many relation using a list property.\n \n On the model level you interact with keys, but when used in a ModelForm\n you get a ModelMultipleChoiceField (as if it were a ManyToManyField).\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4", "label": "__init__", "type": "function", "loc": [609, 611], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "vector": [2, 1, 0.9531, 0.0047, 1, 0.77, 0.25, 555, 0, 4, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "reference_class", "args", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, reference_class, *args, **kwargs):\n self._reference_class = reference_class\n super(KeyListProperty, self).__init__(db.Key, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L610_C8", "label": "self._reference_class =", "type": "assigned_variable", "loc": [610, 610], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4", "vector": [14, 2, 0.9531, 0.0016, 2, 0.84, 0.0, 890, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._reference_class", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._reference_class = reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L611_C8", "label": "__init__()", "type": "expression", "loc": [611, 611], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4", "vector": [8, 2, 0.9547, 0.0016, 2, 0.84, 1.0, 555, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(KeyListProperty, self).__init__(db.Key, *args, **kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4", "label": "reference_class", "type": "function", "loc": [614, 619], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "vector": [2, 1, 0.9633, 0.0094, 1, 0.77, 0.5, 199, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "reference_class", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def reference_class(self):\n if isinstance(self._reference_class, basestring):\n from django.db import models\n self._reference_class = models.get_model(\n *self._reference_class.split('.', 1))\n return self._reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8", "label": "if", "type": "if", "loc": [615, 618], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4", "vector": [4, 2, 0.9633, 0.0063, 2, 0.22, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(self._reference_class, basestring):\n from django.db import models\n self._reference_class = models.get_model(\n *self._reference_class.split('.', 1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L616_C12", "label": "from django.db import models", "type": "import", "loc": [616, 616], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8", "vector": [1, 3, 0.9625, 0.0016, 3, 0.03, 0.0, 40, 0, 1, 0, 0, 40, 0, 0], "semantic": {"name": "django.db", "arg_names": [], "import_names": ["models"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django.db import models"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L617_C12", "label": "self._reference_class = get_model()", "type": "assigned_variable", "loc": [617, 618], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8", "vector": [14, 3, 0.9648, 0.0031, 3, 0.03, 1.0, 890, 3, 1, 0, 0, 115, 10, 2], "semantic": {"name": "self._reference_class", "arg_names": [], "import_names": [], "rhs_call_name": "get_model", "annotation": ""}, "snippet": " self._reference_class = models.get_model(\n *self._reference_class.split('.', 1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L619_C8", "label": "return", "type": "return", "loc": [619, 619], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4", "vector": [13, 2, 0.9672, 0.0016, 2, 0.22, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._reference_class"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "label": "validate", "type": "function", "loc": [621, 632], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "vector": [2, 1, 0.9789, 0.0187, 1, 0.77, 0.75, 628, 0, 2, 1, 0, 0, 0, 9], "semantic": {"name": "validate", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def validate(self, value):\n new_value = []\n for item in value:\n if isinstance(item, basestring):\n item = db.Key(item)\n if isinstance(item, self.reference_class):\n item = item.key()\n if not isinstance(item, db.Key):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L622_C8", "label": "new_value =", "type": "assigned_variable", "loc": [622, 622], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "vector": [14, 2, 0.9719, 0.0016, 2, 0.82, 0.0, 832, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "new_value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " new_value = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "label": "for item", "type": "for", "loc": [623, 631], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "vector": [6, 2, 0.9797, 0.0141, 2, 0.82, 0.5, 434, 2, 0, 0, 0, 0, 0, 7], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for item in value:\n if isinstance(item, basestring):\n item = db.Key(item)\n if isinstance(item, self.reference_class):\n item = item.key()\n if not isinstance(item, db.Key):\n raise db.BadValueError('Value must be a key or of type %s' %\n self.reference_class.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L624_C12", "label": "if", "type": "if", "loc": [624, 625], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "vector": [4, 3, 0.9758, 0.0031, 3, 0.2, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(item, basestring):\n item = db.Key(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L625_C16", "label": "item = Key()", "type": "assigned_variable", "loc": [625, 625], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L624_C12", "vector": [14, 4, 0.9766, 0.0016, 4, 0.14, 0.0, 434, 3, 1, 0, 0, 617, 10, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "Key", "annotation": ""}, "snippet": " item = db.Key(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L626_C12", "label": "if", "type": "if", "loc": [626, 627], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "vector": [4, 3, 0.9789, 0.0031, 3, 0.2, 0.3333, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(item, self.reference_class):\n item = item.key()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L627_C16", "label": "item = key()", "type": "assigned_variable", "loc": [627, 627], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:If_L626_C12", "vector": [14, 4, 0.9797, 0.0016, 4, 0.6, 0.0, 434, 3, 0, 0, 0, 230, 10, 1], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "key", "annotation": ""}, "snippet": " item = item.key()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:If_L628_C12", "label": "if", "type": "if", "loc": [628, 630], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "vector": [4, 3, 0.9828, 0.0047, 3, 0.2, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(item, db.Key):\n raise db.BadValueError('Value must be a key or of type %s' %\n self.reference_class.__name__)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L631_C12", "label": "append()", "type": "expression", "loc": [631, 631], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "vector": [8, 3, 0.9859, 0.0016, 3, 0.2, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " new_value.append(item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L632_C8", "label": "return", "type": "return", "loc": [632, 632], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "vector": [13, 2, 0.9875, 0.0016, 2, 0.82, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return super(KeyListProperty, self).validate(new_value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "label": "get_form_field", "type": "function", "loc": [634, 640], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "vector": [2, 1, 0.9953, 0.0109, 1, 0.77, 1.0, 763, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "get_form_field", "arg_names": ["self", "kwargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_form_field(self, **kwargs):\n from django import forms\n defaults = {'form_class': forms.ModelMultipleChoiceField,\n 'queryset': self.reference_class.all(),\n 'required': False}\n defaults.update(kwargs)\n return super(KeyListProperty, self).get_form_field(**defaults)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L635_C8", "label": "from django import forms", "type": "import", "loc": [635, 635], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "vector": [1, 2, 0.9922, 0.0016, 2, 0.83, 0.0, 294, 0, 1, 0, 0, 294, 0, 0], "semantic": {"name": "django", "arg_names": [], "import_names": ["forms"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django import forms"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L636_C8", "label": "defaults =", "type": "assigned_variable", "loc": [636, 638], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "vector": [14, 2, 0.9953, 0.0047, 2, 0.83, 0.3333, 233, 0, 0, 0, 0, 0, 6, 1], "semantic": {"name": "defaults", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " defaults = {'form_class': forms.ModelMultipleChoiceField,\n 'queryset': self.reference_class.all(),\n 'required': False}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L639_C8", "label": "update()", "type": "expression", "loc": [639, 639], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "vector": [8, 2, 0.9984, 0.0016, 2, 0.83, 0.6667, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " defaults.update(kwargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L640_C8", "label": "return", "type": "return", "loc": [640, 640], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "vector": [13, 2, 1.0, 0.0016, 2, 0.83, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return super(KeyListProperty, self).get_form_field(**defaults)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L23_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L33_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L34_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L29_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L36_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L41_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L66_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L81_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L76_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:While_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L106_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L112_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L119_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L121_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L120_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L123_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L124_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L117_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L129_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L131_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L132_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L132_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L133_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L135_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L127_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L137_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L126_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L141_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L142_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L142_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L143_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L143_C28", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L144_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L140_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L145_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L145_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L146_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L149_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L138_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L150_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L152_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L151_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L153_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L157_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L156_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L158_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L158_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L159_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L154_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L163_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L105_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L164_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L168_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L180_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L191_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L192_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L193_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L195_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L196_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L197_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L197_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L198_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L198_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L199_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L201_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L204_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L205_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L203_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L207_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L210_C36"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L209_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L212_C36"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L208_C28", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L214_C36"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L213_C32", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L216_C36"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L206_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L218_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L202_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L219_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L220_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L194_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L221_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L179_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L228_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L229_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L230_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L233_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L232_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L235_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L237_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L240_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L239_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L242_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L238_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L250_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L249_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L252_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L251_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L254_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L246_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L259_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L262_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L261_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L264_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L260_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L266_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L265_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L268_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L258_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L269_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L280_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L280_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L282_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L283_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Import_L285_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L279_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L286_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L278_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L272_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L291_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L295_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L298_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L297_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L300_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L296_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L302_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L301_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L304_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L294_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L305_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L308_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L318_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L318_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L320_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:Try_L323_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L324_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L331_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L329_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L333_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L332_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L335_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L337_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L338_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L321_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L307_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L340_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L342_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L345_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L342_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L347_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L348_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L349_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L346_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L352_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L353_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L354_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L358_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L358_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L359_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L361_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L361_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L362_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L363_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L363_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L365_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L365_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L366_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L371_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L372_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L374_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L376_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L378_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L381_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L381_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L382_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L382_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L383_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L379_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L385_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L385_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L386_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L386_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L387_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L390_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L391_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L396_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L397_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L369_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L405_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L406_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L409_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L411_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L414_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L414_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L416_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L415_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L417_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L421_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L422_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L426_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L427_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L404_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L428_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L357_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L431_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L434_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L434_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L435_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L436_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L437_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L438_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L438_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L439_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L440_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L440_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L441_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L442_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L433_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L444_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L444_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L445_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L448_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L459_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L462_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L461_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L466_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L467_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L469_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L469_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L470_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L472_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L472_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L473_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L476_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L476_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L477_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L480_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L480_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L481_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L484_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L484_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L485_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L488_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L488_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L489_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L447_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L491_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L491_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L492_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L497_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L500_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L501_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L499_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L502_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L505_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L505_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L506_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L507_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L510_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L510_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L511_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L504_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L512_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L515_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L516_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L516_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L517_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L518_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L518_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L519_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L514_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L520_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L523_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L523_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L524_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L522_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L525_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L527_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L527_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L528_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L530_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L530_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L531_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L534_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L534_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L535_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L533_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L536_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L540_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L541_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L543_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L544_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L539_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L545_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L496_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L549_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L550_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L551_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L548_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L553_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L547_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L554_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L557_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L560_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L561_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L561_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L562_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L559_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L563_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L567_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L569_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L569_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L570_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L571_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L568_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L574_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L575_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L575_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L576_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L566_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L577_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L580_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L581_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L581_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L582_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L579_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L584_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L587_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L587_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L588_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L591_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L591_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L592_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L594_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L594_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L595_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L556_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L598_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L600_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L597_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L601_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L604_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L610_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L609_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L611_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L616_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L615_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L617_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L614_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L619_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L622_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L624_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L624_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L625_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L626_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:If_L626_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L627_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:If_L628_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:For_L623_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L631_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L621_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L632_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:ClassDef_L603_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:ImportFrom_L635_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Assign_L636_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Expr_L639_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_256:FunctionDef_L634_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_256:Return_L640_C8"}]
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update import sys from mediautils.generatemedia import updatemedia if len(sys.argv) >= 2 and sys.argv[1] == 'update': updatemedia(True) import settings from django.core.management import execute_manager execute_manager(settings)
ajibawa-2023/Python-Code-Large/train/row_257
12
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "label": "if", "type": "if", "loc": [2, 18], "level": 0, "parent": null, "vector": [4, 0, 0.5556, 0.9444, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n from common.appenginepatch.aecmd import setup_env\n setup_env(manage_py_env=True)\n\n # Recompile translation files\n from mediautils.compilemessages import updatemessages\n updatemessages()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L3_C4", "label": "from common.appenginepatch.aecmd import setup_env", "type": "import", "loc": [3, 3], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.1667, 0.0556, 1, 0.99, 0.0, 448, 0, 1, 0, 0, 448, 0, 0], "semantic": {"name": "common.appenginepatch.aecmd", "arg_names": [], "import_names": ["setup_env"], "rhs_call_name": "", "annotation": ""}, "snippet": " from common.appenginepatch.aecmd import setup_env"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L4_C4", "label": "setup_env()", "type": "expression", "loc": [4, 4], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [8, 1, 0.2222, 0.0556, 1, 0.99, 0.1111, 193, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setup_env", "arg_names": [], "import_names": [], "rhs_call_name": "setup_env", "annotation": ""}, "snippet": " setup_env(manage_py_env=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L7_C4", "label": "from mediautils.compilemessages import updatemessages", "type": "import", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.3889, 0.0556, 1, 0.99, 0.2222, 916, 0, 1, 0, 0, 916, 0, 0], "semantic": {"name": "mediautils.compilemessages", "arg_names": [], "import_names": ["updatemessages"], "rhs_call_name": "", "annotation": ""}, "snippet": " from mediautils.compilemessages import updatemessages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L8_C4", "label": "updatemessages()", "type": "expression", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [8, 1, 0.4444, 0.0556, 1, 0.99, 0.3333, 813, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "updatemessages", "arg_names": [], "import_names": [], "rhs_call_name": "updatemessages", "annotation": ""}, "snippet": " updatemessages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Import_L11_C4", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.6111, 0.0556, 1, 0.99, 0.4444, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": " import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L12_C4", "label": "from mediautils.generatemedia import updatemedia", "type": "import", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.6667, 0.0556, 1, 0.99, 0.5556, 547, 0, 1, 0, 0, 547, 0, 0], "semantic": {"name": "mediautils.generatemedia", "arg_names": [], "import_names": ["updatemedia"], "rhs_call_name": "", "annotation": ""}, "snippet": " from mediautils.generatemedia import updatemedia"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:If_L13_C4", "label": "if", "type": "if", "loc": [13, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [4, 1, 0.75, 0.1111, 1, 0.99, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(sys.argv) >= 2 and sys.argv[1] == 'update':\n updatemedia(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L14_C8", "label": "updatemedia()", "type": "expression", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L13_C4", "vector": [8, 2, 0.7778, 0.0556, 2, 0.15, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updatemedia", "arg_names": [], "import_names": [], "rhs_call_name": "updatemedia", "annotation": ""}, "snippet": " updatemedia(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Import_L16_C4", "label": "settings import settings", "type": "import", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.8889, 0.0556, 1, 0.99, 0.7778, 168, 0, 1, 0, 0, 168, 0, 0], "semantic": {"name": "settings", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": " import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L17_C4", "label": "from django.core.management import execute_manager", "type": "import", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [1, 1, 0.9444, 0.0556, 1, 0.99, 0.8889, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management", "arg_names": [], "import_names": ["execute_manager"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django.core.management import execute_manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L18_C4", "label": "execute_manager()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "vector": [8, 1, 1.0, 0.0556, 1, 0.99, 1.0, 383, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute_manager", "arg_names": [], "import_names": [], "rhs_call_name": "execute_manager", "annotation": ""}, "snippet": " execute_manager(settings)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Import_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_257:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_257:Expr_L18_C4"}]
from ragendja.settings_post import settings settings.add_app_media('combined-%(LANGUAGE_CODE)s.js', 'jquery/jquery.js', 'jquery/jquery.fixes.js', 'jquery/jquery.ajax-queue.js', 'jquery/jquery.bgiframe.js', 'jquery/jquery.livequery.js', 'jquery/jquery.form.js', )
ajibawa-2023/Python-Code-Large/train/row_258
2
9
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_258:ImportFrom_L1_C0", "label": "from ragendja.settings_post import settings", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.1111, 0, 0.66, 0.0, 898, 0, 1, 0, 0, 898, 0, 0], "semantic": {"name": "ragendja.settings_post", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ragendja.settings_post import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_258:Expr_L2_C0", "label": "add_app_media()", "type": "expression", "loc": [2, 9], "level": 0, "parent": null, "vector": [8, 0, 0.6111, 0.8889, 0, 0.66, 1.0, 197, 3, 7, 0, 0, 0, 0, 1], "semantic": {"name": "add_app_media", "arg_names": [], "import_names": [], "rhs_call_name": "add_app_media", "annotation": ""}, "snippet": "settings.add_app_media('combined-%(LANGUAGE_CODE)s.js',\n 'jquery/jquery.js',\n 'jquery/jquery.fixes.js',\n 'jquery/jquery.ajax-queue.js',\n 'jquery/jquery.bgiframe.js',\n 'jquery/jquery.livequery.js',\n 'jquery/jquery.form.js',\n)"}]
[]
#!/usr/bin/env python if __name__ == '__main__': from common.appenginepatch.aecmd import setup_env setup_env(manage_py_env=True) # Recompile translation files from mediautils.compilemessages import updatemessages updatemessages() # Generate compressed media files for manage.py update import sys from mediautils.generatemedia import updatemedia if len(sys.argv) >= 2 and sys.argv[1] == 'update': updatemedia(True) import settings from django.core.management import execute_manager execute_manager(settings)
ajibawa-2023/Python-Code-Large/train/row_259
12
18
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "label": "if", "type": "if", "loc": [2, 18], "level": 0, "parent": null, "vector": [4, 0, 0.5556, 0.9444, 0, 0.66, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n from common.appenginepatch.aecmd import setup_env\n setup_env(manage_py_env=True)\n\n # Recompile translation files\n from mediautils.compilemessages import updatemessages\n updatemessages()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L3_C4", "label": "from common.appenginepatch.aecmd import setup_env", "type": "import", "loc": [3, 3], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.1667, 0.0556, 1, 0.43, 0.0, 448, 0, 1, 0, 0, 448, 0, 0], "semantic": {"name": "common.appenginepatch.aecmd", "arg_names": [], "import_names": ["setup_env"], "rhs_call_name": "", "annotation": ""}, "snippet": " from common.appenginepatch.aecmd import setup_env"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L4_C4", "label": "setup_env()", "type": "expression", "loc": [4, 4], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [8, 1, 0.2222, 0.0556, 1, 0.43, 0.1111, 193, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setup_env", "arg_names": [], "import_names": [], "rhs_call_name": "setup_env", "annotation": ""}, "snippet": " setup_env(manage_py_env=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L7_C4", "label": "from mediautils.compilemessages import updatemessages", "type": "import", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.3889, 0.0556, 1, 0.43, 0.2222, 916, 0, 1, 0, 0, 916, 0, 0], "semantic": {"name": "mediautils.compilemessages", "arg_names": [], "import_names": ["updatemessages"], "rhs_call_name": "", "annotation": ""}, "snippet": " from mediautils.compilemessages import updatemessages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L8_C4", "label": "updatemessages()", "type": "expression", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [8, 1, 0.4444, 0.0556, 1, 0.43, 0.3333, 813, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "updatemessages", "arg_names": [], "import_names": [], "rhs_call_name": "updatemessages", "annotation": ""}, "snippet": " updatemessages()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Import_L11_C4", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.6111, 0.0556, 1, 0.43, 0.4444, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": " import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L12_C4", "label": "from mediautils.generatemedia import updatemedia", "type": "import", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.6667, 0.0556, 1, 0.43, 0.5556, 547, 0, 1, 0, 0, 547, 0, 0], "semantic": {"name": "mediautils.generatemedia", "arg_names": [], "import_names": ["updatemedia"], "rhs_call_name": "", "annotation": ""}, "snippet": " from mediautils.generatemedia import updatemedia"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:If_L13_C4", "label": "if", "type": "if", "loc": [13, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [4, 1, 0.75, 0.1111, 1, 0.43, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(sys.argv) >= 2 and sys.argv[1] == 'update':\n updatemedia(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L14_C8", "label": "updatemedia()", "type": "expression", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L13_C4", "vector": [8, 2, 0.7778, 0.0556, 2, 0.44, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updatemedia", "arg_names": [], "import_names": [], "rhs_call_name": "updatemedia", "annotation": ""}, "snippet": " updatemedia(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Import_L16_C4", "label": "settings import settings", "type": "import", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.8889, 0.0556, 1, 0.43, 0.7778, 168, 0, 1, 0, 0, 168, 0, 0], "semantic": {"name": "settings", "arg_names": [], "import_names": ["settings"], "rhs_call_name": "", "annotation": ""}, "snippet": " import settings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L17_C4", "label": "from django.core.management import execute_manager", "type": "import", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [1, 1, 0.9444, 0.0556, 1, 0.43, 0.8889, 879, 0, 1, 0, 0, 879, 0, 0], "semantic": {"name": "django.core.management", "arg_names": [], "import_names": ["execute_manager"], "rhs_call_name": "", "annotation": ""}, "snippet": " from django.core.management import execute_manager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L18_C4", "label": "execute_manager()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "vector": [8, 1, 1.0, 0.0556, 1, 0.43, 1.0, 383, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "execute_manager", "arg_names": [], "import_names": [], "rhs_call_name": "execute_manager", "annotation": ""}, "snippet": " execute_manager(settings)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L3_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Import_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:If_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Import_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:ImportFrom_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_259:If_L2_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_259:Expr_L18_C4"}]
#!/usr/bin/env python # -*- Python -*- import sys import time sys.path.append(".") # Import RTM module import OpenRTM_aist import RTC import socket import httplib from time import sleep # Import Service implementation class # <rtc-template block="service_impl"> # </rtc-template> # Import Service stub modules # <rtc-template block="global_idl"> # </rtc-template> # This module's spesification # <rtc-template block="module_spec"> proxy_spec = ["implementation_id", "Proxy", "type_name", "Proxy", "description", "RTC-Lite for Arduino", "version", "1.0.0", "vendor", "AIST", "category", "Proxy", "activity_type", "STATIC", "max_instance", "1", "language", "Python", "lang_type", "SCRIPT", ""] # </rtc-template> class Proxy(OpenRTM_aist.DataFlowComponentBase): def __init__(self, manager): OpenRTM_aist.DataFlowComponentBase.__init__(self, manager) # DataPorts initialization # <rtc-template block="data_ports"> self._d_Watt =RTC.TimedShort(RTC.Time(0,0),0) self._d_Light =RTC.TimedShort(RTC.Time(0,0),0) self._d_Temp =RTC.TimedShort(RTC.Time(0,0),0) self._WattOut =OpenRTM_aist.OutPort("Watt", self._d_Watt, OpenRTM_aist.RingBuffer(8)) self._LightOut =OpenRTM_aist.OutPort("Light", self._d_Light, OpenRTM_aist.RingBuffer(8)) self._TempOut =OpenRTM_aist.OutPort("Temp", self._d_Temp, OpenRTM_aist.RingBuffer(8)) # Set OutPort buffer self.registerOutPort("Watt",self._WattOut) self.registerOutPort("Light",self._LightOut) self.registerOutPort("Temp",self._TempOut) self._remoteIP="" # </rtc-template> # DataPorts initialization # <rtc-template block="service_ports"> # </rtc-template> # initialize of configuration-data. # <rtc-template block="configurations"> # </rtc-template> def onInitialize(self): # Bind variables and configuration variable # <rtc-template block="bind_config"> # </rtc-template> return RTC.RTC_OK #def onFinalize(self): # return RTC.RTC_OK #def onStartup(self, ec_id): # return RTC.RTC_OK #def onShutdown(self, ec_id): # return RTC.RTC_OK def onActivated(self, ec_id): print "onActivated" host ='' port =80 address ="255.255.255.255" recv_port =1300 recv_timeout =5 s =socket.socket( socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.setsockopt( socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.bind( ( host, port)) r =socket.socket(socket.AF_INET, socket.SOCK_DGRAM) r.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) r.bind((host, recv_port)) r.settimeout( recv_timeout) max =5 count =0 while count <5: print "try: ", count s.sendto( str(count), ( address, port)) try: message, ip_and_port = r.recvfrom(8192) if len( message) >0: print "message:", message, "from", ip_and_port self._remoteIP =ip_and_port[0] s.close() r.close() return RTC.RTC_OK except: count +=1 s.close() r.close() return RTC.RTC_ERROR def onDeactivated(self, ec_id): print "onDeactivated!" return RTC.RTC_OK def onExecute(self, ec_id): print "onExecute!" conn =httplib.HTTPConnection( self._remoteIP) conn.request( "GET", "/EXE") r =conn.getresponse() conn.close() print r.status, r.reason data =r.read() token =data.split( '\r\n') self._d_Watt.data =int(token[0]) self._d_Light.data =int(token[1]) self._d_Temp.data =int(token[2]) print self._d_Watt.data print self._d_Light.data print self._d_Temp.data self._WattOut.write() self._LightOut.write() self._TempOut.write() time.sleep( 1) return RTC.RTC_OK #def onAborting(self, ec_id): # return RTC.RTC_OK def onError(self, ec_id): print "onError!" return RTC.RTC_OK #def onReset(self, ec_id): # return RTC.RTC_OK #def onStateUpdate(self, ec_id): # return RTC.RTC_OK #def onRateChanged(self, ec_id): # return RTC.RTC_OK def MyModuleInit(manager): profile = OpenRTM_aist.Properties(defaults_str=proxy_spec) manager.registerFactory(profile, Proxy, OpenRTM_aist.Delete) # Create a component comp = manager.createComponent("Proxy") def main(): mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv) mgr.setModuleInitProc(MyModuleInit) mgr.activateManager() mgr.runManager() if __name__ == "__main__": main()
ajibawa-2023/Python-Code-Large/train/row_260
92
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.019, 0.0048, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L5_C0", "label": "time import time", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0048, 0, 0.66, 0.0833, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L6_C0", "label": "append()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0286, 0.0048, 0, 0.66, 0.1667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "sys.path.append(\".\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L9_C0", "label": "OpenRTM_aist import OpenRTM_aist", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0429, 0.0048, 0, 0.66, 0.25, 119, 0, 1, 0, 0, 119, 0, 0], "semantic": {"name": "OpenRTM_aist", "arg_names": [], "import_names": ["OpenRTM_aist"], "rhs_call_name": "", "annotation": ""}, "snippet": "import OpenRTM_aist"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L10_C0", "label": "RTC import RTC", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0048, 0, 0.66, 0.3333, 744, 0, 1, 0, 0, 744, 0, 0], "semantic": {"name": "RTC", "arg_names": [], "import_names": ["RTC"], "rhs_call_name": "", "annotation": ""}, "snippet": "import RTC"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L12_C0", "label": "socket import socket", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0571, 0.0048, 0, 0.66, 0.4167, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs_call_name": "", "annotation": ""}, "snippet": "import socket"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Import_L13_C0", "label": "httplib import httplib", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0619, 0.0048, 0, 0.66, 0.5, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import httplib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:ImportFrom_L14_C0", "label": "from time import sleep", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0048, 0, 0.66, 0.5833, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["sleep"], "rhs_call_name": "", "annotation": ""}, "snippet": "from time import sleep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L29_C0", "label": "proxy_spec =", "type": "assigned_variable", "loc": [29, 39], "level": 0, "parent": null, "vector": [14, 0, 0.1619, 0.0524, 0, 0.66, 0.6667, 773, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "proxy_spec", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "proxy_spec = [\"implementation_id\", \"Proxy\", \n\t\t \"type_name\", \"Proxy\", \n\t\t \"description\", \"RTC-Lite for Arduino\", \n\t\t \"version\", \"1.0.0\", \n\t\t \"vendor\", \"AIST\", \n\t\t \"category\", \"Proxy\", \n\t\t \"activity_type\", \"STATIC\", \n\t\t \"max_instance\", \"1\", "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "label": "Proxy", "type": "class", "loc": [43, 176], "level": 0, "parent": null, "vector": [3, 0, 0.5214, 0.6381, 0, 0.66, 0.75, 363, 0, 6, 0, 0, 459, 0, 55], "semantic": {"name": "Proxy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Proxy(OpenRTM_aist.DataFlowComponentBase):\n\tdef __init__(self, manager):\n\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)\n\n\t\t# DataPorts initialization\n\t\t# <rtc-template block=\"data_ports\">\n\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "label": "__init__", "type": "function", "loc": [44, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.2524, 0.0905, 1, 0.66, 0.0, 555, 0, 2, 0, 0, 0, 0, 16], "semantic": {"name": "__init__", "arg_names": ["self", "manager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, manager):\n\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)\n\n\t\t# DataPorts initialization\n\t\t# <rtc-template block=\"data_ports\">\n\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Temp =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L45_C2", "label": "__init__()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [8, 2, 0.2143, 0.0048, 2, 0.15, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": "\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L49_C2", "label": "self._d_Watt = TimedShort()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2333, 0.0048, 2, 0.15, 0.1, 747, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Watt", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L50_C2", "label": "self._d_Light = TimedShort()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2381, 0.0048, 2, 0.15, 0.2, 455, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Light", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L51_C2", "label": "self._d_Temp = TimedShort()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2429, 0.0048, 2, 0.15, 0.3, 977, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Temp", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Temp =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L53_C2", "label": "self._WattOut = OutPort()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2524, 0.0048, 2, 0.15, 0.4, 247, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._WattOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._WattOut =OpenRTM_aist.OutPort(\"Watt\", self._d_Watt, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L54_C2", "label": "self._LightOut = OutPort()", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2571, 0.0048, 2, 0.15, 0.5, 700, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._LightOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._LightOut =OpenRTM_aist.OutPort(\"Light\", self._d_Light, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L55_C2", "label": "self._TempOut = OutPort()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2619, 0.0048, 2, 0.15, 0.6, 870, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._TempOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._TempOut =OpenRTM_aist.OutPort(\"Temp\", self._d_Temp, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L58_C2", "label": "registerOutPort()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [8, 2, 0.2762, 0.0048, 2, 0.15, 0.7, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Watt\",self._WattOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L59_C2", "label": "registerOutPort()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [8, 2, 0.281, 0.0048, 2, 0.15, 0.8, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Light\",self._LightOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L60_C2", "label": "registerOutPort()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [8, 2, 0.2857, 0.0048, 2, 0.15, 0.9, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Temp\",self._TempOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L62_C2", "label": "self._remoteIP =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "vector": [14, 2, 0.2952, 0.0048, 2, 0.15, 1.0, 633, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._remoteIP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself._remoteIP=\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L79_C1", "label": "onInitialize", "type": "function", "loc": [79, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.3905, 0.0333, 1, 0.66, 0.2, 910, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "onInitialize", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onInitialize(self):\n\t\t# Bind variables and configuration variable\n\t\t# <rtc-template block=\"bind_config\">\n\n\n\t\t# </rtc-template>\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L85_C2", "label": "return", "type": "return", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L79_C1", "vector": [13, 2, 0.4048, 0.0048, 2, 0.2, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "label": "onActivated", "type": "function", "loc": [97, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.5548, 0.1905, 1, 0.66, 0.4, 683, 0, 2, 1, 0, 0, 0, 19], "semantic": {"name": "onActivated", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onActivated(self, ec_id):\n\t\t\n\t\tprint(\"onActivated\")\n\n\t\thost =''\n\t\tport =80\n\t\taddress =\"255.255.255.255\"\n\t\trecv_port =1300"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L99_C2", "label": "print()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.4714, 0.0048, 2, 0.92, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onActivated\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L101_C2", "label": "host =", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.481, 0.0048, 2, 0.92, 0.0526, 867, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "host", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\thost =''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L102_C2", "label": "port =", "type": "assigned_variable", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.4857, 0.0048, 2, 0.92, 0.1053, 308, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tport =80"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L103_C2", "label": "address =", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.4905, 0.0048, 2, 0.92, 0.1579, 666, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "address", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\taddress =\"255.255.255.255\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L104_C2", "label": "recv_port =", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.4952, 0.0048, 2, 0.92, 0.2105, 94, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "recv_port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\trecv_port =1300"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L105_C2", "label": "recv_timeout =", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.5, 0.0048, 2, 0.92, 0.2632, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "recv_timeout", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\trecv_timeout =5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L107_C2", "label": "s = socket()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.5095, 0.0048, 2, 0.92, 0.3158, 553, 3, 2, 0, 0, 687, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "socket", "annotation": ""}, "snippet": "\t\ts =socket.socket( socket.AF_INET, socket.SOCK_DGRAM)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L108_C2", "label": "setsockopt()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.5143, 0.0048, 2, 0.92, 0.3684, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\ts.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L109_C2", "label": "setsockopt()", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.519, 0.0048, 2, 0.92, 0.4211, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\ts.setsockopt( socket.SOL_SOCKET, socket.SO_BROADCAST, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L110_C2", "label": "bind()", "type": "expression", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.5238, 0.0048, 2, 0.92, 0.4737, 640, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": "\t\ts.bind( ( host, port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L112_C2", "label": "r = socket()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.5333, 0.0048, 2, 0.92, 0.5263, 436, 3, 2, 0, 0, 687, 10, 1], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "socket", "annotation": ""}, "snippet": "\t\tr =socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L113_C2", "label": "setsockopt()", "type": "expression", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.5381, 0.0048, 2, 0.92, 0.5789, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\tr.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L114_C2", "label": "bind()", "type": "expression", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.5429, 0.0048, 2, 0.92, 0.6316, 640, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": "\t\tr.bind((host, recv_port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L115_C2", "label": "settimeout()", "type": "expression", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.5476, 0.0048, 2, 0.92, 0.6842, 27, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "settimeout", "arg_names": [], "import_names": [], "rhs_call_name": "settimeout", "annotation": ""}, "snippet": "\t\tr.settimeout( recv_timeout)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L117_C2", "label": "max =", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.5571, 0.0048, 2, 0.92, 0.7368, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "max", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tmax =5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L118_C2", "label": "count =", "type": "assigned_variable", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [14, 2, 0.5619, 0.0048, 2, 0.92, 0.7895, 778, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcount =0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "label": "while", "type": "while", "loc": [119, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [5, 2, 0.5976, 0.0667, 2, 0.92, 0.8421, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\twhile count <5:\n\t\t\tprint(\"try: \", count)\n\n\t\t\ts.sendto( str(count), ( address, port))\n\t\t\ttry:\n\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)\n\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L120_C3", "label": "print()", "type": "expression", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "vector": [8, 3, 0.5714, 0.0048, 3, 0.72, 0.0, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\t\tprint(\"try: \", count)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L122_C3", "label": "sendto()", "type": "expression", "loc": [122, 122], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "vector": [8, 3, 0.581, 0.0048, 3, 0.72, 0.5, 765, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "sendto", "arg_names": [], "import_names": [], "rhs_call_name": "sendto", "annotation": ""}, "snippet": "\t\t\ts.sendto( str(count), ( address, port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3", "label": "try", "type": "try", "loc": [123, 132], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "vector": [7, 3, 0.6071, 0.0476, 3, 0.72, 1.0, 0, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)\n\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)\n\t\t\t\t\tself._remoteIP =ip_and_port[0]\n\t\t\t\t\ts.close()\n\t\t\t\t\tr.close()\n\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L124_C4", "label": "message, ip_and_port = recvfrom()", "type": "assigned_variable", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3", "vector": [14, 4, 0.5905, 0.0048, 4, 0.57, 0.0, 763, 3, 1, 0, 0, 878, 10, 1], "semantic": {"name": "message, ip_and_port", "arg_names": [], "import_names": [], "rhs_call_name": "recvfrom", "annotation": ""}, "snippet": "\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "label": "if", "type": "if", "loc": [125, 130], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3", "vector": [4, 4, 0.6071, 0.0286, 4, 0.57, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)\n\t\t\t\t\tself._remoteIP =ip_and_port[0]\n\t\t\t\t\ts.close()\n\t\t\t\t\tr.close()\n\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L126_C5", "label": "print()", "type": "expression", "loc": [126, 126], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "vector": [8, 5, 0.6, 0.0048, 5, 0.39, 0.0, 535, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L127_C5", "label": "self._remoteIP =", "type": "assigned_variable", "loc": [127, 127], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "vector": [14, 5, 0.6048, 0.0048, 5, 0.39, 0.25, 633, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._remoteIP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tself._remoteIP =ip_and_port[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L128_C5", "label": "close()", "type": "expression", "loc": [128, 128], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "vector": [8, 5, 0.6095, 0.0048, 5, 0.39, 0.5, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\t\t\t\ts.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L129_C5", "label": "close()", "type": "expression", "loc": [129, 129], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "vector": [8, 5, 0.6143, 0.0048, 5, 0.39, 0.75, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\t\t\t\tr.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L130_C5", "label": "return", "type": "return", "loc": [130, 130], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "vector": [13, 5, 0.619, 0.0048, 5, 0.39, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L134_C2", "label": "close()", "type": "expression", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.6381, 0.0048, 2, 0.92, 0.8947, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\ts.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L135_C2", "label": "close()", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [8, 2, 0.6429, 0.0048, 2, 0.92, 0.9474, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\tr.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L136_C2", "label": "return", "type": "return", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "vector": [13, 2, 0.6476, 0.0048, 2, 0.92, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_ERROR"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1", "label": "onDeactivated", "type": "function", "loc": [138, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.6619, 0.0143, 1, 0.66, 0.6, 943, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "onDeactivated", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onDeactivated(self, ec_id):\n\t\tprint(\"onDeactivated!\")\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L139_C2", "label": "print()", "type": "expression", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1", "vector": [8, 2, 0.6619, 0.0048, 2, 0.65, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onDeactivated!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L140_C2", "label": "return", "type": "return", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1", "vector": [13, 2, 0.6667, 0.0048, 2, 0.65, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "label": "onExecute", "type": "function", "loc": [142, 169], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.7405, 0.1333, 1, 0.66, 0.8, 3, 0, 2, 1, 0, 0, 0, 18], "semantic": {"name": "onExecute", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onExecute(self, ec_id):\n\t\tprint(\"onExecute!\")\n\t\t\n\t\tconn =httplib.HTTPConnection( self._remoteIP)\n\t\tconn.request( \"GET\", \"/EXE\")\n\t\tr =conn.getresponse()\t\t\t\t\n\t\tconn.close()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L143_C2", "label": "print()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.681, 0.0048, 2, 0.94, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onExecute!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L145_C2", "label": "conn = HTTPConnection()", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.6905, 0.0048, 2, 0.94, 0.0556, 345, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": "\t\tconn =httplib.HTTPConnection( self._remoteIP)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L146_C2", "label": "request()", "type": "expression", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.6952, 0.0048, 2, 0.94, 0.1111, 50, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": "\t\tconn.request( \"GET\", \"/EXE\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L147_C2", "label": "r = getresponse()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7, 0.0048, 2, 0.94, 0.1667, 436, 3, 0, 0, 0, 47, 10, 1], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "getresponse", "annotation": ""}, "snippet": "\t\tr =conn.getresponse()\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L148_C2", "label": "close()", "type": "expression", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7048, 0.0048, 2, 0.94, 0.2222, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\tconn.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L150_C2", "label": "print()", "type": "expression", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7143, 0.0048, 2, 0.94, 0.2778, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(r.status, r.reason)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L152_C2", "label": "data = read()", "type": "assigned_variable", "loc": [152, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7238, 0.0048, 2, 0.94, 0.3333, 929, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": "\t\tdata =r.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L153_C2", "label": "token = split()", "type": "assigned_variable", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7286, 0.0048, 2, 0.94, 0.3889, 129, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": "\t\ttoken =data.split( '\\r\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L155_C2", "label": "self._d_Watt.data = int()", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7381, 0.0048, 2, 0.94, 0.4444, 811, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Watt.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Watt.data =int(token[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L156_C2", "label": "self._d_Light.data = int()", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7429, 0.0048, 2, 0.94, 0.5, 351, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Light.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Light.data =int(token[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L157_C2", "label": "self._d_Temp.data = int()", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [14, 2, 0.7476, 0.0048, 2, 0.94, 0.5556, 935, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Temp.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Temp.data =int(token[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L159_C2", "label": "print()", "type": "expression", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7571, 0.0048, 2, 0.94, 0.6111, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Watt.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L160_C2", "label": "print()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7619, 0.0048, 2, 0.94, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Light.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L161_C2", "label": "print()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7667, 0.0048, 2, 0.94, 0.7222, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Temp.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L163_C2", "label": "write()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7762, 0.0048, 2, 0.94, 0.7778, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._WattOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L164_C2", "label": "write()", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.781, 0.0048, 2, 0.94, 0.8333, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._LightOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L165_C2", "label": "write()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7857, 0.0048, 2, 0.94, 0.8889, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._TempOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L167_C2", "label": "sleep()", "type": "expression", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [8, 2, 0.7952, 0.0048, 2, 0.94, 0.9444, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": "\t\ttime.sleep( 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L169_C2", "label": "return", "type": "return", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "vector": [13, 2, 0.8048, 0.0048, 2, 0.94, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1", "label": "onError", "type": "function", "loc": [174, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "vector": [2, 1, 0.8333, 0.0143, 1, 0.66, 1.0, 445, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "onError", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onError(self, ec_id):\n\t\tprint(\"onError!\")\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L175_C2", "label": "print()", "type": "expression", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1", "vector": [8, 2, 0.8333, 0.0048, 2, 0.22, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onError!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L176_C2", "label": "return", "type": "return", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1", "vector": [13, 2, 0.8381, 0.0048, 2, 0.22, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "label": "MyModuleInit", "type": "function", "loc": [190, 197], "level": 0, "parent": null, "vector": [2, 0, 0.9214, 0.0381, 0, 0.66, 0.8333, 984, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "MyModuleInit", "arg_names": ["manager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def MyModuleInit(manager):\n profile = OpenRTM_aist.Properties(defaults_str=proxy_spec)\n manager.registerFactory(profile,\n Proxy,\n OpenRTM_aist.Delete)\n\n # Create a component\n comp = manager.createComponent(\"Proxy\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L191_C4", "label": "profile = Properties()", "type": "assigned_variable", "loc": [191, 191], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "vector": [14, 1, 0.9095, 0.0048, 1, 0.25, 0.0, 924, 3, 1, 0, 0, 353, 10, 1], "semantic": {"name": "profile", "arg_names": [], "import_names": [], "rhs_call_name": "Properties", "annotation": ""}, "snippet": " profile = OpenRTM_aist.Properties(defaults_str=proxy_spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L192_C4", "label": "registerFactory()", "type": "expression", "loc": [192, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "vector": [8, 1, 0.919, 0.0143, 1, 0.25, 0.5, 98, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "registerFactory", "arg_names": [], "import_names": [], "rhs_call_name": "registerFactory", "annotation": ""}, "snippet": " manager.registerFactory(profile,\n Proxy,\n OpenRTM_aist.Delete)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L197_C4", "label": "comp = createComponent()", "type": "assigned_variable", "loc": [197, 197], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "vector": [14, 1, 0.9381, 0.0048, 1, 0.25, 1.0, 913, 3, 1, 0, 0, 836, 10, 1], "semantic": {"name": "comp", "arg_names": [], "import_names": [], "rhs_call_name": "createComponent", "annotation": ""}, "snippet": " comp = manager.createComponent(\"Proxy\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "label": "main", "type": "function", "loc": [201, 205], "level": 0, "parent": null, "vector": [2, 0, 0.9667, 0.0238, 0, 0.66, 0.9167, 624, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n\tmgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)\n\tmgr.setModuleInitProc(MyModuleInit)\n\tmgr.activateManager()\n\tmgr.runManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L202_C1", "label": "mgr = init()", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "vector": [14, 1, 0.9619, 0.0048, 1, 0.76, 0.0, 774, 3, 2, 0, 0, 319, 10, 2], "semantic": {"name": "mgr", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "\tmgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L203_C1", "label": "setModuleInitProc()", "type": "expression", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "vector": [8, 1, 0.9667, 0.0048, 1, 0.76, 0.3333, 899, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setModuleInitProc", "arg_names": [], "import_names": [], "rhs_call_name": "setModuleInitProc", "annotation": ""}, "snippet": "\tmgr.setModuleInitProc(MyModuleInit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L204_C1", "label": "activateManager()", "type": "expression", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "vector": [8, 1, 0.9714, 0.0048, 1, 0.76, 0.6667, 140, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "activateManager", "arg_names": [], "import_names": [], "rhs_call_name": "activateManager", "annotation": ""}, "snippet": "\tmgr.activateManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L205_C1", "label": "runManager()", "type": "expression", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "vector": [8, 1, 0.9762, 0.0048, 1, 0.76, 1.0, 290, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "runManager", "arg_names": [], "import_names": [], "rhs_call_name": "runManager", "annotation": ""}, "snippet": "\tmgr.runManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:If_L207_C0", "label": "if", "type": "if", "loc": [207, 208], "level": 0, "parent": null, "vector": [4, 0, 0.9881, 0.0095, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n\tmain()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L208_C1", "label": "main()", "type": "expression", "loc": [208, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_260:If_L207_C0", "vector": [8, 1, 0.9905, 0.0048, 1, 0.65, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": "\tmain()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L79_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L79_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L99_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L101_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L103_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L104_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L105_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L107_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L108_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L110_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L112_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L114_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L115_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L117_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L118_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L120_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L122_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L124_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:Try_L123_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L126_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L127_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L128_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L129_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L130_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L134_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L135_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L136_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L139_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L138_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L140_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L143_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L145_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L146_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L147_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L148_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L150_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L152_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L153_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L155_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L156_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L157_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L159_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L160_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L161_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L163_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L164_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L165_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L167_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L169_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L175_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L174_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Return_L176_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L191_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L197_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Assign_L202_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L203_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L204_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L205_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_260:If_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_260:Expr_L208_C1"}]
#!/usr/bin/env python # -*- Python -*- import sys import time sys.path.append(".") # Import RTM module import OpenRTM_aist import RTC import socket import httplib from time import sleep # Import Service implementation class # <rtc-template block="service_impl"> # </rtc-template> # Import Service stub modules # <rtc-template block="global_idl"> # </rtc-template> # This module's spesification # <rtc-template block="module_spec"> proxy_spec = ["implementation_id", "Proxy", "type_name", "Proxy", "description", "RTC-Lite for Arduino", "version", "1.0.0", "vendor", "AIST", "category", "Proxy", "activity_type", "STATIC", "max_instance", "1", "language", "Python", "lang_type", "SCRIPT", ""] # </rtc-template> class Proxy(OpenRTM_aist.DataFlowComponentBase): def __init__(self, manager): OpenRTM_aist.DataFlowComponentBase.__init__(self, manager) # DataPorts initialization # <rtc-template block="data_ports"> self._d_Watt =RTC.TimedShort(RTC.Time(0,0),0) self._d_Light =RTC.TimedShort(RTC.Time(0,0),0) self._d_Temp =RTC.TimedShort(RTC.Time(0,0),0) self._WattOut =OpenRTM_aist.OutPort("Watt", self._d_Watt, OpenRTM_aist.RingBuffer(8)) self._LightOut =OpenRTM_aist.OutPort("Light", self._d_Light, OpenRTM_aist.RingBuffer(8)) self._TempOut =OpenRTM_aist.OutPort("Temp", self._d_Temp, OpenRTM_aist.RingBuffer(8)) # Set OutPort buffer self.registerOutPort("Watt",self._WattOut) self.registerOutPort("Light",self._LightOut) self.registerOutPort("Temp",self._TempOut) self._remoteIP="" # </rtc-template> # DataPorts initialization # <rtc-template block="service_ports"> # </rtc-template> # initialize of configuration-data. # <rtc-template block="configurations"> # </rtc-template> def onInitialize(self): # Bind variables and configuration variable # <rtc-template block="bind_config"> # </rtc-template> return RTC.RTC_OK #def onFinalize(self): # return RTC.RTC_OK #def onStartup(self, ec_id): # return RTC.RTC_OK #def onShutdown(self, ec_id): # return RTC.RTC_OK def onActivated(self, ec_id): print "onActivated" host ='' port =80 address ="255.255.255.255" recv_port =1300 recv_timeout =5 s =socket.socket( socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.setsockopt( socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.bind( ( host, port)) r =socket.socket(socket.AF_INET, socket.SOCK_DGRAM) r.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) r.bind((host, recv_port)) r.settimeout( recv_timeout) max =5 count =0 while count <5: print "try: ", count s.sendto( str(count), ( address, port)) try: message, ip_and_port = r.recvfrom(8192) if len( message) >0: print "message:", message, "from", ip_and_port self._remoteIP =ip_and_port[0] s.close() r.close() return RTC.RTC_OK except: count +=1 s.close() r.close() return RTC.RTC_ERROR def onDeactivated(self, ec_id): print "onDeactivated!" return RTC.RTC_OK def onExecute(self, ec_id): print "onExecute!" conn =httplib.HTTPConnection( self._remoteIP) conn.request( "GET", "/EXE") r =conn.getresponse() conn.close() print r.status, r.reason data =r.read() token =data.split( '\r\n') self._d_Watt.data =int(token[0]) self._d_Light.data =int(token[1]) self._d_Temp.data =int(token[2]) print self._d_Watt.data print self._d_Light.data print self._d_Temp.data self._WattOut.write() self._LightOut.write() self._TempOut.write() time.sleep( 1) return RTC.RTC_OK #def onAborting(self, ec_id): # return RTC.RTC_OK def onError(self, ec_id): print "onError!" return RTC.RTC_OK #def onReset(self, ec_id): # return RTC.RTC_OK #def onStateUpdate(self, ec_id): # return RTC.RTC_OK #def onRateChanged(self, ec_id): # return RTC.RTC_OK def MyModuleInit(manager): profile = OpenRTM_aist.Properties(defaults_str=proxy_spec) manager.registerFactory(profile, Proxy, OpenRTM_aist.Delete) # Create a component comp = manager.createComponent("Proxy") def main(): mgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv) mgr.setModuleInitProc(MyModuleInit) mgr.activateManager() mgr.runManager() if __name__ == "__main__": main()
ajibawa-2023/Python-Code-Large/train/row_261
92
210
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.019, 0.0048, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L5_C0", "label": "time import time", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0238, 0.0048, 0, 0.66, 0.0833, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L6_C0", "label": "append()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0286, 0.0048, 0, 0.66, 0.1667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "sys.path.append(\".\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L9_C0", "label": "OpenRTM_aist import OpenRTM_aist", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0429, 0.0048, 0, 0.66, 0.25, 119, 0, 1, 0, 0, 119, 0, 0], "semantic": {"name": "OpenRTM_aist", "arg_names": [], "import_names": ["OpenRTM_aist"], "rhs_call_name": "", "annotation": ""}, "snippet": "import OpenRTM_aist"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L10_C0", "label": "RTC import RTC", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0476, 0.0048, 0, 0.66, 0.3333, 744, 0, 1, 0, 0, 744, 0, 0], "semantic": {"name": "RTC", "arg_names": [], "import_names": ["RTC"], "rhs_call_name": "", "annotation": ""}, "snippet": "import RTC"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L12_C0", "label": "socket import socket", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0571, 0.0048, 0, 0.66, 0.4167, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs_call_name": "", "annotation": ""}, "snippet": "import socket"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Import_L13_C0", "label": "httplib import httplib", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0619, 0.0048, 0, 0.66, 0.5, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import httplib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:ImportFrom_L14_C0", "label": "from time import sleep", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0667, 0.0048, 0, 0.66, 0.5833, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["sleep"], "rhs_call_name": "", "annotation": ""}, "snippet": "from time import sleep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L29_C0", "label": "proxy_spec =", "type": "assigned_variable", "loc": [29, 39], "level": 0, "parent": null, "vector": [14, 0, 0.1619, 0.0524, 0, 0.66, 0.6667, 773, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "proxy_spec", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "proxy_spec = [\"implementation_id\", \"Proxy\", \n\t\t \"type_name\", \"Proxy\", \n\t\t \"description\", \"RTC-Lite for Arduino\", \n\t\t \"version\", \"1.0.0\", \n\t\t \"vendor\", \"AIST\", \n\t\t \"category\", \"Proxy\", \n\t\t \"activity_type\", \"STATIC\", \n\t\t \"max_instance\", \"1\", "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "label": "Proxy", "type": "class", "loc": [43, 176], "level": 0, "parent": null, "vector": [3, 0, 0.5214, 0.6381, 0, 0.66, 0.75, 363, 0, 6, 0, 0, 459, 0, 55], "semantic": {"name": "Proxy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Proxy(OpenRTM_aist.DataFlowComponentBase):\n\tdef __init__(self, manager):\n\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)\n\n\t\t# DataPorts initialization\n\t\t# <rtc-template block=\"data_ports\">\n\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "label": "__init__", "type": "function", "loc": [44, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.2524, 0.0905, 1, 0.82, 0.0, 555, 0, 2, 0, 0, 0, 0, 16], "semantic": {"name": "__init__", "arg_names": ["self", "manager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, manager):\n\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)\n\n\t\t# DataPorts initialization\n\t\t# <rtc-template block=\"data_ports\">\n\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)\n\t\tself._d_Temp =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L45_C2", "label": "__init__()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [8, 2, 0.2143, 0.0048, 2, 0.87, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": "\t\tOpenRTM_aist.DataFlowComponentBase.__init__(self, manager)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L49_C2", "label": "self._d_Watt = TimedShort()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2333, 0.0048, 2, 0.87, 0.1, 747, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Watt", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Watt =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L50_C2", "label": "self._d_Light = TimedShort()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2381, 0.0048, 2, 0.87, 0.2, 455, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Light", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Light =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L51_C2", "label": "self._d_Temp = TimedShort()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2429, 0.0048, 2, 0.87, 0.3, 977, 3, 2, 0, 0, 539, 10, 2], "semantic": {"name": "self._d_Temp", "arg_names": [], "import_names": [], "rhs_call_name": "TimedShort", "annotation": ""}, "snippet": "\t\tself._d_Temp =RTC.TimedShort(RTC.Time(0,0),0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L53_C2", "label": "self._WattOut = OutPort()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2524, 0.0048, 2, 0.87, 0.4, 247, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._WattOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._WattOut =OpenRTM_aist.OutPort(\"Watt\", self._d_Watt, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L54_C2", "label": "self._LightOut = OutPort()", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2571, 0.0048, 2, 0.87, 0.5, 700, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._LightOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._LightOut =OpenRTM_aist.OutPort(\"Light\", self._d_Light, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L55_C2", "label": "self._TempOut = OutPort()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2619, 0.0048, 2, 0.87, 0.6, 870, 3, 3, 0, 0, 967, 10, 2], "semantic": {"name": "self._TempOut", "arg_names": [], "import_names": [], "rhs_call_name": "OutPort", "annotation": ""}, "snippet": "\t\tself._TempOut =OpenRTM_aist.OutPort(\"Temp\", self._d_Temp, OpenRTM_aist.RingBuffer(8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L58_C2", "label": "registerOutPort()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [8, 2, 0.2762, 0.0048, 2, 0.87, 0.7, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Watt\",self._WattOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L59_C2", "label": "registerOutPort()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [8, 2, 0.281, 0.0048, 2, 0.87, 0.8, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Light\",self._LightOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L60_C2", "label": "registerOutPort()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [8, 2, 0.2857, 0.0048, 2, 0.87, 0.9, 452, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "registerOutPort", "arg_names": [], "import_names": [], "rhs_call_name": "registerOutPort", "annotation": ""}, "snippet": "\t\tself.registerOutPort(\"Temp\",self._TempOut)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L62_C2", "label": "self._remoteIP =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "vector": [14, 2, 0.2952, 0.0048, 2, 0.87, 1.0, 633, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._remoteIP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself._remoteIP=\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L79_C1", "label": "onInitialize", "type": "function", "loc": [79, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.3905, 0.0333, 1, 0.82, 0.2, 910, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "onInitialize", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onInitialize(self):\n\t\t# Bind variables and configuration variable\n\t\t# <rtc-template block=\"bind_config\">\n\n\n\t\t# </rtc-template>\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L85_C2", "label": "return", "type": "return", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L79_C1", "vector": [13, 2, 0.4048, 0.0048, 2, 0.69, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "label": "onActivated", "type": "function", "loc": [97, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.5548, 0.1905, 1, 0.82, 0.4, 683, 0, 2, 1, 0, 0, 0, 19], "semantic": {"name": "onActivated", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onActivated(self, ec_id):\n\t\t\n\t\tprint(\"onActivated\")\n\n\t\thost =''\n\t\tport =80\n\t\taddress =\"255.255.255.255\"\n\t\trecv_port =1300"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L99_C2", "label": "print()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.4714, 0.0048, 2, 0.38, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onActivated\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L101_C2", "label": "host =", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.481, 0.0048, 2, 0.38, 0.0526, 867, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "host", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\thost =''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L102_C2", "label": "port =", "type": "assigned_variable", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.4857, 0.0048, 2, 0.38, 0.1053, 308, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tport =80"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L103_C2", "label": "address =", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.4905, 0.0048, 2, 0.38, 0.1579, 666, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "address", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\taddress =\"255.255.255.255\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L104_C2", "label": "recv_port =", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.4952, 0.0048, 2, 0.38, 0.2105, 94, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "recv_port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\trecv_port =1300"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L105_C2", "label": "recv_timeout =", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.5, 0.0048, 2, 0.38, 0.2632, 79, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "recv_timeout", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\trecv_timeout =5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L107_C2", "label": "s = socket()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.5095, 0.0048, 2, 0.38, 0.3158, 553, 3, 2, 0, 0, 687, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "socket", "annotation": ""}, "snippet": "\t\ts =socket.socket( socket.AF_INET, socket.SOCK_DGRAM)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L108_C2", "label": "setsockopt()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.5143, 0.0048, 2, 0.38, 0.3684, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\ts.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L109_C2", "label": "setsockopt()", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.519, 0.0048, 2, 0.38, 0.4211, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\ts.setsockopt( socket.SOL_SOCKET, socket.SO_BROADCAST, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L110_C2", "label": "bind()", "type": "expression", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.5238, 0.0048, 2, 0.38, 0.4737, 640, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": "\t\ts.bind( ( host, port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L112_C2", "label": "r = socket()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.5333, 0.0048, 2, 0.38, 0.5263, 436, 3, 2, 0, 0, 687, 10, 1], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "socket", "annotation": ""}, "snippet": "\t\tr =socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L113_C2", "label": "setsockopt()", "type": "expression", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.5381, 0.0048, 2, 0.38, 0.5789, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": "\t\tr.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L114_C2", "label": "bind()", "type": "expression", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.5429, 0.0048, 2, 0.38, 0.6316, 640, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": "\t\tr.bind((host, recv_port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L115_C2", "label": "settimeout()", "type": "expression", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.5476, 0.0048, 2, 0.38, 0.6842, 27, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "settimeout", "arg_names": [], "import_names": [], "rhs_call_name": "settimeout", "annotation": ""}, "snippet": "\t\tr.settimeout( recv_timeout)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L117_C2", "label": "max =", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.5571, 0.0048, 2, 0.38, 0.7368, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "max", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tmax =5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L118_C2", "label": "count =", "type": "assigned_variable", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [14, 2, 0.5619, 0.0048, 2, 0.38, 0.7895, 778, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcount =0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "label": "while", "type": "while", "loc": [119, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [5, 2, 0.5976, 0.0667, 2, 0.38, 0.8421, 0, 0, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\twhile count <5:\n\t\t\tprint(\"try: \", count)\n\n\t\t\ts.sendto( str(count), ( address, port))\n\t\t\ttry:\n\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)\n\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L120_C3", "label": "print()", "type": "expression", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "vector": [8, 3, 0.5714, 0.0048, 3, 0.73, 0.0, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\t\tprint(\"try: \", count)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L122_C3", "label": "sendto()", "type": "expression", "loc": [122, 122], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "vector": [8, 3, 0.581, 0.0048, 3, 0.73, 0.5, 765, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "sendto", "arg_names": [], "import_names": [], "rhs_call_name": "sendto", "annotation": ""}, "snippet": "\t\t\ts.sendto( str(count), ( address, port))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3", "label": "try", "type": "try", "loc": [123, 132], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "vector": [7, 3, 0.6071, 0.0476, 3, 0.73, 1.0, 0, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)\n\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)\n\t\t\t\t\tself._remoteIP =ip_and_port[0]\n\t\t\t\t\ts.close()\n\t\t\t\t\tr.close()\n\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L124_C4", "label": "message, ip_and_port = recvfrom()", "type": "assigned_variable", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3", "vector": [14, 4, 0.5905, 0.0048, 4, 0.07, 0.0, 763, 3, 1, 0, 0, 878, 10, 1], "semantic": {"name": "message, ip_and_port", "arg_names": [], "import_names": [], "rhs_call_name": "recvfrom", "annotation": ""}, "snippet": "\t\t\t\tmessage, ip_and_port = r.recvfrom(8192)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "label": "if", "type": "if", "loc": [125, 130], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3", "vector": [4, 4, 0.6071, 0.0286, 4, 0.07, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif len( message) >0:\n\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)\n\t\t\t\t\tself._remoteIP =ip_and_port[0]\n\t\t\t\t\ts.close()\n\t\t\t\t\tr.close()\n\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L126_C5", "label": "print()", "type": "expression", "loc": [126, 126], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "vector": [8, 5, 0.6, 0.0048, 5, 0.94, 0.0, 535, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\t\t\t\tprint(\"message:\", message, \"from\", ip_and_port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L127_C5", "label": "self._remoteIP =", "type": "assigned_variable", "loc": [127, 127], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "vector": [14, 5, 0.6048, 0.0048, 5, 0.94, 0.25, 633, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._remoteIP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\tself._remoteIP =ip_and_port[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L128_C5", "label": "close()", "type": "expression", "loc": [128, 128], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "vector": [8, 5, 0.6095, 0.0048, 5, 0.94, 0.5, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\t\t\t\ts.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L129_C5", "label": "close()", "type": "expression", "loc": [129, 129], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "vector": [8, 5, 0.6143, 0.0048, 5, 0.94, 0.75, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\t\t\t\tr.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L130_C5", "label": "return", "type": "return", "loc": [130, 130], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "vector": [13, 5, 0.619, 0.0048, 5, 0.94, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L134_C2", "label": "close()", "type": "expression", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.6381, 0.0048, 2, 0.38, 0.8947, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\ts.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L135_C2", "label": "close()", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [8, 2, 0.6429, 0.0048, 2, 0.38, 0.9474, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\tr.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L136_C2", "label": "return", "type": "return", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "vector": [13, 2, 0.6476, 0.0048, 2, 0.38, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_ERROR"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1", "label": "onDeactivated", "type": "function", "loc": [138, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.6619, 0.0143, 1, 0.82, 0.6, 943, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "onDeactivated", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onDeactivated(self, ec_id):\n\t\tprint(\"onDeactivated!\")\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L139_C2", "label": "print()", "type": "expression", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1", "vector": [8, 2, 0.6619, 0.0048, 2, 0.99, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onDeactivated!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L140_C2", "label": "return", "type": "return", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1", "vector": [13, 2, 0.6667, 0.0048, 2, 0.99, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "label": "onExecute", "type": "function", "loc": [142, 169], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.7405, 0.1333, 1, 0.82, 0.8, 3, 0, 2, 1, 0, 0, 0, 18], "semantic": {"name": "onExecute", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onExecute(self, ec_id):\n\t\tprint(\"onExecute!\")\n\t\t\n\t\tconn =httplib.HTTPConnection( self._remoteIP)\n\t\tconn.request( \"GET\", \"/EXE\")\n\t\tr =conn.getresponse()\t\t\t\t\n\t\tconn.close()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L143_C2", "label": "print()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.681, 0.0048, 2, 0.76, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onExecute!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L145_C2", "label": "conn = HTTPConnection()", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.6905, 0.0048, 2, 0.76, 0.0556, 345, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": "\t\tconn =httplib.HTTPConnection( self._remoteIP)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L146_C2", "label": "request()", "type": "expression", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.6952, 0.0048, 2, 0.76, 0.1111, 50, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": "\t\tconn.request( \"GET\", \"/EXE\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L147_C2", "label": "r = getresponse()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7, 0.0048, 2, 0.76, 0.1667, 436, 3, 0, 0, 0, 47, 10, 1], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "getresponse", "annotation": ""}, "snippet": "\t\tr =conn.getresponse()\t\t\t\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L148_C2", "label": "close()", "type": "expression", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7048, 0.0048, 2, 0.76, 0.2222, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": "\t\tconn.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L150_C2", "label": "print()", "type": "expression", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7143, 0.0048, 2, 0.76, 0.2778, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(r.status, r.reason)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L152_C2", "label": "data = read()", "type": "assigned_variable", "loc": [152, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7238, 0.0048, 2, 0.76, 0.3333, 929, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": "\t\tdata =r.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L153_C2", "label": "token = split()", "type": "assigned_variable", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7286, 0.0048, 2, 0.76, 0.3889, 129, 3, 1, 0, 0, 908, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "split", "annotation": ""}, "snippet": "\t\ttoken =data.split( '\\r\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L155_C2", "label": "self._d_Watt.data = int()", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7381, 0.0048, 2, 0.76, 0.4444, 811, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Watt.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Watt.data =int(token[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L156_C2", "label": "self._d_Light.data = int()", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7429, 0.0048, 2, 0.76, 0.5, 351, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Light.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Light.data =int(token[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L157_C2", "label": "self._d_Temp.data = int()", "type": "assigned_variable", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [14, 2, 0.7476, 0.0048, 2, 0.76, 0.5556, 935, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "self._d_Temp.data", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\tself._d_Temp.data =int(token[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L159_C2", "label": "print()", "type": "expression", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7571, 0.0048, 2, 0.76, 0.6111, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Watt.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L160_C2", "label": "print()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7619, 0.0048, 2, 0.76, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Light.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L161_C2", "label": "print()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7667, 0.0048, 2, 0.76, 0.7222, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(self._d_Temp.data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L163_C2", "label": "write()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7762, 0.0048, 2, 0.76, 0.7778, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._WattOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L164_C2", "label": "write()", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.781, 0.0048, 2, 0.76, 0.8333, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._LightOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L165_C2", "label": "write()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7857, 0.0048, 2, 0.76, 0.8889, 837, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "\t\tself._TempOut.write()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L167_C2", "label": "sleep()", "type": "expression", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [8, 2, 0.7952, 0.0048, 2, 0.76, 0.9444, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": "\t\ttime.sleep( 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L169_C2", "label": "return", "type": "return", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "vector": [13, 2, 0.8048, 0.0048, 2, 0.76, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1", "label": "onError", "type": "function", "loc": [174, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "vector": [2, 1, 0.8333, 0.0143, 1, 0.82, 1.0, 445, 0, 2, 1, 0, 0, 0, 1], "semantic": {"name": "onError", "arg_names": ["self", "ec_id"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef onError(self, ec_id):\n\t\tprint(\"onError!\")\n\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L175_C2", "label": "print()", "type": "expression", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1", "vector": [8, 2, 0.8333, 0.0048, 2, 0.61, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "\t\tprint(\"onError!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L176_C2", "label": "return", "type": "return", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1", "vector": [13, 2, 0.8381, 0.0048, 2, 0.61, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn RTC.RTC_OK"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "label": "MyModuleInit", "type": "function", "loc": [190, 197], "level": 0, "parent": null, "vector": [2, 0, 0.9214, 0.0381, 0, 0.66, 0.8333, 984, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "MyModuleInit", "arg_names": ["manager"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def MyModuleInit(manager):\n profile = OpenRTM_aist.Properties(defaults_str=proxy_spec)\n manager.registerFactory(profile,\n Proxy,\n OpenRTM_aist.Delete)\n\n # Create a component\n comp = manager.createComponent(\"Proxy\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L191_C4", "label": "profile = Properties()", "type": "assigned_variable", "loc": [191, 191], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "vector": [14, 1, 0.9095, 0.0048, 1, 0.18, 0.0, 924, 3, 1, 0, 0, 353, 10, 1], "semantic": {"name": "profile", "arg_names": [], "import_names": [], "rhs_call_name": "Properties", "annotation": ""}, "snippet": " profile = OpenRTM_aist.Properties(defaults_str=proxy_spec)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L192_C4", "label": "registerFactory()", "type": "expression", "loc": [192, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "vector": [8, 1, 0.919, 0.0143, 1, 0.18, 0.5, 98, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "registerFactory", "arg_names": [], "import_names": [], "rhs_call_name": "registerFactory", "annotation": ""}, "snippet": " manager.registerFactory(profile,\n Proxy,\n OpenRTM_aist.Delete)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L197_C4", "label": "comp = createComponent()", "type": "assigned_variable", "loc": [197, 197], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "vector": [14, 1, 0.9381, 0.0048, 1, 0.18, 1.0, 913, 3, 1, 0, 0, 836, 10, 1], "semantic": {"name": "comp", "arg_names": [], "import_names": [], "rhs_call_name": "createComponent", "annotation": ""}, "snippet": " comp = manager.createComponent(\"Proxy\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "label": "main", "type": "function", "loc": [201, 205], "level": 0, "parent": null, "vector": [2, 0, 0.9667, 0.0238, 0, 0.66, 0.9167, 624, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n\tmgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)\n\tmgr.setModuleInitProc(MyModuleInit)\n\tmgr.activateManager()\n\tmgr.runManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L202_C1", "label": "mgr = init()", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "vector": [14, 1, 0.9619, 0.0048, 1, 0.99, 0.0, 774, 3, 2, 0, 0, 319, 10, 2], "semantic": {"name": "mgr", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "\tmgr = OpenRTM_aist.Manager.init(len(sys.argv), sys.argv)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L203_C1", "label": "setModuleInitProc()", "type": "expression", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "vector": [8, 1, 0.9667, 0.0048, 1, 0.99, 0.3333, 899, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setModuleInitProc", "arg_names": [], "import_names": [], "rhs_call_name": "setModuleInitProc", "annotation": ""}, "snippet": "\tmgr.setModuleInitProc(MyModuleInit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L204_C1", "label": "activateManager()", "type": "expression", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "vector": [8, 1, 0.9714, 0.0048, 1, 0.99, 0.6667, 140, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "activateManager", "arg_names": [], "import_names": [], "rhs_call_name": "activateManager", "annotation": ""}, "snippet": "\tmgr.activateManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L205_C1", "label": "runManager()", "type": "expression", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "vector": [8, 1, 0.9762, 0.0048, 1, 0.99, 1.0, 290, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "runManager", "arg_names": [], "import_names": [], "rhs_call_name": "runManager", "annotation": ""}, "snippet": "\tmgr.runManager()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:If_L207_C0", "label": "if", "type": "if", "loc": [207, 208], "level": 0, "parent": null, "vector": [4, 0, 0.9881, 0.0095, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n\tmain()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L208_C1", "label": "main()", "type": "expression", "loc": [208, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_261:If_L207_C0", "vector": [8, 1, 0.9905, 0.0048, 1, 0.0, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": "\tmain()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L44_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L79_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L79_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L99_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L101_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L103_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L104_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L105_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L107_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L108_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L110_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L112_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L114_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L115_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L117_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L118_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L120_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L122_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:While_L119_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L124_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:Try_L123_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L126_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L127_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L128_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L129_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L125_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L130_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L134_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L135_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L136_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L139_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L138_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L140_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L143_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L145_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L146_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L147_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L148_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L150_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L152_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L153_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L155_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L156_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L157_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L159_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L160_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L161_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L163_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L164_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L165_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L167_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L169_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:ClassDef_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L175_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L174_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Return_L176_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L191_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L190_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L197_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Assign_L202_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L203_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L204_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:FunctionDef_L201_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L205_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_261:If_L207_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_261:Expr_L208_C1"}]
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_264
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "label": "Translator", "type": "class", "loc": [9, 21], "level": 0, "parent": null, "vector": [3, 0, 0.7143, 0.619, 0, 0.66, 1.0, 229, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Translator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L10_C2", "label": "expression", "type": "expression", "loc": [10, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "vector": [8, 1, 0.5238, 0.1429, 1, 0.1, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n classdocs\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "vector": [2, 1, 0.7619, 0.2381, 1, 0.1, 0.5, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "language"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, language):\n '''\n Constructor\n '''\n self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2", "vector": [8, 2, 0.7619, 0.1429, 2, 0.87, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Constructor\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:Assign_L18_C4", "label": "self._language =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2", "vector": [14, 2, 0.8571, 0.0476, 2, 0.87, 1.0, 494, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L20_C2", "label": "Translate", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "vector": [2, 1, 0.9762, 0.0952, 1, 0.1, 1.0, 749, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": ["self", "string_names"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Translate(self, string_names):\n print(string_names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L21_C4", "label": "print()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L20_C2", "vector": [8, 2, 1.0, 0.0476, 2, 0.34, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(string_names)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_264:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_264:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_264:FunctionDef_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_264:Expr_L21_C4"}]
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the arguments to run ''' process = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines = True, shell = False) output = process.communicate()[0] return output.splitlines() def FillMercurialRevisions(filename, parsed_file): ''' Fills the revs attribute of all strings in the given parsed file with a list of revisions that touched the lines corresponding to that string. @param filename: the name of the file to get history for @param parsed_file: the parsed file to modify ''' # Take output of hg annotate to get revision of each line output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename]) # Create a map of line -> revision (key is list index, line 0 doesn't exist) line_revs = ['dummy'] for line in output_lines: rev_match = REVISION_REGEX.match(line) if not rev_match: raise 'Unexpected line of output from hg: %s' % line rev_hash = rev_match.group('hash') line_revs.append(rev_hash) for str in parsed_file.itervalues(): # Get the lines that correspond to each string start_line = str['startLine'] end_line = str['endLine'] # Get the revisions that touched those lines revs = [] for line_number in range(start_line, end_line + 1): revs.append(line_revs[line_number]) # Merge with any revisions that were already there # (for explict revision specification) if 'revs' in str: revs += str['revs'] # Assign the revisions to the string str['revs'] = frozenset(revs) def DoesRevisionSuperceed(filename, rev1, rev2): ''' Tells whether a revision superceeds another. This essentially means that the older revision is an ancestor of the newer one. This also returns True if the two revisions are the same. @param rev1: the revision that may be superceeding the other @param rev2: the revision that may be superceeded @return: True if rev1 superceeds rev2 or they're the same ''' if rev1 == rev2: return True # TODO: Add filename args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\n', filename] output_lines = _GetOutputLines(args) return rev2 in output_lines def NewestRevision(filename, rev1, rev2): ''' Returns which of two revisions is closest to the head of the repository. If none of them is the ancestor of the other, then we return either one. @param rev1: the first revision @param rev2: the second revision ''' if DoesRevisionSuperceed(filename, rev1, rev2): return rev1 return rev2
ajibawa-2023/Python-Code-Large/train/row_265
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Import_L7_C0", "label": "re import re", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0745, 0.0106, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Import_L8_C0", "label": "subprocess import subprocess", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0851, 0.0106, 0, 0.66, 0.2857, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L10_C0", "label": "REVISION_REGEX = compile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.1064, 0.0106, 0, 0.66, 0.4286, 883, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "REVISION_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "label": "_GetOutputLines", "type": "function", "loc": [12, 23], "level": 0, "parent": null, "vector": [2, 0, 0.1862, 0.1277, 0, 0.66, 0.5714, 359, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "_GetOutputLines", "arg_names": ["args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''\n process = subprocess.Popen(args,\n stdout=subprocess.PIPE,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L13_C2", "label": "expression", "type": "expression", "loc": [13, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "vector": [8, 1, 0.1596, 0.0532, 1, 0.49, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L18_C2", "label": "process = Popen()", "type": "assigned_variable", "loc": [18, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "vector": [14, 1, 0.2074, 0.0426, 1, 0.49, 0.3333, 712, 3, 4, 0, 0, 568, 10, 1], "semantic": {"name": "process", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": " process = subprocess.Popen(args,\n stdout=subprocess.PIPE,\n universal_newlines = True,\n shell = False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L22_C2", "label": "output =", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "vector": [14, 1, 0.234, 0.0106, 1, 0.49, 0.6667, 886, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = process.communicate()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L23_C2", "label": "return", "type": "return", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "vector": [13, 1, 0.2447, 0.0106, 1, 0.49, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return output.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "label": "FillMercurialRevisions", "type": "function", "loc": [26, 62], "level": 0, "parent": null, "vector": [2, 0, 0.4681, 0.3936, 0, 0.66, 0.7143, 942, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "FillMercurialRevisions", "arg_names": ["filename", "parsed_file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def FillMercurialRevisions(filename, parsed_file):\n '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L27_C2", "label": "expression", "type": "expression", "loc": [27, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "vector": [8, 1, 0.3191, 0.0745, 1, 0.51, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L35_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "vector": [14, 1, 0.3723, 0.0106, 1, 0.51, 0.25, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L38_C2", "label": "line_revs =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "vector": [14, 1, 0.4043, 0.0106, 1, 0.51, 0.5, 348, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "line_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line_revs = ['dummy']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "label": "for line", "type": "for", "loc": [39, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "vector": [6, 1, 0.4415, 0.0638, 1, 0.51, 0.75, 373, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in output_lines:\n rev_match = REVISION_REGEX.match(line)\n if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line\n rev_hash = rev_match.group('hash')\n line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L40_C4", "label": "rev_match = match()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "vector": [14, 2, 0.4255, 0.0106, 2, 0.88, 0.0, 931, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "rev_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " rev_match = REVISION_REGEX.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:If_L41_C4", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "vector": [4, 2, 0.4415, 0.0213, 2, 0.88, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L43_C4", "label": "rev_hash = group()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "vector": [14, 2, 0.4574, 0.0106, 2, 0.88, 0.6667, 682, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev_hash", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev_hash = rev_match.group('hash')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L44_C4", "label": "append()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "vector": [8, 2, 0.4681, 0.0106, 2, 0.88, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "label": "for str", "type": "for", "loc": [46, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "vector": [6, 1, 0.5745, 0.1809, 1, 0.51, 1.0, 52, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for str in parsed_file.itervalues():\n # Get the lines that correspond to each string\n start_line = str['startLine']\n end_line = str['endLine']\n\n # Get the revisions that touched those lines\n revs = []\n for line_number in range(start_line, end_line + 1):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L48_C4", "label": "start_line =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [14, 2, 0.5106, 0.0106, 2, 0.91, 0.0, 501, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start_line = str['startLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L49_C4", "label": "end_line =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [14, 2, 0.5213, 0.0106, 2, 0.91, 0.2, 54, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_line = str['endLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L52_C4", "label": "revs =", "type": "assigned_variable", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [14, 2, 0.5532, 0.0106, 2, 0.91, 0.4, 848, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " revs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:For_L53_C4", "label": "for line_number", "type": "for", "loc": [53, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [6, 2, 0.5691, 0.0213, 2, 0.91, 0.6, 490, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line_number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line_number in range(start_line, end_line + 1):\n revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L54_C6", "label": "append()", "type": "expression", "loc": [54, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L53_C4", "vector": [8, 3, 0.5745, 0.0106, 3, 0.95, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:If_L58_C4", "label": "if", "type": "if", "loc": [58, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [4, 2, 0.6223, 0.0213, 2, 0.91, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'revs' in str:\n revs += str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L62_C4", "label": " = frozenset()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "vector": [14, 2, 0.6596, 0.0106, 2, 0.91, 1.0, 0, 3, 1, 0, 0, 80, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " str['revs'] = frozenset(revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "label": "DoesRevisionSuperceed", "type": "function", "loc": [64, 82], "level": 0, "parent": null, "vector": [2, 0, 0.7766, 0.2021, 0, 0.66, 0.8571, 330, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "DoesRevisionSuperceed", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def DoesRevisionSuperceed(filename, rev1, rev2):\n '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L65_C2", "label": "expression", "type": "expression", "loc": [65, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "vector": [8, 1, 0.7394, 0.1064, 1, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other\n @param rev2: the revision that may be superceeded"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:If_L75_C2", "label": "if", "type": "if", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "vector": [4, 1, 0.8032, 0.0213, 1, 0.76, 0.25, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev1 == rev2:\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L76_C4", "label": "return", "type": "return", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:If_L75_C2", "vector": [13, 2, 0.8085, 0.0106, 2, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L79_C2", "label": "args =", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "vector": [14, 1, 0.8404, 0.0106, 1, 0.76, 0.5, 805, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\\n', filename]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L80_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "vector": [14, 1, 0.8511, 0.0106, 1, 0.76, 0.75, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L82_C2", "label": "return", "type": "return", "loc": [82, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "vector": [13, 1, 0.8723, 0.0106, 1, 0.76, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2 in output_lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "label": "NewestRevision", "type": "function", "loc": [84, 94], "level": 0, "parent": null, "vector": [2, 0, 0.9468, 0.117, 0, 0.66, 1.0, 256, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "NewestRevision", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def NewestRevision(filename, rev1, rev2):\n '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L85_C2", "label": "expression", "type": "expression", "loc": [85, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "vector": [8, 1, 0.9362, 0.0745, 1, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:If_L92_C2", "label": "if", "type": "if", "loc": [92, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "vector": [4, 1, 0.984, 0.0213, 1, 0.41, 0.5, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if DoesRevisionSuperceed(filename, rev1, rev2):\n return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L93_C4", "label": "return", "type": "return", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:If_L92_C2", "vector": [13, 2, 0.9894, 0.0106, 2, 0.23, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L94_C2", "label": "return", "type": "return", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "vector": [13, 1, 1.0, 0.0106, 1, 0.41, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:If_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:For_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L54_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:If_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:If_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:If_L75_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:If_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:If_L92_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_265:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_265:Return_L94_C2"}]
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time, only. ''' def Parse(self, file): ''' Parses the given file and returns a dictionary mapping keys to an object with attributes for that key, such as the value, start/end line and explicit revisions. In addition to the standard XML format of the strings file, this parser supports an annotation inside comments, in one of these formats: <!-- KEEP_PARENT name="bla" --> <!-- KEEP_PARENT name="bla" rev="123456789012" --> Such an annotation indicates that we're explicitly inheriting form the master file (and the optional revision says that this decision is compatible with the master file up to that revision). @param file: the name of the file to parse ''' self._Reset() # Unfortunately expat is the only parser that will give us line numbers self._xml_parser = ParserCreate() self._xml_parser.StartElementHandler = self._StartElementHandler self._xml_parser.EndElementHandler = self._EndElementHandler self._xml_parser.CharacterDataHandler = self._CharacterDataHandler self._xml_parser.CommentHandler = self._CommentHandler file_obj = open(file) self._xml_parser.ParseFile(file_obj) file_obj.close() return self._all_strings def _Reset(self): self._currentString = None self._currentStringName = None self._currentStringValue = None self._all_strings = {} def _StartElementHandler(self, name, attrs): if name != 'string': return if 'name' not in attrs: return assert not self._currentString assert not self._currentStringName self._currentString = { 'startLine' : self._xml_parser.CurrentLineNumber, } if 'rev' in attrs: self._currentString['revs'] = [attrs['rev']] self._currentStringName = attrs['name'] self._currentStringValue = '' def _EndElementHandler(self, name): if name != 'string': return assert self._currentString assert self._currentStringName self._currentString['value'] = self._currentStringValue self._currentString['endLine'] = self._xml_parser.CurrentLineNumber self._all_strings[self._currentStringName] = self._currentString self._currentString = None self._currentStringName = None self._currentStringValue = None def _CharacterDataHandler(self, data): if not self._currentString: return self._currentStringValue += data _KEEP_PARENT_REGEX = re.compile(r'\s*KEEP_PARENT\s+' r'name\s*=\s*[\'"]?(?P<name>[a-z0-9_]+)[\'"]?' r'(?:\s+rev=[\'"]?(?P<rev>[0-9a-f]{12})[\'"]?)?\s*', re.MULTILINE | re.DOTALL) def _CommentHandler(self, data): keep_parent_match = self._KEEP_PARENT_REGEX.match(data) if not keep_parent_match: return name = keep_parent_match.group('name') self._all_strings[name] = { 'keepParent' : True, 'startLine' : self._xml_parser.CurrentLineNumber, 'endLine' : self._xml_parser.CurrentLineNumber } rev = keep_parent_match.group('rev') if rev: self._all_strings[name]['revs'] = [rev]
ajibawa-2023/Python-Code-Large/train/row_266
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:ImportFrom_L7_C0", "label": "from xml.parsers.expat import ParserCreate", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0609, 0.0087, 0, 0.66, 0.3333, 573, 0, 1, 0, 0, 573, 0, 0], "semantic": {"name": "xml.parsers.expat", "arg_names": [], "import_names": ["ParserCreate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.parsers.expat import ParserCreate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.6667, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "label": "StringsParser", "type": "class", "loc": [11, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5478, 0.913, 0, 0.66, 1.0, 282, 0, 6, 0, 0, 186, 0, 9], "semantic": {"name": "StringsParser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L12_C2", "label": "expression", "type": "expression", "loc": [12, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [8, 1, 0.1261, 0.0522, 1, 0.27, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "label": "Parse", "type": "function", "loc": [19, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.3, 0.2783, 1, 0.27, 0.1429, 291, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "Parse", "arg_names": ["self", "file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Parse(self, file):\n '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L20_C4", "label": "expression", "type": "expression", "loc": [20, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [8, 2, 0.2435, 0.1478, 2, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L37_C4", "label": "_Reset()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [8, 2, 0.3217, 0.0087, 2, 0.22, 0.1, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L40_C4", "label": "self._xml_parser = ParserCreate()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.3478, 0.0087, 2, 0.22, 0.2, 822, 3, 0, 0, 0, 684, 10, 1], "semantic": {"name": "self._xml_parser", "arg_names": [], "import_names": [], "rhs_call_name": "ParserCreate", "annotation": ""}, "snippet": " self._xml_parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L41_C4", "label": "self._xml_parser.StartElementHandler =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.3565, 0.0087, 2, 0.22, 0.3, 260, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.StartElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.StartElementHandler = self._StartElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L42_C4", "label": "self._xml_parser.EndElementHandler =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.3652, 0.0087, 2, 0.22, 0.4, 744, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.EndElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.EndElementHandler = self._EndElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L43_C4", "label": "self._xml_parser.CharacterDataHandler =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.3739, 0.0087, 2, 0.22, 0.5, 144, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CharacterDataHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CharacterDataHandler = self._CharacterDataHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L44_C4", "label": "self._xml_parser.CommentHandler =", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.3826, 0.0087, 2, 0.22, 0.6, 403, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CommentHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CommentHandler = self._CommentHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L46_C4", "label": "file_obj = open()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [14, 2, 0.4, 0.0087, 2, 0.22, 0.7, 425, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "file_obj", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " file_obj = open(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L47_C4", "label": "ParseFile()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [8, 2, 0.4087, 0.0087, 2, 0.22, 0.8, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ParseFile", "arg_names": [], "import_names": [], "rhs_call_name": "ParseFile", "annotation": ""}, "snippet": " self._xml_parser.ParseFile(file_obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L48_C4", "label": "close()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [8, 2, 0.4174, 0.0087, 2, 0.22, 0.9, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " file_obj.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L50_C4", "label": "return", "type": "return", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "vector": [13, 2, 0.4348, 0.0087, 2, 0.22, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._all_strings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "label": "_Reset", "type": "function", "loc": [52, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.4696, 0.0435, 1, 0.27, 0.2857, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n self._currentString = None\n self._currentStringName = None\n self._currentStringValue = None\n self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L53_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "vector": [14, 2, 0.4609, 0.0087, 2, 0.73, 0.0, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L54_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "vector": [14, 2, 0.4696, 0.0087, 2, 0.73, 0.3333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L55_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "vector": [14, 2, 0.4783, 0.0087, 2, 0.73, 0.6667, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L56_C4", "label": "self._all_strings =", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "vector": [14, 2, 0.487, 0.0087, 2, 0.73, 1.0, 463, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._all_strings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "label": "_StartElementHandler", "type": "function", "loc": [58, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.5783, 0.1565, 1, 0.27, 0.4286, 355, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "_StartElementHandler", "arg_names": ["self", "name", "attrs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _StartElementHandler(self, name, attrs):\n if name != 'string':\n return\n\n if 'name' not in attrs:\n return\n\n assert not self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L59_C4", "label": "if", "type": "if", "loc": [59, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [4, 2, 0.5174, 0.0174, 2, 0.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L60_C6", "label": "return", "type": "return", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L59_C4", "vector": [13, 3, 0.5217, 0.0087, 3, 0.68, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L62_C4", "label": "if", "type": "if", "loc": [62, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [4, 2, 0.5435, 0.0174, 2, 0.7, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'name' not in attrs:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L63_C6", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L62_C4", "vector": [13, 3, 0.5478, 0.0087, 3, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L67_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [14, 2, 0.5913, 0.0261, 2, 0.7, 0.4, 654, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = {\n 'startLine' : self._xml_parser.CurrentLineNumber,\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L71_C4", "label": "if", "type": "if", "loc": [71, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [4, 2, 0.6217, 0.0174, 2, 0.7, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'rev' in attrs:\n self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L72_C6", "label": "assign", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.45, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L74_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [14, 2, 0.6435, 0.0087, 2, 0.7, 0.8, 294, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = attrs['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L75_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "vector": [14, 2, 0.6522, 0.0087, 2, 0.7, 1.0, 884, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "label": "_EndElementHandler", "type": "function", "loc": [77, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.7217, 0.113, 1, 0.27, 0.5714, 486, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_EndElementHandler", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _EndElementHandler(self, name):\n if name != 'string':\n return\n\n assert self._currentString\n assert self._currentStringName\n self._currentString['value'] = self._currentStringValue\n self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L78_C4", "label": "if", "type": "if", "loc": [78, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [4, 2, 0.6826, 0.0174, 2, 0.82, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L79_C6", "label": "return", "type": "return", "loc": [79, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L78_C4", "vector": [13, 3, 0.687, 0.0087, 3, 0.24, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L83_C4", "label": "assign", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7217, 0.0087, 2, 0.82, 0.1667, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['value'] = self._currentStringValue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L84_C4", "label": "assign", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7304, 0.0087, 2, 0.82, 0.3333, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L85_C4", "label": "assign", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7391, 0.0087, 2, 0.82, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[self._currentStringName] = self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L87_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7565, 0.0087, 2, 0.82, 0.6667, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L88_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7652, 0.0087, 2, 0.82, 0.8333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L89_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "vector": [14, 2, 0.7739, 0.0087, 2, 0.82, 1.0, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L91_C2", "label": "_CharacterDataHandler", "type": "function", "loc": [91, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.8087, 0.0435, 1, 0.27, 0.7143, 825, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_CharacterDataHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CharacterDataHandler(self, data):\n if not self._currentString:\n return\n\n self._currentStringValue += data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L92_C4", "label": "if", "type": "if", "loc": [92, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L91_C2", "vector": [4, 2, 0.8043, 0.0174, 2, 0.82, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._currentString:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L93_C6", "label": "return", "type": "return", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L92_C4", "vector": [13, 3, 0.8087, 0.0087, 3, 0.87, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L97_C2", "label": "_KEEP_PARENT_REGEX = compile()", "type": "assigned_variable", "loc": [97, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [14, 1, 0.8565, 0.0348, 1, 0.27, 0.8571, 591, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "_KEEP_PARENT_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " _KEEP_PARENT_REGEX = re.compile(r'\\s*KEEP_PARENT\\s+'\n r'name\\s*=\\s*[\\'\"]?(?P<name>[a-z0-9_]+)[\\'\"]?'\n r'(?:\\s+rev=[\\'\"]?(?P<rev>[0-9a-f]{12})[\\'\"]?)?\\s*',\n re.MULTILINE | re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "label": "_CommentHandler", "type": "function", "loc": [102, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "vector": [2, 1, 0.9435, 0.1217, 1, 0.27, 1.0, 562, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "_CommentHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CommentHandler(self, data):\n keep_parent_match = self._KEEP_PARENT_REGEX.match(data)\n if not keep_parent_match:\n return\n\n name = keep_parent_match.group('name')\n self._all_strings[name] = {\n 'keepParent' : True,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L103_C4", "label": "keep_parent_match = match()", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [14, 2, 0.8957, 0.0087, 2, 0.85, 0.0, 885, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "keep_parent_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " keep_parent_match = self._KEEP_PARENT_REGEX.match(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L104_C4", "label": "if", "type": "if", "loc": [104, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [4, 2, 0.9087, 0.0174, 2, 0.85, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not keep_parent_match:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L105_C6", "label": "return", "type": "return", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L104_C4", "vector": [13, 3, 0.913, 0.0087, 3, 0.09, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L107_C4", "label": "name = group()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [14, 2, 0.9304, 0.0087, 2, 0.85, 0.4, 57, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " name = keep_parent_match.group('name')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L108_C4", "label": "assign", "type": "assigned_variable", "loc": [108, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [14, 2, 0.9565, 0.0435, 2, 0.85, 0.6, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name] = {\n 'keepParent' : True,\n 'startLine' : self._xml_parser.CurrentLineNumber,\n 'endLine' : self._xml_parser.CurrentLineNumber\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L113_C4", "label": "rev = group()", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [14, 2, 0.9826, 0.0087, 2, 0.85, 0.8, 337, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev = keep_parent_match.group('rev')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:If_L114_C4", "label": "if", "type": "if", "loc": [114, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "vector": [4, 2, 0.9957, 0.0174, 2, 0.85, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev:\n self._all_strings[name]['revs'] = [rev]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L115_C6", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_266:If_L114_C4", "vector": [14, 3, 1.0, 0.0087, 3, 0.6, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name]['revs'] = [rev]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L60_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L79_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L91_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L97_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Return_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_266:If_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_266:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_266:Assign_L115_C6"}]
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' print ' validate' sys.exit(1) def Translate(languages): ''' Asks the user to interactively translate any missing or oudated strings from the files for the given languages. @param languages: the languages to translate ''' validator = mytracks.validate.Validator(languages) validator.Validate() missing = validator.missing_in_lang() outdated = validator.outdated_in_lang() for lang in languages: untranslated = missing[lang] + outdated[lang] if len(untranslated) == 0: continue translator = mytracks.translate.Translator(lang) translator.Translate(untranslated) def Validate(languages): ''' Computes and displays errors in the string files for the given languages. @param languages: the languages to compute for ''' validator = mytracks.validate.Validator(languages) validator.Validate() error_count = 0 if (validator.valid()): print 'All files OK' else: for lang, missing in validator.missing_in_master().iteritems(): print 'Missing in master, present in %s: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, missing in validator.missing_in_lang().iteritems(): print 'Missing in %s, present in master: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, outdated in validator.outdated_in_lang().iteritems(): print 'Outdated in %s: %s:' % (lang, str(outdated)) error_count = error_count + len(outdated) return error_count if __name__ == '__main__': argv = sys.argv argc = len(argv) if argc < 2: Usage() languages = mytracks.files.GetAllLanguageFiles() if argc == 3: langs = set(argv[2:]) if not langs.issubset(languages): raise 'Language(s) not found' # Filter just to the languages specified languages = dict((lang, lang_file) for lang, lang_file in languages.iteritems() if lang in langs or lang == 'en' ) cmd = argv[1] if cmd == 'translate': Translate(languages) elif cmd == 'validate': error_count = Validate(languages) else: Usage() error_count = 0 print '%d errors found.' % error_count
ajibawa-2023/Python-Code-Large/train/row_267
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Import_L8_C0", "label": "mytracks.files import mytracks.files", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0104, 0, 0.66, 0.125, 640, 0, 1, 0, 0, 640, 0, 0], "semantic": {"name": "mytracks.files", "arg_names": [], "import_names": ["mytracks.files"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Import_L9_C0", "label": "mytracks.translate import mytracks.translate", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0104, 0, 0.66, 0.25, 802, 0, 1, 0, 0, 802, 0, 0], "semantic": {"name": "mytracks.translate", "arg_names": [], "import_names": ["mytracks.translate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.translate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Import_L10_C0", "label": "mytracks.validate import mytracks.validate", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1042, 0.0104, 0, 0.66, 0.375, 355, 0, 1, 0, 0, 355, 0, 0], "semantic": {"name": "mytracks.validate", "arg_names": [], "import_names": ["mytracks.validate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.validate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Import_L11_C0", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1146, 0.0104, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "label": "Usage", "type": "function", "loc": [13, 19], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.0729, 0, 0.66, 0.625, 208, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n print(' translate')\n print(' validate')\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L14_C2", "label": "print()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1458, 0.0104, 1, 0.85, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L15_C2", "label": "print()", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1562, 0.0104, 1, 0.85, 0.2, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Commands are:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L16_C2", "label": "print()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1667, 0.0104, 1, 0.85, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' cleanup')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L17_C2", "label": "print()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1771, 0.0104, 1, 0.85, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' translate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L18_C2", "label": "print()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1875, 0.0104, 1, 0.85, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' validate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L19_C2", "label": "exit()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "vector": [8, 1, 0.1979, 0.0104, 1, 0.85, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "label": "Translate", "type": "function", "loc": [22, 41], "level": 0, "parent": null, "vector": [2, 0, 0.3281, 0.2083, 0, 0.66, 0.75, 749, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "Translate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Translate(languages):\n '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''\n validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L23_C2", "label": "expression", "type": "expression", "loc": [23, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [8, 1, 0.2656, 0.0625, 1, 0.09, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L29_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [14, 1, 0.3021, 0.0104, 1, 0.09, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L30_C2", "label": "Validate()", "type": "expression", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [8, 1, 0.3125, 0.0104, 1, 0.09, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L31_C2", "label": "missing = missing_in_lang()", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [14, 1, 0.3229, 0.0104, 1, 0.09, 0.6, 249, 3, 0, 0, 0, 449, 10, 1], "semantic": {"name": "missing", "arg_names": [], "import_names": [], "rhs_call_name": "missing_in_lang", "annotation": ""}, "snippet": " missing = validator.missing_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L32_C2", "label": "outdated = outdated_in_lang()", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [14, 1, 0.3333, 0.0104, 1, 0.09, 0.8, 362, 3, 0, 0, 0, 862, 10, 1], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "outdated_in_lang", "annotation": ""}, "snippet": " outdated = validator.outdated_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "label": "for lang", "type": "for", "loc": [34, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "vector": [6, 1, 0.3906, 0.0833, 1, 0.09, 1.0, 312, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang in languages:\n untranslated = missing[lang] + outdated[lang]\n \n if len(untranslated) == 0:\n continue\n\n translator = mytracks.translate.Translator(lang)\n translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L35_C4", "label": "untranslated =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "vector": [14, 2, 0.3646, 0.0104, 2, 0.95, 0.0, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "untranslated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " untranslated = missing[lang] + outdated[lang]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L37_C4", "label": "if", "type": "if", "loc": [37, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "vector": [4, 2, 0.3906, 0.0208, 2, 0.95, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(untranslated) == 0:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L40_C4", "label": "translator = Translator()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "vector": [14, 2, 0.4167, 0.0104, 2, 0.95, 0.6667, 380, 3, 1, 0, 0, 229, 10, 1], "semantic": {"name": "translator", "arg_names": [], "import_names": [], "rhs_call_name": "Translator", "annotation": ""}, "snippet": " translator = mytracks.translate.Translator(lang)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L41_C4", "label": "Translate()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "vector": [8, 2, 0.4271, 0.0104, 2, 0.95, 1.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "label": "Validate", "type": "function", "loc": [44, 67], "level": 0, "parent": null, "vector": [2, 0, 0.5781, 0.25, 0, 0.66, 0.875, 60, 0, 1, 1, 0, 0, 0, 19], "semantic": {"name": "Validate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Validate(languages):\n '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''\n validator = mytracks.validate.Validator(languages)\n validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L45_C2", "label": "expression", "type": "expression", "loc": [45, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [8, 1, 0.4896, 0.0521, 1, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L50_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [14, 1, 0.5208, 0.0104, 1, 0.46, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L51_C2", "label": "Validate()", "type": "expression", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [8, 1, 0.5312, 0.0104, 1, 0.46, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L53_C2", "label": "error_count =", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [14, 1, 0.5521, 0.0104, 1, 0.46, 0.6, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "label": "if", "type": "if", "loc": [54, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [4, 1, 0.6198, 0.125, 1, 0.46, 0.8, 0, 3, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (validator.valid()):\n print('All files OK')\n else:\n for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)\n for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L55_C4", "label": "print()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "vector": [8, 2, 0.5729, 0.0104, 2, 0.06, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('All files OK')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4", "label": "for lang, missing", "type": "for", "loc": [57, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "vector": [6, 2, 0.6042, 0.0312, 2, 0.06, 0.3333, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L58_C6", "label": "print()", "type": "expression", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4", "vector": [8, 3, 0.6042, 0.0104, 3, 0.19, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in master, present in %s: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L59_C6", "label": "error_count =", "type": "assigned_variable", "loc": [59, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4", "vector": [14, 3, 0.6146, 0.0104, 3, 0.19, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4", "label": "for lang, missing", "type": "for", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "vector": [6, 2, 0.6354, 0.0312, 2, 0.06, 0.6667, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L61_C6", "label": "print()", "type": "expression", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4", "vector": [8, 3, 0.6354, 0.0104, 3, 0.43, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L62_C6", "label": "error_count =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4", "vector": [14, 3, 0.6458, 0.0104, 3, 0.43, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4", "label": "for lang, outdated", "type": "for", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "vector": [6, 2, 0.6667, 0.0312, 2, 0.06, 1.0, 928, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, outdated in validator.outdated_in_lang().iteritems():\n print('Outdated in %s: %s:' % (lang, str(outdated)))\n error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L64_C6", "label": "print()", "type": "expression", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4", "vector": [8, 3, 0.6667, 0.0104, 3, 0.84, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Outdated in %s: %s:' % (lang, str(outdated)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L65_C6", "label": "error_count =", "type": "assigned_variable", "loc": [65, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4", "vector": [14, 3, 0.6771, 0.0104, 3, 0.84, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Return_L67_C2", "label": "return", "type": "return", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "vector": [13, 1, 0.6979, 0.0104, 1, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "label": "if", "type": "if", "loc": [70, 96], "level": 0, "parent": null, "vector": [4, 0, 0.8646, 0.2812, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n argv = sys.argv\n argc = len(argv)\n if argc < 2:\n Usage()\n\n languages = mytracks.files.GetAllLanguageFiles()\n if argc == 3:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L71_C2", "label": "argv =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [14, 1, 0.7396, 0.0104, 1, 0.53, 0.0, 612, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "argv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argv = sys.argv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L72_C2", "label": "argc = len()", "type": "assigned_variable", "loc": [72, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [14, 1, 0.75, 0.0104, 1, 0.53, 0.1429, 123, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "argc", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " argc = len(argv)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L73_C2", "label": "if", "type": "if", "loc": [73, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [4, 1, 0.7656, 0.0208, 1, 0.53, 0.2857, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc < 2:\n Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L74_C4", "label": "Usage()", "type": "expression", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L73_C2", "vector": [8, 2, 0.7708, 0.0104, 2, 0.7, 0.0, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L76_C2", "label": "languages = GetAllLanguageFiles()", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [14, 1, 0.7917, 0.0104, 1, 0.53, 0.4286, 126, 3, 0, 0, 0, 438, 10, 1], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "GetAllLanguageFiles", "annotation": ""}, "snippet": " languages = mytracks.files.GetAllLanguageFiles()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "label": "if", "type": "if", "loc": [77, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [4, 1, 0.8438, 0.0938, 1, 0.53, 0.5714, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc == 3:\n langs = set(argv[2:])\n if not langs.issubset(languages):\n raise 'Language(s) not found'\n\n # Filter just to the languages specified\n languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L78_C4", "label": "langs = set()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "vector": [14, 2, 0.8125, 0.0104, 2, 0.57, 0.0, 986, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "langs", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " langs = set(argv[2:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L79_C4", "label": "if", "type": "if", "loc": [79, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "vector": [4, 2, 0.8281, 0.0208, 2, 0.57, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not langs.issubset(languages):\n raise 'Language(s) not found'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L83_C4", "label": "languages = dict()", "type": "assigned_variable", "loc": [83, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "vector": [14, 2, 0.875, 0.0312, 2, 0.57, 1.0, 126, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()\n if lang in langs or lang == 'en' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L87_C2", "label": "cmd =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [14, 1, 0.9062, 0.0104, 1, 0.53, 0.7143, 604, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2", "label": "if", "type": "if", "loc": [88, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [4, 1, 0.9479, 0.0729, 1, 0.53, 0.8571, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cmd == 'translate':\n Translate(languages)\n elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L89_C4", "label": "Translate()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2", "vector": [8, 2, 0.9271, 0.0104, 2, 0.46, 0.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " Translate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "label": "if", "type": "if", "loc": [90, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2", "vector": [4, 2, 0.9583, 0.0521, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L91_C4", "label": "error_count = Validate()", "type": "assigned_variable", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "vector": [14, 3, 0.9479, 0.0104, 3, 0.93, 0.0, 59, 3, 1, 0, 0, 60, 10, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " error_count = Validate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L93_C4", "label": "Usage()", "type": "expression", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "vector": [8, 3, 0.9688, 0.0104, 3, 0.93, 0.5, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L94_C4", "label": "error_count =", "type": "assigned_variable", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "vector": [14, 3, 0.9792, 0.0104, 3, 0.93, 1.0, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L96_C2", "label": "print()", "type": "expression", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "vector": [8, 1, 1.0, 0.0104, 1, 0.53, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%d errors found.' % error_count)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L58_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L59_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L61_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L64_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L65_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Return_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_267:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_267:Expr_L96_C2"}]
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @param languages: a dictionary mapping each language to its corresponding directory ''' self._langs = {} self._master = None self._language_paths = languages parser = StringsParser() for lang, lang_dir in languages.iteritems(): filename = os.path.join(lang_dir, 'strings.xml') parsed_file = parser.Parse(filename) mytracks.history.FillMercurialRevisions(filename, parsed_file) if lang == 'en': self._master = parsed_file else: self._langs[lang] = parsed_file self._Reset() def Validate(self): ''' Computes whether all the data in the files for the given languages is valid. ''' self._Reset() self._ValidateMissingKeys() self._ValidateOutdatedKeys() def valid(self): return (len(self._missing_in_master) == 0 and len(self._missing_in_lang) == 0 and len(self._outdated_in_lang) == 0) def missing_in_master(self): return self._missing_in_master def missing_in_lang(self): return self._missing_in_lang def outdated_in_lang(self): return self._outdated_in_lang def _Reset(self): # These are maps from language to string name list self._missing_in_master = {} self._missing_in_lang = {} self._outdated_in_lang = {} def _ValidateMissingKeys(self): ''' Computes whether there are missing keys on either side. ''' master_keys = frozenset(self._master.iterkeys()) for lang, file in self._langs.iteritems(): keys = frozenset(file.iterkeys()) missing_in_master = keys - master_keys missing_in_lang = master_keys - keys if len(missing_in_master) > 0: self._missing_in_master[lang] = missing_in_master if len(missing_in_lang) > 0: self._missing_in_lang[lang] = missing_in_lang def _ValidateOutdatedKeys(self): ''' Computers whether any of the language keys are outdated with relation to the master keys. ''' for lang, file in self._langs.iteritems(): outdated = [] for key, str in file.iteritems(): # Get all revisions that touched master and language files for this # string. master_str = self._master[key] master_revs = master_str['revs'] lang_revs = str['revs'] if not master_revs or not lang_revs: print 'WARNING: No revision for %s in %s' % (key, lang) continue master_file = os.path.join(self._language_paths['en'], 'strings.xml') lang_file = os.path.join(self._language_paths[lang], 'strings.xml') # Assume that the repository has a single head (TODO: check that), # and as such there is always one revision which superceeds all others. master_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2), master_revs) lang_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2), lang_revs) # If the master version is newer than the lang version if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev): outdated.append(key) if len(outdated) > 0: self._outdated_in_lang[lang] = outdated
ajibawa-2023/Python-Code-Large/train/row_268
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Import_L8_C0", "label": "os import os", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:ImportFrom_L9_C0", "label": "from mytracks.parser import StringsParser", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0783, 0.0087, 0, 0.66, 0.5, 161, 0, 1, 0, 0, 161, 0, 0], "semantic": {"name": "mytracks.parser", "arg_names": [], "import_names": ["StringsParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from mytracks.parser import StringsParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Import_L10_C0", "label": "mytracks.history import mytracks.history", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0087, 0, 0.66, 0.75, 247, 0, 1, 0, 0, 247, 0, 0], "semantic": {"name": "mytracks.history", "arg_names": [], "import_names": ["mytracks.history"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.history "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "label": "Validator", "type": "class", "loc": [12, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5522, 0.9043, 0, 0.66, 1.0, 957, 0, 9, 0, 0, 186, 0, 31], "semantic": {"name": "Validator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.2174, 0.2, 1, 0.42, 0.0, 555, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "__init__", "arg_names": ["self", "languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''\n self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [8, 2, 0.1522, 0.0522, 2, 0.61, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L21_C4", "label": "self._langs =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [14, 2, 0.1826, 0.0087, 2, 0.61, 0.1667, 591, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._langs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L22_C4", "label": "self._master =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [14, 2, 0.1913, 0.0087, 2, 0.61, 0.3333, 265, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L23_C4", "label": "self._language_paths =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [14, 2, 0.2, 0.0087, 2, 0.61, 0.5, 356, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language_paths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language_paths = languages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L25_C4", "label": "parser = StringsParser()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [14, 2, 0.2174, 0.0087, 2, 0.61, 0.6667, 968, 3, 0, 0, 0, 282, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "StringsParser", "annotation": ""}, "snippet": " parser = StringsParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "label": "for lang, lang_dir", "type": "for", "loc": [26, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [6, 2, 0.2609, 0.0783, 2, 0.61, 0.8333, 114, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "lang, lang_dir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, lang_dir in languages.iteritems():\n filename = os.path.join(lang_dir, 'strings.xml')\n parsed_file = parser.Parse(filename)\n mytracks.history.FillMercurialRevisions(filename, parsed_file)\n\n if lang == 'en':\n self._master = parsed_file\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L27_C6", "label": "filename = join()", "type": "assigned_variable", "loc": [27, 27], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "vector": [14, 3, 0.2348, 0.0087, 3, 0.51, 0.0, 275, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " filename = os.path.join(lang_dir, 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L28_C6", "label": "parsed_file = Parse()", "type": "assigned_variable", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "vector": [14, 3, 0.2435, 0.0087, 3, 0.51, 0.3333, 76, 3, 1, 0, 0, 291, 10, 1], "semantic": {"name": "parsed_file", "arg_names": [], "import_names": [], "rhs_call_name": "Parse", "annotation": ""}, "snippet": " parsed_file = parser.Parse(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L29_C6", "label": "FillMercurialRevisions()", "type": "expression", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "vector": [8, 3, 0.2522, 0.0087, 3, 0.51, 0.6667, 942, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "FillMercurialRevisions", "arg_names": [], "import_names": [], "rhs_call_name": "FillMercurialRevisions", "annotation": ""}, "snippet": " mytracks.history.FillMercurialRevisions(filename, parsed_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6", "label": "if", "type": "if", "loc": [31, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "vector": [4, 3, 0.2826, 0.0348, 3, 0.51, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lang == 'en':\n self._master = parsed_file\n else:\n self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L32_C8", "label": "self._master =", "type": "assigned_variable", "loc": [32, 32], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6", "vector": [14, 4, 0.2783, 0.0087, 4, 0.93, 0.0, 265, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L34_C8", "label": "assign", "type": "assigned_variable", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6", "vector": [14, 4, 0.2957, 0.0087, 4, 0.93, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L36_C4", "label": "_Reset()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "vector": [8, 2, 0.313, 0.0087, 2, 0.61, 1.0, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "label": "Validate", "type": "function", "loc": [38, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.3565, 0.0609, 1, 0.42, 0.125, 60, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "Validate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Validate(self):\n '''\n Computes whether all the data in the files for the given languages is valid.\n '''\n self._Reset()\n self._ValidateMissingKeys()\n self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L39_C4", "label": "expression", "type": "expression", "loc": [39, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "vector": [8, 2, 0.3478, 0.0261, 2, 0.16, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether all the data in the files for the given languages is valid.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L42_C4", "label": "_Reset()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "vector": [8, 2, 0.3652, 0.0087, 2, 0.16, 0.3333, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L43_C4", "label": "_ValidateMissingKeys()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "vector": [8, 2, 0.3739, 0.0087, 2, 0.16, 0.6667, 427, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateMissingKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateMissingKeys", "annotation": ""}, "snippet": " self._ValidateMissingKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L44_C4", "label": "_ValidateOutdatedKeys()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "vector": [8, 2, 0.3826, 0.0087, 2, 0.16, 1.0, 676, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateOutdatedKeys", "annotation": ""}, "snippet": " self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L46_C2", "label": "valid", "type": "function", "loc": [46, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.413, 0.0348, 1, 0.42, 0.25, 552, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "valid", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def valid(self):\n return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L47_C4", "label": "return", "type": "return", "loc": [47, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L46_C2", "vector": [13, 2, 0.4174, 0.0261, 2, 0.31, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L51_C2", "label": "missing_in_master", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.4478, 0.0174, 1, 0.42, 0.375, 277, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_master(self):\n return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L52_C4", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L51_C2", "vector": [13, 2, 0.4522, 0.0087, 2, 0.94, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L54_C2", "label": "missing_in_lang", "type": "function", "loc": [54, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.4739, 0.0174, 1, 0.42, 0.5, 449, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_lang(self):\n return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L55_C4", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L54_C2", "vector": [13, 2, 0.4783, 0.0087, 2, 0.64, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L57_C2", "label": "outdated_in_lang", "type": "function", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.5, 0.0174, 1, 0.42, 0.625, 862, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "outdated_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def outdated_in_lang(self):\n return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L58_C4", "label": "return", "type": "return", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L57_C2", "vector": [13, 2, 0.5043, 0.0087, 2, 0.14, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "label": "_Reset", "type": "function", "loc": [60, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.5391, 0.0435, 1, 0.42, 0.75, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n # These are maps from language to string name list\n self._missing_in_master = {}\n self._missing_in_lang = {}\n self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L62_C4", "label": "self._missing_in_master =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "vector": [14, 2, 0.5391, 0.0087, 2, 0.69, 0.0, 252, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L63_C4", "label": "self._missing_in_lang =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "vector": [14, 2, 0.5478, 0.0087, 2, 0.69, 0.5, 473, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L64_C4", "label": "self._outdated_in_lang =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "vector": [14, 2, 0.5565, 0.0087, 2, 0.69, 1.0, 575, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._outdated_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "label": "_ValidateMissingKeys", "type": "function", "loc": [66, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.6304, 0.1217, 1, 0.42, 0.875, 427, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "_ValidateMissingKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateMissingKeys(self):\n '''\n Computes whether there are missing keys on either side.\n '''\n master_keys = frozenset(self._master.iterkeys())\n for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L67_C4", "label": "expression", "type": "expression", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "vector": [8, 2, 0.5913, 0.0261, 2, 0.39, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether there are missing keys on either side.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L70_C4", "label": "master_keys = frozenset()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "vector": [14, 2, 0.6087, 0.0087, 2, 0.39, 0.5, 468, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "master_keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " master_keys = frozenset(self._master.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "label": "for lang, file", "type": "for", "loc": [71, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "vector": [6, 2, 0.6522, 0.0783, 2, 0.39, 1.0, 275, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys\n missing_in_lang = master_keys - keys\n\n if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master\n if len(missing_in_lang) > 0:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L72_C6", "label": "keys = frozenset()", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.02, 0.0, 204, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " keys = frozenset(file.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L73_C6", "label": "missing_in_master =", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "vector": [14, 3, 0.6348, 0.0087, 3, 0.02, 0.25, 277, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L74_C6", "label": "missing_in_lang =", "type": "assigned_variable", "loc": [74, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "vector": [14, 3, 0.6435, 0.0087, 3, 0.02, 0.5, 449, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_lang = master_keys - keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L76_C6", "label": "if", "type": "if", "loc": [76, 77], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "vector": [4, 3, 0.6652, 0.0174, 3, 0.02, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L77_C8", "label": "assign", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L76_C6", "vector": [14, 4, 0.6696, 0.0087, 4, 0.76, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L78_C6", "label": "if", "type": "if", "loc": [78, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "vector": [4, 3, 0.6826, 0.0174, 3, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_lang) > 0:\n self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L79_C8", "label": "assign", "type": "assigned_variable", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L78_C6", "vector": [14, 4, 0.687, 0.0087, 4, 0.19, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2", "label": "_ValidateOutdatedKeys", "type": "function", "loc": [81, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "vector": [2, 1, 0.8522, 0.3043, 1, 0.42, 1.0, 676, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateOutdatedKeys(self):\n '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''\n for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L82_C4", "label": "expression", "type": "expression", "loc": [82, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2", "vector": [8, 2, 0.7261, 0.0348, 2, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "label": "for lang, file", "type": "for", "loc": [86, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2", "vector": [6, 2, 0.8739, 0.2609, 2, 0.44, 1.0, 275, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L87_C6", "label": "outdated =", "type": "assigned_variable", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "vector": [14, 3, 0.7565, 0.0087, 3, 0.14, 0.0, 362, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " outdated = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "label": "for key, str", "type": "for", "loc": [88, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "vector": [6, 3, 0.8696, 0.2174, 3, 0.14, 0.5, 83, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "key, str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']\n if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L91_C8", "label": "master_str =", "type": "assigned_variable", "loc": [91, 91], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.7913, 0.0087, 4, 0.37, 0.0, 440, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_str = self._master[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L92_C8", "label": "master_revs =", "type": "assigned_variable", "loc": [92, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.8, 0.0087, 4, 0.37, 0.125, 616, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_revs = master_str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L93_C8", "label": "lang_revs =", "type": "assigned_variable", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.8087, 0.0087, 4, 0.37, 0.25, 522, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lang_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L94_C8", "label": "if", "type": "if", "loc": [94, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [4, 4, 0.8261, 0.0261, 4, 0.37, 0.375, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L95_C10", "label": "print()", "type": "expression", "loc": [95, 95], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L94_C8", "vector": [8, 5, 0.8261, 0.0087, 5, 0.71, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L98_C8", "label": "master_file = join()", "type": "assigned_variable", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.8522, 0.0087, 4, 0.37, 0.5, 377, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "master_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_file = os.path.join(self._language_paths['en'], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L99_C8", "label": "lang_file = join()", "type": "assigned_variable", "loc": [99, 99], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.8609, 0.0087, 4, 0.37, 0.625, 906, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "lang_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " lang_file = os.path.join(self._language_paths[lang], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L103_C8", "label": "master_rev = reduce()", "type": "assigned_variable", "loc": [103, 105], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.9043, 0.0261, 4, 0.37, 0.75, 609, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "master_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " master_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2),\n master_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L106_C8", "label": "lang_rev = reduce()", "type": "assigned_variable", "loc": [106, 108], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [14, 4, 0.9304, 0.0261, 4, 0.37, 0.875, 74, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "lang_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " lang_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2),\n lang_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L111_C8", "label": "if", "type": "if", "loc": [111, 112], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "vector": [4, 4, 0.9696, 0.0174, 4, 0.37, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev):\n outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L112_C10", "label": "append()", "type": "expression", "loc": [112, 112], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L111_C8", "vector": [8, 5, 0.9739, 0.0087, 5, 0.41, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:If_L114_C6", "label": "if", "type": "if", "loc": [114, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "vector": [4, 3, 0.9957, 0.0174, 3, 0.14, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(outdated) > 0:\n self._outdated_in_lang[lang] = outdated"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L115_C8", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_268:If_L114_C6", "vector": [14, 4, 1.0, 0.0087, 4, 0.25, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang[lang] = outdated"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L27_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L28_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L29_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L51_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L57_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Return_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L73_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L74_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L76_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L76_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L78_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L78_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L87_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L95_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Expr_L112_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_268:If_L114_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_268:If_L114_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_268:Assign_L115_C8"}]
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTracks directory is located. ''' path = os.getcwd() while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)): if path == '/': raise 'Not in My Tracks project' # Go up one level path = os.path.split(path)[0] return path def GetAllLanguageFiles(): ''' Returns a mapping from all found languages to their respective directories. ''' mytracks_path = GetMyTracksDir() res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK) language_dirs = glob(res_dir) master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES) if len(language_dirs) == 0: raise 'No languages found!' if not os.path.isdir(master_dir): raise 'Couldn\'t find master file' language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs] language_tuples.append(('en', master_dir)) return dict(language_tuples)
ajibawa-2023/Python-Code-Large/train/row_269
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Import_L6_C0", "label": "os.path import os.path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0222, 0, 0.66, 0.125, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:ImportFrom_L7_C0", "label": "from glob import glob", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1556, 0.0222, 0, 0.66, 0.25, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_name": "", "annotation": ""}, "snippet": "from glob import glob"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.1778, 0.0222, 0, 0.66, 0.375, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L10_C0", "label": "MYTRACKS_RES_DIR =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.0222, 0, 0.66, 0.5, 40, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MYTRACKS_RES_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MYTRACKS_RES_DIR = 'MyTracks/res'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L11_C0", "label": "ANDROID_MASTER_VALUES =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.2444, 0.0222, 0, 0.66, 0.625, 918, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_MASTER_VALUES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_MASTER_VALUES = 'values'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L12_C0", "label": "ANDROID_VALUES_MASK =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0222, 0, 0.66, 0.75, 115, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_VALUES_MASK", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_VALUES_MASK = 'values-*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "label": "GetMyTracksDir", "type": "function", "loc": [15, 27], "level": 0, "parent": null, "vector": [2, 0, 0.4667, 0.2889, 0, 0.66, 0.875, 854, 0, 0, 1, 0, 0, 0, 4], "semantic": {"name": "GetMyTracksDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetMyTracksDir():\n '''\n Returns the directory in which the MyTracks directory is located.\n '''\n path = os.getcwd()\n while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L16_C2", "label": "expression", "type": "expression", "loc": [16, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "vector": [8, 1, 0.3778, 0.0667, 1, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns the directory in which the MyTracks directory is located.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L19_C2", "label": "path = getcwd()", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "vector": [14, 1, 0.4222, 0.0222, 1, 0.8, 0.3333, 358, 3, 0, 0, 0, 320, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "getcwd", "annotation": ""}, "snippet": " path = os.getcwd()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2", "label": "while", "type": "while", "loc": [20, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "vector": [5, 1, 0.5, 0.1333, 1, 0.8, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'\n\n # Go up one level\n path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:If_L21_C4", "label": "if", "type": "if", "loc": [21, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2", "vector": [4, 2, 0.4778, 0.0444, 2, 0.65, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L25_C4", "label": "path =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2", "vector": [14, 2, 0.5556, 0.0222, 2, 0.65, 1.0, 358, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Return_L27_C2", "label": "return", "type": "return", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "vector": [13, 1, 0.6, 0.0222, 1, 0.8, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "label": "GetAllLanguageFiles", "type": "function", "loc": [30, 45], "level": 0, "parent": null, "vector": [2, 0, 0.8333, 0.3556, 0, 0.66, 1.0, 438, 0, 0, 1, 0, 0, 0, 9], "semantic": {"name": "GetAllLanguageFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetAllLanguageFiles():\n '''\n Returns a mapping from all found languages to their respective directories.\n '''\n mytracks_path = GetMyTracksDir()\n res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)\n language_dirs = glob(res_dir)\n master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L31_C2", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [8, 1, 0.7111, 0.0667, 1, 0.34, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns a mapping from all found languages to their respective directories.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L34_C2", "label": "mytracks_path = GetMyTracksDir()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [14, 1, 0.7556, 0.0222, 1, 0.34, 0.1111, 720, 3, 0, 0, 0, 854, 10, 1], "semantic": {"name": "mytracks_path", "arg_names": [], "import_names": [], "rhs_call_name": "GetMyTracksDir", "annotation": ""}, "snippet": " mytracks_path = GetMyTracksDir()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L35_C2", "label": "res_dir = join()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [14, 1, 0.7778, 0.0222, 1, 0.34, 0.2222, 400, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "res_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L36_C2", "label": "language_dirs = glob()", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [14, 1, 0.8, 0.0222, 1, 0.34, 0.3333, 191, 3, 1, 0, 0, 958, 10, 1], "semantic": {"name": "language_dirs", "arg_names": [], "import_names": [], "rhs_call_name": "glob", "annotation": ""}, "snippet": " language_dirs = glob(res_dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L37_C2", "label": "master_dir = join()", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [14, 1, 0.8222, 0.0222, 1, 0.34, 0.4444, 493, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "master_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:If_L38_C2", "label": "if", "type": "if", "loc": [38, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [4, 1, 0.8556, 0.0444, 1, 0.34, 0.5556, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(language_dirs) == 0:\n raise 'No languages found!'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:If_L40_C2", "label": "if", "type": "if", "loc": [40, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [4, 1, 0.9, 0.0444, 1, 0.34, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.path.isdir(master_dir):\n raise 'Couldn\\'t find master file'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L43_C2", "label": "language_tuples =", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [14, 1, 0.9556, 0.0222, 1, 0.34, 0.7778, 966, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "language_tuples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L44_C2", "label": "append()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [8, 1, 0.9778, 0.0222, 1, 0.34, 0.8889, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " language_tuples.append(('en', master_dir))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_269:Return_L45_C2", "label": "return", "type": "return", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "vector": [13, 1, 1.0, 0.0222, 1, 0.34, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return dict(language_tuples)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_269:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Return_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:If_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:If_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Assign_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_269:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_269:Return_L45_C2"}]
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import os import sys # parse_qsl moved to urlparse module in v2.6 try: from urlparse import parse_qsl except: from cgi import parse_qsl import oauth2 as oauth REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token' ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token' AUTHORIZATION_URL = 'https://api.twitter.com/oauth/authorize' SIGNIN_URL = 'https://api.twitter.com/oauth/authenticate' consumer_key = None consumer_secret = None if consumer_key is None or consumer_secret is None: print 'You need to edit this script and provide values for the' print 'consumer_key and also consumer_secret.' print '' print 'The values you need come from Twitter - you need to register' print 'as a developer your "application". This is needed only until' print 'Twitter finishes the idea they have of a way to allow open-source' print 'based libraries to have a token that can be used to generate a' print 'one-time use key that will allow the library to make the request' print 'on your behalf.' print '' sys.exit(1) signature_method_hmac_sha1 = oauth.SignatureMethod_HMAC_SHA1() oauth_consumer = oauth.Consumer(key=consumer_key, secret=consumer_secret) oauth_client = oauth.Client(oauth_consumer) print 'Requesting temp token from Twitter' resp, content = oauth_client.request(REQUEST_TOKEN_URL, 'GET') if resp['status'] != '200': print 'Invalid respond from Twitter requesting temp token: %s' % resp['status'] else: request_token = dict(parse_qsl(content)) print '' print 'Please visit this Twitter page and retrieve the pincode to be used' print 'in the next step to obtaining an Authentication Token:' print '' print '%s?oauth_token=%s' % (AUTHORIZATION_URL, request_token['oauth_token']) print '' pincode = raw_input('Pincode? ') token = oauth.Token(request_token['oauth_token'], request_token['oauth_token_secret']) token.set_verifier(pincode) print '' print 'Generating and signing request for an access token' print '' oauth_client = oauth.Client(oauth_consumer, token) resp, content = oauth_client.request(ACCESS_TOKEN_URL, method='POST', body='oauth_callback=oob&oauth_verifier=%s' % pincode) access_token = dict(parse_qsl(content)) if resp['status'] != '200': print 'The request for a Token did not succeed: %s' % resp['status'] print access_token else: print 'Your Twitter Access Token key: %s' % access_token['oauth_token'] print ' Access Token secret: %s' % access_token['oauth_token_secret'] print ''
ajibawa-2023/Python-Code-Large/train/row_270
53
91
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_270:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1978, 0.011, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Import_L19_C0", "label": "sys import sys", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.2088, 0.011, 0, 0.66, 0.0625, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Try_L22_C0", "label": "try", "type": "try", "loc": [22, 25], "level": 0, "parent": null, "vector": [7, 0, 0.2582, 0.044, 0, 0.66, 0.125, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from urlparse import parse_qsl\nexcept:\n from cgi import parse_qsl"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:ImportFrom_L23_C2", "label": "from urlparse import parse_qsl", "type": "import", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:Try_L22_C0", "vector": [1, 1, 0.2527, 0.011, 1, 0.09, 0.0, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["parse_qsl"], "rhs_call_name": "", "annotation": ""}, "snippet": " from urlparse import parse_qsl"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:ImportFrom_L25_C2", "label": "from cgi import parse_qsl", "type": "import", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:Try_L22_C0", "vector": [1, 1, 0.2747, 0.011, 1, 0.09, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["parse_qsl"], "rhs_call_name": "", "annotation": ""}, "snippet": " from cgi import parse_qsl"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Import_L27_C0", "label": "oauth2 import oauth", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.2967, 0.011, 0, 0.66, 0.1875, 311, 0, 1, 0, 0, 311, 0, 0], "semantic": {"name": "oauth2", "arg_names": [], "import_names": ["oauth"], "rhs_call_name": "", "annotation": ""}, "snippet": "import oauth2 as oauth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L29_C0", "label": "REQUEST_TOKEN_URL =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.3187, 0.011, 0, 0.66, 0.25, 456, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "REQUEST_TOKEN_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L30_C0", "label": "ACCESS_TOKEN_URL =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.3297, 0.011, 0, 0.66, 0.3125, 469, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ACCESS_TOKEN_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L31_C0", "label": "AUTHORIZATION_URL =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.3407, 0.011, 0, 0.66, 0.375, 473, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "AUTHORIZATION_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "AUTHORIZATION_URL = 'https://api.twitter.com/oauth/authorize'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L32_C0", "label": "SIGNIN_URL =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.3516, 0.011, 0, 0.66, 0.4375, 800, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SIGNIN_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SIGNIN_URL = 'https://api.twitter.com/oauth/authenticate'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L34_C0", "label": "consumer_key =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.3736, 0.011, 0, 0.66, 0.5, 353, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "consumer_key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "consumer_key = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L35_C0", "label": "consumer_secret =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.3846, 0.011, 0, 0.66, 0.5625, 734, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "consumer_secret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "consumer_secret = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "label": "if", "type": "if", "loc": [38, 49], "level": 0, "parent": null, "vector": [4, 0, 0.478, 0.1319, 0, 0.66, 0.625, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if consumer_key is None or consumer_secret is None:\n print('You need to edit this script and provide values for the')\n print('consumer_key and also consumer_secret.')\n print('')\n print('The values you need come from Twitter - you need to register')\n print('as a developer your \"application\". This is needed only until')\n print('Twitter finishes the idea they have of a way to allow open-source')\n print('based libraries to have a token that can be used to generate a')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L39_C2", "label": "print()", "type": "expression", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4286, 0.011, 1, 0.1, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('You need to edit this script and provide values for the')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L40_C2", "label": "print()", "type": "expression", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4396, 0.011, 1, 0.1, 0.1, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('consumer_key and also consumer_secret.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L41_C2", "label": "print()", "type": "expression", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4505, 0.011, 1, 0.1, 0.2, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L42_C2", "label": "print()", "type": "expression", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4615, 0.011, 1, 0.1, 0.3, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('The values you need come from Twitter - you need to register')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L43_C2", "label": "print()", "type": "expression", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4725, 0.011, 1, 0.1, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('as a developer your \"application\". This is needed only until')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L44_C2", "label": "print()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4835, 0.011, 1, 0.1, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Twitter finishes the idea they have of a way to allow open-source')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L45_C2", "label": "print()", "type": "expression", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.4945, 0.011, 1, 0.1, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('based libraries to have a token that can be used to generate a')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L46_C2", "label": "print()", "type": "expression", "loc": [46, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.5055, 0.011, 1, 0.1, 0.7, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('one-time use key that will allow the library to make the request')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L47_C2", "label": "print()", "type": "expression", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.5165, 0.011, 1, 0.1, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('on your behalf.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L48_C2", "label": "print()", "type": "expression", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.5275, 0.011, 1, 0.1, 0.9, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L49_C2", "label": "exit()", "type": "expression", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "vector": [8, 1, 0.5385, 0.011, 1, 0.1, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L51_C0", "label": "signature_method_hmac_sha1 = SignatureMethod_HMAC_SHA1()", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.5604, 0.011, 0, 0.66, 0.6875, 705, 3, 0, 0, 0, 948, 10, 1], "semantic": {"name": "signature_method_hmac_sha1", "arg_names": [], "import_names": [], "rhs_call_name": "SignatureMethod_HMAC_SHA1", "annotation": ""}, "snippet": "signature_method_hmac_sha1 = oauth.SignatureMethod_HMAC_SHA1()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L52_C0", "label": "oauth_consumer = Consumer()", "type": "assigned_variable", "loc": [52, 52], "level": 0, "parent": null, "vector": [14, 0, 0.5714, 0.011, 0, 0.66, 0.75, 316, 3, 2, 0, 0, 881, 10, 1], "semantic": {"name": "oauth_consumer", "arg_names": [], "import_names": [], "rhs_call_name": "Consumer", "annotation": ""}, "snippet": "oauth_consumer = oauth.Consumer(key=consumer_key, secret=consumer_secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L53_C0", "label": "oauth_client = Client()", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.5824, 0.011, 0, 0.66, 0.8125, 671, 3, 1, 0, 0, 412, 10, 1], "semantic": {"name": "oauth_client", "arg_names": [], "import_names": [], "rhs_call_name": "Client", "annotation": ""}, "snippet": "oauth_client = oauth.Client(oauth_consumer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L55_C0", "label": "print()", "type": "expression", "loc": [55, 55], "level": 0, "parent": null, "vector": [8, 0, 0.6044, 0.011, 0, 0.66, 0.875, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('Requesting temp token from Twitter')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L57_C0", "label": "resp, content = request()", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.6264, 0.011, 0, 0.66, 0.9375, 339, 3, 2, 0, 0, 50, 10, 1], "semantic": {"name": "resp, content", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": "resp, content = oauth_client.request(REQUEST_TOKEN_URL, 'GET')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "label": "if", "type": "if", "loc": [59, 90], "level": 0, "parent": null, "vector": [4, 0, 0.8187, 0.3516, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 24], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if resp['status'] != '200':\n print('Invalid respond from Twitter requesting temp token: %s' % resp['status'])\nelse:\n request_token = dict(parse_qsl(content))\n\n print('')\n print('Please visit this Twitter page and retrieve the pincode to be used')\n print('in the next step to obtaining an Authentication Token:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L60_C2", "label": "print()", "type": "expression", "loc": [60, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.6593, 0.011, 1, 0.54, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Invalid respond from Twitter requesting temp token: %s' % resp['status'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L62_C2", "label": "request_token = dict()", "type": "assigned_variable", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.6813, 0.011, 1, 0.54, 0.0588, 279, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "request_token", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " request_token = dict(parse_qsl(content))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L64_C2", "label": "print()", "type": "expression", "loc": [64, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7033, 0.011, 1, 0.54, 0.1176, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L65_C2", "label": "print()", "type": "expression", "loc": [65, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7143, 0.011, 1, 0.54, 0.1765, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Please visit this Twitter page and retrieve the pincode to be used')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L66_C2", "label": "print()", "type": "expression", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7253, 0.011, 1, 0.54, 0.2353, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('in the next step to obtaining an Authentication Token:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L67_C2", "label": "print()", "type": "expression", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7363, 0.011, 1, 0.54, 0.2941, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L68_C2", "label": "print()", "type": "expression", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7473, 0.011, 1, 0.54, 0.3529, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%s?oauth_token=%s' % (AUTHORIZATION_URL, request_token['oauth_token']))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L69_C2", "label": "print()", "type": "expression", "loc": [69, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.7582, 0.011, 1, 0.54, 0.4118, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L71_C2", "label": "pincode = raw_input()", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.7802, 0.011, 1, 0.54, 0.4706, 437, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "pincode", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": " pincode = raw_input('Pincode? ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L73_C2", "label": "token = Token()", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.8022, 0.011, 1, 0.54, 0.5294, 129, 3, 2, 0, 0, 92, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "Token", "annotation": ""}, "snippet": " token = oauth.Token(request_token['oauth_token'], request_token['oauth_token_secret'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L74_C2", "label": "set_verifier()", "type": "expression", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.8132, 0.011, 1, 0.54, 0.5882, 943, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set_verifier", "arg_names": [], "import_names": [], "rhs_call_name": "set_verifier", "annotation": ""}, "snippet": " token.set_verifier(pincode)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L76_C2", "label": "print()", "type": "expression", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.8352, 0.011, 1, 0.54, 0.6471, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L77_C2", "label": "print()", "type": "expression", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.8462, 0.011, 1, 0.54, 0.7059, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Generating and signing request for an access token')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L78_C2", "label": "print()", "type": "expression", "loc": [78, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [8, 1, 0.8571, 0.011, 1, 0.54, 0.7647, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L80_C2", "label": "oauth_client = Client()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.8791, 0.011, 1, 0.54, 0.8235, 671, 3, 2, 0, 0, 412, 10, 1], "semantic": {"name": "oauth_client", "arg_names": [], "import_names": [], "rhs_call_name": "Client", "annotation": ""}, "snippet": " oauth_client = oauth.Client(oauth_consumer, token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L81_C2", "label": "resp, content = request()", "type": "assigned_variable", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.8901, 0.011, 1, 0.54, 0.8824, 339, 3, 3, 0, 0, 50, 10, 1], "semantic": {"name": "resp, content", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " resp, content = oauth_client.request(ACCESS_TOKEN_URL, method='POST', body='oauth_callback=oob&oauth_verifier=%s' % pincode)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L82_C2", "label": "access_token = dict()", "type": "assigned_variable", "loc": [82, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [14, 1, 0.9011, 0.011, 1, 0.54, 0.9412, 797, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " access_token = dict(parse_qsl(content))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "label": "if", "type": "if", "loc": [84, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "vector": [4, 1, 0.956, 0.0769, 1, 0.54, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if resp['status'] != '200':\n print('The request for a Token did not succeed: %s' % resp['status'])\n print(access_token)\n else:\n print('Your Twitter Access Token key: %s' % access_token['oauth_token'])\n print(' Access Token secret: %s' % access_token['oauth_token_secret'])\n print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L85_C4", "label": "print()", "type": "expression", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "vector": [8, 2, 0.9341, 0.011, 2, 0.13, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('The request for a Token did not succeed: %s' % resp['status'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L86_C4", "label": "print()", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "vector": [8, 2, 0.9451, 0.011, 2, 0.13, 0.25, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(access_token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L88_C4", "label": "print()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "vector": [8, 2, 0.967, 0.011, 2, 0.13, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Your Twitter Access Token key: %s' % access_token['oauth_token'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L89_C4", "label": "print()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "vector": [8, 2, 0.978, 0.011, 2, 0.13, 0.75, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' Access Token secret: %s' % access_token['oauth_token_secret'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L90_C4", "label": "print()", "type": "expression", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "vector": [8, 2, 0.989, 0.011, 2, 0.13, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('')"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_270:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:ImportFrom_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:Try_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:ImportFrom_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L68_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L74_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Assign_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_270:If_L84_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_270:Expr_L90_C4"}]
#!/usr/bin/python2.4 '''Post a message to twitter''' __author__ = 'dewitt@google.com' import ConfigParser import getopt import os import sys import twitter USAGE = '''Usage: tweet [options] message This script posts a message to Twitter. Options: -h --help : print this help --consumer-key : the twitter consumer key --consumer-secret : the twitter consumer secret --access-key : the twitter access token key --access-secret : the twitter access token secret --encoding : the character set encoding used in input strings, e.g. "utf-8". [optional] Documentation: If either of the command line flags are not present, the environment variables TWEETUSERNAME and TWEETPASSWORD will then be checked for your consumer_key or consumer_secret, respectively. If neither the command line flags nor the enviroment variables are present, the .tweetrc file, if it exists, can be used to set the default consumer_key and consumer_secret. The file should contain the following three lines, replacing *consumer_key* with your consumer key, and *consumer_secret* with your consumer secret: A skeletal .tweetrc file: [Tweet] consumer_key: *consumer_key* consumer_secret: *consumer_password* access_key: *access_key* access_secret: *access_password* ''' def PrintUsageAndExit(): print USAGE sys.exit(2) def GetConsumerKeyEnv(): return os.environ.get("TWEETUSERNAME", None) def GetConsumerSecretEnv(): return os.environ.get("TWEETPASSWORD", None) def GetAccessKeyEnv(): return os.environ.get("TWEETACCESSKEY", None) def GetAccessSecretEnv(): return os.environ.get("TWEETACCESSSECRET", None) class TweetRc(object): def __init__(self): self._config = None def GetConsumerKey(self): return self._GetOption('consumer_key') def GetConsumerSecret(self): return self._GetOption('consumer_secret') def GetAccessKey(self): return self._GetOption('access_key') def GetAccessSecret(self): return self._GetOption('access_secret') def _GetOption(self, option): try: return self._GetConfig().get('Tweet', option) except: return None def _GetConfig(self): if not self._config: self._config = ConfigParser.ConfigParser() self._config.read(os.path.expanduser('~/.tweetrc')) return self._config def main(): try: shortflags = 'h' longflags = ['help', 'consumer-key=', 'consumer-secret=', 'access-key=', 'access-secret=', 'encoding='] opts, args = getopt.gnu_getopt(sys.argv[1:], shortflags, longflags) except getopt.GetoptError: PrintUsageAndExit() consumer_keyflag = None consumer_secretflag = None access_keyflag = None access_secretflag = None encoding = None for o, a in opts: if o in ("-h", "--help"): PrintUsageAndExit() if o in ("--consumer-key"): consumer_keyflag = a if o in ("--consumer-secret"): consumer_secretflag = a if o in ("--access-key"): access_keyflag = a if o in ("--access-secret"): access_secretflag = a if o in ("--encoding"): encoding = a message = ' '.join(args) if not message: PrintUsageAndExit() rc = TweetRc() consumer_key = consumer_keyflag or GetConsumerKeyEnv() or rc.GetConsumerKey() consumer_secret = consumer_secretflag or GetConsumerSecretEnv() or rc.GetConsumerSecret() access_key = access_keyflag or GetAccessKeyEnv() or rc.GetAccessKey() access_secret = access_secretflag or GetAccessSecretEnv() or rc.GetAccessSecret() if not consumer_key or not consumer_secret or not access_key or not access_secret: PrintUsageAndExit() api = twitter.Api(consumer_key=consumer_key, consumer_secret=consumer_secret, access_token_key=access_key, access_token_secret=access_secret, input_encoding=encoding) try: status = api.PostUpdate(message) except UnicodeDecodeError: print "Your message could not be encoded. Perhaps it contains non-ASCII characters? " print "Try explicitly specifying the encoding with the --encoding flag" sys.exit(2) print "%s just posted: %s" % (status.user.name, status.text) if __name__ == "__main__": main()
ajibawa-2023/Python-Code-Large/train/row_273
82
141
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 3], "level": 0, "parent": null, "vector": [8, 0, 0.0213, 0.0071, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''Post a message to twitter'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L5_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0355, 0.0071, 0, 0.66, 0.0667, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'dewitt@google.com'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Import_L7_C0", "label": "ConfigParser import ConfigParser", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0496, 0.0071, 0, 0.66, 0.1333, 272, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_names": [], "import_names": ["ConfigParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "import ConfigParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Import_L8_C0", "label": "getopt import getopt", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0567, 0.0071, 0, 0.66, 0.2, 588, 0, 1, 0, 0, 588, 0, 0], "semantic": {"name": "getopt", "arg_names": [], "import_names": ["getopt"], "rhs_call_name": "", "annotation": ""}, "snippet": "import getopt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Import_L9_C0", "label": "os import os", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0638, 0.0071, 0, 0.66, 0.2667, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Import_L10_C0", "label": "sys import sys", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0709, 0.0071, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Import_L11_C0", "label": "twitter import twitter", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.078, 0.0071, 0, 0.66, 0.4, 234, 0, 1, 0, 0, 234, 0, 0], "semantic": {"name": "twitter", "arg_names": [], "import_names": ["twitter"], "rhs_call_name": "", "annotation": ""}, "snippet": "import twitter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L14_C0", "label": "USAGE =", "type": "assigned_variable", "loc": [14, 47], "level": 0, "parent": null, "vector": [14, 0, 0.2163, 0.2411, 0, 0.66, 0.4667, 952, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "USAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "USAGE = '''Usage: tweet [options] message\n\n This script posts a message to Twitter.\n\n Options:\n\n -h --help : print this help\n --consumer-key : the twitter consumer key"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L49_C0", "label": "PrintUsageAndExit", "type": "function", "loc": [49, 51], "level": 0, "parent": null, "vector": [2, 0, 0.3546, 0.0213, 0, 0.66, 0.5333, 314, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "PrintUsageAndExit", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def PrintUsageAndExit():\n print(USAGE)\n sys.exit(2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L50_C2", "label": "print()", "type": "expression", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L49_C0", "vector": [8, 1, 0.3546, 0.0071, 1, 0.26, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(USAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L51_C2", "label": "exit()", "type": "expression", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L49_C0", "vector": [8, 1, 0.3617, 0.0071, 1, 0.26, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L53_C0", "label": "GetConsumerKeyEnv", "type": "function", "loc": [53, 54], "level": 0, "parent": null, "vector": [2, 0, 0.3794, 0.0142, 0, 0.66, 0.6, 551, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "GetConsumerKeyEnv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetConsumerKeyEnv():\n return os.environ.get(\"TWEETUSERNAME\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L54_C2", "label": "return", "type": "return", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L53_C0", "vector": [13, 1, 0.383, 0.0071, 1, 0.56, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return os.environ.get(\"TWEETUSERNAME\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L56_C0", "label": "GetConsumerSecretEnv", "type": "function", "loc": [56, 57], "level": 0, "parent": null, "vector": [2, 0, 0.4007, 0.0142, 0, 0.66, 0.6667, 650, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "GetConsumerSecretEnv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetConsumerSecretEnv():\n return os.environ.get(\"TWEETPASSWORD\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L57_C2", "label": "return", "type": "return", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L56_C0", "vector": [13, 1, 0.4043, 0.0071, 1, 0.77, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return os.environ.get(\"TWEETPASSWORD\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L59_C0", "label": "GetAccessKeyEnv", "type": "function", "loc": [59, 60], "level": 0, "parent": null, "vector": [2, 0, 0.422, 0.0142, 0, 0.66, 0.7333, 932, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "GetAccessKeyEnv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetAccessKeyEnv():\n return os.environ.get(\"TWEETACCESSKEY\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L60_C2", "label": "return", "type": "return", "loc": [60, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L59_C0", "vector": [13, 1, 0.4255, 0.0071, 1, 0.47, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return os.environ.get(\"TWEETACCESSKEY\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L62_C0", "label": "GetAccessSecretEnv", "type": "function", "loc": [62, 63], "level": 0, "parent": null, "vector": [2, 0, 0.4433, 0.0142, 0, 0.66, 0.8, 325, 0, 0, 1, 0, 0, 0, 1], "semantic": {"name": "GetAccessSecretEnv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetAccessSecretEnv():\n return os.environ.get(\"TWEETACCESSSECRET\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L63_C2", "label": "return", "type": "return", "loc": [63, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L62_C0", "vector": [13, 1, 0.4468, 0.0071, 1, 0.55, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return os.environ.get(\"TWEETACCESSSECRET\", None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "label": "TweetRc", "type": "class", "loc": [65, 91], "level": 0, "parent": null, "vector": [3, 0, 0.5532, 0.1915, 0, 0.66, 0.8667, 61, 0, 7, 0, 0, 186, 0, 9], "semantic": {"name": "TweetRc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TweetRc(object):\n def __init__(self):\n self._config = None\n\n def GetConsumerKey(self):\n return self._GetOption('consumer_key')\n\n def GetConsumerSecret(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L66_C2", "label": "__init__", "type": "function", "loc": [66, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.4716, 0.0142, 1, 0.52, 0.0, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self._config = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L67_C4", "label": "self._config =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L66_C2", "vector": [14, 2, 0.4752, 0.0071, 2, 0.14, 0.0, 311, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._config", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._config = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L69_C2", "label": "GetConsumerKey", "type": "function", "loc": [69, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.4929, 0.0142, 1, 0.52, 0.1667, 101, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "GetConsumerKey", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def GetConsumerKey(self):\n return self._GetOption('consumer_key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L70_C4", "label": "return", "type": "return", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L69_C2", "vector": [13, 2, 0.4965, 0.0071, 2, 0.99, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._GetOption('consumer_key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L72_C2", "label": "GetConsumerSecret", "type": "function", "loc": [72, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.5142, 0.0142, 1, 0.52, 0.3333, 743, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "GetConsumerSecret", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def GetConsumerSecret(self):\n return self._GetOption('consumer_secret')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L73_C4", "label": "return", "type": "return", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L72_C2", "vector": [13, 2, 0.5177, 0.0071, 2, 0.53, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._GetOption('consumer_secret')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L75_C2", "label": "GetAccessKey", "type": "function", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.5355, 0.0142, 1, 0.52, 0.5, 392, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "GetAccessKey", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def GetAccessKey(self):\n return self._GetOption('access_key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L76_C4", "label": "return", "type": "return", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L75_C2", "vector": [13, 2, 0.539, 0.0071, 2, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._GetOption('access_key')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L78_C2", "label": "GetAccessSecret", "type": "function", "loc": [78, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.5567, 0.0142, 1, 0.52, 0.6667, 686, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "GetAccessSecret", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def GetAccessSecret(self):\n return self._GetOption('access_secret')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L79_C4", "label": "return", "type": "return", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L78_C2", "vector": [13, 2, 0.5603, 0.0071, 2, 0.15, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._GetOption('access_secret')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L81_C2", "label": "_GetOption", "type": "function", "loc": [81, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.5887, 0.0355, 1, 0.52, 0.8333, 808, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "_GetOption", "arg_names": ["self", "option"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _GetOption(self, option):\n try:\n return self._GetConfig().get('Tweet', option)\n except:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4", "label": "try", "type": "try", "loc": [82, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L81_C2", "vector": [7, 2, 0.5922, 0.0284, 2, 0.6, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n return self._GetConfig().get('Tweet', option)\n except:\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L83_C6", "label": "return", "type": "return", "loc": [83, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4", "vector": [13, 3, 0.5887, 0.0071, 3, 0.14, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._GetConfig().get('Tweet', option)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L85_C6", "label": "return", "type": "return", "loc": [85, 85], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4", "vector": [13, 3, 0.6028, 0.0071, 3, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2", "label": "_GetConfig", "type": "function", "loc": [87, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "vector": [2, 1, 0.6312, 0.0355, 1, 0.52, 1.0, 33, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "_GetConfig", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _GetConfig(self):\n if not self._config:\n self._config = ConfigParser.ConfigParser()\n self._config.read(os.path.expanduser('~/.tweetrc'))\n return self._config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4", "label": "if", "type": "if", "loc": [88, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2", "vector": [4, 2, 0.6312, 0.0213, 2, 0.13, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._config:\n self._config = ConfigParser.ConfigParser()\n self._config.read(os.path.expanduser('~/.tweetrc'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L89_C6", "label": "self._config = ConfigParser()", "type": "assigned_variable", "loc": [89, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4", "vector": [14, 3, 0.6312, 0.0071, 3, 0.99, 0.0, 311, 3, 0, 0, 0, 272, 10, 1], "semantic": {"name": "self._config", "arg_names": [], "import_names": [], "rhs_call_name": "ConfigParser", "annotation": ""}, "snippet": " self._config = ConfigParser.ConfigParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L90_C6", "label": "read()", "type": "expression", "loc": [90, 90], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4", "vector": [8, 3, 0.6383, 0.0071, 3, 0.99, 1.0, 453, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "read", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " self._config.read(os.path.expanduser('~/.tweetrc'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L91_C4", "label": "return", "type": "return", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2", "vector": [13, 2, 0.6454, 0.0071, 2, 0.13, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "label": "main", "type": "function", "loc": [93, 138], "level": 0, "parent": null, "vector": [2, 0, 0.8191, 0.3262, 0, 0.66, 0.9333, 624, 0, 0, 0, 0, 0, 0, 21], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n try:\n shortflags = 'h'\n longflags = ['help', 'consumer-key=', 'consumer-secret=', \n 'access-key=', 'access-secret=', 'encoding=']\n opts, args = getopt.gnu_getopt(sys.argv[1:], shortflags, longflags)\n except getopt.GetoptError:\n PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "label": "try", "type": "try", "loc": [94, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [7, 1, 0.6879, 0.0496, 1, 0.4, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n shortflags = 'h'\n longflags = ['help', 'consumer-key=', 'consumer-secret=', \n 'access-key=', 'access-secret=', 'encoding=']\n opts, args = getopt.gnu_getopt(sys.argv[1:], shortflags, longflags)\n except getopt.GetoptError:\n PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L95_C4", "label": "shortflags =", "type": "assigned_variable", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "vector": [14, 2, 0.6738, 0.0071, 2, 0.62, 0.0, 245, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "shortflags", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " shortflags = 'h'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L96_C4", "label": "longflags =", "type": "assigned_variable", "loc": [96, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "vector": [14, 2, 0.6844, 0.0142, 2, 0.62, 0.5, 745, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "longflags", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " longflags = ['help', 'consumer-key=', 'consumer-secret=', \n 'access-key=', 'access-secret=', 'encoding=']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L98_C4", "label": "opts, args = gnu_getopt()", "type": "assigned_variable", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "vector": [14, 2, 0.695, 0.0071, 2, 0.62, 1.0, 616, 3, 3, 0, 0, 712, 10, 1], "semantic": {"name": "opts, args", "arg_names": [], "import_names": [], "rhs_call_name": "gnu_getopt", "annotation": ""}, "snippet": " opts, args = getopt.gnu_getopt(sys.argv[1:], shortflags, longflags)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L100_C4", "label": "PrintUsageAndExit()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "vector": [8, 2, 0.7092, 0.0071, 2, 0.62, 0.0, 314, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "PrintUsageAndExit", "arg_names": [], "import_names": [], "rhs_call_name": "PrintUsageAndExit", "annotation": ""}, "snippet": " PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L101_C2", "label": "consumer_keyflag =", "type": "assigned_variable", "loc": [101, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.7163, 0.0071, 1, 0.4, 0.0588, 74, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "consumer_keyflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_keyflag = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L102_C2", "label": "consumer_secretflag =", "type": "assigned_variable", "loc": [102, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.7234, 0.0071, 1, 0.4, 0.1176, 178, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "consumer_secretflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_secretflag = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L103_C2", "label": "access_keyflag =", "type": "assigned_variable", "loc": [103, 103], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.7305, 0.0071, 1, 0.4, 0.1765, 450, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "access_keyflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_keyflag = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L104_C2", "label": "access_secretflag =", "type": "assigned_variable", "loc": [104, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.7376, 0.0071, 1, 0.4, 0.2353, 83, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "access_secretflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_secretflag = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L105_C2", "label": "encoding =", "type": "assigned_variable", "loc": [105, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.7447, 0.0071, 1, 0.4, 0.2941, 325, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " encoding = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "label": "for o, a", "type": "for", "loc": [106, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [6, 1, 0.7943, 0.0922, 1, 0.4, 0.3529, 736, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "o, a", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for o, a in opts:\n if o in (\"-h\", \"--help\"):\n PrintUsageAndExit()\n if o in (\"--consumer-key\"):\n consumer_keyflag = a\n if o in (\"--consumer-secret\"):\n consumer_secretflag = a\n if o in (\"--access-key\"):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L107_C4", "label": "if", "type": "if", "loc": [107, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.7624, 0.0142, 2, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"-h\", \"--help\"):\n PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L108_C6", "label": "PrintUsageAndExit()", "type": "expression", "loc": [108, 108], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L107_C4", "vector": [8, 3, 0.766, 0.0071, 3, 0.48, 0.0, 314, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "PrintUsageAndExit", "arg_names": [], "import_names": [], "rhs_call_name": "PrintUsageAndExit", "annotation": ""}, "snippet": " PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L109_C4", "label": "if", "type": "if", "loc": [109, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.7766, 0.0142, 2, 0.41, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"--consumer-key\"):\n consumer_keyflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L110_C6", "label": "consumer_keyflag =", "type": "assigned_variable", "loc": [110, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L109_C4", "vector": [14, 3, 0.7801, 0.0071, 3, 0.97, 0.0, 74, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "consumer_keyflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_keyflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L111_C4", "label": "if", "type": "if", "loc": [111, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.7908, 0.0142, 2, 0.41, 0.4, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"--consumer-secret\"):\n consumer_secretflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L112_C6", "label": "consumer_secretflag =", "type": "assigned_variable", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L111_C4", "vector": [14, 3, 0.7943, 0.0071, 3, 0.43, 0.0, 178, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "consumer_secretflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_secretflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L113_C4", "label": "if", "type": "if", "loc": [113, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.805, 0.0142, 2, 0.41, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"--access-key\"):\n access_keyflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L114_C6", "label": "access_keyflag =", "type": "assigned_variable", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L113_C4", "vector": [14, 3, 0.8085, 0.0071, 3, 0.57, 0.0, 450, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "access_keyflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_keyflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L115_C4", "label": "if", "type": "if", "loc": [115, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.8191, 0.0142, 2, 0.41, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"--access-secret\"):\n access_secretflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L116_C6", "label": "access_secretflag =", "type": "assigned_variable", "loc": [116, 116], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L115_C4", "vector": [14, 3, 0.8227, 0.0071, 3, 0.33, 0.0, 83, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "access_secretflag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_secretflag = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L117_C4", "label": "if", "type": "if", "loc": [117, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "vector": [4, 2, 0.8333, 0.0142, 2, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o in (\"--encoding\"):\n encoding = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L118_C6", "label": "encoding =", "type": "assigned_variable", "loc": [118, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L117_C4", "vector": [14, 3, 0.8369, 0.0071, 3, 0.21, 0.0, 325, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " encoding = a"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L119_C2", "label": "message = join()", "type": "assigned_variable", "loc": [119, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.844, 0.0071, 1, 0.4, 0.4118, 635, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "message", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " message = ' '.join(args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L120_C2", "label": "if", "type": "if", "loc": [120, 121], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [4, 1, 0.8546, 0.0142, 1, 0.4, 0.4706, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not message:\n PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L121_C4", "label": "PrintUsageAndExit()", "type": "expression", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L120_C2", "vector": [8, 2, 0.8582, 0.0071, 2, 0.18, 0.0, 314, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "PrintUsageAndExit", "arg_names": [], "import_names": [], "rhs_call_name": "PrintUsageAndExit", "annotation": ""}, "snippet": " PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L122_C2", "label": "rc = TweetRc()", "type": "assigned_variable", "loc": [122, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.8652, 0.0071, 1, 0.4, 0.5294, 401, 3, 0, 0, 0, 61, 10, 1], "semantic": {"name": "rc", "arg_names": [], "import_names": [], "rhs_call_name": "TweetRc", "annotation": ""}, "snippet": " rc = TweetRc()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L123_C2", "label": "consumer_key =", "type": "assigned_variable", "loc": [123, 123], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.8723, 0.0071, 1, 0.4, 0.5882, 353, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "consumer_key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_key = consumer_keyflag or GetConsumerKeyEnv() or rc.GetConsumerKey()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L124_C2", "label": "consumer_secret =", "type": "assigned_variable", "loc": [124, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.8794, 0.0071, 1, 0.4, 0.6471, 734, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "consumer_secret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " consumer_secret = consumer_secretflag or GetConsumerSecretEnv() or rc.GetConsumerSecret()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L125_C2", "label": "access_key =", "type": "assigned_variable", "loc": [125, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.8865, 0.0071, 1, 0.4, 0.7059, 200, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "access_key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_key = access_keyflag or GetAccessKeyEnv() or rc.GetAccessKey()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L126_C2", "label": "access_secret =", "type": "assigned_variable", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.8936, 0.0071, 1, 0.4, 0.7647, 171, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "access_secret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_secret = access_secretflag or GetAccessSecretEnv() or rc.GetAccessSecret()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L127_C2", "label": "if", "type": "if", "loc": [127, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [4, 1, 0.9043, 0.0142, 1, 0.4, 0.8235, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not consumer_key or not consumer_secret or not access_key or not access_secret:\n PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L128_C4", "label": "PrintUsageAndExit()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L127_C2", "vector": [8, 2, 0.9078, 0.0071, 2, 0.69, 0.0, 314, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "PrintUsageAndExit", "arg_names": [], "import_names": [], "rhs_call_name": "PrintUsageAndExit", "annotation": ""}, "snippet": " PrintUsageAndExit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L129_C2", "label": "api = Api()", "type": "assigned_variable", "loc": [129, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [14, 1, 0.922, 0.0213, 1, 0.4, 0.8824, 976, 3, 5, 0, 0, 192, 10, 1], "semantic": {"name": "api", "arg_names": [], "import_names": [], "rhs_call_name": "Api", "annotation": ""}, "snippet": " api = twitter.Api(consumer_key=consumer_key, consumer_secret=consumer_secret,\n access_token_key=access_key, access_token_secret=access_secret,\n input_encoding=encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "label": "try", "type": "try", "loc": [132, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [7, 1, 0.9539, 0.0426, 1, 0.4, 0.9412, 0, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n status = api.PostUpdate(message)\n except UnicodeDecodeError:\n print(\"Your message could not be encoded. Perhaps it contains non-ASCII characters? \")\n print(\"Try explicitly specifying the encoding with the --encoding flag\")\n sys.exit(2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L133_C4", "label": "status = PostUpdate()", "type": "assigned_variable", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "vector": [14, 2, 0.9433, 0.0071, 2, 0.88, 0.0, 699, 3, 1, 0, 0, 880, 10, 1], "semantic": {"name": "status", "arg_names": [], "import_names": [], "rhs_call_name": "PostUpdate", "annotation": ""}, "snippet": " status = api.PostUpdate(message)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L135_C4", "label": "print()", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "vector": [8, 2, 0.9574, 0.0071, 2, 0.88, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Your message could not be encoded. Perhaps it contains non-ASCII characters? \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L136_C4", "label": "print()", "type": "expression", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "vector": [8, 2, 0.9645, 0.0071, 2, 0.88, 0.5, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Try explicitly specifying the encoding with the --encoding flag\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L137_C4", "label": "exit()", "type": "expression", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "vector": [8, 2, 0.9716, 0.0071, 2, 0.88, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L138_C2", "label": "print()", "type": "expression", "loc": [138, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "vector": [8, 1, 0.9787, 0.0071, 1, 0.4, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"%s just posted: %s\" % (status.user.name, status.text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:If_L140_C0", "label": "if", "type": "if", "loc": [140, 141], "level": 0, "parent": null, "vector": [4, 0, 0.9965, 0.0142, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L141_C2", "label": "main()", "type": "expression", "loc": [141, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_273:If_L140_C0", "vector": [8, 1, 1.0, 0.0071, 1, 0.06, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L62_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L69_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L72_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L75_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L78_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L83_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L85_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:ClassDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L89_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L88_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L90_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Return_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L94_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L101_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L103_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L104_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L105_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L108_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L110_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L111_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L112_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L114_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L116_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:For_L106_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L118_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L119_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L120_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L120_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L121_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L122_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L123_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L124_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L125_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L126_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:If_L127_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L128_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L129_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Assign_L133_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L136_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:Try_L132_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L138_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_273:If_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_273:Expr_L141_C2"}]
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. '''A class that defines the default URL Shortener. TinyURL is provided as the default and as an example. ''' import urllib # Change History # # 2010-05-16 # TinyURL example and the idea for this comes from a bug filed by # acolorado with patch provided by ghills. Class implementation # was done by bear. # # Issue 19 http://code.google.com/p/python-twitter/issues/detail?id=19 # class ShortenURL(object): '''Helper class to make URL Shortener calls if/when required''' def __init__(self, userid=None, password=None): '''Instantiate a new ShortenURL object Args: userid: userid for any required authorization call [optional] password: password for any required authorization call [optional] ''' self.userid = userid self.password = password def Shorten(self, longURL): '''Call TinyURL API and returned shortened URL result Args: longURL: URL string to shorten Returns: The shortened URL as a string Note: longURL is required and no checks are made to ensure completeness ''' result = None f = urllib.urlopen("http://tinyurl.com/api-create.php?url=%s" % longURL) try: result = f.read() finally: f.close() return result
ajibawa-2023/Python-Code-Large/train/row_274
16
71
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 20], "level": 0, "parent": null, "vector": [8, 0, 0.2606, 0.0563, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''A class that defines the default URL Shortener.\n\nTinyURL is provided as the default and as an example.\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Import_L22_C0", "label": "urllib import urllib", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.3099, 0.0141, 0, 0.66, 0.5, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "label": "ShortenURL", "type": "class", "loc": [36, 71], "level": 0, "parent": null, "vector": [3, 0, 0.7535, 0.507, 0, 0.66, 1.0, 365, 0, 2, 0, 0, 186, 0, 3], "semantic": {"name": "ShortenURL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class ShortenURL(object):\n '''Helper class to make URL Shortener calls if/when required'''\n def __init__(self,\n userid=None,\n password=None):\n '''Instantiate a new ShortenURL object\n \n Args:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L37_C4", "label": "expression", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "vector": [8, 1, 0.5211, 0.0141, 1, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''Helper class to make URL Shortener calls if/when required'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "label": "__init__", "type": "function", "loc": [38, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "vector": [2, 1, 0.6056, 0.1549, 1, 0.38, 0.5, 555, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "userid", "password"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self,\n userid=None,\n password=None):\n '''Instantiate a new ShortenURL object\n \n Args:\n userid: userid for any required authorization call [optional]\n password: password for any required authorization call [optional]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L41_C8", "label": "expression", "type": "expression", "loc": [41, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "vector": [8, 2, 0.6127, 0.0845, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''Instantiate a new ShortenURL object\n \n Args:\n userid: userid for any required authorization call [optional]\n password: password for any required authorization call [optional]\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L47_C8", "label": "self.userid =", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "vector": [14, 2, 0.662, 0.0141, 2, 0.94, 0.5, 677, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userid", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.userid = userid"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L48_C8", "label": "self.password =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "vector": [14, 2, 0.6761, 0.0141, 2, 0.94, 1.0, 902, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.password", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.password = password"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "label": "Shorten", "type": "function", "loc": [50, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "vector": [2, 1, 0.8521, 0.3099, 1, 0.38, 1.0, 862, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "Shorten", "arg_names": ["self", "longURL"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Shorten(self,\n longURL):\n '''Call TinyURL API and returned shortened URL result\n \n Args:\n longURL: URL string to shorten\n \n Returns:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L52_C8", "label": "expression", "type": "expression", "loc": [52, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "vector": [8, 2, 0.8028, 0.1549, 2, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''Call TinyURL API and returned shortened URL result\n \n Args:\n longURL: URL string to shorten\n \n Returns:\n The shortened URL as a string\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L64_C8", "label": "result =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "vector": [14, 2, 0.9014, 0.0141, 2, 0.67, 0.25, 51, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " result = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L65_C8", "label": "f = urlopen()", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "vector": [14, 2, 0.9155, 0.0141, 2, 0.67, 0.5, 899, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " f = urllib.urlopen(\"http://tinyurl.com/api-create.php?url=%s\" % longURL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8", "label": "try", "type": "try", "loc": [66, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "vector": [7, 2, 0.9507, 0.0563, 2, 0.67, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n result = f.read()\n finally:\n f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L67_C12", "label": "result = read()", "type": "assigned_variable", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8", "vector": [14, 3, 0.9437, 0.0141, 3, 0.95, 0.0, 51, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " result = f.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L69_C12", "label": "close()", "type": "expression", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8", "vector": [8, 3, 0.9718, 0.0141, 3, 0.95, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_274:Return_L71_C8", "label": "return", "type": "return", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "vector": [13, 2, 1.0, 0.0141, 2, 0.67, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return result"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:ClassDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Assign_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:Try_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Expr_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_274:FunctionDef_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_274:Return_L71_C8"}]
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. '''The setup and build script for the python-twitter library.''' __author__ = 'python-twitter@googlegroups.com' __version__ = '0.8.5' # The base package metadata to be used by both distutils and setuptools METADATA = dict( name = "python-twitter", version = __version__, py_modules = ['twitter'], author='The Python-Twitter Developers', author_email='python-twitter@googlegroups.com', description='A python wrapper around the Twitter API', license='Apache License 2.0', url='https://github.com/bear/python-twitter', keywords='twitter api', ) # Extra package metadata to be used only if setuptools is installed SETUPTOOLS_METADATA = dict( install_requires = ['setuptools', 'simplejson', 'oauth2'], include_package_data = True, classifiers = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Communications :: Chat', 'Topic :: Internet', ], test_suite = 'twitter_test.suite', ) def Read(file): return open(file).read() def BuildLongDescription(): return '\n'.join([Read('README.md'), Read('CHANGES')]) def Main(): # Build the long_description from the README and CHANGES METADATA['long_description'] = BuildLongDescription() # Use setuptools if available, otherwise fallback and use distutils try: import setuptools METADATA.update(SETUPTOOLS_METADATA) setuptools.setup(**METADATA) except ImportError: import distutils.core distutils.core.setup(**METADATA) if __name__ == '__main__': Main()
ajibawa-2023/Python-Code-Large/train/row_275
19
73
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L17_C0", "label": "expression", "type": "expression", "loc": [17, 17], "level": 0, "parent": null, "vector": [8, 0, 0.2329, 0.0137, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''The setup and build script for the python-twitter library.'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L19_C0", "label": "__author__ =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.2603, 0.0137, 0, 0.66, 0.125, 777, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__author__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__author__ = 'python-twitter@googlegroups.com'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L20_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.274, 0.0137, 0, 0.66, 0.25, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__version__ = '0.8.5'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L24_C0", "label": "METADATA = dict()", "type": "assigned_variable", "loc": [24, 34], "level": 0, "parent": null, "vector": [14, 0, 0.3973, 0.1507, 0, 0.66, 0.375, 622, 3, 9, 0, 0, 827, 10, 1], "semantic": {"name": "METADATA", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": "METADATA = dict(\n name = \"python-twitter\",\n version = __version__,\n py_modules = ['twitter'],\n author='The Python-Twitter Developers',\n author_email='python-twitter@googlegroups.com',\n description='A python wrapper around the Twitter API',\n license='Apache License 2.0',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L37_C0", "label": "SETUPTOOLS_METADATA = dict()", "type": "assigned_variable", "loc": [37, 49], "level": 0, "parent": null, "vector": [14, 0, 0.589, 0.1781, 0, 0.66, 0.5, 22, 3, 4, 0, 0, 827, 10, 1], "semantic": {"name": "SETUPTOOLS_METADATA", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": "SETUPTOOLS_METADATA = dict(\n install_requires = ['setuptools', 'simplejson', 'oauth2'],\n include_package_data = True,\n classifiers = [\n 'Development Status :: 4 - Beta',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: Apache Software License',\n 'Topic :: Software Development :: Libraries :: Python Modules',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L52_C0", "label": "Read", "type": "function", "loc": [52, 53], "level": 0, "parent": null, "vector": [2, 0, 0.7192, 0.0274, 0, 0.66, 0.625, 771, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "Read", "arg_names": ["file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Read(file):\n return open(file).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Return_L53_C2", "label": "return", "type": "return", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L52_C0", "vector": [13, 1, 0.726, 0.0137, 1, 0.76, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return open(file).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L55_C0", "label": "BuildLongDescription", "type": "function", "loc": [55, 56], "level": 0, "parent": null, "vector": [2, 0, 0.7603, 0.0274, 0, 0.66, 0.75, 383, 0, 0, 1, 0, 0, 0, 3], "semantic": {"name": "BuildLongDescription", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def BuildLongDescription():\n return '\\n'.join([Read('README.md'), Read('CHANGES')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Return_L56_C2", "label": "return", "type": "return", "loc": [56, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L55_C0", "vector": [13, 1, 0.7671, 0.0137, 1, 0.93, 0.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\n'.join([Read('README.md'), Read('CHANGES')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L58_C0", "label": "Main", "type": "function", "loc": [58, 69], "level": 0, "parent": null, "vector": [2, 0, 0.8699, 0.1644, 0, 0.66, 0.875, 16, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "Main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Main():\n # Build the long_description from the README and CHANGES\n METADATA['long_description'] = BuildLongDescription()\n\n # Use setuptools if available, otherwise fallback and use distutils\n try:\n import setuptools\n METADATA.update(SETUPTOOLS_METADATA)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L60_C2", "label": " = BuildLongDescription()", "type": "assigned_variable", "loc": [60, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L58_C0", "vector": [14, 1, 0.8219, 0.0137, 1, 0.41, 0.0, 0, 3, 0, 0, 0, 383, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "BuildLongDescription", "annotation": ""}, "snippet": " METADATA['long_description'] = BuildLongDescription()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "label": "try", "type": "try", "loc": [63, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L58_C0", "vector": [7, 1, 0.9041, 0.0959, 1, 0.41, 1.0, 0, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n import setuptools\n METADATA.update(SETUPTOOLS_METADATA)\n setuptools.setup(**METADATA)\n except ImportError:\n import distutils.core\n distutils.core.setup(**METADATA)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Import_L64_C4", "label": "setuptools import setuptools", "type": "import", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "vector": [1, 2, 0.8767, 0.0137, 2, 0.08, 0.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "setuptools", "arg_names": [], "import_names": ["setuptools"], "rhs_call_name": "", "annotation": ""}, "snippet": " import setuptools"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L65_C4", "label": "update()", "type": "expression", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "vector": [8, 2, 0.8904, 0.0137, 2, 0.08, 0.5, 637, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " METADATA.update(SETUPTOOLS_METADATA)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L66_C4", "label": "setup()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "vector": [8, 2, 0.9041, 0.0137, 2, 0.08, 1.0, 234, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setup", "arg_names": [], "import_names": [], "rhs_call_name": "setup", "annotation": ""}, "snippet": " setuptools.setup(**METADATA)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Import_L68_C4", "label": "distutils.core import distutils.core", "type": "import", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "vector": [1, 2, 0.9315, 0.0137, 2, 0.08, 0.0, 152, 0, 1, 0, 0, 152, 0, 0], "semantic": {"name": "distutils.core", "arg_names": [], "import_names": ["distutils.core"], "rhs_call_name": "", "annotation": ""}, "snippet": " import distutils.core"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L69_C4", "label": "setup()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "vector": [8, 2, 0.9452, 0.0137, 2, 0.08, 1.0, 234, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setup", "arg_names": [], "import_names": [], "rhs_call_name": "setup", "annotation": ""}, "snippet": " distutils.core.setup(**METADATA)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:If_L72_C0", "label": "if", "type": "if", "loc": [72, 73], "level": 0, "parent": null, "vector": [4, 0, 0.9932, 0.0274, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n Main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L73_C2", "label": "Main()", "type": "expression", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_275:If_L72_C0", "vector": [8, 1, 1.0, 0.0137, 1, 0.59, 0.0, 16, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Main", "arg_names": [], "import_names": [], "rhs_call_name": "Main", "annotation": ""}, "snippet": " Main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L52_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Return_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L55_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Return_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Assign_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:FunctionDef_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Import_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Import_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:Try_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_275:If_L72_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_275:Expr_L73_C2"}]
"""JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_scanner(context): parse_object = context.parse_object parse_array = context.parse_array parse_string = context.parse_string match_number = NUMBER_RE.match encoding = context.encoding strict = context.strict parse_float = context.parse_float parse_int = context.parse_int parse_constant = context.parse_constant object_hook = context.object_hook def _scan_once(string, idx): try: nextchar = string[idx] except IndexError: raise StopIteration if nextchar == '"': return parse_string(string, idx + 1, encoding, strict) elif nextchar == '{': return parse_object((string, idx + 1), encoding, strict, _scan_once, object_hook) elif nextchar == '[': return parse_array((string, idx + 1), _scan_once) elif nextchar == 'n' and string[idx:idx + 4] == 'null': return None, idx + 4 elif nextchar == 't' and string[idx:idx + 4] == 'true': return True, idx + 4 elif nextchar == 'f' and string[idx:idx + 5] == 'false': return False, idx + 5 m = match_number(string, idx) if m is not None: integer, frac, exp = m.groups() if frac or exp: res = parse_float(integer + (frac or '') + (exp or '')) else: res = parse_int(integer) return res, m.end() elif nextchar == 'N' and string[idx:idx + 3] == 'NaN': return parse_constant('NaN'), idx + 3 elif nextchar == 'I' and string[idx:idx + 8] == 'Infinity': return parse_constant('Infinity'), idx + 8 elif nextchar == '-' and string[idx:idx + 9] == '-Infinity': return parse_constant('-Infinity'), idx + 9 else: raise StopIteration return _scan_once make_scanner = c_make_scanner or py_make_scanner
ajibawa-2023/Python-Code-Large/train/row_277
48
65
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_277:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0231, 0.0308, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"JSON token scanner\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0462, 0.0154, 0, 0.66, 0.1667, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L4_C0", "label": "try", "type": "try", "loc": [4, 7], "level": 0, "parent": null, "vector": [7, 0, 0.0846, 0.0615, 0, 0.66, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from simplejson._speedups import make_scanner as c_make_scanner\nexcept ImportError:\n c_make_scanner = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:ImportFrom_L5_C4", "label": "from simplejson._speedups import c_make_scanner", "type": "import", "loc": [5, 5], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L4_C0", "vector": [1, 1, 0.0769, 0.0154, 1, 0.78, 0.0, 976, 0, 1, 0, 0, 976, 0, 0], "semantic": {"name": "simplejson._speedups", "arg_names": [], "import_names": ["c_make_scanner"], "rhs_call_name": "", "annotation": ""}, "snippet": " from simplejson._speedups import make_scanner as c_make_scanner"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L7_C4", "label": "c_make_scanner =", "type": "assigned_variable", "loc": [7, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L4_C0", "vector": [14, 1, 0.1077, 0.0154, 1, 0.78, 0.0, 400, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "c_make_scanner", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c_make_scanner = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L9_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.1385, 0.0154, 0, 0.66, 0.5, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = ['make_scanner']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L11_C0", "label": "NUMBER_RE = compile()", "type": "assigned_variable", "loc": [11, 13], "level": 0, "parent": null, "vector": [14, 0, 0.1846, 0.0462, 0, 0.66, 0.6667, 566, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "NUMBER_RE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "NUMBER_RE = re.compile(\n r'(-?(?:0|[1-9]\\d*))(\\.\\d+)?([eE][-+]?\\d+)?',\n (re.VERBOSE | re.MULTILINE | re.DOTALL))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "label": "py_make_scanner", "type": "function", "loc": [15, 63], "level": 0, "parent": null, "vector": [2, 0, 0.6, 0.7538, 0, 0.66, 0.8333, 796, 0, 1, 1, 0, 0, 0, 11], "semantic": {"name": "py_make_scanner", "arg_names": ["context"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def py_make_scanner(context):\n parse_object = context.parse_object\n parse_array = context.parse_array\n parse_string = context.parse_string\n match_number = NUMBER_RE.match\n encoding = context.encoding\n strict = context.strict\n parse_float = context.parse_float"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L16_C4", "label": "parse_object =", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.2462, 0.0154, 1, 0.59, 0.0, 924, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_object", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_object = context.parse_object"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L17_C4", "label": "parse_array =", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.2615, 0.0154, 1, 0.59, 0.0909, 676, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_array", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_array = context.parse_array"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L18_C4", "label": "parse_string =", "type": "assigned_variable", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.2769, 0.0154, 1, 0.59, 0.1818, 867, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_string", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_string = context.parse_string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L19_C4", "label": "match_number =", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.2923, 0.0154, 1, 0.59, 0.2727, 264, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "match_number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " match_number = NUMBER_RE.match"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L20_C4", "label": "encoding =", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3077, 0.0154, 1, 0.59, 0.3636, 325, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " encoding = context.encoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L21_C4", "label": "strict =", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3231, 0.0154, 1, 0.59, 0.4545, 697, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "strict", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strict = context.strict"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L22_C4", "label": "parse_float =", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3385, 0.0154, 1, 0.59, 0.5455, 475, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_float", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_float = context.parse_float"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L23_C4", "label": "parse_int =", "type": "assigned_variable", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3538, 0.0154, 1, 0.59, 0.6364, 31, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_int", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_int = context.parse_int"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L24_C4", "label": "parse_constant =", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3692, 0.0154, 1, 0.59, 0.7273, 808, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parse_constant", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parse_constant = context.parse_constant"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L25_C4", "label": "object_hook =", "type": "assigned_variable", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [14, 1, 0.3846, 0.0154, 1, 0.59, 0.8182, 325, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "object_hook", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " object_hook = context.object_hook"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "label": "_scan_once", "type": "function", "loc": [27, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [2, 1, 0.6769, 0.5385, 1, 0.59, 0.9091, 221, 0, 2, 1, 0, 0, 0, 11], "semantic": {"name": "_scan_once", "arg_names": ["string", "idx"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _scan_once(string, idx):\n try:\n nextchar = string[idx]\n except IndexError:\n raise StopIteration\n\n if nextchar == '\"':\n return parse_string(string, idx + 1, encoding, strict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L28_C8", "label": "try", "type": "try", "loc": [28, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "vector": [7, 2, 0.4538, 0.0615, 2, 0.22, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n nextchar = string[idx]\n except IndexError:\n raise StopIteration"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L29_C12", "label": "nextchar =", "type": "assigned_variable", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L28_C8", "vector": [14, 3, 0.4462, 0.0154, 3, 0.49, 0.0, 937, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nextchar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nextchar = string[idx]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8", "label": "if", "type": "if", "loc": [33, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "vector": [4, 2, 0.5923, 0.1846, 2, 0.22, 0.3333, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if nextchar == '\"':\n return parse_string(string, idx + 1, encoding, strict)\n elif nextchar == '{':\n return parse_object((string, idx + 1), encoding, strict, _scan_once, object_hook)\n elif nextchar == '[':\n return parse_array((string, idx + 1), _scan_once)\n elif nextchar == 'n' and string[idx:idx + 4] == 'null':\n return None, idx + 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L34_C12", "label": "return", "type": "return", "loc": [34, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8", "vector": [13, 3, 0.5231, 0.0154, 3, 0.49, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_string(string, idx + 1, encoding, strict)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8", "label": "if", "type": "if", "loc": [35, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8", "vector": [4, 3, 0.6077, 0.1538, 3, 0.49, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == '{':\n return parse_object((string, idx + 1), encoding, strict, _scan_once, object_hook)\n elif nextchar == '[':\n return parse_array((string, idx + 1), _scan_once)\n elif nextchar == 'n' and string[idx:idx + 4] == 'null':\n return None, idx + 4\n elif nextchar == 't' and string[idx:idx + 4] == 'true':\n return True, idx + 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L36_C12", "label": "return", "type": "return", "loc": [36, 36], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8", "vector": [13, 4, 0.5538, 0.0154, 4, 0.99, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_object((string, idx + 1), encoding, strict, _scan_once, object_hook)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8", "label": "if", "type": "if", "loc": [37, 44], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8", "vector": [4, 4, 0.6231, 0.1231, 4, 0.99, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == '[':\n return parse_array((string, idx + 1), _scan_once)\n elif nextchar == 'n' and string[idx:idx + 4] == 'null':\n return None, idx + 4\n elif nextchar == 't' and string[idx:idx + 4] == 'true':\n return True, idx + 4\n elif nextchar == 'f' and string[idx:idx + 5] == 'false':\n return False, idx + 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L38_C12", "label": "return", "type": "return", "loc": [38, 38], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8", "vector": [13, 5, 0.5846, 0.0154, 5, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_array((string, idx + 1), _scan_once)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8", "label": "if", "type": "if", "loc": [39, 44], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8", "vector": [4, 5, 0.6385, 0.0923, 5, 0.23, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == 'n' and string[idx:idx + 4] == 'null':\n return None, idx + 4\n elif nextchar == 't' and string[idx:idx + 4] == 'true':\n return True, idx + 4\n elif nextchar == 'f' and string[idx:idx + 5] == 'false':\n return False, idx + 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L40_C12", "label": "return", "type": "return", "loc": [40, 40], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8", "vector": [13, 6, 0.6154, 0.0154, 6, 0.31, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None, idx + 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8", "label": "if", "type": "if", "loc": [41, 44], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8", "vector": [4, 6, 0.6538, 0.0615, 6, 0.31, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == 't' and string[idx:idx + 4] == 'true':\n return True, idx + 4\n elif nextchar == 'f' and string[idx:idx + 5] == 'false':\n return False, idx + 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L42_C12", "label": "return", "type": "return", "loc": [42, 42], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8", "vector": [13, 7, 0.6462, 0.0154, 7, 0.28, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True, idx + 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L43_C8", "label": "if", "type": "if", "loc": [43, 44], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8", "vector": [4, 7, 0.6692, 0.0308, 7, 0.28, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == 'f' and string[idx:idx + 5] == 'false':\n return False, idx + 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L44_C12", "label": "return", "type": "return", "loc": [44, 44], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L43_C8", "vector": [13, 8, 0.6769, 0.0154, 8, 0.29, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return False, idx + 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L46_C8", "label": "m = match_number()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "vector": [14, 2, 0.7077, 0.0154, 2, 0.22, 0.6667, 711, 3, 2, 0, 0, 264, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "match_number", "annotation": ""}, "snippet": " m = match_number(string, idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "label": "if", "type": "if", "loc": [47, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "vector": [4, 2, 0.8308, 0.2308, 2, 0.22, 1.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if m is not None:\n integer, frac, exp = m.groups()\n if frac or exp:\n res = parse_float(integer + (frac or '') + (exp or ''))\n else:\n res = parse_int(integer)\n return res, m.end()\n elif nextchar == 'N' and string[idx:idx + 3] == 'NaN':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L48_C12", "label": "integer, frac, exp = groups()", "type": "assigned_variable", "loc": [48, 48], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "vector": [14, 3, 0.7385, 0.0154, 3, 0.72, 0.0, 563, 3, 0, 0, 0, 161, 10, 1], "semantic": {"name": "integer, frac, exp", "arg_names": [], "import_names": [], "rhs_call_name": "groups", "annotation": ""}, "snippet": " integer, frac, exp = m.groups()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12", "label": "if", "type": "if", "loc": [49, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "vector": [4, 3, 0.7769, 0.0615, 3, 0.72, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if frac or exp:\n res = parse_float(integer + (frac or '') + (exp or ''))\n else:\n res = parse_int(integer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L50_C16", "label": "res = parse_float()", "type": "assigned_variable", "loc": [50, 50], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12", "vector": [14, 4, 0.7692, 0.0154, 4, 0.69, 0.0, 413, 3, 1, 0, 0, 475, 10, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "parse_float", "annotation": ""}, "snippet": " res = parse_float(integer + (frac or '') + (exp or ''))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L52_C16", "label": "res = parse_int()", "type": "assigned_variable", "loc": [52, 52], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12", "vector": [14, 4, 0.8, 0.0154, 4, 0.69, 1.0, 413, 3, 1, 0, 0, 31, 10, 1], "semantic": {"name": "res", "arg_names": [], "import_names": [], "rhs_call_name": "parse_int", "annotation": ""}, "snippet": " res = parse_int(integer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L53_C12", "label": "return", "type": "return", "loc": [53, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "vector": [13, 3, 0.8154, 0.0154, 3, 0.72, 0.6667, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return res, m.end()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8", "label": "if", "type": "if", "loc": [54, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "vector": [4, 3, 0.8846, 0.1231, 3, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == 'N' and string[idx:idx + 3] == 'NaN':\n return parse_constant('NaN'), idx + 3\n elif nextchar == 'I' and string[idx:idx + 8] == 'Infinity':\n return parse_constant('Infinity'), idx + 8\n elif nextchar == '-' and string[idx:idx + 9] == '-Infinity':\n return parse_constant('-Infinity'), idx + 9\n else:\n raise StopIteration"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L55_C12", "label": "return", "type": "return", "loc": [55, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8", "vector": [13, 4, 0.8462, 0.0154, 4, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_constant('NaN'), idx + 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8", "label": "if", "type": "if", "loc": [56, 61], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8", "vector": [4, 4, 0.9, 0.0923, 4, 0.27, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == 'I' and string[idx:idx + 8] == 'Infinity':\n return parse_constant('Infinity'), idx + 8\n elif nextchar == '-' and string[idx:idx + 9] == '-Infinity':\n return parse_constant('-Infinity'), idx + 9\n else:\n raise StopIteration"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L57_C12", "label": "return", "type": "return", "loc": [57, 57], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8", "vector": [13, 5, 0.8769, 0.0154, 5, 0.95, 0.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_constant('Infinity'), idx + 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:If_L58_C8", "label": "if", "type": "if", "loc": [58, 61], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8", "vector": [4, 5, 0.9154, 0.0615, 5, 0.95, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif nextchar == '-' and string[idx:idx + 9] == '-Infinity':\n return parse_constant('-Infinity'), idx + 9\n else:\n raise StopIteration"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L59_C12", "label": "return", "type": "return", "loc": [59, 59], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:If_L58_C8", "vector": [13, 6, 0.9077, 0.0154, 6, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return parse_constant('-Infinity'), idx + 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L63_C4", "label": "return", "type": "return", "loc": [63, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "vector": [13, 1, 0.9692, 0.0154, 1, 0.59, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _scan_once"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L65_C0", "label": "make_scanner =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0154, 0, 0.66, 1.0, 683, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "make_scanner", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "make_scanner = c_make_scanner or py_make_scanner"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:ImportFrom_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L19_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:Try_L28_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L29_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L34_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L33_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L36_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L37_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L42_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L48_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L50_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L49_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Assign_L52_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L53_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L47_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L55_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L54_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L57_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L56_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:If_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:If_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L59_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_277:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_277:Return_L63_C4"}]
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])') HAS_UTF8 = re.compile(r'[\x80-\xff]') ESCAPE_DCT = { '\\': '\\\\', '"': '\\"', '\b': '\\b', '\f': '\\f', '\n': '\\n', '\r': '\\r', '\t': '\\t', } for i in range(0x20): ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,)) # Assume this produces an infinity on all machines (probably not guaranteed) INFINITY = float('1e66666') FLOAT_REPR = repr def encode_basestring(s): """Return a JSON representation of a Python string """ def replace(match): return ESCAPE_DCT[match.group(0)] return '"' + ESCAPE.sub(replace, s) + '"' def py_encode_basestring_ascii(s): """Return an ASCII-only JSON representation of a Python string """ if isinstance(s, str) and HAS_UTF8.search(s) is not None: s = s.decode('utf-8') def replace(match): s = match.group(0) try: return ESCAPE_DCT[s] except KeyError: n = ord(s) if n < 0x10000: return '\\u%04x' % (n,) else: # surrogate pair n -= 0x10000 s1 = 0xd800 | ((n >> 10) & 0x3ff) s2 = 0xdc00 | (n & 0x3ff) return '\\u%04x\\u%04x' % (s1, s2) return '"' + str(ESCAPE_ASCII.sub(replace, s)) + '"' encode_basestring_ascii = c_encode_basestring_ascii or py_encode_basestring_ascii class JSONEncoder(object): """Extensible JSON <http://json.org> encoder for Python data structures. Supports the following objects and types by default: +-------------------+---------------+ | Python | JSON | +===================+===============+ | dict | object | +-------------------+---------------+ | list, tuple | array | +-------------------+---------------+ | str, unicode | string | +-------------------+---------------+ | int, long, float | number | +-------------------+---------------+ | True | true | +-------------------+---------------+ | False | false | +-------------------+---------------+ | None | null | +-------------------+---------------+ To extend this to recognize other objects, subclass and implement a ``.default()`` method with another method that returns a serializable object for ``o`` if possible, otherwise it should call the superclass implementation (to raise ``TypeError``). """ item_separator = ', ' key_separator = ': ' def __init__(self, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, encoding='utf-8', default=None): """Constructor for JSONEncoder, with sensible defaults. If skipkeys is False, then it is a TypeError to attempt encoding of keys that are not str, int, long, float or None. If skipkeys is True, such items are simply skipped. If ensure_ascii is True, the output is guaranteed to be str objects with all incoming unicode characters escaped. If ensure_ascii is false, the output will be unicode object. If check_circular is True, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an OverflowError). Otherwise, no such check takes place. If allow_nan is True, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats. If sort_keys is True, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis. If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation. If specified, separators should be a (item_separator, key_separator) tuple. The default is (', ', ': '). To get the most compact JSON representation you should specify (',', ':') to eliminate whitespace. If specified, default is a function that gets called for objects that can't otherwise be serialized. It should return a JSON encodable version of the object or raise a ``TypeError``. If encoding is not None, then all input strings will be transformed into unicode using that encoding prior to JSON-encoding. The default is UTF-8. """ self.skipkeys = skipkeys self.ensure_ascii = ensure_ascii self.check_circular = check_circular self.allow_nan = allow_nan self.sort_keys = sort_keys self.indent = indent if separators is not None: self.item_separator, self.key_separator = separators if default is not None: self.default = default self.encoding = encoding def default(self, o): """Implement this method in a subclass such that it returns a serializable object for ``o``, or calls the base implementation (to raise a ``TypeError``). For example, to support arbitrary iterators, you could implement default like this:: def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) return JSONEncoder.default(self, o) """ raise TypeError("%r is not JSON serializable" % (o,)) def encode(self, o): """Return a JSON string representation of a Python data structure. >>> JSONEncoder().encode({"foo": ["bar", "baz"]}) '{"foo": ["bar", "baz"]}' """ # This is for extremely simple cases and benchmarks. if isinstance(o, basestring): if isinstance(o, str): _encoding = self.encoding if (_encoding is not None and not (_encoding == 'utf-8')): o = o.decode(_encoding) if self.ensure_ascii: return encode_basestring_ascii(o) else: return encode_basestring(o) # This doesn't pass the iterator directly to ''.join() because the # exceptions aren't as detailed. The list call should be roughly # equivalent to the PySequence_Fast that ''.join() would do. chunks = self.iterencode(o, _one_shot=True) if not isinstance(chunks, (list, tuple)): chunks = list(chunks) return ''.join(chunks) def iterencode(self, o, _one_shot=False): """Encode the given object and yield each string representation as available. For example:: for chunk in JSONEncoder().iterencode(bigobject): mysocket.write(chunk) """ if self.check_circular: markers = {} else: markers = None if self.ensure_ascii: _encoder = encode_basestring_ascii else: _encoder = encode_basestring if self.encoding != 'utf-8': def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding): if isinstance(o, str): o = o.decode(_encoding) return _orig_encoder(o) def floatstr(o, allow_nan=self.allow_nan, _repr=FLOAT_REPR, _inf=INFINITY, _neginf=-INFINITY): # Check for specials. Note that this type of test is processor- and/or # platform-specific, so do tests which don't depend on the internals. if o != o: text = 'NaN' elif o == _inf: text = 'Infinity' elif o == _neginf: text = '-Infinity' else: return _repr(o) if not allow_nan: raise ValueError("Out of range float values are not JSON compliant: %r" % (o,)) return text if _one_shot and c_make_encoder is not None and not self.indent and not self.sort_keys: _iterencode = c_make_encoder( markers, self.default, _encoder, self.indent, self.key_separator, self.item_separator, self.sort_keys, self.skipkeys, self.allow_nan) else: _iterencode = _make_iterencode( markers, self.default, _encoder, self.indent, floatstr, self.key_separator, self.item_separator, self.sort_keys, self.skipkeys, _one_shot) return _iterencode(o, 0) def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot, ## HACK: hand-optimized bytecode; turn globals into locals False=False, True=True, ValueError=ValueError, basestring=basestring, dict=dict, float=float, id=id, int=int, isinstance=isinstance, list=list, long=long, str=str, tuple=tuple, ): def _iterencode_list(lst, _current_indent_level): if not lst: yield '[]' return if markers is not None: markerid = id(lst) if markerid in markers: raise ValueError("Circular reference detected") markers[markerid] = lst buf = '[' if _indent is not None: _current_indent_level += 1 newline_indent = '\n' + (' ' * (_indent * _current_indent_level)) separator = _item_separator + newline_indent buf += newline_indent else: newline_indent = None separator = _item_separator first = True for value in lst: if first: first = False else: buf = separator if isinstance(value, basestring): yield buf + _encoder(value) elif value is None: yield buf + 'null' elif value is True: yield buf + 'true' elif value is False: yield buf + 'false' elif isinstance(value, (int, long)): yield buf + str(value) elif isinstance(value, float): yield buf + _floatstr(value) else: yield buf if isinstance(value, (list, tuple)): chunks = _iterencode_list(value, _current_indent_level) elif isinstance(value, dict): chunks = _iterencode_dict(value, _current_indent_level) else: chunks = _iterencode(value, _current_indent_level) for chunk in chunks: yield chunk if newline_indent is not None: _current_indent_level -= 1 yield '\n' + (' ' * (_indent * _current_indent_level)) yield ']' if markers is not None: del markers[markerid] def _iterencode_dict(dct, _current_indent_level): if not dct: yield '{}' return if markers is not None: markerid = id(dct) if markerid in markers: raise ValueError("Circular reference detected") markers[markerid] = dct yield '{' if _indent is not None: _current_indent_level += 1 newline_indent = '\n' + (' ' * (_indent * _current_indent_level)) item_separator = _item_separator + newline_indent yield newline_indent else: newline_indent = None item_separator = _item_separator first = True if _sort_keys: items = dct.items() items.sort(key=lambda kv: kv[0]) else: items = dct.iteritems() for key, value in items: if isinstance(key, basestring): pass # JavaScript is weakly typed for these, so it makes sense to # also allow them. Many encoders seem to do something like this. elif isinstance(key, float): key = _floatstr(key) elif isinstance(key, (int, long)): key = str(key) elif key is True: key = 'true' elif key is False: key = 'false' elif key is None: key = 'null' elif _skipkeys: continue else: raise TypeError("key %r is not a string" % (key,)) if first: first = False else: yield item_separator yield _encoder(key) yield _key_separator if isinstance(value, basestring): yield _encoder(value) elif value is None: yield 'null' elif value is True: yield 'true' elif value is False: yield 'false' elif isinstance(value, (int, long)): yield str(value) elif isinstance(value, float): yield _floatstr(value) else: if isinstance(value, (list, tuple)): chunks = _iterencode_list(value, _current_indent_level) elif isinstance(value, dict): chunks = _iterencode_dict(value, _current_indent_level) else: chunks = _iterencode(value, _current_indent_level) for chunk in chunks: yield chunk if newline_indent is not None: _current_indent_level -= 1 yield '\n' + (' ' * (_indent * _current_indent_level)) yield '}' if markers is not None: del markers[markerid] def _iterencode(o, _current_indent_level): if isinstance(o, basestring): yield _encoder(o) elif o is None: yield 'null' elif o is True: yield 'true' elif o is False: yield 'false' elif isinstance(o, (int, long)): yield str(o) elif isinstance(o, float): yield _floatstr(o) elif isinstance(o, (list, tuple)): for chunk in _iterencode_list(o, _current_indent_level): yield chunk elif isinstance(o, dict): for chunk in _iterencode_dict(o, _current_indent_level): yield chunk else: if markers is not None: markerid = id(o) if markerid in markers: raise ValueError("Circular reference detected") markers[markerid] = o o = _default(o) for chunk in _iterencode(o, _current_indent_level): yield chunk if markers is not None: del markers[markerid] return _iterencode
ajibawa-2023/Python-Code-Large/train/row_278
230
434
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 2], "level": 0, "parent": null, "vector": [8, 0, 0.0035, 0.0046, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"Implementation of JSONEncoder\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Import_L3_C0", "label": "re import re", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0023, 0, 0.66, 0.0667, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L5_C0", "label": "try", "type": "try", "loc": [5, 8], "level": 0, "parent": null, "vector": [7, 0, 0.015, 0.0092, 0, 0.66, 0.1333, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii\nexcept ImportError:\n c_encode_basestring_ascii = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:ImportFrom_L6_C4", "label": "from simplejson._speedups import c_encode_basestring_ascii", "type": "import", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L5_C0", "vector": [1, 1, 0.0138, 0.0023, 1, 0.89, 0.0, 976, 0, 1, 0, 0, 976, 0, 0], "semantic": {"name": "simplejson._speedups", "arg_names": [], "import_names": ["c_encode_basestring_ascii"], "rhs_call_name": "", "annotation": ""}, "snippet": " from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L8_C4", "label": "c_encode_basestring_ascii =", "type": "assigned_variable", "loc": [8, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L5_C0", "vector": [14, 1, 0.0184, 0.0023, 1, 0.89, 0.0, 485, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "c_encode_basestring_ascii", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c_encode_basestring_ascii = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L9_C0", "label": "try", "type": "try", "loc": [9, 12], "level": 0, "parent": null, "vector": [7, 0, 0.0242, 0.0092, 0, 0.66, 0.2, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from simplejson._speedups import make_encoder as c_make_encoder\nexcept ImportError:\n c_make_encoder = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:ImportFrom_L10_C4", "label": "from simplejson._speedups import c_make_encoder", "type": "import", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L9_C0", "vector": [1, 1, 0.023, 0.0023, 1, 0.27, 0.0, 976, 0, 1, 0, 0, 976, 0, 0], "semantic": {"name": "simplejson._speedups", "arg_names": [], "import_names": ["c_make_encoder"], "rhs_call_name": "", "annotation": ""}, "snippet": " from simplejson._speedups import make_encoder as c_make_encoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L12_C4", "label": "c_make_encoder =", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L9_C0", "vector": [14, 1, 0.0276, 0.0023, 1, 0.27, 0.0, 30, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "c_make_encoder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c_make_encoder = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L14_C0", "label": "ESCAPE = compile()", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.0323, 0.0023, 0, 0.66, 0.2667, 562, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "ESCAPE", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "ESCAPE = re.compile(r'[\\x00-\\x1f\\\\\"\\b\\f\\n\\r\\t]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L15_C0", "label": "ESCAPE_ASCII = compile()", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.0346, 0.0023, 0, 0.66, 0.3333, 214, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "ESCAPE_ASCII", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "ESCAPE_ASCII = re.compile(r'([\\\\\"]|[^\\ -~])')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L16_C0", "label": "HAS_UTF8 = compile()", "type": "assigned_variable", "loc": [16, 16], "level": 0, "parent": null, "vector": [14, 0, 0.0369, 0.0023, 0, 0.66, 0.4, 954, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "HAS_UTF8", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "HAS_UTF8 = re.compile(r'[\\x80-\\xff]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L17_C0", "label": "ESCAPE_DCT =", "type": "assigned_variable", "loc": [17, 25], "level": 0, "parent": null, "vector": [14, 0, 0.0484, 0.0207, 0, 0.66, 0.4667, 404, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "ESCAPE_DCT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ESCAPE_DCT = {\n '\\\\': '\\\\\\\\',\n '\"': '\\\\\"',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L26_C0", "label": "for i", "type": "for", "loc": [26, 27], "level": 0, "parent": null, "vector": [6, 0, 0.0611, 0.0046, 0, 0.66, 0.5333, 826, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0x20):\n ESCAPE_DCT.setdefault(chr(i), '\\\\u%04x' % (i,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L27_C4", "label": "setdefault()", "type": "expression", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L26_C0", "vector": [8, 1, 0.0622, 0.0023, 1, 0.81, 0.0, 262, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "setdefault", "arg_names": [], "import_names": [], "rhs_call_name": "setdefault", "annotation": ""}, "snippet": " ESCAPE_DCT.setdefault(chr(i), '\\\\u%04x' % (i,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L30_C0", "label": "INFINITY = float()", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.0691, 0.0023, 0, 0.66, 0.6, 681, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "INFINITY", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": "INFINITY = float('1e66666')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L31_C0", "label": "FLOAT_REPR =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.0714, 0.0023, 0, 0.66, 0.6667, 39, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "FLOAT_REPR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FLOAT_REPR = repr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "label": "encode_basestring", "type": "function", "loc": [33, 39], "level": 0, "parent": null, "vector": [2, 0, 0.0829, 0.0161, 0, 0.66, 0.7333, 207, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "encode_basestring", "arg_names": ["s"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def encode_basestring(s):\n \"\"\"Return a JSON representation of a Python string\n\n \"\"\"\n def replace(match):\n return ESCAPE_DCT[match.group(0)]\n return '\"' + ESCAPE.sub(replace, s) + '\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L34_C4", "label": "expression", "type": "expression", "loc": [34, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "vector": [8, 1, 0.0806, 0.0069, 1, 0.22, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a JSON representation of a Python string\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L37_C4", "label": "replace", "type": "function", "loc": [37, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "vector": [2, 1, 0.0864, 0.0046, 1, 0.22, 0.5, 293, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "replace", "arg_names": ["match"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def replace(match):\n return ESCAPE_DCT[match.group(0)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L38_C8", "label": "return", "type": "return", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L37_C4", "vector": [13, 2, 0.0876, 0.0023, 2, 0.24, 0.0, 0, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ESCAPE_DCT[match.group(0)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L39_C4", "label": "return", "type": "return", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "vector": [13, 1, 0.0899, 0.0023, 1, 0.22, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\"' + ESCAPE.sub(replace, s) + '\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "label": "py_encode_basestring_ascii", "type": "function", "loc": [42, 62], "level": 0, "parent": null, "vector": [2, 0, 0.1198, 0.0484, 0, 0.66, 0.8, 438, 0, 1, 1, 0, 0, 0, 7], "semantic": {"name": "py_encode_basestring_ascii", "arg_names": ["s"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def py_encode_basestring_ascii(s):\n \"\"\"Return an ASCII-only JSON representation of a Python string\n\n \"\"\"\n if isinstance(s, str) and HAS_UTF8.search(s) is not None:\n s = s.decode('utf-8')\n def replace(match):\n s = match.group(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L43_C4", "label": "expression", "type": "expression", "loc": [43, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "vector": [8, 1, 0.1014, 0.0069, 1, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return an ASCII-only JSON representation of a Python string\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L46_C4", "label": "if", "type": "if", "loc": [46, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "vector": [4, 1, 0.1071, 0.0046, 1, 0.14, 0.3333, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(s, str) and HAS_UTF8.search(s) is not None:\n s = s.decode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L47_C8", "label": "s = decode()", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L46_C4", "vector": [14, 2, 0.1083, 0.0023, 2, 0.68, 0.0, 553, 3, 1, 0, 0, 528, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "decode", "annotation": ""}, "snippet": " s = s.decode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4", "label": "replace", "type": "function", "loc": [48, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "vector": [2, 1, 0.1256, 0.0323, 1, 0.14, 0.6667, 293, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "replace", "arg_names": ["match"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def replace(match):\n s = match.group(0)\n try:\n return ESCAPE_DCT[s]\n except KeyError:\n n = ord(s)\n if n < 0x10000:\n return '\\\\u%04x' % (n,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L49_C8", "label": "s = group()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4", "vector": [14, 2, 0.1129, 0.0023, 2, 0.88, 0.0, 553, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " s = match.group(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "label": "try", "type": "try", "loc": [50, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4", "vector": [7, 2, 0.1279, 0.0276, 2, 0.88, 1.0, 0, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n return ESCAPE_DCT[s]\n except KeyError:\n n = ord(s)\n if n < 0x10000:\n return '\\\\u%04x' % (n,)\n else:\n # surrogate pair"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L51_C12", "label": "return", "type": "return", "loc": [51, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "vector": [13, 3, 0.1175, 0.0023, 3, 0.79, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ESCAPE_DCT[s]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L53_C12", "label": "n = ord()", "type": "assigned_variable", "loc": [53, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "vector": [14, 3, 0.1221, 0.0023, 3, 0.79, 0.0, 773, 3, 1, 0, 0, 171, 10, 1], "semantic": {"name": "n", "arg_names": [], "import_names": [], "rhs_call_name": "ord", "annotation": ""}, "snippet": " n = ord(s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "label": "if", "type": "if", "loc": [54, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "vector": [4, 3, 0.1325, 0.0184, 3, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if n < 0x10000:\n return '\\\\u%04x' % (n,)\n else:\n # surrogate pair\n n -= 0x10000\n s1 = 0xd800 | ((n >> 10) & 0x3ff)\n s2 = 0xdc00 | (n & 0x3ff)\n return '\\\\u%04x\\\\u%04x' % (s1, s2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L55_C16", "label": "return", "type": "return", "loc": [55, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "vector": [13, 4, 0.1267, 0.0023, 4, 0.31, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\\\u%04x' % (n,)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L59_C16", "label": "s1 =", "type": "assigned_variable", "loc": [59, 59], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "vector": [14, 4, 0.1359, 0.0023, 4, 0.31, 0.3333, 745, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "s1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " s1 = 0xd800 | ((n >> 10) & 0x3ff)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L60_C16", "label": "s2 =", "type": "assigned_variable", "loc": [60, 60], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "vector": [14, 4, 0.1382, 0.0023, 4, 0.31, 0.6667, 448, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "s2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " s2 = 0xdc00 | (n & 0x3ff)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L61_C16", "label": "return", "type": "return", "loc": [61, 61], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "vector": [13, 4, 0.1406, 0.0023, 4, 0.31, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\\\\u%04x\\\\u%04x' % (s1, s2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L62_C4", "label": "return", "type": "return", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "vector": [13, 1, 0.1429, 0.0023, 1, 0.14, 1.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return '\"' + str(ESCAPE_ASCII.sub(replace, s)) + '\"'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L65_C0", "label": "encode_basestring_ascii =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.1498, 0.0023, 0, 0.66, 0.8667, 105, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "encode_basestring_ascii", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "encode_basestring_ascii = c_encode_basestring_ascii or py_encode_basestring_ascii"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "label": "JSONEncoder", "type": "class", "loc": [67, 256], "level": 0, "parent": null, "vector": [3, 0, 0.3721, 0.4378, 0, 0.66, 0.9333, 228, 0, 6, 0, 0, 186, 0, 18], "semantic": {"name": "JSONEncoder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class JSONEncoder(object):\n \"\"\"Extensible JSON <http://json.org> encoder for Python data structures.\n\n Supports the following objects and types by default:\n\n +-------------------+---------------+\n | Python | JSON |\n +===================+===============+"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L68_C4", "label": "expression", "type": "expression", "loc": [68, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [8, 1, 0.1878, 0.0645, 1, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Extensible JSON <http://json.org> encoder for Python data structures.\n\n Supports the following objects and types by default:\n\n +-------------------+---------------+\n | Python | JSON |\n +===================+===============+\n | dict | object |"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L96_C4", "label": "item_separator =", "type": "assigned_variable", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [14, 1, 0.2212, 0.0023, 1, 0.6, 0.1667, 330, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "item_separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " item_separator = ', '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L97_C4", "label": "key_separator =", "type": "assigned_variable", "loc": [97, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [14, 1, 0.2235, 0.0023, 1, 0.6, 0.3333, 294, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "key_separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key_separator = ': '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "label": "__init__", "type": "function", "loc": [98, 154], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [2, 1, 0.2903, 0.1313, 1, 0.6, 0.5, 555, 0, 10, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "skipkeys", "ensure_ascii", "check_circular", "allow_nan", "sort_keys", "indent", "separators", "encoding", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, skipkeys=False, ensure_ascii=True,\n check_circular=True, allow_nan=True, sort_keys=False,\n indent=None, separators=None, encoding='utf-8', default=None):\n \"\"\"Constructor for JSONEncoder, with sensible defaults.\n\n If skipkeys is False, then it is a TypeError to attempt\n encoding of keys that are not str, int, long, float or None. If\n skipkeys is True, such items are simply skipped."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L101_C8", "label": "expression", "type": "expression", "loc": [101, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [8, 2, 0.28, 0.0968, 2, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Constructor for JSONEncoder, with sensible defaults.\n\n If skipkeys is False, then it is a TypeError to attempt\n encoding of keys that are not str, int, long, float or None. If\n skipkeys is True, such items are simply skipped.\n\n If ensure_ascii is True, the output is guaranteed to be str\n objects with all incoming unicode characters escaped. If"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L144_C8", "label": "self.skipkeys =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3318, 0.0023, 2, 0.94, 0.1111, 853, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.skipkeys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.skipkeys = skipkeys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L145_C8", "label": "self.ensure_ascii =", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3341, 0.0023, 2, 0.94, 0.2222, 255, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.ensure_ascii", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.ensure_ascii = ensure_ascii"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L146_C8", "label": "self.check_circular =", "type": "assigned_variable", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3364, 0.0023, 2, 0.94, 0.3333, 698, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.check_circular", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.check_circular = check_circular"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L147_C8", "label": "self.allow_nan =", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3387, 0.0023, 2, 0.94, 0.4444, 507, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.allow_nan", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.allow_nan = allow_nan"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L148_C8", "label": "self.sort_keys =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.341, 0.0023, 2, 0.94, 0.5556, 911, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.sort_keys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.sort_keys = sort_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L149_C8", "label": "self.indent =", "type": "assigned_variable", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3433, 0.0023, 2, 0.94, 0.6667, 771, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.indent = indent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L150_C8", "label": "if", "type": "if", "loc": [150, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [4, 2, 0.3468, 0.0046, 2, 0.94, 0.7778, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if separators is not None:\n self.item_separator, self.key_separator = separators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L151_C12", "label": "assign", "type": "assigned_variable", "loc": [151, 151], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L150_C8", "vector": [14, 3, 0.3479, 0.0023, 3, 0.44, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.item_separator, self.key_separator = separators"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L152_C8", "label": "if", "type": "if", "loc": [152, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [4, 2, 0.3514, 0.0046, 2, 0.94, 0.8889, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if default is not None:\n self.default = default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L153_C12", "label": "self.default =", "type": "assigned_variable", "loc": [153, 153], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L152_C8", "vector": [14, 3, 0.3525, 0.0023, 3, 0.62, 0.0, 762, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.default", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.default = default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L154_C8", "label": "self.encoding =", "type": "assigned_variable", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "vector": [14, 2, 0.3548, 0.0023, 2, 0.94, 1.0, 564, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.encoding = encoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L156_C4", "label": "default", "type": "function", "loc": [156, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [2, 1, 0.3802, 0.0438, 1, 0.6, 0.6667, 977, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "default", "arg_names": ["self", "o"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def default(self, o):\n \"\"\"Implement this method in a subclass such that it returns\n a serializable object for ``o``, or calls the base implementation\n (to raise a ``TypeError``).\n\n For example, to support arbitrary iterators, you could\n implement default like this::\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L157_C8", "label": "expression", "type": "expression", "loc": [157, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L156_C4", "vector": [8, 2, 0.3802, 0.0392, 2, 0.02, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Implement this method in a subclass such that it returns\n a serializable object for ``o``, or calls the base implementation\n (to raise a ``TypeError``).\n\n For example, to support arbitrary iterators, you could\n implement default like this::\n\n def default(self, o):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "label": "encode", "type": "function", "loc": [176, 200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [2, 1, 0.4332, 0.0576, 1, 0.6, 0.8333, 623, 0, 2, 1, 0, 0, 0, 9], "semantic": {"name": "encode", "arg_names": ["self", "o"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def encode(self, o):\n \"\"\"Return a JSON string representation of a Python data structure.\n\n >>> JSONEncoder().encode({\"foo\": [\"bar\", \"baz\"]})\n '{\"foo\": [\"bar\", \"baz\"]}'\n\n \"\"\"\n # This is for extremely simple cases and benchmarks."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L177_C8", "label": "expression", "type": "expression", "loc": [177, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "vector": [8, 2, 0.4136, 0.0138, 2, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Return a JSON string representation of a Python data structure.\n\n >>> JSONEncoder().encode({\"foo\": [\"bar\", \"baz\"]})\n '{\"foo\": [\"bar\", \"baz\"]}'\n\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8", "label": "if", "type": "if", "loc": [184, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "vector": [4, 2, 0.4343, 0.023, 2, 0.9, 0.25, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(o, basestring):\n if isinstance(o, str):\n _encoding = self.encoding\n if (_encoding is not None\n and not (_encoding == 'utf-8')):\n o = o.decode(_encoding)\n if self.ensure_ascii:\n return encode_basestring_ascii(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12", "label": "if", "type": "if", "loc": [185, 189], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8", "vector": [4, 3, 0.4309, 0.0115, 3, 0.67, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(o, str):\n _encoding = self.encoding\n if (_encoding is not None\n and not (_encoding == 'utf-8')):\n o = o.decode(_encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L186_C16", "label": "_encoding =", "type": "assigned_variable", "loc": [186, 186], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12", "vector": [14, 4, 0.4286, 0.0023, 4, 0.55, 0.0, 410, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _encoding = self.encoding"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L187_C16", "label": "if", "type": "if", "loc": [187, 189], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12", "vector": [4, 4, 0.4332, 0.0069, 4, 0.55, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (_encoding is not None\n and not (_encoding == 'utf-8')):\n o = o.decode(_encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L189_C20", "label": "o = decode()", "type": "assigned_variable", "loc": [189, 189], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L187_C16", "vector": [14, 5, 0.4355, 0.0023, 5, 0.06, 0.0, 926, 3, 1, 0, 0, 528, 10, 1], "semantic": {"name": "o", "arg_names": [], "import_names": [], "rhs_call_name": "decode", "annotation": ""}, "snippet": " o = o.decode(_encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12", "label": "if", "type": "if", "loc": [190, 193], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8", "vector": [4, 3, 0.4412, 0.0092, 3, 0.67, 1.0, 0, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.ensure_ascii:\n return encode_basestring_ascii(o)\n else:\n return encode_basestring(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L191_C16", "label": "return", "type": "return", "loc": [191, 191], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12", "vector": [13, 4, 0.4401, 0.0023, 4, 0.49, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return encode_basestring_ascii(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L193_C16", "label": "return", "type": "return", "loc": [193, 193], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12", "vector": [13, 4, 0.4447, 0.0023, 4, 0.49, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return encode_basestring(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L197_C8", "label": "chunks = iterencode()", "type": "assigned_variable", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "vector": [14, 2, 0.4539, 0.0023, 2, 0.9, 0.5, 284, 3, 2, 0, 0, 315, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "iterencode", "annotation": ""}, "snippet": " chunks = self.iterencode(o, _one_shot=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L198_C8", "label": "if", "type": "if", "loc": [198, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "vector": [4, 2, 0.4574, 0.0046, 2, 0.9, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not isinstance(chunks, (list, tuple)):\n chunks = list(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L199_C12", "label": "chunks = list()", "type": "assigned_variable", "loc": [199, 199], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L198_C8", "vector": [14, 3, 0.4585, 0.0023, 3, 0.93, 0.0, 284, 3, 1, 0, 0, 430, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": " chunks = list(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L200_C8", "label": "return", "type": "return", "loc": [200, 200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "vector": [13, 2, 0.4608, 0.0023, 2, 0.9, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''.join(chunks)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "label": "iterencode", "type": "function", "loc": [202, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "vector": [2, 1, 0.5276, 0.1267, 1, 0.6, 1.0, 315, 0, 3, 1, 0, 0, 0, 8], "semantic": {"name": "iterencode", "arg_names": ["self", "o", "_one_shot"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def iterencode(self, o, _one_shot=False):\n \"\"\"Encode the given object and yield each string\n representation as available.\n\n For example::\n\n for chunk in JSONEncoder().iterencode(bigobject):\n mysocket.write(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L203_C8", "label": "expression", "type": "expression", "loc": [203, 211], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [8, 2, 0.477, 0.0207, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Encode the given object and yield each string\n representation as available.\n\n For example::\n\n for chunk in JSONEncoder().iterencode(bigobject):\n mysocket.write(chunk)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8", "label": "if", "type": "if", "loc": [212, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [4, 2, 0.4919, 0.0092, 2, 0.35, 0.1667, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.check_circular:\n markers = {}\n else:\n markers = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L213_C12", "label": "markers =", "type": "assigned_variable", "loc": [213, 213], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8", "vector": [14, 3, 0.4908, 0.0023, 3, 0.49, 0.0, 586, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "markers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " markers = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L215_C12", "label": "markers =", "type": "assigned_variable", "loc": [215, 215], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8", "vector": [14, 3, 0.4954, 0.0023, 3, 0.49, 1.0, 586, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "markers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " markers = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8", "label": "if", "type": "if", "loc": [216, 219], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [4, 2, 0.5012, 0.0092, 2, 0.35, 0.3333, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.ensure_ascii:\n _encoder = encode_basestring_ascii\n else:\n _encoder = encode_basestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L217_C12", "label": "_encoder =", "type": "assigned_variable", "loc": [217, 217], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8", "vector": [14, 3, 0.5, 0.0023, 3, 0.1, 0.0, 153, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_encoder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _encoder = encode_basestring_ascii"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L219_C12", "label": "_encoder =", "type": "assigned_variable", "loc": [219, 219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8", "vector": [14, 3, 0.5046, 0.0023, 3, 0.1, 1.0, 153, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_encoder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _encoder = encode_basestring"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L220_C8", "label": "if", "type": "if", "loc": [220, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [4, 2, 0.5115, 0.0115, 2, 0.35, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.encoding != 'utf-8':\n def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding):\n if isinstance(o, str):\n o = o.decode(_encoding)\n return _orig_encoder(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12", "label": "_encoder", "type": "function", "loc": [221, 224], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L220_C8", "vector": [2, 3, 0.5127, 0.0092, 3, 0.39, 0.0, 153, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "_encoder", "arg_names": ["o", "_orig_encoder", "_encoding"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding):\n if isinstance(o, str):\n o = o.decode(_encoding)\n return _orig_encoder(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L222_C16", "label": "if", "type": "if", "loc": [222, 223], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12", "vector": [4, 4, 0.5127, 0.0046, 4, 0.5, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(o, str):\n o = o.decode(_encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L223_C20", "label": "o = decode()", "type": "assigned_variable", "loc": [223, 223], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L222_C16", "vector": [14, 5, 0.5138, 0.0023, 5, 0.26, 0.0, 926, 3, 1, 0, 0, 528, 10, 1], "semantic": {"name": "o", "arg_names": [], "import_names": [], "rhs_call_name": "decode", "annotation": ""}, "snippet": " o = o.decode(_encoding)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L224_C16", "label": "return", "type": "return", "loc": [224, 224], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12", "vector": [13, 4, 0.5161, 0.0023, 4, 0.5, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _orig_encoder(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "label": "floatstr", "type": "function", "loc": [226, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [2, 2, 0.5403, 0.0415, 2, 0.35, 0.6667, 122, 0, 5, 1, 0, 0, 0, 2], "semantic": {"name": "floatstr", "arg_names": ["o", "allow_nan", "_repr", "_inf", "_neginf"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def floatstr(o, allow_nan=self.allow_nan, _repr=FLOAT_REPR, _inf=INFINITY, _neginf=-INFINITY):\n # Check for specials. Note that this type of test is processor- and/or\n # platform-specific, so do tests which don't depend on the internals.\n\n if o != o:\n text = 'NaN'\n elif o == _inf:\n text = 'Infinity'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12", "label": "if", "type": "if", "loc": [230, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "vector": [4, 3, 0.538, 0.0184, 3, 0.55, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if o != o:\n text = 'NaN'\n elif o == _inf:\n text = 'Infinity'\n elif o == _neginf:\n text = '-Infinity'\n else:\n return _repr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L231_C16", "label": "text =", "type": "assigned_variable", "loc": [231, 231], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12", "vector": [14, 4, 0.5323, 0.0023, 4, 0.56, 0.0, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = 'NaN'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12", "label": "if", "type": "if", "loc": [232, 237], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12", "vector": [4, 4, 0.5403, 0.0138, 4, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif o == _inf:\n text = 'Infinity'\n elif o == _neginf:\n text = '-Infinity'\n else:\n return _repr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L233_C16", "label": "text =", "type": "assigned_variable", "loc": [233, 233], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12", "vector": [14, 5, 0.5369, 0.0023, 5, 0.36, 0.0, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = 'Infinity'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12", "label": "if", "type": "if", "loc": [234, 237], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12", "vector": [4, 5, 0.5426, 0.0092, 5, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif o == _neginf:\n text = '-Infinity'\n else:\n return _repr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L235_C16", "label": "text =", "type": "assigned_variable", "loc": [235, 235], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12", "vector": [14, 6, 0.5415, 0.0023, 6, 0.42, 0.0, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = '-Infinity'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L237_C16", "label": "return", "type": "return", "loc": [237, 237], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12", "vector": [13, 6, 0.5461, 0.0023, 6, 0.42, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _repr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L239_C12", "label": "if", "type": "if", "loc": [239, 241], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "vector": [4, 3, 0.553, 0.0069, 3, 0.55, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not allow_nan:\n raise ValueError(\"Out of range float values are not JSON compliant: %r\"\n % (o,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L243_C12", "label": "return", "type": "return", "loc": [243, 243], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "vector": [13, 3, 0.5599, 0.0023, 3, 0.55, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8", "label": "if", "type": "if", "loc": [246, 255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [4, 2, 0.5772, 0.023, 2, 0.35, 0.8333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _one_shot and c_make_encoder is not None and not self.indent and not self.sort_keys:\n _iterencode = c_make_encoder(\n markers, self.default, _encoder, self.indent,\n self.key_separator, self.item_separator, self.sort_keys,\n self.skipkeys, self.allow_nan)\n else:\n _iterencode = _make_iterencode(\n markers, self.default, _encoder, self.indent, floatstr,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L247_C12", "label": "_iterencode = c_make_encoder()", "type": "assigned_variable", "loc": [247, 250], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8", "vector": [14, 3, 0.5726, 0.0092, 3, 0.14, 0.0, 136, 3, 9, 0, 0, 30, 10, 1], "semantic": {"name": "_iterencode", "arg_names": [], "import_names": [], "rhs_call_name": "c_make_encoder", "annotation": ""}, "snippet": " _iterencode = c_make_encoder(\n markers, self.default, _encoder, self.indent,\n self.key_separator, self.item_separator, self.sort_keys,\n self.skipkeys, self.allow_nan)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L252_C12", "label": "_iterencode = _make_iterencode()", "type": "assigned_variable", "loc": [252, 255], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8", "vector": [14, 3, 0.5841, 0.0092, 3, 0.14, 1.0, 136, 3, 10, 0, 0, 845, 10, 1], "semantic": {"name": "_iterencode", "arg_names": [], "import_names": [], "rhs_call_name": "_make_iterencode", "annotation": ""}, "snippet": " _iterencode = _make_iterencode(\n markers, self.default, _encoder, self.indent, floatstr,\n self.key_separator, self.item_separator, self.sort_keys,\n self.skipkeys, _one_shot)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L256_C8", "label": "return", "type": "return", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "vector": [13, 2, 0.5899, 0.0023, 2, 0.35, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _iterencode(o, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "label": "_make_iterencode", "type": "function", "loc": [258, 434], "level": 0, "parent": null, "vector": [2, 0, 0.7972, 0.4078, 0, 0.66, 1.0, 845, 0, 21, 1, 0, 0, 0, 50], "semantic": {"name": "_make_iterencode", "arg_names": ["markers", "_default", "_encoder", "_indent", "_floatstr", "_key_separator", "_item_separator", "_sort_keys", "_skipkeys", "_one_shot", "ValueError", "basestring", "dict", "float", "id", "int", "isinstance", "list", "long", "str", "tuple"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _make_iterencode(markers, _default, _encoder, _indent, _floatstr, _key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot,\n ## HACK: hand-optimized bytecode; turn globals into locals\n ValueError=ValueError,\n basestring=basestring,\n dict=dict,\n float=float,\n id=id,\n int=int,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "label": "_iterencode_list", "type": "function", "loc": [273, 324], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "vector": [2, 1, 0.6878, 0.1198, 1, 0.17, 0.0, 1, 0, 2, 0, 0, 0, 0, 13], "semantic": {"name": "_iterencode_list", "arg_names": ["lst", "_current_indent_level"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _iterencode_list(lst, _current_indent_level):\n if not lst:\n yield '[]'\n return\n if markers is not None:\n markerid = id(lst)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8", "label": "if", "type": "if", "loc": [274, 276], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [4, 2, 0.6336, 0.0069, 2, 0.98, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not lst:\n yield '[]'\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L275_C12", "label": "expression", "type": "expression", "loc": [275, 275], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8", "vector": [8, 3, 0.6336, 0.0023, 3, 0.81, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '[]'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L276_C12", "label": "return", "type": "return", "loc": [276, 276], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8", "vector": [13, 3, 0.6359, 0.0023, 3, 0.81, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "label": "if", "type": "if", "loc": [277, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [4, 2, 0.6429, 0.0115, 2, 0.98, 0.125, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n markerid = id(lst)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid] = lst"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L278_C12", "label": "markerid = id()", "type": "assigned_variable", "loc": [278, 278], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "vector": [14, 3, 0.6406, 0.0023, 3, 0.0, 0.0, 105, 3, 1, 0, 0, 941, 10, 1], "semantic": {"name": "markerid", "arg_names": [], "import_names": [], "rhs_call_name": "id", "annotation": ""}, "snippet": " markerid = id(lst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L279_C12", "label": "if", "type": "if", "loc": [279, 280], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "vector": [4, 3, 0.644, 0.0046, 3, 0.0, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L281_C12", "label": "assign", "type": "assigned_variable", "loc": [281, 281], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "vector": [14, 3, 0.6475, 0.0023, 3, 0.0, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " markers[markerid] = lst"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L282_C8", "label": "buf =", "type": "assigned_variable", "loc": [282, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [14, 2, 0.6498, 0.0023, 2, 0.98, 0.25, 840, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "buf", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " buf = '['"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "label": "if", "type": "if", "loc": [283, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [4, 2, 0.6601, 0.0184, 2, 0.98, 0.375, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _indent is not None:\n _current_indent_level += 1\n newline_indent = '\\n' + (' ' * (_indent * _current_indent_level))\n separator = _item_separator + newline_indent\n buf += newline_indent\n else:\n newline_indent = None\n separator = _item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L285_C12", "label": "newline_indent =", "type": "assigned_variable", "loc": [285, 285], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "vector": [14, 3, 0.6567, 0.0023, 3, 0.47, 0.0, 810, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "newline_indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newline_indent = '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L286_C12", "label": "separator =", "type": "assigned_variable", "loc": [286, 286], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "vector": [14, 3, 0.659, 0.0023, 3, 0.47, 0.3333, 539, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " separator = _item_separator + newline_indent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L289_C12", "label": "newline_indent =", "type": "assigned_variable", "loc": [289, 289], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "vector": [14, 3, 0.6659, 0.0023, 3, 0.47, 0.6667, 810, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "newline_indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newline_indent = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L290_C12", "label": "separator =", "type": "assigned_variable", "loc": [290, 290], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "vector": [14, 3, 0.6682, 0.0023, 3, 0.47, 1.0, 539, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " separator = _item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L291_C8", "label": "first =", "type": "assigned_variable", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [14, 2, 0.6705, 0.0023, 2, 0.98, 0.5, 199, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "first", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " first = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8", "label": "for value", "type": "for", "loc": [292, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [6, 2, 0.7028, 0.0622, 2, 0.98, 0.625, 441, 2, 0, 0, 0, 0, 0, 11], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for value in lst:\n if first:\n first = False\n else:\n buf = separator\n if isinstance(value, basestring):\n yield buf + _encoder(value)\n elif value is None:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12", "label": "if", "type": "if", "loc": [293, 296], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8", "vector": [4, 3, 0.6786, 0.0092, 3, 0.56, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if first:\n first = False\n else:\n buf = separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L294_C16", "label": "first =", "type": "assigned_variable", "loc": [294, 294], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12", "vector": [14, 4, 0.6774, 0.0023, 4, 0.91, 0.0, 199, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "first", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " first = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L296_C16", "label": "buf =", "type": "assigned_variable", "loc": [296, 296], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12", "vector": [14, 4, 0.682, 0.0023, 4, 0.91, 1.0, 840, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "buf", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " buf = separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12", "label": "if", "type": "if", "loc": [297, 318], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8", "vector": [4, 3, 0.7085, 0.0507, 3, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, basestring):\n yield buf + _encoder(value)\n elif value is None:\n yield buf + 'null'\n elif value is True:\n yield buf + 'true'\n elif value is False:\n yield buf + 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L298_C16", "label": "expression", "type": "expression", "loc": [298, 298], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12", "vector": [8, 4, 0.6866, 0.0023, 4, 0.19, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + _encoder(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12", "label": "if", "type": "if", "loc": [299, 318], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12", "vector": [4, 4, 0.7108, 0.0461, 4, 0.19, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is None:\n yield buf + 'null'\n elif value is True:\n yield buf + 'true'\n elif value is False:\n yield buf + 'false'\n elif isinstance(value, (int, long)):\n yield buf + str(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L300_C16", "label": "expression", "type": "expression", "loc": [300, 300], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12", "vector": [8, 5, 0.6912, 0.0023, 5, 0.72, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12", "label": "if", "type": "if", "loc": [301, 318], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12", "vector": [4, 5, 0.7131, 0.0415, 5, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is True:\n yield buf + 'true'\n elif value is False:\n yield buf + 'false'\n elif isinstance(value, (int, long)):\n yield buf + str(value)\n elif isinstance(value, float):\n yield buf + _floatstr(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L302_C16", "label": "expression", "type": "expression", "loc": [302, 302], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12", "vector": [8, 6, 0.6959, 0.0023, 6, 0.15, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + 'true'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12", "label": "if", "type": "if", "loc": [303, 318], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12", "vector": [4, 6, 0.7154, 0.0369, 6, 0.15, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is False:\n yield buf + 'false'\n elif isinstance(value, (int, long)):\n yield buf + str(value)\n elif isinstance(value, float):\n yield buf + _floatstr(value)\n else:\n yield buf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L304_C16", "label": "expression", "type": "expression", "loc": [304, 304], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12", "vector": [8, 7, 0.7005, 0.0023, 7, 0.49, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12", "label": "if", "type": "if", "loc": [305, 318], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12", "vector": [4, 7, 0.7177, 0.0323, 7, 0.49, 1.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, (int, long)):\n yield buf + str(value)\n elif isinstance(value, float):\n yield buf + _floatstr(value)\n else:\n yield buf\n if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L306_C16", "label": "expression", "type": "expression", "loc": [306, 306], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12", "vector": [8, 8, 0.7051, 0.0023, 8, 0.54, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + str(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "label": "if", "type": "if", "loc": [307, 318], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12", "vector": [4, 8, 0.72, 0.0276, 8, 0.54, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, float):\n yield buf + _floatstr(value)\n else:\n yield buf\n if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)\n elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L308_C16", "label": "expression", "type": "expression", "loc": [308, 308], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "vector": [8, 9, 0.7097, 0.0023, 9, 0.75, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf + _floatstr(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L310_C16", "label": "expression", "type": "expression", "loc": [310, 310], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "vector": [8, 9, 0.7143, 0.0023, 9, 0.75, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield buf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16", "label": "if", "type": "if", "loc": [311, 316], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "vector": [4, 9, 0.7224, 0.0138, 9, 0.75, 0.6667, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)\n elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)\n else:\n chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L312_C20", "label": "chunks = _iterencode_list()", "type": "assigned_variable", "loc": [312, 312], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16", "vector": [14, 10, 0.7189, 0.0023, 10, 0.99, 0.0, 284, 3, 2, 0, 0, 1, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode_list", "annotation": ""}, "snippet": " chunks = _iterencode_list(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16", "label": "if", "type": "if", "loc": [313, 316], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16", "vector": [4, 10, 0.7247, 0.0092, 10, 0.99, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)\n else:\n chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L314_C20", "label": "chunks = _iterencode_dict()", "type": "assigned_variable", "loc": [314, 314], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16", "vector": [14, 11, 0.7235, 0.0023, 11, 0.35, 0.0, 284, 3, 2, 0, 0, 301, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode_dict", "annotation": ""}, "snippet": " chunks = _iterencode_dict(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L316_C20", "label": "chunks = _iterencode()", "type": "assigned_variable", "loc": [316, 316], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16", "vector": [14, 11, 0.7281, 0.0023, 11, 0.35, 1.0, 284, 3, 2, 0, 0, 136, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode", "annotation": ""}, "snippet": " chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L317_C16", "label": "for chunk", "type": "for", "loc": [317, 318], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "vector": [6, 9, 0.7316, 0.0046, 9, 0.75, 1.0, 637, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in chunks:\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L318_C20", "label": "expression", "type": "expression", "loc": [318, 318], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L317_C16", "vector": [8, 10, 0.7327, 0.0023, 10, 0.13, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L319_C8", "label": "if", "type": "if", "loc": [319, 321], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [4, 2, 0.7373, 0.0069, 2, 0.98, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if newline_indent is not None:\n _current_indent_level -= 1\n yield '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L321_C12", "label": "expression", "type": "expression", "loc": [321, 321], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L319_C8", "vector": [8, 3, 0.7396, 0.0023, 3, 0.67, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L322_C8", "label": "expression", "type": "expression", "loc": [322, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [8, 2, 0.7419, 0.0023, 2, 0.98, 0.875, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield ']'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L323_C8", "label": "if", "type": "if", "loc": [323, 324], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "vector": [4, 2, 0.7454, 0.0046, 2, 0.98, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n del markers[markerid]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "label": "_iterencode_dict", "type": "function", "loc": [326, 401], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "vector": [2, 1, 0.8376, 0.1751, 1, 0.17, 0.3333, 301, 0, 2, 0, 0, 0, 0, 23], "semantic": {"name": "_iterencode_dict", "arg_names": ["dct", "_current_indent_level"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _iterencode_dict(dct, _current_indent_level):\n if not dct:\n yield '{}'\n return\n if markers is not None:\n markerid = id(dct)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8", "label": "if", "type": "if", "loc": [327, 329], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.7558, 0.0069, 2, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not dct:\n yield '{}'\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L328_C12", "label": "expression", "type": "expression", "loc": [328, 328], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8", "vector": [8, 3, 0.7558, 0.0023, 3, 0.29, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '{}'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L329_C12", "label": "return", "type": "return", "loc": [329, 329], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8", "vector": [13, 3, 0.7581, 0.0023, 3, 0.29, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "label": "if", "type": "if", "loc": [330, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.765, 0.0115, 2, 0.35, 0.1111, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n markerid = id(dct)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid] = dct"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L331_C12", "label": "markerid = id()", "type": "assigned_variable", "loc": [331, 331], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "vector": [14, 3, 0.7627, 0.0023, 3, 0.83, 0.0, 105, 3, 1, 0, 0, 941, 10, 1], "semantic": {"name": "markerid", "arg_names": [], "import_names": [], "rhs_call_name": "id", "annotation": ""}, "snippet": " markerid = id(dct)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L332_C12", "label": "if", "type": "if", "loc": [332, 333], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "vector": [4, 3, 0.7661, 0.0046, 3, 0.83, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L334_C12", "label": "assign", "type": "assigned_variable", "loc": [334, 334], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "vector": [14, 3, 0.7696, 0.0023, 3, 0.83, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " markers[markerid] = dct"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L335_C8", "label": "expression", "type": "expression", "loc": [335, 335], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [8, 2, 0.7719, 0.0023, 2, 0.35, 0.2222, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '{'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "label": "if", "type": "if", "loc": [336, 343], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.7823, 0.0184, 2, 0.35, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _indent is not None:\n _current_indent_level += 1\n newline_indent = '\\n' + (' ' * (_indent * _current_indent_level))\n item_separator = _item_separator + newline_indent\n yield newline_indent\n else:\n newline_indent = None\n item_separator = _item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L338_C12", "label": "newline_indent =", "type": "assigned_variable", "loc": [338, 338], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "vector": [14, 3, 0.7788, 0.0023, 3, 0.97, 0.0, 810, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "newline_indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newline_indent = '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L339_C12", "label": "item_separator =", "type": "assigned_variable", "loc": [339, 339], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "vector": [14, 3, 0.7811, 0.0023, 3, 0.97, 0.25, 330, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "item_separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " item_separator = _item_separator + newline_indent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L340_C12", "label": "expression", "type": "expression", "loc": [340, 340], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "vector": [8, 3, 0.7834, 0.0023, 3, 0.97, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield newline_indent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L342_C12", "label": "newline_indent =", "type": "assigned_variable", "loc": [342, 342], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "vector": [14, 3, 0.788, 0.0023, 3, 0.97, 0.75, 810, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "newline_indent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " newline_indent = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L343_C12", "label": "item_separator =", "type": "assigned_variable", "loc": [343, 343], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "vector": [14, 3, 0.7903, 0.0023, 3, 0.97, 1.0, 330, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "item_separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " item_separator = _item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L344_C8", "label": "first =", "type": "assigned_variable", "loc": [344, 344], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [14, 2, 0.7926, 0.0023, 2, 0.35, 0.4444, 199, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "first", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " first = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "label": "if", "type": "if", "loc": [345, 349], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.7995, 0.0115, 2, 0.35, 0.5556, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if _sort_keys:\n items = dct.items()\n items.sort(key=lambda kv: kv[0])\n else:\n items = dct.iteritems()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L346_C12", "label": "items = items()", "type": "assigned_variable", "loc": [346, 346], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "vector": [14, 3, 0.7972, 0.0023, 3, 0.39, 0.0, 339, 3, 0, 0, 0, 339, 10, 1], "semantic": {"name": "items", "arg_names": [], "import_names": [], "rhs_call_name": "items", "annotation": ""}, "snippet": " items = dct.items()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L347_C12", "label": "sort()", "type": "expression", "loc": [347, 347], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "vector": [8, 3, 0.7995, 0.0023, 3, 0.39, 0.5, 489, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sort", "arg_names": [], "import_names": [], "rhs_call_name": "sort", "annotation": ""}, "snippet": " items.sort(key=lambda kv: kv[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L349_C12", "label": "items = iteritems()", "type": "assigned_variable", "loc": [349, 349], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "vector": [14, 3, 0.8041, 0.0023, 3, 0.39, 1.0, 339, 3, 0, 0, 0, 252, 10, 1], "semantic": {"name": "items", "arg_names": [], "import_names": [], "rhs_call_name": "iteritems", "annotation": ""}, "snippet": " items = dct.iteritems()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "label": "for key, value", "type": "for", "loc": [350, 395], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [6, 2, 0.8583, 0.106, 2, 0.35, 0.6667, 839, 2, 0, 0, 0, 0, 0, 18], "semantic": {"name": "key, value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, value in items:\n if isinstance(key, basestring):\n pass\n # JavaScript is weakly typed for these, so it makes sense to\n # also allow them. Many encoders seem to do something like this.\n elif isinstance(key, float):\n key = _floatstr(key)\n elif isinstance(key, (int, long)):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L351_C12", "label": "if", "type": "if", "loc": [351, 368], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "vector": [4, 3, 0.8283, 0.0415, 3, 0.71, 0.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(key, basestring):\n pass\n # JavaScript is weakly typed for these, so it makes sense to\n # also allow them. Many encoders seem to do something like this.\n elif isinstance(key, float):\n key = _floatstr(key)\n elif isinstance(key, (int, long)):\n key = str(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12", "label": "if", "type": "if", "loc": [355, 368], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L351_C12", "vector": [4, 4, 0.8329, 0.0323, 4, 0.05, 0.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(key, float):\n key = _floatstr(key)\n elif isinstance(key, (int, long)):\n key = str(key)\n elif key is True:\n key = 'true'\n elif key is False:\n key = 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L356_C16", "label": "key = _floatstr()", "type": "assigned_variable", "loc": [356, 356], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12", "vector": [14, 5, 0.8203, 0.0023, 5, 0.13, 0.0, 230, 3, 1, 0, 0, 185, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "_floatstr", "annotation": ""}, "snippet": " key = _floatstr(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12", "label": "if", "type": "if", "loc": [357, 368], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12", "vector": [4, 5, 0.8353, 0.0276, 5, 0.13, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(key, (int, long)):\n key = str(key)\n elif key is True:\n key = 'true'\n elif key is False:\n key = 'false'\n elif key is None:\n key = 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L358_C16", "label": "key = str()", "type": "assigned_variable", "loc": [358, 358], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12", "vector": [14, 6, 0.8249, 0.0023, 6, 0.37, 0.0, 230, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " key = str(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12", "label": "if", "type": "if", "loc": [359, 368], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12", "vector": [4, 6, 0.8376, 0.023, 6, 0.37, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key is True:\n key = 'true'\n elif key is False:\n key = 'false'\n elif key is None:\n key = 'null'\n elif _skipkeys:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L360_C16", "label": "key =", "type": "assigned_variable", "loc": [360, 360], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12", "vector": [14, 7, 0.8295, 0.0023, 7, 0.04, 0.0, 230, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = 'true'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12", "label": "if", "type": "if", "loc": [361, 368], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12", "vector": [4, 7, 0.8399, 0.0184, 7, 0.04, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key is False:\n key = 'false'\n elif key is None:\n key = 'null'\n elif _skipkeys:\n continue\n else:\n raise TypeError(\"key %r is not a string\" % (key,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L362_C16", "label": "key =", "type": "assigned_variable", "loc": [362, 362], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12", "vector": [14, 8, 0.8341, 0.0023, 8, 0.76, 0.0, 230, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12", "label": "if", "type": "if", "loc": [363, 368], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12", "vector": [4, 8, 0.8422, 0.0138, 8, 0.76, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key is None:\n key = 'null'\n elif _skipkeys:\n continue\n else:\n raise TypeError(\"key %r is not a string\" % (key,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L364_C16", "label": "key =", "type": "assigned_variable", "loc": [364, 364], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12", "vector": [14, 9, 0.8387, 0.0023, 9, 0.8, 0.0, 230, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L365_C12", "label": "if", "type": "if", "loc": [365, 368], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12", "vector": [4, 9, 0.8445, 0.0092, 9, 0.8, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif _skipkeys:\n continue\n else:\n raise TypeError(\"key %r is not a string\" % (key,))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12", "label": "if", "type": "if", "loc": [369, 372], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "vector": [4, 3, 0.8537, 0.0092, 3, 0.71, 0.25, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if first:\n first = False\n else:\n yield item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L370_C16", "label": "first =", "type": "assigned_variable", "loc": [370, 370], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12", "vector": [14, 4, 0.8525, 0.0023, 4, 0.18, 0.0, 199, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "first", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " first = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L372_C16", "label": "expression", "type": "expression", "loc": [372, 372], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12", "vector": [8, 4, 0.8571, 0.0023, 4, 0.18, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield item_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L373_C12", "label": "expression", "type": "expression", "loc": [373, 373], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "vector": [8, 3, 0.8594, 0.0023, 3, 0.71, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _encoder(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L374_C12", "label": "expression", "type": "expression", "loc": [374, 374], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "vector": [8, 3, 0.8618, 0.0023, 3, 0.71, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _key_separator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12", "label": "if", "type": "if", "loc": [375, 395], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "vector": [4, 3, 0.8871, 0.0484, 3, 0.71, 1.0, 0, 3, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, basestring):\n yield _encoder(value)\n elif value is None:\n yield 'null'\n elif value is True:\n yield 'true'\n elif value is False:\n yield 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L376_C16", "label": "expression", "type": "expression", "loc": [376, 376], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12", "vector": [8, 4, 0.8664, 0.0023, 4, 0.04, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _encoder(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12", "label": "if", "type": "if", "loc": [377, 395], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12", "vector": [4, 4, 0.8894, 0.0438, 4, 0.04, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is None:\n yield 'null'\n elif value is True:\n yield 'true'\n elif value is False:\n yield 'false'\n elif isinstance(value, (int, long)):\n yield str(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L378_C16", "label": "expression", "type": "expression", "loc": [378, 378], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12", "vector": [8, 5, 0.871, 0.0023, 5, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12", "label": "if", "type": "if", "loc": [379, 395], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12", "vector": [4, 5, 0.8917, 0.0392, 5, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is True:\n yield 'true'\n elif value is False:\n yield 'false'\n elif isinstance(value, (int, long)):\n yield str(value)\n elif isinstance(value, float):\n yield _floatstr(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L380_C16", "label": "expression", "type": "expression", "loc": [380, 380], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12", "vector": [8, 6, 0.8756, 0.0023, 6, 0.09, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'true'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12", "label": "if", "type": "if", "loc": [381, 395], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12", "vector": [4, 6, 0.894, 0.0346, 6, 0.09, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value is False:\n yield 'false'\n elif isinstance(value, (int, long)):\n yield str(value)\n elif isinstance(value, float):\n yield _floatstr(value)\n else:\n if isinstance(value, (list, tuple)):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L382_C16", "label": "expression", "type": "expression", "loc": [382, 382], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12", "vector": [8, 7, 0.8802, 0.0023, 7, 0.77, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12", "label": "if", "type": "if", "loc": [383, 395], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12", "vector": [4, 7, 0.8963, 0.03, 7, 0.77, 1.0, 0, 3, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, (int, long)):\n yield str(value)\n elif isinstance(value, float):\n yield _floatstr(value)\n else:\n if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)\n elif isinstance(value, dict):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L384_C16", "label": "expression", "type": "expression", "loc": [384, 384], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12", "vector": [8, 8, 0.8848, 0.0023, 8, 0.25, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield str(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "label": "if", "type": "if", "loc": [385, 395], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12", "vector": [4, 8, 0.8986, 0.0253, 8, 0.25, 1.0, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, float):\n yield _floatstr(value)\n else:\n if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)\n elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L386_C16", "label": "expression", "type": "expression", "loc": [386, 386], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "vector": [8, 9, 0.8894, 0.0023, 9, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _floatstr(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16", "label": "if", "type": "if", "loc": [388, 393], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "vector": [4, 9, 0.8998, 0.0138, 9, 0.43, 0.5, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(value, (list, tuple)):\n chunks = _iterencode_list(value, _current_indent_level)\n elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)\n else:\n chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L389_C20", "label": "chunks = _iterencode_list()", "type": "assigned_variable", "loc": [389, 389], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16", "vector": [14, 10, 0.8963, 0.0023, 10, 0.04, 0.0, 284, 3, 2, 0, 0, 1, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode_list", "annotation": ""}, "snippet": " chunks = _iterencode_list(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16", "label": "if", "type": "if", "loc": [390, 393], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16", "vector": [4, 10, 0.9021, 0.0092, 10, 0.04, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(value, dict):\n chunks = _iterencode_dict(value, _current_indent_level)\n else:\n chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L391_C20", "label": "chunks = _iterencode_dict()", "type": "assigned_variable", "loc": [391, 391], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16", "vector": [14, 11, 0.9009, 0.0023, 11, 0.61, 0.0, 284, 3, 2, 0, 0, 301, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode_dict", "annotation": ""}, "snippet": " chunks = _iterencode_dict(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L393_C20", "label": "chunks = _iterencode()", "type": "assigned_variable", "loc": [393, 393], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16", "vector": [14, 11, 0.9055, 0.0023, 11, 0.61, 1.0, 284, 3, 2, 0, 0, 136, 10, 1], "semantic": {"name": "chunks", "arg_names": [], "import_names": [], "rhs_call_name": "_iterencode", "annotation": ""}, "snippet": " chunks = _iterencode(value, _current_indent_level)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L394_C16", "label": "for chunk", "type": "for", "loc": [394, 395], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "vector": [6, 9, 0.909, 0.0046, 9, 0.43, 1.0, 637, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in chunks:\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L395_C20", "label": "expression", "type": "expression", "loc": [395, 395], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L394_C16", "vector": [8, 10, 0.9101, 0.0023, 10, 0.44, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L396_C8", "label": "if", "type": "if", "loc": [396, 398], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.9147, 0.0069, 2, 0.35, 0.7778, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if newline_indent is not None:\n _current_indent_level -= 1\n yield '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L398_C12", "label": "expression", "type": "expression", "loc": [398, 398], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L396_C8", "vector": [8, 3, 0.9171, 0.0023, 3, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '\\n' + (' ' * (_indent * _current_indent_level))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L399_C8", "label": "expression", "type": "expression", "loc": [399, 399], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [8, 2, 0.9194, 0.0023, 2, 0.35, 0.8889, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield '}'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L400_C8", "label": "if", "type": "if", "loc": [400, 401], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "vector": [4, 2, 0.9228, 0.0046, 2, 0.35, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n del markers[markerid]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L403_C4", "label": "_iterencode", "type": "function", "loc": [403, 432], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "vector": [2, 1, 0.962, 0.0691, 1, 0.17, 0.6667, 136, 0, 2, 0, 0, 0, 0, 14], "semantic": {"name": "_iterencode", "arg_names": ["o", "_current_indent_level"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _iterencode(o, _current_indent_level):\n if isinstance(o, basestring):\n yield _encoder(o)\n elif o is None:\n yield 'null'\n elif o is True:\n yield 'true'\n elif o is False:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8", "label": "if", "type": "if", "loc": [404, 432], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L403_C4", "vector": [4, 2, 0.9631, 0.0668, 2, 0.39, 0.0, 0, 3, 0, 0, 0, 0, 0, 14], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if isinstance(o, basestring):\n yield _encoder(o)\n elif o is None:\n yield 'null'\n elif o is True:\n yield 'true'\n elif o is False:\n yield 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L405_C12", "label": "expression", "type": "expression", "loc": [405, 405], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8", "vector": [8, 3, 0.9332, 0.0023, 3, 0.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _encoder(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8", "label": "if", "type": "if", "loc": [406, 432], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8", "vector": [4, 3, 0.9654, 0.0622, 3, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif o is None:\n yield 'null'\n elif o is True:\n yield 'true'\n elif o is False:\n yield 'false'\n elif isinstance(o, (int, long)):\n yield str(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L407_C12", "label": "expression", "type": "expression", "loc": [407, 407], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8", "vector": [8, 4, 0.9378, 0.0023, 4, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'null'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8", "label": "if", "type": "if", "loc": [408, 432], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8", "vector": [4, 4, 0.9677, 0.0576, 4, 0.47, 1.0, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif o is True:\n yield 'true'\n elif o is False:\n yield 'false'\n elif isinstance(o, (int, long)):\n yield str(o)\n elif isinstance(o, float):\n yield _floatstr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L409_C12", "label": "expression", "type": "expression", "loc": [409, 409], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8", "vector": [8, 5, 0.9424, 0.0023, 5, 0.88, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'true'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8", "label": "if", "type": "if", "loc": [410, 432], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8", "vector": [4, 5, 0.97, 0.053, 5, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif o is False:\n yield 'false'\n elif isinstance(o, (int, long)):\n yield str(o)\n elif isinstance(o, float):\n yield _floatstr(o)\n elif isinstance(o, (list, tuple)):\n for chunk in _iterencode_list(o, _current_indent_level):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L411_C12", "label": "expression", "type": "expression", "loc": [411, 411], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8", "vector": [8, 6, 0.947, 0.0023, 6, 0.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield 'false'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8", "label": "if", "type": "if", "loc": [412, 432], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8", "vector": [4, 6, 0.9724, 0.0484, 6, 0.3, 1.0, 0, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(o, (int, long)):\n yield str(o)\n elif isinstance(o, float):\n yield _floatstr(o)\n elif isinstance(o, (list, tuple)):\n for chunk in _iterencode_list(o, _current_indent_level):\n yield chunk\n elif isinstance(o, dict):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L413_C12", "label": "expression", "type": "expression", "loc": [413, 413], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8", "vector": [8, 7, 0.9516, 0.0023, 7, 0.16, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield str(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8", "label": "if", "type": "if", "loc": [414, 432], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8", "vector": [4, 7, 0.9747, 0.0438, 7, 0.16, 1.0, 0, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(o, float):\n yield _floatstr(o)\n elif isinstance(o, (list, tuple)):\n for chunk in _iterencode_list(o, _current_indent_level):\n yield chunk\n elif isinstance(o, dict):\n for chunk in _iterencode_dict(o, _current_indent_level):\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L415_C12", "label": "expression", "type": "expression", "loc": [415, 415], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8", "vector": [8, 8, 0.9562, 0.0023, 8, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield _floatstr(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8", "label": "if", "type": "if", "loc": [416, 432], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8", "vector": [4, 8, 0.977, 0.0392, 8, 0.06, 1.0, 0, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(o, (list, tuple)):\n for chunk in _iterencode_list(o, _current_indent_level):\n yield chunk\n elif isinstance(o, dict):\n for chunk in _iterencode_dict(o, _current_indent_level):\n yield chunk\n else:\n if markers is not None:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L417_C12", "label": "for chunk", "type": "for", "loc": [417, 418], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8", "vector": [6, 9, 0.962, 0.0046, 9, 0.59, 0.0, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in _iterencode_list(o, _current_indent_level):\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L418_C16", "label": "expression", "type": "expression", "loc": [418, 418], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L417_C12", "vector": [8, 10, 0.9631, 0.0023, 10, 0.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "label": "if", "type": "if", "loc": [419, 432], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8", "vector": [4, 9, 0.9804, 0.0323, 9, 0.59, 1.0, 0, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif isinstance(o, dict):\n for chunk in _iterencode_dict(o, _current_indent_level):\n yield chunk\n else:\n if markers is not None:\n markerid = id(o)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L420_C12", "label": "for chunk", "type": "for", "loc": [420, 421], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "vector": [6, 10, 0.9689, 0.0046, 10, 0.45, 0.0, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in _iterencode_dict(o, _current_indent_level):\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L421_C16", "label": "expression", "type": "expression", "loc": [421, 421], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L420_C12", "vector": [8, 11, 0.97, 0.0023, 11, 0.97, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "label": "if", "type": "if", "loc": [423, 427], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "vector": [4, 10, 0.9793, 0.0115, 10, 0.45, 0.25, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n markerid = id(o)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid] = o"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L424_C16", "label": "markerid = id()", "type": "assigned_variable", "loc": [424, 424], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "vector": [14, 11, 0.977, 0.0023, 11, 0.62, 0.0, 105, 3, 1, 0, 0, 941, 10, 1], "semantic": {"name": "markerid", "arg_names": [], "import_names": [], "rhs_call_name": "id", "annotation": ""}, "snippet": " markerid = id(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L425_C16", "label": "if", "type": "if", "loc": [425, 426], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "vector": [4, 11, 0.9804, 0.0046, 11, 0.62, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markerid in markers:\n raise ValueError(\"Circular reference detected\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L427_C16", "label": "assign", "type": "assigned_variable", "loc": [427, 427], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "vector": [14, 11, 0.9839, 0.0023, 11, 0.62, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " markers[markerid] = o"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L428_C12", "label": "o = _default()", "type": "assigned_variable", "loc": [428, 428], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "vector": [14, 10, 0.9862, 0.0023, 10, 0.45, 0.5, 926, 3, 1, 0, 0, 99, 10, 1], "semantic": {"name": "o", "arg_names": [], "import_names": [], "rhs_call_name": "_default", "annotation": ""}, "snippet": " o = _default(o)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:For_L429_C12", "label": "for chunk", "type": "for", "loc": [429, 430], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "vector": [6, 10, 0.9896, 0.0046, 10, 0.45, 0.75, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in _iterencode(o, _current_indent_level):\n yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L430_C16", "label": "expression", "type": "expression", "loc": [430, 430], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:For_L429_C12", "vector": [8, 11, 0.9908, 0.0023, 11, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " yield chunk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:If_L431_C12", "label": "if", "type": "if", "loc": [431, 432], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "vector": [4, 10, 0.9942, 0.0046, 10, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if markers is not None:\n del markers[markerid]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L434_C4", "label": "return", "type": "return", "loc": [434, 434], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "vector": [13, 1, 1.0, 0.0023, 1, 0.17, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _iterencode"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:ImportFrom_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:ImportFrom_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L51_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L53_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:Try_L50_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L55_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L59_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L60_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L61_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L42_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L150_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L151_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L153_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L156_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L186_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L185_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L187_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L187_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L189_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L184_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L191_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L190_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L193_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L198_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L199_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L203_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L213_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L212_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L215_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L217_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L216_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L220_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L220_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L222_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L222_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L223_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L221_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L224_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L231_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L230_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L233_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L232_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L235_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L234_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L237_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L239_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L226_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L247_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L252_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L202_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L275_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L274_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L276_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L278_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L279_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L277_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L281_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L285_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L286_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L289_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L283_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L290_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L294_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L293_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L296_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L292_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L298_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L297_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L300_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L299_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L302_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L301_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L304_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L303_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L306_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L305_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L308_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L310_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L312_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L311_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L314_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L313_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L316_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L307_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L317_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L317_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L318_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L319_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L321_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L273_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L328_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L327_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L329_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L331_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L332_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L330_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L334_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L335_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L338_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L339_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L340_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L342_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L336_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L343_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L344_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L346_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L347_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L345_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L349_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L351_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L351_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L356_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L355_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L358_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L357_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L360_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L359_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L362_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L361_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L364_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L363_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L365_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L370_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L369_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L372_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L373_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L374_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L350_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L376_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L375_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L378_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L377_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L380_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L379_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L382_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L381_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L384_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L383_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L386_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L389_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L388_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L391_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L390_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L393_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L385_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L394_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L394_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L395_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L396_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L396_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L398_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L326_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L400_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L403_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L403_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L405_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L404_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L407_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L406_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L409_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L408_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L411_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L410_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L413_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L412_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L415_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L414_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L417_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L417_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L418_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L416_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L420_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L420_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L421_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L424_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L425_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L423_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L427_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Assign_L428_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:For_L429_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:For_L429_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Expr_L430_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:If_L419_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_278:If_L431_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_278:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_278:Return_L434_C4"}]
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of the :mod:`json` library contained in Python 2.6, but maintains compatibility with Python 2.4 and Python 2.5 and (currently) has significant performance advantages, even without using the optional C extension for speedups. Encoding basic Python object hierarchies:: >>> import simplejson as json >>> json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}]) '["foo", {"bar": ["baz", null, 1.0, 2]}]' >>> print json.dumps("\"foo\bar") "\"foo\bar" >>> print json.dumps(u'\u1234') "\u1234" >>> print json.dumps('\\') "\\" >>> print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True) {"a": 0, "b": 0, "c": 0} >>> from StringIO import StringIO >>> io = StringIO() >>> json.dump(['streaming API'], io) >>> io.getvalue() '["streaming API"]' Compact encoding:: >>> import simplejson as json >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':')) '[1,2,3,{"4":5,"6":7}]' Pretty printing:: >>> import simplejson as json >>> s = json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4) >>> print '\n'.join([l.rstrip() for l in s.splitlines()]) { "4": 5, "6": 7 } Decoding JSON:: >>> import simplejson as json >>> obj = [u'foo', {u'bar': [u'baz', None, 1.0, 2]}] >>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]') == obj True >>> json.loads('"\\"foo\\bar"') == u'"foo\x08ar' True >>> from StringIO import StringIO >>> io = StringIO('["streaming API"]') >>> json.load(io)[0] == 'streaming API' True Specializing JSON object decoding:: >>> import simplejson as json >>> def as_complex(dct): ... if '__complex__' in dct: ... return complex(dct['real'], dct['imag']) ... return dct ... >>> json.loads('{"__complex__": true, "real": 1, "imag": 2}', ... object_hook=as_complex) (1+2j) >>> import decimal >>> json.loads('1.1', parse_float=decimal.Decimal) == decimal.Decimal('1.1') True Specializing JSON object encoding:: >>> import simplejson as json >>> def encode_complex(obj): ... if isinstance(obj, complex): ... return [obj.real, obj.imag] ... raise TypeError("%r is not JSON serializable" % (o,)) ... >>> json.dumps(2 + 1j, default=encode_complex) '[2.0, 1.0]' >>> json.JSONEncoder(default=encode_complex).encode(2 + 1j) '[2.0, 1.0]' >>> ''.join(json.JSONEncoder(default=encode_complex).iterencode(2 + 1j)) '[2.0, 1.0]' Using simplejson.tool from the shell to validate and pretty-print:: $ echo '{"json":"obj"}' | python -msimplejson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -msimplejson.tool Expecting property name: line 1 column 2 (char 2) """ __version__ = '2.0.7' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONEncoder', ] from decoder import JSONDecoder from encoder import JSONEncoder _default_encoder = JSONEncoder( skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separators=None, encoding='utf-8', default=None, ) def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, encoding='utf-8', default=None, **kw): """Serialize ``obj`` as a JSON formatted stream to ``fp`` (a ``.write()``-supporting file-like object). If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``) will be skipped instead of raising a ``TypeError``. If ``ensure_ascii`` is ``False``, then the some chunks written to ``fp`` may be ``unicode`` instances, subject to normal Python ``str`` to ``unicode`` coercion rules. Unless ``fp.write()`` explicitly understands ``unicode`` (as in ``codecs.getwriter()``) this is likely to cause an error. If ``check_circular`` is ``False``, then the circular reference check for container types will be skipped and a circular reference will result in an ``OverflowError`` (or worse). If ``allow_nan`` is ``False``, then it will be a ``ValueError`` to serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). If ``indent`` is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. ``None`` is the most compact representation. If ``separators`` is an ``(item_separator, dict_separator)`` tuple then it will be used instead of the default ``(', ', ': ')`` separators. ``(',', ':')`` is the most compact JSON representation. ``encoding`` is the character encoding for str instances, default is UTF-8. ``default(obj)`` is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError. To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the ``.default()`` method to serialize additional types), specify it with the ``cls`` kwarg. """ # cached encoder if (skipkeys is False and ensure_ascii is True and check_circular is True and allow_nan is True and cls is None and indent is None and separators is None and encoding == 'utf-8' and default is None and not kw): iterable = _default_encoder.iterencode(obj) else: if cls is None: cls = JSONEncoder iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, encoding=encoding, default=default, **kw).iterencode(obj) # could accelerate with writelines in some versions of Python, at # a debuggability cost for chunk in iterable: fp.write(chunk) def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, encoding='utf-8', default=None, **kw): """Serialize ``obj`` to a JSON formatted ``str``. If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``) will be skipped instead of raising a ``TypeError``. If ``ensure_ascii`` is ``False``, then the return value will be a ``unicode`` instance subject to normal Python ``str`` to ``unicode`` coercion rules instead of being escaped to an ASCII ``str``. If ``check_circular`` is ``False``, then the circular reference check for container types will be skipped and a circular reference will result in an ``OverflowError`` (or worse). If ``allow_nan`` is ``False``, then it will be a ``ValueError`` to serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). If ``indent`` is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. ``None`` is the most compact representation. If ``separators`` is an ``(item_separator, dict_separator)`` tuple then it will be used instead of the default ``(', ', ': ')`` separators. ``(',', ':')`` is the most compact JSON representation. ``encoding`` is the character encoding for str instances, default is UTF-8. ``default(obj)`` is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError. To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the ``.default()`` method to serialize additional types), specify it with the ``cls`` kwarg. """ # cached encoder if (skipkeys is False and ensure_ascii is True and check_circular is True and allow_nan is True and cls is None and indent is None and separators is None and encoding == 'utf-8' and default is None and not kw): return _default_encoder.encode(obj) if cls is None: cls = JSONEncoder return cls( skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, indent=indent, separators=separators, encoding=encoding, default=default, **kw).encode(obj) _default_decoder = JSONDecoder(encoding=None, object_hook=None) def load(fp, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, **kw): """Deserialize ``fp`` (a ``.read()``-supporting file-like object containing a JSON document) to a Python object. If the contents of ``fp`` is encoded with an ASCII based encoding other than utf-8 (e.g. latin-1), then an appropriate ``encoding`` name must be specified. Encodings that are not ASCII based (such as UCS-2) are not allowed, and should be wrapped with ``codecs.getreader(fp)(encoding)``, or simply decoded to a ``unicode`` object and passed to ``loads()`` ``object_hook`` is an optional function that will be called with the result of any object literal decode (a ``dict``). The return value of ``object_hook`` will be used instead of the ``dict``. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting). To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` kwarg. """ return loads(fp.read(), encoding=encoding, cls=cls, object_hook=object_hook, parse_float=parse_float, parse_int=parse_int, parse_constant=parse_constant, **kw) def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, **kw): """Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON document) to a Python object. If ``s`` is a ``str`` instance and is encoded with an ASCII based encoding other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name must be specified. Encodings that are not ASCII based (such as UCS-2) are not allowed and should be decoded to ``unicode`` first. ``object_hook`` is an optional function that will be called with the result of any object literal decode (a ``dict``). The return value of ``object_hook`` will be used instead of the ``dict``. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting). ``parse_float``, if specified, will be called with the string of every JSON float to be decoded. By default this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal). ``parse_int``, if specified, will be called with the string of every JSON int to be decoded. By default this is equivalent to int(num_str). This can be used to use another datatype or parser for JSON integers (e.g. float). ``parse_constant``, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN, null, true, false. This can be used to raise an exception if invalid JSON numbers are encountered. To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` kwarg. """ if (cls is None and encoding is None and object_hook is None and parse_int is None and parse_float is None and parse_constant is None and not kw): return _default_decoder.decode(s) if cls is None: cls = JSONDecoder if object_hook is not None: kw['object_hook'] = object_hook if parse_float is not None: kw['parse_float'] = parse_float if parse_int is not None: kw['parse_int'] = parse_int if parse_constant is not None: kw['parse_constant'] = parse_constant return cls(encoding=encoding, **kw).decode(s)
ajibawa-2023/Python-Code-Large/train/row_279
41
316
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 99], "level": 0, "parent": null, "vector": [8, 0, 0.1582, 0.3133, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "r\"\"\"JSON (JavaScript Object Notation) <http://json.org> is a subset of\nJavaScript syntax (ECMA-262 3rd edition) used as a lightweight data\ninterchange format.\n\n:mod:`simplejson` exposes an API familiar to users of the standard library\n:mod:`marshal` and :mod:`pickle` modules. It is the externally maintained\nversion of the :mod:`json` library contained in Python 2.6, but maintains\ncompatibility with Python 2.4 and Python 2.5 and (currently) has"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L100_C0", "label": "__version__ =", "type": "assigned_variable", "loc": [100, 100], "level": 0, "parent": null, "vector": [14, 0, 0.3165, 0.0032, 0, 0.66, 0.1, 162, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "__version__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__version__ = '2.0.7'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L101_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [101, 104], "level": 0, "parent": null, "vector": [14, 0, 0.3244, 0.0127, 0, 0.66, 0.2, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = [\n 'dump', 'dumps', 'load', 'loads',\n 'JSONDecoder', 'JSONEncoder',\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:ImportFrom_L106_C0", "label": "from decoder import JSONDecoder", "type": "import", "loc": [106, 106], "level": 0, "parent": null, "vector": [1, 0, 0.3354, 0.0032, 0, 0.66, 0.3, 404, 0, 1, 0, 0, 404, 0, 0], "semantic": {"name": "decoder", "arg_names": [], "import_names": ["JSONDecoder"], "rhs_call_name": "", "annotation": ""}, "snippet": "from decoder import JSONDecoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:ImportFrom_L107_C0", "label": "from encoder import JSONEncoder", "type": "import", "loc": [107, 107], "level": 0, "parent": null, "vector": [1, 0, 0.3386, 0.0032, 0, 0.66, 0.4, 672, 0, 1, 0, 0, 672, 0, 0], "semantic": {"name": "encoder", "arg_names": [], "import_names": ["JSONEncoder"], "rhs_call_name": "", "annotation": ""}, "snippet": "from encoder import JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L109_C0", "label": "_default_encoder = JSONEncoder()", "type": "assigned_variable", "loc": [109, 118], "level": 0, "parent": null, "vector": [14, 0, 0.3592, 0.0316, 0, 0.66, 0.5, 619, 3, 8, 0, 0, 228, 10, 1], "semantic": {"name": "_default_encoder", "arg_names": [], "import_names": [], "rhs_call_name": "JSONEncoder", "annotation": ""}, "snippet": "_default_encoder = JSONEncoder(\n skipkeys=False,\n ensure_ascii=True,\n check_circular=True,\n allow_nan=True,\n indent=None,\n separators=None,\n encoding='utf-8',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "label": "dump", "type": "function", "loc": [120, 179], "level": 0, "parent": null, "vector": [2, 0, 0.4731, 0.1899, 0, 0.66, 0.6, 952, 0, 12, 0, 0, 0, 0, 4], "semantic": {"name": "dump", "arg_names": ["obj", "fp", "skipkeys", "ensure_ascii", "check_circular", "allow_nan", "cls", "indent", "separators", "encoding", "default", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True,\n allow_nan=True, cls=None, indent=None, separators=None,\n encoding='utf-8', default=None, **kw):\n \"\"\"Serialize ``obj`` as a JSON formatted stream to ``fp`` (a\n ``.write()``-supporting file-like object).\n\n If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types\n (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L123_C4", "label": "expression", "type": "expression", "loc": [123, 162], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "vector": [8, 1, 0.4509, 0.1266, 1, 0.29, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Serialize ``obj`` as a JSON formatted stream to ``fp`` (a\n ``.write()``-supporting file-like object).\n\n If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types\n (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)\n will be skipped instead of raising a ``TypeError``.\n\n If ``ensure_ascii`` is ``False``, then the some chunks written to ``fp``"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "label": "if", "type": "if", "loc": [164, 175], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "vector": [4, 1, 0.5364, 0.038, 1, 0.29, 0.5, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (skipkeys is False and ensure_ascii is True and\n check_circular is True and allow_nan is True and\n cls is None and indent is None and separators is None and\n encoding == 'utf-8' and default is None and not kw):\n iterable = _default_encoder.iterencode(obj)\n else:\n if cls is None:\n cls = JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L168_C8", "label": "iterable = iterencode()", "type": "assigned_variable", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "vector": [14, 2, 0.5316, 0.0032, 2, 0.76, 0.0, 444, 3, 1, 0, 0, 315, 10, 1], "semantic": {"name": "iterable", "arg_names": [], "import_names": [], "rhs_call_name": "iterencode", "annotation": ""}, "snippet": " iterable = _default_encoder.iterencode(obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L170_C8", "label": "if", "type": "if", "loc": [170, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "vector": [4, 2, 0.5396, 0.0063, 2, 0.76, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cls is None:\n cls = JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L171_C12", "label": "cls =", "type": "assigned_variable", "loc": [171, 171], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L170_C8", "vector": [14, 3, 0.5411, 0.0032, 3, 0.92, 0.0, 594, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cls = JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L172_C8", "label": "iterable = iterencode()", "type": "assigned_variable", "loc": [172, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "vector": [14, 2, 0.5491, 0.0127, 2, 0.76, 1.0, 444, 3, 1, 0, 0, 315, 10, 2], "semantic": {"name": "iterable", "arg_names": [], "import_names": [], "rhs_call_name": "iterencode", "annotation": ""}, "snippet": " iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,\n check_circular=check_circular, allow_nan=allow_nan, indent=indent,\n separators=separators, encoding=encoding,\n default=default, **kw).iterencode(obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:For_L178_C4", "label": "for chunk", "type": "for", "loc": [178, 179], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "vector": [6, 1, 0.5649, 0.0063, 1, 0.29, 1.0, 637, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "chunk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for chunk in iterable:\n fp.write(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L179_C8", "label": "write()", "type": "expression", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:For_L178_C4", "vector": [8, 2, 0.5665, 0.0032, 2, 0.4, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " fp.write(chunk)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "label": "dumps", "type": "function", "loc": [182, 235], "level": 0, "parent": null, "vector": [2, 0, 0.6598, 0.1709, 0, 0.66, 0.7, 160, 0, 11, 1, 0, 0, 0, 3], "semantic": {"name": "dumps", "arg_names": ["obj", "skipkeys", "ensure_ascii", "check_circular", "allow_nan", "cls", "indent", "separators", "encoding", "default", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True,\n allow_nan=True, cls=None, indent=None, separators=None,\n encoding='utf-8', default=None, **kw):\n \"\"\"Serialize ``obj`` to a JSON formatted ``str``.\n\n If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types\n (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)\n will be skipped instead of raising a ``TypeError``."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L185_C4", "label": "expression", "type": "expression", "loc": [185, 222], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "vector": [8, 1, 0.644, 0.1203, 1, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Serialize ``obj`` to a JSON formatted ``str``.\n\n If ``skipkeys`` is ``True`` then ``dict`` keys that are not basic types\n (``str``, ``unicode``, ``int``, ``long``, ``float``, ``bool``, ``None``)\n will be skipped instead of raising a ``TypeError``.\n\n If ``ensure_ascii`` is ``False``, then the return value will be a\n ``unicode`` instance subject to normal Python ``str`` to ``unicode``"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L224_C4", "label": "if", "type": "if", "loc": [224, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "vector": [4, 1, 0.7152, 0.0158, 1, 0.56, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (skipkeys is False and ensure_ascii is True and\n check_circular is True and allow_nan is True and\n cls is None and indent is None and separators is None and\n encoding == 'utf-8' and default is None and not kw):\n return _default_encoder.encode(obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L228_C8", "label": "return", "type": "return", "loc": [228, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L224_C4", "vector": [13, 2, 0.7215, 0.0032, 2, 0.82, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _default_encoder.encode(obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L229_C4", "label": "if", "type": "if", "loc": [229, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "vector": [4, 1, 0.7263, 0.0063, 1, 0.56, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cls is None:\n cls = JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L230_C8", "label": "cls =", "type": "assigned_variable", "loc": [230, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L229_C4", "vector": [14, 2, 0.7278, 0.0032, 2, 0.79, 0.0, 594, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cls = JSONEncoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L231_C4", "label": "return", "type": "return", "loc": [231, 235], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "vector": [13, 1, 0.7373, 0.0158, 1, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cls(\n skipkeys=skipkeys, ensure_ascii=ensure_ascii,\n check_circular=check_circular, allow_nan=allow_nan, indent=indent,\n separators=separators, encoding=encoding, default=default,\n **kw).encode(obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L238_C0", "label": "_default_decoder = JSONDecoder()", "type": "assigned_variable", "loc": [238, 238], "level": 0, "parent": null, "vector": [14, 0, 0.7532, 0.0032, 0, 0.66, 0.8, 340, 3, 2, 0, 0, 611, 10, 1], "semantic": {"name": "_default_decoder", "arg_names": [], "import_names": [], "rhs_call_name": "JSONDecoder", "annotation": ""}, "snippet": "_default_decoder = JSONDecoder(encoding=None, object_hook=None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L241_C0", "label": "load", "type": "function", "loc": [241, 265], "level": 0, "parent": null, "vector": [2, 0, 0.8006, 0.0791, 0, 0.66, 0.9, 37, 0, 8, 1, 0, 0, 0, 2], "semantic": {"name": "load", "arg_names": ["fp", "encoding", "cls", "object_hook", "parse_float", "parse_int", "parse_constant", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def load(fp, encoding=None, cls=None, object_hook=None, parse_float=None,\n parse_int=None, parse_constant=None, **kw):\n \"\"\"Deserialize ``fp`` (a ``.read()``-supporting file-like object containing\n a JSON document) to a Python object.\n\n If the contents of ``fp`` is encoded with an ASCII based encoding other\n than utf-8 (e.g. latin-1), then an appropriate ``encoding`` name must\n be specified. Encodings that are not ASCII based (such as UCS-2) are"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L243_C4", "label": "expression", "type": "expression", "loc": [243, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L241_C0", "vector": [8, 1, 0.7975, 0.0601, 1, 0.64, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Deserialize ``fp`` (a ``.read()``-supporting file-like object containing\n a JSON document) to a Python object.\n\n If the contents of ``fp`` is encoded with an ASCII based encoding other\n than utf-8 (e.g. latin-1), then an appropriate ``encoding`` name must\n be specified. Encodings that are not ASCII based (such as UCS-2) are\n not allowed, and should be wrapped with\n ``codecs.getreader(fp)(encoding)``, or simply decoded to a ``unicode``"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L262_C4", "label": "return", "type": "return", "loc": [262, 265], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L241_C0", "vector": [13, 1, 0.8339, 0.0127, 1, 0.64, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return loads(fp.read(),\n encoding=encoding, cls=cls, object_hook=object_hook,\n parse_float=parse_float, parse_int=parse_int,\n parse_constant=parse_constant, **kw)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "label": "loads", "type": "function", "loc": [268, 316], "level": 0, "parent": null, "vector": [2, 0, 0.9241, 0.1551, 0, 0.66, 1.0, 88, 0, 8, 1, 0, 0, 0, 3], "semantic": {"name": "loads", "arg_names": ["s", "encoding", "cls", "object_hook", "parse_float", "parse_int", "parse_constant", "kw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,\n parse_int=None, parse_constant=None, **kw):\n \"\"\"Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON\n document) to a Python object.\n\n If ``s`` is a ``str`` instance and is encoded with an ASCII based encoding\n other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name\n must be specified. Encodings that are not ASCII based (such as UCS-2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L270_C4", "label": "expression", "type": "expression", "loc": [270, 301], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [8, 1, 0.9035, 0.1013, 1, 0.94, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Deserialize ``s`` (a ``str`` or ``unicode`` instance containing a JSON\n document) to a Python object.\n\n If ``s`` is a ``str`` instance and is encoded with an ASCII based encoding\n other than utf-8 (e.g. latin-1) then an appropriate ``encoding`` name\n must be specified. Encodings that are not ASCII based (such as UCS-2)\n are not allowed and should be decoded to ``unicode`` first.\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L302_C4", "label": "if", "type": "if", "loc": [302, 305], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9604, 0.0127, 1, 0.94, 0.1429, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (cls is None and encoding is None and object_hook is None and\n parse_int is None and parse_float is None and\n parse_constant is None and not kw):\n return _default_decoder.decode(s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L305_C8", "label": "return", "type": "return", "loc": [305, 305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L302_C4", "vector": [13, 2, 0.9652, 0.0032, 2, 0.73, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return _default_decoder.decode(s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L306_C4", "label": "if", "type": "if", "loc": [306, 307], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9699, 0.0063, 1, 0.94, 0.2857, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cls is None:\n cls = JSONDecoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L307_C8", "label": "cls =", "type": "assigned_variable", "loc": [307, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L306_C4", "vector": [14, 2, 0.9715, 0.0032, 2, 0.53, 0.0, 594, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cls = JSONDecoder"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L308_C4", "label": "if", "type": "if", "loc": [308, 309], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9763, 0.0063, 1, 0.94, 0.4286, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if object_hook is not None:\n kw['object_hook'] = object_hook"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L309_C8", "label": "assign", "type": "assigned_variable", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L308_C4", "vector": [14, 2, 0.9778, 0.0032, 2, 0.48, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kw['object_hook'] = object_hook"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L310_C4", "label": "if", "type": "if", "loc": [310, 311], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9826, 0.0063, 1, 0.94, 0.5714, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if parse_float is not None:\n kw['parse_float'] = parse_float"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L311_C8", "label": "assign", "type": "assigned_variable", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L310_C4", "vector": [14, 2, 0.9842, 0.0032, 2, 0.02, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kw['parse_float'] = parse_float"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L312_C4", "label": "if", "type": "if", "loc": [312, 313], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9889, 0.0063, 1, 0.94, 0.7143, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if parse_int is not None:\n kw['parse_int'] = parse_int"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L313_C8", "label": "assign", "type": "assigned_variable", "loc": [313, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L312_C4", "vector": [14, 2, 0.9905, 0.0032, 2, 0.78, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kw['parse_int'] = parse_int"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:If_L314_C4", "label": "if", "type": "if", "loc": [314, 315], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [4, 1, 0.9953, 0.0063, 1, 0.94, 0.8571, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if parse_constant is not None:\n kw['parse_constant'] = parse_constant"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L315_C8", "label": "assign", "type": "assigned_variable", "loc": [315, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:If_L314_C4", "vector": [14, 2, 0.9968, 0.0032, 2, 0.24, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kw['parse_constant'] = parse_constant"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L316_C4", "label": "return", "type": "return", "loc": [316, 316], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "vector": [13, 1, 1.0, 0.0032, 1, 0.94, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return cls(encoding=encoding, **kw).decode(s)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L123_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L170_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L171_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L164_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L120_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:For_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:For_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L185_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L224_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L224_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L229_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L229_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L230_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L182_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L231_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L241_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L243_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L241_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L262_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Expr_L270_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L302_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L302_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L306_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L307_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L308_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L308_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L310_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L310_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L312_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L312_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:If_L314_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:If_L314_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Assign_L315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_279:FunctionDef_L268_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_279:Return_L316_C4"}]
import csv, os, glob import sys import numpy class affycel: def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified): self.filename = filename self.version = version self.header = {} self.intensityCells = intensityCells self.intensity = intensity self.masksCells = maskscells self.masks = masks self.outliersCells = outlierCells self.outliers = outliers self.modifiedCells = modifiedCells self.modified = modified self.custom = {} # plan to allow a custom section to be added to the CEL file def read_cel(self, filename): reader = csv.reader(open(filename, "U"),delimiter='\t') self.filename = os.path.split(filename)[1] def read_selector(areader): for row in areader: if row: if any(("[CEL]" in row, "[HEADER]" in row, "[INTENSITY]" in row, "[MASKS]" in row, "[OUTLIERS]" in row, "[MODIFIED]" in row)): rsel[row[0]](row, areader) else: print '*****something went wrong*******' def Rcel(row, areader): if '[CEL]' in row: #row passed in should contain '[CEL]' for row in areader: #Skips '[CEL]' row that was passed in if row: # skips blank rows #print 'cell', row if not any(("[HEADER]" in row, "[INTENSITY]" in row, "[MASKS]" in row, "[OUTLIERS]" in row, "[MODIFIED]" in row)): self.version = int(row[0].partition('=')[2]) #print self.version #self.version = row else: rsel[row[0]](row, areader) # Go to correct section def Rheader(row, areader): if '[HEADER]' in row: #row passed in should contain '[HEADER]' self.header = {} #self.header is a dictionary for row in reader: # skips the section heading row if row: #skips blank rows if not any(("[CEL]" in row, "[INTENSITY]" in row, "[MASKS]" in row, "[OUTLIERS]" in row, "[MODIFIED]" in row)): self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2]) else: rsel[row[0]](row, areader) # Go to correct section def Rintensity(row, areader): #print 'start intencity', row data = [] if "[INTENSITY]" in row: #row passed in should contain '[INTENSITY]' row = areader.next() # moves to the row after "[INTENSITY]" self.intensityCells = int(row[0].partition('=')[2]) #gets the number of intensities areader.next() #skips the colmn headings for row in reader: if row: if not any(("[CEL]" in row, "[HEADER]" in row, "[MASKS]" in row, "[OUTLIERS]" in row, "[MODIFIED]" in row)): data.append(tuple(row)) else: self.intensity = numpy.array(data, [('x',numpy.int),('y',numpy.int),('mean',numpy.float64),('stdv',numpy.float64),('npixcels',numpy.int)]) rsel[row[0]](row, areader) def Rmasks(row, areader): data = [] maskstype = [('x', int), ('y', int)] if "[MASKS]" in row: row = areader.next() # moves to the row after "[INTENSITY]" self.masksCells = int(row[0].partition('=')[2]) #gets the number of intensities areader.next() #skips the colmn headings for row in reader: if row: if not any(("[CEL]" in row, "[HEADER]" in row, "[INTESITY]" in row, "[OUTLIERS]" in row, "[MODIFIED]" in row)): data.append(tuple(row)) else: self.masks = numpy.array(data, [('x',numpy.int),('y',numpy.int)]) rsel[row[0]](row, areader) def Routliers(row, areader): data = [] if "[OUTLIERS]" in row: row = areader.next() # moves to the row after "[INTENSITY]" self.outliersCells = int(row[0].partition('=')[2]) #gets the number of intensities areader.next() #skips the colmn headings for row in reader: if row: if not any(("[CEL]" in row, "[HEADER]" in row, "[INTESITY]" in row, "[MASKS]" in row, "[MODIFIED]" in row)): data.append(tuple(row)) else: self.outliers = numpy.array(data, [('x', numpy.int), ('y', numpy.int)]) rsel[row[0]](row, areader) def Rmodified(row, areader): data = [] if "[MODIFIED]" in row: row = areader.next() # moves to the row after "[INTENSITY]" self.modifiedCells = int(row[0].partition('=')[2]) #gets the number of intensities areader.next() #skips the colmn headings for row in reader: if row: if not any(("[CEL]" in row, "[HEADER]" in row, "[INTESITY]" in row, "[MASKS]" in row, "[OUTLIERS]" in row)): print 'modified1' data.append(tuple(row)) #else, there is no else statment when there are now more rows continue on to convert data to array self.modified = numpy.array(data, [('x', numpy.int), ('y', numpy.int), ('origmean', numpy.float64)] ) #rsel[row[0]](row, areader) This should be the last item in the file rsel = {} rsel['[CEL]'] = Rcel rsel['[HEADER]']= Rheader rsel['[INTENSITY]']= Rintensity rsel['[MASKS]']= Rmasks rsel['[OUTLIERS]']= Routliers rsel['[MODIFIED]']= Rmodified read_selector(reader) def simple_normilize(self): """empty""" def cmean(self): return numpy.mean(self.intensity['mean']) def csum(self): return numpy.sum(self.intensity['mean']) def csumDobs(self): return self.csum()/len(self.intensity['mean']) if __name__ == "__main__": a = affycel() a.read_cel('example.CEL') print a.cmean() print a.csum() print a.csumDobs() testlist = (a.filename, a.version, a.header.items(), a.intensityCells, a.intensity[:5], a.masksCells, a.masks, a.outliersCells, a.outliers[:5], a.modifiedCells, a.modified[:5]) for test in testlist: print 'Test', test
ajibawa-2023/Python-Code-Large/train/row_283
114
143
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_283:Import_L2_C0", "label": "csv import csv, os, glob", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.014, 0.007, 0, 0.66, 0.0, 312, 0, 3, 0, 0, 312, 0, 0], "semantic": {"name": "csv", "arg_names": [], "import_names": ["csv", "os", "glob"], "rhs_call_name": "", "annotation": ""}, "snippet": "import csv, os, glob"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.021, 0.007, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Import_L4_C0", "label": "numpy import numpy", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.028, 0.007, 0, 0.66, 0.5, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["numpy"], "rhs_call_name": "", "annotation": ""}, "snippet": "import numpy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "label": "affycel", "type": "class", "loc": [6, 132], "level": 0, "parent": null, "vector": [3, 0, 0.4825, 0.8881, 0, 0.66, 0.75, 616, 0, 13, 0, 0, 0, 0, 56], "semantic": {"name": "affycel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class affycel:\n\n def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified):\n self.filename = filename\n self.version = version\n self.header = {}\n self.intensityCells = intensityCells\n self.intensity = intensity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "label": "_int_", "type": "function", "loc": [8, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.0979, 0.0909, 1, 0.34, 0.0, 17, 0, 12, 0, 0, 0, 0, 0], "semantic": {"name": "_int_", "arg_names": ["self", "filename", "version", "header", "intensityCells", "intensity", "maskscells", "masks", "outlierCells", "outliers", "modifiedCells", "modified"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _int_(self, filename, version, header, intensityCells, intensity, maskscells, masks, outlierCells, outliers, modifiedCells, modified):\n self.filename = filename\n self.version = version\n self.header = {}\n self.intensityCells = intensityCells\n self.intensity = intensity\n self.masksCells = maskscells\n self.masks = masks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L9_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0629, 0.007, 2, 0.62, 0.0, 942, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = filename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L10_C8", "label": "self.version =", "type": "assigned_variable", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0699, 0.007, 2, 0.62, 0.0909, 686, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.version", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.version = version"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L11_C8", "label": "self.header =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0769, 0.007, 2, 0.62, 0.1818, 208, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.header", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.header = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L12_C8", "label": "self.intensityCells =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0839, 0.007, 2, 0.62, 0.2727, 367, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.intensityCells", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.intensityCells = intensityCells"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L13_C8", "label": "self.intensity =", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0909, 0.007, 2, 0.62, 0.3636, 967, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.intensity", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.intensity = intensity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L14_C8", "label": "self.masksCells =", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.0979, 0.007, 2, 0.62, 0.4545, 408, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.masksCells", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.masksCells = maskscells"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L15_C8", "label": "self.masks =", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1049, 0.007, 2, 0.62, 0.5455, 379, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.masks", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.masks = masks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L16_C8", "label": "self.outliersCells =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1119, 0.007, 2, 0.62, 0.6364, 896, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.outliersCells", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.outliersCells = outlierCells"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L17_C8", "label": "self.outliers =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1189, 0.007, 2, 0.62, 0.7273, 533, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.outliers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.outliers = outliers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L18_C8", "label": "self.modifiedCells =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1259, 0.007, 2, 0.62, 0.8182, 502, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.modifiedCells", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.modifiedCells = modifiedCells"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L19_C8", "label": "self.modified =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1329, 0.007, 2, 0.62, 0.9091, 763, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.modified", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.modified = modified"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L20_C8", "label": "self.custom =", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "vector": [14, 2, 0.1399, 0.007, 2, 0.62, 1.0, 550, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.custom", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.custom = {} # plan to allow a custom section to be added to the CEL file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "label": "read_cel", "type": "function", "loc": [22, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.5035, 0.7063, 1, 0.34, 0.2, 526, 0, 2, 0, 0, 0, 0, 52], "semantic": {"name": "read_cel", "arg_names": ["self", "filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def read_cel(self, filename):\n reader = csv.reader(open(filename, \"U\"),delimiter='\\t')\n self.filename = os.path.split(filename)[1] \n \n def read_selector(areader):\n for row in areader:\n if row:\n if any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L23_C8", "label": "reader = reader()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.1608, 0.007, 2, 0.15, 0.0, 548, 3, 2, 0, 0, 548, 10, 2], "semantic": {"name": "reader", "arg_names": [], "import_names": [], "rhs_call_name": "reader", "annotation": ""}, "snippet": " reader = csv.reader(open(filename, \"U\"),delimiter='\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L24_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.1678, 0.007, 2, 0.15, 0.0625, 942, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = os.path.split(filename)[1] "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L26_C8", "label": "read_selector", "type": "function", "loc": [26, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.1958, 0.035, 2, 0.15, 0.125, 273, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "read_selector", "arg_names": ["areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def read_selector(areader):\n for row in areader:\n if row:\n if any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L27_C12", "label": "for row", "type": "for", "loc": [27, 30], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L26_C8", "vector": [6, 3, 0.1993, 0.028, 3, 0.2, 0.0, 767, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in areader:\n if row:\n if any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L28_C16", "label": "if", "type": "if", "loc": [28, 30], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L27_C12", "vector": [4, 4, 0.2028, 0.021, 4, 0.51, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row:\n if any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L29_C20", "label": "if", "type": "if", "loc": [29, 30], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L28_C16", "vector": [4, 5, 0.2063, 0.014, 5, 0.1, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L30_C24", "label": "expression", "type": "expression", "loc": [30, 30], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L29_C20", "vector": [8, 6, 0.2098, 0.007, 6, 0.93, 0.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L32_C8", "label": "Rcel", "type": "function", "loc": [32, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.2587, 0.0769, 2, 0.15, 0.1875, 359, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "Rcel", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Rcel(row, areader):\n if '[CEL]' in row: #row passed in should contain '[CEL]'\n for row in areader: #Skips '[CEL]' row that was passed in\n if row: # skips blank rows\n #print 'cell', row\n if not any((\"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.version = int(row[0].partition('=')[2])\n #print self.version"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L33_C12", "label": "if", "type": "if", "loc": [33, 42], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L32_C8", "vector": [4, 3, 0.2622, 0.0699, 3, 0.22, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '[CEL]' in row: #row passed in should contain '[CEL]'\n for row in areader: #Skips '[CEL]' row that was passed in\n if row: # skips blank rows\n #print 'cell', row\n if not any((\"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.version = int(row[0].partition('=')[2])\n #print self.version\n #self.version = row"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L34_C16", "label": "for row", "type": "for", "loc": [34, 42], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L33_C12", "vector": [6, 4, 0.2657, 0.0629, 4, 0.82, 0.0, 767, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in areader: #Skips '[CEL]' row that was passed in\n if row: # skips blank rows\n #print 'cell', row\n if not any((\"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.version = int(row[0].partition('=')[2])\n #print self.version\n #self.version = row\n else: "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L35_C20", "label": "if", "type": "if", "loc": [35, 42], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L34_C16", "vector": [4, 5, 0.2692, 0.0559, 5, 0.01, 0.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row: # skips blank rows\n #print 'cell', row\n if not any((\"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.version = int(row[0].partition('=')[2])\n #print self.version\n #self.version = row\n else: \n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24", "label": "if", "type": "if", "loc": [37, 42], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L35_C20", "vector": [4, 6, 0.2762, 0.042, 6, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[HEADER]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.version = int(row[0].partition('=')[2])\n #print self.version\n #self.version = row\n else: \n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L38_C28", "label": "self.version = int()", "type": "assigned_variable", "loc": [38, 38], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24", "vector": [14, 7, 0.2657, 0.007, 7, 0.89, 0.0, 686, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "self.version", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " self.version = int(row[0].partition('=')[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L42_C28", "label": "expression", "type": "expression", "loc": [42, 42], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24", "vector": [8, 7, 0.2937, 0.007, 7, 0.89, 1.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L44_C8", "label": "Rheader", "type": "function", "loc": [44, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.3357, 0.0629, 2, 0.15, 0.25, 430, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "Rheader", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Rheader(row, areader):\n if '[HEADER]' in row: #row passed in should contain '[HEADER]'\n self.header = {} #self.header is a dictionary\n for row in reader: # skips the section heading row\n if row: #skips blank rows\n if not any((\"[CEL]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12", "label": "if", "type": "if", "loc": [45, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L44_C8", "vector": [4, 3, 0.3392, 0.0559, 3, 0.08, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if '[HEADER]' in row: #row passed in should contain '[HEADER]'\n self.header = {} #self.header is a dictionary\n for row in reader: # skips the section heading row\n if row: #skips blank rows\n if not any((\"[CEL]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])\n else:\n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L46_C16", "label": "self.header =", "type": "assigned_variable", "loc": [46, 46], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12", "vector": [14, 4, 0.3217, 0.007, 4, 0.68, 0.0, 208, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.header", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.header = {} #self.header is a dictionary"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L47_C16", "label": "for row", "type": "for", "loc": [47, 52], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12", "vector": [6, 4, 0.3462, 0.042, 4, 0.68, 1.0, 767, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in reader: # skips the section heading row\n if row: #skips blank rows\n if not any((\"[CEL]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])\n else:\n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L48_C20", "label": "if", "type": "if", "loc": [48, 52], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L47_C16", "vector": [4, 5, 0.3497, 0.035, 5, 0.95, 0.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row: #skips blank rows\n if not any((\"[CEL]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])\n else:\n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24", "label": "if", "type": "if", "loc": [49, 52], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L48_C20", "vector": [4, 6, 0.3531, 0.028, 6, 0.36, 0.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[CEL]\" in row, \"[INTENSITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])\n else:\n rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L50_C28", "label": " = str()", "type": "assigned_variable", "loc": [50, 50], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24", "vector": [14, 7, 0.3497, 0.007, 7, 0.97, 0.0, 0, 3, 1, 0, 0, 52, 10, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " self.header[str(row[0].partition('=')[0])] = str(row[0].partition('=')[2])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L52_C28", "label": "expression", "type": "expression", "loc": [52, 52], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24", "vector": [8, 7, 0.3636, 0.007, 7, 0.97, 1.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader) # Go to correct section"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8", "label": "Rintensity", "type": "function", "loc": [54, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.4231, 0.0979, 2, 0.15, 0.3125, 4, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "Rintensity", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Rintensity(row, areader):\n #print 'start intencity', row \n data = []\n if \"[INTENSITY]\" in row: #row passed in should contain '[INTENSITY]'\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.intensityCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings\n for row in reader:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L56_C12", "label": "data =", "type": "assigned_variable", "loc": [56, 56], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8", "vector": [14, 3, 0.3916, 0.007, 3, 0.09, 0.0, 929, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "label": "if", "type": "if", "loc": [57, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8", "vector": [4, 3, 0.4336, 0.0769, 3, 0.09, 1.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"[INTENSITY]\" in row: #row passed in should contain '[INTENSITY]'\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.intensityCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings\n for row in reader:\n if row: \n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L58_C16", "label": "row = next()", "type": "assigned_variable", "loc": [58, 58], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "vector": [14, 4, 0.4056, 0.007, 4, 0.81, 0.0, 767, 3, 0, 0, 0, 11, 10, 1], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " row = areader.next() # moves to the row after \"[INTENSITY]\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L59_C16", "label": "self.intensityCells = int()", "type": "assigned_variable", "loc": [59, 59], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "vector": [14, 4, 0.4126, 0.007, 4, 0.81, 0.3333, 367, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "self.intensityCells", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " self.intensityCells = int(row[0].partition('=')[2]) #gets the number of intensities"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L60_C16", "label": "next()", "type": "expression", "loc": [60, 60], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "vector": [8, 4, 0.4196, 0.007, 4, 0.81, 0.6667, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L61_C16", "label": "for row", "type": "for", "loc": [61, 67], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "vector": [6, 4, 0.4476, 0.049, 4, 0.81, 1.0, 767, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in reader:\n if row: \n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.intensity = numpy.array(data, [('x',numpy.int),('y',numpy.int),('mean',numpy.float64),('stdv',numpy.float64),('npixcels',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L62_C20", "label": "if", "type": "if", "loc": [62, 67], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L61_C16", "vector": [4, 5, 0.451, 0.042, 5, 0.43, 0.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row: \n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.intensity = numpy.array(data, [('x',numpy.int),('y',numpy.int),('mean',numpy.float64),('stdv',numpy.float64),('npixcels',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "label": "if", "type": "if", "loc": [63, 67], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L62_C20", "vector": [4, 6, 0.4545, 0.035, 6, 0.77, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.intensity = numpy.array(data, [('x',numpy.int),('y',numpy.int),('mean',numpy.float64),('stdv',numpy.float64),('npixcels',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L64_C28", "label": "append()", "type": "expression", "loc": [64, 64], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "vector": [8, 7, 0.4476, 0.007, 7, 0.62, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L66_C28", "label": "self.intensity = array()", "type": "assigned_variable", "loc": [66, 66], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "vector": [14, 7, 0.4615, 0.007, 7, 0.62, 0.5, 967, 3, 2, 0, 0, 80, 10, 1], "semantic": {"name": "self.intensity", "arg_names": [], "import_names": [], "rhs_call_name": "array", "annotation": ""}, "snippet": " self.intensity = numpy.array(data, [('x',numpy.int),('y',numpy.int),('mean',numpy.float64),('stdv',numpy.float64),('npixcels',numpy.int)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L67_C28", "label": "expression", "type": "expression", "loc": [67, 67], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "vector": [8, 7, 0.4685, 0.007, 7, 0.62, 1.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "label": "Rmasks", "type": "function", "loc": [69, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.5315, 0.1049, 2, 0.15, 0.375, 577, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "Rmasks", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Rmasks(row, areader):\n data = []\n maskstype = [('x', int), ('y', int)]\n if \"[MASKS]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.masksCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings\n for row in reader:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L70_C12", "label": "data =", "type": "assigned_variable", "loc": [70, 70], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "vector": [14, 3, 0.4895, 0.007, 3, 0.51, 0.0, 929, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L71_C12", "label": "maskstype =", "type": "assigned_variable", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "vector": [14, 3, 0.4965, 0.007, 3, 0.51, 0.3333, 939, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "maskstype", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " maskstype = [('x', int), ('y', int)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "label": "if", "type": "if", "loc": [72, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "vector": [4, 3, 0.514, 0.028, 3, 0.51, 0.6667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"[MASKS]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.masksCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L73_C28", "label": "row = next()", "type": "assigned_variable", "loc": [73, 73], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "vector": [14, 4, 0.5105, 0.007, 4, 0.33, 0.0, 767, 3, 0, 0, 0, 11, 10, 1], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " row = areader.next() # moves to the row after \"[INTENSITY]\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L74_C28", "label": "self.masksCells = int()", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "vector": [14, 4, 0.5175, 0.007, 4, 0.33, 0.5, 408, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "self.masksCells", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " self.masksCells = int(row[0].partition('=')[2]) #gets the number of intensities"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L75_C28", "label": "next()", "type": "expression", "loc": [75, 75], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "vector": [8, 4, 0.5245, 0.007, 4, 0.33, 1.0, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L76_C12", "label": "for row", "type": "for", "loc": [76, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "vector": [6, 3, 0.5559, 0.0559, 3, 0.51, 1.0, 767, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in reader:\n if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n \n data.append(tuple(row))\n else:\n self.masks = numpy.array(data, [('x',numpy.int),('y',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L77_C16", "label": "if", "type": "if", "loc": [77, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L76_C12", "vector": [4, 4, 0.5594, 0.049, 4, 0.57, 0.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n \n data.append(tuple(row))\n else:\n self.masks = numpy.array(data, [('x',numpy.int),('y',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "label": "if", "type": "if", "loc": [78, 83], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L77_C16", "vector": [4, 5, 0.5629, 0.042, 5, 0.76, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[OUTLIERS]\" in row, \"[MODIFIED]\" in row)):\n \n data.append(tuple(row))\n else:\n self.masks = numpy.array(data, [('x',numpy.int),('y',numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L80_C24", "label": "append()", "type": "expression", "loc": [80, 80], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "vector": [8, 6, 0.5594, 0.007, 6, 0.17, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L82_C24", "label": "self.masks = array()", "type": "assigned_variable", "loc": [82, 82], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "vector": [14, 6, 0.5734, 0.007, 6, 0.17, 0.5, 379, 3, 2, 0, 0, 80, 10, 1], "semantic": {"name": "self.masks", "arg_names": [], "import_names": [], "rhs_call_name": "array", "annotation": ""}, "snippet": " self.masks = numpy.array(data, [('x',numpy.int),('y',numpy.int)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L83_C24", "label": "expression", "type": "expression", "loc": [83, 83], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "vector": [8, 6, 0.5804, 0.007, 6, 0.17, 1.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "label": "Routliers", "type": "function", "loc": [85, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.6364, 0.0909, 2, 0.15, 0.4375, 272, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "Routliers", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Routliers(row, areader):\n data = []\n if \"[OUTLIERS]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.outliersCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings\n for row in reader:\n if row:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L86_C12", "label": "data =", "type": "assigned_variable", "loc": [86, 86], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "vector": [14, 3, 0.6014, 0.007, 3, 0.45, 0.0, 929, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "label": "if", "type": "if", "loc": [87, 90], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "vector": [4, 3, 0.6189, 0.028, 3, 0.45, 0.5, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"[OUTLIERS]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.outliersCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L88_C28", "label": "row = next()", "type": "assigned_variable", "loc": [88, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "vector": [14, 4, 0.6154, 0.007, 4, 0.32, 0.0, 767, 3, 0, 0, 0, 11, 10, 1], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " row = areader.next() # moves to the row after \"[INTENSITY]\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L89_C28", "label": "self.outliersCells = int()", "type": "assigned_variable", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "vector": [14, 4, 0.6224, 0.007, 4, 0.32, 0.5, 896, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "self.outliersCells", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " self.outliersCells = int(row[0].partition('=')[2]) #gets the number of intensities"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L90_C28", "label": "next()", "type": "expression", "loc": [90, 90], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "vector": [8, 4, 0.6294, 0.007, 4, 0.32, 1.0, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L91_C12", "label": "for row", "type": "for", "loc": [91, 97], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "vector": [6, 3, 0.6573, 0.049, 3, 0.45, 1.0, 767, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in reader:\n if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.outliers = numpy.array(data, [('x', numpy.int), ('y', numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L92_C16", "label": "if", "type": "if", "loc": [92, 97], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L91_C12", "vector": [4, 4, 0.6608, 0.042, 4, 0.79, 0.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.outliers = numpy.array(data, [('x', numpy.int), ('y', numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "label": "if", "type": "if", "loc": [93, 97], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L92_C16", "vector": [4, 5, 0.6643, 0.035, 5, 0.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[MODIFIED]\" in row)):\n data.append(tuple(row))\n else:\n self.outliers = numpy.array(data, [('x', numpy.int), ('y', numpy.int)])\n rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L94_C24", "label": "append()", "type": "expression", "loc": [94, 94], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "vector": [8, 6, 0.6573, 0.007, 6, 0.21, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L96_C24", "label": "self.outliers = array()", "type": "assigned_variable", "loc": [96, 96], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "vector": [14, 6, 0.6713, 0.007, 6, 0.21, 0.5, 533, 3, 2, 0, 0, 80, 10, 1], "semantic": {"name": "self.outliers", "arg_names": [], "import_names": [], "rhs_call_name": "array", "annotation": ""}, "snippet": " self.outliers = numpy.array(data, [('x', numpy.int), ('y', numpy.int)])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L97_C24", "label": "expression", "type": "expression", "loc": [97, 97], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "vector": [8, 6, 0.6783, 0.007, 6, 0.21, 1.0, 0, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel[row[0]](row, areader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "label": "Rmodified", "type": "function", "loc": [99, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [2, 2, 0.7343, 0.0909, 2, 0.15, 0.5, 269, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "Rmodified", "arg_names": ["row", "areader"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Rmodified(row, areader):\n data = []\n if \"[MODIFIED]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.modifiedCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings\n for row in reader:\n if row:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L100_C12", "label": "data =", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "vector": [14, 3, 0.6993, 0.007, 3, 0.47, 0.0, 929, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " data = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "label": "if", "type": "if", "loc": [101, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "vector": [4, 3, 0.7168, 0.028, 3, 0.47, 0.3333, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if \"[MODIFIED]\" in row:\n row = areader.next() # moves to the row after \"[INTENSITY]\"\n self.modifiedCells = int(row[0].partition('=')[2]) #gets the number of intensities\n areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L102_C28", "label": "row = next()", "type": "assigned_variable", "loc": [102, 102], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "vector": [14, 4, 0.7133, 0.007, 4, 0.77, 0.0, 767, 3, 0, 0, 0, 11, 10, 1], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " row = areader.next() # moves to the row after \"[INTENSITY]\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L103_C28", "label": "self.modifiedCells = int()", "type": "assigned_variable", "loc": [103, 103], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "vector": [14, 4, 0.7203, 0.007, 4, 0.77, 0.5, 502, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "self.modifiedCells", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " self.modifiedCells = int(row[0].partition('=')[2]) #gets the number of intensities"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L104_C28", "label": "next()", "type": "expression", "loc": [104, 104], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "vector": [8, 4, 0.7273, 0.007, 4, 0.77, 1.0, 11, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " areader.next() #skips the colmn headings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L105_C12", "label": "for row", "type": "for", "loc": [105, 109], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "vector": [6, 3, 0.7483, 0.035, 3, 0.47, 0.6667, 767, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for row in reader:\n if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row)):\n print('modified1')\n data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L106_C16", "label": "if", "type": "if", "loc": [106, 109], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L105_C12", "vector": [4, 4, 0.7517, 0.028, 4, 0.67, 0.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if row:\n if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row)):\n print('modified1')\n data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20", "label": "if", "type": "if", "loc": [107, 109], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L106_C16", "vector": [4, 5, 0.7552, 0.021, 5, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not any((\"[CEL]\" in row, \"[HEADER]\" in row, \"[INTESITY]\" in row, \"[MASKS]\" in row, \"[OUTLIERS]\" in row)):\n print('modified1')\n data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L108_C24", "label": "print()", "type": "expression", "loc": [108, 108], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20", "vector": [8, 6, 0.7552, 0.007, 6, 0.45, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('modified1')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L109_C24", "label": "append()", "type": "expression", "loc": [109, 109], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20", "vector": [8, 6, 0.7622, 0.007, 6, 0.45, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " data.append(tuple(row))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L111_C12", "label": "self.modified = array()", "type": "assigned_variable", "loc": [111, 111], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "vector": [14, 3, 0.7762, 0.007, 3, 0.47, 1.0, 763, 3, 2, 0, 0, 80, 10, 1], "semantic": {"name": "self.modified", "arg_names": [], "import_names": [], "rhs_call_name": "array", "annotation": ""}, "snippet": " self.modified = numpy.array(data, [('x', numpy.int), ('y', numpy.int), ('origmean', numpy.float64)] )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L114_C8", "label": "rsel =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.7972, 0.007, 2, 0.15, 0.5625, 186, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "rsel", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L115_C8", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8042, 0.007, 2, 0.15, 0.625, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[CEL]'] = Rcel"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L116_C8", "label": "assign", "type": "assigned_variable", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8112, 0.007, 2, 0.15, 0.6875, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[HEADER]']= Rheader"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L117_C8", "label": "assign", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8182, 0.007, 2, 0.15, 0.75, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[INTENSITY]']= Rintensity"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L118_C8", "label": "assign", "type": "assigned_variable", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8252, 0.007, 2, 0.15, 0.8125, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[MASKS]']= Rmasks"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L119_C8", "label": "assign", "type": "assigned_variable", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8322, 0.007, 2, 0.15, 0.875, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[OUTLIERS]']= Routliers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L120_C8", "label": "assign", "type": "assigned_variable", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [14, 2, 0.8392, 0.007, 2, 0.15, 0.9375, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rsel['[MODIFIED]']= Rmodified"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L122_C8", "label": "read_selector()", "type": "expression", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "vector": [8, 2, 0.8531, 0.007, 2, 0.15, 1.0, 273, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "read_selector", "arg_names": [], "import_names": [], "rhs_call_name": "read_selector", "annotation": ""}, "snippet": " read_selector(reader)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L124_C4", "label": "simple_normilize", "type": "function", "loc": [124, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.8706, 0.014, 1, 0.34, 0.4, 964, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "simple_normilize", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def simple_normilize(self):\n \"\"\"empty\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L125_C8", "label": "expression", "type": "expression", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L124_C4", "vector": [8, 2, 0.8741, 0.007, 2, 0.39, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"empty\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L127_C4", "label": "cmean", "type": "function", "loc": [127, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.8916, 0.014, 1, 0.34, 0.6, 269, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "cmean", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cmean(self):\n return numpy.mean(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L128_C8", "label": "return", "type": "return", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L127_C4", "vector": [13, 2, 0.8951, 0.007, 2, 0.27, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return numpy.mean(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L129_C4", "label": "csum", "type": "function", "loc": [129, 130], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.9056, 0.014, 1, 0.34, 0.8, 740, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "csum", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def csum(self):\n return numpy.sum(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L130_C8", "label": "return", "type": "return", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L129_C4", "vector": [13, 2, 0.9091, 0.007, 2, 0.24, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return numpy.sum(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L131_C4", "label": "csumDobs", "type": "function", "loc": [131, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "vector": [2, 1, 0.9196, 0.014, 1, 0.34, 1.0, 654, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "csumDobs", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def csumDobs(self):\n return self.csum()/len(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L132_C8", "label": "return", "type": "return", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L131_C4", "vector": [13, 2, 0.9231, 0.007, 2, 0.23, 0.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.csum()/len(self.intensity['mean'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "label": "if", "type": "if", "loc": [135, 143], "level": 0, "parent": null, "vector": [4, 0, 0.972, 0.0629, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\": \n a = affycel()\n a.read_cel('example.CEL')\n print(a.cmean())\n print(a.csum())\n print(a.csumDobs())\n testlist = (a.filename, a.version, a.header.items(), a.intensityCells, a.intensity[:5], a.masksCells, a.masks, a.outliersCells, a.outliers[:5], a.modifiedCells, a.modified[:5])\n for test in testlist:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L136_C8", "label": "a = affycel()", "type": "assigned_variable", "loc": [136, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [14, 1, 0.951, 0.007, 1, 0.06, 0.0, 475, 3, 0, 0, 0, 616, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "affycel", "annotation": ""}, "snippet": " a = affycel()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L137_C8", "label": "read_cel()", "type": "expression", "loc": [137, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [8, 1, 0.958, 0.007, 1, 0.06, 0.1667, 526, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "read_cel", "arg_names": [], "import_names": [], "rhs_call_name": "read_cel", "annotation": ""}, "snippet": " a.read_cel('example.CEL')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L138_C8", "label": "print()", "type": "expression", "loc": [138, 138], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [8, 1, 0.965, 0.007, 1, 0.06, 0.3333, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a.cmean())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L139_C8", "label": "print()", "type": "expression", "loc": [139, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [8, 1, 0.972, 0.007, 1, 0.06, 0.5, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a.csum())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L140_C8", "label": "print()", "type": "expression", "loc": [140, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [8, 1, 0.979, 0.007, 1, 0.06, 0.6667, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a.csumDobs())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L141_C8", "label": "testlist =", "type": "assigned_variable", "loc": [141, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [14, 1, 0.986, 0.007, 1, 0.06, 0.8333, 975, 0, 0, 0, 0, 0, 8, 1], "semantic": {"name": "testlist", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " testlist = (a.filename, a.version, a.header.items(), a.intensityCells, a.intensity[:5], a.masksCells, a.masks, a.outliersCells, a.outliers[:5], a.modifiedCells, a.modified[:5])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:For_L142_C8", "label": "for test", "type": "for", "loc": [142, 143], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "vector": [6, 1, 0.9965, 0.014, 1, 0.06, 1.0, 224, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for test in testlist:\n print('Test', test)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L143_C12", "label": "print()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_283:For_L142_C8", "vector": [8, 2, 1.0, 0.007, 2, 0.69, 0.0, 535, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Test', test)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L26_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L27_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L27_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L28_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L28_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L29_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L29_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L30_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L32_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L33_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L34_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L34_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L35_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L35_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L38_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L37_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L42_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L44_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L46_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L45_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L47_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L47_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L48_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L48_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L50_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L49_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L52_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L56_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L54_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L58_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L59_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L60_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L57_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L61_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L61_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L62_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L62_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L64_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L66_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L63_C24", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L67_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L73_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L74_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L72_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L75_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L69_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L76_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L76_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L77_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L77_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L80_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L82_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L78_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L83_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L86_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L88_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L89_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L87_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L90_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L85_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L91_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L92_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L92_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L94_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L96_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L93_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L97_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L102_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L103_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L101_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L104_C28"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L105_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L106_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L106_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L108_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L107_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L109_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L111_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L22_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L124_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L124_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L127_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L129_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:FunctionDef_L131_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Return_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Assign_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:If_L135_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_283:For_L142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_283:For_L142_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_283:Expr_L143_C12"}]
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys import os from StringIO import StringIO from PIL import Image import datauri RGBA_BLACK = (0, 0, 0, 255) sign_ = lambda n: -1 if n < 0 else (1 if n > 0 else 0) def find_black_region_(im, sx, sy, ex, ey): dx = sign_(ex - sx) dy = sign_(ey - sy) if abs(dx) == abs(dy): raise 'findRegion_ can\'t look both horizontally and vertically at once.' pixel_changes = [] pixel_on = False x = sx y = sy while True: if not pixel_on and im.getpixel((x, y)) == RGBA_BLACK: pixel_changes.append((x, y)) pixel_on = True elif pixel_on and im.getpixel((x, y)) != RGBA_BLACK: pixel_changes.append((x, y)) pixel_on = False x += dx y += dy if x == ex and y == ey: break return (pixel_changes[0][0 if dx else 1] - (sx if dx else sy), pixel_changes[1][0 if dx else 1] - (sx if dx else sy)) def image_to_data_uri_(im): f = StringIO() im.save(f, 'PNG') uri = datauri.to_data_uri(f.getvalue(), 'foo.png') f.close() return uri def main(): src_im = Image.open(sys.argv[1]) # read and parse 9-patch stretch and padding regions stretch_l, stretch_r = find_black_region_(src_im, 0, 0, src_im.size[0], 0) stretch_t, stretch_b = find_black_region_(src_im, 0, 0, 0, src_im.size[1]) pad_l, pad_r = find_black_region_(src_im, 0, src_im.size[1] - 1, src_im.size[0], src_im.size[1] - 1) pad_t, pad_b = find_black_region_(src_im, src_im.size[0] - 1, 0, src_im.size[0] - 1, src_im.size[1]) #padding_box = {} template_params = {} template_params['id'] = sys.argv[1] template_params['icon_uri'] = image_to_data_uri_(src_im) template_params['dim_constraint_attributes'] = '' # p:lockHeight="true" template_params['image_uri'] = image_to_data_uri_(src_im.crop((1, 1, src_im.size[0] - 1, src_im.size[1] - 1))) template_params['width_l'] = stretch_l - 1 template_params['width_r'] = src_im.size[0] - stretch_r - 1 template_params['height_t'] = stretch_t - 1 template_params['height_b'] = src_im.size[1] - stretch_b - 1 template_params['pad_l'] = pad_l - 1 template_params['pad_t'] = pad_t - 1 template_params['pad_r'] = src_im.size[0] - pad_r - 1 template_params['pad_b'] = src_im.size[1] - pad_b - 1 print open('res/shape_9patch_template.xml').read() % template_params if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_284
52
97
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_284:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1753, 0.0103, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1856, 0.0103, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:ImportFrom_L19_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1959, 0.0103, 0, 0.66, 0.2, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:ImportFrom_L20_C0", "label": "from PIL import Image", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.2062, 0.0103, 0, 0.66, 0.3, 556, 0, 1, 0, 0, 556, 0, 0], "semantic": {"name": "PIL", "arg_names": [], "import_names": ["Image"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PIL import Image"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Import_L22_C0", "label": "datauri import datauri", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.2268, 0.0103, 0, 0.66, 0.4, 597, 0, 1, 0, 0, 597, 0, 0], "semantic": {"name": "datauri", "arg_names": [], "import_names": ["datauri"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datauri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L25_C0", "label": "RGBA_BLACK =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.2577, 0.0103, 0, 0.66, 0.5, 332, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "RGBA_BLACK", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "RGBA_BLACK = (0, 0, 0, 255)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L28_C0", "label": "sign_ =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2887, 0.0103, 0, 0.66, 0.6, 173, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sign_", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "sign_ = lambda n: -1 if n < 0 else (1 if n > 0 else 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "label": "find_black_region_", "type": "function", "loc": [31, 54], "level": 0, "parent": null, "vector": [2, 0, 0.4381, 0.2474, 0, 0.66, 0.7, 5, 0, 5, 1, 0, 0, 0, 8], "semantic": {"name": "find_black_region_", "arg_names": ["im", "sx", "sy", "ex", "ey"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def find_black_region_(im, sx, sy, ex, ey):\n dx = sign_(ex - sx)\n dy = sign_(ey - sy)\n if abs(dx) == abs(dy):\n raise 'findRegion_ can\\'t look both horizontally and vertically at once.'\n\n pixel_changes = []\n pixel_on = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L32_C2", "label": "dx = sign_()", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.3299, 0.0103, 1, 0.02, 0.0, 870, 3, 1, 0, 0, 173, 10, 1], "semantic": {"name": "dx", "arg_names": [], "import_names": [], "rhs_call_name": "sign_", "annotation": ""}, "snippet": " dx = sign_(ex - sx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L33_C2", "label": "dy = sign_()", "type": "assigned_variable", "loc": [33, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.3402, 0.0103, 1, 0.02, 0.125, 477, 3, 1, 0, 0, 173, 10, 1], "semantic": {"name": "dy", "arg_names": [], "import_names": [], "rhs_call_name": "sign_", "annotation": ""}, "snippet": " dy = sign_(ey - sy)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:If_L34_C2", "label": "if", "type": "if", "loc": [34, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [4, 1, 0.3557, 0.0206, 1, 0.02, 0.25, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if abs(dx) == abs(dy):\n raise 'findRegion_ can\\'t look both horizontally and vertically at once.'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L37_C2", "label": "pixel_changes =", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.3814, 0.0103, 1, 0.02, 0.375, 431, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "pixel_changes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pixel_changes = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L38_C2", "label": "pixel_on =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.3918, 0.0103, 1, 0.02, 0.5, 580, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "pixel_on", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pixel_on = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L39_C2", "label": "x =", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.4021, 0.0103, 1, 0.02, 0.625, 190, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " x = sx"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L40_C2", "label": "y =", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [14, 1, 0.4124, 0.0103, 1, 0.02, 0.75, 304, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " y = sy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2", "label": "while", "type": "while", "loc": [41, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [5, 1, 0.4742, 0.1134, 1, 0.02, 0.875, 0, 1, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while True:\n if not pixel_on and im.getpixel((x, y)) == RGBA_BLACK:\n pixel_changes.append((x, y))\n pixel_on = True\n elif pixel_on and im.getpixel((x, y)) != RGBA_BLACK:\n pixel_changes.append((x, y))\n pixel_on = False\n x += dx"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "label": "if", "type": "if", "loc": [42, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2", "vector": [4, 2, 0.4588, 0.0619, 2, 0.95, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not pixel_on and im.getpixel((x, y)) == RGBA_BLACK:\n pixel_changes.append((x, y))\n pixel_on = True\n elif pixel_on and im.getpixel((x, y)) != RGBA_BLACK:\n pixel_changes.append((x, y))\n pixel_on = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L43_C6", "label": "append()", "type": "expression", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "vector": [8, 3, 0.4433, 0.0103, 3, 0.67, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pixel_changes.append((x, y))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L44_C6", "label": "pixel_on =", "type": "assigned_variable", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "vector": [14, 3, 0.4536, 0.0103, 3, 0.67, 0.5, 580, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "pixel_on", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pixel_on = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4", "label": "if", "type": "if", "loc": [45, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "vector": [4, 3, 0.4742, 0.0309, 3, 0.67, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif pixel_on and im.getpixel((x, y)) != RGBA_BLACK:\n pixel_changes.append((x, y))\n pixel_on = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L46_C6", "label": "append()", "type": "expression", "loc": [46, 46], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4", "vector": [8, 4, 0.4742, 0.0103, 4, 0.68, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " pixel_changes.append((x, y))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L47_C6", "label": "pixel_on =", "type": "assigned_variable", "loc": [47, 47], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4", "vector": [14, 4, 0.4845, 0.0103, 4, 0.68, 1.0, 580, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "pixel_on", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pixel_on = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:If_L50_C4", "label": "if", "type": "if", "loc": [50, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2", "vector": [4, 2, 0.5206, 0.0206, 2, 0.95, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if x == ex and y == ey:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Return_L53_C2", "label": "return", "type": "return", "loc": [53, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "vector": [13, 1, 0.5515, 0.0206, 1, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (pixel_changes[0][0 if dx else 1] - (sx if dx else sy),\n pixel_changes[1][0 if dx else 1] - (sx if dx else sy))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "label": "image_to_data_uri_", "type": "function", "loc": [57, 62], "level": 0, "parent": null, "vector": [2, 0, 0.6134, 0.0619, 0, 0.66, 0.8, 588, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "image_to_data_uri_", "arg_names": ["im"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def image_to_data_uri_(im):\n f = StringIO()\n im.save(f, 'PNG')\n uri = datauri.to_data_uri(f.getvalue(), 'foo.png')\n f.close()\n return uri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L58_C2", "label": "f = StringIO()", "type": "assigned_variable", "loc": [58, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "vector": [14, 1, 0.5979, 0.0103, 1, 0.45, 0.0, 899, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " f = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L59_C2", "label": "save()", "type": "expression", "loc": [59, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "vector": [8, 1, 0.6082, 0.0103, 1, 0.45, 0.25, 928, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "save", "arg_names": [], "import_names": [], "rhs_call_name": "save", "annotation": ""}, "snippet": " im.save(f, 'PNG')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L60_C2", "label": "uri = to_data_uri()", "type": "assigned_variable", "loc": [60, 60], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "vector": [14, 1, 0.6186, 0.0103, 1, 0.45, 0.5, 600, 3, 2, 0, 0, 70, 10, 2], "semantic": {"name": "uri", "arg_names": [], "import_names": [], "rhs_call_name": "to_data_uri", "annotation": ""}, "snippet": " uri = datauri.to_data_uri(f.getvalue(), 'foo.png')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L61_C2", "label": "close()", "type": "expression", "loc": [61, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "vector": [8, 1, 0.6289, 0.0103, 1, 0.45, 0.75, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Return_L62_C2", "label": "return", "type": "return", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "vector": [13, 1, 0.6392, 0.0103, 1, 0.45, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return uri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "label": "main", "type": "function", "loc": [65, 93], "level": 0, "parent": null, "vector": [2, 0, 0.8144, 0.299, 0, 0.66, 0.9, 624, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n src_im = Image.open(sys.argv[1])\n\n # read and parse 9-patch stretch and padding regions\n stretch_l, stretch_r = find_black_region_(src_im, 0, 0, src_im.size[0], 0)\n stretch_t, stretch_b = find_black_region_(src_im, 0, 0, 0, src_im.size[1])\n \n pad_l, pad_r = find_black_region_(src_im, 0, src_im.size[1] - 1, src_im.size[0], src_im.size[1] - 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L66_C2", "label": "src_im = open()", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.6804, 0.0103, 1, 0.57, 0.0, 272, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "src_im", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " src_im = Image.open(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L69_C2", "label": "stretch_l, stretch_r = find_black_region_()", "type": "assigned_variable", "loc": [69, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7113, 0.0103, 1, 0.57, 0.0556, 344, 3, 5, 0, 0, 5, 10, 1], "semantic": {"name": "stretch_l, stretch_r", "arg_names": [], "import_names": [], "rhs_call_name": "find_black_region_", "annotation": ""}, "snippet": " stretch_l, stretch_r = find_black_region_(src_im, 0, 0, src_im.size[0], 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L70_C2", "label": "stretch_t, stretch_b = find_black_region_()", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7216, 0.0103, 1, 0.57, 0.1111, 104, 3, 5, 0, 0, 5, 10, 1], "semantic": {"name": "stretch_t, stretch_b", "arg_names": [], "import_names": [], "rhs_call_name": "find_black_region_", "annotation": ""}, "snippet": " stretch_t, stretch_b = find_black_region_(src_im, 0, 0, 0, src_im.size[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L72_C2", "label": "pad_l, pad_r = find_black_region_()", "type": "assigned_variable", "loc": [72, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7423, 0.0103, 1, 0.57, 0.1667, 536, 3, 5, 0, 0, 5, 10, 1], "semantic": {"name": "pad_l, pad_r", "arg_names": [], "import_names": [], "rhs_call_name": "find_black_region_", "annotation": ""}, "snippet": " pad_l, pad_r = find_black_region_(src_im, 0, src_im.size[1] - 1, src_im.size[0], src_im.size[1] - 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L73_C2", "label": "pad_t, pad_b = find_black_region_()", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7526, 0.0103, 1, 0.57, 0.2222, 525, 3, 5, 0, 0, 5, 10, 1], "semantic": {"name": "pad_t, pad_b", "arg_names": [], "import_names": [], "rhs_call_name": "find_black_region_", "annotation": ""}, "snippet": " pad_t, pad_b = find_black_region_(src_im, src_im.size[0] - 1, 0, src_im.size[0] - 1, src_im.size[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L76_C2", "label": "template_params =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7835, 0.0103, 1, 0.57, 0.2778, 866, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "template_params", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L77_C2", "label": "assign", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.7938, 0.0103, 1, 0.57, 0.3333, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['id'] = sys.argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L78_C2", "label": " = image_to_data_uri_()", "type": "assigned_variable", "loc": [78, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8041, 0.0103, 1, 0.57, 0.3889, 0, 3, 1, 0, 0, 588, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "image_to_data_uri_", "annotation": ""}, "snippet": " template_params['icon_uri'] = image_to_data_uri_(src_im)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L79_C2", "label": "assign", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8144, 0.0103, 1, 0.57, 0.4444, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['dim_constraint_attributes'] = '' # p:lockHeight=\"true\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L81_C2", "label": " = image_to_data_uri_()", "type": "assigned_variable", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8351, 0.0103, 1, 0.57, 0.5, 0, 3, 1, 0, 0, 588, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "image_to_data_uri_", "annotation": ""}, "snippet": " template_params['image_uri'] = image_to_data_uri_(src_im.crop((1, 1, src_im.size[0] - 1, src_im.size[1] - 1)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L83_C2", "label": "assign", "type": "assigned_variable", "loc": [83, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8557, 0.0103, 1, 0.57, 0.5556, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['width_l'] = stretch_l - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L84_C2", "label": "assign", "type": "assigned_variable", "loc": [84, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.866, 0.0103, 1, 0.57, 0.6111, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['width_r'] = src_im.size[0] - stretch_r - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L85_C2", "label": "assign", "type": "assigned_variable", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8763, 0.0103, 1, 0.57, 0.6667, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['height_t'] = stretch_t - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L86_C2", "label": "assign", "type": "assigned_variable", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.8866, 0.0103, 1, 0.57, 0.7222, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['height_b'] = src_im.size[1] - stretch_b - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L88_C2", "label": "assign", "type": "assigned_variable", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.9072, 0.0103, 1, 0.57, 0.7778, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['pad_l'] = pad_l - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L89_C2", "label": "assign", "type": "assigned_variable", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.9175, 0.0103, 1, 0.57, 0.8333, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['pad_t'] = pad_t - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L90_C2", "label": "assign", "type": "assigned_variable", "loc": [90, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.9278, 0.0103, 1, 0.57, 0.8889, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['pad_r'] = src_im.size[0] - pad_r - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L91_C2", "label": "assign", "type": "assigned_variable", "loc": [91, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [14, 1, 0.9381, 0.0103, 1, 0.57, 0.9444, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['pad_b'] = src_im.size[1] - pad_b - 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L93_C2", "label": "print()", "type": "expression", "loc": [93, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "vector": [8, 1, 0.9588, 0.0103, 1, 0.57, 1.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(open('res/shape_9patch_template.xml').read() % template_params)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:If_L96_C0", "label": "if", "type": "if", "loc": [96, 97], "level": 0, "parent": null, "vector": [4, 0, 0.9948, 0.0206, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L97_C2", "label": "main()", "type": "expression", "loc": [97, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_284:If_L96_C0", "vector": [8, 1, 1.0, 0.0103, 1, 0.11, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:If_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L43_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L44_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L46_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L47_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:While_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_284:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Return_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L57_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Return_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L70_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L84_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L86_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L88_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L89_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Assign_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L93_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_284:If_L96_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_284:Expr_L97_C2"}]
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys import os from StringIO import StringIO from PIL import Image import datauri def image_to_data_uri_(im): f = StringIO() im.save(f, 'PNG') uri = datauri.to_data_uri(f.getvalue(), 'foo.png') f.close() return uri def main(): src_im = Image.open(sys.argv[1]) template_params = {} template_params['id'] = sys.argv[1] template_params['image_uri'] = image_to_data_uri_(src_im) template_params['icon_uri'] = image_to_data_uri_(src_im) template_params['width'] = src_im.size[0] template_params['height'] = src_im.size[1] print open('res/shape_png_template.xml').read() % template_params if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_285
22
48
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_285:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.3542, 0.0208, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.375, 0.0208, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:ImportFrom_L19_C0", "label": "from StringIO import StringIO", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.3958, 0.0208, 0, 0.66, 0.2857, 609, 0, 1, 0, 0, 609, 0, 0], "semantic": {"name": "StringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from StringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:ImportFrom_L20_C0", "label": "from PIL import Image", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.4167, 0.0208, 0, 0.66, 0.4286, 556, 0, 1, 0, 0, 556, 0, 0], "semantic": {"name": "PIL", "arg_names": [], "import_names": ["Image"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PIL import Image"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Import_L22_C0", "label": "datauri import datauri", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.4583, 0.0208, 0, 0.66, 0.5714, 597, 0, 1, 0, 0, 597, 0, 0], "semantic": {"name": "datauri", "arg_names": [], "import_names": ["datauri"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datauri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "label": "image_to_data_uri_", "type": "function", "loc": [25, 30], "level": 0, "parent": null, "vector": [2, 0, 0.5729, 0.125, 0, 0.66, 0.7143, 588, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "image_to_data_uri_", "arg_names": ["im"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def image_to_data_uri_(im):\n f = StringIO()\n im.save(f, 'PNG')\n uri = datauri.to_data_uri(f.getvalue(), 'foo.png')\n f.close()\n return uri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L26_C2", "label": "f = StringIO()", "type": "assigned_variable", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "vector": [14, 1, 0.5417, 0.0208, 1, 0.66, 0.0, 899, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": " f = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L27_C2", "label": "save()", "type": "expression", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "vector": [8, 1, 0.5625, 0.0208, 1, 0.66, 0.25, 928, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "save", "arg_names": [], "import_names": [], "rhs_call_name": "save", "annotation": ""}, "snippet": " im.save(f, 'PNG')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L28_C2", "label": "uri = to_data_uri()", "type": "assigned_variable", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "vector": [14, 1, 0.5833, 0.0208, 1, 0.66, 0.5, 600, 3, 2, 0, 0, 70, 10, 2], "semantic": {"name": "uri", "arg_names": [], "import_names": [], "rhs_call_name": "to_data_uri", "annotation": ""}, "snippet": " uri = datauri.to_data_uri(f.getvalue(), 'foo.png')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L29_C2", "label": "close()", "type": "expression", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "vector": [8, 1, 0.6042, 0.0208, 1, 0.66, 0.75, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " f.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Return_L30_C2", "label": "return", "type": "return", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "vector": [13, 1, 0.625, 0.0208, 1, 0.66, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return uri"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "label": "main", "type": "function", "loc": [33, 44], "level": 0, "parent": null, "vector": [2, 0, 0.8021, 0.25, 0, 0.66, 0.8571, 624, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n src_im = Image.open(sys.argv[1])\n\n template_params = {}\n template_params['id'] = sys.argv[1]\n template_params['image_uri'] = image_to_data_uri_(src_im)\n template_params['icon_uri'] = image_to_data_uri_(src_im)\n "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L34_C2", "label": "src_im = open()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.7083, 0.0208, 1, 0.46, 0.0, 272, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "src_im", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " src_im = Image.open(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L36_C2", "label": "template_params =", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.75, 0.0208, 1, 0.46, 0.1429, 866, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "template_params", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L37_C2", "label": "assign", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.7708, 0.0208, 1, 0.46, 0.2857, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['id'] = sys.argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L38_C2", "label": " = image_to_data_uri_()", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.7917, 0.0208, 1, 0.46, 0.4286, 0, 3, 1, 0, 0, 588, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "image_to_data_uri_", "annotation": ""}, "snippet": " template_params['image_uri'] = image_to_data_uri_(src_im)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L39_C2", "label": " = image_to_data_uri_()", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.8125, 0.0208, 1, 0.46, 0.5714, 0, 3, 1, 0, 0, 588, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "image_to_data_uri_", "annotation": ""}, "snippet": " template_params['icon_uri'] = image_to_data_uri_(src_im)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L41_C2", "label": "assign", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.8542, 0.0208, 1, 0.46, 0.7143, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['width'] = src_im.size[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L42_C2", "label": "assign", "type": "assigned_variable", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [14, 1, 0.875, 0.0208, 1, 0.46, 0.8571, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " template_params['height'] = src_im.size[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L44_C2", "label": "print()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "vector": [8, 1, 0.9167, 0.0208, 1, 0.46, 1.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(open('res/shape_png_template.xml').read() % template_params)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:If_L47_C0", "label": "if", "type": "if", "loc": [47, 48], "level": 0, "parent": null, "vector": [4, 0, 0.9896, 0.0417, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L48_C2", "label": "main()", "type": "expression", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_285:If_L47_C0", "vector": [8, 1, 1.0, 0.0208, 1, 0.79, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Return_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Assign_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:FunctionDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_285:If_L47_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_285:Expr_L48_C2"}]
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import sys import os import os.path import shutil import zipfile def main(): params = {} params['id'] = sys.argv[1] params['displayname'] = sys.argv[2] params['description'] = sys.argv[3] zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w', zipfile.ZIP_DEFLATED) # save stencil XML shapes_xml = '' shapes_folder = 'res/sets/%s/shapes' % params['id'] for shape_file in os.listdir(shapes_folder): if not shape_file.endswith('.xml'): continue shape_xml = open(os.path.join(shapes_folder, shape_file)).read() shapes_xml += shape_xml params['shapes'] = shapes_xml final_xml = open('res/stencil_template.xml').read() % params zip_file.writestr('Definition.xml', final_xml) # save icons icons_folder = 'res/sets/%s/icons' % params['id'] for icon_file in os.listdir(icons_folder): if not icon_file.endswith('.png'): continue zip_file.writestr( 'icons/%s' % icon_file, open(os.path.join(icons_folder, icon_file), 'rb').read()) zip_file.close() if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_286
26
59
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_286:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.2881, 0.0169, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Import_L18_C0", "label": "os import os", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3051, 0.0169, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Import_L19_C0", "label": "os.path import os.path", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.322, 0.0169, 0, 0.66, 0.3333, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Import_L20_C0", "label": "shutil import shutil", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.339, 0.0169, 0, 0.66, 0.5, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import shutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Import_L21_C0", "label": "zipfile import zipfile", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.3559, 0.0169, 0, 0.66, 0.6667, 93, 0, 1, 0, 0, 93, 0, 0], "semantic": {"name": "zipfile", "arg_names": [], "import_names": ["zipfile"], "rhs_call_name": "", "annotation": ""}, "snippet": "import zipfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "label": "main", "type": "function", "loc": [24, 55], "level": 0, "parent": null, "vector": [2, 0, 0.6695, 0.5424, 0, 0.66, 0.8333, 624, 0, 0, 0, 0, 0, 0, 16], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n params = {}\n params['id'] = sys.argv[1]\n params['displayname'] = sys.argv[2]\n params['description'] = sys.argv[3]\n\n zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w',\n zipfile.ZIP_DEFLATED)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L25_C2", "label": "params =", "type": "assigned_variable", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.4237, 0.0169, 1, 0.89, 0.0, 206, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "params", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " params = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L26_C2", "label": "assign", "type": "assigned_variable", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.4407, 0.0169, 1, 0.89, 0.0769, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " params['id'] = sys.argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L27_C2", "label": "assign", "type": "assigned_variable", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.4576, 0.0169, 1, 0.89, 0.1538, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " params['displayname'] = sys.argv[2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L28_C2", "label": "assign", "type": "assigned_variable", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.4746, 0.0169, 1, 0.89, 0.2308, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " params['description'] = sys.argv[3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L30_C2", "label": "zip_file = ZipFile()", "type": "assigned_variable", "loc": [30, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.5169, 0.0339, 1, 0.89, 0.3077, 731, 3, 3, 0, 0, 299, 10, 1], "semantic": {"name": "zip_file", "arg_names": [], "import_names": [], "rhs_call_name": "ZipFile", "annotation": ""}, "snippet": " zip_file = zipfile.ZipFile('dist/stencil-%s.zip' % params['id'], 'w',\n zipfile.ZIP_DEFLATED)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L34_C2", "label": "shapes_xml =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.5763, 0.0169, 1, 0.89, 0.3846, 313, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "shapes_xml", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " shapes_xml = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L35_C2", "label": "shapes_folder =", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.5932, 0.0169, 1, 0.89, 0.4615, 871, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "shapes_folder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " shapes_folder = 'res/sets/%s/shapes' % params['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2", "label": "for shape_file", "type": "for", "loc": [36, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [6, 1, 0.6441, 0.0847, 1, 0.89, 0.5385, 597, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "shape_file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for shape_file in os.listdir(shapes_folder):\n if not shape_file.endswith('.xml'):\n continue\n shape_xml = open(os.path.join(shapes_folder, shape_file)).read()\n shapes_xml += shape_xml"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:If_L37_C4", "label": "if", "type": "if", "loc": [37, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2", "vector": [4, 2, 0.6356, 0.0339, 2, 0.47, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not shape_file.endswith('.xml'):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L39_C4", "label": "shape_xml = read()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2", "vector": [14, 2, 0.661, 0.0169, 2, 0.47, 1.0, 824, 3, 0, 0, 0, 453, 10, 3], "semantic": {"name": "shape_xml", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " shape_xml = open(os.path.join(shapes_folder, shape_file)).read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L42_C2", "label": "assign", "type": "assigned_variable", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.7119, 0.0169, 1, 0.89, 0.6154, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " params['shapes'] = shapes_xml"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L43_C2", "label": "final_xml =", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.7288, 0.0169, 1, 0.89, 0.6923, 988, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "final_xml", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " final_xml = open('res/stencil_template.xml').read() % params"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L44_C2", "label": "writestr()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [8, 1, 0.7458, 0.0169, 1, 0.89, 0.7692, 641, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "writestr", "arg_names": [], "import_names": [], "rhs_call_name": "writestr", "annotation": ""}, "snippet": " zip_file.writestr('Definition.xml', final_xml)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L47_C2", "label": "icons_folder =", "type": "assigned_variable", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [14, 1, 0.7966, 0.0169, 1, 0.89, 0.8462, 262, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "icons_folder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " icons_folder = 'res/sets/%s/icons' % params['id']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2", "label": "for icon_file", "type": "for", "loc": [48, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [6, 1, 0.8559, 0.1017, 1, 0.89, 0.9231, 370, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "icon_file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for icon_file in os.listdir(icons_folder):\n if not icon_file.endswith('.png'):\n continue\n zip_file.writestr(\n 'icons/%s' % icon_file,\n open(os.path.join(icons_folder, icon_file), 'rb').read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:If_L49_C4", "label": "if", "type": "if", "loc": [49, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2", "vector": [4, 2, 0.839, 0.0339, 2, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not icon_file.endswith('.png'):\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L51_C4", "label": "writestr()", "type": "expression", "loc": [51, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2", "vector": [8, 2, 0.8814, 0.0508, 2, 0.74, 1.0, 641, 3, 2, 0, 0, 0, 0, 4], "semantic": {"name": "writestr", "arg_names": [], "import_names": [], "rhs_call_name": "writestr", "annotation": ""}, "snippet": " zip_file.writestr(\n 'icons/%s' % icon_file,\n open(os.path.join(icons_folder, icon_file), 'rb').read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L55_C2", "label": "close()", "type": "expression", "loc": [55, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "vector": [8, 1, 0.9322, 0.0169, 1, 0.89, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " zip_file.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:If_L58_C0", "label": "if", "type": "if", "loc": [58, 59], "level": 0, "parent": null, "vector": [4, 0, 0.9915, 0.0339, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L59_C2", "label": "main()", "type": "expression", "loc": [59, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_286:If_L58_C0", "vector": [8, 1, 1.0, 0.0169, 1, 0.52, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_286:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:For_L36_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_286:If_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:For_L48_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:FunctionDef_L24_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_286:If_L58_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_286:Expr_L59_C2"}]
#!/usr/bin/env python # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import base64 import sys import mimetypes def to_data_uri(data, file_name): '''Takes a file object and returns its data: string.''' mime_type = mimetypes.guess_type(file_name) return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0], data=base64.b64encode(data)) def main(): print to_data_uri(open(sys.argv[1], 'rb').read(), sys.argv[1]) if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_287
11
34
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_287:Import_L17_C0", "label": "base64 import base64", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0294, 0, 0.66, 0.0, 177, 0, 1, 0, 0, 177, 0, 0], "semantic": {"name": "base64", "arg_names": [], "import_names": ["base64"], "rhs_call_name": "", "annotation": ""}, "snippet": "import base64"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Import_L18_C0", "label": "sys import sys", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.5294, 0.0294, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Import_L19_C0", "label": "mimetypes import mimetypes", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.5588, 0.0294, 0, 0.66, 0.4, 583, 0, 1, 0, 0, 583, 0, 0], "semantic": {"name": "mimetypes", "arg_names": [], "import_names": ["mimetypes"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mimetypes"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "label": "to_data_uri", "type": "function", "loc": [22, 26], "level": 0, "parent": null, "vector": [2, 0, 0.7059, 0.1471, 0, 0.66, 0.6, 70, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "to_data_uri", "arg_names": ["data", "file_name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def to_data_uri(data, file_name):\n '''Takes a file object and returns its data: string.'''\n mime_type = mimetypes.guess_type(file_name)\n return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0],\n data=base64.b64encode(data))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L23_C2", "label": "expression", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "vector": [8, 1, 0.6765, 0.0294, 1, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''Takes a file object and returns its data: string.'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Assign_L24_C2", "label": "mime_type = guess_type()", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "vector": [14, 1, 0.7059, 0.0294, 1, 0.63, 0.5, 188, 3, 1, 0, 0, 213, 10, 1], "semantic": {"name": "mime_type", "arg_names": [], "import_names": [], "rhs_call_name": "guess_type", "annotation": ""}, "snippet": " mime_type = mimetypes.guess_type(file_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Return_L25_C2", "label": "return", "type": "return", "loc": [25, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "vector": [13, 1, 0.75, 0.0588, 1, 0.63, 1.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 'data:%(mimetype)s;base64,%(data)s' % dict(mimetype=mime_type[0],\n data=base64.b64encode(data))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L29_C0", "label": "main", "type": "function", "loc": [29, 30], "level": 0, "parent": null, "vector": [2, 0, 0.8676, 0.0588, 0, 0.66, 0.8, 624, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n print(to_data_uri(open(sys.argv[1], 'rb').read(), sys.argv[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L30_C2", "label": "print()", "type": "expression", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L29_C0", "vector": [8, 1, 0.8824, 0.0294, 1, 0.12, 0.0, 535, 3, 1, 0, 0, 0, 0, 4], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(to_data_uri(open(sys.argv[1], 'rb').read(), sys.argv[1]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:If_L33_C0", "label": "if", "type": "if", "loc": [33, 34], "level": 0, "parent": null, "vector": [4, 0, 0.9853, 0.0588, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L34_C2", "label": "main()", "type": "expression", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_287:If_L33_C0", "vector": [8, 1, 1.0, 0.0294, 1, 0.17, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_287:Assign_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_287:Return_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_287:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_287:If_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_287:Expr_L34_C2"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import string import pickle import logging import sys, os, traceback from yaraeditor.constante import * from PyQt4 import * from PyQt4 import QtCore, QtGui from PyQt4.QtCore import (QObject, Qt, QDir, SIGNAL, SLOT) try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s try: from PyQt4.QtCore import QString except ImportError: QString = str class CodeEditor(QtGui.QPlainTextEdit): index=-1 def __init__(self, parent): super(CodeEditor, self).__init__(parent) self.lineNumberArea = LineNumberArea(self) self.completer = None QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8("blockCountChanged(int)")), self.updateLineNumberAreaWidth) QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8("updateRequest(QRect,int)")), self.updateLineNumberArea) QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8("cursorPositionChanged()")), self.highlightCurrentLine) self.updateLineNumberAreaWidth(0) self.highlightCurrentLine() self.setAcceptDrops(True) allStrings = ["all","and","any","ascii","at", "condition","contains","entrypoint","false", "filesize","fullword","for","global", "in","include","index","indexes","int8", "int16","int32","matches","meta","nocase", "not","or","of","private","rule","rva", "section","strings","them","true","uint8", "uint16","uint32","wide"] completer = QtGui.QCompleter(allStrings) completer.setCaseSensitivity(Qt.CaseInsensitive) completer.setWrapAround(False) self.setCompleter(completer) def dragEnterEvent(self, event): if event.mimeData().hasFormat("text/plain"): event.accept() else: event.reject() def dragLeaveEvent(self, event): event.accept() def dropEvent(self, event): data = event.mimeData().data("text/plain") tc = self.textCursor() tc.movePosition(QtGui.QTextCursor.Left) tc.movePosition(QtGui.QTextCursor.EndOfWord) self.setTextCursor(tc) QtGui.QPlainTextEdit.dropEvent(self,event); def lineNumberAreaWidth(self): digits = 1 max = self.qMax(1, self.blockCount()) while (max >= 10): max /= 10 ++digits space = 3 + self.fontMetrics().width('9') * digits+15; return space; def qMax(self, a1, a2): if a1 <= a2: return a2 else: return a1 def updateLineNumberAreaWidth(self,value): self.setViewportMargins(self.lineNumberAreaWidth(), 0, 0, 0) def updateLineNumberArea(self,rect, dy): if (dy): self.lineNumberArea.scroll(0, dy); else: self.lineNumberArea.update(0, rect.y(), self.lineNumberArea.width(), rect.height()); if (rect.contains(self.viewport().rect())): self.updateLineNumberAreaWidth(0); def resizeEvent(self, event): QtGui.QPlainTextEdit.resizeEvent(self,event); cr = self.contentsRect(); self.lineNumberArea.setGeometry(QtCore.QRect(cr.left(), cr.top(), self.lineNumberAreaWidth(), cr.height())) def highlightCurrentLine(self): extraSelections = list() if (not self.isReadOnly()): selection = QtGui.QTextEdit.ExtraSelection() lineColor = QtGui.QColor(Qt.yellow).lighter(160) selection.format.setBackground(lineColor) selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True) selection.cursor = self.textCursor() selection.cursor.clearSelection() extraSelections.append(selection) self.setExtraSelections(extraSelections); def lineNumberAreaPaintEvent(self,event): painter= QtGui.QPainter(self.lineNumberArea) painter.fillRect(event.rect(), Qt.lightGray) block = self.firstVisibleBlock() blockNumber = block.blockNumber() top = self.blockBoundingGeometry(block).translated(self.contentOffset()).top() bottom = top + self.blockBoundingRect(block).height() # print block.isValid(),blockNumber,top,event.rect().bottom() while (block.isValid() and top <= event.rect().bottom()): if (block.isVisible() and bottom >= event.rect().top()): number = str(blockNumber + 1) painter.setPen(Qt.black) painter.drawText(0, top, self.lineNumberArea.width(), self.fontMetrics().height(), Qt.AlignRight, number) block = block.next() top = bottom bottom = top + self.blockBoundingRect(block).height() blockNumber+=1 def setCompleter(self, completer): if self.completer: self.disconnect(self.completer, 0, self, 0) if not completer: return completer.setWidget(self) completer.setCompletionMode(QtGui.QCompleter.PopupCompletion) completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive) self.completer = completer self.connect(self.completer, QtCore.SIGNAL("activated(const QString&)"), self.insertCompletion) def completer(self): return self.completer def insertCompletion(self, completion): tc = self.textCursor() extra = (len(completion) - len(self.completer.completionPrefix())) tc.movePosition(QtGui.QTextCursor.Left) tc.movePosition(QtGui.QTextCursor.EndOfWord) tc.insertText(completion[-extra:]) self.setTextCursor(tc) def textUnderCursor(self): tc = self.textCursor() tc.select(QtGui.QTextCursor.WordUnderCursor) return tc.selectedText() def focusInEvent(self,e): if (self.completer): self.completer.setWidget(self) QtGui.QPlainTextEdit.focusInEvent(self,e) def keyPressEvent(self, event): if self.completer and self.completer.popup().isVisible(): if event.key() in ( QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return, QtCore.Qt.Key_Escape, QtCore.Qt.Key_Tab, QtCore.Qt.Key_Backtab): event.ignore() return ## has ctrl-E been pressed?? isShortcut = (event.modifiers() == QtCore.Qt.ControlModifier and event.key() == QtCore.Qt.Key_E) if (not self.completer or not isShortcut): QtGui.QPlainTextEdit.keyPressEvent(self, event) ## ctrl or shift key on it's own?? ctrlOrShift = event.modifiers() in (QtCore.Qt.ControlModifier , QtCore.Qt.ShiftModifier) if ctrlOrShift and len(event.text())==0: # ctrl or shift key on it's own return eow = "~!@#$%^&*()_+{}|:\"<>?,./;'[]\\-=" hasModifier = ((event.modifiers() != QtCore.Qt.NoModifier) and not ctrlOrShift) completionPrefix = self.textUnderCursor() if (not isShortcut and (hasModifier or len(event.text())==0 or len(completionPrefix) < 3 or event.text()[-1] in eow )): self.completer.popup().hide() return if (completionPrefix != self.completer.completionPrefix()): self.completer.setCompletionPrefix(completionPrefix) popup = self.completer.popup() popup.setCurrentIndex( self.completer.completionModel().index(0,0)) cr = self.cursorRect() cr.setWidth(self.completer.popup().sizeHintForColumn(0) + self.completer.popup().verticalScrollBar().sizeHint().width()) self.completer.complete(cr) ## popup it up! class LineNumberArea(QtGui.QWidget): def __init__(self, parent): super(LineNumberArea, self).__init__(parent) self.codeEditor = parent def sizeHint(self): return QtCore.QSize(self.codeEditor.lineNumberAreaWidth(), 0) def paintEvent(self, event): self.codeEditor.lineNumberAreaPaintEvent(event); # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_289
153
265
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0226, 0.0189, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Import_L12_C0", "label": "string import string", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0453, 0.0038, 0, 0.66, 0.0833, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Import_L13_C0", "label": "pickle import pickle", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0491, 0.0038, 0, 0.66, 0.1667, 848, 0, 1, 0, 0, 848, 0, 0], "semantic": {"name": "pickle", "arg_names": [], "import_names": ["pickle"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pickle"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Import_L14_C0", "label": "logging import logging", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.0528, 0.0038, 0, 0.66, 0.25, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Import_L15_C0", "label": "sys import sys, os, traceback", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.0566, 0.0038, 0, 0.66, 0.3333, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os", "traceback"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys, os, traceback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L16_C0", "label": "from yaraeditor.constante import *", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.0604, 0.0038, 0, 0.66, 0.4167, 99, 0, 1, 0, 0, 99, 0, 0], "semantic": {"name": "yaraeditor.constante", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from yaraeditor.constante import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L18_C0", "label": "from PyQt4 import *", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.0679, 0.0038, 0, 0.66, 0.5, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L19_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.0717, 0.0038, 0, 0.66, 0.5833, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore", "QtGui"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore, QtGui"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L20_C0", "label": "from PyQt4.QtCore import QObject, Qt, QDir\u2026", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.0755, 0.0038, 0, 0.66, 0.6667, 454, 0, 5, 0, 0, 454, 0, 0], "semantic": {"name": "PyQt4.QtCore", "arg_names": [], "import_names": ["QObject", "Qt", "QDir", "SIGNAL", "SLOT"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4.QtCore import (QObject, Qt, QDir, SIGNAL, SLOT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L23_C0", "label": "try", "type": "try", "loc": [23, 26], "level": 0, "parent": null, "vector": [7, 0, 0.0925, 0.0151, 0, 0.66, 0.75, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L24_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L23_C0", "vector": [14, 1, 0.0906, 0.0038, 1, 0.93, 0.0, 412, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = QtCore.QString.fromUtf8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L26_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L23_C0", "vector": [14, 1, 0.0981, 0.0038, 1, 0.93, 0.0, 412, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L28_C0", "label": "try", "type": "try", "loc": [28, 31], "level": 0, "parent": null, "vector": [7, 0, 0.1113, 0.0151, 0, 0.66, 0.8333, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from PyQt4.QtCore import QString\nexcept ImportError:\n QString = str"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L29_C4", "label": "from PyQt4.QtCore import QString", "type": "import", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L28_C0", "vector": [1, 1, 0.1094, 0.0038, 1, 0.7, 0.0, 454, 0, 1, 0, 0, 454, 0, 0], "semantic": {"name": "PyQt4.QtCore", "arg_names": [], "import_names": ["QString"], "rhs_call_name": "", "annotation": ""}, "snippet": " from PyQt4.QtCore import QString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L31_C4", "label": "QString =", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L28_C0", "vector": [14, 1, 0.117, 0.0038, 1, 0.7, 0.0, 19, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "QString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " QString = str"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "label": "CodeEditor", "type": "class", "loc": [33, 249], "level": 0, "parent": null, "vector": [3, 0, 0.5321, 0.8189, 0, 0.66, 0.9167, 94, 0, 17, 0, 0, 470, 0, 99], "semantic": {"name": "CodeEditor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CodeEditor(QtGui.QPlainTextEdit):\n index=-1\n def __init__(self, parent):\n super(CodeEditor, self).__init__(parent)\n self.lineNumberArea = LineNumberArea(self)\n self.completer = None\n\n QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"blockCountChanged(int)\")), self.updateLineNumberAreaWidth)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L34_C4", "label": "index =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [14, 1, 0.1283, 0.0038, 1, 0.18, 0.0, 780, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " index=-1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "label": "__init__", "type": "function", "loc": [35, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.183, 0.1057, 1, 0.18, 0.0588, 555, 0, 2, 0, 0, 0, 0, 19], "semantic": {"name": "__init__", "arg_names": ["self", "parent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent):\n super(CodeEditor, self).__init__(parent)\n self.lineNumberArea = LineNumberArea(self)\n self.completer = None\n\n QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"blockCountChanged(int)\")), self.updateLineNumberAreaWidth)\n QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"updateRequest(QRect,int)\")), self.updateLineNumberArea)\n QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"cursorPositionChanged()\")), self.highlightCurrentLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L36_C8", "label": "__init__()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1358, 0.0038, 2, 0.66, 0.0, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(CodeEditor, self).__init__(parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L37_C8", "label": "self.lineNumberArea = LineNumberArea()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [14, 2, 0.1396, 0.0038, 2, 0.66, 0.0769, 310, 3, 1, 0, 0, 14, 10, 1], "semantic": {"name": "self.lineNumberArea", "arg_names": [], "import_names": [], "rhs_call_name": "LineNumberArea", "annotation": ""}, "snippet": " self.lineNumberArea = LineNumberArea(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L38_C8", "label": "self.completer =", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [14, 2, 0.1434, 0.0038, 2, 0.66, 0.1538, 596, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.completer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.completer = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L40_C8", "label": "connect()", "type": "expression", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1509, 0.0038, 2, 0.66, 0.2308, 242, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"blockCountChanged(int)\")), self.updateLineNumberAreaWidth)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L41_C8", "label": "connect()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1547, 0.0038, 2, 0.66, 0.3077, 242, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"updateRequest(QRect,int)\")), self.updateLineNumberArea)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L42_C8", "label": "connect()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1585, 0.0038, 2, 0.66, 0.3846, 242, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " QtCore.QObject.connect(self, QtCore.SIGNAL(_fromUtf8(\"cursorPositionChanged()\")), self.highlightCurrentLine)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L44_C8", "label": "updateLineNumberAreaWidth()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.166, 0.0038, 2, 0.66, 0.4615, 864, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updateLineNumberAreaWidth", "arg_names": [], "import_names": [], "rhs_call_name": "updateLineNumberAreaWidth", "annotation": ""}, "snippet": " self.updateLineNumberAreaWidth(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L45_C8", "label": "highlightCurrentLine()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1698, 0.0038, 2, 0.66, 0.5385, 869, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "highlightCurrentLine", "arg_names": [], "import_names": [], "rhs_call_name": "highlightCurrentLine", "annotation": ""}, "snippet": " self.highlightCurrentLine()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L47_C8", "label": "setAcceptDrops()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.1774, 0.0038, 2, 0.66, 0.6154, 940, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setAcceptDrops", "arg_names": [], "import_names": [], "rhs_call_name": "setAcceptDrops", "annotation": ""}, "snippet": " self.setAcceptDrops(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L49_C8", "label": "allStrings =", "type": "assigned_variable", "loc": [49, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [14, 2, 0.1981, 0.0302, 2, 0.66, 0.6923, 58, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "allStrings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " allStrings = [\"all\",\"and\",\"any\",\"ascii\",\"at\",\n \"condition\",\"contains\",\"entrypoint\",\"false\",\n \"filesize\",\"fullword\",\"for\",\"global\",\n \"in\",\"include\",\"index\",\"indexes\",\"int8\",\n \"int16\",\"int32\",\"matches\",\"meta\",\"nocase\",\n \"not\",\"or\",\"of\",\"private\",\"rule\",\"rva\",\n \"section\",\"strings\",\"them\",\"true\",\"uint8\",\n \"uint16\",\"uint32\",\"wide\"]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L59_C8", "label": "completer = QCompleter()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [14, 2, 0.2226, 0.0038, 2, 0.66, 0.7692, 66, 3, 1, 0, 0, 413, 10, 1], "semantic": {"name": "completer", "arg_names": [], "import_names": [], "rhs_call_name": "QCompleter", "annotation": ""}, "snippet": " completer = QtGui.QCompleter(allStrings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L60_C8", "label": "setCaseSensitivity()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.2264, 0.0038, 2, 0.66, 0.8462, 137, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCaseSensitivity", "arg_names": [], "import_names": [], "rhs_call_name": "setCaseSensitivity", "annotation": ""}, "snippet": " completer.setCaseSensitivity(Qt.CaseInsensitive)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L61_C8", "label": "setWrapAround()", "type": "expression", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.2302, 0.0038, 2, 0.66, 0.9231, 683, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWrapAround", "arg_names": [], "import_names": [], "rhs_call_name": "setWrapAround", "annotation": ""}, "snippet": " completer.setWrapAround(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L62_C8", "label": "setCompleter()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "vector": [8, 2, 0.234, 0.0038, 2, 0.66, 1.0, 143, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCompleter", "arg_names": [], "import_names": [], "rhs_call_name": "setCompleter", "annotation": ""}, "snippet": " self.setCompleter(completer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L65_C4", "label": "dragEnterEvent", "type": "function", "loc": [65, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.2528, 0.0189, 1, 0.18, 0.1176, 397, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "dragEnterEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dragEnterEvent(self, event):\n if event.mimeData().hasFormat(\"text/plain\"):\n event.accept()\n else:\n event.reject()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8", "label": "if", "type": "if", "loc": [66, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L65_C4", "vector": [4, 2, 0.2547, 0.0151, 2, 0.27, 0.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event.mimeData().hasFormat(\"text/plain\"):\n event.accept()\n else:\n event.reject()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L67_C12", "label": "accept()", "type": "expression", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8", "vector": [8, 3, 0.2528, 0.0038, 3, 0.61, 0.0, 829, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "accept", "arg_names": [], "import_names": [], "rhs_call_name": "accept", "annotation": ""}, "snippet": " event.accept()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L69_C12", "label": "reject()", "type": "expression", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8", "vector": [8, 3, 0.2604, 0.0038, 3, 0.61, 1.0, 575, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reject", "arg_names": [], "import_names": [], "rhs_call_name": "reject", "annotation": ""}, "snippet": " event.reject()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L72_C4", "label": "dragLeaveEvent", "type": "function", "loc": [72, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.2736, 0.0075, 1, 0.18, 0.1765, 363, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "dragLeaveEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dragLeaveEvent(self, event):\n event.accept()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L73_C8", "label": "accept()", "type": "expression", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L72_C4", "vector": [8, 2, 0.2755, 0.0038, 2, 0.39, 0.0, 829, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "accept", "arg_names": [], "import_names": [], "rhs_call_name": "accept", "annotation": ""}, "snippet": " event.accept()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "label": "dropEvent", "type": "function", "loc": [76, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.3, 0.0302, 1, 0.18, 0.2353, 952, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "dropEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dropEvent(self, event):\n data = event.mimeData().data(\"text/plain\")\n tc = self.textCursor()\n tc.movePosition(QtGui.QTextCursor.Left)\n tc.movePosition(QtGui.QTextCursor.EndOfWord) \n\n self.setTextCursor(tc)\n QtGui.QPlainTextEdit.dropEvent(self,event); "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L77_C8", "label": "data = data()", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [14, 2, 0.2906, 0.0038, 2, 0.5, 0.0, 929, 3, 1, 0, 0, 929, 10, 2], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "data", "annotation": ""}, "snippet": " data = event.mimeData().data(\"text/plain\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L78_C8", "label": "tc = textCursor()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [14, 2, 0.2943, 0.0038, 2, 0.5, 0.2, 375, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "tc", "arg_names": [], "import_names": [], "rhs_call_name": "textCursor", "annotation": ""}, "snippet": " tc = self.textCursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L79_C8", "label": "movePosition()", "type": "expression", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [8, 2, 0.2981, 0.0038, 2, 0.5, 0.4, 626, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "movePosition", "arg_names": [], "import_names": [], "rhs_call_name": "movePosition", "annotation": ""}, "snippet": " tc.movePosition(QtGui.QTextCursor.Left)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L80_C8", "label": "movePosition()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [8, 2, 0.3019, 0.0038, 2, 0.5, 0.6, 626, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "movePosition", "arg_names": [], "import_names": [], "rhs_call_name": "movePosition", "annotation": ""}, "snippet": " tc.movePosition(QtGui.QTextCursor.EndOfWord) "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L82_C8", "label": "setTextCursor()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [8, 2, 0.3094, 0.0038, 2, 0.5, 0.8, 143, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setTextCursor", "arg_names": [], "import_names": [], "rhs_call_name": "setTextCursor", "annotation": ""}, "snippet": " self.setTextCursor(tc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L83_C8", "label": "dropEvent()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "vector": [8, 2, 0.3132, 0.0038, 2, 0.5, 1.0, 952, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "dropEvent", "arg_names": [], "import_names": [], "rhs_call_name": "dropEvent", "annotation": ""}, "snippet": " QtGui.QPlainTextEdit.dropEvent(self,event); "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "label": "lineNumberAreaWidth", "type": "function", "loc": [86, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.3415, 0.0377, 1, 0.18, 0.2941, 643, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "lineNumberAreaWidth", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lineNumberAreaWidth(self):\n digits = 1\n max = self.qMax(1, self.blockCount())\n while (max >= 10):\n max /= 10\n ++digits\n\n space = 3 + self.fontMetrics().width('9') * digits+15;"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L87_C8", "label": "digits =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "vector": [14, 2, 0.3283, 0.0038, 2, 0.19, 0.0, 400, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "digits", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " digits = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L88_C8", "label": "max = qMax()", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "vector": [14, 2, 0.3321, 0.0038, 2, 0.19, 0.25, 442, 3, 2, 0, 0, 166, 10, 2], "semantic": {"name": "max", "arg_names": [], "import_names": [], "rhs_call_name": "qMax", "annotation": ""}, "snippet": " max = self.qMax(1, self.blockCount())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:While_L89_C8", "label": "while", "type": "while", "loc": [89, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "vector": [5, 2, 0.3396, 0.0113, 2, 0.19, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while (max >= 10):\n max /= 10\n ++digits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L91_C12", "label": "expression", "type": "expression", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:While_L89_C8", "vector": [8, 3, 0.3434, 0.0038, 3, 0.44, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ++digits"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L93_C8", "label": "space =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "vector": [14, 2, 0.3509, 0.0038, 2, 0.19, 0.75, 215, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "space", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " space = 3 + self.fontMetrics().width('9') * digits+15;"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L95_C8", "label": "return", "type": "return", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "vector": [13, 2, 0.3585, 0.0038, 2, 0.19, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return space;"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L97_C4", "label": "qMax", "type": "function", "loc": [97, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.3736, 0.0189, 1, 0.18, 0.3529, 166, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "qMax", "arg_names": ["self", "a1", "a2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def qMax(self, a1, a2):\n if a1 <= a2:\n return a2\n else:\n return a1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8", "label": "if", "type": "if", "loc": [98, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L97_C4", "vector": [4, 2, 0.3755, 0.0151, 2, 0.72, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if a1 <= a2:\n return a2\n else:\n return a1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L99_C12", "label": "return", "type": "return", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8", "vector": [13, 3, 0.3736, 0.0038, 3, 0.1, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return a2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L101_C12", "label": "return", "type": "return", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8", "vector": [13, 3, 0.3811, 0.0038, 3, 0.1, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return a1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L103_C4", "label": "updateLineNumberAreaWidth", "type": "function", "loc": [103, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.3906, 0.0075, 1, 0.18, 0.4118, 864, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "updateLineNumberAreaWidth", "arg_names": ["self", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateLineNumberAreaWidth(self,value):\n self.setViewportMargins(self.lineNumberAreaWidth(), 0, 0, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L104_C8", "label": "setViewportMargins()", "type": "expression", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L103_C4", "vector": [8, 2, 0.3925, 0.0038, 2, 0.59, 0.0, 187, 3, 4, 0, 0, 0, 0, 2], "semantic": {"name": "setViewportMargins", "arg_names": [], "import_names": [], "rhs_call_name": "setViewportMargins", "annotation": ""}, "snippet": " self.setViewportMargins(self.lineNumberAreaWidth(), 0, 0, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4", "label": "updateLineNumberArea", "type": "function", "loc": [106, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.4132, 0.0302, 1, 0.18, 0.4706, 683, 0, 3, 0, 0, 0, 0, 9], "semantic": {"name": "updateLineNumberArea", "arg_names": ["self", "rect", "dy"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def updateLineNumberArea(self,rect, dy):\n if (dy):\n self.lineNumberArea.scroll(0, dy);\n else:\n self.lineNumberArea.update(0, rect.y(), self.lineNumberArea.width(), rect.height());\n\n if (rect.contains(self.viewport().rect())):\n self.updateLineNumberAreaWidth(0);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8", "label": "if", "type": "if", "loc": [107, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4", "vector": [4, 2, 0.4094, 0.0151, 2, 0.38, 0.0, 0, 2, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (dy):\n self.lineNumberArea.scroll(0, dy);\n else:\n self.lineNumberArea.update(0, rect.y(), self.lineNumberArea.width(), rect.height());"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L108_C12", "label": "scroll()", "type": "expression", "loc": [108, 108], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8", "vector": [8, 3, 0.4075, 0.0038, 3, 0.76, 0.0, 320, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "scroll", "arg_names": [], "import_names": [], "rhs_call_name": "scroll", "annotation": ""}, "snippet": " self.lineNumberArea.scroll(0, dy);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L110_C12", "label": "update()", "type": "expression", "loc": [110, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8", "vector": [8, 3, 0.4151, 0.0038, 3, 0.76, 1.0, 637, 3, 4, 0, 0, 0, 0, 4], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " self.lineNumberArea.update(0, rect.y(), self.lineNumberArea.width(), rect.height());"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L112_C8", "label": "if", "type": "if", "loc": [112, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4", "vector": [4, 2, 0.4245, 0.0075, 2, 0.38, 1.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (rect.contains(self.viewport().rect())):\n self.updateLineNumberAreaWidth(0);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L113_C12", "label": "updateLineNumberAreaWidth()", "type": "expression", "loc": [113, 113], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L112_C8", "vector": [8, 3, 0.4264, 0.0038, 3, 0.13, 0.0, 864, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "updateLineNumberAreaWidth", "arg_names": [], "import_names": [], "rhs_call_name": "updateLineNumberAreaWidth", "annotation": ""}, "snippet": " self.updateLineNumberAreaWidth(0);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "label": "resizeEvent", "type": "function", "loc": [115, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.4396, 0.0151, 1, 0.18, 0.5294, 900, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "resizeEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def resizeEvent(self, event):\n QtGui.QPlainTextEdit.resizeEvent(self,event);\n cr = self.contentsRect();\n self.lineNumberArea.setGeometry(QtCore.QRect(cr.left(), cr.top(), self.lineNumberAreaWidth(), cr.height()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L116_C8", "label": "resizeEvent()", "type": "expression", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "vector": [8, 2, 0.4377, 0.0038, 2, 0.32, 0.0, 900, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "resizeEvent", "arg_names": [], "import_names": [], "rhs_call_name": "resizeEvent", "annotation": ""}, "snippet": " QtGui.QPlainTextEdit.resizeEvent(self,event);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L117_C8", "label": "cr = contentsRect()", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "vector": [14, 2, 0.4415, 0.0038, 2, 0.32, 0.5, 766, 3, 0, 0, 0, 986, 10, 1], "semantic": {"name": "cr", "arg_names": [], "import_names": [], "rhs_call_name": "contentsRect", "annotation": ""}, "snippet": " cr = self.contentsRect();"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L118_C8", "label": "setGeometry()", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "vector": [8, 2, 0.4453, 0.0038, 2, 0.32, 1.0, 648, 3, 1, 0, 0, 0, 0, 6], "semantic": {"name": "setGeometry", "arg_names": [], "import_names": [], "rhs_call_name": "setGeometry", "annotation": ""}, "snippet": " self.lineNumberArea.setGeometry(QtCore.QRect(cr.left(), cr.top(), self.lineNumberAreaWidth(), cr.height()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "label": "highlightCurrentLine", "type": "function", "loc": [120, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.483, 0.0642, 1, 0.18, 0.5882, 869, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "highlightCurrentLine", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def highlightCurrentLine(self):\n extraSelections = list()\n\n if (not self.isReadOnly()):\n\n selection = QtGui.QTextEdit.ExtraSelection()\n\n lineColor = QtGui.QColor(Qt.yellow).lighter(160)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L121_C8", "label": "extraSelections = list()", "type": "assigned_variable", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "vector": [14, 2, 0.4566, 0.0038, 2, 0.51, 0.0, 212, 3, 0, 0, 0, 430, 10, 1], "semantic": {"name": "extraSelections", "arg_names": [], "import_names": [], "rhs_call_name": "list", "annotation": ""}, "snippet": " extraSelections = list()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "label": "if", "type": "if", "loc": [123, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "vector": [4, 2, 0.483, 0.0415, 2, 0.51, 0.5, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not self.isReadOnly()):\n\n selection = QtGui.QTextEdit.ExtraSelection()\n\n lineColor = QtGui.QColor(Qt.yellow).lighter(160)\n\n selection.format.setBackground(lineColor)\n selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L125_C12", "label": "selection = ExtraSelection()", "type": "assigned_variable", "loc": [125, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [14, 3, 0.4717, 0.0038, 3, 0.54, 0.0, 441, 3, 0, 0, 0, 834, 10, 1], "semantic": {"name": "selection", "arg_names": [], "import_names": [], "rhs_call_name": "ExtraSelection", "annotation": ""}, "snippet": " selection = QtGui.QTextEdit.ExtraSelection()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L127_C12", "label": "lineColor = lighter()", "type": "assigned_variable", "loc": [127, 127], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [14, 3, 0.4792, 0.0038, 3, 0.54, 0.1667, 239, 3, 1, 0, 0, 850, 10, 2], "semantic": {"name": "lineColor", "arg_names": [], "import_names": [], "rhs_call_name": "lighter", "annotation": ""}, "snippet": " lineColor = QtGui.QColor(Qt.yellow).lighter(160)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L129_C12", "label": "setBackground()", "type": "expression", "loc": [129, 129], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [8, 3, 0.4868, 0.0038, 3, 0.54, 0.3333, 107, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setBackground", "arg_names": [], "import_names": [], "rhs_call_name": "setBackground", "annotation": ""}, "snippet": " selection.format.setBackground(lineColor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L130_C12", "label": "setProperty()", "type": "expression", "loc": [130, 130], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [8, 3, 0.4906, 0.0038, 3, 0.54, 0.5, 216, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setProperty", "arg_names": [], "import_names": [], "rhs_call_name": "setProperty", "annotation": ""}, "snippet": " selection.format.setProperty(QtGui.QTextFormat.FullWidthSelection, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L131_C12", "label": "selection.cursor = textCursor()", "type": "assigned_variable", "loc": [131, 131], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [14, 3, 0.4943, 0.0038, 3, 0.54, 0.6667, 290, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "selection.cursor", "arg_names": [], "import_names": [], "rhs_call_name": "textCursor", "annotation": ""}, "snippet": " selection.cursor = self.textCursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L132_C12", "label": "clearSelection()", "type": "expression", "loc": [132, 132], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [8, 3, 0.4981, 0.0038, 3, 0.54, 0.8333, 555, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clearSelection", "arg_names": [], "import_names": [], "rhs_call_name": "clearSelection", "annotation": ""}, "snippet": " selection.cursor.clearSelection()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L133_C12", "label": "append()", "type": "expression", "loc": [133, 133], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "vector": [8, 3, 0.5019, 0.0038, 3, 0.54, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " extraSelections.append(selection)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L136_C8", "label": "setExtraSelections()", "type": "expression", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "vector": [8, 2, 0.5132, 0.0038, 2, 0.51, 1.0, 445, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setExtraSelections", "arg_names": [], "import_names": [], "rhs_call_name": "setExtraSelections", "annotation": ""}, "snippet": " self.setExtraSelections(extraSelections);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "label": "lineNumberAreaPaintEvent", "type": "function", "loc": [138, 163], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.5679, 0.0981, 1, 0.18, 0.6471, 338, 0, 2, 0, 0, 0, 0, 26], "semantic": {"name": "lineNumberAreaPaintEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def lineNumberAreaPaintEvent(self,event):\n\n painter= QtGui.QPainter(self.lineNumberArea)\n painter.fillRect(event.rect(), Qt.lightGray)\n\n\n\n block = self.firstVisibleBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L140_C8", "label": "painter = QPainter()", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [14, 2, 0.5283, 0.0038, 2, 0.86, 0.0, 481, 3, 1, 0, 0, 972, 10, 1], "semantic": {"name": "painter", "arg_names": [], "import_names": [], "rhs_call_name": "QPainter", "annotation": ""}, "snippet": " painter= QtGui.QPainter(self.lineNumberArea)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L141_C8", "label": "fillRect()", "type": "expression", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [8, 2, 0.5321, 0.0038, 2, 0.86, 0.1667, 477, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "fillRect", "arg_names": [], "import_names": [], "rhs_call_name": "fillRect", "annotation": ""}, "snippet": " painter.fillRect(event.rect(), Qt.lightGray)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L145_C8", "label": "block = firstVisibleBlock()", "type": "assigned_variable", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [14, 2, 0.5472, 0.0038, 2, 0.86, 0.3333, 506, 3, 0, 0, 0, 58, 10, 1], "semantic": {"name": "block", "arg_names": [], "import_names": [], "rhs_call_name": "firstVisibleBlock", "annotation": ""}, "snippet": " block = self.firstVisibleBlock()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L146_C8", "label": "blockNumber = blockNumber()", "type": "assigned_variable", "loc": [146, 146], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [14, 2, 0.5509, 0.0038, 2, 0.86, 0.5, 670, 3, 0, 0, 0, 670, 10, 1], "semantic": {"name": "blockNumber", "arg_names": [], "import_names": [], "rhs_call_name": "blockNumber", "annotation": ""}, "snippet": " blockNumber = block.blockNumber()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L147_C8", "label": "top = top()", "type": "assigned_variable", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [14, 2, 0.5547, 0.0038, 2, 0.86, 0.6667, 208, 3, 0, 0, 0, 208, 10, 4], "semantic": {"name": "top", "arg_names": [], "import_names": [], "rhs_call_name": "top", "annotation": ""}, "snippet": " top = self.blockBoundingGeometry(block).translated(self.contentOffset()).top()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L148_C8", "label": "bottom =", "type": "assigned_variable", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [14, 2, 0.5585, 0.0038, 2, 0.86, 0.8333, 391, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "bottom", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bottom = top + self.blockBoundingRect(block).height()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "label": "while", "type": "while", "loc": [152, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "vector": [5, 2, 0.5943, 0.0453, 2, 0.86, 1.0, 0, 0, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while (block.isValid() and top <= event.rect().bottom()):\n\n if (block.isVisible() and bottom >= event.rect().top()):\n number = str(blockNumber + 1)\n\n painter.setPen(Qt.black)\n painter.drawText(0, top, self.lineNumberArea.width(), self.fontMetrics().height(), Qt.AlignRight, number)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "label": "if", "type": "if", "loc": [154, 158], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "vector": [4, 3, 0.5887, 0.0189, 3, 0.73, 0.0, 0, 0, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (block.isVisible() and bottom >= event.rect().top()):\n number = str(blockNumber + 1)\n\n painter.setPen(Qt.black)\n painter.drawText(0, top, self.lineNumberArea.width(), self.fontMetrics().height(), Qt.AlignRight, number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L155_C16", "label": "number = str()", "type": "assigned_variable", "loc": [155, 155], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "vector": [14, 4, 0.5849, 0.0038, 4, 0.76, 0.0, 408, 3, 1, 0, 0, 52, 10, 1], "semantic": {"name": "number", "arg_names": [], "import_names": [], "rhs_call_name": "str", "annotation": ""}, "snippet": " number = str(blockNumber + 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L157_C16", "label": "setPen()", "type": "expression", "loc": [157, 157], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "vector": [8, 4, 0.5925, 0.0038, 4, 0.76, 0.5, 129, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setPen", "arg_names": [], "import_names": [], "rhs_call_name": "setPen", "annotation": ""}, "snippet": " painter.setPen(Qt.black)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L158_C16", "label": "drawText()", "type": "expression", "loc": [158, 158], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "vector": [8, 4, 0.5962, 0.0038, 4, 0.76, 1.0, 802, 3, 6, 0, 0, 0, 0, 4], "semantic": {"name": "drawText", "arg_names": [], "import_names": [], "rhs_call_name": "drawText", "annotation": ""}, "snippet": " painter.drawText(0, top, self.lineNumberArea.width(), self.fontMetrics().height(), Qt.AlignRight, number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L160_C12", "label": "block = next()", "type": "assigned_variable", "loc": [160, 160], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "vector": [14, 3, 0.6038, 0.0038, 3, 0.73, 0.3333, 506, 3, 0, 0, 0, 11, 10, 1], "semantic": {"name": "block", "arg_names": [], "import_names": [], "rhs_call_name": "next", "annotation": ""}, "snippet": " block = block.next()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L161_C12", "label": "top =", "type": "assigned_variable", "loc": [161, 161], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "vector": [14, 3, 0.6075, 0.0038, 3, 0.73, 0.6667, 208, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "top", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " top = bottom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L162_C12", "label": "bottom =", "type": "assigned_variable", "loc": [162, 162], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "vector": [14, 3, 0.6113, 0.0038, 3, 0.73, 1.0, 391, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "bottom", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " bottom = top + self.blockBoundingRect(block).height()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "label": "setCompleter", "type": "function", "loc": [165, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.6434, 0.0453, 1, 0.18, 0.7059, 143, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "setCompleter", "arg_names": ["self", "completer"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setCompleter(self, completer):\n if self.completer:\n self.disconnect(self.completer, 0, self, 0)\n if not completer:\n return\n\n completer.setWidget(self)\n completer.setCompletionMode(QtGui.QCompleter.PopupCompletion)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L166_C8", "label": "if", "type": "if", "loc": [166, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [4, 2, 0.6283, 0.0075, 2, 0.63, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.completer:\n self.disconnect(self.completer, 0, self, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L167_C12", "label": "disconnect()", "type": "expression", "loc": [167, 167], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L166_C8", "vector": [8, 3, 0.6302, 0.0038, 3, 0.78, 0.0, 978, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "disconnect", "arg_names": [], "import_names": [], "rhs_call_name": "disconnect", "annotation": ""}, "snippet": " self.disconnect(self.completer, 0, self, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L168_C8", "label": "if", "type": "if", "loc": [168, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [4, 2, 0.6358, 0.0075, 2, 0.63, 0.1667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not completer:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L169_C12", "label": "return", "type": "return", "loc": [169, 169], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L168_C8", "vector": [13, 3, 0.6377, 0.0038, 3, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L171_C8", "label": "setWidget()", "type": "expression", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [8, 2, 0.6453, 0.0038, 2, 0.63, 0.3333, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " completer.setWidget(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L172_C8", "label": "setCompletionMode()", "type": "expression", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [8, 2, 0.6491, 0.0038, 2, 0.63, 0.5, 136, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCompletionMode", "arg_names": [], "import_names": [], "rhs_call_name": "setCompletionMode", "annotation": ""}, "snippet": " completer.setCompletionMode(QtGui.QCompleter.PopupCompletion)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L173_C8", "label": "setCaseSensitivity()", "type": "expression", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [8, 2, 0.6528, 0.0038, 2, 0.63, 0.6667, 137, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCaseSensitivity", "arg_names": [], "import_names": [], "rhs_call_name": "setCaseSensitivity", "annotation": ""}, "snippet": " completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L174_C8", "label": "self.completer =", "type": "assigned_variable", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [14, 2, 0.6566, 0.0038, 2, 0.63, 0.8333, 596, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.completer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.completer = completer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L175_C8", "label": "connect()", "type": "expression", "loc": [175, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "vector": [8, 2, 0.6623, 0.0075, 2, 0.63, 1.0, 242, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " self.connect(self.completer,\n QtCore.SIGNAL(\"activated(const QString&)\"), self.insertCompletion)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L178_C4", "label": "completer", "type": "function", "loc": [178, 179], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.6736, 0.0075, 1, 0.18, 0.7647, 66, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "completer", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def completer(self):\n return self.completer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L179_C8", "label": "return", "type": "return", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L178_C4", "vector": [13, 2, 0.6755, 0.0038, 2, 0.75, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.completer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "label": "insertCompletion", "type": "function", "loc": [182, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.6981, 0.0264, 1, 0.18, 0.8235, 750, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "insertCompletion", "arg_names": ["self", "completion"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def insertCompletion(self, completion):\n tc = self.textCursor()\n extra = (len(completion) - len(self.completer.completionPrefix()))\n tc.movePosition(QtGui.QTextCursor.Left)\n tc.movePosition(QtGui.QTextCursor.EndOfWord)\n tc.insertText(completion[-extra:])\n self.setTextCursor(tc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L183_C8", "label": "tc = textCursor()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [14, 2, 0.6906, 0.0038, 2, 0.75, 0.0, 375, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "tc", "arg_names": [], "import_names": [], "rhs_call_name": "textCursor", "annotation": ""}, "snippet": " tc = self.textCursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L184_C8", "label": "extra =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [14, 2, 0.6943, 0.0038, 2, 0.75, 0.2, 980, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "extra", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extra = (len(completion) - len(self.completer.completionPrefix()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L185_C8", "label": "movePosition()", "type": "expression", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [8, 2, 0.6981, 0.0038, 2, 0.75, 0.4, 626, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "movePosition", "arg_names": [], "import_names": [], "rhs_call_name": "movePosition", "annotation": ""}, "snippet": " tc.movePosition(QtGui.QTextCursor.Left)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L186_C8", "label": "movePosition()", "type": "expression", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [8, 2, 0.7019, 0.0038, 2, 0.75, 0.6, 626, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "movePosition", "arg_names": [], "import_names": [], "rhs_call_name": "movePosition", "annotation": ""}, "snippet": " tc.movePosition(QtGui.QTextCursor.EndOfWord)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L187_C8", "label": "insertText()", "type": "expression", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [8, 2, 0.7057, 0.0038, 2, 0.75, 0.8, 823, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "insertText", "arg_names": [], "import_names": [], "rhs_call_name": "insertText", "annotation": ""}, "snippet": " tc.insertText(completion[-extra:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L188_C8", "label": "setTextCursor()", "type": "expression", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "vector": [8, 2, 0.7094, 0.0038, 2, 0.75, 1.0, 143, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setTextCursor", "arg_names": [], "import_names": [], "rhs_call_name": "setTextCursor", "annotation": ""}, "snippet": " self.setTextCursor(tc)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "label": "textUnderCursor", "type": "function", "loc": [191, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.7264, 0.0151, 1, 0.18, 0.8824, 372, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "textUnderCursor", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def textUnderCursor(self):\n tc = self.textCursor()\n tc.select(QtGui.QTextCursor.WordUnderCursor)\n return tc.selectedText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L192_C8", "label": "tc = textCursor()", "type": "assigned_variable", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "vector": [14, 2, 0.7245, 0.0038, 2, 0.53, 0.0, 375, 3, 0, 0, 0, 942, 10, 1], "semantic": {"name": "tc", "arg_names": [], "import_names": [], "rhs_call_name": "textCursor", "annotation": ""}, "snippet": " tc = self.textCursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L193_C8", "label": "select()", "type": "expression", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "vector": [8, 2, 0.7283, 0.0038, 2, 0.53, 0.5, 438, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "select", "arg_names": [], "import_names": [], "rhs_call_name": "select", "annotation": ""}, "snippet": " tc.select(QtGui.QTextCursor.WordUnderCursor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L194_C8", "label": "return", "type": "return", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "vector": [13, 2, 0.7321, 0.0038, 2, 0.53, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return tc.selectedText()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4", "label": "focusInEvent", "type": "function", "loc": [196, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.7453, 0.0151, 1, 0.18, 0.9412, 993, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "focusInEvent", "arg_names": ["self", "e"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def focusInEvent(self,e):\n if (self.completer):\n self.completer.setWidget(self)\n QtGui.QPlainTextEdit.focusInEvent(self,e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L197_C8", "label": "if", "type": "if", "loc": [197, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4", "vector": [4, 2, 0.7453, 0.0075, 2, 0.23, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (self.completer):\n self.completer.setWidget(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L198_C12", "label": "setWidget()", "type": "expression", "loc": [198, 198], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L197_C8", "vector": [8, 3, 0.7472, 0.0038, 3, 0.28, 0.0, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " self.completer.setWidget(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L199_C8", "label": "focusInEvent()", "type": "expression", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4", "vector": [8, 2, 0.7509, 0.0038, 2, 0.23, 1.0, 993, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "focusInEvent", "arg_names": [], "import_names": [], "rhs_call_name": "focusInEvent", "annotation": ""}, "snippet": " QtGui.QPlainTextEdit.focusInEvent(self,e)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "label": "keyPressEvent", "type": "function", "loc": [203, 249], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "vector": [2, 1, 0.8528, 0.1774, 1, 0.18, 1.0, 207, 0, 2, 0, 0, 0, 0, 33], "semantic": {"name": "keyPressEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def keyPressEvent(self, event):\n if self.completer and self.completer.popup().isVisible():\n if event.key() in (\n QtCore.Qt.Key_Enter,\n QtCore.Qt.Key_Return,\n QtCore.Qt.Key_Escape,\n QtCore.Qt.Key_Tab,\n QtCore.Qt.Key_Backtab):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L204_C8", "label": "if", "type": "if", "loc": [204, 212], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [4, 2, 0.7849, 0.034, 2, 0.59, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.completer and self.completer.popup().isVisible():\n if event.key() in (\n QtCore.Qt.Key_Enter,\n QtCore.Qt.Key_Return,\n QtCore.Qt.Key_Escape,\n QtCore.Qt.Key_Tab,\n QtCore.Qt.Key_Backtab):\n event.ignore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12", "label": "if", "type": "if", "loc": [205, 212], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L204_C8", "vector": [4, 3, 0.7868, 0.0302, 3, 0.32, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event.key() in (\n QtCore.Qt.Key_Enter,\n QtCore.Qt.Key_Return,\n QtCore.Qt.Key_Escape,\n QtCore.Qt.Key_Tab,\n QtCore.Qt.Key_Backtab):\n event.ignore()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L211_C16", "label": "ignore()", "type": "expression", "loc": [211, 211], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12", "vector": [8, 4, 0.7962, 0.0038, 4, 0.01, 0.0, 371, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "ignore", "arg_names": [], "import_names": [], "rhs_call_name": "ignore", "annotation": ""}, "snippet": " event.ignore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L212_C16", "label": "return", "type": "return", "loc": [212, 212], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12", "vector": [13, 4, 0.8, 0.0038, 4, 0.01, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L215_C8", "label": "isShortcut =", "type": "assigned_variable", "loc": [215, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.8132, 0.0075, 2, 0.59, 0.0833, 743, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "isShortcut", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " isShortcut = (event.modifiers() == QtCore.Qt.ControlModifier and\n event.key() == QtCore.Qt.Key_E)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L217_C8", "label": "if", "type": "if", "loc": [217, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [4, 2, 0.8208, 0.0075, 2, 0.59, 0.1667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not self.completer or not isShortcut):\n QtGui.QPlainTextEdit.keyPressEvent(self, event)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L218_C12", "label": "keyPressEvent()", "type": "expression", "loc": [218, 218], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L217_C8", "vector": [8, 3, 0.8226, 0.0038, 3, 0.18, 0.0, 207, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "keyPressEvent", "arg_names": [], "import_names": [], "rhs_call_name": "keyPressEvent", "annotation": ""}, "snippet": " QtGui.QPlainTextEdit.keyPressEvent(self, event)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L221_C8", "label": "ctrlOrShift =", "type": "assigned_variable", "loc": [221, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.8358, 0.0075, 2, 0.59, 0.25, 652, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "ctrlOrShift", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " ctrlOrShift = event.modifiers() in (QtCore.Qt.ControlModifier ,\n QtCore.Qt.ShiftModifier)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L223_C8", "label": "if", "type": "if", "loc": [223, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [4, 2, 0.8453, 0.0113, 2, 0.59, 0.3333, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ctrlOrShift and len(event.text())==0:\n # ctrl or shift key on it's own\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L225_C12", "label": "return", "type": "return", "loc": [225, 225], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L223_C8", "vector": [13, 3, 0.8491, 0.0038, 3, 0.67, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L227_C8", "label": "eow =", "type": "assigned_variable", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.8566, 0.0038, 2, 0.59, 0.4167, 137, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "eow", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " eow = \"~!@#$%^&*()_+{}|:\\\"<>?,./;'[]\\\\-=\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L229_C8", "label": "hasModifier =", "type": "assigned_variable", "loc": [229, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.866, 0.0075, 2, 0.59, 0.5, 128, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hasModifier", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " hasModifier = ((event.modifiers() != QtCore.Qt.NoModifier) and\n not ctrlOrShift)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L232_C8", "label": "completionPrefix = textUnderCursor()", "type": "assigned_variable", "loc": [232, 232], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.8755, 0.0038, 2, 0.59, 0.5833, 609, 3, 0, 0, 0, 372, 10, 1], "semantic": {"name": "completionPrefix", "arg_names": [], "import_names": [], "rhs_call_name": "textUnderCursor", "annotation": ""}, "snippet": " completionPrefix = self.textUnderCursor()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8", "label": "if", "type": "if", "loc": [234, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [4, 2, 0.8906, 0.0189, 2, 0.59, 0.6667, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (not isShortcut and (hasModifier or len(event.text())==0 or\n len(completionPrefix) < 3 or\n event.text()[-1] in eow )):\n self.completer.popup().hide()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L237_C12", "label": "hide()", "type": "expression", "loc": [237, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8", "vector": [8, 3, 0.8943, 0.0038, 3, 0.51, 0.0, 434, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.completer.popup().hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L238_C12", "label": "return", "type": "return", "loc": [238, 238], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8", "vector": [13, 3, 0.8981, 0.0038, 3, 0.51, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "label": "if", "type": "if", "loc": [240, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [4, 2, 0.9132, 0.0189, 2, 0.59, 0.75, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (completionPrefix != self.completer.completionPrefix()):\n self.completer.setCompletionPrefix(completionPrefix)\n popup = self.completer.popup()\n popup.setCurrentIndex(\n self.completer.completionModel().index(0,0))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L241_C12", "label": "setCompletionPrefix()", "type": "expression", "loc": [241, 241], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "vector": [8, 3, 0.9094, 0.0038, 3, 0.64, 0.0, 443, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCompletionPrefix", "arg_names": [], "import_names": [], "rhs_call_name": "setCompletionPrefix", "annotation": ""}, "snippet": " self.completer.setCompletionPrefix(completionPrefix)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L242_C12", "label": "popup = popup()", "type": "assigned_variable", "loc": [242, 242], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "vector": [14, 3, 0.9132, 0.0038, 3, 0.64, 0.5, 897, 3, 0, 0, 0, 897, 10, 1], "semantic": {"name": "popup", "arg_names": [], "import_names": [], "rhs_call_name": "popup", "annotation": ""}, "snippet": " popup = self.completer.popup()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L243_C12", "label": "setCurrentIndex()", "type": "expression", "loc": [243, 244], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "vector": [8, 3, 0.9189, 0.0075, 3, 0.64, 1.0, 142, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "setCurrentIndex", "arg_names": [], "import_names": [], "rhs_call_name": "setCurrentIndex", "annotation": ""}, "snippet": " popup.setCurrentIndex(\n self.completer.completionModel().index(0,0))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L246_C8", "label": "cr = cursorRect()", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [14, 2, 0.9283, 0.0038, 2, 0.59, 0.8333, 766, 3, 0, 0, 0, 564, 10, 1], "semantic": {"name": "cr", "arg_names": [], "import_names": [], "rhs_call_name": "cursorRect", "annotation": ""}, "snippet": " cr = self.cursorRect()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L247_C8", "label": "setWidth()", "type": "expression", "loc": [247, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [8, 2, 0.934, 0.0075, 2, 0.59, 0.9167, 508, 3, 1, 0, 0, 0, 0, 7], "semantic": {"name": "setWidth", "arg_names": [], "import_names": [], "rhs_call_name": "setWidth", "annotation": ""}, "snippet": " cr.setWidth(self.completer.popup().sizeHintForColumn(0)\n + self.completer.popup().verticalScrollBar().sizeHint().width())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L249_C8", "label": "complete()", "type": "expression", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "vector": [8, 2, 0.9396, 0.0038, 2, 0.59, 1.0, 482, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "complete", "arg_names": [], "import_names": [], "rhs_call_name": "complete", "annotation": ""}, "snippet": " self.completer.complete(cr) ## popup it up!"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "label": "LineNumberArea", "type": "class", "loc": [252, 262], "level": 0, "parent": null, "vector": [3, 0, 0.9698, 0.0415, 0, 0.66, 1.0, 14, 0, 3, 0, 0, 246, 0, 5], "semantic": {"name": "LineNumberArea", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LineNumberArea(QtGui.QWidget):\n\n def __init__(self, parent):\n \tsuper(LineNumberArea, self).__init__(parent)\n \tself.codeEditor = parent\n\n def sizeHint(self):\n return QtCore.QSize(self.codeEditor.lineNumberAreaWidth(), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4", "label": "__init__", "type": "function", "loc": [254, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "vector": [2, 1, 0.9623, 0.0113, 1, 0.52, 0.0, 555, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "parent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent):\n \tsuper(LineNumberArea, self).__init__(parent)\n \tself.codeEditor = parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L255_C5", "label": "__init__()", "type": "expression", "loc": [255, 255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4", "vector": [8, 2, 0.9623, 0.0038, 2, 0.42, 0.0, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " \tsuper(LineNumberArea, self).__init__(parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L256_C5", "label": "self.codeEditor =", "type": "assigned_variable", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4", "vector": [14, 2, 0.966, 0.0038, 2, 0.42, 1.0, 548, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.codeEditor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \tself.codeEditor = parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L258_C4", "label": "sizeHint", "type": "function", "loc": [258, 259], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "vector": [2, 1, 0.9755, 0.0075, 1, 0.52, 0.5, 820, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "sizeHint", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def sizeHint(self):\n return QtCore.QSize(self.codeEditor.lineNumberAreaWidth(), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L259_C8", "label": "return", "type": "return", "loc": [259, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L258_C4", "vector": [13, 2, 0.9774, 0.0038, 2, 0.34, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return QtCore.QSize(self.codeEditor.lineNumberAreaWidth(), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L261_C4", "label": "paintEvent", "type": "function", "loc": [261, 262], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "vector": [2, 1, 0.9868, 0.0075, 1, 0.52, 1.0, 838, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "paintEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def paintEvent(self, event):\n self.codeEditor.lineNumberAreaPaintEvent(event);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L262_C8", "label": "lineNumberAreaPaintEvent()", "type": "expression", "loc": [262, 262], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L261_C4", "vector": [8, 2, 0.9887, 0.0038, 2, 0.98, 0.0, 338, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "lineNumberAreaPaintEvent", "arg_names": [], "import_names": [], "rhs_call_name": "lineNumberAreaPaintEvent", "annotation": ""}, "snippet": " self.codeEditor.lineNumberAreaPaintEvent(event);"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:ImportFrom_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L65_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L65_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L72_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:While_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:While_L89_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L97_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L108_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L107_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L110_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L106_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L112_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L113_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L115_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L127_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L129_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L130_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L131_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L132_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L123_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L133_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L155_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L157_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L154_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L158_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L160_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L161_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:While_L152_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L162_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L166_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L166_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L167_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L168_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L169_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L165_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L182_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L191_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L197_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L204_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L204_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L211_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L205_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L212_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L217_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L218_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L223_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L225_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L229_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L232_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L237_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L234_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L238_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L241_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L242_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L203_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L255_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L254_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Assign_L256_C5"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L258_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L258_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Return_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:ClassDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L261_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_289:FunctionDef_L261_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_289:Expr_L262_C8"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT) class YaraHighlighter(QtGui.QSyntaxHighlighter): def __init__(self, parent=None): super(YaraHighlighter, self).__init__(parent) keywordFormat = QtGui.QTextCharFormat() keywordFormat.setForeground(QtCore.Qt.darkBlue) keywordFormat.setFontWeight(QtGui.QFont.Bold) keywordPatterns = ["\\ball\\b","\\band\\b","\\bany\\b","\\bascii\\b","\\bat\\b", "\\bcondition\\b","\\bcontains\\b","\\bentrypoint\\b","\\bfalse\\b", "\\bfilesize\\b","\\bfullword\\b","\\bfor\\b","\\bglobal\\b", "\\bin\\b","\\binclude\\b","\\bindex\\b","\\bindexes\\b","\\bint8\\b", "\\bint16\\b","\\bint32\\b","\\bmatches\\b","\\bmeta\\b","\\bnocase\\b", "\\bnot\\b","\\bor\\b","\\bof\\b","\\bprivate\\b","\\brule\\b","\\brva\\b", "\\bsection\\b","\\bstrings\\b","\\bthem\\b","\\btrue\\b","\\buint8\\b", "\\buint16\\b","\\buint32\\b","\\bwide\\b"] self.highlightingRules = [(QtCore.QRegExp(pattern), keywordFormat) for pattern in keywordPatterns] classFormat = QtGui.QTextCharFormat() classFormat.setFontWeight(QtGui.QFont.Bold) classFormat.setForeground(QtCore.Qt.darkMagenta) self.highlightingRules.append((QtCore.QRegExp("\\b\$[A-Za-z]+\\b"), classFormat)) singleLineCommentFormat = QtGui.QTextCharFormat() singleLineCommentFormat.setForeground(QtCore.Qt.red) self.highlightingRules.append((QtCore.QRegExp("//[^\n]*"), singleLineCommentFormat)) self.multiLineCommentFormat = QtGui.QTextCharFormat() self.multiLineCommentFormat.setForeground(QtCore.Qt.red) quotationFormat = QtGui.QTextCharFormat() quotationFormat.setForeground(QtCore.Qt.darkGreen) self.highlightingRules.append((QtCore.QRegExp("\".*\""), quotationFormat)) functionFormat = QtGui.QTextCharFormat() functionFormat.setFontItalic(True) functionFormat.setForeground(QtCore.Qt.blue) self.highlightingRules.append((QtCore.QRegExp("\\b[A-Za-z0-9_]+(?=\\()"), functionFormat)) self.commentStartExpression = QtCore.QRegExp("/\\*") self.commentEndExpression = QtCore.QRegExp("\\*/") def highlightBlock(self, text): for pattern, format in self.highlightingRules: expression = QtCore.QRegExp(pattern) index = expression.indexIn(text) while index >= 0: length = expression.matchedLength() self.setFormat(index, length, format) index = expression.indexIn(text, index + length) self.setCurrentBlockState(0) startIndex = 0 if self.previousBlockState() != 1: startIndex = self.commentStartExpression.indexIn(text) while startIndex >= 0: endIndex = self.commentEndExpression.indexIn(text, startIndex) if endIndex == -1: self.setCurrentBlockState(1) commentLength = len(text) - startIndex else: commentLength = endIndex - startIndex + self.commentEndExpression.matchedLength() self.setFormat(startIndex, commentLength, self.multiLineCommentFormat) startIndex = self.commentStartExpression.indexIn(text, startIndex + commentLength); class OutputHighlighter(QtGui.QSyntaxHighlighter): def __init__(self, parent=None): super(OutputHighlighter, self).__init__(parent) keywordFormatError = QtGui.QTextCharFormat() keywordFormatError.setForeground(QtCore.Qt.red) keywordFormatGood = QtGui.QTextCharFormat() keywordFormatGood.setForeground(QtCore.Qt.green) keywordFormatError.setFontWeight(QtGui.QFont.Bold) keywordFormatGood.setFontWeight(QtGui.QFont.Bold) keywordError = ["\\Error\\b","\\Warning\\b","\\UnboundLocalError\\b","\\SyntaxError\\b", "\\UnicodeEncodeError\\b"] keywordGood = ["\\Signature match\\b"] self.highlightingError = [(QtCore.QRegExp(pattern), keywordFormatError) for pattern in keywordError] self.highlightingGood = [(QtCore.QRegExp(pattern), keywordFormatGood) for pattern in keywordGood] def highlightBlock(self, text): for pattern, format in self.highlightingError: expression = QtCore.QRegExp(pattern) index = expression.indexIn(text) while index >= 0: length = expression.matchedLength() self.setFormat(index, length, format) index = expression.indexIn(text, index + length) for pattern, format in self.highlightingGood: expression = QtCore.QRegExp(pattern) index = expression.indexIn(text) while index >= 0: length = expression.matchedLength() self.setFormat(index, length, format) index = expression.indexIn(text, index + length) self.setCurrentBlockState(0) # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_290
79
139
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0432, 0.036, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:ImportFrom_L11_C0", "label": "from PyQt4 import QtGui", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0791, 0.0072, 0, 0.66, 0.2, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtGui"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtGui"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:ImportFrom_L12_C0", "label": "from PyQt4 import QtCore", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0863, 0.0072, 0, 0.66, 0.4, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:ImportFrom_L13_C0", "label": "from PyQt4.QtCore import QObject, Qt, SIGNAL\u2026", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.0935, 0.0072, 0, 0.66, 0.6, 454, 0, 4, 0, 0, 454, 0, 0], "semantic": {"name": "PyQt4.QtCore", "arg_names": [], "import_names": ["QObject", "Qt", "SIGNAL", "SLOT"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4.QtCore import (QObject, Qt, SIGNAL, SLOT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L16_C0", "label": "YaraHighlighter", "type": "class", "loc": [16, 94], "level": 0, "parent": null, "vector": [3, 0, 0.3957, 0.5683, 0, 0.66, 0.8, 244, 0, 2, 0, 0, 106, 0, 42], "semantic": {"name": "YaraHighlighter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class YaraHighlighter(QtGui.QSyntaxHighlighter):\n def __init__(self, parent=None):\n super(YaraHighlighter, self).__init__(parent)\n\n keywordFormat = QtGui.QTextCharFormat()\n keywordFormat.setForeground(QtCore.Qt.darkBlue)\n keywordFormat.setFontWeight(QtGui.QFont.Bold)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "label": "__init__", "type": "function", "loc": [17, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L16_C0", "vector": [2, 1, 0.295, 0.3525, 1, 0.3, 0.0, 555, 0, 2, 0, 0, 0, 0, 28], "semantic": {"name": "__init__", "arg_names": ["self", "parent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent=None):\n super(YaraHighlighter, self).__init__(parent)\n\n keywordFormat = QtGui.QTextCharFormat()\n keywordFormat.setForeground(QtCore.Qt.darkBlue)\n keywordFormat.setFontWeight(QtGui.QFont.Bold)\n\n keywordPatterns = [\"\\\\ball\\\\b\",\"\\\\band\\\\b\",\"\\\\bany\\\\b\",\"\\\\bascii\\\\b\",\"\\\\bat\\\\b\","}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L18_C8", "label": "__init__()", "type": "expression", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.1295, 0.0072, 2, 0.58, 0.0, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(YaraHighlighter, self).__init__(parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L20_C8", "label": "keywordFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.1439, 0.0072, 2, 0.58, 0.0435, 880, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "keywordFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " keywordFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L21_C8", "label": "setForeground()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.1511, 0.0072, 2, 0.58, 0.087, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " keywordFormat.setForeground(QtCore.Qt.darkBlue)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L22_C8", "label": "setFontWeight()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.1583, 0.0072, 2, 0.58, 0.1304, 101, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setFontWeight", "arg_names": [], "import_names": [], "rhs_call_name": "setFontWeight", "annotation": ""}, "snippet": " keywordFormat.setFontWeight(QtGui.QFont.Bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L24_C8", "label": "keywordPatterns =", "type": "assigned_variable", "loc": [24, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.1978, 0.0576, 2, 0.58, 0.1739, 220, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "keywordPatterns", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " keywordPatterns = [\"\\\\ball\\\\b\",\"\\\\band\\\\b\",\"\\\\bany\\\\b\",\"\\\\bascii\\\\b\",\"\\\\bat\\\\b\",\n \"\\\\bcondition\\\\b\",\"\\\\bcontains\\\\b\",\"\\\\bentrypoint\\\\b\",\"\\\\bfalse\\\\b\",\n \"\\\\bfilesize\\\\b\",\"\\\\bfullword\\\\b\",\"\\\\bfor\\\\b\",\"\\\\bglobal\\\\b\",\n \"\\\\bin\\\\b\",\"\\\\binclude\\\\b\",\"\\\\bindex\\\\b\",\"\\\\bindexes\\\\b\",\"\\\\bint8\\\\b\",\n \"\\\\bint16\\\\b\",\"\\\\bint32\\\\b\",\"\\\\bmatches\\\\b\",\"\\\\bmeta\\\\b\",\"\\\\bnocase\\\\b\",\n \"\\\\bnot\\\\b\",\"\\\\bor\\\\b\",\"\\\\bof\\\\b\",\"\\\\bprivate\\\\b\",\"\\\\brule\\\\b\",\"\\\\brva\\\\b\",\n \"\\\\bsection\\\\b\",\"\\\\bstrings\\\\b\",\"\\\\bthem\\\\b\",\"\\\\btrue\\\\b\",\"\\\\buint8\\\\b\",\n \"\\\\buint16\\\\b\",\"\\\\buint32\\\\b\",\"\\\\bwide\\\\b\"]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L34_C8", "label": "self.highlightingRules =", "type": "assigned_variable", "loc": [34, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.2482, 0.0144, 2, 0.58, 0.2174, 111, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.highlightingRules", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.highlightingRules = [(QtCore.QRegExp(pattern), keywordFormat)\n for pattern in keywordPatterns]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L37_C8", "label": "classFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.2662, 0.0072, 2, 0.58, 0.2609, 934, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "classFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " classFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L38_C8", "label": "setFontWeight()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.2734, 0.0072, 2, 0.58, 0.3043, 101, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setFontWeight", "arg_names": [], "import_names": [], "rhs_call_name": "setFontWeight", "annotation": ""}, "snippet": " classFormat.setFontWeight(QtGui.QFont.Bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L39_C8", "label": "setForeground()", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.2806, 0.0072, 2, 0.58, 0.3478, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " classFormat.setForeground(QtCore.Qt.darkMagenta)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L40_C8", "label": "append()", "type": "expression", "loc": [40, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.2914, 0.0144, 2, 0.58, 0.3913, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.highlightingRules.append((QtCore.QRegExp(\"\\\\b\\$[A-Za-z]+\\\\b\"),\n classFormat))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L45_C8", "label": "singleLineCommentFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.3237, 0.0072, 2, 0.58, 0.4348, 388, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "singleLineCommentFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " singleLineCommentFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L46_C8", "label": "setForeground()", "type": "expression", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.3309, 0.0072, 2, 0.58, 0.4783, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " singleLineCommentFormat.setForeground(QtCore.Qt.red)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L47_C8", "label": "append()", "type": "expression", "loc": [47, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.3417, 0.0144, 2, 0.58, 0.5217, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.highlightingRules.append((QtCore.QRegExp(\"//[^\\n]*\"),\n singleLineCommentFormat))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L50_C8", "label": "self.multiLineCommentFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.3597, 0.0072, 2, 0.58, 0.5652, 949, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "self.multiLineCommentFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " self.multiLineCommentFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L51_C8", "label": "setForeground()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.3669, 0.0072, 2, 0.58, 0.6087, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " self.multiLineCommentFormat.setForeground(QtCore.Qt.red)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L53_C8", "label": "quotationFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.3813, 0.0072, 2, 0.58, 0.6522, 424, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "quotationFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " quotationFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L54_C8", "label": "setForeground()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.3885, 0.0072, 2, 0.58, 0.6957, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " quotationFormat.setForeground(QtCore.Qt.darkGreen)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L55_C8", "label": "append()", "type": "expression", "loc": [55, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.3993, 0.0144, 2, 0.58, 0.7391, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.highlightingRules.append((QtCore.QRegExp(\"\\\".*\\\"\"),\n quotationFormat))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L58_C8", "label": "functionFormat = QTextCharFormat()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.4173, 0.0072, 2, 0.58, 0.7826, 465, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "functionFormat", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " functionFormat = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L59_C8", "label": "setFontItalic()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.4245, 0.0072, 2, 0.58, 0.8261, 316, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setFontItalic", "arg_names": [], "import_names": [], "rhs_call_name": "setFontItalic", "annotation": ""}, "snippet": " functionFormat.setFontItalic(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L60_C8", "label": "setForeground()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.4317, 0.0072, 2, 0.58, 0.8696, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " functionFormat.setForeground(QtCore.Qt.blue)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L61_C8", "label": "append()", "type": "expression", "loc": [61, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [8, 2, 0.4424, 0.0144, 2, 0.58, 0.913, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.highlightingRules.append((QtCore.QRegExp(\"\\\\b[A-Za-z0-9_]+(?=\\\\()\"),\n functionFormat))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L64_C8", "label": "self.commentStartExpression = QRegExp()", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.4604, 0.0072, 2, 0.58, 0.9565, 686, 3, 1, 0, 0, 793, 10, 1], "semantic": {"name": "self.commentStartExpression", "arg_names": [], "import_names": [], "rhs_call_name": "QRegExp", "annotation": ""}, "snippet": " self.commentStartExpression = QtCore.QRegExp(\"/\\\\*\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L65_C8", "label": "self.commentEndExpression = QRegExp()", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "vector": [14, 2, 0.4676, 0.0072, 2, 0.58, 1.0, 616, 3, 1, 0, 0, 793, 10, 1], "semantic": {"name": "self.commentEndExpression", "arg_names": [], "import_names": [], "rhs_call_name": "QRegExp", "annotation": ""}, "snippet": " self.commentEndExpression = QtCore.QRegExp(\"\\\\*/\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "label": "highlightBlock", "type": "function", "loc": [67, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L16_C0", "vector": [2, 1, 0.5791, 0.2014, 1, 0.3, 1.0, 926, 0, 2, 0, 0, 0, 0, 14], "semantic": {"name": "highlightBlock", "arg_names": ["self", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def highlightBlock(self, text):\n for pattern, format in self.highlightingRules:\n expression = QtCore.QRegExp(pattern)\n index = expression.indexIn(text)\n while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "label": "for pattern, format", "type": "for", "loc": [68, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "vector": [6, 2, 0.5108, 0.0504, 2, 0.92, 0.0, 451, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "pattern, format", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for pattern, format in self.highlightingRules:\n expression = QtCore.QRegExp(pattern)\n index = expression.indexIn(text)\n while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L69_C12", "label": "expression = QRegExp()", "type": "assigned_variable", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "vector": [14, 3, 0.4964, 0.0072, 3, 0.38, 0.0, 657, 3, 1, 0, 0, 793, 10, 1], "semantic": {"name": "expression", "arg_names": [], "import_names": [], "rhs_call_name": "QRegExp", "annotation": ""}, "snippet": " expression = QtCore.QRegExp(pattern)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L70_C12", "label": "index = indexIn()", "type": "assigned_variable", "loc": [70, 70], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "vector": [14, 3, 0.5036, 0.0072, 3, 0.38, 0.5, 780, 3, 1, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "label": "while", "type": "while", "loc": [71, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "vector": [5, 3, 0.5216, 0.0288, 3, 0.38, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L72_C16", "label": "length = matchedLength()", "type": "assigned_variable", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "vector": [14, 4, 0.518, 0.0072, 4, 0.55, 0.0, 221, 3, 0, 0, 0, 553, 10, 1], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "matchedLength", "annotation": ""}, "snippet": " length = expression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L73_C16", "label": "setFormat()", "type": "expression", "loc": [73, 73], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "vector": [8, 4, 0.5252, 0.0072, 4, 0.55, 0.5, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setFormat", "arg_names": [], "import_names": [], "rhs_call_name": "setFormat", "annotation": ""}, "snippet": " self.setFormat(index, length, format)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L74_C16", "label": "index = indexIn()", "type": "assigned_variable", "loc": [74, 74], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "vector": [14, 4, 0.5324, 0.0072, 4, 0.55, 1.0, 780, 3, 2, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L76_C8", "label": "setCurrentBlockState()", "type": "expression", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "vector": [8, 2, 0.5468, 0.0072, 2, 0.92, 0.25, 986, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCurrentBlockState", "arg_names": [], "import_names": [], "rhs_call_name": "setCurrentBlockState", "annotation": ""}, "snippet": " self.setCurrentBlockState(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L78_C8", "label": "startIndex =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "vector": [14, 2, 0.5612, 0.0072, 2, 0.92, 0.5, 780, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "startIndex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " startIndex = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:If_L79_C8", "label": "if", "type": "if", "loc": [79, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "vector": [4, 2, 0.5719, 0.0144, 2, 0.92, 0.75, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.previousBlockState() != 1:\n startIndex = self.commentStartExpression.indexIn(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L80_C12", "label": "startIndex = indexIn()", "type": "assigned_variable", "loc": [80, 80], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:If_L79_C8", "vector": [14, 3, 0.5755, 0.0072, 3, 0.39, 0.0, 780, 3, 1, 0, 0, 732, 10, 1], "semantic": {"name": "startIndex", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " startIndex = self.commentStartExpression.indexIn(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "label": "while", "type": "while", "loc": [82, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "vector": [5, 2, 0.6331, 0.0935, 2, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while startIndex >= 0:\n endIndex = self.commentEndExpression.indexIn(text, startIndex)\n\n if endIndex == -1:\n self.setCurrentBlockState(1)\n commentLength = len(text) - startIndex\n else:\n commentLength = endIndex - startIndex + self.commentEndExpression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L83_C12", "label": "endIndex = indexIn()", "type": "assigned_variable", "loc": [83, 83], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "vector": [14, 3, 0.5971, 0.0072, 3, 0.94, 0.0, 953, 3, 2, 0, 0, 732, 10, 1], "semantic": {"name": "endIndex", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " endIndex = self.commentEndExpression.indexIn(text, startIndex)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "label": "if", "type": "if", "loc": [85, 89], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "vector": [4, 3, 0.6259, 0.036, 3, 0.94, 0.3333, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if endIndex == -1:\n self.setCurrentBlockState(1)\n commentLength = len(text) - startIndex\n else:\n commentLength = endIndex - startIndex + self.commentEndExpression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L86_C16", "label": "setCurrentBlockState()", "type": "expression", "loc": [86, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "vector": [8, 4, 0.6187, 0.0072, 4, 0.96, 0.0, 986, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCurrentBlockState", "arg_names": [], "import_names": [], "rhs_call_name": "setCurrentBlockState", "annotation": ""}, "snippet": " self.setCurrentBlockState(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L87_C16", "label": "commentLength =", "type": "assigned_variable", "loc": [87, 87], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "vector": [14, 4, 0.6259, 0.0072, 4, 0.96, 0.5, 68, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commentLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " commentLength = len(text) - startIndex"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L89_C16", "label": "commentLength =", "type": "assigned_variable", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "vector": [14, 4, 0.6403, 0.0072, 4, 0.96, 1.0, 68, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "commentLength", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " commentLength = endIndex - startIndex + self.commentEndExpression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L91_C12", "label": "setFormat()", "type": "expression", "loc": [91, 92], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "vector": [8, 3, 0.6583, 0.0144, 3, 0.94, 0.6667, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setFormat", "arg_names": [], "import_names": [], "rhs_call_name": "setFormat", "annotation": ""}, "snippet": " self.setFormat(startIndex, commentLength,\n self.multiLineCommentFormat)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L93_C12", "label": "startIndex = indexIn()", "type": "assigned_variable", "loc": [93, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "vector": [14, 3, 0.6727, 0.0144, 3, 0.94, 1.0, 780, 3, 2, 0, 0, 732, 10, 1], "semantic": {"name": "startIndex", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " startIndex = self.commentStartExpression.indexIn(text,\n startIndex + commentLength);"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L97_C0", "label": "OutputHighlighter", "type": "class", "loc": [97, 136], "level": 0, "parent": null, "vector": [3, 0, 0.8381, 0.2878, 0, 0.66, 1.0, 323, 0, 2, 0, 0, 106, 0, 21], "semantic": {"name": "OutputHighlighter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class OutputHighlighter(QtGui.QSyntaxHighlighter):\n def __init__(self, parent=None):\n super(OutputHighlighter, self).__init__(parent)\n\n keywordFormatError = QtGui.QTextCharFormat()\n keywordFormatError.setForeground(QtCore.Qt.red)\n keywordFormatGood = QtGui.QTextCharFormat()\n keywordFormatGood.setForeground(QtCore.Qt.green)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "label": "__init__", "type": "function", "loc": [98, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L97_C0", "vector": [2, 1, 0.7662, 0.1295, 1, 0.77, 0.0, 555, 0, 2, 0, 0, 0, 0, 10], "semantic": {"name": "__init__", "arg_names": ["self", "parent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent=None):\n super(OutputHighlighter, self).__init__(parent)\n\n keywordFormatError = QtGui.QTextCharFormat()\n keywordFormatError.setForeground(QtCore.Qt.red)\n keywordFormatGood = QtGui.QTextCharFormat()\n keywordFormatGood.setForeground(QtCore.Qt.green)\n keywordFormatError.setFontWeight(QtGui.QFont.Bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L99_C8", "label": "__init__()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [8, 2, 0.7122, 0.0072, 2, 0.53, 0.0, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(OutputHighlighter, self).__init__(parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L101_C8", "label": "keywordFormatError = QTextCharFormat()", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.7266, 0.0072, 2, 0.53, 0.1, 422, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "keywordFormatError", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " keywordFormatError = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L102_C8", "label": "setForeground()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [8, 2, 0.7338, 0.0072, 2, 0.53, 0.2, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " keywordFormatError.setForeground(QtCore.Qt.red)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L103_C8", "label": "keywordFormatGood = QTextCharFormat()", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.741, 0.0072, 2, 0.53, 0.3, 654, 3, 0, 0, 0, 145, 10, 1], "semantic": {"name": "keywordFormatGood", "arg_names": [], "import_names": [], "rhs_call_name": "QTextCharFormat", "annotation": ""}, "snippet": " keywordFormatGood = QtGui.QTextCharFormat()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L104_C8", "label": "setForeground()", "type": "expression", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [8, 2, 0.7482, 0.0072, 2, 0.53, 0.4, 907, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setForeground", "arg_names": [], "import_names": [], "rhs_call_name": "setForeground", "annotation": ""}, "snippet": " keywordFormatGood.setForeground(QtCore.Qt.green)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L105_C8", "label": "setFontWeight()", "type": "expression", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [8, 2, 0.7554, 0.0072, 2, 0.53, 0.5, 101, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setFontWeight", "arg_names": [], "import_names": [], "rhs_call_name": "setFontWeight", "annotation": ""}, "snippet": " keywordFormatError.setFontWeight(QtGui.QFont.Bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L106_C8", "label": "setFontWeight()", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [8, 2, 0.7626, 0.0072, 2, 0.53, 0.6, 101, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setFontWeight", "arg_names": [], "import_names": [], "rhs_call_name": "setFontWeight", "annotation": ""}, "snippet": " keywordFormatGood.setFontWeight(QtGui.QFont.Bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L108_C8", "label": "keywordError =", "type": "assigned_variable", "loc": [108, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.7806, 0.0144, 2, 0.53, 0.7, 949, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "keywordError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " keywordError = [\"\\\\Error\\\\b\",\"\\\\Warning\\\\b\",\"\\\\UnboundLocalError\\\\b\",\"\\\\SyntaxError\\\\b\",\n \"\\\\UnicodeEncodeError\\\\b\"]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L111_C8", "label": "keywordGood =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.7986, 0.0072, 2, 0.53, 0.8, 531, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "keywordGood", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " keywordGood = [\"\\\\Signature match\\\\b\"]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L114_C8", "label": "self.highlightingError =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.8201, 0.0072, 2, 0.53, 0.9, 754, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.highlightingError", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.highlightingError = [(QtCore.QRegExp(pattern), keywordFormatError) for pattern in keywordError]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L115_C8", "label": "self.highlightingGood =", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "vector": [14, 2, 0.8273, 0.0072, 2, 0.53, 1.0, 996, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.highlightingGood", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.highlightingGood = [(QtCore.QRegExp(pattern), keywordFormatGood) for pattern in keywordGood]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "label": "highlightBlock", "type": "function", "loc": [118, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L97_C0", "vector": [2, 1, 0.9137, 0.1367, 1, 0.77, 1.0, 926, 0, 2, 0, 0, 0, 0, 11], "semantic": {"name": "highlightBlock", "arg_names": ["self", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def highlightBlock(self, text):\n for pattern, format in self.highlightingError:\n expression = QtCore.QRegExp(pattern)\n index = expression.indexIn(text)\n while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "label": "for pattern, format", "type": "for", "loc": [119, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "vector": [6, 2, 0.8777, 0.0504, 2, 0.35, 0.0, 451, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "pattern, format", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for pattern, format in self.highlightingError:\n expression = QtCore.QRegExp(pattern)\n index = expression.indexIn(text)\n while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L120_C12", "label": "expression = QRegExp()", "type": "assigned_variable", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "vector": [14, 3, 0.8633, 0.0072, 3, 0.24, 0.0, 657, 3, 1, 0, 0, 793, 10, 1], "semantic": {"name": "expression", "arg_names": [], "import_names": [], "rhs_call_name": "QRegExp", "annotation": ""}, "snippet": " expression = QtCore.QRegExp(pattern)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L121_C12", "label": "index = indexIn()", "type": "assigned_variable", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "vector": [14, 3, 0.8705, 0.0072, 3, 0.24, 0.5, 780, 3, 1, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "label": "while", "type": "while", "loc": [122, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "vector": [5, 3, 0.8885, 0.0288, 3, 0.24, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L123_C16", "label": "length = matchedLength()", "type": "assigned_variable", "loc": [123, 123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "vector": [14, 4, 0.8849, 0.0072, 4, 0.62, 0.0, 221, 3, 0, 0, 0, 553, 10, 1], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "matchedLength", "annotation": ""}, "snippet": " length = expression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L124_C16", "label": "setFormat()", "type": "expression", "loc": [124, 124], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "vector": [8, 4, 0.8921, 0.0072, 4, 0.62, 0.5, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setFormat", "arg_names": [], "import_names": [], "rhs_call_name": "setFormat", "annotation": ""}, "snippet": " self.setFormat(index, length, format)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L125_C16", "label": "index = indexIn()", "type": "assigned_variable", "loc": [125, 125], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "vector": [14, 4, 0.8993, 0.0072, 4, 0.62, 1.0, 780, 3, 2, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "label": "for pattern, format", "type": "for", "loc": [127, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "vector": [6, 2, 0.9353, 0.0504, 2, 0.35, 0.5, 451, 7, 0, 0, 0, 0, 0, 5], "semantic": {"name": "pattern, format", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for pattern, format in self.highlightingGood:\n expression = QtCore.QRegExp(pattern)\n index = expression.indexIn(text)\n while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L128_C12", "label": "expression = QRegExp()", "type": "assigned_variable", "loc": [128, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "vector": [14, 3, 0.9209, 0.0072, 3, 0.45, 0.0, 657, 3, 1, 0, 0, 793, 10, 1], "semantic": {"name": "expression", "arg_names": [], "import_names": [], "rhs_call_name": "QRegExp", "annotation": ""}, "snippet": " expression = QtCore.QRegExp(pattern)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L129_C12", "label": "index = indexIn()", "type": "assigned_variable", "loc": [129, 129], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "vector": [14, 3, 0.9281, 0.0072, 3, 0.45, 0.5, 780, 3, 1, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "label": "while", "type": "while", "loc": [130, 133], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "vector": [5, 3, 0.946, 0.0288, 3, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while index >= 0:\n length = expression.matchedLength()\n self.setFormat(index, length, format)\n index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L131_C16", "label": "length = matchedLength()", "type": "assigned_variable", "loc": [131, 131], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "vector": [14, 4, 0.9424, 0.0072, 4, 0.87, 0.0, 221, 3, 0, 0, 0, 553, 10, 1], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "matchedLength", "annotation": ""}, "snippet": " length = expression.matchedLength()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L132_C16", "label": "setFormat()", "type": "expression", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "vector": [8, 4, 0.9496, 0.0072, 4, 0.87, 0.5, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setFormat", "arg_names": [], "import_names": [], "rhs_call_name": "setFormat", "annotation": ""}, "snippet": " self.setFormat(index, length, format)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L133_C16", "label": "index = indexIn()", "type": "assigned_variable", "loc": [133, 133], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "vector": [14, 4, 0.9568, 0.0072, 4, 0.87, 1.0, 780, 3, 2, 0, 0, 732, 10, 1], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "indexIn", "annotation": ""}, "snippet": " index = expression.indexIn(text, index + length)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L136_C8", "label": "setCurrentBlockState()", "type": "expression", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "vector": [8, 2, 0.9784, 0.0072, 2, 0.35, 1.0, 986, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCurrentBlockState", "arg_names": [], "import_names": [], "rhs_call_name": "setCurrentBlockState", "annotation": ""}, "snippet": " self.setCurrentBlockState(0)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L70_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L68_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L72_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L73_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L74_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:If_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:If_L79_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L80_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L86_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:If_L85_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L82_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L93_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L97_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:ClassDef_L97_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L123_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L124_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L122_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L125_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L128_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L129_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:For_L127_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L131_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:While_L130_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Assign_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_290:FunctionDef_L118_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_290:Expr_L136_C8"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import string import pickle import logging import sys, os, traceback from yaraeditor.constante import * from PyQt4 import * from PyQt4 import QtCore, QtGui from PyQt4.QtCore import (QObject, Qt, QDir, SIGNAL, SLOT) try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s try: from PyQt4.QtCore import QString except ImportError: QString = str class YTreeWidget(QtGui.QTreeWidget): index=-1 def __init__(self, parent): super(YTreeWidget, self).__init__(parent) self.setDragEnabled(True) def dragEnterEvent(self, event): if event.mimeData().hasFormat("application/pubmedrecord"): event.setDropAction(Qt.MoveAction) event.accept() else: event.ignore() def startDrag(self, event): text = self.selectedItems()[0].text(0) value = "\t$str=\"%s\""%text mimeData = QtCore.QMimeData() mimeData.setData("text/plain", value) drag = QtGui.QDrag(self) drag.setMimeData(mimeData) result = drag.start(Qt.MoveAction) def mouseMoveEvent(self, event): self.startDrag(event) # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_291
35
60
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.0833, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Import_L12_C0", "label": "string import string", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.0167, 0, 0.66, 0.0909, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Import_L13_C0", "label": "pickle import pickle", "type": "import", "loc": [13, 13], "level": 0, "parent": null, "vector": [1, 0, 0.2167, 0.0167, 0, 0.66, 0.1818, 848, 0, 1, 0, 0, 848, 0, 0], "semantic": {"name": "pickle", "arg_names": [], "import_names": ["pickle"], "rhs_call_name": "", "annotation": ""}, "snippet": "import pickle"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Import_L14_C0", "label": "logging import logging", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.2333, 0.0167, 0, 0.66, 0.2727, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Import_L15_C0", "label": "sys import sys, os, traceback", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0167, 0, 0.66, 0.3636, 509, 0, 3, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys", "os", "traceback"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys, os, traceback"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L16_C0", "label": "from yaraeditor.constante import *", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.2667, 0.0167, 0, 0.66, 0.4545, 99, 0, 1, 0, 0, 99, 0, 0], "semantic": {"name": "yaraeditor.constante", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from yaraeditor.constante import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L18_C0", "label": "from PyQt4 import *", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.3, 0.0167, 0, 0.66, 0.5455, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L19_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.3167, 0.0167, 0, 0.66, 0.6364, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore", "QtGui"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore, QtGui"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L20_C0", "label": "from PyQt4.QtCore import QObject, Qt, QDir\u2026", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.0167, 0, 0.66, 0.7273, 454, 0, 5, 0, 0, 454, 0, 0], "semantic": {"name": "PyQt4.QtCore", "arg_names": [], "import_names": ["QObject", "Qt", "QDir", "SIGNAL", "SLOT"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4.QtCore import (QObject, Qt, QDir, SIGNAL, SLOT)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L23_C0", "label": "try", "type": "try", "loc": [23, 26], "level": 0, "parent": null, "vector": [7, 0, 0.4083, 0.0667, 0, 0.66, 0.8182, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L24_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L23_C0", "vector": [14, 1, 0.4, 0.0167, 1, 0.6, 0.0, 412, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = QtCore.QString.fromUtf8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L26_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L23_C0", "vector": [14, 1, 0.4333, 0.0167, 1, 0.6, 0.0, 412, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L28_C0", "label": "try", "type": "try", "loc": [28, 31], "level": 0, "parent": null, "vector": [7, 0, 0.4917, 0.0667, 0, 0.66, 0.9091, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n from PyQt4.QtCore import QString\nexcept ImportError:\n QString = str"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L29_C4", "label": "from PyQt4.QtCore import QString", "type": "import", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L28_C0", "vector": [1, 1, 0.4833, 0.0167, 1, 0.85, 0.0, 454, 0, 1, 0, 0, 454, 0, 0], "semantic": {"name": "PyQt4.QtCore", "arg_names": [], "import_names": ["QString"], "rhs_call_name": "", "annotation": ""}, "snippet": " from PyQt4.QtCore import QString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L31_C4", "label": "QString =", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L28_C0", "vector": [14, 1, 0.5167, 0.0167, 1, 0.85, 0.0, 19, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "QString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " QString = str"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "label": "YTreeWidget", "type": "class", "loc": [33, 58], "level": 0, "parent": null, "vector": [3, 0, 0.7583, 0.4333, 0, 0.66, 1.0, 481, 0, 4, 0, 0, 698, 0, 16], "semantic": {"name": "YTreeWidget", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class YTreeWidget(QtGui.QTreeWidget):\n index=-1\n\n def __init__(self, parent):\n super(YTreeWidget, self).__init__(parent)\n self.setDragEnabled(True)\n \n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L34_C4", "label": "index =", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "vector": [14, 1, 0.5667, 0.0167, 1, 0.94, 0.0, 780, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " index=-1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4", "label": "__init__", "type": "function", "loc": [36, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "vector": [2, 1, 0.6167, 0.05, 1, 0.94, 0.25, 555, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "parent"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent):\n super(YTreeWidget, self).__init__(parent)\n self.setDragEnabled(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L37_C8", "label": "__init__()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4", "vector": [8, 2, 0.6167, 0.0167, 2, 0.56, 0.0, 555, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " super(YTreeWidget, self).__init__(parent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L38_C8", "label": "setDragEnabled()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4", "vector": [8, 2, 0.6333, 0.0167, 2, 0.56, 1.0, 246, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setDragEnabled", "arg_names": [], "import_names": [], "rhs_call_name": "setDragEnabled", "annotation": ""}, "snippet": " self.setDragEnabled(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L41_C4", "label": "dragEnterEvent", "type": "function", "loc": [41, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "vector": [2, 1, 0.725, 0.1, 1, 0.94, 0.5, 397, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "dragEnterEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dragEnterEvent(self, event):\n if event.mimeData().hasFormat(\"application/pubmedrecord\"):\n event.setDropAction(Qt.MoveAction)\n event.accept()\n else:\n event.ignore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "label": "if", "type": "if", "loc": [42, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L41_C4", "vector": [4, 2, 0.7333, 0.0833, 2, 0.13, 0.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event.mimeData().hasFormat(\"application/pubmedrecord\"):\n event.setDropAction(Qt.MoveAction)\n event.accept()\n else:\n event.ignore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L43_C12", "label": "setDropAction()", "type": "expression", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "vector": [8, 3, 0.7167, 0.0167, 3, 0.95, 0.0, 621, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setDropAction", "arg_names": [], "import_names": [], "rhs_call_name": "setDropAction", "annotation": ""}, "snippet": " event.setDropAction(Qt.MoveAction)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L44_C12", "label": "accept()", "type": "expression", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "vector": [8, 3, 0.7333, 0.0167, 3, 0.95, 0.5, 829, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "accept", "arg_names": [], "import_names": [], "rhs_call_name": "accept", "annotation": ""}, "snippet": " event.accept()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L46_C12", "label": "ignore()", "type": "expression", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "vector": [8, 3, 0.7667, 0.0167, 3, 0.95, 1.0, 371, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "ignore", "arg_names": [], "import_names": [], "rhs_call_name": "ignore", "annotation": ""}, "snippet": " event.ignore()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "label": "startDrag", "type": "function", "loc": [48, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "vector": [2, 1, 0.8583, 0.1333, 1, 0.94, 0.75, 652, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "startDrag", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def startDrag(self, event):\n text = self.selectedItems()[0].text(0)\n value = \"\\t$str=\\\"%s\\\"\"%text\n mimeData = QtCore.QMimeData()\n mimeData.setData(\"text/plain\", value)\n drag = QtGui.QDrag(self)\n drag.setMimeData(mimeData)\n result = drag.start(Qt.MoveAction)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L49_C8", "label": "text = text()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [14, 2, 0.8167, 0.0167, 2, 0.94, 0.0, 439, 3, 1, 0, 0, 439, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "text", "annotation": ""}, "snippet": " text = self.selectedItems()[0].text(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L50_C8", "label": "value =", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [14, 2, 0.8333, 0.0167, 2, 0.94, 0.1667, 441, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " value = \"\\t$str=\\\"%s\\\"\"%text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L51_C8", "label": "mimeData = QMimeData()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [14, 2, 0.85, 0.0167, 2, 0.94, 0.3333, 286, 3, 0, 0, 0, 978, 10, 1], "semantic": {"name": "mimeData", "arg_names": [], "import_names": [], "rhs_call_name": "QMimeData", "annotation": ""}, "snippet": " mimeData = QtCore.QMimeData()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L52_C8", "label": "setData()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [8, 2, 0.8667, 0.0167, 2, 0.94, 0.5, 960, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setData", "arg_names": [], "import_names": [], "rhs_call_name": "setData", "annotation": ""}, "snippet": " mimeData.setData(\"text/plain\", value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L53_C8", "label": "drag = QDrag()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [14, 2, 0.8833, 0.0167, 2, 0.94, 0.6667, 574, 3, 1, 0, 0, 754, 10, 1], "semantic": {"name": "drag", "arg_names": [], "import_names": [], "rhs_call_name": "QDrag", "annotation": ""}, "snippet": " drag = QtGui.QDrag(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L54_C8", "label": "setMimeData()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [8, 2, 0.9, 0.0167, 2, 0.94, 0.8333, 83, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMimeData", "arg_names": [], "import_names": [], "rhs_call_name": "setMimeData", "annotation": ""}, "snippet": " drag.setMimeData(mimeData)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L55_C8", "label": "result = start()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "vector": [14, 2, 0.9167, 0.0167, 2, 0.94, 1.0, 51, 3, 1, 0, 0, 511, 10, 1], "semantic": {"name": "result", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " result = drag.start(Qt.MoveAction)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L57_C4", "label": "mouseMoveEvent", "type": "function", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "vector": [2, 1, 0.9583, 0.0333, 1, 0.94, 1.0, 402, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "mouseMoveEvent", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def mouseMoveEvent(self, event):\n self.startDrag(event)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L58_C8", "label": "startDrag()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L57_C4", "vector": [8, 2, 0.9667, 0.0167, 2, 0.89, 0.0, 652, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "startDrag", "arg_names": [], "import_names": [], "rhs_call_name": "startDrag", "annotation": ""}, "snippet": " self.startDrag(event)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:ImportFrom_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:Try_L28_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L41_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:If_L42_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L46_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:ClassDef_L33_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_291:FunctionDef_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_291:Expr_L58_C8"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_292
2
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_292:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.4167, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_292:Assign_L10_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.8333, 0.0833, 0, 0.66, 1.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = []"}]
[]
# -*- coding: utf-8 -*- # Resource object code # # Created: Sat Nov 24 16:28:52 2012 # by: The Resource Compiler for PyQt (Qt v4.8.1) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x04\x8b\ \xff\ \xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x00\x00\x01\x00\ \x01\x00\x00\xff\xdb\x00\x84\x00\x09\x06\x06\x13\x06\x05\x09\x14\ \x10\x08\x0a\x09\x09\x0a\x0d\x16\x0e\x0d\x0c\x18\x17\x1a\x13\x14\ \x19\x16\x1f\x1c\x21\x20\x1f\x1c\x1e\x1e\x22\x27\x32\x26\x23\x25\ \x2f\x20\x1e\x1f\x2b\x3b\x24\x2f\x2c\x35\x2d\x38\x38\x21\x23\x31\ \x35\x3c\x2a\x35\x2f\x30\x34\x2a\x01\x09\x0a\x0a\x0d\x0b\x0d\x19\ \x0e\x0e\x19\x35\x24\x1e\x24\x35\x35\x35\x35\x35\x35\x35\x35\x35\ \x35\x35\x35\x35\x35\x33\x35\x2b\x34\x35\x35\x35\x33\x35\x35\x35\ \x34\x35\x34\x35\x35\x2c\x2f\x35\x2d\x29\x29\x35\x34\x35\x35\x35\ \x34\x2c\x2c\x34\x2c\x34\x2e\x34\x34\xff\xc0\x00\x11\x08\x00\x37\ \x00\x32\x03\x01\x22\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x1b\ \x00\x00\x02\x02\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x06\x05\x07\x01\x03\x04\x02\xff\xc4\x00\x33\x10\x00\x02\ \x01\x03\x03\x02\x02\x08\x04\x07\x00\x00\x00\x00\x00\x00\x01\x02\ \x03\x00\x04\x11\x05\x12\x21\x06\x31\x07\x13\x14\x22\x41\x51\x61\ \x71\x91\xb1\x15\x36\x74\x81\x16\x23\x26\x42\x73\x82\xa1\xff\xc4\ \x00\x19\x01\x00\x02\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x00\x00\x03\x01\x04\x05\x02\xff\xc4\x00\x25\x11\x00\x01\ \x04\x02\x01\x04\x01\x05\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\ \x02\x03\x11\x04\x31\x12\x21\x41\x51\x71\xb1\x05\x13\x22\x32\x33\ \xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00\x3f\x00\xbc\x6b\ \x4d\xdd\xda\xd8\xd9\xcd\x24\x8f\xb2\x18\x50\xbb\xb7\xb8\x01\x93\ \x5b\xaa\x13\xad\x3f\x26\x6a\xbf\xa6\x7f\xb5\x43\x8d\x02\x53\x22\ \x60\x7c\x8d\x69\xee\x52\xb3\xf8\xcb\x00\x73\x8d\x3a\xe9\x97\x3c\ \x1d\xca\x0f\xd2\x9e\xf4\xeb\xe5\xd4\xb4\xdb\x79\x54\x32\xc7\x71\ \x12\xca\xa0\xf0\x70\x46\x79\xa4\xdf\x0d\x34\x88\x2f\x3a\x3a\x26\ \x92\xc2\xd6\x69\x0c\xb2\x0d\xed\x1a\xb3\x77\xf7\x91\x5c\x1a\xf4\ \x9a\xdc\x3a\xcd\xdf\xa3\xab\x2d\x8a\x39\xf2\x02\xac\x5b\x7c\xb1\ \xdb\xbf\x3d\xaa\xbb\x5e\xe0\xde\x4e\xeb\x7e\x16\xb4\xd8\xd0\x49\ \x29\x86\x1a\x61\x6e\xcb\x8e\xd5\x95\x45\x28\xf8\x71\xd4\xf2\xf5\ \x26\x8b\x31\x9c\xab\x5c\x5b\xc8\x10\xc8\x00\x1b\x81\x19\x19\x03\ \x8c\xf7\xff\x00\x94\xdd\x4f\x6b\x83\x85\x85\x97\x3c\x2e\x82\x43\ \x1b\xf6\x11\x45\x14\x57\x49\x2b\x07\xb7\xc6\xa9\xee\xa4\xd6\x35\ \x79\x34\xcb\xb5\xb8\xb4\x96\x0b\x36\xf5\x65\x22\x21\xb4\x2e\x7b\ \x6e\xf7\x7c\x6a\xe2\xa8\x4e\xb4\x1f\xd1\x9a\xaf\xe9\x9f\xed\x4a\ \x95\xbc\x9b\xb5\xa1\x81\x38\x8a\x50\x0b\x01\xb2\x37\xdb\xd2\xe2\ \xf0\xd9\x11\x3a\x16\xc7\x63\x97\xdd\xbc\xb9\x3c\x1d\xfb\x8e\x47\ \xed\x4c\x77\x0b\x9b\x79\x38\xc9\x2a\x7e\xd4\xa9\xe1\x67\xe4\x98\ \x7f\xcd\x27\xde\x9b\xa4\x7d\x91\xb1\xf6\x28\xcd\x4c\x7f\xa0\x4b\ \xcc\x15\x94\xff\x00\x67\xe5\x56\xde\x0e\x5c\xac\x7a\x7e\xa2\xa6\ \x54\x57\xf3\x51\xb6\x92\x01\xc6\xd2\x2a\xca\x56\xdc\xa0\x82\x08\ \x3d\x8d\x51\xfd\x33\xd1\x8d\xd7\x13\x5f\xca\x2e\xa3\xb1\x45\x97\ \x3b\x02\x6e\x19\x6c\x9c\x01\x91\x80\x2a\xdc\xe9\x9d\x0f\xf8\x77\ \x40\xb7\x83\xd2\x1a\xe3\xc9\xdd\xfc\xc2\x31\xdc\x93\xc0\xf6\x0e\ \x69\x50\x17\x71\xaa\xe8\xaf\x7d\x5a\x38\x84\xce\x78\x7f\xe4\x6a\ \xc5\x6b\xa7\x95\x2b\x45\x14\x55\x95\x8a\x8a\xe6\xd4\xac\x17\x54\ \xd3\x6e\x22\x7c\xf9\x77\x11\xb4\x6d\x8e\xf8\x23\x1c\x51\x7f\x78\ \x2c\x6d\x19\xb6\x19\x1b\x21\x51\x07\x76\x66\x20\x28\xfd\xc9\x15\ \x12\xfd\x65\x0a\xe8\xb2\x5c\x08\x6e\x8d\xb4\x37\x42\xda\x66\x28\ \x53\x67\xae\x15\xa4\x3b\xbf\xb1\x73\x92\xde\xe0\x68\xda\x90\x4b\ \x4d\x84\x94\x7c\x1e\x99\x18\xed\xd5\xe3\xd9\x9e\x3d\x56\x07\xef\ \x53\xef\xd7\x56\x9a\x0d\xa7\xa3\x49\x7b\x3d\xc5\xc5\x9c\x62\xde\ \x49\x36\x13\x96\x51\x83\xcf\xce\xbd\xdf\xf8\x9b\x0e\x9f\xa4\xda\ \x4a\xd6\x37\x81\x2e\xa1\xb8\xb8\x54\x3b\x55\xbc\xa8\x58\x29\x6e\ \x4f\x3b\x81\x05\x40\xee\x0f\xb2\xa3\x2f\xbf\x0c\xd4\x3a\xea\x48\ \x24\xd1\x64\x92\xee\x6b\x84\x89\xe6\xdd\xb4\x17\x78\x7c\xed\xdb\ \x43\x03\x8d\xa3\x04\xe3\xbf\xd6\x91\xf6\xb8\x7f\x35\xa8\x33\x86\ \x41\xac\xc2\x48\x1a\xaa\xda\xc7\x83\x2a\x7f\x08\xd4\x0e\x0e\x0c\ \xea\x33\xfe\xb5\x63\x52\x4f\x4a\x75\xa5\x9b\xdb\xdc\x45\x6d\xa7\ \xcf\x69\x6f\x6b\x6e\xd7\x61\x42\x86\x25\x04\x8d\x19\xe1\x49\x6d\ \xdb\x97\xb1\xe7\x18\xf9\x54\xfe\x99\xd4\x89\xab\x8b\x23\x14\x53\ \x95\xba\x89\xa6\xf5\x97\xcb\x28\x83\x80\x58\x1e\x79\x6e\x00\xf6\ \xe0\x9e\xc2\x99\x1b\x78\x34\x35\x54\xcc\x9c\x64\x4e\xe9\x40\xa0\ \x54\xbd\x14\x51\x5d\xaa\xab\x5c\xb6\xeb\x3b\xc4\x59\x03\x18\x9f\ \x7a\x7c\x1b\x04\x67\xe8\x4d\x79\xbb\xb4\x4b\xfb\x29\xa3\x92\x31\ \x2c\x13\xc6\xd1\xc8\x87\xb1\x56\x18\x20\xfc\xc1\xac\xd1\x42\x17\ \x15\xdf\x4e\xdb\xdf\x42\x8b\x25\x9c\x72\x24\x76\xcf\x6a\xa0\xe7\ \x88\x9c\x00\xc9\xdf\xb1\xda\xbf\x4a\x0f\x4e\xdb\x9b\xef\x33\xd0\ \xa2\xf3\xfc\xe4\xb8\xdf\xce\x7c\xc4\x43\x1a\xb7\xcc\x21\x22\x8a\ \x28\x42\x34\xde\x9b\xb6\xd2\x26\x56\x82\xca\x2b\x79\x12\x13\x02\ \xb0\xce\x42\x17\x2f\xb7\xe5\xbd\x89\xfd\xeb\xb2\x3b\x55\x8a\xe2\ \x57\x08\x04\xb3\x05\x0e\xde\xd2\x17\xb0\xf9\x0c\x9e\x3e\x26\xb3\ \x45\x08\x5b\x68\xa2\x8a\x10\xbf\xff\xd9\ \x00\x00\x06\xd8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x06\x6a\x49\x44\x41\x54\x58\xc3\xed\ \x55\x69\x4c\x94\x57\x14\x55\xd4\x56\x5b\x63\xb4\xd5\x68\x13\xb5\ \x5a\xb5\x5a\x71\xa9\x25\x75\x50\x91\xd2\x0a\x54\x65\x13\x10\x14\ \x64\x19\xd1\x6a\x2b\x8b\x53\x34\x38\x2c\x65\x11\x37\x16\x51\x60\ \x40\xa8\xe2\x52\x59\x44\xa4\x54\x2d\x8e\xe0\x82\x36\x2e\x35\x2e\ \xa3\x18\xc6\x9a\x6a\x27\x85\xa9\x86\x88\x31\x19\xa5\xc9\x24\x24\ \xa7\xe7\x8d\x6f\x5a\x4b\x45\xb1\xb5\xb1\x3f\x3a\xc9\xc9\x97\x6f\ \x79\xf7\x9e\x7b\xee\xb9\x77\xba\x00\xe8\xf2\x22\xd1\xe5\x7f\x02\ \xff\x29\x02\x1f\x06\xa6\x78\x10\x49\x44\xa1\x44\x26\xb1\x84\xb0\ \xfb\x57\x09\x30\x81\x0f\x51\xaa\x5a\xad\x35\x24\x64\xea\x5b\x12\ \x33\x8d\xa6\xc4\x2c\xa3\x29\x35\xe7\xe6\xbd\xf8\xcc\xb3\xb7\x16\ \xab\x4b\xaf\xf3\x7d\x9d\x24\x67\xfb\x5c\x09\x30\xe0\x50\xb7\xb0\ \x0c\xdd\x9a\x9c\x3b\xad\xa1\xd1\xc0\xac\x50\x60\x46\x30\xe0\xaa\ \x04\x3c\x3e\x05\x16\xac\x04\x22\x53\x81\x35\xf9\xe6\xb6\x75\x5b\ \xf4\x2d\xc1\xd1\x45\x7a\xa9\x8e\xcb\xf3\x22\x10\x1d\x9f\xa1\x6b\ \xf6\x5f\x06\x4c\x98\x0d\x8c\x72\x25\xdc\x80\xb1\xde\xc0\x78\x7f\ \xc0\x2e\x08\x70\x08\x23\xb1\x70\x20\x38\x16\x88\xdd\x04\x64\x6e\ \x35\x9a\x3e\x89\xb5\xa8\xf2\x8f\x89\x08\x02\x75\xb1\x69\xe6\xb6\ \xa9\x7e\xc0\x9b\x0c\x35\xdc\x1d\x18\x13\x00\x4c\x5c\x08\x28\x48\ \x4a\x11\x01\x4c\x66\x72\x7b\xaa\x31\x8d\x70\x89\x04\x02\xe3\x48\ \x64\x33\x90\xb5\xc3\x68\x0a\x5e\x61\x51\x44\x2d\x94\xfc\x5b\x04\ \x84\xfc\xcb\x29\xf1\xfb\xf3\x80\x91\x5e\xc0\xb8\x10\x56\xac\x02\ \x3c\x57\x33\x11\xab\x55\xe6\x02\x41\xbc\x7a\x6f\x60\x5b\x12\x00\ \xc7\x15\xc4\x72\x2a\xf2\x39\xdf\x25\x01\xa9\x85\xc0\xda\x7c\x5d\ \xb3\xdb\xa2\x0c\x1d\x49\x84\x3f\x33\x01\x21\xa5\x6a\x3d\x30\x85\ \xbd\xb7\x65\xef\xa7\x31\xb0\x7f\x06\xb0\xaa\x14\xc8\x3b\x02\xec\ \x3c\x05\x6c\x3d\x09\xa4\x7d\x0b\xac\x28\x26\x19\x12\x9a\xbd\x06\ \xf8\x68\x15\xbd\x42\x32\x73\xd4\x40\x04\xc9\xe5\x94\x98\xdb\xa2\ \x56\x57\xdd\x78\x56\x35\x44\x0b\x2e\x24\xe4\x00\xce\x94\xd6\x9e\ \xfc\x3d\xd7\x02\xea\x32\x60\xef\x05\x60\x73\xe9\xd9\x5b\x91\xa9\ \xa5\xd7\xd3\x77\xd6\x35\x56\x9e\x32\x9a\xf6\x5f\x65\xa2\xe3\xc0\ \xca\x3d\x34\x67\x1e\x89\xf0\x5b\x67\xfa\x62\x16\xc9\x04\xa5\xd0\ \xa8\x5f\x02\xeb\x0b\x7e\x57\xc3\xa7\xd3\x1e\xc8\x2a\x36\xb7\xf9\ \x25\xb2\xbf\xec\xad\x32\x1f\xc8\x3f\xc6\xca\x0f\xe9\x5b\xe4\xd8\ \xd9\x11\x81\xc2\x70\xf3\x55\x9a\xfa\xaa\xb3\x46\x53\xe5\x15\x20\ \xbd\x16\x08\xa7\x22\xfe\xd9\x24\x40\x45\x3e\x66\x7b\x44\x8c\x15\ \xf4\x86\xa6\xe4\x4e\xab\x5f\xb8\xa6\xbe\x33\x2d\x11\x04\x92\x36\ \xee\xd4\xb7\xa8\x34\x0c\x96\x0e\x44\x7d\x05\x94\x9f\xa7\x0a\x59\ \x16\x39\x9d\xda\x2d\x2a\x17\x41\x44\xbd\xa9\xea\x46\xf5\x15\x93\ \x79\xfb\xf7\x40\xc2\x41\x60\xe1\x76\x7a\x64\x23\x30\x93\xbe\xf1\ \x26\x89\xcf\x18\x47\x53\x66\x6e\x5b\x12\x6f\x99\x14\x75\xfb\xa4\ \x62\x97\x58\x77\x8a\xe5\xc6\x2f\x42\x53\xaf\xd9\xcf\x8a\x28\xa1\ \x7a\x2f\x50\xa9\x23\x91\x35\x96\xc3\x8f\xdd\x80\x7c\x1e\xe2\xb1\ \x24\x43\x57\xf1\xdd\xcd\x7b\x55\x0d\x1c\xcb\x3a\xee\x8a\x72\x20\ \x60\x0b\xe0\x46\x3f\x78\xb1\x1d\x61\xbc\x66\x95\x00\x31\x69\x5a\ \xc3\xa3\xbe\xb0\x26\x2f\x28\x7e\xa8\xb0\x35\xa0\x3a\x73\x97\xae\ \x39\xfd\x1b\x20\x85\x44\xca\xd9\xff\x8c\x5d\x75\x8d\x42\xfa\x8e\ \xa4\xe3\x3b\x7b\xb1\xaa\x53\x0b\xb5\x86\x9a\x6b\xe6\xb6\x82\x73\ \x24\x4f\xa3\x2a\x77\x50\x85\x4d\x0f\xbd\xa4\x24\x89\x75\x3b\x69\ \xe0\xad\xba\x66\x6b\xc5\xe2\x9a\x4b\xc5\x4f\x9e\x01\x84\xff\xac\ \xc1\x86\xba\x2f\xce\xd0\x95\xd6\x99\xcc\xb9\x74\x7e\x31\x83\xed\ \x3d\x71\xf3\x9e\x48\xf0\xb4\x1e\x8a\x3e\x2f\x4e\x28\xd2\xd7\xea\ \x4d\xe6\xdd\x54\x2e\x99\xde\x58\xca\x09\xf2\x67\x4b\xbd\xd3\xb8\ \xbc\x88\x38\x8e\x6a\x42\xb6\xa5\xe2\x03\xaa\x54\x7d\x4b\x26\x95\ \xd6\xd6\x3d\x42\xc0\x2a\xab\x72\x55\x91\xbe\xf2\x9c\xb9\x6d\x0f\ \x3d\x70\xda\x00\x08\xd3\x75\x66\xf7\x5b\x5b\x52\x73\xf5\x4e\x6b\ \x05\x5b\x92\x76\x02\x58\x56\xc1\x49\x61\x62\xdf\x2c\x60\x1e\x95\ \x08\x5e\x47\x52\x6a\x93\xd9\x87\x3b\x64\x59\x32\xdb\xac\x6d\x47\ \xc0\x5a\x4d\x62\xae\xd6\x70\xec\x1a\x70\xf2\x47\xa0\xec\xc8\xc3\ \x3e\x75\x66\x9c\xc4\xd8\x79\x92\x44\xf1\x51\x7d\x4b\xd5\x75\xfa\ \x82\xfb\x63\x79\x15\x10\x42\x83\xfa\x70\x32\x66\xd3\xa0\x4e\xfc\ \xaf\x71\xe4\x76\x0d\x63\xc4\x7d\x35\x8f\x21\x60\xf5\x43\xb2\x46\ \x6b\xb8\xf4\x33\xd0\x70\x1b\x58\x14\x67\x59\xb5\x3e\x9d\x24\x61\ \xe9\x71\x09\x49\x7c\x4d\x12\x69\xa7\x01\x15\x3d\x15\xb2\x8b\x24\ \x38\xae\xce\xc9\x0f\x17\xd8\x52\x4e\x49\xd5\x71\x49\xe0\x71\x3f\ \x0b\x89\x3c\xad\xa1\xe1\x16\x70\x82\xb2\x8a\xbf\x6a\x7b\x8f\xa8\ \x01\x7c\xd5\x4d\xa2\x7b\x07\xe8\xe6\xe8\x1f\x37\xde\x29\x20\x29\ \x25\xb3\xfc\xec\xad\xa2\x7a\x7a\x82\xed\x88\x20\x09\x25\x77\x86\ \x2f\x7d\xe1\xc5\xe4\x2a\xb6\xe6\xe0\xe9\xc7\x13\xe8\x4a\xd8\x88\ \x40\x4e\x01\x89\xf1\x61\xb1\xdb\xf4\x17\x0d\xe6\x36\x4d\xf9\x99\ \xdb\xd3\xfd\xe3\xc3\xf9\xbc\x17\xf1\x0a\xf1\x6a\x07\x10\xef\x7a\ \xd9\x7b\xaa\xde\xfb\x60\x7e\xe2\xb6\xec\xe3\x46\x53\x1a\x0d\x9d\ \xc0\x6a\x97\x73\x42\x16\x73\xc3\x86\x16\xf1\x9e\x23\x7b\xf8\xe2\ \x5f\x09\xd8\xc8\x2a\x5e\x22\x7a\x12\xbd\x1d\xe6\xaa\x57\xfa\x47\ \xe5\x34\x1c\xbf\x7c\xe7\xd7\xe4\xbc\xea\x46\x85\x7b\xc4\x02\x3e\ \x1f\x48\x0c\x92\x78\x43\xc2\x7a\x3f\x70\x8c\xfd\x9c\x49\x0e\xbe\ \xab\xd2\x8b\x6a\x1b\xee\x56\xdc\x04\x0a\xb8\xbe\x37\x71\xac\xd7\ \xd3\x13\x5f\x70\x42\xe2\xb8\xb8\x72\xb9\x69\x4f\x5d\xfb\x33\x01\ \x91\xbc\x87\xac\xb0\x0f\xf1\xba\x0c\x38\xc4\x6e\xe6\x92\xa5\xd3\ \xe7\xaa\x0f\x64\x97\x9e\x6a\x56\xc6\x14\xde\x78\x6b\xa2\xf3\x2c\ \x3e\x1f\x4b\xd8\x12\xe3\x24\x6c\xe5\xb3\x77\x26\xbb\x45\x6c\xd8\ \x55\x7d\xa1\xa5\xfe\x2e\x50\xf7\x0b\x70\x88\x5e\x3a\xf0\x13\x7b\ \x4e\x53\x97\x73\x42\xca\xb9\xc6\x8f\xfe\x00\xd4\x37\xfe\x41\xa0\ \xab\xac\x5c\x24\xef\x2b\x2b\x1a\x2e\x82\x11\x13\x08\xbb\x7e\x03\ \x87\xbb\xbc\x3b\x43\x99\x36\x78\xb4\x22\x90\xf7\x8e\x84\x93\xb0\ \x4a\x3b\x38\x0d\x7e\x5b\xb1\x40\x19\xb3\xc5\x70\x44\xd7\xd8\x7a\ \xf4\x72\x63\x6b\x2d\xaf\xb5\x97\x9b\x1e\xd4\xea\x9a\x1e\xd4\x5c\ \x6a\x7a\x70\xf8\x52\xd3\x7d\xed\x85\xa6\xfb\x87\xcf\x1b\xef\x1f\ \x3a\x67\x34\x89\xb5\x6e\xad\xfe\x65\x59\xb9\xa8\x7a\x24\x31\x91\ \x98\x22\x13\xb9\x12\xb3\x09\x77\xc2\x8b\xf0\x26\x7c\x89\xb9\xed\ \x20\x9e\x79\x8f\x98\xe4\x9a\xa8\x70\x8b\xd0\x5a\xe0\x1e\x59\xad\ \xf0\x88\x3a\x38\xc5\x53\x55\x35\x75\x4e\xf4\x3e\x07\x9f\x98\xb2\ \xe9\x7e\x71\xbb\x1d\xe7\x25\xec\xa0\xc7\xb6\xd1\xac\x22\xb6\xc5\ \xd5\xa2\xe7\xfd\x84\xe4\x52\x4a\x7b\x62\x06\xe1\x26\x13\xfa\x11\ \xf3\x09\xa1\x40\x10\x11\x42\x84\xb6\x43\x88\x7c\x17\x28\xbf\xf5\ \x93\x67\xdd\x64\x2c\x7b\x19\x7b\x88\xcc\xd5\x53\xe6\x7e\xf1\x04\ \x9e\x6b\x0b\xe4\x37\xee\xf2\x8c\xab\x8c\x31\x45\xc6\x1c\x29\x73\ \xf4\x91\x39\x6d\x3a\x65\x42\x42\x41\x4c\x25\x1c\x9e\x64\x42\xf9\ \xce\x41\x7e\xab\x90\x67\x27\xc8\x58\xc3\x65\xec\xbe\x32\x57\x77\ \x99\xfb\xc9\x63\x48\x0c\x23\x46\x10\xa3\x88\xd1\x32\x58\x87\x63\ \x28\xbf\x19\x25\xcf\x0c\x93\x31\x06\xc9\x98\x7d\x64\x8e\x1e\xd6\ \xea\x9f\xb8\x88\xe4\x01\xd1\xaf\xd7\x88\xfe\xc4\x80\xa7\x2d\x22\ \xf9\x4d\x7f\x79\xa6\x9f\x8c\xd1\x5b\xc6\x7c\x49\xe6\xb0\xb1\xfe\ \x7f\xfc\x06\xb3\xa4\x19\x9e\x6b\xe3\x34\xfa\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x05\xe8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x05\x7a\x49\x44\x41\x54\x58\xc3\xc5\ \x96\x0d\x4c\xd4\x75\x18\xc7\x1f\x2e\x01\xb1\xc0\x38\x1c\x6f\x81\ \x61\x9a\x24\x18\x57\x20\x21\xa9\xbc\x1b\xd4\x28\x96\x2d\x93\x36\ \x27\x45\xb9\xca\x88\x4a\xd9\x60\x33\x29\x50\x47\x80\xbc\xb8\xb0\ \x40\x40\x4e\x8e\x57\x89\xe0\x70\x8a\x32\x72\x91\x81\xd3\x39\x60\ \x97\x20\x06\x2c\x25\x85\x89\x16\x2f\xcd\xdd\xb9\xe0\xe9\x79\xce\ \xdf\x7f\xfb\xeb\x4c\x8e\x08\xba\xed\x33\x8e\xdf\xff\x7f\xff\xe7\ \xfb\xbc\xff\x01\x11\xe1\xff\xc4\xb4\x9b\x00\x1c\x89\x08\x62\x23\ \x11\x44\xb8\xce\x99\x00\xfa\xb8\x3d\x09\xb0\x27\x09\xe0\xec\x1e\ \x80\xde\x4f\x00\x5a\x82\x01\x0e\x08\x31\xee\x73\x21\x20\x2a\x19\ \x40\x97\x4f\xb7\xca\x61\x31\x8b\x00\x76\xd2\x75\xcb\xd9\x16\xb0\ \x9d\x0d\xb2\x08\xfe\xce\x46\x39\x1a\x7c\xf6\x16\x40\x1d\x9d\xf9\ \xcc\xb6\x80\x8d\xec\xed\x07\x00\x27\xe8\xfb\xf3\x5c\x0f\x2c\x42\ \x26\x2a\x6a\xd6\x04\x70\x8e\x57\x01\xec\xcb\x03\xb8\x95\xea\xe4\ \xd4\xce\x85\x28\xce\x37\x7f\xe5\xe2\x32\xc4\xc2\x58\xe0\x6c\x0a\ \x30\x7a\xcf\xde\x6a\xfc\xfc\xf4\x22\xe7\xdc\x0d\x9b\x0b\xbc\xbc\ \xae\xcf\x85\x00\x77\xae\x78\xae\x7c\xb5\xa7\xa7\xbe\x22\x34\xd4\ \xc0\x91\x60\x6a\x37\x6c\x40\x29\x2d\x26\x1b\x03\x58\xc6\x29\x13\ \xad\x6c\x6b\x6a\x0d\xb8\xf2\x0f\x42\x15\x8a\xaf\xd9\xa8\x76\xeb\ \x56\x23\xdf\x45\x47\x9b\x5c\x03\xf4\xf1\x0d\x0b\x0b\x4b\x3c\xdf\ \xd8\xf8\x8b\x7e\x74\xf4\xaf\xa1\xee\xee\x3f\xf9\x99\x26\x0f\x22\ \xf1\x90\x30\x8e\x44\xb1\x9d\x1d\x1e\x72\x72\xc2\x83\x16\x16\xc8\ \xb5\x41\xe7\x1f\x3e\xc8\x70\x48\x48\x48\xe2\x39\xad\xb6\x5f\xaf\ \xd7\x23\x33\x36\x34\x84\x27\x93\x92\xae\x49\xc2\xa7\x23\xc0\x96\ \x6b\x20\x07\xe0\xa6\x7c\x1e\xbc\x0c\x70\x88\x43\x2b\xbb\xcf\x92\ \x0d\x07\x05\x05\x25\xfe\x54\x53\xd3\x3f\x32\x32\x82\xcc\x28\xd1\ \xd3\xd8\x78\xfb\x1d\x95\xaa\x54\xa4\xc1\x6d\x5a\x02\x24\x8f\xb8\ \x26\xd8\xf0\xa9\x98\x18\x1c\xed\xef\xc7\xac\x80\x80\x56\xd1\x9e\ \x0b\x88\xb5\x61\xbe\xbe\x99\xa7\xca\xcb\xfb\x07\x07\x07\x51\xe2\ \x4a\x4f\x0f\x7e\x9b\x90\xd0\x27\x8a\xd8\x77\xda\xbb\xe0\xde\x54\ \xb4\x16\x16\xfe\x66\x30\x18\x90\x39\x97\x9b\xcb\xf9\xdc\x1c\xe2\ \xe3\x9d\x79\x22\x3f\xff\x6a\x5f\x6f\x2f\xf6\xca\x38\x5b\x55\xa5\ \x8f\x59\xb9\x92\xbd\x0e\x93\x0a\x6f\xa6\x02\x6c\x83\x83\x83\x13\ \xc7\xc7\xc7\x91\xb9\x79\xf5\x2a\x96\xa4\xa6\xde\xa8\xae\xae\xc6\ \xd6\xd6\x56\xec\xec\xec\x34\x72\xfe\xf4\x69\x2c\x89\x8b\xbb\xc8\ \xe2\x08\xaf\x19\x6d\xc3\x7b\x05\xb0\x37\xa7\x6b\x6a\xae\x0d\x0f\ \x0f\xa3\x5a\xad\xc6\xe4\xe4\x64\xac\xad\xad\xc5\xe2\xe2\x62\xd4\ \x6a\xb5\x78\xbc\x20\xff\xd6\x6b\x1e\x1e\x07\x85\xd7\x0b\x66\xbc\ \x8e\x65\xed\x18\xb1\xc2\xc1\x61\xf7\x81\x84\x84\xeb\x65\x65\x65\ \xc6\x10\xfb\xfb\xfb\xa3\x8d\x8d\x0d\x0e\x0c\x0c\xe0\xf1\x86\x06\ \x4c\x89\x8e\xee\x9e\xce\xa6\x9c\xca\xa8\x8d\x28\xb0\x77\xb9\xf8\ \x76\x3b\x3b\xff\x7c\x24\x37\x77\xb2\xa2\xa2\x02\xb3\xb3\xb3\x31\ \x2f\x2f\x0f\x2b\x2b\x2b\xb1\xbe\xbe\x1e\x2f\x5d\xba\x64\xe4\xb2\ \x4e\x67\x08\x50\xa9\xd2\x1f\x14\xf6\x29\x05\xd0\xc7\x93\xbd\xe0\ \xf7\x00\x9e\x76\xfb\x01\xc6\x8c\x6d\x67\x66\x86\x05\x56\x56\xa8\ \x49\x4b\xc3\xc3\xf9\xf9\x93\xbb\x62\x63\x7b\x93\xe3\xe2\x86\x4a\ \xd3\xd3\x7f\xa7\x9c\x4f\x76\x74\x74\xa0\x4e\xa7\xc3\x3f\x86\x87\ \x27\xd3\xb6\x6d\xab\xe7\xae\x30\x59\x80\xd4\x46\x3c\x58\x36\x01\ \x54\xee\x05\xe8\x67\xa3\xdf\x00\x4c\xf0\x5f\x7a\x03\x31\x94\x2c\ \x5e\x6c\xec\xfd\x02\x47\x47\xf4\x51\x2a\x33\xc5\xfd\x2c\x36\x68\ \xb5\x83\xc3\xbe\x86\x9c\x9c\xd1\xb6\xd6\x36\x6c\x6b\x6b\xc3\x6b\ \x57\x06\xb0\x49\xa3\xb9\x38\x55\x1d\x48\xc6\xbd\xb8\x47\xd9\x5b\ \x32\xa4\x97\x86\x0c\x7f\x4f\x00\x68\xa2\x61\xb3\x85\xd3\x50\xe4\ \xea\x6a\x28\xb4\xb6\x36\x5e\x7b\x1d\x60\x07\x9d\x3d\x24\xe3\x09\ \xe2\xd5\x9d\x51\x51\xdf\x37\x69\xb5\x93\xcd\xcd\xcd\xd8\xd5\xd5\ \x85\xdd\x67\xce\x8c\x89\x05\xe6\xf8\x0f\xd1\x06\x77\x36\x9e\x05\ \x70\x5d\x32\x9c\x0b\x30\xf2\x11\x40\xa1\x2f\x09\xa3\xeb\x66\xc4\ \xfa\xf7\x01\x4e\x56\x05\x06\x62\x81\xb9\x39\xee\x02\xa8\x15\x13\ \x6f\xfe\x7d\x08\x59\x6e\x6f\x9f\x56\x96\x92\x32\x76\xf4\xe8\x51\ \x6c\x69\x69\xc1\x5f\x2f\x5c\x30\xac\xf1\xf0\xc8\xa0\x6b\xaa\xfb\ \x09\xd8\xf8\x25\xc0\x80\x31\xb4\x36\x36\xb7\xdf\xa3\xfd\x2f\xa9\ \xa5\x8f\x92\x08\xa7\x92\xae\x2e\x75\x77\xc7\x32\x95\x0a\xbf\x00\ \x68\xa6\xb3\x85\xc4\xa3\xa2\x25\x95\x32\x6c\xc5\xf9\xd3\xc4\xa6\ \x4f\xc3\xc3\x7f\xa8\x3e\xac\x9e\xac\xab\xab\xc3\xcb\x3d\x3d\x13\ \xd1\x91\x91\x64\x06\xd6\xdd\x25\x80\x0b\x8d\x8d\x97\xfb\xf8\xe0\ \x8b\x00\x7b\x65\xc6\x9f\x22\xa2\x3f\x06\xf8\x51\xed\xe6\x86\x47\ \x22\x22\x90\x92\x3e\xc0\x5e\x10\x8f\x89\xb6\x7c\x9c\x67\xba\x0c\ \xfe\x7f\x31\xe1\x42\x38\x13\xaf\x2c\xb5\xb3\xcb\xca\x8b\x8f\xbf\ \xa1\xd1\x68\x50\xd7\xde\x8e\xc9\xb1\xb1\x0d\xf2\x16\x05\xe9\xf5\ \x8a\x57\x2d\xbf\xeb\xad\xba\x13\x81\x1d\x24\x6c\xef\x6e\x80\x3e\ \xf6\x9c\xaf\xe5\x29\x14\x7a\x6f\x80\xb7\x85\x30\x0f\xe1\x25\x8b\ \x79\x46\x86\x4a\x9c\x73\x61\xae\x20\x96\x13\xcf\x11\x6f\x6e\xf1\ \xf3\x3b\x56\x98\x91\x31\x71\x4c\xad\x36\xd0\xff\x6f\xc8\x53\xb0\ \x96\xf3\xaf\xf1\xf2\xc2\x9a\xc8\x48\x64\x83\xbc\x6a\x19\xce\xb9\ \x64\x9c\xe6\x00\x6d\x63\x78\x56\x3c\x70\x35\xb1\x86\xc3\x49\x04\ \xc8\x58\x27\xce\xfd\x09\x3f\x7e\x61\x15\x82\xc8\x1f\x78\x69\xa9\ \x52\x99\x11\xe5\xe9\x59\xc6\x4e\xdc\xd5\x05\x24\x75\x0d\xd5\x41\ \x57\x81\x42\x81\xbc\xef\x4b\x9c\x9d\x8d\x14\xd1\x84\xe3\x9d\x1f\ \x02\x10\x4f\x3f\xf2\x16\x0f\x66\x43\xa4\x07\x42\xb9\x38\x89\x17\ \x64\xac\x17\x6d\x47\x3f\x81\x40\x21\xc6\x57\x44\x84\xd3\xe3\x24\ \xd2\xa3\xb8\xef\x20\x8a\x21\xc5\xdb\x01\x3e\xff\x0c\xa0\x88\xf6\ \x66\x31\xb9\x9c\xb2\xee\x4e\xc8\xdd\xff\x23\x01\x4a\xd1\x29\x8a\ \xa9\x26\xa1\x82\x98\x47\x3c\x4c\xd8\x13\x4b\x44\xde\x67\x92\x02\ \x67\x31\xda\x2d\x4c\x11\x60\x26\x86\xcb\x7c\xd1\x72\x0e\xa2\xba\ \x97\xfd\x8b\x22\x5c\x22\x8c\xdb\x8a\x69\xcb\x8e\x99\x4d\xb9\x8c\ \x84\x88\x79\x42\x84\xb5\x08\x9f\xbd\xc8\xa3\xa9\x6d\xc8\xc2\x17\ \x09\x27\xd8\xb8\xb9\xdc\x7b\x53\xb6\xa1\x24\x82\xc3\x66\x25\x52\ \x62\x6d\xc2\x20\x5a\x28\xc2\xfd\x88\x30\x6c\x29\x9e\xa3\x90\x7b\ \xcf\xfc\x0d\xe3\x58\x91\xad\x93\x78\x02\x2d\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x04\xb6\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x04\x48\x49\x44\x41\x54\x58\xc3\xe5\ \x57\xcf\x6f\x1b\x45\x14\xfe\x66\x77\xed\xf5\x6e\xb6\x24\xb1\x1b\ \x24\xa0\x6d\x44\x10\x3f\x0a\x14\x81\xa0\x34\x42\xe4\x50\x10\x48\ \x88\xbf\x82\x53\xfe\x01\x8e\x48\xa8\xe2\xc0\x85\x7f\x20\x5c\xb8\ \x72\xe1\x08\x87\x22\x81\x25\x40\x21\x04\x50\x91\x9d\xa4\x2d\x4e\ \x4b\x4c\xda\xca\x8d\x08\x75\x12\xd7\xf6\x7a\xd7\xc3\x7b\x33\xbb\ \x9b\xd4\x3f\xd3\xd6\xd0\x03\x23\xbd\xcc\x6c\xe6\xf9\xbd\x6f\xbe\ \xf7\xe6\xcd\x8c\x90\x52\xe2\x41\x36\x03\x0f\xb8\x59\xf1\x60\x7e\ \x7e\xfe\x5d\xea\x4e\xff\x47\x7e\x97\x17\x16\x16\xbe\xbc\x03\x00\ \x3b\x7f\xe4\xb1\x13\x1f\xce\xcc\x3c\x0e\xd3\x34\xb1\xfa\x93\x8f\ \xb5\xe5\x3a\xf6\xaa\xe1\x7d\x79\xf2\xc6\x4d\x9c\x3c\xed\xe0\xd9\ \x57\xd3\x08\xc3\x10\x57\xae\x5c\xc5\x8d\x6b\xe5\x73\x34\xd5\x05\ \x00\xdf\x7c\x9b\x47\x61\x65\x0d\xd9\xec\x51\xdc\xdc\xb0\xf0\xde\ \xfb\xaf\x8f\x64\xb9\x9f\x7d\xfa\x3d\x6e\x36\x02\x2c\xfe\x90\x47\ \x36\x37\x85\x93\x4f\xcd\x74\x87\x80\x5b\xca\x4a\x61\x62\x22\x8b\ \xdc\xd1\x29\x38\xa6\x83\x4c\x26\x33\x12\x00\xd3\x4f\x3c\x0a\x77\ \xbc\xae\x16\xc6\x3e\x7a\xe6\x00\xb7\xb4\x9d\x81\xe3\xb8\x70\x5d\ \x0f\xb6\x39\x86\x4b\x97\xd6\x49\x83\x54\x52\x69\xc0\xb6\x01\x06\ \x44\x3a\xaa\x4f\xd3\x77\x3a\xad\xe7\x83\x00\xf0\x7d\x92\x26\xd0\ \x68\x00\xcd\x46\xd4\xd3\x77\xcb\xc7\x64\xee\x21\x98\xb6\x89\x17\ \x5e\x7c\x05\xeb\xa5\xcb\xfd\x01\x18\xa6\x41\x62\x91\x98\xfc\x81\ \x33\x67\x5e\x1e\xb2\xb6\x50\x0b\x5b\xb1\xe8\x37\xae\x4b\x03\xb7\ \x4b\xeb\xfc\xf9\x35\x65\x53\xdb\x16\xfd\x01\xb4\xc3\x36\x49\x88\ \x30\x20\x69\x07\x3a\x04\xac\x2f\x05\x75\x52\x8d\x25\x8f\x55\x2f\ \x75\xcf\x3f\xe4\x29\x35\xa6\xb9\xa8\xac\x90\x1a\xb4\x2b\x89\x80\ \x6c\x99\x64\xb7\xad\x44\x0e\x00\x40\x46\xc3\x76\xa8\x85\x40\x14\ \x8b\x7f\x68\x8a\x6d\x8a\x9b\x4d\x74\x3b\x24\x19\x3b\x12\x1a\xa7\ \x53\x9c\x38\x44\x33\x87\xa0\x45\x94\x53\x18\xea\x1c\x06\x92\xba\ \xaf\xbf\x9b\x2d\x65\x0b\x96\xb6\xdb\x96\x03\x00\xc8\xb6\x44\x5b\ \x09\x31\x21\xdb\x98\x9b\x7b\x69\x78\x86\xb1\x41\xa6\x5f\x85\x80\ \x18\x9b\xec\x56\x59\x29\x94\x21\xd8\x26\xd9\x66\x1f\x7d\x01\x68\ \x42\xa5\x36\x4a\x62\x73\xe2\x45\x4d\x45\x82\xff\x0a\x45\x34\x92\ \x12\x2e\xa2\x9f\xed\x0f\xf4\x3c\xc7\x42\xea\x71\x6c\x2f\xb1\xdf\ \x1f\x80\xd0\x22\xb4\xfc\x52\x2c\x43\x5a\x06\x44\xda\xd2\x74\x33\ \xf5\x71\x38\x6c\xde\x1d\x1c\x02\x5a\x39\x51\x2c\x29\x0c\xa2\xa1\ \x29\x57\x42\x63\x49\x61\x11\x7e\x90\xd8\x4b\xec\xf7\x03\x20\x12\ \xdf\x02\xde\x44\x0a\x67\x5f\x7b\xfe\x70\x1b\x9d\x77\x0d\x83\xf2\ \xdc\x9e\xd3\x17\x96\x7f\xa5\x5d\x29\xf6\x71\xf4\x65\x40\x08\xe5\ \x5c\x08\x03\xc7\x8f\x4f\xd1\x02\x53\x23\x29\x44\x6c\xab\x54\xda\ \x55\x76\x3b\x11\x74\x30\x20\x60\xd0\xfe\x37\x0c\x01\xd7\x71\xf0\ \xf3\x85\x55\x8c\x1f\xf1\x54\x7d\xb8\x97\xc6\xdb\xba\xba\xbb\xa7\ \x6c\x19\x86\xa1\x44\x0c\x02\x60\xf0\xea\x0d\xa1\x14\xaf\x5d\xaf\ \x60\xeb\xaf\x6a\x12\x1a\xc8\xfd\xf4\x39\xf8\x2d\xa2\x1c\x43\x57\ \x74\xf7\xd3\xba\x49\x95\xd1\x64\xe7\x6c\x7b\x20\x03\x4a\xc1\x88\ \xd0\x9a\xea\x54\x1c\x45\x33\xc9\x96\x60\x66\x85\x06\x31\x24\x04\ \x86\x72\xbc\x71\xb5\x84\xcd\xcd\x32\xea\xf5\xda\x7d\x39\x77\x9c\ \x31\x1c\x3b\x76\x02\xb9\xa9\x87\x0f\x13\x02\xbd\x7a\xa6\x8b\x2b\ \xd6\xc7\x1f\x7d\x80\x9d\x9d\x1d\xd4\x6a\x35\xb4\x5a\xad\x04\xa0\ \x45\xd5\x31\x16\x4e\x54\xee\x19\x34\xcf\xa9\xd8\x53\xd1\xf1\xe9\ \x70\x8a\xe5\xf3\x2f\xbe\x52\x36\x59\xd8\xc7\x10\x06\x38\x0f\x0c\ \x4c\x66\x73\xc9\xff\x17\x17\x17\xb1\xb4\xb4\xa4\x1c\x70\x01\x9a\ \x9d\x9d\xa5\x2a\x39\x77\x68\x16\xd8\x96\x88\x72\xa0\x93\x01\xa3\ \x13\x40\x9c\x84\x0e\x65\x6e\xdc\x8a\xc5\x22\x9d\xe5\x74\x4f\xc8\ \xe5\x94\x14\x0a\x85\x21\xd5\x59\x76\x84\xc1\x49\x16\x26\xc4\x90\ \x42\xa4\xc3\x20\xd4\xa9\x17\x37\x97\x8e\x59\x3e\x19\x63\x8a\xe3\ \xbe\x5f\xeb\x5a\xa5\xd2\x97\x3d\x77\xc9\x9d\x0c\x20\x42\xc8\x20\ \x0e\x18\x39\x98\x3c\xdc\xdf\xf5\xee\x88\xb6\xac\x8c\x0e\xb9\x01\ \x95\xf0\x40\xd9\xee\x89\xf7\xde\x1a\xdf\x2d\xf8\x2e\xe0\xd3\x8d\ \x89\xa5\x2f\x03\x41\xe0\x53\xd1\x68\xd2\x8d\xaa\xa1\x32\x7b\x64\ \x8d\x96\xbf\xbb\xb7\x8b\x4a\xe5\x06\x6e\xfd\xbd\xdd\x1f\xc0\xed\ \xbd\xdb\xd8\xa9\x56\x95\x92\x21\x46\xf8\x62\x92\x21\x36\xd6\x4b\ \x28\x5d\xbe\x48\x87\xa9\x95\xe7\x77\x41\xcf\x10\xd4\x9b\x75\x6c\ \x6d\x55\xe8\x74\x0d\x70\xc4\x1b\x43\xfe\xbb\x1f\xe1\x79\x1e\xce\ \xbe\xf9\x4e\xd7\x39\x5e\xde\xac\x0c\x4a\x43\xd2\xa6\xdb\x15\xd9\ \xd9\xde\xbe\xc5\xef\x00\xac\xac\xfc\x46\x97\xa8\x54\xfe\x99\xa7\ \x9f\xfc\x84\x14\xf2\x3d\x01\x5c\xdf\xfc\x13\xbf\x5f\x5c\x55\x49\ \xf7\x35\x85\xa0\x33\x9b\xef\x7a\xe1\x52\xdf\xae\x42\xba\x35\x4f\ \x4f\x4f\xe7\x4f\x9d\x7a\x4e\x39\xa7\x57\x51\xad\x17\x80\xe5\xb7\ \xdf\x7a\xe3\xdc\xbf\xf9\x1c\xeb\x74\xae\xb8\xfa\xdf\xbf\x8e\xff\ \x01\x8c\xae\xac\x22\x42\x7f\x21\xa9\x00\x00\x00\x00\x49\x45\x4e\ \x44\xae\x42\x60\x82\ \x00\x00\x08\x78\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x08\x3f\x49\x44\x41\x54\x58\xc3\xad\x57\x0d\x50\x93\xf7\ \x1d\xae\xda\x6d\xb6\xb7\xeb\x6d\x5d\xb7\xdb\xe7\x79\xfb\xba\xb5\ \xdb\xda\xab\xb6\xda\xde\x76\xe7\x7a\x37\xbb\x8f\xb3\x6e\xd3\xde\ \xa9\xd4\x8f\xad\xdb\xea\xb4\xee\xe6\x67\xd5\xda\x22\x88\x42\x2c\ \x08\xd1\xc8\x97\x08\xd1\x02\x22\x8a\x84\x40\x02\x24\x81\x40\x04\ \x02\xf9\x00\x92\x90\x90\x90\x40\x42\xc2\x57\xc2\x37\x28\x88\xa5\ \x67\x9e\xfd\xfe\xaf\x7f\x1c\x28\xda\x76\xe7\x7b\xf7\x5c\x72\xc7\ \xcb\xff\xf9\xfd\x9e\xe7\xf9\xfd\xde\x37\x8f\x01\x78\xec\x51\x82\ \xae\x6f\x10\x56\x13\xa2\x09\x1b\x09\x3f\x7e\xe8\xfd\x8f\x90\xf8\ \x71\xc2\x6f\x97\x2d\x5f\x21\x36\x7b\x3a\xfb\xec\xd7\x01\x57\x68\ \xe4\x3a\x2f\xe2\xab\xec\x6f\x84\x43\xfc\xf3\x91\x5f\xbf\x26\xec\ \xd6\xd4\x9b\x5c\xd6\xb1\x70\x58\x17\xfa\x14\x4a\x47\x2f\x1c\xc1\ \x31\x56\x59\xf4\x92\x25\x4b\xc4\x31\x31\xc7\xfd\x9a\xca\xca\x30\ \x2f\xe2\x91\x5d\xbf\x20\xfc\xed\x64\x72\x9a\xca\x31\xf6\xe9\x6d\ \xfd\x10\x50\x64\xef\x41\x89\xc9\x09\x95\xc5\x03\x5b\xef\x08\xf6\ \xec\xd9\xd7\x9c\x9d\x7b\x31\x1c\xea\x1f\xc4\xe8\xe8\xd8\x34\xdd\ \xbf\xfd\x51\x10\x0b\x3e\x6f\xdc\xb2\x55\xda\x3a\x78\x63\xca\x30\ \x0c\x28\xdc\xc3\x28\x31\xb7\xa1\xc4\xe8\x40\x81\xce\x8c\x84\xcc\ \x1c\x64\x65\xe7\x82\x11\x5f\x9f\xb8\x29\xc0\xed\xf6\xf4\xd1\xff\ \xfd\xe1\x8b\x10\x3d\x4b\x78\x95\xfb\x3b\xc7\x67\x13\xf9\x6c\x1e\ \x05\xd4\x5d\x93\x90\x99\xda\xa0\xa4\xae\xaf\xd6\x34\x21\x35\xbf\ \x18\xa2\xa4\xd3\xb0\xb6\xd8\xef\x12\xcf\x20\x3f\x3f\xbf\x96\x9f\ \xf9\xf9\xa4\x95\xe6\x17\xd4\x32\x5f\x99\xbf\x84\xd7\x66\xfb\x5c\ \x1d\x9c\x86\xac\xb9\x13\xa5\x66\x17\x64\x75\x16\x64\x15\x6b\x10\ \x93\x20\x81\xa6\x52\x3b\x87\x74\xfc\xc6\x24\xc6\xae\x4f\x60\x74\ \xfc\x06\x56\xac\x58\x21\xa6\x33\x16\x3f\x8c\xf8\x7b\x84\xbf\x30\ \x4f\xed\x24\xad\x71\x04\xd0\x05\xc6\xd1\x32\x30\x71\x5b\x67\x75\ \xfa\xed\xa3\x73\x7d\x96\xd7\xdb\x90\x57\x51\x8f\x23\xf1\x62\x5c\ \x2e\x90\xdd\x47\xcc\x48\x87\x47\xc7\xd1\x3f\x38\x8c\xee\xde\xbe\ \x29\x3a\x7b\xc7\x3d\xd3\x30\xa3\xec\x9d\x31\x61\x9e\x5a\x02\xc1\ \x61\x13\x11\x97\x75\x8c\x42\x69\xf3\x43\xd7\xd6\x83\x5a\x4f\x1f\ \xf4\xbe\x41\x94\xbb\x42\x77\x7c\x36\xd8\x71\xb9\xda\x88\xb8\x34\ \x29\xd2\x33\xb3\xe6\xf8\x3c\x87\x78\x60\x88\x88\x83\xe8\xf0\xf9\ \x51\xab\xd7\x77\xb1\x02\x74\x06\x93\x2b\x74\x2b\x1c\xbe\x66\x10\ \x94\x5d\x3d\x53\xc0\xea\x3a\x9b\xd3\x6f\x19\x0d\x87\x2b\x7b\xa6\ \x50\x6c\x0b\x08\xc4\x0c\x55\xce\x2e\x54\xb5\x06\xa0\xb6\x76\x40\ \x61\x6a\xc5\xd5\x6b\x8d\x48\xb9\x24\x47\x8c\x28\x1e\x5e\x3a\x78\ \x76\xd7\x4c\xea\x91\xb1\xeb\xbc\xe3\x20\xdc\xed\x5e\x58\x6c\x2d\ \x28\x92\x97\xa0\xb8\x4c\xe5\x1f\x9a\xb8\x35\xdd\x73\x13\x70\xd3\ \x8e\xb0\x8e\x4c\x83\x2f\x2b\xe1\x8a\xb6\x8d\x03\x85\x96\x00\x2a\ \x1c\x81\xbb\xc4\xda\x56\x3f\x34\x36\xef\x5d\x9f\x33\xe5\x6a\x7c\ \x18\x17\x0f\x7d\x83\x61\x5e\xb9\x07\x87\x47\xd1\x1b\x0c\x09\x1d\ \xb3\x10\x96\xab\x34\x48\x3a\x7d\x06\x5a\x5d\x0d\x7c\x93\x40\x68\ \x0a\x30\xd2\xc4\x28\xbd\x63\x50\x9b\xad\xfe\xd9\x0a\x44\x37\x52\ \xa2\xf3\xaa\x4c\xa8\x76\x75\x0b\x1d\x57\xb4\xf8\x50\xd6\xd4\x86\ \x22\xbd\x55\xf0\xf9\xfd\x63\x22\x28\xcb\x55\xf3\x12\x0f\x8d\x8c\ \x09\x36\xf8\xbb\x7a\xe0\x68\x75\x51\x81\x46\x24\x24\x26\x22\xaf\ \xb0\x08\xde\xe1\x49\xf8\x26\x80\x06\x96\x1d\xef\x24\xa4\xa6\x4e\ \xd4\xf9\x87\xd8\x3e\x38\xc2\xad\xff\x5f\x01\x17\xb5\x06\x54\x3a\ \xfc\x50\x59\xdb\xef\xf8\x5c\x65\x40\x74\x52\x0a\x72\xf2\xf2\xe7\ \xf8\x3c\x23\xf7\x8c\xcf\x5d\x3d\x7d\x70\xb9\xdb\x61\x6a\x6c\x42\ \x6e\xde\x25\xc4\xc6\x9f\x84\xad\xab\x1f\xed\x37\x80\x4e\x22\x57\ \x04\x3e\xc1\x65\xd7\x28\xd2\xf5\x74\xae\xb3\x2f\xbc\xf7\x70\x64\ \x01\x71\xae\x9f\x9d\xfe\x68\xd3\xf0\x6d\x64\x6b\xf4\x28\x6d\x74\ \xa1\xb0\xb6\x19\xd9\x65\x3a\x88\xc4\x92\xfb\x7c\x9e\xe9\x7a\x60\ \x68\x44\x90\xbb\xdd\xdb\x89\x66\xab\x0d\xa5\xa5\xe5\x38\x76\x3c\ \x16\xf5\x56\x07\xda\xc8\x63\x0b\x05\x59\x1d\x04\xa4\x8d\x3d\x48\ \xac\xb0\xe3\x42\x73\x1f\x2e\x18\xbd\x50\xd4\x34\xb0\xf0\xed\xba\ \x77\xfc\xa2\x1b\xfa\x3f\x41\x96\xb2\x1a\x57\xaa\x4d\xc8\x92\x6b\ \xb0\xf7\xa8\x08\x0d\x06\xd3\xbc\x72\x07\xfb\x07\xe0\xf3\x77\xc1\ \xee\x70\xa2\x8a\xfc\x15\x9f\x96\x20\xef\x4a\x01\x06\x6f\x01\x0e\ \xca\x92\x36\x44\x79\xa2\xf6\x33\x0c\x7e\x9c\xae\x76\x21\xbd\xde\ \x87\x0c\xea\xbe\xce\x17\x62\xa3\xf8\x01\xe1\x3b\xf7\x16\x70\xb4\ \xb6\x77\x02\x29\x05\xa5\x38\x27\x53\x41\x94\x7e\x01\x6b\x23\xb6\ \xcc\x2b\x77\xa0\xbb\x17\xce\x36\x0f\x0c\xa6\x46\xa4\x67\x9c\x43\ \x6a\x96\x14\xee\x9e\x7e\xb8\xa8\xeb\x46\x0a\x98\xdc\x77\x13\xe7\ \x8c\x01\xa4\xd4\xb6\x23\x4d\xef\xc5\x99\x6b\x6e\xa4\xd6\x7a\xa0\ \x20\xe9\xdf\x7c\x6b\xb3\x94\xb8\xd6\xcc\xb7\x80\x8e\x69\xbd\x43\ \x48\x38\x7f\x05\xf1\xe7\x72\xb1\x2b\xf2\x38\x0e\x7e\x10\x79\x77\ \xac\x98\xdc\x3d\x7d\x21\x78\x3a\x7c\x68\xb2\x58\x51\x28\x93\x23\ \x3e\x21\x11\x26\x9b\x03\x01\x4a\x37\x6d\x63\xa8\xfa\xc2\x38\xdb\ \xd0\x29\x74\xcb\x88\xc5\xda\x56\x9c\xaa\x72\x22\xb9\xc6\x8d\xac\ \x7a\x37\x2e\x2a\x54\xcd\xc4\xf3\xef\x07\x6d\xc0\xd8\xb2\xd6\x6e\ \xc4\x24\x4b\xf1\xfe\x89\x53\x78\x6b\xdb\x4e\xa4\x9d\xcd\x10\xc6\ \x6a\x46\xee\x16\x7b\x2b\xb4\x55\x3a\x81\xb8\x50\x51\x8a\xf1\x69\ \x20\x40\x01\xab\x1d\x00\x8a\x3b\xa7\x04\x8f\x33\x4d\x5d\x77\xbb\ \x8e\x55\x98\x05\xef\xa5\x46\x1f\x8d\xb4\x9f\xbd\x17\x1c\x26\x3c\ \xf5\xa0\x02\x44\xb2\x46\x0f\x0e\x7d\x24\xc1\x8e\x83\x91\x78\xf5\ \x37\xab\xd0\xd4\x6c\x15\xd2\xcd\xe4\x6e\x30\x9a\x21\x39\x93\x0c\ \x69\xce\x45\x1a\xab\x09\xa1\xeb\xa6\x91\x3b\x72\x5f\x6a\x1d\xc6\ \x49\x4d\x8b\x20\x3b\x23\x4d\x50\xdb\x70\xb4\xa8\x41\x40\x92\xc6\ \x8a\xb2\xb6\xbe\xf0\xd2\x97\x97\x8b\xf9\xea\x5d\xf0\xa0\x02\xe2\ \xf3\x6a\xad\xd8\x15\x25\xc2\x96\xed\xff\xc1\xca\x55\xaf\x0b\x5d\ \xb3\x65\x22\x2b\xa2\xa7\x9b\xe8\x04\x6c\x1e\x1f\x7a\x69\x8b\xf9\ \xf9\x58\xe5\x39\x86\xf0\xb1\x25\x28\xa4\x9c\x05\x2d\x4e\xd9\x28\ \xc8\xce\xba\x4f\x28\x6f\xc6\xd9\x1a\x27\x34\xae\xee\xe9\x9d\xfb\ \x0f\x5d\xa5\xf3\x77\xf2\xbd\xbf\xe8\x41\x45\x24\x4a\x35\xf5\xd8\ \xb6\xff\x43\xac\xdb\xfc\x36\x76\xef\x7d\x0f\x8d\xcd\x16\x14\x2b\ \x94\xf8\xc7\x3b\xdb\x68\x43\x7a\xe1\xa1\x99\xbe\xd6\x0f\xe4\xb6\ \x0c\x40\xa2\x6b\x43\xb6\x35\x24\x78\x2e\x10\x52\xd7\xd1\xb2\x7a\ \xc4\x96\x18\x71\x4e\xef\x81\xdc\xde\x1d\xce\xd7\xe8\xda\xe8\xdc\ \x18\x9e\xfa\x6f\x71\xf9\x9f\xe0\x85\xdc\x57\xc4\xa9\xd4\xa2\x0a\ \x6c\xdd\xb9\x17\xaf\xaf\x59\x27\x8c\x95\xa2\xb4\x0c\x3b\xde\x7d\ \x17\xe2\x7c\x05\xe2\x8a\x1b\x84\x70\xb1\x6e\xd9\x27\xf3\xfa\x78\ \x89\x49\x28\x84\x15\x11\x5f\x6e\x11\xe4\x3e\x4f\x61\x2b\x33\xdb\ \x83\x2f\x2c\x5d\x96\xc2\x82\xcd\xe7\xfd\x25\xc2\x0f\xf9\x93\xf6\ \xeb\x84\xaf\x10\x16\xde\x5b\x40\x72\x52\x5e\x31\xd6\xff\x7d\x07\ \x9e\x7f\xe9\x15\x21\xe5\x47\x8e\x44\xe1\xbd\xe8\x58\x24\x96\x9b\ \x11\x43\x7e\x32\xa2\xd4\xba\x0e\x41\x66\x16\x2e\xe6\x7b\x12\xfb\ \x54\x59\x90\xac\xb5\xa1\xae\x23\x38\xb5\x73\xff\x41\x39\xcb\x13\ \x27\x67\x9b\xee\x65\xc2\x2b\x84\x65\x84\x9f\x12\x9e\xe1\xef\x03\ \xf7\x15\x90\x1e\x97\x75\x09\x7f\xde\xf4\x36\x5e\x5b\xf5\x7b\xa4\ \xa4\xa6\x61\xfd\xa6\xcd\x38\xa3\x36\xe1\x40\x8e\x46\x08\x18\x5b\ \x2a\xac\xf3\x8f\xa8\xdb\xa8\x42\x3d\xe2\x14\xa4\x40\xa5\x0d\xc5\ \x2d\xfe\xdb\x59\x57\x4b\xac\x74\xc6\x09\x96\x25\xc2\x3b\x3c\x70\ \xbf\xe3\xaf\x5f\xec\xfb\x72\xc2\x8f\xb8\x02\x5f\x9e\xcf\x82\xcc\ \xa8\x94\xf3\x78\x63\xfd\x66\x44\x6c\xda\x82\x0d\x1b\x23\x90\x4c\ \x96\x1c\xcc\x51\x0b\x84\xac\x80\xe4\x1a\x8f\xa0\x82\x88\xc2\x96\ \x5e\xe7\x26\xb9\xdb\x50\xda\xd0\x14\x78\xfe\xc5\xa5\x69\x9c\xf8\ \x00\x7b\x99\xe1\x4f\xb8\xb5\xfc\x3b\x2b\xe0\x57\x84\x9f\xf1\x1c\ \x3c\xc1\x83\x78\xdf\x25\x8d\x94\x64\x62\x4d\xc4\x56\x6c\xd8\xb0\ \x11\xc7\x92\x33\x10\x27\xd7\x63\x7f\xb6\x5a\xe8\xfa\x44\x59\x33\ \x24\x94\x74\x49\x95\x03\x17\x9b\xfc\xd0\xba\xba\xa6\xd6\x6e\x88\ \xf8\x98\xcb\x1d\x45\xd8\xc4\xc9\x18\xf1\x9b\x84\x3f\x11\x56\xf1\ \xce\x7f\x42\xf8\x26\xe1\xc9\x87\x4d\x81\x34\x26\x3d\x5b\xc8\xc0\ \xf6\x43\x51\x10\xc9\x74\xd8\x23\x2d\x15\x36\x19\xf3\xfd\xa4\xda\ \x8a\x4c\xbd\x1b\x15\xed\xc1\xdb\x51\x09\x62\x35\x5b\xdd\xdc\xe7\ \x08\xfe\xae\xf8\x47\x4e\xfa\x06\x27\x66\x2f\xb2\x3f\x27\x7c\x9f\ \xf0\x35\xee\xfb\xa2\x87\xed\x81\x0c\x71\x9e\x1c\xff\x3a\x10\x89\ \x33\x65\x7a\x6c\x93\x5c\xc6\xe1\x7c\x1d\x75\xed\x84\x44\x6b\x47\ \xae\xd1\x13\x2e\x37\x5a\xfc\xbc\x5b\x36\x56\x7f\xe5\x04\x2f\x12\ \x56\x72\x9f\x57\xf2\x8e\x9f\xe5\xc4\x4f\xf3\xae\xbf\x34\x5f\xe8\ \xee\xbd\xf6\xe5\x16\x97\x4e\x66\x57\xd6\x63\xdf\x79\x25\xb6\xc4\ \x67\xe3\x84\xd2\x84\x1c\xb3\x17\x1a\xab\x67\x78\x5d\xc4\x26\x29\ \x5f\xa5\x3b\xf8\x48\x3d\xc5\x49\x9e\x23\xbc\x40\xf8\x25\x97\xfa\ \xbb\x3c\x68\xb3\x89\x17\x7c\x9e\xd7\x70\x16\x14\x89\x54\xef\xc4\ \x3f\x4f\x5f\xc2\x79\x43\x07\xb4\xee\xbe\xe9\x63\x49\x12\x15\xef\ \x78\x37\xbf\x67\x01\x5f\x24\x4f\xf2\x1f\x27\xdf\xe6\x78\x66\xd6\ \xa2\xf9\x42\xc4\x33\x17\x3b\xf0\x60\x86\xac\xdc\xad\x6c\xed\x0e\ \x17\x55\xeb\x5d\xfc\x95\xe9\x10\x0f\xd7\xec\x87\xc8\x42\x4e\xb2\ \x98\x13\x2e\xe6\xa3\xb5\xe8\xff\x21\x9e\x7d\x3d\xce\x65\x8e\xe2\ \x9f\x5b\x09\x3f\x78\xc0\xbd\x0b\x38\xd9\xc2\xcf\x22\xfd\xac\x5f\ \xd5\xff\x05\x42\x5a\xb5\xfc\x4a\x39\x80\xc8\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x06\xa0\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x06\x67\x49\x44\x41\x54\x58\xc3\xc5\x57\x09\x50\x95\x55\ \x14\xfe\x1f\xfc\xef\xe1\x56\x84\x58\x6e\x28\xa0\xa8\x94\xca\x66\ \x88\x20\x62\xa8\xb8\x01\x06\x83\x4b\xb2\xa8\xa5\x0c\xa8\xe1\x14\ \x68\x5a\x2a\xc6\x96\x92\x28\x8b\x0a\x18\xc8\x22\x04\xc8\x22\x02\ \xa9\x91\x0b\x33\xc0\x10\x20\x88\x20\x88\x38\xb8\x0e\xe5\x30\xd3\ \xd4\xb8\xa0\xa3\xa3\xef\x74\x3e\xba\x14\x33\x99\x3d\x2c\xeb\xcd\ \x7c\x73\x38\xe7\x7c\xe7\xdc\x73\xcf\x5d\xfe\x8b\x44\x44\xd2\xff\ \x89\xe7\x3b\x25\x49\xc1\x18\xcb\x70\x64\x78\x32\x3e\x64\x6c\x16\ \xd2\x53\xd8\xe1\x57\xfc\xab\x05\x88\x81\xc7\x30\x16\x2d\x59\xb2\ \x24\x31\x21\x21\xe1\x2c\xff\xda\x5b\x5b\x5b\xef\x76\x74\x74\xa8\ \x21\xa1\xc3\x0e\x3f\x78\x82\xaf\xf8\xc7\x05\xf0\x4f\x8b\x61\xe5\ \xe0\xe0\x10\x9c\x94\x94\x54\xd9\xd2\xd2\x72\x8f\x41\xc7\x8f\x1f\ \xa7\xe0\xe0\x60\x0a\x08\x08\xe8\x96\xd0\x61\x87\x1f\x3c\xf0\x11\ \x87\xf8\x17\x2e\x40\x0c\x3e\xc5\xcd\xcd\x2d\xb6\xb8\xb8\xb8\xad\ \xb9\xb9\x99\x52\x52\x52\xe8\x3d\x9f\x55\x57\xad\xe6\x2f\x2d\x1b\ \xe5\xbc\x36\x7f\x90\xfb\x8e\xc3\x90\xd0\x61\x87\x1f\x3c\xf0\x11\ \x87\xf8\xbe\x14\xf1\xa7\xf5\xb6\xb3\xb3\x0b\x29\x2c\x2c\x6c\x6b\ \x68\x68\xa0\x1d\x21\xa1\x9d\xd3\x17\xaf\x39\xa5\xef\x1d\x95\xa6\ \xe7\x97\x1e\x3f\xee\x93\xfc\xaf\x26\x6e\x2d\x4a\x82\x84\x0e\x3b\ \xfc\xe0\x81\x8f\x38\xc4\xf7\x65\x5f\xf4\x2e\x40\x66\x78\xc4\xc6\ \xc6\x56\x35\x35\x35\x51\x4c\xdc\xbe\x4e\x9b\x55\x5b\xf3\xa4\x95\ \x29\x31\x43\x36\x9d\xdc\x3b\xf3\x40\x43\xfc\xc6\x92\x6b\x39\xe1\ \x67\x3a\x8e\x42\x42\x87\x1d\x7e\xf0\xc0\x47\x1c\xe2\x91\x07\xf9\ \x34\x2e\x40\xcc\xde\xd4\xd5\xd5\xf5\x50\x55\x55\xd5\xfd\x92\x92\ \x12\x5a\x1e\x18\xf6\x9d\xf4\x41\xe6\x5e\x69\x53\x45\xd8\xac\x8c\ \x5b\xd1\xa9\x8d\x77\x4f\xbc\xbb\x2e\x8e\x7c\x77\x64\x13\x24\x74\ \xd8\xe1\x07\x0f\x7c\xc4\x21\x1e\x79\x90\x4f\x93\x2e\xf4\x14\xa0\ \xcd\x98\x1f\x1e\x1e\x5e\x51\x5f\x5f\x4f\x7b\xe2\xe2\xaf\x8e\x5c\ \x97\x92\xfc\xfa\x8e\xaa\x48\xab\xb4\xce\x9d\xc9\x2d\x8f\x8f\x5d\ \xfe\x45\x7d\xd9\x27\xb2\x96\x7c\xe2\x6e\x12\x24\x74\xd8\xe1\x07\ \x0f\x7c\xc4\x21\x1e\x79\x90\x0f\x79\x35\x2d\x40\xc5\x58\x9d\x95\ \x95\x75\xbd\xba\xba\x9a\x02\x23\x13\xce\xa0\xbd\x73\x33\x3b\x62\ \x42\x6b\x1e\xa5\x37\xff\x4c\xcd\x9d\x0f\xe8\xb6\xcb\x17\xd7\xc8\ \x65\x3f\x11\x24\x74\xd8\xe1\x07\x0f\x7c\xc4\x21\x1e\x79\x90\x0f\ \x79\x35\x2d\xa0\x3f\x63\x4b\x69\x69\xe9\xbd\xf2\xf2\x72\x5a\xb8\ \x2d\x25\x7b\x52\x54\x5d\xf4\xf6\x8a\x3b\x19\x92\xe9\x1a\x1a\xef\ \x12\x41\xf6\x6b\x0b\x68\xda\xf6\x0e\xb2\xd9\x49\xdd\x12\x3a\xec\ \xf0\x83\x07\x3e\xe2\x10\x8f\x3c\xc8\x87\xbc\x9a\x16\x30\x80\x11\ \x7e\xfa\xf4\x69\x75\x65\x65\x25\x8d\x0d\x3a\x72\xd0\x3a\xbe\x35\ \x3a\xfa\xfc\xc3\x5c\xc9\x29\x9f\x54\xcb\x1a\x49\x7f\xcd\x75\x32\ \x08\xea\xa2\x31\x9f\x51\xb7\x84\x0e\x3b\xfc\xe0\x81\x8f\x38\xc4\ \x23\x0f\xf2\x21\xaf\xa6\x05\x0c\x64\x6c\xe5\xd6\xdd\xab\xab\xab\ \x23\xcf\x98\x6f\x32\x2c\x12\xda\xbf\x0c\xad\x7d\x9c\x2e\x79\x5c\ \x20\xc9\x97\x49\xab\x19\xef\xf7\x02\x74\xd8\xd9\x0f\x1e\xf8\x88\ \x43\x3c\xf2\x20\x1f\xf2\xf6\xa5\x03\xeb\xa3\xa2\xa2\x6e\x62\x13\ \xc5\xe6\x9e\xfa\x76\xe8\xae\xe6\x08\xe7\xa2\x07\xbb\x23\xce\x53\ \x5a\xe2\x45\xaa\xc9\x6c\xa3\x0e\x69\xf9\x7d\x92\x7c\x38\x80\x25\ \x74\xd8\xe1\x07\x0f\x7c\xc4\x21\x1e\x79\x90\xaf\x2f\x1d\xc0\x1e\ \xf0\xf0\xf7\xf7\xff\x9e\x8f\x11\x95\x55\x56\x5f\x99\xb0\xab\x26\ \x7a\x78\xe2\x4f\xc1\x36\x47\xd5\x21\xb3\xf3\xa8\x74\x63\x05\x35\ \x4b\x8b\xda\x49\xf2\xe4\x00\x96\xd0\x61\x87\x1f\x3c\xf0\x11\x87\ \x78\xe4\x11\x77\x41\xff\xbe\x9c\x82\xb7\xad\xad\xad\xb3\x92\x93\ \x93\xbb\x1a\x1b\x1b\x29\xb6\xb0\xb2\x48\x0a\xbf\xba\x55\x3a\xf0\ \x70\xa3\x49\x2a\x25\xcf\xc9\xa3\x4a\x69\x1e\x2f\xc7\x32\x0e\x60\ \x09\x1d\x76\xf8\xc1\x03\x1f\x71\x88\x47\x1e\xe4\xeb\xcb\x29\xc0\ \x3d\xf0\x1a\xc3\xd7\xcb\xcb\xab\x9e\xef\x75\xaa\x3b\x7f\xe1\x76\ \x60\xf6\xb9\x24\x29\xf2\x87\x4f\x87\x27\x3f\x0c\xb5\xce\x52\xa7\ \xbb\x1e\xa3\xb3\x0b\x8f\xd2\x39\x48\xe8\xb0\xc3\x0f\x1e\xf8\x88\ \xf3\xf4\xf4\x6c\x40\x1e\x91\x4f\xbb\x2f\x37\x21\x96\xc1\xc6\xd8\ \xd8\x38\x8e\x5b\x78\xbd\xac\xac\x8c\x1a\x2f\x36\xff\x98\x7c\xa6\ \xa9\x60\x52\xe2\xb5\x48\xb4\xd9\xfa\xc8\x83\x30\x87\xc2\xc7\x11\ \x90\xd0\x61\x87\xff\x42\xd3\xc5\xdb\xe0\xfb\xf9\xf9\x75\x19\x19\ \x19\xd5\x70\x9e\x15\x8c\x91\x1a\xdf\x84\xbd\xbe\x05\xba\x0c\x67\ \x53\x53\xd3\x0c\x6f\x6f\xef\xeb\xb9\xb9\xb9\x74\xe9\xd2\x25\x6a\ \x68\x69\x6b\xcd\xa9\x6c\x2d\x0a\x28\xb8\x9c\x68\x1e\x7f\x25\x12\ \x12\x3a\xec\xf0\x83\xc7\xfc\x2e\x77\x77\x77\xf2\xf1\xf1\xb9\xa3\ \xab\xab\x9b\x65\x36\x4c\xeb\x30\x1e\x2c\x7d\xfd\x1a\x62\x2f\xe8\ \x33\x5c\x0c\x0c\x0c\x0e\xd8\xdb\xdb\x37\x70\x37\xba\xf8\x58\x11\ \x3e\x34\xed\xed\xed\x74\xe3\xc6\x8d\x6e\x09\x1d\x76\xf8\x99\xd7\ \xc8\xfc\x5a\x0c\xce\x3a\x6d\x98\x37\xe1\x51\xba\x9b\xce\xd3\xc5\ \x13\xe5\x92\xbf\x2b\xe2\x59\xef\x01\x1d\x51\x84\x03\x23\xc0\xd0\ \xd0\xb0\xc0\xcc\xcc\xac\xd6\xd6\xd6\xf6\x96\xa3\xa3\xe3\x7d\x27\ \x27\x27\x35\x24\x74\xd8\xe1\x07\x8f\xb1\x86\x67\x9e\xb3\x6a\xc6\ \xf8\x47\x91\x33\x95\x94\xb0\x40\x45\x99\xee\x3a\x4f\xbd\xcd\xe5\ \xaf\x9f\x57\xc4\x5f\xbd\x88\x54\x62\x39\x0c\x18\x73\xc4\xbd\x8e\ \x8b\x65\x37\x63\x3f\x23\x8a\xb1\x4d\x6c\xb6\xb9\x8c\xd1\x0c\x93\ \x61\xfd\x15\x99\x01\x93\x65\xf5\xb6\xa9\x4a\xda\xfd\x8e\x92\x0e\ \x2e\x54\x51\x96\x87\xce\x93\x15\x16\x32\x96\x63\xd6\xb3\xf6\xc4\ \xf3\xde\x84\xb2\xd8\x98\xd8\xcd\x43\xc5\x20\x78\x68\x8c\x13\x18\ \x23\x0a\x7c\x43\x70\x06\x31\x16\x98\xe9\x29\x4e\x7c\xc4\x45\x04\ \xdb\x28\x69\x8f\xa3\x92\x92\x9c\x55\x94\xcd\x45\xf8\x58\xc8\x19\ \x62\x32\x5a\x22\xbf\x42\xd3\x57\xb1\xb6\xe8\x08\x6e\xcb\x57\x19\ \x7a\x62\x89\x86\x08\x39\x58\xd8\xf4\xc4\xdf\x6e\x56\xfa\x8a\xbc\ \x40\x33\x59\xfd\xf9\x34\x25\xed\x9d\xa5\xea\x2e\x22\x67\xb1\xce\ \x93\x95\x96\x72\xa6\xf8\x4c\xcb\xbf\x17\xa2\xd1\xab\xe5\x8f\x8e\ \xf4\x63\xbc\x22\x06\xc2\xcc\x87\x8b\xe3\x36\x8a\x61\xc8\x30\x12\ \xf0\xb2\x1a\xac\x28\x08\x32\x97\xd5\x21\xb6\x4a\x8a\x9e\xad\xa2\ \x43\x2e\x2a\xca\x5d\xaa\xf3\x94\x97\x03\x97\xd4\x02\x86\xb2\xbb\ \x08\x0d\x07\xd7\x16\x83\xeb\xf6\x5a\x0e\x13\xf1\xea\x79\x8b\x31\ \x99\x61\xce\xb0\xe8\x05\x5f\x8b\xc1\x8a\xe2\x20\x0b\x59\x1d\x66\ \xa7\xa4\xd8\x39\x2a\x4a\x75\x55\x51\xfe\x32\x1d\xf5\x0a\x4b\x39\ \x5b\x14\x21\x6b\x52\x80\x96\x98\xfd\x40\x31\x6b\x63\x31\xa8\x25\ \x63\x2a\x63\x1a\x63\x3a\x63\x86\x38\x39\x3d\x80\xbe\xc1\x52\x5f\ \x71\x62\x93\xa5\xac\x0e\x9f\xae\xa4\x7d\x4e\x2a\x4a\x5b\xa4\x43\ \x47\xb9\x08\x1b\x03\x2d\xbc\xa0\x87\x69\x5a\x80\x52\xac\xff\x08\ \xc6\x04\xf1\xfe\xb7\x15\x03\xe1\xbf\xa3\xd9\x0c\x27\x71\x22\x7a\ \xe0\x24\x36\x5d\x10\x17\x51\xba\xd9\x4a\x56\x47\xd8\xff\x56\xc4\ \x7a\x6b\x65\x39\xf6\x4a\x77\x57\xff\x83\x02\x70\xfc\x3e\xe6\x22\ \x4e\x6e\x99\x22\xab\x97\x99\x6a\xe3\xd5\xec\x25\x4e\x50\xbf\x97\ \xbd\x04\xd3\x45\xa1\x36\x0c\xff\x51\x03\x15\xa9\xe2\x3b\x61\x22\ \x26\xa4\x7a\x99\x9b\xd0\x5c\xd8\x27\x32\xde\x64\x8c\x17\x9d\x1b\ \x21\x8e\xec\x00\x8d\x36\xe1\x0b\x1e\x43\x23\xa1\x8f\x16\xad\x1e\ \x21\x0a\x1f\x22\x26\x31\xa0\xe7\x18\xfe\x0a\xd1\xfb\x82\xfe\x41\ \x1a\xc9\x6e\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x08\x27\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x07\xee\x49\x44\x41\x54\x58\xc3\xa5\x57\xdb\x6f\x1c\x67\ \x15\x3f\xdf\x37\x33\x3b\xbb\xf6\xde\xf1\xae\xd7\x4d\x4c\xec\xc4\ \xbd\xd8\xc6\x4d\x2f\x69\xac\x06\xa9\xa1\x69\x65\x1a\x55\x20\xa1\ \x08\x81\x84\x90\x5a\xfe\x86\x3e\xf5\x91\x8a\x17\xf2\xc8\x1b\x54\ \x15\x2f\x51\x2a\x11\xc2\x25\xbc\x24\xa0\x2a\x42\x7d\x08\x22\x02\ \x29\x50\xb5\x6a\x9c\xae\x6f\x2a\x8e\xd7\x97\xb5\xd7\x7b\x9d\xcb\ \xd7\xdf\x39\x33\xeb\x26\x24\xb5\x70\x98\xf5\xfa\x9b\xf9\x76\xe6\ \x3b\xe7\xfc\xce\xef\xfc\xce\x37\x8a\xf6\x39\xe6\xe6\xe6\x66\xdf\ \x79\xe7\xa7\x3f\xaf\xd5\xd6\x15\x0e\xa3\x14\xcf\xca\x3f\xd2\xf8\ \xf0\x1f\x5f\xaa\x78\xce\xec\xfd\x8a\x73\x63\x54\xa5\x52\xd1\x17\ \x2e\x5c\x78\xf7\xfc\xf9\xf3\xbf\xfe\x2a\x1b\xf6\x7e\x0e\xb8\xae\ \x5b\x9a\x99\x79\xfa\xa5\x20\x08\x28\x0c\x43\xd2\x5a\x13\x1c\x89\ \x46\xa3\xc8\x68\x43\x5a\x69\x18\xe3\x39\x18\x8f\x1d\xe4\x7b\xe0\ \x00\x59\x96\x45\xd9\x6c\xf6\xaf\xfb\xd9\xd8\xd7\x01\x2c\xd2\xee\ \x76\xbb\xb4\xb1\xb1\x21\x0b\xf6\x1d\x60\x83\x2a\x36\xae\x30\x6f\ \x30\xaf\x79\xc4\xb5\xd6\x91\x71\xad\x0c\x7d\x6d\xa8\x4c\xed\x76\ \xbb\xb9\x9f\x0d\xbd\x1f\x00\x2f\x9c\x98\x7d\xd3\xb2\x2d\xb2\x6d\ \x1b\x0b\x5b\x12\xa5\x46\x54\x96\xa5\xc8\xd2\x98\xe3\x68\xf9\x9a\ \x1d\xc3\x88\x5b\x31\x2a\x89\xdc\xe0\x77\x1b\x13\xcf\x3c\xf3\xec\ \xf7\x2a\x95\xb1\xb1\x03\x3b\x30\x36\x36\x96\xaa\x8c\x8c\x7c\xdb\ \x84\x8c\x44\x18\xc1\x1b\xe2\xf6\xd0\xc8\xef\x21\x3e\xca\x8a\x6f\ \x8e\xb0\xa7\x80\x2c\xfe\x17\x4d\x21\x65\xdd\xae\x47\x13\x13\x4f\ \x3c\x3f\x3e\x3e\x72\xe4\xc0\x0e\xec\xec\xec\x84\xad\x56\xbb\x19\ \xe5\xde\x12\x58\xe5\x6e\xbd\x47\x33\xfc\xc5\x8f\x07\x91\x55\x8b\ \xad\xf7\x9d\x12\x94\x88\x76\x77\x77\x03\xcf\x33\xfe\xa3\xa4\x00\ \x06\x38\x9f\xc1\x7d\x51\x72\x64\x7b\x55\xd0\x3f\x2c\x2b\x76\xc9\ \x62\x68\x62\xa7\x34\x85\x78\x26\xba\xdd\x7f\x14\x0e\x14\xc9\x47\ \x64\x12\x39\x1b\xe7\x28\x31\x06\xf7\xdc\x11\xf4\xaf\x8c\xf9\x12\ \x95\xfe\xc2\x56\x20\xe9\x0a\x43\x9f\x94\xaf\xcc\x81\x1d\xd8\xdc\ \x9c\x6f\x60\xc1\x5e\x88\x45\x24\xfd\x80\xd4\xc0\x09\x39\x17\x24\ \xe8\xcb\x68\xef\x2f\x9d\x68\x08\xac\x3e\x68\x61\xcf\xf4\xb6\xf7\ \x2d\xc3\x81\x81\x81\xc7\x86\x86\x86\xa6\xfb\x4b\xa2\xd4\xc2\x91\ \x91\x91\x74\x22\x61\x0f\x16\x0a\x05\xc2\x6f\xf4\xa8\x47\x36\x9b\ \xd3\x85\xc2\xd0\xb7\x8e\x1d\x3b\x56\x46\x75\xe8\x28\x63\x96\x46\ \x79\x2e\x2f\x2c\x2c\x7c\x22\x3e\x9e\x3c\x79\xf2\x67\x47\x8f\x1e\ \x7d\x1b\x82\x13\xa0\x74\x8c\x6d\x3b\x1c\x88\xbe\x7e\xfd\xba\x7e\ \x6a\xf2\x49\x44\xab\xc8\x67\x32\x5a\x26\xe6\x45\xac\x01\xd0\x02\ \xf6\x58\x33\x19\xd5\xbd\x20\x44\x38\x25\x12\x09\xaa\x56\x97\xe9\ \xc9\xa7\x26\x4c\xb9\x54\xf2\x71\x28\x46\x51\xa3\xae\xb7\xb7\xb7\ \xff\x7c\xe9\xd2\xa5\xd7\x04\x81\xd1\x43\xa3\x4f\xa7\xd3\x69\xea\ \xf5\x7a\x64\x27\x5c\x55\xc8\x65\x45\x4a\x57\x56\x96\x89\xbf\xff\ \xef\x31\x3e\x3e\xaa\x86\x87\x87\xf5\xca\xd2\x12\xf5\xc0\x09\xdd\ \x0b\x29\x9f\xcf\x4f\x65\x32\x99\xa2\x0d\x78\x33\x2f\xbd\x7c\x7a\ \xf2\xf5\xb3\x67\x29\xe1\xba\x1a\xd2\x49\xb9\x5c\x8e\x96\x97\x97\ \x59\xc5\xe8\xf8\xf1\x19\x4a\x26\x07\x38\x4d\x94\x4a\xa5\x58\x9e\ \xc9\xc5\xe8\x58\x56\x2c\xcb\xcc\x74\x23\x52\x8d\x08\x25\x08\x7e\ \xae\xdd\xee\x40\x07\x3a\x74\xeb\xd6\xbf\xe8\xec\xd9\xd7\xcc\x99\ \x33\x67\x94\xe7\x79\x54\xaf\xd7\xc1\xaf\x4d\x9a\x9f\x9f\x2f\x7f\ \xf8\xe1\xdf\x1e\xb7\xf1\x60\x7e\xbd\xb6\x36\xf4\x9b\x4b\xbf\xa5\ \xd4\x40\x4a\x65\x06\x07\x69\x7a\x6a\x8a\x3e\xfa\xf4\x53\xfa\xe0\ \x83\xbf\x00\xc2\x05\x40\xe9\x90\x03\x35\xb4\x00\x69\x82\x15\xd0\ \xd6\x7b\xb2\xac\x44\x0f\x43\x0a\x90\x16\xdf\x67\x47\x3c\x8c\x01\ \x79\x5e\x47\x9c\xba\x75\xeb\xdf\x74\xe8\xd0\x63\x6a\x76\x76\x56\ \x55\xab\x55\xea\x74\x7a\x28\xa8\x0e\xa5\x06\x07\x1d\xa5\xfc\x8a\ \x0d\x42\xb8\xff\xf9\x7c\xd5\x76\x12\x96\xe4\xcc\x76\x5c\xda\xaa\ \x6f\xd2\xc7\x1f\x7f\x42\xb5\xbb\x9b\x20\x4c\x15\xc6\x6c\x31\x66\ \xb3\x41\x9b\xcf\xb5\x30\x9c\xb9\xa0\x58\x98\x4c\x3f\xf7\x81\xd4\ \xbd\xef\x7b\x18\xa3\x06\xc5\x11\x5f\xbb\x76\x8d\xa6\xa7\xa7\xe9\ \xc6\x8d\x1b\x34\x3a\x7a\x98\x56\x57\xef\x12\x93\x1b\xcf\xa7\x6c\ \xf0\xce\x6d\xb5\x5b\x56\x6f\xbb\x47\xc9\x44\x92\x12\xc9\x04\xb5\ \x9a\x4d\x2a\x95\x2a\xf4\xa3\x1f\xff\x10\x91\x84\xa2\xe9\x71\x73\ \x12\x55\x74\x1c\x2d\xba\xc7\xfa\xa3\x94\x25\xda\xcf\x5f\x25\x6a\ \x19\x21\x23\xd5\x04\xe7\xbc\x8e\x47\x83\xd9\x41\xba\x78\xf1\x22\ \xab\x2b\xdd\xb9\x33\x4f\x4d\xa4\xe7\x9b\x2f\xbe\xc8\x28\x26\x19\ \x01\x67\x6b\x6b\x4b\xe3\x0b\x0e\x00\x62\x3b\x41\x0e\x90\x28\x14\ \xb6\x69\x7d\x7d\x83\x9a\xad\x06\x9a\x8c\x13\x35\x98\xb8\x23\x72\ \xce\x6d\x8e\x1c\xe7\x96\x62\x2e\xa0\x13\xb2\xf4\xca\x39\xa7\xc7\ \x08\x12\xdc\xc6\xf9\xfe\xb1\xaf\x8f\x51\xbb\xd3\xa6\x2c\xc8\x0d\ \x57\xa9\x98\x4f\xd2\xc6\xe6\x3a\x07\xe7\xd8\x80\xc2\x01\xe9\xf8\ \x19\xb2\xe1\x00\xe7\xd7\x45\x19\xb2\x91\x84\x63\x93\x5b\x2c\x89\ \xb1\x30\x36\x4e\x6c\x00\x0a\x68\xa8\x1f\xa9\xa1\x28\x70\x2d\x8e\ \xb0\x61\x15\xb7\x65\x9e\x63\x27\xba\x5e\x97\x4a\x43\xa5\x58\xd1\ \x91\x4a\x09\x82\xe8\xc8\x91\xc3\x09\x29\x43\x07\x51\x5b\x29\x10\ \x2d\x8e\x94\x11\xe0\xf1\xf3\xd5\x26\x34\xc0\x48\x83\x91\x5a\xa7\ \xa8\xee\x59\x62\xf9\x23\x68\x50\x5f\xbe\x1e\x94\xc5\x7e\x65\xa4\ \x06\x53\x84\x1a\xc2\x63\xdc\xaa\x81\x1a\x02\x4c\xb9\x49\xe9\xa8\ \xe2\x40\xa7\xdb\x22\x03\x06\x6b\x27\xea\xeb\x5c\x8a\x4c\x98\xdb\ \xb7\x6f\x53\x3a\x9d\x89\x34\x5e\x7f\x85\xf4\xc6\x7d\x8a\x49\xf7\ \xdf\x37\x70\xb4\xe8\xa8\xb4\x50\xfd\x8c\xde\x78\xf3\x27\x52\x9e\ \xbc\xb7\xb0\x11\xb7\x74\x59\x7c\x98\x84\xa1\xe7\xf9\x66\x67\xa7\ \x81\x12\xe9\xc4\xdb\x2d\x43\x50\xaa\x18\x42\x2e\x1b\xc4\xcb\x98\ \xe1\xda\xc4\xdd\x90\x11\x62\x78\x2d\xee\x78\x7d\xf5\x93\x6d\x62\ \x18\x2b\x61\xb4\x3d\xe3\xdc\x36\x5b\x1d\x59\x8f\x75\x80\x2b\xcd\ \xf1\x1c\x51\x52\x68\x46\x68\x43\x14\x3c\xb8\x1a\xa6\xd3\x29\x61\ \xb6\x83\xbc\x33\x21\x5f\x9d\x9b\xa3\x7f\xde\xfc\x07\x3d\x7f\xe2\ \x39\x6a\x34\x1a\x91\x31\xc7\x11\xe7\xa4\x41\xa9\x28\x5e\x01\x06\ \xe7\x5d\x44\xca\x24\xe5\x2f\x0b\x16\x8f\x0e\xee\x5f\x82\xfa\x4d\ \x4e\x4e\x23\xb8\x16\x41\xf9\xe2\xbd\xa2\x23\x82\xb6\xba\xba\xda\ \xe3\x2a\xe8\x16\x0b\xc5\x80\x17\x14\x82\x00\xa2\xc6\x6e\x83\x26\ \xc6\x8f\xd1\xd2\x42\x95\xa0\x60\x92\x0a\x46\x83\xf3\x99\x48\xb8\ \x22\x36\x26\xee\x09\xd1\xce\xc0\x50\xbe\x58\x10\x27\x79\x0d\xbe\ \x8f\xa3\x4d\x0f\xa6\x45\x41\x27\x26\x26\x68\x79\xb1\x4a\x59\xd4\ \xbe\x8a\xd1\x73\x41\x78\xce\x3e\xa7\xa0\x9d\x4c\xba\x5e\x32\x99\ \x24\xdf\xc3\xc6\x01\x24\x71\xa1\x56\xdb\x3b\x75\x3a\x71\xe2\x05\ \x3a\x77\xee\x9c\x20\xc0\x9b\x53\x96\x59\x8e\x8a\x9d\xe1\xf3\x24\ \x88\xc4\x7b\x02\xde\x1d\x6a\x10\xab\xd9\xde\x15\x22\x37\x00\x77\ \x11\x1d\x94\x25\xfd\xef\x37\x6f\xd2\x95\x3f\x5c\xa1\x16\xd6\xd4\ \x8d\x6d\x04\x98\x90\x72\x65\x27\x11\x40\x93\x1d\xd8\x45\xd4\x2d\ \x5c\xe4\xba\x7e\x17\xcd\x3b\x14\xad\x1e\x1e\x2e\xd3\xf1\x67\x9f\ \x8b\xd8\xec\x83\xaf\xd8\x17\xa2\x45\xd3\x0e\x94\x8d\x89\xca\xcd\ \x8b\xa3\x74\x8c\x4d\x1d\x8c\x0a\x5c\xc9\x0c\x64\x44\x05\xf3\xc5\ \xa2\x18\xe7\xe3\x1b\x33\x33\x74\xe5\x8f\x7f\x42\x2a\xee\x08\x7a\ \x4a\xd9\xb2\xc7\x2c\x97\xcb\x0c\xdf\xba\x0d\x75\xda\x86\x03\xd5\ \x53\xa7\x4e\x8d\x6c\xd5\xb7\x40\x0e\x9b\x76\x1a\x75\x0a\xe0\x61\ \x2e\x97\x91\x45\x3a\xbd\x8e\x30\xb8\x66\x6a\x28\x21\x9b\x02\x90\ \x95\x11\x60\x54\x38\x65\xec\x08\xc3\xaa\x81\x6a\x13\x73\xdc\xa8\ \xf8\x77\x26\x1c\x6f\xd7\x0b\x85\x22\x9d\x3e\x7d\x46\xd0\x63\xf6\ \xbb\xae\x43\x8b\x8b\xcb\xcd\x95\x95\x95\x05\x2e\xc3\xe0\xf2\xe5\ \xcb\xbf\xb8\x7a\xf5\xea\x47\x41\xb4\xb9\x34\x5e\xe0\x85\xaf\xbc\ \xfc\xea\x2b\xdf\x79\xfd\xbb\x8f\xf3\x04\x47\x53\x2a\x95\x61\xb0\ \x05\x07\xb0\x68\xfc\xe2\xc1\x0b\x1a\x13\x75\x42\x2b\xde\x17\x0e\ \xc0\x39\x17\xe9\xdc\xdb\x2e\xc2\xc1\x64\x32\xb1\xf5\xde\x7b\xbf\ \xfa\x5d\xab\xd5\xf2\x94\x1c\x96\xee\xf5\x5a\xb7\x11\x54\x4d\x74\ \x00\x3b\x93\xf7\x31\xbc\x7f\x6f\x0d\x7f\xff\xdc\x0f\x7e\x8f\x8e\ \x25\x0e\x2c\x2e\x2e\x51\xb1\x98\xa3\xf5\xb5\x4d\xc9\x7f\x06\xc8\ \x14\x01\x73\xe0\x05\x54\x07\x57\x98\xd1\x4c\x36\x18\x10\xa6\xd7\ \x37\xeb\x48\x43\x5e\xd6\x69\x34\x77\x01\x77\xa5\x0e\xa4\xdf\x42\ \x45\x6c\xfd\xaf\x6f\x46\x4e\xad\xb6\x96\xab\x54\xca\xf1\xae\xdb\ \x17\xd2\xb0\x61\x8e\x96\x91\x5a\x44\x79\xd9\x0c\x3b\x1c\x62\xce\ \x64\xf3\x79\x70\xc5\xa7\xb5\xb5\x35\x51\xc9\xbe\x03\xf9\x6c\x0e\ \x4d\xa8\x31\x80\x68\xdd\x83\xbc\x9a\xd9\x3b\x8d\x5d\x8f\x21\xe6\ \x63\x6a\x6a\x92\xee\xdb\x73\x1d\xe0\x88\xd4\xb0\xd9\xa9\xd5\x6a\ \xe6\x20\x0e\x74\xd6\x6b\x77\xdf\x5d\xa8\x2e\x3c\x11\x84\x41\x4a\ \x47\xdb\x9e\xfb\x84\x56\xdd\xfb\xaa\xfc\xe0\x3b\xa5\x8a\x34\x82\ \x42\xa4\xa7\x57\xad\xce\xff\x12\xe7\xb5\x87\x3a\xb8\x8f\xf3\x16\ \xf6\x6d\x87\xc1\xe6\xe2\xc3\x1c\x85\x01\xcd\x9b\xcc\x07\x22\xb2\ \x6d\x45\x7b\x2f\xee\xe4\xa3\x12\x6a\x90\x61\xde\x58\xf6\x1e\x66\ \xe4\x0b\x0e\xbc\xe6\xb9\xc1\xb6\x6c\x63\x00\x00\x00\x00\x49\x45\ \x4e\x44\xae\x42\x60\x82\ \x00\x00\x2b\x93\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x80\x00\x00\x00\x80\x08\x06\x00\x00\x00\xc3\x3e\x61\xcb\ \x00\x00\x2b\x5a\x49\x44\x41\x54\x78\xda\xed\x9d\x07\x78\x15\x45\ \xd7\xc7\xe7\x55\x44\xc5\x8a\x4a\x55\x8a\x80\x88\x60\xa3\x0b\x0a\ \x48\x57\x04\xe5\xa5\x77\x11\x50\x04\x41\x8a\x02\x0a\xf2\xd1\x5b\ \x50\x7a\x91\x1a\x7a\x28\xa9\x84\x14\x08\x21\x90\x40\x28\x01\x02\ \x84\x24\x90\x9e\xd0\x6b\x48\xa3\x09\x9e\xef\x9c\xd9\xd9\xbd\xbb\ \x77\xf7\xe6\xde\x9b\xdc\x24\xc0\x9b\xfb\x3c\xbf\x07\x08\x7b\x37\ \x3b\xf3\xff\xcf\x99\x33\xb3\xb3\xb3\x8c\x15\x7e\x0a\x3f\x85\x9f\ \xc2\x4f\xe1\xc7\xda\x67\x36\xfb\x1c\xe9\x8b\x0c\x2f\xac\x8c\x27\ \x57\xe4\x57\x85\xd0\xc3\x91\xb9\x48\x10\x92\x88\x40\xe9\x65\x2f\ \x72\x9e\x99\xf3\x1f\x60\x33\xd9\x7a\x3c\xba\x48\x61\x85\x3d\xbe\ \x42\x7f\x8c\xb4\x47\x26\x22\xce\x42\x68\x20\xde\x5e\x55\x1c\x6a\ \x6e\x2a\x03\xcd\x3c\xde\x86\x7e\xfb\x6a\xc1\xe0\xd0\x7a\x30\x25\ \xa2\x19\xa7\x47\xe0\x07\xd0\xc2\xe7\x25\x78\x65\xd1\xd3\xc0\xa6\ \xb0\x2d\x78\xa6\x67\x0a\x2b\xf3\xf1\x08\xdb\x13\x85\xc8\xe1\x24\ \x72\xf1\x45\xcf\x71\xa1\x1b\x6e\x2b\x07\x6d\x76\x54\x85\xfe\xc1\ \xb5\x60\x5c\x78\x13\x98\x7a\xba\x79\xb6\xb4\xde\x5e\x09\xbe\x0e\ \x78\x05\xbe\xf4\x7f\x59\x32\xc1\x64\xb6\xb5\xd0\x04\x8f\xa6\xf0\ \x1e\x24\x74\x99\x65\x2f\x41\xf5\x75\x25\xa0\xb9\x67\x25\xe8\xb8\ \xb3\x06\x0c\x08\xae\x0d\xd3\x4e\xb7\xb0\x99\xd9\x51\xed\x60\x65\ \xdc\x8f\xfc\x4f\xfa\x77\x23\xf7\x32\xdc\x00\x85\x26\x78\xf4\x0d\ \x90\x3a\xf4\xe0\x27\x30\x3d\xb2\xa5\x21\xf3\xcf\x74\x81\x55\x28\ \x2c\xe1\x7d\x7e\x36\x78\x5f\x98\x0d\x41\x57\x56\x41\xd8\x0d\x0f\ \x4e\x5c\xc6\x11\x48\xc9\x8a\xe0\x9c\x43\xe6\x9f\xed\xca\xbf\xd7\ \x62\x7b\x69\xc5\x00\x39\x36\x81\xd4\xe5\x84\xf3\x7c\xa3\xf0\x93\ \x67\x89\x1c\xcc\x88\x6c\xc5\xf1\xbe\xe0\x04\x87\xaf\xbb\x72\x92\ \x32\xc3\x05\x27\x14\x92\x33\x4f\x9a\xc8\x32\x91\x92\x75\x4a\x41\ \x3e\xd7\xfb\x9b\x9e\xd3\x18\xc0\x6e\x13\xa0\xf8\x14\x95\x6a\xbb\ \x94\xa5\x44\x32\x02\x3b\xa7\x52\xf8\xd3\xff\x14\x8a\xe6\xc8\xcf\ \x2c\xd6\xb4\x2c\x56\xf2\xcc\xa8\xd6\x9c\xd3\xb7\x02\x21\x31\xf3\ \xb8\x82\xc9\x04\xe1\x1a\x43\x24\xcb\x18\x98\x80\xce\x33\xe6\x68\ \x63\xf8\xd4\xe3\x05\x9d\x01\x88\x26\xdb\xc5\xe8\x20\x3b\x13\xa0\ \xf8\x74\x5d\x13\x4f\x36\xe7\xe7\xab\xed\xf2\x26\xb0\x19\x2c\x8a\ \xf5\x66\xa5\x0b\x4d\xe0\xc8\xcf\x4c\xd6\xaf\xc6\xba\x52\x30\x2b\ \xea\x0b\x4e\x62\xe6\x31\x1d\x49\xdc\x08\x32\xe1\xba\xc8\x20\x19\ \x41\xe6\x24\x3f\xcf\xc0\x90\x7a\xbc\xb5\x1b\x19\x40\x63\x82\x3f\ \x70\xf8\x68\x6e\x02\x2e\xfe\xcb\x30\xe9\x64\x0b\xe5\xba\x88\x3a\ \x64\x82\xe9\x2c\xba\xd0\x04\x8e\xfc\xcc\x60\x53\x5b\x7a\xbd\x03\ \x4e\xd1\x5f\x82\x73\xc2\x60\x48\xc8\x3c\xaa\xa0\x37\x83\x1c\x15\ \x8c\x0d\x91\x8c\x9c\x4c\xf5\xe5\xe7\xa2\xd1\x82\x25\xf1\x75\x26\ \x18\xcd\x46\x28\xf3\x04\x42\xfc\xc9\xa7\x5a\xf2\xf3\x98\x53\xc7\ \xe5\xad\x42\x13\x38\xb8\x0b\x08\xee\x1b\x54\x1b\xfe\x8c\x6e\x03\ \x5b\x53\xc6\xa2\xf0\x61\x2a\x64\x23\x1c\x35\x8c\x0c\x46\x66\x08\ \xbb\xe1\xce\xcf\xf5\xc5\x8e\x8a\x56\x0d\xa0\x31\xc1\x58\xf6\x33\ \x73\x62\x6b\x48\xfc\x29\xa7\x5a\xf1\x73\x10\xc1\x57\xd7\x70\xe4\ \x7f\x13\x75\x36\x17\x9a\xc0\x71\x1f\x27\x96\x3c\xf2\x70\x23\xf8\ \xeb\x4c\x5b\xf0\xc1\xec\x3e\x1e\x33\xfa\xf8\xcc\x23\x66\x46\x30\ \x37\xc3\x51\x8b\x91\x21\xec\x86\x1b\x3f\x57\xbd\x2d\x65\x2d\xe6\ \x00\x96\x4c\x40\xe2\x4f\x8d\x68\xcd\xbf\x4f\x90\xf0\xe7\xc4\xc8\ \x82\xfe\x2e\xff\x9c\xa8\x5b\x68\x02\x87\x8d\x02\x60\xce\x99\x76\ \x9c\xc3\xd7\xb7\xa2\x01\x0e\x4b\x26\x50\x8c\x60\x6c\x86\x44\x1d\ \x92\x19\x42\xaf\x6d\x54\xce\x47\xfc\x76\xac\x09\x8c\x0d\x6f\x00\ \x83\x0f\x55\x87\x1e\x7b\xdf\xb4\x68\x82\xce\x81\x65\x61\x5a\xc4\ \x17\xfc\x3b\x0b\x63\x3a\xc3\xb1\x9b\x9e\x3c\xa1\x3c\xa7\x10\x01\ \x21\x68\x02\xf5\xb9\xeb\x6e\x2e\x57\x68\x82\xdc\xce\xfc\xbd\xb6\ \xb8\x18\xcc\x3d\xfb\x35\x27\xe2\xd6\x4e\x61\x00\x15\x99\x6a\x23\ \x58\x8f\x0c\x7e\x17\xff\x52\xce\x67\x04\x0d\x0f\x7f\x3e\x5c\x13\ \xda\xfa\x97\x56\x92\xc4\x66\xdb\x4b\xc2\xf4\xd3\x5f\xf2\xff\x5f\ \x14\xd3\x05\x4e\xdd\xf2\x47\xf1\x4f\xaa\x30\x0d\x31\xc9\x04\xea\ \xf3\xd5\xfb\x9f\x34\x81\x34\x76\xf7\xe0\xd3\xb6\xb9\x0b\xff\x93\ \xaa\x38\xbf\x01\xf3\xce\x7e\xc3\x89\xcb\x38\xa4\x10\xaf\xa0\x37\ \x43\x76\x91\x21\xec\x86\x2b\xb8\x9d\xfb\x3f\x4c\x28\x7f\x50\xce\ \x6b\x89\x51\x47\x3e\x87\x0e\xfe\xef\xc1\x8c\xd3\x6d\xf8\xbf\x17\ \xc7\x76\x45\xf1\xfd\x54\x23\x8a\x13\x28\xfa\x09\x33\x33\x9c\x84\ \x90\x6b\x6b\x34\xe7\xa9\xb7\xb9\xfc\xff\x90\x09\x24\xf1\xc3\x3f\ \xd8\x50\x06\x9e\x9f\xf7\x0c\x8d\xa5\x07\xe2\x4f\x9f\xb6\xf3\xfb\ \x34\xd7\x9f\xfa\xe6\xf2\x57\x60\x74\x58\x53\x98\x1f\xd3\x1e\x36\ \x24\xfd\x8c\xc2\x1f\x34\xc3\xcc\x10\x99\x87\x35\x24\x58\x88\x0c\ \x89\x9c\xa3\x10\x93\xbe\x1f\xfb\xee\x55\xb0\x25\x65\x0c\x2c\x89\ \xed\xc6\x7f\x8f\x25\xe8\xff\x25\xf1\xc3\x55\xa8\x4d\xa0\x35\xc3\ \x7e\x34\x81\xfa\xfb\xf5\xb6\xfc\x2f\x98\x40\x88\x5f\x1f\x0b\xbb\ \x20\xe6\xbf\x30\x26\xac\x99\x64\x82\x71\x6c\xa8\x55\x13\xa8\x84\ \xa7\xef\xff\x1c\xda\x88\x9f\x43\xc6\xef\xd2\x6c\x14\x3a\x54\xa0\ \x37\x42\xbc\x39\x8a\x09\x64\x8e\xe8\x48\x54\xcc\x20\x19\xe2\xe0\ \xf5\x8d\xe0\x71\x7e\x82\xe6\xf7\x12\x4b\xe3\xba\xf3\xe1\x63\x52\ \xd6\x71\x14\x5c\x26\x5c\x47\x8a\x99\x19\xf6\x5f\x5b\xab\x39\x4f\ \xfd\x27\xda\x04\x8a\xf8\x15\x60\x61\x6c\x07\x85\xdf\x8e\x36\xcf\ \xde\x04\x1a\xe1\x2b\xc0\xa4\x93\x5f\x68\xbe\xef\x7e\x7e\x3c\x6f\ \x79\xb1\x19\x07\x04\xa1\x1c\x63\x23\x1c\x44\xf1\x0f\x0a\x03\xc8\ \x1c\xb6\x62\x06\xf3\xc8\x10\xc6\x23\x43\xc8\xd5\xd5\xb0\x36\x71\ \x10\xac\x43\xe8\xf7\x26\x65\x1d\xd3\x91\x6c\xd1\x10\xa6\xc8\x40\ \x26\x50\x97\x87\xca\xf8\xe4\x99\x40\x88\xff\x09\x16\x6e\x51\x6c\ \x47\x1d\xbf\x5b\x32\x81\x74\x0f\x3f\xf1\x1d\xe7\x12\x30\xec\x60\ \x63\xcd\x77\x36\x25\x0f\x83\x93\xb7\x7c\x21\x26\x63\x3f\x27\x96\ \x73\xc0\x82\x11\x42\x75\xd1\x41\x1b\x0d\xf4\x86\xb0\x1c\x15\xf4\ \x91\x41\x26\x49\x8d\xc6\x0c\xc7\xcd\xa2\x83\xd6\x10\x64\x02\x75\ \xd9\xa8\x9e\xd8\x2c\x96\xfe\x64\x98\x40\x11\xbf\x22\x2c\x89\xeb\ \xa4\x40\x02\x06\x5c\x9e\xa7\xfc\x7b\xec\xb1\x16\x26\x13\x4c\x60\ \x95\xe9\x7e\xfe\xeb\x8b\x5f\x80\x81\x21\x0d\x35\xdf\x5b\x9d\xd8\ \x0f\x0e\xdf\x70\x41\xd1\x43\xcc\x90\x4d\x60\x6e\x84\x03\x28\xf8\ \x01\x43\x13\x28\x64\xa2\x21\x38\x5a\x23\x24\x18\x62\xa9\x8b\xd0\ \x1a\x22\x29\xeb\xa8\x85\xa8\xa0\x8f\x0c\x07\xae\xaf\x55\xca\xf7\ \x67\xf4\x37\xd0\xc0\xb5\x04\x94\x5b\x55\x54\x8a\x04\xdd\x59\x99\ \xc7\xd7\x04\x42\xfc\x06\x28\xfe\xd2\xb8\xce\x0a\xeb\x93\x06\x41\ \x44\x9a\x3f\x44\xa7\x07\x41\xd0\xd5\xa5\xca\xcf\xc7\x1e\x6b\x29\ \x99\xc0\x89\xdd\x6a\xe6\xfe\x0e\xfc\x15\xdd\x5e\xf9\xbf\x15\xf1\ \xbd\xc0\x1f\xfb\xf9\xb3\xe9\xc1\x9c\x98\x0c\x19\xad\x09\xb4\x46\ \xd8\x6f\xc5\x08\xe6\x51\x41\x90\xa9\x8d\x0a\x09\x1c\x7b\xf2\x85\ \x30\x6d\x54\xc8\x32\x36\x04\x19\x80\xc4\x97\xcb\x48\xe5\x6d\xe0\ \x5a\x52\x99\x5b\x50\x4c\xf0\x58\x46\x02\x59\xfc\xad\x15\xe1\xef\ \xf8\x2e\x0a\x1b\x92\x07\xa3\xf8\x7e\x28\xfe\x1e\x05\x32\x81\xfc\ \xff\xd3\x22\xda\x72\xd4\xdf\x71\x3d\x37\x06\x93\x2c\x6f\x14\x7e\ \x9f\x44\x06\x11\xcc\x31\x36\x42\x08\x0a\x1e\x62\x66\x04\x23\x33\ \xa8\x0c\x91\x19\xaa\x8a\x04\x6a\xcc\xcd\x60\x39\x2a\x24\x1a\x76\ \x11\x48\x16\xa1\x37\x02\x89\x2f\x97\x71\xce\x99\xff\x42\x43\x95\ \xf8\x8f\xb7\x09\x14\xf1\xdf\x86\x65\xf1\x5d\x15\x24\xf1\x7d\x51\ \xf4\x40\x81\xc9\x04\x7b\xd1\x04\xea\x63\x89\x55\x09\x7d\xb0\x7f\ \x74\x46\xd1\xf7\x9a\xb1\x4f\x8b\xc6\x08\x5a\x43\xc4\x5a\x34\xc3\ \x7e\x63\x23\x08\x33\xc4\x73\xac\x99\xe1\x90\xa1\x19\x12\x75\xa8\ \xcd\x20\x99\xe0\xc0\xf5\x35\x4a\x39\xe7\x9e\xe9\x60\x28\xfe\xe3\ \x69\x02\x21\x7e\x43\x14\x7f\x79\x42\x77\x85\x8d\x29\x3f\x09\xf1\ \x77\xab\x0c\xa0\x35\xc2\xde\xab\x7f\x2b\xc7\xfb\x5c\x9a\x06\xa7\ \xd3\x76\xc2\x19\xec\x26\x88\xb3\x1c\x95\x09\x32\xf6\xe9\x88\xe1\ \x68\x8d\x10\xab\x31\x81\xb1\x19\xe2\x34\x46\x38\x20\xa2\x81\x6c\ \x02\xcb\x66\x48\xd0\x60\x32\x41\xa2\x82\x30\x40\x96\x8c\x14\x0d\ \x48\x7c\xb9\x9c\xf3\xce\x76\xcc\x56\xfc\xc7\xcb\x04\x8a\xf8\x95\ \x60\x45\x42\x0f\x85\x4d\x29\x43\x70\xa8\xe6\x03\x51\xe9\x01\xc8\ \x6e\x61\x82\xdd\x86\x66\xd8\x77\xed\x6f\x38\x74\x63\x23\x8a\xbe\ \x47\x85\xda\x04\x41\xfa\x88\xa0\x33\x81\x91\x11\xac\x9b\x21\x2e\ \x1b\x33\xc4\x65\x63\x86\x04\x9d\x19\xf4\x91\x41\x36\x43\x28\x8a\ \x2f\xd7\xcb\xfc\xb3\x9d\xa0\xa1\x5b\x49\x9b\x6e\x38\x11\x7c\x25\ \xd2\x23\x6b\x02\x21\xfe\xa7\xdb\x2a\xc1\xca\xc4\x9e\x0a\x2e\x24\ \x7e\xda\x0e\x21\xbe\x89\x68\x4e\xf6\x66\xd0\x9a\x40\x42\x31\x41\ \x86\xcc\x5e\x33\xd4\x26\xd8\x07\x61\x37\x37\x43\xc8\xf5\x15\xb0\ \xfb\xca\x5c\x8e\xeb\xf9\x51\x0a\xf2\xcf\xf6\x5f\x5f\x09\xe1\xa9\ \x9e\x26\x13\x64\xca\x1c\xd0\x11\x6f\x21\x32\x24\x28\x58\x36\x03\ \x89\x2f\xd7\xcb\x82\x98\xce\xf0\xa9\x5b\x29\x9b\xc5\xd7\x2c\x47\ \x9b\xc0\xdc\xb1\xc6\x9f\x7f\x74\x4c\xa0\x12\x7f\x55\x62\x2f\x85\ \xb5\x49\xdf\x61\xcb\x47\xf1\xd3\x76\x49\xa4\xef\xb2\x60\x84\x00\ \x8b\x46\x38\xa3\x41\x6d\x04\x95\x19\xd2\x4d\x66\x38\x78\x63\x2d\ \xf8\x5f\x9e\x09\x5b\xce\x0d\xd3\x5c\xcb\xe8\x23\x2d\x61\xc8\x81\ \x26\xf0\x8d\xcf\x87\x86\xd0\xff\x4d\x0c\x6f\x03\x5e\x17\xfe\x40\ \x43\xac\xe2\xbf\x23\x4e\x63\x08\x73\x23\x18\x9b\x21\xc1\x82\x19\ \x42\xaf\x3b\x2b\xd7\xb2\x30\xa6\x8b\xdd\xe2\xeb\x4c\x30\x91\xb9\ \x61\xcd\x17\x7d\x64\xc4\xff\x6c\x5b\x65\x70\x4e\xea\xad\xb0\x2e\ \xb9\x1f\x84\xa5\xba\xa0\xc8\x3b\x05\xbb\x0c\xc8\xce\x04\x26\x33\ \x18\x9a\x20\x03\x0d\x20\x08\xbb\xb9\x09\x73\x86\xc9\xf8\x3b\xfb\ \x2b\xbf\x7f\x4c\x58\x2b\x68\xe9\x59\x0d\xaa\xad\x29\xc5\x1f\x00\ \xa1\xbb\x86\x74\xe3\xa8\xf5\xf6\x77\xa1\x95\x57\x55\xa0\x55\x44\ \x2d\x3c\xab\x40\x73\xcf\xca\xd0\xcc\xb3\x12\x7f\x6e\xe0\xd5\x45\ \xcf\x41\xb1\x79\x45\xa1\xe6\xa6\x72\x30\xe2\x60\x2b\xf0\xbd\x3c\ \x15\x4e\xa7\xfb\x59\x8c\x08\xf1\x16\x8d\x10\xaa\x31\x42\xe8\x0d\ \x67\x4d\xdd\x74\xda\xf9\x51\xb6\xcb\xcd\x6c\x36\x41\x81\x2f\x51\ \x57\x89\xbf\x26\xa9\x8f\xc2\x7a\x14\x22\xec\xa6\x0b\x44\xe2\x58\ \x3f\x32\x9d\xd8\x69\xc5\x08\xbb\x54\x26\xd0\x1b\xe2\x0c\x27\x50\ \x47\xc8\xb5\xe5\xd8\xc5\x0c\x56\x7e\xef\xe4\x13\x6d\x81\xae\x85\ \x44\xa4\x49\xa4\x66\x1e\xef\xc0\x0f\xc1\x0d\xc1\x29\xaa\x1d\xbf\ \xe1\x42\xb7\x5f\x69\x31\xc6\xec\xe8\x36\x7c\x8d\xde\x8c\xc8\xd6\ \x30\xed\x74\x4b\x98\x12\xd1\x1c\x26\x9d\x6a\x0a\x13\x4e\x35\x81\ \x9f\x0f\xd5\x85\x96\xdb\xdf\xc6\x0a\x7e\x16\xde\x58\xf2\x22\x0c\ \xdc\xd7\x14\xf6\x5c\x9d\xaf\x32\x81\xbe\x8b\xc8\xce\x08\xa7\x6e\ \x79\x6b\xea\x86\xf8\x33\xb2\x03\x14\x9b\xff\xd4\x63\x6e\x02\x45\ \xfc\x2a\xb0\x36\xf9\x5b\x85\x0d\x29\x03\x78\xcb\x8f\xc4\x96\x23\ \x89\x6f\x22\x4a\x63\x04\xbd\x21\x8c\x4d\x10\x20\x0c\x80\x64\x48\ \x84\x5c\x5f\x0e\x9b\xcf\xfd\xa4\xfc\xce\x01\xfb\x3e\x85\xf2\x2b\ \x5e\xe3\xc2\xb7\xf0\x78\x17\xfe\x38\xde\x1a\x96\xe2\xd8\x7a\x71\ \x5c\x27\x3e\xbf\x6e\xab\xf8\xe3\x4f\x36\x82\x71\x27\x3e\x85\xdf\ \xc3\x1b\xc0\x98\xe3\xf5\xa1\x5b\x60\x35\x28\xb9\xb4\x18\x3f\xf7\ \x9c\xd3\x7d\x79\x99\xe2\x32\x43\x04\x5a\x33\xc4\x6b\x8c\xa0\x35\ \xc3\xc6\x94\xef\x35\x75\x44\x54\x5b\x5b\x1a\x6a\x6e\x79\x3e\xc7\ \x06\x20\x68\xd9\x3a\x9b\xc9\x32\x51\x8d\xf2\xf9\x6b\x02\xe9\x59\ \xbb\xf0\x46\x28\xfe\xba\xe4\xbe\x0a\x54\x50\xa9\xe5\xfb\x69\x49\ \x37\x8a\x04\x5a\x13\x44\x1b\xa2\x8d\x06\x47\x6e\x6e\xc4\xbe\x7d\ \x88\xf2\xfb\xbe\xdf\xf7\x19\x6f\xa5\x44\xbf\xbd\x0d\x78\x66\xbd\ \x2c\xbe\x1b\x2c\x8d\xb3\x26\x7e\x2b\xab\xe2\x8f\x3a\x56\x17\x7e\ \x39\x5a\x1b\x46\x84\xd5\x84\x4f\xb6\x95\xe6\xe6\x1a\x14\xdc\x0c\ \x4e\xde\xf2\xcc\xc6\x04\x32\x5a\x23\xf8\x5f\x9e\xae\xa9\x27\xf9\ \xda\xa9\x05\xe7\x54\x7c\x5a\x86\xc6\x9f\x6f\xfc\x94\x2d\x45\x45\ \x5a\x22\xaf\xe5\xa7\xf8\xa9\x8d\x5c\xab\xc0\xfa\x94\xef\x14\x36\ \x9d\xfb\x01\x5b\xfe\x26\xde\x67\x46\x1a\x42\x11\xc0\x08\xeb\x46\ \x38\x9d\xe6\x03\xde\x97\xc6\x2b\xbf\x6b\xec\xd1\x2f\x79\xab\x24\ \xe1\xfb\xef\x6d\xc8\x13\xab\xbc\x12\x7f\xd8\x91\x8f\x60\xe8\xe1\ \x0f\xa0\xfd\xce\x8a\xf0\xec\xdc\xa7\x61\x50\x48\x73\x38\x99\xa6\ \x36\x81\x75\x23\x50\x8e\xa2\xae\x2b\x62\x59\x7c\x4f\x2e\x60\x4e\ \xba\x01\x65\x21\x6a\x1b\xe6\x8b\x8a\x4c\x40\x3a\x20\xa5\xf2\x43\ \xfc\x8a\x24\x7e\x63\xd7\x77\x30\xd4\xf7\x53\x70\x39\x37\x90\x17\ \x32\x32\xcd\xd7\x44\xba\x8c\xd6\x08\xd6\x4d\xb0\x13\x45\x97\xd9\ \x85\x59\xbd\x33\x9e\xff\x47\xfe\x7b\x96\xc7\xf7\x82\xda\x9b\x2a\ \xf0\xd6\xd8\x23\xa0\x1e\x26\x54\x7d\xf2\x45\xfc\x9f\x0e\xd5\x80\ \x41\x87\xde\x83\x4e\x01\x15\xa1\xe8\xdc\xa7\x60\xc2\xb1\xf6\xc2\ \x04\xc1\x66\x46\x30\x19\x22\x5e\x05\x8d\x50\xd4\xf5\x25\xf3\xde\ \xda\x32\x50\xcf\xb5\x58\x6e\xc4\x9f\x86\x0c\x42\xea\x21\x2f\xe6\ \xbd\x01\x66\xb0\xb7\xe9\x46\xcd\xc0\xe0\xc6\xb0\xf1\x5c\x7f\x85\ \x1d\x97\xc7\x63\xcb\xf7\xe1\x44\x72\x7c\x0d\x50\x9b\x40\x8d\xde\ \x08\xb2\x01\x02\xae\xce\x52\x7e\xc7\xc8\x43\x2d\x30\x71\x2a\x8a\ \x06\x28\x8f\x42\xf7\xc8\xa1\xf8\x2d\x72\x26\xfe\xc1\xf7\x60\xe0\ \xc1\x6a\xf0\x7d\x68\x55\x68\xec\x51\x92\x5f\xc7\xea\xc4\xfe\x28\ \xec\x6e\x61\x02\x35\x26\x23\xa8\x4d\xe0\x79\x71\x94\xa6\xce\x88\ \x8e\x7e\xb5\xa0\xd2\x9a\x67\xed\x4a\xfc\x28\x79\x64\xfd\xd8\x51\ \x21\xfe\x10\xa4\x11\xf2\x3a\xf2\x54\x7e\x74\x00\x4f\xb3\x1e\xe8\ \xbd\x99\x2c\xeb\xc7\xe0\x26\x18\xf6\x07\x28\xf8\x5f\x9e\xcc\x43\ \xb5\xc9\x04\x6a\x6c\x37\x41\x34\x72\x3a\xcd\x1b\x43\xfe\xef\xca\ \xb9\x1b\xbb\x56\xe5\xad\x7e\xf8\xc1\xe6\x3c\x81\x2a\x28\xf1\xfb\ \x1f\xa8\x02\xdf\xed\xaf\x04\xe5\x57\x15\xe3\xd7\xe4\x77\x79\x92\ \x81\x01\xcc\x4d\x20\xb1\xe7\xea\x1c\x4d\x7d\x11\xe3\x8f\x7d\x05\ \x6f\x2c\x2d\x62\x93\xf8\xca\x3e\x05\x83\x58\x04\xea\x30\x1d\x19\ \x86\x7c\x8e\x94\xb0\x6b\x49\x5d\xae\x0d\xc0\xb0\x1b\xf8\x84\xfd\ \x86\xd1\xe0\xce\x8f\x21\x4d\xc0\xe5\xfc\xf7\x0a\xfe\x57\xa6\x18\ \x88\xaf\x8f\x0a\x51\x1c\x3f\x03\xfc\x21\x22\xdd\x1b\x3c\x2f\x8d\ \xe2\xe7\x5b\x70\xb6\x3b\x54\x58\xf9\x3a\x0f\x95\xcb\xe2\x7a\x3e\ \x12\xe2\x7f\x1b\x52\x11\x3a\x04\x94\x85\xa2\x73\x9e\xe2\xd7\x17\ \x96\xba\x01\x85\xde\xa7\xc2\xd8\x0c\x47\x31\x3f\x52\xd7\x95\x5c\ \x3e\xca\x03\xcc\x43\x3c\x75\x0b\xef\xae\x7f\x8e\x8f\x12\x28\x42\ \xf0\x56\x4f\x09\xdf\x74\x76\x17\xc7\x5e\xf4\x28\xda\x2f\x48\x6b\ \xa4\x74\x7e\x8a\xcf\xc4\xd4\xe3\x4b\x48\x2d\x56\x87\x4d\x24\x13\ \x0c\x0a\xf9\x1c\xb6\x9c\x1f\xa8\xb0\xf3\xca\x54\x14\x79\x87\x40\ \x6f\x82\x28\x43\x24\x03\x1c\x4f\xdd\x0c\xdb\x2e\x0c\xe1\xe7\x99\ \x15\xd1\x11\x5e\xc0\x50\x4b\xf9\x06\x25\x4d\xb9\x13\xbf\x99\x24\ \xfe\x49\x7b\xc5\x7f\x57\x27\x7e\xef\xe0\xf2\xd0\x73\xdf\x5b\x50\ \xc9\xb9\x18\x34\xc1\x28\xe0\x71\x71\xa4\x99\x01\xb4\x26\x88\x17\ \x50\xf9\xd4\xf5\x24\x43\xc2\x52\x14\x90\x45\x2e\xb1\xe4\x25\xa8\ \xbe\xb6\x2c\x74\xf6\xaf\x03\xdf\x06\x36\x84\x09\xc7\xdb\xc1\xea\ \x84\xbe\xfc\x77\xf1\xbe\x7f\x0c\x4b\xc0\xfa\xff\x1a\x29\xc7\x0a\ \x68\xdb\x1a\xea\x6b\x5e\x56\x9b\x60\x70\x48\x53\xd8\x7a\xe1\x47\ \x85\x5d\x57\xd5\x26\xd0\x9b\x41\x67\x80\x0c\x5f\x38\x7e\x6b\x33\ \xb8\x5e\x1c\xca\xbf\x4f\xe7\x23\xf1\x29\xd7\x30\x89\xdf\x5b\x2f\ \x7e\x6c\xc1\x88\xdf\x7d\x6f\x59\x68\xbb\xb3\x04\xbf\x46\xba\xde\ \xc3\x37\x9d\x51\xec\xbd\x02\x63\x33\x90\x09\xd4\x75\x24\x43\x65\ \x1d\x75\xb8\x35\x4c\x08\xff\xda\xf0\xff\x65\xaa\xaf\x2b\xcb\x23\ \x03\xef\x06\x46\xf3\xed\x6a\x5e\x64\x05\xf8\xd1\x99\xe0\x27\x2c\ \xc8\xb6\x0b\x83\x14\x02\xaf\x39\x19\x98\x60\x87\xca\x04\x32\xbe\ \x10\x91\xe6\x85\x7d\xfe\x18\xfe\x3d\x3a\x4f\xb1\x02\x14\xbf\xd7\ \xde\x2a\xf0\xb5\x7f\x79\xbe\x2c\xab\xd6\xe6\xd7\xa0\xe6\xe6\xe2\ \xf0\xb1\xcb\xab\x50\x77\x6b\x71\x68\xb9\xa3\x04\x74\x0a\x2c\x0d\ \x5d\x83\x4a\x43\xe7\x3d\x25\xe1\xd5\xc5\x45\x60\x22\x0a\xb7\xe3\ \xf2\xef\x2a\x03\x58\x32\xc2\x3e\xf0\xbb\x32\x41\x53\x47\xf6\xf0\ \xc2\xfc\x67\x79\x1e\x40\xf0\x48\xf0\x2b\xef\x06\x8a\x3c\x1a\x26\ \x18\xc0\xbc\x4a\x62\xe8\x72\xbd\x38\x58\xe1\xd0\xcd\x55\x26\xd1\ \x33\x76\x60\x2b\xf7\x31\x24\x22\xdd\x13\x2b\xf0\x37\xfe\x9d\x9f\ \xf6\x37\xe3\xe2\x4f\x3f\xd5\x3e\xdf\xc4\xef\x17\x5c\x1d\x1a\xbb\ \x97\x85\x4a\xab\x5f\xe6\xe3\x7c\xde\xcf\x8e\x66\x29\x3c\xd9\xea\ \xc1\x0e\x28\x50\xe6\x4d\x3f\xc7\x30\x4d\xc2\xd7\xd9\xf6\x12\x54\ \x58\xfd\x2c\x74\xd9\x59\x97\x5f\x3b\x99\x39\x2e\x33\xc8\x64\x80\ \x2c\x35\xfb\x38\xfb\x6e\xcc\x03\xff\xab\x13\x39\x01\xd7\xa6\xc1\ \xfe\x9b\x4b\x38\x47\x52\xd7\xe2\xb0\xd2\x95\x13\x9d\xe1\x0f\x09\ \x59\x21\x18\x11\x5d\x94\xba\x5c\x9b\xd4\x5f\x93\x2b\x50\x24\xe0\ \x33\x80\x03\x58\xf3\xfc\xce\x01\xf4\x26\x68\x87\x7d\xd1\x2c\x96\ \x3e\xf9\x44\x7b\x70\xbb\xf8\x13\xc7\xef\xca\x78\x45\xfc\x28\x73\ \xcc\x0c\xe0\x77\x75\x3c\xff\xce\x90\xfd\xcd\x2d\x88\xdf\x33\x87\ \xe2\x7f\x9e\xad\xf8\xad\xbd\x2b\xc0\x5b\x2b\xc4\x6c\xda\x70\x16\ \xc3\xc7\xd5\xe5\xd8\x32\x46\xcf\x1b\xd3\x80\x97\xb1\xc9\xc8\x78\ \x64\x2c\xf2\xbb\xe0\x0f\xfe\xf3\xcf\x99\x9b\x6c\x86\x1a\xeb\xde\ \xe4\xd7\x7f\x24\xd5\x59\x18\x20\x48\x1f\x0d\xd0\x04\xf1\x9c\x7d\ \x06\x04\x2b\x24\x70\x42\x38\xa1\x37\x97\x2a\xf5\x39\x39\xbc\xbd\ \x6e\xb4\x40\x49\x22\x9b\x8a\xd7\xdd\x0a\x93\xf2\x7c\x1a\x02\x5a\ \x7a\x3c\xcb\xb3\xa9\x7b\x35\x70\xbf\x34\x44\x21\xec\xd6\x5a\x6c\ \xf5\xde\x0a\x51\x3c\x02\xa8\x91\xc4\x0f\xbc\x3e\x83\x1f\xff\x57\ \x54\x37\x1e\xe2\x46\x1c\x6c\x91\xa7\xe2\xff\x7c\xb8\x16\x34\x74\ \x2d\x2b\xb5\xf4\x3f\xd8\x15\x2e\xfa\x2b\x6c\xbe\x10\x9c\x66\xd4\ \x46\x89\xb1\x75\x3f\xa4\x2b\xd2\x4e\x64\xdb\x34\xd5\xda\x0a\xf9\ \x4a\xfc\xfc\x07\x9e\x89\xb7\x65\x9e\xef\xa3\x01\xa8\x0c\x41\xd7\ \x67\xa3\xd0\x41\x66\xec\xd5\x61\xd9\x08\xfb\x34\x46\x08\xbc\x36\ \x43\xa9\xcf\x7e\x41\x8d\xf8\x8a\x20\xf3\xa1\x61\xe9\xe5\xcf\xd0\ \x6d\xe1\x3d\x78\x2d\x2f\x14\xcc\xda\x80\xd9\xec\x73\x12\x6e\x43\ \xca\x0f\xe0\x71\x69\x28\x27\xe0\xda\x64\x6c\xf9\xdb\x11\x12\xde\ \x08\xc9\x04\x87\x52\x97\xf3\xe3\xe7\x08\xf1\xf5\x7d\xbe\xe3\xc4\ \x1f\x7e\xa4\x36\x7c\xea\xfa\xa6\x24\x3c\xb5\xdc\xba\xcc\x85\xd1\ \xde\x22\x8c\x4d\x12\xa2\xff\x20\xa6\x53\x69\x52\xe5\x7d\xe4\x6d\ \xa4\xac\x18\x63\xd3\x1c\x7b\x71\xc1\x1b\xe2\xe7\xef\x20\x0d\xd9\ \x7b\xec\x27\x8a\x02\x54\x8e\x5d\xd7\x68\x4e\x60\x8f\x8a\x20\x43\ \x43\xc4\x6b\x30\x36\x01\x19\xc0\x1f\x23\xa3\x5c\xa7\xed\xbc\x3f\ \xe6\x2d\xde\xe2\x1d\xc1\xdf\xd9\xc2\x82\x59\x1b\x30\x9b\x25\xf6\ \x0f\x6a\x0c\x9e\x97\x7f\x56\x38\x91\xbe\x15\x5b\xfd\x76\x81\x1c\ \x01\xb4\x84\xa7\xb9\x80\xf7\x95\x91\xb0\x31\x65\x20\xbc\xbd\xb2\ \x04\x7c\xe1\x55\xc3\x81\xe2\x37\xd6\x88\xff\x95\x4f\x65\x23\xe1\ \x27\x88\x89\x94\x6e\x48\x63\xa4\x9a\x18\x53\xbf\x24\xee\xaa\x59\ \x6b\x4d\x4f\x8b\x56\x57\x81\x0c\x40\xe5\xf6\xbd\xfa\x1b\x0a\xbc\ \xc7\x0c\xbd\x09\xe2\x75\x26\xd0\x9a\x21\x81\x13\xac\xa9\xd3\xf7\ \xd7\xbd\x65\x71\xca\x58\x99\x1a\x1e\x86\x19\x41\xbe\x26\x85\xb3\ \x59\xdf\x92\x4b\x5f\x86\xed\x97\x87\x29\x04\x5d\x9f\xc9\x85\x8f\ \xd2\xa1\x35\x80\xff\xd5\x3f\xf8\xf1\xcd\xdc\xab\xf3\x49\x1e\xbd\ \xf8\xdd\x73\x2e\xfe\x09\x49\xfc\xc1\xa1\xb5\xa0\xfc\xca\x97\x01\ \xdb\xf8\x2d\xec\xb3\x3d\x54\xc2\xff\x8c\x74\x12\xf3\xe7\xe5\x45\ \x22\x5b\x24\x87\x21\xf4\x19\x32\x80\x5c\xfe\xb8\xac\x40\x81\xde\ \x04\xf1\x3a\x2c\x1b\x21\x32\xc3\x4b\x53\xaf\x14\x21\x49\x68\x4b\ \xb3\x84\x3c\x29\x9c\xc5\x32\xd8\xf7\xac\x59\xfe\x25\x85\xd8\xfa\ \xa7\x9f\xea\x84\x2d\x79\xb8\xc2\xc9\xf4\x2d\x06\xe2\x6b\x0d\x10\ \x7c\x63\x0e\x3f\x76\x58\x68\x2b\x3e\xbd\x6b\x9a\xe1\x73\x9c\xf8\ \x2d\xbd\x2a\xc2\x73\x73\x8b\x48\x73\xe6\xaf\xb0\x79\x22\xa1\x1b\ \xae\x12\xfe\x2d\xa4\x58\xae\x93\xa7\x29\xd8\x2d\xa0\x01\xe4\xf2\ \x9b\x0c\x10\x68\x18\x0d\x6c\x35\xc1\x89\xb4\xcd\x9a\x7a\x35\x9f\ \x2d\x34\x82\x66\x0c\x79\x52\xf8\x05\x46\xa5\x3c\x4f\x0a\x67\xb3\ \xe1\x1f\xac\x7f\x0b\x76\x5c\x19\xa1\xb0\xfb\xfa\x24\x14\xd8\x4b\ \xb0\xdd\x90\x63\x69\xeb\xf8\xb1\xab\xe2\xfb\x73\x57\xd3\x6d\x5d\ \xc7\x89\xff\x19\xfc\x1a\x56\x1f\xaa\xae\x79\x4d\x6a\xf5\x52\xb8\ \xa7\x39\xf3\xdf\x90\xde\xbc\xcf\x96\x66\xcf\x8a\x39\xac\x82\x66\ \xb1\xa6\x95\x56\x95\x50\xea\x40\x6b\x00\xbd\x11\xe2\x35\x58\x36\ \xc2\xa1\xd4\x65\xca\x39\x67\x9c\xea\x6c\xf3\xba\x01\x1a\x29\xe0\ \xb8\xc5\x2b\xef\x93\x42\x27\x96\x34\xf3\x54\x17\xf0\xb9\x3a\x52\ \xe1\x78\xda\x5a\x14\xd9\x53\x65\x02\xbd\x11\x02\xae\xff\x1f\x3f\ \xf6\x83\xf5\xe5\xa0\xb5\x57\x75\x03\xf1\xbb\x9a\xc4\x8f\xb1\x4f\ \xfc\x01\x21\x1f\x43\xa9\xbf\x5f\x90\x86\x74\x52\xab\x9f\x24\x32\ \xfa\x2f\x91\xaa\x22\xd4\x3b\x36\x3c\xce\x60\xcd\xa8\x2c\x54\xa6\ \x5d\xd7\xc6\xa1\xc8\xbb\x2d\x98\x20\xd0\xc0\x00\x7b\xf4\x11\xe1\ \x76\x10\x24\x20\xc1\x37\x9d\x94\x7a\x1d\x11\xda\x9a\x67\xfb\x76\ \xdd\x2d\x1c\xc5\xef\x14\x16\xcd\xb3\xbe\xbf\xd2\xaa\x92\x98\xf4\ \xfc\xaa\xb0\xe7\xc6\x14\x03\xf1\xb5\x26\x38\x94\xba\x94\x1f\x3b\ \xfe\xe8\x37\x7c\x21\xc7\xd2\xd8\xee\x0e\x13\xbf\x77\xd0\xfb\x52\ \xc8\xa7\x09\x1b\x69\x48\x37\x56\xb4\xfa\xfa\x62\xa1\xc4\x33\x79\ \xd2\x22\x66\xb2\x29\xed\x7d\x6a\xf3\x72\x05\xdd\x98\x2e\x0c\xb0\ \xdb\xd0\x08\xf1\x9c\xec\x4d\x90\x20\x08\xbc\x3e\x59\xa9\xdb\x9e\ \x01\x0d\x0d\x47\x00\x56\xd7\x0b\x0c\xe6\xdd\x5d\x11\x47\x8b\x4f\ \xab\x81\x12\x47\x1e\xfc\x12\xfc\xae\x8d\x52\x38\x9a\xb6\x0a\xa2\ \x32\x3d\x05\x5e\x1a\xa2\x91\xc8\x0c\x77\xd8\x79\xfd\x37\x7e\x6c\ \xa9\xa5\xaf\xf0\x35\x7c\x8e\x12\xbf\x9d\xef\x3b\xd2\xec\x9d\xb4\ \x40\x62\xba\xb8\x53\xd6\x5e\x64\xf6\x2f\xe6\x69\x7f\x38\x8b\x6d\ \x1f\xb8\xaf\x19\x2f\xd7\xc1\xd4\x85\x28\x74\x80\x99\x09\x76\xa3\ \xb0\xbb\x85\xf8\xc8\x6d\x62\x8f\x05\xa4\xd6\x4f\xa8\xeb\xf6\x43\ \x8c\x30\xf6\x2e\x1a\xe1\x6b\x05\x27\xb2\x70\x31\x6c\x7d\xca\x5e\ \x91\x5f\x35\xd8\x76\x9d\xbf\x44\x81\xc4\x6b\xb8\xe5\x1d\xf0\xbf\ \x36\x5a\x61\xf7\xf5\xf1\xd8\xc2\x3d\x24\x14\x13\x78\x72\xe1\x65\ \x0e\xdd\x5a\xc8\x8f\xed\x15\xf0\x29\x54\x5b\x53\xda\x40\xfc\xce\ \xb9\x13\xbf\x3a\x73\xc6\x2b\x9f\x8a\x0c\x15\x93\x36\xe5\x44\x08\ \xcc\xdb\xc9\x11\x27\x96\xbc\xe4\x6c\x5f\x5e\x36\x6a\x04\x92\x01\ \x02\x0c\x0c\x60\x66\x04\x33\x33\x24\xa8\xa0\xfa\x52\xd7\x2f\xd5\ \xb9\xad\xdb\xd5\xc9\xd0\x6d\x64\xec\x06\x4e\xe0\x15\xd6\x16\x39\ \x8f\x55\xd1\xdb\x0b\xa1\x53\x49\xe8\x8f\xd6\x97\xe7\x42\xf7\xde\ \xfd\x19\x4c\x38\xde\x01\x66\x9f\xee\x8e\x2d\x78\x8c\x21\x61\x69\ \xcb\x51\x70\x73\xf1\x65\xb0\xf5\x67\xba\x41\xc0\x8d\xb1\xe0\x7e\ \x71\x18\xbc\x88\x89\x1f\xad\xd7\xcf\x03\xf1\x27\x89\xc9\x9c\x46\ \x22\xe4\x17\xc9\x87\x51\xd0\xc7\x54\x1e\xb9\x1e\xa2\x32\xdd\x21\ \xee\x76\x80\x86\xf8\xdb\xbb\x2d\x10\xa8\x90\xa0\x20\x19\x20\x22\ \x63\xb3\xa6\x7e\x6d\x19\x01\x18\x8e\x08\xfa\xf0\x19\xc2\xb6\x62\ \x32\xcb\xfa\x74\x6e\x07\xdf\xba\xfc\xb9\xfd\x5d\x18\xaa\x6d\x65\ \xf7\x8d\x71\x70\x3a\xd3\x55\x18\xc0\x43\x25\xbc\x89\xc3\xb7\x16\ \xf1\x63\x07\x05\x37\x87\x77\xd7\x94\xca\x2b\xf1\x69\xea\xb6\x8e\ \x98\xad\xcb\x9f\x71\xb0\x13\x1b\xd1\xca\xf3\x03\x51\x0f\x7f\xf0\ \x96\x1f\x7f\x5b\x66\xb7\x0d\x18\x99\x20\x10\x23\xc9\x0a\xa5\x7e\ \x97\xc6\x7c\xc7\x93\x3a\x7b\x0d\xc0\x47\x03\xcd\xd9\x26\xd1\x15\ \x96\xb4\xa5\x2f\x0b\xfe\x2b\xb2\x27\x16\xe4\x77\x85\xe0\xd4\xe9\ \xb0\x3f\x75\x16\x1c\x4e\x5b\xa8\x70\x14\x5b\xfb\x89\xf4\xb5\x0a\ \xd1\x5c\x74\x73\x4c\xe2\x47\x61\xeb\x0f\xc4\xca\xa1\xf3\x51\x28\ \xa3\xc7\xaf\xb4\xe2\x77\x74\x94\xf8\xb5\x44\x96\x9f\x7f\x37\x45\ \x9c\xd8\x89\x51\x87\xda\xf2\xb2\x1d\xba\x35\x5f\x25\xbe\x65\x23\ \x24\xe8\x08\xd4\x11\x7a\x6b\x8e\xa2\xc1\xa4\xe3\x1d\x6d\x5e\x32\ \xa6\x86\xdf\xe0\xaa\x88\x57\x28\x75\x87\xc5\x6d\x09\x67\xe0\x75\ \x69\x24\x04\xde\x1c\xcb\xd9\x7b\x73\x22\x17\x4f\x21\x8b\x70\xe7\ \x44\xeb\xf0\xb0\x80\x27\x1c\x4b\x5f\xc9\xcf\x37\x39\xbc\x13\x7f\ \x52\x27\xb7\xe2\xf7\xda\xf3\xfe\xa3\x21\xfe\x6c\x56\xf1\xc5\xf9\ \xcf\x29\x75\x16\x91\xb1\x09\x05\xde\x95\xad\x09\x0c\xc5\xbf\xa3\ \x27\x04\x1b\x9e\xac\x43\x9f\xdd\x8d\xec\x1a\x01\xc8\x6b\x07\x79\ \x1d\x31\x36\x12\xf9\x44\xcc\x09\x58\x2f\xcc\x9e\x9b\xe3\x14\x0e\ \xa2\x0b\xd5\x06\x88\x96\x31\x34\x80\xde\x04\x67\x04\x21\xa9\xd3\ \xf8\xf9\x3e\xdd\x5a\x15\xba\xee\xaa\xa5\x17\xff\xac\x7d\xe3\x7c\ \x3e\xd4\x6b\xc3\x7c\x0a\x54\x7c\xa9\xce\xe6\xb6\xf6\xfc\x90\x97\ \x2d\x38\x75\x8a\x10\x5f\x6f\x80\x04\x05\x49\xf4\x33\x59\x14\x15\ \x5d\xb1\xdb\xdc\x0c\xc7\xb1\x71\x10\x87\xd2\xe6\x61\xab\xff\x13\ \xf6\xdf\x9a\xa1\xd1\x40\xae\x37\x7b\x9f\x1e\xe2\xd3\xc2\xa3\x59\ \x32\x5e\xe5\x4f\x48\x0d\xeb\x4f\x0c\xcd\x62\x4d\x3f\xde\x50\x01\ \x82\x52\xff\x50\x38\x9e\xbe\x1c\x85\x74\x45\xdc\x2c\xa0\x35\xc0\ \x19\x8e\x87\x86\xc8\xcc\x2d\xfc\x5c\xde\x97\x7f\xe5\x21\x69\x7a\ \x44\xdb\x1c\x8b\xff\x4b\x58\x7d\x69\x92\x47\x1a\xe7\x4f\x15\x09\ \x5f\x9d\x02\x12\x9f\x46\x49\xa9\x2b\xe2\xbe\x17\x75\xb5\x02\xe2\ \xef\xec\x32\x03\x45\x47\x4e\x67\xba\xc0\xc1\xb4\x3f\x35\x75\x6b\ \x0f\x55\x56\x97\xb2\x7b\x04\xc0\xd7\x09\xf4\x64\x21\xa2\x81\xbc\ \x6d\x7d\x24\x34\x8b\x4d\xee\xe4\x57\x1f\xf6\xa6\x8e\x57\x38\x9d\ \xb9\x49\x18\xc0\xd5\xa2\x11\xce\x28\xc2\x9b\x23\x19\xe0\x78\xfa\ \x32\x7e\xae\xa9\x27\xba\xc0\x5b\xcb\x5f\x55\x89\xff\x5f\xbb\xc4\ \x1f\x17\xde\x10\x3e\xdc\x58\x42\x9a\xe1\x93\xc6\xf9\x43\x45\xb6\ \x5f\xbc\x40\x16\x42\xe0\xd0\x98\x1a\x8c\x5c\x57\x67\xb3\xb6\xab\ \x22\xc0\x2e\x14\xde\xc4\x21\x14\x5f\x5d\xaf\xd6\x58\x19\xf7\x03\ \xaf\xaf\xef\xf7\x36\x81\x5e\x81\xb5\xf9\x1a\x00\x7b\x9f\x1c\xe2\ \x09\x60\x33\xbe\x66\xb0\x33\x52\xc6\x96\xd9\xac\xf5\xdf\x05\x36\ \x81\x7d\xb7\xfe\x8f\xb3\xff\xd6\x54\x43\xe1\xcf\x28\xa8\xc4\xbe\ \xad\xc6\x43\xc3\xc1\x34\x27\x7e\xbe\x2f\xbc\x3e\x82\xaf\x76\x54\ \xcf\xb1\xf8\x6d\x7d\x2b\x9b\x2f\x87\x6e\x29\x86\x7a\x4f\x17\x80\ \xf8\xbc\xf5\xcf\x8f\xfa\x96\x97\xed\x68\xfa\x22\x6c\xed\x3b\x39\ \x6a\xe1\x89\x98\xdb\xde\x4a\x9d\x9a\x43\xdf\xff\xfd\xc8\x37\x30\ \x2c\xb4\x19\xb4\xf0\xac\x0c\x5f\xf9\x56\xe0\xa1\xde\xde\xd6\x6e\ \x04\x9f\x05\x94\x12\xc0\x56\xb6\x25\x80\x33\x59\xc8\x82\xe8\x6f\ \x21\xf8\xd6\x04\xce\x91\xf4\x79\x28\xae\xab\x0a\x37\x0b\xb8\xeb\ \xcc\x70\x96\xe3\xc1\x91\xcf\x57\xfa\xef\x57\xf9\x26\x8f\x39\x11\ \x7f\x70\x68\x4d\xa9\xdf\x97\x6e\xec\x8c\x13\xc3\x9a\x02\x5b\x0e\ \x4d\xad\xbf\xe6\x86\x8a\x4a\xd9\x62\x6f\x6f\x47\xb1\x77\xaa\x30\ \x19\xe0\x58\xc6\x62\xe5\x38\x35\x5f\x7a\x7d\xec\x10\xa1\x2d\x26\ \x80\x34\x02\xb0\x39\x01\x14\x23\x80\x6d\xe7\x87\x43\x48\xda\x44\ \xce\x89\xcc\x15\x28\xa6\xab\x01\x6e\x3a\xce\x72\xdc\x75\x9c\xce\ \x5c\xcf\xcf\xe5\x77\xf5\x37\x7e\x41\x92\xf8\xdf\xd8\x25\xfe\xef\ \xe1\x9f\x48\xf7\xf3\xa5\xc7\xa0\xe8\x76\xee\xb7\xc8\x7b\xac\xa0\ \x76\xc5\x10\xcf\x45\x3a\x27\xfc\xc8\xcb\x16\x9e\xb1\xcc\x4c\x7c\ \x13\xf1\x77\x7c\xe1\x40\xda\x54\xa5\x4e\x65\xe4\xfa\x20\xa1\xf2\ \xc2\x00\x22\x01\x4c\x11\x37\xc1\xde\xb7\x9e\x00\x8a\x57\xae\x1d\ \x48\x9b\xac\x10\x95\xb5\x89\x0b\x7e\x56\x83\x9b\x05\xf4\xe2\xc7\ \x60\xeb\x3f\x95\xb9\x9a\x9f\x6b\xe1\x99\xef\x80\x76\xf4\xb6\x5b\ \xfc\xe3\x9f\x40\x87\x9d\x55\xe5\xd0\x3f\x47\x14\xe8\x13\xb1\x62\ \xe7\x3f\x05\x64\x00\x8f\x2e\xfe\x0d\x78\xb9\x42\xd3\xa6\x41\xdc\ \x1d\x1f\x14\xdb\x5f\x27\x7e\x22\x72\x2a\x73\x95\xa6\x4e\x65\xfa\ \xed\x69\x6a\xb8\xb6\xcf\x51\xf0\x04\xb0\x1f\x0b\xc3\xab\xa5\xd5\ \x41\x95\x6c\x49\x00\x9b\xd6\xdc\xf8\x36\x84\xa6\x4f\xe1\x1c\x4a\ \x9f\x69\x26\xbc\x35\x13\x90\xe0\x2a\xee\x48\x9c\xc8\x5c\xc6\xcf\ \x37\x2e\xac\x03\xdf\x96\xc5\x5e\xf1\xc7\x1c\xaf\x07\xaf\x2c\x7c\ \x56\x1e\xf2\xd1\x6a\xdc\x36\xa2\xdf\x7f\xaa\x80\xc4\x6f\x4f\x43\ \xe5\x9d\xd7\xc6\xf2\x72\x45\x64\xad\x85\x84\xbb\xfe\x9c\x44\x85\ \x9d\x0a\x87\xd3\x67\x29\x75\x2a\x43\xdf\xa5\x73\xe4\x55\xf8\x57\ \x12\xc0\xaf\xf8\x7a\x80\xae\x62\xed\xa2\xd5\x19\xc0\x91\x5f\x6d\ \xaf\x09\x07\xd3\xa7\x72\x8e\x65\x2e\xb4\x2a\x7e\x8c\x21\x5a\x23\ \x1c\xcb\x98\xcf\xcf\xd7\x3f\xa8\x19\xdf\x93\xc7\x5e\xf1\x9b\x79\ \x96\x97\x43\x19\x0d\xf9\xfa\x8a\x3b\x7b\xcf\x14\x90\xf8\x3c\xf1\ \x9b\x75\xaa\x27\x2f\xd3\x51\x2c\x5b\x76\xe2\x47\xdd\xde\xa8\xd4\ \xa7\x1a\xaa\x8b\x9c\xcc\xea\xd9\x03\x5f\x0b\xf0\x01\x5b\x24\xd6\ \x40\xbc\x6e\xcb\x82\x86\x85\x03\xf0\xc2\x0e\x65\x4c\xe3\x44\x64\ \xad\x82\xb3\x77\x5c\x15\x62\x34\xb8\x19\x60\x6a\xf5\xb1\x2a\x8e\ \x65\xce\xe5\xe7\xa3\x73\xd3\x86\x4c\xf6\x88\x4f\xaf\x63\xe1\x8b\ \x38\xeb\xf2\xb9\xec\x91\x62\xd1\xe6\x2b\x05\x18\xfa\x83\xbe\xda\ \x5e\x8b\x97\xe7\x70\xc6\x4c\x0c\xfd\x5e\x2a\xe1\xf5\x26\x08\xcb\ \x98\xad\xd4\xa7\x4c\xc0\xf5\x3f\xf2\xbc\xf5\xd3\x70\x51\x24\x80\ \xbf\x22\x9f\xd9\xf6\xe8\x18\x8e\x00\x96\x9e\x1d\x80\x05\x9b\xce\ \x39\x73\x67\x13\x8a\xb9\xcd\x4c\x78\x63\x13\xc4\x6a\x30\x37\xc0\ \x3c\x7e\xbe\x01\x41\xcd\xf9\x6e\x5c\xb6\x8a\x3f\xea\x58\x1d\xfe\ \xba\x36\xd1\xfa\x27\x88\xb1\x6c\xf9\x02\x7b\xfa\x05\xb3\xfe\xaa\ \xce\x65\x60\xf7\x8d\xf1\xbc\x3c\xd1\xb7\x37\xa0\xc8\x7e\x02\xbd\ \x09\xa2\xb1\xf5\xcb\x75\xa9\x86\x0c\x94\x97\x7d\x3f\x41\xe6\x12\ \xf5\x46\x8b\x5e\x3f\xb2\x2d\x59\x76\x62\xb7\xe8\x55\x2b\x47\x32\ \x67\xc0\xd1\xcc\xd9\x16\xc5\x8f\xe5\xb8\x19\x73\xd7\x5d\xc7\xf1\ \xac\xf9\xfc\x9c\xdf\xa3\x01\x68\x2b\x36\x5b\xc5\xff\xe5\x68\x2d\ \x78\x79\x61\x51\xb9\xef\xff\x59\x2c\xe0\x2c\x56\x40\xe2\xf7\x7d\ \x69\xc1\x73\x20\xd7\xcf\xa9\xac\x65\x2a\xf1\xfd\x20\x89\xe3\x6f\ \xe2\x9e\x3f\x1a\xff\x2f\x7e\xac\x9a\x0d\x49\x43\xf3\x34\xf3\x37\ \x48\x00\xbf\x47\x2a\xdb\x96\x2f\xe1\x85\x85\x65\xce\xe4\x9c\xcc\ \x5a\x2c\x0c\xb0\x0d\x85\xdd\x26\x44\x37\x42\x6b\x80\x38\x8e\xbb\ \xc4\x5d\x89\x13\x59\x8b\xf8\x39\x7f\xd8\xdb\x82\xef\xc3\x67\xab\ \xf8\x9d\x03\xaa\x48\x0b\x3a\x19\x9b\x88\x74\x11\x63\xfe\x82\x98\ \xed\xe3\xfb\x20\xfd\x1d\xf3\x03\x2f\x47\x78\x16\xf5\xfb\x3b\x84\ \xe8\x06\xe2\xf3\xd6\xbf\x5e\xa9\x4b\x35\xb5\x37\x56\xb2\xfb\x86\ \x4e\x4e\xe0\x4f\x09\xd9\x95\x00\xce\x66\x9f\x57\x75\x2e\x0b\x47\ \xb3\x66\x71\xa2\xee\xac\xc6\xd6\x8b\xc2\xdf\x75\x35\xc0\x8d\x13\ \xa7\xc3\xdd\x90\xd3\xb7\x57\xf2\x73\x4e\x3c\xd6\x05\xde\x5b\x57\ \xc2\x26\xf1\x47\x84\x7d\x0c\xd5\xd7\xbf\x26\xbb\x98\xfa\xfe\x4f\ \x59\x41\x3c\x02\x2d\xc4\xa7\x6b\xa7\x32\x1c\xcb\xfa\x13\x12\xef\ \xa1\xf8\xf7\xfc\x0c\xf0\x57\x38\x8e\xc7\xc9\x75\x29\xf3\x4b\x68\ \xbb\x5c\xef\x07\x68\x6d\xfd\x1f\x85\x7e\x32\x18\x4f\x00\x1b\xb0\ \x95\xb6\x27\x80\xb3\xd8\x77\x9f\xbb\xd6\xc0\x02\x3a\x71\xa2\xee\ \x38\x63\x0e\xb0\x5e\xc5\x5a\x88\xbc\xb3\xc2\x8c\x95\xf8\xf3\x0d\ \x56\x8d\x10\x8d\xdf\xa5\x73\x2e\x8f\xfd\x11\x4a\x2f\x7b\xd1\x26\ \xf1\x87\x1d\xf9\x50\x4a\xfe\x6a\xb0\x15\x62\xd2\xa7\x72\xbe\xf7\ \xfd\x2a\xf1\xe9\xfa\x8f\x67\xfd\xc5\xcb\x63\x2c\xbe\x1f\x24\x73\ \xfc\x39\x31\x77\x5d\x94\xba\x24\xe8\x91\xf1\x97\x16\x38\x66\x7a\ \x97\xce\x41\x53\xc5\x24\x34\xb5\x74\xfe\x38\x98\xbc\x63\x08\xf5\ \xfb\x34\x59\xd6\x81\x05\x32\xe9\x31\xb7\x46\x62\xbe\xc4\xea\x08\ \x60\xea\xc0\xbd\xad\x20\xfc\xf6\x6c\xbb\x88\xbc\xb3\x1c\xe2\xef\ \xb9\x09\xdc\x0d\x89\xbd\xbb\x95\x1f\x4b\xb7\x4a\xe9\x42\xc7\x1c\ \x6b\x68\x55\xfc\x0e\xbb\x2a\xc9\xe1\x9f\x56\xf4\x7e\xc1\xf2\x6d\ \xdf\x3b\xad\xf8\x5f\x7b\xd7\xe1\xd7\x7e\xe2\xf6\x1c\x88\x47\xf1\ \x93\xef\xf9\x0a\xa1\xcd\xf1\xd7\x11\x8d\x8d\x48\xae\xa7\x49\xc7\ \xbb\xe6\xba\xf5\xf3\xc5\x9d\x24\x34\x3d\xc8\x4a\x42\xd3\xdd\x50\ \x5a\xfc\x2a\x4d\x8d\x3b\x31\xd3\x93\xcc\x93\xc4\x54\xf9\x77\x62\ \x06\xf0\x39\x9b\x56\x01\xcd\x8d\xec\x8b\x05\xfd\xd3\x2e\x4e\xde\ \x9e\xa7\x32\x80\x64\x82\x04\x03\x4e\xde\x9e\xcf\x8f\x7f\x17\xbb\ \x99\x2e\x01\xef\x99\xc4\x3f\xa6\x17\x9f\x36\x67\xa8\xb7\xb5\xa4\ \x1c\xfe\xe9\x6e\x5f\x4d\xdb\x0a\xe1\x58\xf1\x27\x1f\xef\x26\xca\ \x38\x17\xfb\x7c\x59\x7c\x5f\x9d\x09\x52\x34\xf8\x6b\xa0\x06\x22\ \xd7\xd5\xd7\xde\x75\xf9\xcd\x99\xec\x1e\xeb\xb2\x3a\xae\x37\x3d\ \xcf\x38\x4d\xe4\x46\x63\xc5\x50\x8f\x9e\x6d\xfc\x51\x88\xde\x45\ \x4c\x96\xd5\xb1\x7d\x25\xb0\x13\x4b\x5e\x15\x37\x18\x4e\xde\xf9\ \x4b\x03\xfd\x8c\x2a\xe2\xc7\x7d\xad\xa1\xce\xa6\xca\x5c\xc0\xb9\ \x91\xdf\x69\x8e\x89\xbb\xb7\x05\x45\x76\x33\x14\x5e\xc2\x03\xa2\ \xef\xae\xe6\xc7\x8e\x3a\xd4\x1e\x3e\xdc\x58\x52\x11\xff\x57\x03\ \xf1\x69\x67\x8e\xb2\xcb\x8b\x01\x6b\xca\xb6\x89\xf5\xfc\x15\xf2\ \x2d\xf9\x93\x56\x3f\xa7\x4e\xc1\x32\xd3\xf5\x9e\xba\x33\x8f\x97\ \x21\xf9\xbe\x2f\x27\x85\xe3\x67\x05\x7f\x85\xe4\xfb\x3e\x70\xfa\ \xce\x62\xa5\xae\xbe\xde\x91\x33\x13\xf0\x95\xbd\x52\x44\xa4\xc9\ \xb0\x11\xa2\x5b\xec\xc8\xa4\xc7\xd5\x3f\x13\x8d\xa4\xaa\xa8\xab\ \x32\xa2\xdf\x7f\xd1\xf6\x1b\x65\x18\x5a\x06\xa1\xc8\xbd\x76\x35\ \x46\xa1\xab\xf0\xfe\x8a\x7e\x46\x3b\x70\xd6\xda\x54\x8e\x6f\xa1\ \xfe\xd3\x81\xc6\x40\x6f\xfe\xa0\xe3\x4e\xdd\x99\xab\x70\xf6\xee\ \x1a\x45\xec\x44\x1d\x1e\x9c\xf8\x7b\xdb\xf8\xb1\xf4\x98\x33\x9d\ \x77\xe0\x81\x8f\xb8\xf8\x23\x51\xfc\xe1\x28\xfe\xcf\x28\xfe\x90\ \xc3\xef\x2b\x7b\xf2\xf0\xfe\x5f\x9a\xc5\x6a\x63\x5b\x12\xe3\x98\ \x71\x3e\x95\x7b\x5e\x64\x3f\x7e\xad\xa7\xef\x2c\xe4\x65\x48\x51\ \x84\xb7\x5d\xfc\x73\x2a\x92\xef\x7b\x43\xc4\x9d\xf9\x4a\x7d\x7d\ \xb3\xa3\x9e\xdd\x26\xe0\xad\x5f\x1a\x0e\x53\x42\xdc\x4c\x2c\xee\ \x28\x2d\xba\xc6\x97\x44\x84\xcc\x45\x23\x71\x62\x69\xb4\x23\x55\ \x27\xff\xda\x7c\xbf\xba\x79\xd1\x5d\x60\x5d\xca\x77\xb0\x26\xf9\ \x5b\x58\x9d\xd4\x9b\xbf\xd4\x80\x5e\x69\xf2\xed\x9e\x7a\xd0\xcc\ \xed\x03\x88\xb8\x3b\x4f\xe1\xf4\x5d\xac\xa8\xfb\xee\xd9\xe0\xc1\ \x89\xbe\xb7\x82\x1f\x4f\x15\x50\x63\xc3\xeb\x3a\xf1\x07\xa3\xf8\ \x3f\xa2\xf8\x3f\x84\xbe\x2b\xcf\x62\xd1\xfd\xfe\x86\xb6\xdd\xc6\ \xcc\xf5\xf4\x6e\x50\x35\xe7\x37\x61\xdb\xb9\x51\xfc\x1a\xa3\xef\ \x2e\xe3\xc2\x69\xc5\xd7\x9a\xe0\x9c\x0e\x21\xfa\x3f\x7a\x92\xee\ \x7b\x62\x3d\x2d\x50\xea\xcc\x1e\x13\xa8\x5a\x3f\xdd\x05\xed\x91\ \x37\x11\x51\x6c\xf8\x48\x1b\x1e\xd2\xb6\xa5\x46\xe2\xff\x1d\xdf\ \x95\xbf\xca\xed\xcd\x65\xaf\x61\x61\xe6\x6b\x88\xbf\xbf\x59\x23\ \x7a\x92\x82\x87\x42\xe2\x7d\x37\x88\xc4\x4a\xd8\x75\x75\x02\x8f\ \x30\x9d\x70\x9c\x6f\x24\x7e\xb7\x3d\x15\x65\x03\x50\xff\xff\x61\ \x9e\xde\xf2\x95\x9e\x81\x48\x6d\x8f\x82\x1c\x4c\x9b\xc9\xcb\x12\ \x73\x6f\x0d\x0a\xec\x83\x62\xfa\x1a\xe0\x67\x05\x7f\x1d\xe7\xff\ \x91\x48\xb8\xbf\x55\x53\x67\xed\x6d\x34\x81\xaa\xf5\xff\x22\xb2\ \xfa\x97\xf3\xa2\x2a\xca\xb2\x52\x98\x76\x8d\x67\x97\x68\xfb\xd5\ \x25\xb1\xdd\x75\xe2\x2f\x89\xeb\xcc\xdf\x64\x49\xe2\x04\x5c\x9b\ \x00\x91\xf7\x16\x28\x9c\xbd\xbf\x12\x92\xfe\x71\x37\xc3\x43\x47\ \xfc\xfd\x4d\xfc\xf8\xdf\x0e\x77\xe0\xb3\x7c\x3f\x1c\xa8\x8e\xe2\ \x57\x57\xc4\x1f\x70\xe0\x1d\x68\xe3\x5b\x56\x9e\xc6\xa4\x7d\x6f\ \xdf\xc9\x93\xfe\x5f\xbc\xb1\x9c\x8c\xb8\x30\x7a\x00\xbf\xa6\xe8\ \x7b\x4b\xd0\xa8\xae\xd8\x62\x7d\x54\xf8\x1a\xe0\x67\xc8\x79\x8e\ \x7f\xb6\xc4\xde\x5f\xa3\xa9\xb7\xba\x2e\x55\xb2\xbd\x29\x64\xd6\ \xfa\x7b\x8a\xd0\x9f\x27\xc3\x61\x0a\xb3\x1f\xb3\x12\x58\xe9\x63\ \x58\x62\xf9\x15\xc5\x61\x61\x4c\x67\x9d\xf8\xf4\x52\x63\xba\xa5\ \x3b\xfd\x44\x2f\x88\xba\xb7\x50\x21\xfa\xde\x62\x14\xd8\x8d\x0b\ \x9f\x8c\x42\x67\x47\xec\x7d\x67\xfe\x9d\xf6\x3b\xea\xc3\x1b\x4b\ \x9e\x83\x7e\x21\x55\x15\xf1\xfb\xed\xaf\x0c\x5f\xf8\x94\x91\x86\ \x3a\x8c\xf5\x67\x8c\x6f\x7a\xe4\x68\xf1\x87\x53\xab\x6f\xee\xf6\ \x21\x1c\x4e\x77\xe2\xd7\x12\x77\x7f\x1d\xa4\xfc\xe3\x6d\x28\xfc\ \x79\x0d\x7e\x56\xb0\x24\xfe\x4e\x8c\x80\xdb\x34\x75\x46\x75\x98\ \x5d\x04\xa0\x21\x23\x5f\xd2\x25\x65\xfe\x79\xda\xfa\x99\x68\x65\ \x2f\x8a\xa5\xc3\xdd\xd8\x10\x76\x8c\xd6\xee\xd3\xcb\x16\xd4\xe2\ \xd3\xfb\xed\xdb\xfb\xbd\x0f\xcd\xdd\x3f\x84\x33\xf7\x17\x69\x88\ \xbf\xbf\x1e\x05\xc6\xa4\x89\xe3\x61\x01\x4f\x4e\xec\xfd\xd5\xfc\ \x3b\xff\xf5\xf9\x04\x5e\x5f\xf2\x2c\xf4\x09\xae\xc4\xc5\xef\x1b\ \xf2\x36\xfe\xbd\x82\xdc\x05\x90\xe3\xdf\x72\x70\x86\x9f\xf8\xde\ \x9a\xb7\x60\x5d\xc2\x30\xfe\xfb\x63\x31\x72\x25\xa3\x71\xcf\x3f\ \xf0\x51\xe1\x6b\x91\x0b\x1c\x3f\x0b\xf8\x5b\x60\x27\x36\x8c\x6d\ \x9a\xba\xea\x13\xd0\xd4\x6a\xf8\xe7\x8f\x74\x49\x8b\x5f\x69\x5c\ \xdf\x5d\x34\x86\x3c\x9d\x0c\xa3\x5b\xac\xcf\x8b\xe1\x44\x07\x1c\ \x68\x04\xd0\xab\x5b\xe9\x8d\xde\xb2\xf8\x73\xce\xb4\x83\x71\xc7\ \x9b\xc1\xcb\x18\x3a\xe9\x56\xe7\xd9\xfb\x8b\x15\x62\xee\xff\x6d\ \x55\xfc\x73\x2a\xe2\x30\x12\xd0\xf7\xc8\x04\xb4\xed\x7a\xb3\xed\ \xa5\xb8\xf8\xbd\x82\xcb\x49\x06\x28\xc9\x06\x8a\xf9\xff\xdc\x86\ \x7a\x6a\xf1\x89\x6f\x2e\x7b\x1d\x66\x9e\xe8\x2d\xae\x75\x19\x8a\ \xb2\xc5\x4c\x78\x89\x0b\x1c\x5f\x0b\xd8\x26\xfe\x45\x15\xf1\xff\ \xac\xd3\xd4\x13\x95\xd7\x9a\xf8\xfc\x6e\x1e\xcd\xec\x95\x63\x4b\ \xc4\x8d\xb0\xfa\x79\x9e\x0c\xab\x4c\xf0\xac\x70\xdb\x57\x98\x22\ \xb9\x90\x09\x7a\xec\xae\xc5\xc5\xff\x33\xfa\x2b\x70\x8a\xfe\x12\ \x2a\xad\x7e\x0d\x66\x9e\xec\x03\x31\xff\x2c\xd1\x90\xfc\x60\x2b\ \x9c\x7b\xe0\x61\x86\xa7\x45\x12\x1f\x6c\xe4\xdf\x5b\x72\x66\x20\ \x90\x40\xa5\x96\x3d\x0b\x2d\xbc\xdf\x80\x92\x7f\x17\xa5\x9b\x19\ \x8b\x6d\x5b\xca\x64\x31\xb9\x73\x26\x23\xd5\x77\xa9\x0a\xeb\x13\ \x47\xf0\xdf\x13\xf7\x0f\xe6\x2a\x0f\xb6\x08\x91\x8d\xb0\x5d\xf8\ \x8b\x1a\xfc\x0d\x49\xf8\x67\xbd\xa6\x7e\x6c\x11\x5f\x79\x27\xa0\ \x34\x9d\x4b\x7b\x11\x7e\x23\xc6\xf6\xf9\x7a\x23\xec\x19\x11\x7e\ \x5b\xb2\x2f\xd8\x0a\xda\xfe\xb5\x5b\xc0\x47\x5c\xfc\x99\x51\xad\ \xa1\xd3\xce\x1a\x40\xa1\x34\xf6\x9f\xa5\x0a\x49\x0f\x36\x19\x88\ \x6f\x32\xc1\x79\x43\xbc\x20\xe5\x81\x2b\xb6\x92\xd5\x70\x2c\x73\ \x0e\xfc\x1c\xd2\x96\x1b\x81\x47\x80\xb1\x18\xfe\xfa\xf0\x09\x8f\ \x22\x36\x08\xfe\xb9\x68\xe9\x1e\xd4\xbf\xd3\xb5\x8d\x3b\xd2\x19\ \xf6\xde\x98\xca\xaf\x2d\x11\x5b\x61\xca\x03\x37\x14\x6e\x47\xb6\ \xe2\x5f\xcc\x16\x3f\x0b\x18\x8b\x9f\x88\xe2\xab\xeb\xa7\x83\x4f\ \x03\x9b\xc4\xe7\xad\x9f\xca\xff\x2a\xfb\x53\xac\xe7\xb3\x71\x3a\ \xd7\xf1\x9f\x22\x62\xed\x5d\x13\x56\x0b\x03\x12\x9a\xa0\xb6\xcb\ \x9b\x30\x3d\xb2\x25\xd4\xda\x54\x16\xbb\x81\x62\x10\xf7\xe0\x6f\ \x4e\xe2\x83\x75\x70\xfe\xa1\x87\x05\x3c\x2d\xe0\xa5\x21\xe5\xe1\ \x36\x48\x78\xb0\x9a\x9f\x6f\xe9\xd9\x41\xd0\x77\x77\x73\x34\x99\ \xe8\x0e\xa4\x3d\x09\x82\x0c\xe0\x8f\xb0\xd3\x71\x1d\xb1\x82\x9d\ \x4e\x7d\x0b\x7b\x6f\x4e\x13\xd7\xb4\x16\xcf\xb9\x15\x2e\x3c\xdc\ \x0e\x17\x1f\xee\x10\xf8\x58\xc1\xd7\x02\x7e\x1a\x2e\x29\xf8\x1b\ \x92\xf4\x60\x83\x52\x37\x84\xad\xe2\x6b\x5e\x0d\x3b\x9e\x5d\xc4\ \x26\xd8\x5e\x4c\xf6\x14\xd8\x4b\x21\x9f\x16\xf3\xc9\x0d\x70\x40\ \xf6\x1b\x0d\x13\x8b\x2f\x7a\x9e\x8b\xbf\xe3\xd2\x78\x88\x7f\x80\ \x7d\x29\x56\xb4\x25\xe1\x2f\xe8\xf0\xb2\xca\xf9\x87\x98\x47\x3c\ \x74\x41\x01\x9d\xf9\xf9\x09\xfa\x5d\x9b\x92\x7e\xd1\xb1\xef\xe6\ \x74\xe5\x98\xc4\x07\x6b\xb0\x0b\xda\x08\xe7\xd0\x48\xf6\x89\x2e\ \x09\x7f\xc9\x10\x3f\x2b\xe8\xc5\xa7\x6b\x90\xaf\x89\xe8\x68\xa7\ \xf8\x1a\x13\xd0\x4e\x5f\x1d\xd8\x9b\xac\x80\xdf\x0a\x4a\x26\x78\ \x95\xd1\x0e\x13\x23\x58\x08\x89\xef\x73\x79\x3c\x24\x3c\x5c\x0e\ \x49\x0f\x57\x63\x65\x7b\x98\xe1\x69\x01\x93\xc8\x17\x2d\xb2\x5d\ \xc7\x05\x34\xc4\xf9\x87\x38\x3e\xc7\xd6\x4c\xc6\x90\x39\xff\xd0\ \x8d\x73\xf1\x5f\x3c\xee\xdf\x1d\x0a\x97\x74\xf8\x58\xc1\xd7\x02\ \x7e\x3a\x2e\x6b\xf0\xd7\x40\xdf\x49\x79\xb8\x89\xd7\x8b\x4c\x47\ \xdf\x86\xbc\x3f\xcf\xe9\x0d\xa0\x47\xe9\x25\xd1\x4f\x61\x17\xb0\ \xa1\x3a\x86\xda\x93\xb7\x17\x40\xe2\xc3\x15\x28\xbe\x33\x17\xe7\ \x22\x8a\x6e\xc2\xd3\x02\x5e\x36\xa0\x17\xff\xd2\x43\x6f\x1b\xd8\ \xa1\xc5\x0e\x13\x5c\x46\xd1\xb2\xc7\xcf\x02\xfe\x66\xf8\x42\xf2\ \xc3\xb5\xbc\x5e\x64\x3a\x09\xf1\x73\xbb\x00\xe4\xd1\x30\x01\x66\ \xd4\xd5\xd7\x96\x83\x53\x77\x16\x42\xd2\xbf\xab\x20\xf9\x5f\x6c\ \xf9\xff\xba\x62\x8b\x43\xd1\xff\xf5\x34\xc0\xcb\x90\x4b\x1a\xb6\ \x5b\xc0\xdb\x0a\xc6\x22\x5f\xd6\xe0\x63\x81\xec\x05\xa7\x6b\x3f\ \xff\x2f\x46\x9a\x7f\xd7\x73\xa4\xb2\xae\xc1\x9f\x6d\x86\x2b\x28\ \xb4\x31\xd8\xf2\xff\x5d\xc7\x8f\x95\xe9\xe4\xfb\xa9\x43\xc4\x7f\ \x34\x4c\xc0\xc5\x2f\x0f\x11\x77\x16\x61\x41\x57\x23\xce\x58\x51\ \xae\x58\xe9\x9e\x86\x5c\x46\x71\xad\xb3\xdd\x02\xde\x56\x30\x89\ \x7c\xc5\x22\x3e\x16\xf0\x35\xe4\x12\x9a\xf8\xfc\xbf\x1b\x79\xb9\ \xa4\xf2\x19\x73\xe1\x5f\x17\xb8\x8a\x82\xab\xb9\x82\xd1\xe0\x1c\ \x37\x8b\xe9\x38\x47\x8b\xaf\x59\xe7\x37\x95\x1d\x66\xf9\xfa\xa6\ \x70\x14\xbf\x06\x8a\x7f\xfa\xee\x62\x38\x07\xce\x9c\x8b\xb0\x05\ \x2e\x83\xa7\x05\xbc\x6c\x60\x3b\xe7\x8a\x06\x6f\x1b\xd8\x61\x03\ \x3e\x3a\xae\x82\xaf\x0e\x3a\xdf\x45\xd8\x8a\xe5\x59\xa3\x94\xcb\ \x9c\x95\xb1\x43\xa1\xc1\xe6\x6a\xe0\x7f\x65\x92\xf2\xb3\x0b\xb0\ \x49\x9c\x03\x0d\x00\x7e\x70\x1e\xd6\x6b\xbe\xd3\xd9\x2f\x6f\xc4\ \x57\xf6\xfb\xeb\xce\x27\x86\xaa\x8a\xb9\x9a\xfc\x11\x3f\xd2\x66\ \xf1\x73\x66\x04\xfb\xcd\x90\x33\x23\x48\x60\x6e\x01\x9b\x2d\x8a\ \x4e\x1c\x4c\x9b\x0d\xad\x3d\x6a\xf1\x0a\xaf\xbb\xa2\x0e\x94\x58\ \x50\x52\x63\x82\xf3\xb0\x81\x9f\x8b\xfe\xd4\x8a\xff\x59\x9e\x88\ \xcf\x6f\x08\xd1\x50\x58\xba\x23\x38\x4a\xac\x07\x78\x35\xaf\xc5\ \x1f\xfe\xd6\xf2\x37\x34\xe2\x4b\x06\x70\x41\xc1\x3c\x0c\xb0\xdd\ \x14\x97\xc0\x9d\xe3\x38\x43\x58\x37\x05\x5d\xe3\x05\xd8\x98\xad\ \xf0\xc4\xc8\x03\xed\xf9\x10\x57\xb3\x19\xc3\xea\xae\x50\x79\xe1\ \x07\x1a\x13\x98\x93\x0f\xe2\xcb\x6f\x06\x1d\x2c\xa6\x85\xf3\x78\ \x85\xf4\x14\x1c\xf2\x39\xb1\xb4\x39\xa7\xfb\xeb\x0a\x7b\x01\x9d\ \x7f\x09\xdc\xb0\x52\xdd\x05\x1e\x36\x9b\xe2\x12\xb8\x2a\x61\xf7\ \x3c\xac\xc5\x73\xb9\xa0\xa9\xb6\x65\x13\x35\x72\x1f\x25\xa4\x50\ \x9f\xbd\xf0\x54\x4e\x32\x3c\xdd\x9a\x35\x5a\xb9\xdb\x63\xd5\x50\ \xa8\xb4\xe0\x7d\x43\x13\xe4\xa3\xf8\x43\xc4\xa3\x71\xf9\xf2\x72\ \xc8\xe7\x59\x5b\xd6\x0d\x87\x7e\xb7\xa9\x55\x98\x17\xfa\x3c\xac\ \xe3\xc2\x99\x5a\xb3\xbb\x55\x43\x50\xf7\x91\x9d\x08\x74\x4e\xc9\ \x10\x5b\x2d\x44\x88\x9c\x19\x82\xce\x69\x4d\x78\x5a\x74\x61\x6d\ \x03\xa6\xee\x2b\x87\xc0\x47\xf3\x9b\x6b\x4c\xf0\xa4\x8a\xcf\x44\ \x92\x51\x8d\xd5\x63\x7f\xd0\x14\x30\x15\x54\x5f\x81\x6b\x14\xb1\ \x8c\x50\x9b\x82\x92\x27\x6b\xad\xd0\xb2\x29\x36\xe2\xf9\x3c\x72\ \x9c\x4b\x5c\x30\xeb\xab\xa9\x5b\x9b\x78\xb4\xbb\xcd\xc2\xab\xe9\ \xb3\x62\x34\xd4\x9d\xdf\x8e\x9b\xe0\x49\x16\x5f\x5e\x1f\xa0\x79\ \x17\xa0\xb1\x09\x9c\x79\x0b\xa3\x2e\x41\x8b\xc9\x08\xb6\xf4\xbd\ \xd6\x90\x0c\x95\xb3\x91\x06\x75\x35\xea\x04\xef\xdd\xb5\xd2\xb3\ \xf3\xf6\x6e\xba\x2c\xd3\x7b\xf9\x28\x68\x30\xa3\xff\x13\x2d\x7e\ \x0e\x4c\xb0\x81\xf7\xef\x5a\x13\xb8\xf2\x16\xac\x3e\x6e\xc0\xde\ \xc6\x50\x63\x7d\x29\x1e\x7a\xcd\x13\xcc\xec\xc8\xcd\x88\x43\x7d\ \x9e\xad\x29\x63\x1c\x22\x5a\xdf\x39\x0b\xa0\xe7\xdf\xbf\x38\x5e\ \x7c\x5a\x03\x20\xad\x00\x2a\x70\xf1\xed\x36\x01\xb5\xb4\x4b\x3c\ \x2f\x70\xe5\x7f\x1a\x89\x4f\x95\x4f\xf0\xdd\x2b\xd0\xe9\x34\xdc\ \x22\x33\x50\xcb\xcc\xae\x1b\xc8\xf9\x88\xc3\x43\x97\xe5\x3b\x42\ \xac\x6f\xfc\xca\x40\x9f\x3f\xe7\x41\xf7\xa5\x23\x1d\x2b\xbe\xb4\ \xeb\xe9\x64\xb1\x1e\xb2\x51\x41\x8b\x6f\xb7\x09\xa4\xbc\xc0\x45\ \x37\xc1\x22\x8b\x6f\xbe\x8b\x15\x3d\xee\xc4\x67\xb8\xd0\x0c\xd4\ \x27\x93\x21\x48\x24\xf5\xe8\x83\x26\x5b\x72\x32\xe2\x30\x8d\x3a\ \x4c\xd7\x31\xe6\xc8\x97\x0e\x6b\xb1\x64\x82\x5e\xb3\xe7\x40\xb7\ \xc5\xc3\x1d\x29\xfe\x24\xb1\x06\xa0\xbe\x78\x1e\xa2\xc0\xc5\x37\ \x36\xc1\x64\x96\x6a\xd9\x04\xda\x84\xab\xed\xf6\xda\x36\x3d\x0f\ \x4f\xb3\x5d\xf2\x43\x8f\x94\x9c\x51\xb8\x96\x67\xdf\xb2\x4b\x30\ \xb3\x33\x84\xf9\x10\xb0\xcb\xae\x0f\x1c\x1a\xb6\xc9\x04\x3d\x66\ \xfd\x05\x5d\x17\x0d\x73\x94\xf8\xfd\x98\xb4\xaf\xff\x2b\xac\x40\ \xdf\x00\x6a\xcd\x04\x25\xd8\x4f\xb4\x36\x20\x3b\x13\x90\xf8\x1f\ \x6d\xa8\x90\xa3\x5b\xa1\x94\x60\x99\x0c\xe0\x62\x31\xc1\xb4\x66\ \x88\x8b\x66\x43\x40\x7a\xe9\xb3\xa3\x1f\xcb\x26\x13\xb4\x73\x1a\ \x0d\x55\x16\x55\xb6\x2b\xbf\xb0\x20\x7e\xc1\xec\x77\x9c\x03\x13\ \x7c\xcc\x17\x6d\x8e\x67\x17\x8d\x4c\x90\x1b\xf1\xe5\x2d\xce\xd5\ \xd3\xcf\xfa\x51\x46\xf6\x86\xb8\x64\x30\xfc\xa4\x6b\xca\x8b\x7d\ \x79\x28\x62\xf1\x79\xfa\x3f\xd8\x15\x5b\x47\x06\x8f\xab\xf8\x6a\ \x13\xd0\x0a\xd5\xea\xe2\x61\x12\x8d\x09\x72\x2b\xbe\xb9\x01\x2e\ \xf1\xb9\x06\x57\x15\x6e\x36\x20\x99\x40\x7d\xb3\x86\x22\x8a\x23\ \xb7\x66\x21\x33\xf1\xc5\x9b\xf4\x0c\x83\xfc\xd4\xee\x20\x76\xca\ \x9a\x09\x1e\x77\xf1\xcd\x97\x90\x57\x53\x9b\x80\xc4\xa7\x1b\x48\ \x39\x1d\x63\x1b\x1b\x60\x9b\x0a\x57\x03\x64\xd1\xb7\xf1\x3e\x9f\ \x5a\x3d\x09\xaf\x1e\xff\x13\x34\xf9\xe3\xa8\x2d\x58\xf9\x28\x86\ \x44\x94\x56\xee\xd2\xe3\xda\x13\x99\xfc\x88\xf6\x10\x76\xd4\x92\ \x09\x9e\x14\xf1\x2d\x9a\x80\x6e\xa4\xd8\xbb\xa7\x7d\x76\x06\x20\ \x11\x2f\x6a\x0c\x20\xb3\x95\xdf\xd5\x93\xc4\x5e\x97\xed\x6d\x5d\ \x47\x8d\x00\x48\x78\xb1\x30\xe3\x2e\xdf\x9c\x41\x7a\x1f\x21\x3d\ \xae\xfd\x2b\x93\xde\x3b\x5c\x5f\x3c\xcb\xd8\x8e\x0d\x65\x61\xe6\ \xeb\x00\x9f\x34\xf1\x2d\x9a\x20\x37\x6b\xe0\x64\xaa\xae\x29\xa9\ \x9a\x0a\x96\x85\xde\x60\xb3\xd8\x6a\x68\xda\x96\xee\xed\xd7\xdd\ \x52\x26\xc7\xa1\x9e\x0f\x55\x49\x3c\xd3\xeb\x67\x69\xa2\x86\xde\ \x42\x4a\x1b\x32\x7c\x2e\x9e\xa3\x78\x41\x4c\xa1\x97\xe7\xcf\x54\ \xa8\x4c\xf0\xa4\x8a\xaf\x37\x01\xed\x4a\xd5\x07\xc3\x22\xb6\xe0\ \xdc\xec\x86\xd5\x76\xc7\xfb\x76\x89\x4c\x5d\x0f\xf5\xf1\x34\x7f\ \x40\xf3\x08\xb4\x90\x83\xe6\x15\xe8\x3a\x68\x48\x99\xd3\xa9\x5f\ \x25\xd4\x9b\x5a\x3c\x09\xff\xbb\x10\x90\xb6\xaa\x7f\x57\xdc\x9b\ \x2f\x62\xf6\x4c\x85\xc6\x04\x4f\xb2\xf8\xe6\x26\xa0\x0a\xe9\xc8\ \x3e\x62\x73\x31\x39\xba\x9c\xd3\x68\x60\xc9\x00\x34\x63\x48\x42\ \x93\xc8\x94\x73\x90\xd0\xd4\xed\x90\xd0\x24\x16\xb5\x54\x32\x1e\ \x89\x9d\xdb\x28\x44\xdf\x17\x4f\xe6\xce\x52\xb5\x78\x7a\x60\x95\ \x76\xe5\x78\x4f\xac\xd7\xb7\xf4\x16\x52\x93\x09\xba\x31\x2f\x56\ \x83\xad\x7a\x92\xc5\x57\x9b\x80\x9e\x60\xa9\x20\x5a\xc7\x20\xd6\ \x9b\xed\xa5\x16\x40\x33\x7e\xf6\x54\x7e\x63\xb7\x4a\x3c\x6c\x93\ \xd0\x34\x3b\x48\x89\x25\x89\x4c\xe7\x22\xa1\xe9\xc1\x49\x12\x9a\ \xc2\x73\x1e\x6f\xb7\x4e\xef\xdb\xf9\x3f\x31\x3b\xd7\x42\x44\xb9\ \xd7\x99\x6d\xaf\x9f\x95\x4d\xd0\x46\x4c\xed\xf6\x79\x92\xc5\x37\ \x7f\xa2\xe8\x0d\x51\xd8\xae\x3c\x1a\x60\x4b\x22\xe1\xac\x89\x45\ \x99\xb3\xb2\xed\x99\xe8\x46\x1c\xf5\xf6\x8c\x1c\xed\xb6\x29\xbd\ \x6f\x67\xa0\x28\x4b\x71\x66\xff\x7b\x87\xe9\x78\x7a\xb0\xa3\xa6\ \x30\xcf\x13\x2f\xbe\x7a\xae\xa0\x98\x48\x8e\x5a\x62\x9b\xf9\x05\ \x83\xe7\xa1\xec\xa2\x01\x85\x5c\x2e\xfe\x20\x16\x81\x69\x95\x07\ \x99\xc6\x11\x09\x65\xae\x56\xe1\x76\x62\xfe\x78\xfd\xf4\xe2\xe5\ \xd2\xb9\x6c\x10\xcf\x8b\x04\xf1\x7f\x42\x7c\xa3\x68\x40\x5b\x96\ \xf5\x64\x0d\xd9\x72\x39\x1a\xa8\xc7\xc9\xca\xaa\x57\xe9\x8d\x20\ \x33\x44\xd8\x1d\xcb\x7a\xb1\x7d\x94\x40\x51\xc8\xcf\xab\x1d\x36\ \xb3\x4d\x00\x1b\xf0\x8d\x2a\xf3\x7f\x9f\xc2\x27\x30\x1a\xd0\x10\ \x89\xb6\x7b\xf9\x12\xa3\xc1\x28\x39\x1a\x50\x3f\x6b\xb6\x08\x42\ \x7e\xe3\xb7\xbc\x05\x5a\x4f\xf6\x36\x1a\x62\x34\x4b\xa2\x6c\x3e\ \xb7\x13\x4c\x76\xbf\x71\xb3\x38\x37\x62\x63\x96\x87\x3b\x73\xfc\ \xaf\x7c\xfe\x23\xfa\xc3\x52\x62\xc2\xa4\x17\x76\x0c\xeb\xe8\xd6\ \xb2\xd9\x22\x88\x61\x42\xf8\x0a\xa2\xd5\x55\x16\xc9\xd7\xf7\xfc\ \xfd\xb7\x78\xac\x2d\xb9\x84\x43\x5e\xb8\x24\xbd\x71\x73\xb8\xb8\ \x3b\xf7\x7c\xa1\x84\x8e\x8b\x06\x2f\x8a\x68\xd0\x06\xa3\xc1\x68\ \x94\x7a\x81\x6a\x11\x44\x13\xd1\xdf\x16\x51\x75\x21\xaf\x89\x19\ \xb6\x0e\xf8\xb7\xb1\x18\x3d\x0e\x53\xf4\xc8\xcb\x5d\xb7\xc5\x7e\ \xfb\x34\x02\x18\x2c\x92\xb7\xa7\x0b\xa5\x73\x7c\x34\x20\xa1\x69\ \x1f\xc0\x1e\x02\x4b\x8b\x20\xe4\xe1\x25\x6d\x58\x41\xbb\x62\x7e\ \x8b\x76\x58\x40\xf3\x0c\xd4\x2d\xe4\xd5\x1d\x3e\x34\xda\x11\x31\ \xd3\x57\x91\x15\xf0\x93\xb9\x4f\xea\xe7\x69\xd1\xb7\x56\x10\x58\ \x1b\x22\xc9\xc7\xbf\xcb\xa4\x6d\xd0\x07\xf3\x2c\x1d\x43\x75\x4e\ \xde\xaa\x99\xdd\x04\x10\x1f\x01\xf4\x66\x7b\x99\xb4\xef\x6e\x99\ \x42\xa9\xf2\x36\x1a\x3c\x25\xc4\xfd\x8f\x1d\xd1\xa3\xa4\xe8\x9b\ \xbb\x62\xb7\x30\x9e\x8d\x60\x67\xa8\x5b\xb0\xe7\x46\x14\x09\x4d\ \x49\xa5\x6e\xdb\x75\x9a\xfd\xa3\x7d\x0a\x2b\xf2\x2d\x5a\xbe\x12\ \xa3\x98\xc2\xcf\x23\x3a\xcf\x50\x41\xdc\x8c\xe9\xc7\x5f\x90\x20\ \x86\x98\xea\xb9\x03\x4a\xe8\x0c\x85\x56\xef\xaf\xaf\xdf\x76\x9d\ \x46\x23\xb4\x29\x73\x9e\xee\xcd\x57\xf8\x71\xcc\x3c\x03\xdd\x8c\ \xa9\x8e\x7c\x8d\x19\xc4\x18\x1e\xba\xc5\xbd\x01\xc3\x17\x29\x90\ \xd0\xaf\xb0\xf9\x4c\xbf\xbf\xfe\x28\x31\x0a\x19\xc8\xa4\xdd\xb8\ \xa9\x9b\xa1\x5d\xca\x8a\x16\x56\xf3\xa3\xdf\x8d\x14\x15\x7d\xf5\ \x27\x62\xee\x60\x26\xa6\x94\x1b\x2c\x08\x3d\x5a\x0c\xef\x06\x33\ \xd3\xfe\xfa\x5f\x8a\xd6\x5e\x53\x8c\x50\x68\x0e\xbf\x84\x48\x3e\ \x0b\x13\xc0\xc7\x6c\x88\x59\x85\x49\x6f\xcb\xa6\x3b\x77\x43\xcd\ \x84\x6e\x23\x86\x9a\xb5\xc5\xf0\xae\x22\x33\xed\xaf\xef\x80\x6d\ \xd7\x0b\x3f\x8f\xca\x10\x93\x04\xad\x2a\xe6\x0f\xcc\x85\x7e\x59\ \x4c\xec\x3c\x5d\xd8\xba\x9f\x6c\x23\x14\x11\x5d\x43\xa1\xd0\x85\ \x9f\xc2\x4f\xe1\xa7\xf0\x53\xf8\x29\xfc\x68\x3f\xff\x0f\x1d\xf6\ \x57\xee\x7c\x6e\x76\x4b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\ \x60\x82\ \x00\x00\x07\x72\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x07\x39\x49\x44\x41\x54\x78\x5e\xa5\x97\x6b\x6c\x14\xd7\ \x19\x86\x9f\x33\x33\x7b\xf1\xda\xbb\x5e\xdb\xf1\x05\x1a\xb0\x21\ \xb8\x01\x43\x02\x85\xa6\x51\x29\x14\x2b\xa2\x49\x14\x89\x5f\x6d\ \x41\x55\xc9\x45\x28\x42\x02\xa7\x28\x4d\xaa\xfe\xea\x45\xe2\x47\ \xfe\x94\x44\x51\x4a\x93\x8a\xaa\x45\x4d\xa3\x46\x8a\x5a\x95\x48\ \x16\x69\x68\x43\x21\xad\x02\x82\x16\x62\x2e\x36\x36\xc6\x57\xf0\ \x8d\xb5\xbd\x17\xef\xee\xec\xce\xe5\x74\x38\x5a\x65\xd5\xf5\x62\ \x0b\xfa\x4a\xaf\xce\x68\xce\x1c\x7d\xcf\xf9\xbe\x6f\xce\xce\x0a\ \x29\x25\xe5\x24\x84\xd8\x0e\xac\x67\x71\x75\x49\x29\xff\xce\x7d\ \x4a\x01\x94\x04\x5e\xab\x69\x5a\xd4\x03\xfb\x9e\xe3\x38\x1d\x2c\ \x22\xef\xd9\x3f\x00\x9d\x05\x90\x5e\xee\x51\x5a\xe9\xae\x0f\x3c\ \xbd\xe9\xa7\xaf\xef\xdb\xf9\xf3\x27\x36\xae\x79\xf2\xe2\xc5\x8b\ \x0c\x0e\x0d\x31\x34\xe8\x79\xa8\xe0\xc1\x41\x35\x7a\xf7\xf1\xe6\ \xd9\xfd\xe4\xe6\x67\x3e\x78\x75\xe7\x6b\x6b\x9b\xc2\xcf\x79\xf0\ \x11\xee\x51\x46\x09\xc0\x86\xf6\x68\x76\x57\x55\x65\x8e\xab\x21\ \x49\x4f\x4f\x0f\xe1\x70\x98\xbb\x29\x95\x4a\x61\x4c\x0d\xd4\x39\ \xdd\x03\x75\x4b\xb4\x74\xcd\x55\xa8\x06\x92\xff\x0f\x80\xb8\x39\ \xd8\x47\xc5\x48\x1f\xb3\xb7\x5c\xfe\x71\xf2\x24\x19\x33\x8b\x63\ \xd9\x48\xc0\x34\x4d\x72\xb9\x1c\xf9\x7c\x1e\xdb\xb6\xa9\xad\xad\ \xa5\x22\x3e\x45\xa2\x42\xc3\x76\xb9\x2f\x19\x25\xf5\x14\x48\x70\ \x81\xc6\xa0\xe0\xc2\xbf\xfe\x86\x99\x99\x43\xc3\x45\x02\x02\x88\ \xe8\x2e\xba\x26\xf0\x09\x81\x71\x5b\xb2\x2c\x62\x20\x70\xc1\xa8\ \x08\x3c\xf5\xc2\xcf\xbe\xfe\xd2\x2f\xbb\x1e\x02\x36\x00\x51\xa0\ \x19\x68\x41\x89\xcf\x81\x77\x0e\xff\x60\x7d\x5f\x59\x80\x23\x47\ \x8e\x08\x5d\xd7\x35\xa9\x39\x0a\x60\xd5\xaa\x15\xf8\x32\x3a\x92\ \x10\x52\x4a\xcf\x20\x04\xd4\x87\x83\x04\x0c\x9d\x80\x4f\x63\x3c\ \x2b\xb8\x3e\x31\xc9\xbf\x27\xc7\x08\x6e\xda\xb9\x67\xeb\xb6\x6d\ \x7b\x2a\xc2\x21\x96\xd6\x06\x08\x05\x74\xaa\x2b\x75\xea\xc2\x7e\ \xa2\x55\x7e\x7a\x46\x92\xed\xc7\x3e\x9b\x0a\x00\xfb\x4b\x00\xe6\ \x77\xa5\x10\x78\x8b\x03\xac\x89\x56\x92\xb5\x1c\x2c\xdb\xc5\x95\ \x12\x4d\x08\xfc\x86\x46\xd0\xa7\x93\x75\x04\x89\x68\x0b\x6f\xbc\ \xf9\x3e\x8d\x4b\x1f\x04\x50\xa0\x85\x51\xd9\x2b\x93\x2a\x57\x75\ \xb5\x9f\xc6\xda\x06\x46\x26\xe7\xf6\xbd\xf4\xd6\xe7\x1c\x3e\xb0\ \x61\xff\x5d\x01\xd0\x41\x68\xa0\xeb\x02\xd7\xb3\xe1\x0a\x24\x02\ \x57\x0a\x34\xa1\xee\x2b\xdf\x4a\x39\x7c\xf5\xe9\xcd\x44\xeb\xea\ \x55\x6f\x94\x91\xea\x97\x64\x32\x49\x30\x18\x54\xcd\xfc\xfd\xed\ \xcd\xd8\xf6\x8d\x22\x44\x11\x00\xf6\xee\xdd\x2b\x3b\x3a\x3a\x5c\ \x43\x08\x7c\x1a\xf8\x75\x0d\xc3\xd0\xd1\x10\xd8\xba\x8b\x2b\x51\ \x00\x86\xa6\x11\x30\x34\xf5\x8c\x99\xcd\xaa\x20\x3e\x9f\x8f\x72\ \xb2\x2c\x8b\x44\x22\x41\x4d\x4d\x8d\x02\x08\x04\x02\xec\x6a\xff\ \x12\xee\xa9\x9b\xfb\x3a\xde\xbc\x70\xfe\x57\x2f\x6f\x3c\x6a\x50\ \x14\xae\xeb\x4a\xa1\xeb\x18\x06\xaa\xc6\x04\xee\x5c\x6b\xcc\xe5\ \x6c\xe2\xe9\x1c\xd9\xbc\x8d\xe5\x48\x42\x7e\x9d\xd9\x2c\xd4\x9a\ \x26\x0b\xc9\x71\x1c\x32\x99\x8c\x2a\x03\xc5\x46\x67\x63\x4b\x80\ \x4b\x03\xd9\xe7\x81\xa3\x1a\x45\x21\x3d\xe9\x1a\x18\x3a\xf8\x7d\ \x02\x5b\x4a\x06\x62\x29\xae\x26\x0d\x8c\x55\x5b\x78\xb0\xfd\x59\ \xbe\xbc\xe3\x65\xea\xb7\x3c\x4b\xcd\xc3\x5b\xb9\xd6\x3f\xc2\xe9\ \xd3\xa7\x89\xc5\x62\xaa\xe6\xa7\x4e\x9d\xe2\xf0\xe1\xc3\x6a\x2c\ \x9e\xb0\x70\xfc\xf8\x71\x0e\x1d\x3a\xc4\xc1\x83\x07\xe9\xec\xec\ \xa4\xff\xc6\x20\xb6\x9d\xd7\x84\xa7\xf9\x00\xba\x02\x60\x68\x36\ \xcb\xb9\x49\x87\xd6\x1d\x1d\x6c\xfb\xe1\x51\x2a\xb7\xbe\xc2\xf8\ \x03\x3b\xb8\xec\x3c\xc6\x65\xf9\x04\x99\xe5\x7b\x68\x79\x7c\x3f\ \x96\xa8\xe3\xd8\x87\x9d\xea\x54\x1c\x1e\x9d\xe4\x9b\x4f\xed\xe5\ \xca\x95\x2b\x0a\x40\xd7\x75\x42\xa1\x10\x95\x95\x95\xea\x3a\x12\ \x89\x60\x18\x06\xae\x6a\x52\xf7\x2e\x6f\x81\x10\x4c\x66\x25\xf1\ \xa5\xad\x7c\xe7\xc0\x2f\x48\xe9\xf5\x24\x52\x39\x84\x6e\x81\x26\ \x48\xe7\x5c\x62\x71\x93\x54\x2a\x4f\x77\xde\xe5\x72\x55\x80\x8d\ \xad\x5b\xb8\xd2\xdb\xc7\x58\xb6\x8d\x99\xb3\x13\x18\x2a\x80\xfc\ \x22\x68\x4b\x4b\x8b\x3a\xb4\x84\x10\x54\x55\x55\x31\x91\x04\x6f\ \x4e\x96\x05\x10\x1a\x0c\xa7\x24\xbb\x5e\xfc\x31\xe1\x25\xcb\x18\ \xe9\x7c\x97\xa9\xfe\xcb\x18\x81\x0a\x5a\x5b\x36\xb0\x7c\xd5\xa3\ \xf4\x4e\x84\xb9\x31\x9c\x22\x36\x63\x32\x3a\x95\x61\xcc\xb3\x21\ \x1a\x99\x8a\x25\x68\x7f\x2c\x48\x43\x11\x40\xed\xde\xdb\x35\x75\ \x75\x75\x00\x0a\x2a\xe5\xa4\xbd\xd1\x96\x77\x34\x3f\x03\x1a\xb4\ \x44\x05\x9f\xbc\xfb\x06\x12\x8d\x8a\xc4\x20\x0d\x91\x20\x8e\xeb\ \x72\xb3\xe7\x24\x31\xb7\x8a\x75\xdf\x7a\x9e\x68\xdb\x37\xb8\xd8\ \x13\x67\xcc\xce\x90\x4a\xe6\x49\xa7\x2d\xcf\x36\x08\x40\x16\xcf\ \x04\xef\x0d\x51\x00\x85\xa3\x5e\x81\xf9\x8c\x3c\x42\x97\x77\xcf\ \xc0\xb2\x88\x20\x6f\x0f\xe0\xaf\x8c\x50\xb7\xb2\x96\x82\x58\xd1\ \x50\x45\x3c\x63\xd1\x7f\xea\x6d\x92\xf5\xff\xe1\xa1\x87\x5f\x20\ \x99\xf6\x61\x59\x0e\xb6\xe3\x2a\x1b\x3e\x0d\x69\xaa\x0c\x50\x22\ \x05\xa5\x4c\x71\xae\x5c\x06\x94\x1b\x22\x3e\x7c\xa1\x00\xa5\xaa\ \xad\xf4\xf1\x40\xd8\xcf\xd9\x2b\x67\x59\xff\xc8\x6e\x42\x41\x83\ \xac\x67\xdb\x96\x9e\x5d\x0c\x5d\x03\x50\x8d\x26\x28\x0a\x09\x08\ \x89\x2c\x66\x87\xbb\x66\x40\x59\xa8\x71\x9e\xce\x0f\xcc\x30\x38\ \x6b\xb1\xa3\xe3\x2d\x7a\x66\xa3\xe8\x81\x14\xc1\xa0\xae\x82\xdb\ \x96\x81\xcf\xd0\x50\xbb\x74\x5d\x24\x25\x92\x14\xe6\x16\x01\xd0\ \x34\x81\x50\x66\x9e\xfa\xa7\x52\xbc\xfa\x5e\x17\xfd\xb7\xd2\x88\ \x6a\x93\xe6\xfa\x0a\xb2\xa6\x43\xce\xb4\x31\xbd\x71\xd3\xea\x1a\ \xce\x9c\x28\x5f\x02\x60\xf1\x12\x08\xf1\xbf\x59\x28\x55\x6b\x53\ \x98\xd7\x77\xaf\x67\x28\x61\xa3\x37\xac\x66\xcd\xba\xaf\xa8\xce\ \x2e\x88\x33\x23\xd0\xd6\xd6\xb6\x30\x80\x5c\xac\x07\x16\x28\xc1\ \xe3\xad\xb5\x7c\x6d\x65\x84\x4f\x7b\x27\xf1\x3f\xb2\x8e\x1d\xbb\ \x5e\x54\x5d\x5e\xa2\x45\x00\x58\x30\x03\xca\x9a\x00\x41\x51\xae\ \x65\x92\x4f\x4d\x63\xcd\xcd\x60\x67\xe2\xe4\x66\x24\x86\x95\x29\ \xd9\xd1\xe2\x52\x60\x0b\x37\xa1\x50\x96\xd2\xc1\x31\x93\xe4\xe7\ \xbc\xa0\xa9\x69\x05\xa0\x40\x24\xc4\x73\x30\x38\x2b\x59\x3a\xe7\ \xde\x17\x80\x44\x02\x62\xe1\x0c\x64\xc6\xba\x01\x8a\x41\x4d\xc9\ \x68\x42\x72\x2d\xe6\x32\x96\x92\xe6\x60\xbe\x2e\xf1\xed\xaa\x15\ \x8d\xf7\x0a\xe0\x38\x8e\x32\x18\x0b\xbf\x86\x96\x03\x33\x59\x49\ \xff\x8c\xe7\x69\x97\x89\x39\x69\x4e\xa5\x65\xff\x6c\x56\xf6\x0f\ \xc7\x65\xcf\xba\x2d\xed\xeb\xab\x9b\x5a\x9f\x29\x02\x2c\x1e\x78\ \x7a\x7a\x9a\xd1\xd1\x51\x26\xd2\x41\x60\x59\xbc\x2c\xc0\xe4\x9c\ \xe4\xe2\xb8\x8b\x17\x84\x9b\x49\x19\xbf\x3d\x27\xfb\xc6\xe7\x64\ \xcf\xed\xb4\x9c\x00\xc6\x0a\x1e\x6f\x58\xde\xd6\xa4\x1b\x7e\x16\ \x03\x48\xa7\xd3\xea\x7f\x44\x57\x57\x17\x37\x06\x47\xd1\xaa\x57\ \x12\x69\xde\x0c\x1a\xef\x94\x03\x18\xfd\x74\xd8\xb9\xd1\x3d\x25\ \xc7\xc7\x53\xb2\xcb\x83\x19\x02\x26\x81\x71\x20\x0d\xf8\x00\x1d\ \x08\x5a\x79\xd3\x70\x1d\xa7\x1c\x80\xfa\x00\x99\x98\x98\x50\x3f\ \xcb\xdd\xdd\xdd\xc4\xd2\x3a\x81\x86\xb5\x54\xad\xde\x86\xe6\x0f\ \xfd\xde\xd2\x8c\xb7\xbd\xaf\xe3\x73\xe5\x00\xba\xfe\xd8\xe5\xfc\ \x04\x88\x01\x03\x80\x09\x84\x81\x4a\x20\xc0\x3c\x49\x0a\x00\x2a\ \xc5\x33\x33\x33\x5c\xbf\x7e\x9d\x4b\x97\x2e\x31\x3a\x3e\x4d\xde\ \xd7\x44\x45\xc3\x66\xfc\x75\x91\xb3\xae\x74\xde\x1b\xbe\x76\xee\ \x4f\x7f\xfd\xdd\x8f\x6e\x7b\xc0\x6e\xd9\xb7\xc0\x9b\xe8\x15\x42\ \x5c\x07\x34\x20\x50\x08\x9c\x07\x74\x40\x02\x4e\x61\x4e\xf7\xf9\ \x83\xb6\x44\x30\x33\x3b\xcb\xc4\xf8\xb8\x0a\x3a\x30\x34\x4a\xca\ \xae\x42\xaf\x6e\x41\x34\x3d\x3a\x66\xa5\x13\x1f\x0e\x9c\xfb\xe8\ \x83\x4b\xa7\xdf\xef\x03\xe6\x00\x93\x12\x19\xcc\x97\x2c\x06\x23\ \x07\x08\xc0\x29\x80\x18\x5f\x00\x04\x42\xb1\x91\x5b\x53\x5c\xfd\ \xec\x2f\x4c\x67\x03\xf8\xa3\xcd\x18\x8d\xdb\x11\x66\xf6\xd8\xd4\ \xad\xde\x63\xff\xfc\xf3\x2b\x67\x00\x0b\xc8\x01\x59\xc0\x06\x5c\ \x40\x2e\x08\x20\x3d\x09\x21\xdc\xc2\x02\x0a\x8b\xac\x02\xac\x5e\ \x00\xd0\xce\x7f\xf4\xeb\xdf\x44\x9f\x7b\x6d\x49\xa0\xf9\xbb\xbb\ \x2b\x73\x99\x13\x99\xe4\xf4\x89\x0b\x1f\xff\xf6\xe3\x81\xae\x4f\ \xe2\x85\x35\x4e\xc1\x56\xd1\xb8\xb2\xa4\x61\xfe\x0b\xaa\xd3\xe9\ \xaf\x70\x35\x30\x23\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\ \x82\ \x00\x00\x05\xbc\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x05\x83\x49\x44\x41\x54\x78\x5e\xb5\x57\x4b\x6c\x54\xd5\ \x1f\xfe\xee\x9d\x3b\x8f\x5b\x68\xe9\x50\x86\x3a\xd8\x48\xb5\x04\ \x4a\x78\x88\x0a\x21\xd4\x47\x5c\x28\x44\x43\x02\xc4\x05\x89\x1b\ \x16\xba\x91\x90\xb8\x71\xe5\x23\x3e\x12\x37\x24\xae\xdc\xb8\xd2\ \xb0\xd0\x95\x09\xff\xe4\xbf\x20\x04\x2b\x2a\x68\x95\x4a\xa0\xb4\ \x4c\xe9\x93\x96\x4e\x3b\xd3\xce\xab\xf3\xb8\xcf\x73\xef\x1d\xe7\ \x77\x72\x4f\x32\xc9\x64\x8a\x93\x8c\xbf\xe4\xcb\x79\x4c\xe6\x7c\ \xdf\xef\x71\x7e\x67\x46\xaa\x56\xab\x68\xc5\x9e\x3b\xfd\xe9\x4b\ \x00\x0e\x01\x08\xe3\xf1\x36\x06\xe0\xf6\x9d\xff\x7d\x5e\x40\x13\ \x53\x5a\x24\x0f\xc7\xb7\x47\x5f\xfd\xfe\xab\x0b\x1f\xaa\x11\x45\ \x05\x00\x49\x02\x37\x7f\x40\x40\x06\x84\x4f\xa3\xe3\xf3\x37\xce\ \x7f\x76\xe9\x0b\x00\x3f\xa1\x89\xc9\x68\xcd\xb6\x1f\x39\x38\xb0\ \xc3\x45\x40\xb5\x1d\xc0\x64\x80\xeb\x01\x8e\x0b\xb0\x1a\x3c\x0f\ \x60\x4e\x0d\xcc\x41\x49\x63\x38\x34\xf8\xd4\xcb\x1f\xbc\xf3\xe6\ \xbb\x35\xe1\xaf\xb5\x4b\x00\x1c\xc6\xc0\x4c\x8d\x7b\x1e\x52\x7c\ \xaf\x25\x0e\x61\xa8\x54\x2a\x28\x19\x0e\xf2\xc5\x0a\xde\x3a\x7e\ \xf8\xec\xeb\x2f\xee\x7f\x83\x52\xd7\x52\x0a\xde\xfe\xe8\xf2\xa1\ \xba\x25\x9f\xf7\xf5\xf5\x47\x97\x52\xeb\x83\xd7\xfe\x9c\x05\xf3\ \xb8\x76\x44\x42\x0a\x9e\x1f\x8c\xe3\xe9\x27\xa3\x10\x56\x2c\x95\ \x60\x4b\x1d\xe8\xea\xde\x86\xc2\x7a\x0e\x9f\x9c\x3f\xfd\x5e\x26\ \x5f\x36\x6b\x22\xee\xd5\xea\xa1\xd4\x4c\x80\x20\xa6\x93\xce\xbd\ \xb0\x37\x7e\x4e\xec\xed\x1f\x88\x75\xd3\xc8\x6c\xa6\xe8\xba\xb6\ \x65\x60\xe7\x76\x44\xbb\x54\x04\xe4\x2a\x6c\xe6\xe1\xc7\x9f\x13\ \x38\x31\xb4\x1b\xfb\x9e\x89\x81\x8c\x31\x06\xcb\x33\x41\x66\x07\ \xb6\x40\xd7\x75\xf5\xec\xc9\xa1\xc3\x77\x27\x17\xf7\x03\xf8\xe3\ \x71\x11\x38\x75\xee\xe4\xc1\xf7\x4f\x1c\x1b\xe8\xc7\x06\x66\x59\ \x16\x8a\xc5\x22\xfa\x7a\x7b\x70\xe6\x95\x7e\x8c\xdc\x5f\x46\x4f\ \x57\x04\xbd\x3d\x9d\x90\x24\x09\xa6\x61\x80\x2c\x10\x50\x90\xcd\ \x56\x90\xc9\x64\xe4\x7f\x5d\x03\x9a\xa6\x71\x2f\x36\x32\xc7\x71\ \xe8\xd0\x1a\x41\x00\xbb\x76\xf6\x62\x4f\xdf\x66\xdc\x4a\xac\x20\ \x95\x2d\x43\x8d\xa8\x98\x9f\xba\x83\xaf\x2f\x7e\x8c\x4b\xdf\x5c\ \x44\x72\x71\x9a\x6a\x47\xda\xa0\x06\x5a\x07\xf5\x0f\xc3\xf7\x52\ \x51\x14\x3c\xbb\x27\x8e\xc0\xdc\x1a\x6e\x4f\xae\xe0\xf8\xd1\x7e\ \x1c\x39\x3a\x84\xc1\xbd\xfb\xe0\x55\x65\x74\x76\x76\x62\xb5\xb2\ \x50\x6d\xab\x00\x21\x42\xd8\xa6\x4d\x9b\x70\x60\x57\x2f\xee\x4c\ \x4d\x60\x39\x67\xe2\x89\xde\x3e\xc4\x6a\xa0\xdb\x62\xdb\x0c\xa1\ \x50\xca\x6b\xab\x00\x59\x96\x79\x1a\x86\x87\x87\xa9\x16\xf8\xba\ \xa3\xa3\x03\xa6\xae\x08\x61\x9c\xdc\xb0\xa9\x5e\xa8\x57\xb4\xa9\ \x0f\x08\x84\x42\x21\xc4\xe3\x71\x9e\x86\x72\xb9\x4c\x35\xc3\x53\ \xe1\x54\x25\xe8\x26\x60\x3b\x1c\x30\x18\x40\x7a\x98\x0b\xb4\x35\ \x02\x54\x7c\x24\x80\xf2\x4b\x91\xa0\xb5\x6d\xdb\x98\x48\x27\xe1\ \x56\x79\x87\x84\xe9\x70\x72\x98\x5c\x44\x9b\x23\x40\x57\x2d\x1c\ \x0e\x63\xeb\xd6\xad\x88\xc5\x62\x88\x46\xa3\x3c\x05\x90\x02\x30\ \x98\xc4\x05\x04\xea\x4e\x37\xec\xb6\x0a\x68\x2c\x42\xaf\xea\xc1\ \xf3\x3c\x30\x62\x06\x50\x34\x78\x0a\xb8\x6d\x0e\x53\xdb\x6e\xb3\ \x00\x22\x17\xa3\xeb\xba\x90\x20\xf1\xb9\xc7\xf9\x29\xfc\x7e\x1a\ \x18\xf0\xa8\x00\x68\x36\xf0\x9f\x5c\x43\x02\x79\x2e\xd6\xb2\x2c\ \x41\xb3\x80\x80\xcd\x23\xc0\xbd\xf7\x78\x4d\xb4\x31\x02\xc2\x7b\ \x22\x16\x23\xed\xf1\x37\xc0\xf6\x38\xa1\xc5\x80\xbc\xc6\x53\xc1\ \xe7\x26\x6b\x73\x04\x28\xec\x44\x2c\x0a\x92\xe6\x74\x0d\x5d\x57\ \x46\x41\x03\x5c\x05\xe8\xd9\xcc\x3d\x47\x38\xd8\xc6\x6b\x28\xc2\ \x4e\xa4\x34\xd2\xa3\x24\x04\xf1\x74\x54\x5d\x44\x82\x40\xbc\x1b\ \xdc\xd2\x45\xa0\x33\x44\x51\xaa\xd2\x17\x1a\x05\xb4\x1a\x76\x41\ \x26\x42\x4e\xf7\x9f\x44\x04\x83\x41\x7a\xc4\xf8\x35\xac\x58\xc0\ \xec\x1a\x10\xed\x20\x72\x17\x77\x67\x73\x60\x96\x26\x79\x1e\x0b\ \xd4\x84\xcb\x74\x9c\x7f\x66\x55\x69\x35\xe7\x22\x02\xd4\x7c\x68\ \x4d\x22\x28\x1a\x14\x7e\xea\x8e\x24\x8e\x3a\x63\x39\xb7\x88\x5f\ \xc6\xc7\x90\x79\x94\x00\x24\xd9\xb4\xe4\xee\x05\xa3\xb4\x96\x06\ \x10\x24\x1f\xe8\x38\xfe\xbd\x56\x88\x69\xa4\x9e\x4f\x73\xd3\x34\ \x89\x94\x04\x50\x43\xa2\x91\xef\xcd\x8e\x5d\xc3\xc8\x95\x87\xc8\ \x96\xf4\x45\x25\xa4\x4e\x31\x44\x16\x59\x35\xb8\xc8\xcc\xd4\xf8\ \xcc\x8d\xef\x0a\x00\x22\x00\x98\x0f\x57\xd9\xa8\xc8\x88\x8c\x4c\ \xe4\x5c\xb4\x5c\xea\xff\xba\xae\x43\x55\x55\x12\xc4\x3f\x33\x74\ \x9d\xb7\x62\xe6\x38\xc5\xe5\x8a\xfa\x7f\xdb\xb2\xc7\xad\x7c\x7a\ \x41\xcb\x2f\xa5\x0a\xc9\x89\xac\xef\x75\x27\x00\x0b\x80\x21\x7c\ \x54\x9a\x79\x2e\x44\x08\xaf\xe9\x70\x91\x6b\x12\x42\xcf\x6f\xa9\ \x54\x12\x62\xc9\x7b\x1a\xa9\x35\xaf\x9b\xb7\x7e\xbb\xfe\xf0\xde\ \xf5\x19\x00\x9e\x8f\x2e\x00\x0e\x00\x5b\xd4\x9d\x2f\xc8\x91\xd1\ \x68\x44\x2a\x72\xcc\x51\x28\x14\x88\x80\x3c\xa6\x5f\xbc\x24\x90\ \xf6\xa8\xf7\x93\xf7\x24\x8e\xa3\x5c\x2e\x81\x31\xd3\x75\x99\x15\ \xf2\x43\xad\xfa\x88\xd4\x81\x3e\x0b\xfa\x42\x64\xa1\xa6\xa9\x08\ \xf2\x9a\x22\x10\x89\x44\xa8\xca\xc9\x73\xda\xe3\x8f\x4f\x32\x99\ \xe4\x7b\x73\x73\x73\x18\x1b\x1b\x83\x27\x29\xf6\x6a\x46\xb2\x2b\ \x85\xd5\x02\x1a\xac\x85\x3e\x20\x88\x2d\xd3\x44\x30\x14\xaa\x17\ \xc4\x09\x13\xf7\x13\x98\x7c\x30\x89\xf9\xf9\x79\xa4\x32\x45\xc3\ \xf2\x42\x65\x2b\x10\xcd\x9b\x0e\x56\xca\xf9\x95\x9b\xf9\xf4\x5c\ \xca\xbf\x6a\x9e\x80\x48\x81\x0f\xe6\xaf\xbd\x26\x11\x90\x28\xdc\ \x3c\xa7\x8c\x31\x1e\xf2\x44\x22\x81\xd1\xd1\x51\x4e\x9a\xce\x95\ \x35\x37\x18\xcb\xba\xe1\xf8\x3a\x0b\xef\x98\x35\xb4\xc2\x54\x6a\ \xf6\xee\xc8\xfc\xd8\x70\x12\xc2\x1a\x05\xb8\x44\x2c\x8a\x70\x43\ \x01\xba\xae\x61\x69\x69\x09\x0b\x0b\x0b\x9c\x78\x7a\x7a\x1a\xf9\ \x32\xab\x78\x6a\x7c\x15\x1d\x07\xf2\x88\x87\x1f\x58\xe5\xdc\xaf\ \xcb\x53\x7f\xfd\x9d\x18\xb9\x9c\x05\x20\xfb\x90\xea\x05\x10\xea\ \x05\xf8\x60\x02\x4d\x05\xcc\xcc\xcc\xe0\xf7\x2b\x97\xb0\x96\xd7\ \x2b\x91\x6d\xbb\xd3\xc1\xee\x63\xd9\xe0\xb6\xae\x09\x87\xd9\xd7\ \x4a\xb9\xe5\x91\xab\xdf\x5e\x10\xa4\x02\x92\x40\x83\x80\xe6\x42\ \x68\x5e\x15\x7f\xcf\x1b\xfe\x19\x01\x38\x05\x60\x16\xc0\x55\x00\ \x37\x7f\xf8\xf2\x4c\x5a\xaa\x99\x20\xf2\x89\xd1\x84\xbc\x5e\x04\ \x1a\x84\xd4\xb5\xe2\x7f\x00\x12\xab\x82\xc2\x52\x64\x01\xcd\x00\ \x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x06\xd2\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x06\x64\x49\x44\x41\x54\x58\xc3\xed\ \x56\x0b\x4c\x95\x65\x18\x46\xb4\x92\x72\x2e\x53\x67\x6e\xea\x32\ \x4d\x52\xcc\x4b\x4e\x41\x42\xa4\x04\x34\x38\x20\x77\xe1\x98\x5c\ \x04\x01\x15\x11\x31\xe0\x80\x5c\xbd\x00\x02\xde\x41\x44\x40\x49\ \x11\x6f\x04\x89\x01\x79\x03\x0b\x02\x2f\x28\x6a\x71\x92\x05\x23\ \xe1\x44\x63\xd0\xdc\x8e\xd2\x76\x36\xb6\xa7\xe7\x3f\x7c\x78\x41\ \x45\x72\x36\xb7\xd6\xd9\x9e\x71\xce\xff\xff\xef\xf7\x3e\xef\xf3\ \x3e\xef\xfb\xa3\x03\x40\xe7\x55\x42\xe7\x7f\x02\xff\x59\x02\x9f\ \xca\xe3\x66\x11\xbe\x44\x0a\x91\x21\x10\x43\xd8\xfc\x6b\x04\x78\ \xb8\x81\x48\x52\xee\x15\x9a\x57\x1f\x9a\x58\xdd\x1a\xb5\xad\xf1\ \x6e\x74\x8a\x4a\xbd\x71\xa7\x4a\x1d\x9f\xa6\xec\x08\x4d\x28\x6d\ \xe2\xfd\x3c\xc2\xe1\xa5\x11\xe0\x61\x16\x52\x85\xf2\xb5\xd9\x4a\ \x45\x92\xb2\x63\x7d\x82\xa6\xcb\x53\x01\x38\x04\x00\x8b\x7c\x00\ \x73\x77\x60\xa1\x27\xe0\xb2\x1a\x88\x4a\x01\x72\x0b\xda\x3b\xad\ \xbd\x93\x6b\x19\x33\xee\xa5\x24\xf6\x0c\xc9\xab\x0f\x4b\x52\xa9\ \x7d\xa2\x00\x1b\x26\x9d\xef\x0d\xcc\x5e\x06\x4c\x77\x03\xa6\x3a\ \x03\x93\xed\x81\x49\xd6\xfc\x2e\x03\x2c\x3d\x80\x2d\x7b\x80\x1d\ \xd9\xb5\x6d\x8c\x0d\x7e\xd1\xc4\xe3\x08\x85\x54\x71\x18\xe5\xf5\ \x8a\x04\xac\xd6\x00\x9f\xac\x60\x62\x26\x9f\xe3\x47\xac\x22\x48\ \x66\xb6\x3f\x30\x8d\xd5\xeb\xbb\x02\x13\x6d\x81\x19\x8e\x80\x37\ \xd5\xc9\x2f\xd1\x74\x49\xad\x7a\x91\xe4\xab\xad\x96\x27\xd7\x06\ \xc7\xd7\xb6\xf9\x6f\x04\x64\x6b\x01\xd3\x95\x80\x31\xe5\x35\x5d\ \x4f\x22\x31\x94\x9a\x32\x7b\xec\x02\xdc\x77\x03\x4e\xc9\x94\x9f\ \xca\x18\x91\xe0\x54\xb6\x62\x06\x89\xc8\x43\x80\x63\xdf\x02\x52\ \x1b\xfe\x71\xd5\xbe\x11\x85\x0d\xeb\x93\x35\x5d\x4e\x3c\xe4\x33\ \x1e\x6a\x12\xc8\xbf\xac\xc8\x2e\x11\xf0\xcb\x04\x62\xbf\x06\xd2\ \xce\x03\x5f\x55\x02\x99\xdf\x03\xf1\x45\x80\x2f\xaf\x5b\x91\xac\ \x21\x9f\x9f\x43\x95\x96\x46\x90\x40\x09\xe0\x1f\x99\x57\xdf\xdf\ \xe4\x0e\xd6\x52\xd5\x09\xb5\x6d\x2b\xe2\x68\xac\x75\xec\x73\x50\ \x77\xe2\xc5\x4c\xec\x9b\x05\x6c\x66\xa2\x23\x97\x81\x1f\x1a\x80\ \xd3\x97\x54\xea\xe4\x9c\xf2\xe6\x80\x4d\x79\xf5\xf1\x39\xd5\xad\ \xc9\x67\x81\xe5\xfb\x80\x05\xd1\x8c\x09\x66\xe2\xad\xc0\xa9\x72\ \x80\xe7\xd6\xf4\x4b\x72\x87\x95\xa9\xb7\xc2\xb6\xb5\x77\xba\x92\ \xb9\x39\x0f\x30\x0b\x63\x45\x5b\x28\x73\x3a\x10\xce\x8a\x0f\x54\ \x01\x15\x8d\x40\xe9\x55\x95\xda\x2d\x28\xf5\x96\x98\x79\xb9\xd8\ \x05\x31\xc9\x27\x38\x7e\xc7\x01\xc7\x6d\x80\xfd\x26\x4e\x02\x09\ \x9f\xf9\x51\x78\xe0\x91\xd9\x35\x78\x4a\x72\x85\x07\x1d\x1e\x94\ \xa4\xe9\xb2\x0b\x65\x72\xca\x6e\x11\x0b\x38\xef\x00\x02\x8e\x00\ \xdb\x2f\x00\xc5\x75\x40\x65\xbd\x5a\x13\xbe\xb3\xb0\x41\x24\xb6\ \xe8\x75\x86\x59\x50\x52\x61\xc3\x16\x4a\xee\x99\xc1\xea\xf7\x92\ \x30\xbf\x67\xe6\x2b\x3b\xa4\xbc\xd2\x03\x31\xfb\x72\xbb\x7f\xf4\ \x90\xe8\xe9\xf7\xca\xe8\xd2\xa6\x55\x94\x58\xc6\x8a\xcd\xc3\x69\ \x9a\x04\x56\xcd\x7e\x6e\x38\x05\xe4\x5c\x01\xaa\xee\x00\x45\x55\ \x8d\x77\x6d\x7c\xb5\x33\xed\xfe\xac\x8d\xe8\x1f\x97\x57\x9f\x72\ \x0e\x58\x97\xc7\x11\xcc\x07\xca\x6a\x69\xd4\x35\x5a\xa5\x0c\xa4\ \x07\x6a\xca\x68\x98\x3d\x39\x0f\x49\x48\x7f\x43\x92\xd9\xef\x78\ \x26\x67\x62\x0b\x3a\xdb\x9e\x55\xfb\xe5\x02\x89\x34\x58\x01\xab\ \xbe\x7a\x47\xd3\xb5\x79\xbf\x76\xab\x49\xab\xd6\xa8\x8f\x16\xca\ \x63\x33\xcb\x9b\x77\x96\x01\x09\x74\x7e\xc1\x25\x60\xef\x31\xed\ \x0e\x50\x68\x37\xa1\x44\x20\xfd\x10\xb0\x91\x63\x13\x9a\xa8\x25\ \x51\x14\x18\xaf\xec\xf0\x64\x8f\xad\xa5\xf9\xde\x0c\xb8\xa6\x01\ \x6b\x4f\x02\xbb\x2a\xd8\xbb\x5f\x81\x4b\x8d\x6a\x8d\x4f\x64\xb6\ \x52\xf2\x47\x3f\x3c\x94\x92\x5e\xdc\x78\x37\x83\xb1\xc7\x98\xfc\ \xfc\x35\xb5\x46\xe6\xd3\xbd\x05\x1f\x10\x88\x92\xcc\xc1\xa3\x16\ \x73\x4c\x5c\x14\x6a\x8d\x23\x2b\x96\xd1\xed\xb6\x49\xc0\x32\x4a\ \x1e\x42\xc9\xf7\x4b\x0e\xa7\xe4\x95\xb7\xdb\x3b\xfb\x92\xbc\xf7\ \xbb\x61\x09\x4d\x79\xea\x67\x56\x4e\xd9\x2b\x94\x9a\x2e\xaf\x30\ \x2d\xf1\x07\xb1\x5a\x02\x21\x5c\x16\x66\x3e\xdd\x5b\xcc\x8c\x2e\ \x5f\x18\xdb\x2d\xb9\x57\x0e\x10\x41\xc3\x1c\xbc\x06\x54\xab\x80\ \x93\xe5\xca\x0e\xdb\xee\xe4\x0e\xfd\x1c\xdf\x98\x83\xa5\xca\x8e\ \x0b\xb7\xd9\xb2\xdf\x80\x98\x54\x6d\xcb\x1e\x53\x4d\x4b\x40\xc1\ \xdd\x6c\xce\xb9\x36\x22\xcc\x99\xdc\x81\xed\xf0\x3a\xcc\xe4\xa5\ \x40\xd6\x75\x4a\xfe\x3b\x57\xe7\xc5\xc7\x8d\xda\x9f\xdd\xe1\x1d\ \x91\xad\xbc\xc9\xd8\x9b\x24\x1f\x9b\xa6\x4d\xae\x78\xe2\xff\x01\ \x89\x40\xec\x01\x6e\x32\x4a\x6e\xc9\x7e\x3b\xa6\x32\x39\xcd\xb6\ \x8e\x86\xd9\x5e\xcd\x31\xe3\x7c\xef\x2b\xa8\x6e\x35\x73\x8b\x89\ \x33\x75\x89\xf8\x48\x47\x47\x67\x20\x31\xe8\x19\x90\xee\x0d\x34\ \xb2\x09\x1c\x29\xbd\x72\x2f\xfe\xd4\xde\x59\xd7\xfa\x30\xb9\xce\ \xd3\x3e\x12\x81\x44\x1a\x6c\x19\xe7\xd3\x85\x8b\xc5\xe7\x28\x0d\ \xc7\xe4\xb1\x5c\xa3\xe9\xec\x5b\x6e\x95\x4a\x3d\xdf\x35\x3a\xcb\ \xc8\x36\xe8\x63\x3e\xae\x47\xbc\x49\xbc\xf5\x0c\x48\xf7\xf4\xe6\ \xb9\x6c\x58\x9d\x7a\xbc\xea\x8f\x6b\x4d\x9a\xae\xe5\xe1\x59\x4a\ \x33\xb7\xe8\x0d\x82\x9c\x2e\x31\xe0\x09\x02\xd9\x17\xba\x37\x5a\ \x70\x21\xb7\x14\xd7\x66\x02\xc7\x72\x37\xa5\x3f\xf4\x0b\x67\x96\ \xf2\x9d\x28\xaf\xfb\xd3\xc4\x31\x2c\xe9\x43\x23\xbb\x99\x0c\x19\ \x45\xbc\x2b\x30\x5a\xa0\xe7\xf7\x28\x43\x59\xc0\xd2\xd8\xb4\xe2\ \xe6\xb2\x1b\xed\x7f\xb9\x04\xee\xae\x33\x71\x52\x7c\xc9\xeb\x43\ \x88\xc1\xc4\xeb\x42\x29\xdd\xc7\x08\x54\xd4\x73\x44\x6a\x98\x90\ \x49\x8f\x73\xc6\xbf\xe1\xa8\x9d\x6e\x02\xce\xb5\x00\x57\xda\x80\ \x26\x35\x5f\x2e\xc5\x35\x1d\x73\xac\x03\x12\x19\x32\x99\x98\x42\ \x18\x10\x53\x05\xa4\xef\x53\xde\x9f\x6e\xfe\xb9\x67\x68\x46\xc3\ \xae\xbc\xca\xb6\x79\x4e\x8a\xa2\x59\x8b\x7c\xfd\x78\x7d\xac\x20\ \x37\x9c\x18\x2a\x54\x7c\xed\x01\x09\x69\x7d\x96\x5c\x56\xa9\x89\ \x7b\x25\x57\x5b\xee\x7d\x77\xbd\xe5\xde\x99\xeb\x2d\xf7\xcf\xd6\ \x12\x37\x5a\xee\x9f\xbf\xd1\xdc\x29\xe1\x5c\x6d\x73\xa7\x67\x68\ \x7a\xd3\x98\x49\x86\x4b\x19\x66\x26\x85\xf6\x82\x74\xcd\x74\x8c\ \xbe\xa1\x7c\xc6\x02\xcf\xad\xc3\x46\x8d\xb7\xe0\xef\x59\xc4\x34\ \x41\x7a\xbc\x50\xeb\x6d\x41\x62\x90\xb6\x1d\x34\x97\x25\x7b\x94\ \x65\xba\x24\xf2\xe0\x3c\xe7\x88\xc3\x26\x0e\xa1\x47\x8d\xed\x82\ \xf3\xe7\xda\x06\x15\x1a\xda\x04\x9e\x36\x94\xad\x29\x36\xb4\x0e\ \x28\x95\x30\x61\xa6\x65\x34\x83\xec\x09\x47\xc2\xa9\x17\x1c\xc5\ \xbd\xc5\x84\x8c\xb0\x22\x2c\x05\xb1\xb9\xc4\x74\x62\xa2\x50\x43\ \x52\xe2\x8d\x1e\x15\x06\x8a\xfe\x0c\x13\x72\x49\xf2\x1a\x11\x0b\ \x08\x6b\x71\xa8\x33\xe1\x4a\xc8\x89\x2f\x08\x77\xc2\xa3\x17\xdc\ \xc5\x3d\xb9\x78\xd6\x59\xc4\x5a\x8b\xb3\x8c\xc4\xd9\x63\x45\xae\ \xc1\x22\xf7\xab\x27\xa0\x2b\xe4\x18\x2a\xe4\x99\x28\xe4\x9a\x2b\ \xe4\xb3\x14\x72\xca\x84\xbc\x2f\xbd\x05\x03\x84\x21\xf4\x84\x41\ \x46\x0b\xc3\x4c\x16\x06\x92\x8c\x64\x48\x18\x13\x26\x92\xd1\xfa\ \x32\xa1\x78\xc6\x58\xc4\x3c\xdf\x84\xe2\xa3\x2b\x46\x43\x4f\xb0\ \x1b\x2e\x98\x4a\x72\xbd\x47\x4c\x20\x3e\x20\xf4\xfb\x1a\x43\x71\ \x4f\x5f\x3c\x3b\x41\xc4\xf6\x3d\x86\x8f\x7c\x74\x05\xab\xd7\x45\ \x7f\x86\x88\x00\xa9\x5f\xef\x10\x23\x88\x91\xcf\x5b\x44\xe2\x99\ \x11\x22\x66\x98\x38\xe3\x89\x45\xd4\xf3\x2e\xf8\x1b\x95\x0d\x18\ \x5b\x26\xd0\x37\x16\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\ \x82\ \x00\x00\x04\xbf\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x04\x86\x49\x44\x41\x54\x78\x5e\xed\x97\x4b\x68\x5c\x55\ \x1c\xc6\x7f\xe7\x3e\xe6\xce\x9d\x4c\xdb\x74\xa6\x51\x62\x1f\x31\ \xb5\x3e\xaa\x56\x14\x6d\x4b\xc5\xa0\x45\x5c\x88\x42\xd7\x45\x44\ \x5d\x98\x4d\x57\xd2\xba\x13\x44\x5c\x88\xa5\xd2\x45\x49\x17\x51\ \x5a\xdc\xb9\x11\x8a\x62\x17\x15\x74\x40\x25\x62\x6c\xa8\x24\xe9\ \xcb\x3c\x6c\x4c\x5b\xd3\x47\xd2\xc9\x64\x3a\xaf\x7b\xef\xf1\xe4\ \xdc\x99\x0c\x32\x99\x6b\x4b\x07\x5d\xe8\x07\x3f\xce\xdc\x33\x7f\ \xbe\xf3\xdd\x73\xce\x7d\xf1\x9f\x97\xa0\xaa\xde\xde\xde\x97\x80\ \xad\xfc\x33\x1a\xec\xef\xef\xff\x0a\xc0\xa2\xae\xad\x9d\x6b\x37\ \xbc\xbb\x71\x63\x37\xa6\x69\x72\xfa\xa7\x32\x67\x06\x0b\x2c\x64\ \x7d\xee\x44\xc9\x55\x26\x9b\xb7\xba\x3c\xbc\x2d\x86\xef\xfb\x4c\ \x4c\x4c\x72\xf9\xe2\xd4\x7b\x40\x43\x00\xbe\xf9\x36\xc3\xf0\xe8\ \x19\x52\xa9\x35\x5c\xb9\x60\xf1\xc6\xbe\x67\x68\x85\x8e\xf6\x7f\ \xcf\x95\xa2\xc7\xc0\x0f\x19\x52\xe9\x0e\x36\x3f\xb0\x11\x80\x86\ \x00\xb6\x65\xd3\xde\x9e\x22\xbd\xa6\x03\xd7\x74\x89\xc7\xe3\xb4\ \x42\x5d\xf7\xdd\x43\x62\x55\x41\x9f\x98\x1a\x03\x60\xf9\x00\x31\ \x27\x8e\xeb\x26\x48\x24\x92\x38\x66\x1b\xe7\xce\x8d\x83\x65\x81\ \x1d\x03\xc7\x41\x25\x02\x55\xa3\xdb\x98\xa3\x88\x85\xff\x7b\x1e\ \x94\xcb\x8a\x12\x14\x8b\x50\x52\xe8\xb6\x04\x95\x32\xab\xd3\x2b\ \x31\x1d\x93\xc7\x1e\x7f\x8a\xf1\xb1\xf3\xcd\x03\x18\xa6\xa1\xb0\ \x14\x26\xea\x80\xed\xdb\x9f\xc4\xda\xb5\x0b\xb9\x76\x2d\x48\x89\ \xc8\xe5\x08\x76\xec\x20\xd8\xb3\xa7\xde\xef\xfb\x3a\x9c\xbf\x77\ \x2f\x74\x75\xa9\xfe\xdd\x61\x3f\x84\xfd\x07\x0f\x72\xe2\xc4\x19\ \xed\x19\x7a\x8b\xe6\x01\x02\x3f\x50\xf8\xf8\x9e\x22\xf0\xf4\x12\ \xf8\xed\xed\x58\x47\x8e\x22\x90\xc8\xb9\x59\xfc\x37\x7b\x71\xf6\ \xed\xc3\x53\xfd\xf6\xd1\x23\x48\x40\x9e\x1c\xc2\xfc\xe8\x00\xc6\ \xc7\x9f\xe8\x7a\x5b\xd5\x4b\x01\x02\x00\x89\xa7\xbc\x4c\xe5\x1b\ \x68\x64\x44\x00\x29\xf1\x03\x3f\xc4\xf3\x19\x19\xf9\x8d\x4d\xd7\ \x66\xc9\xbf\xf2\x2a\xc2\x10\x04\x2a\xd0\xf5\xb7\xde\xe6\x66\x60\ \xd0\x2d\x04\x93\xc9\x95\x60\x5b\xf0\xec\x73\x74\xef\xdf\xcf\xa4\ \x34\xd8\x74\x23\x4b\xfe\xb5\xd7\x21\x08\xc8\x6d\xdb\xc1\xdc\x0b\ \x2f\x6b\x2f\xac\xd0\x37\x90\x11\x01\x64\x20\x09\x34\x01\x81\x0c\ \xe8\xe9\x79\x82\xb9\xbb\x3b\xe8\x3c\xfe\x25\x35\xdd\x4b\xa8\x39\ \xc3\xa0\xc7\x32\x41\x4a\x2a\x43\x27\x29\x74\x77\xd3\xb3\x7a\x25\ \x73\xe9\x14\x9d\x5f\x1c\xa3\x2e\x18\x1d\x9e\x42\x04\x81\xf6\x96\ \x41\x44\x00\x90\x21\x32\xc4\x71\x1c\x84\x10\x61\x0b\x48\x04\x08\ \x89\x40\x40\x36\xcb\xfc\xee\xdd\xba\xce\x48\xa7\x49\x7d\xb8\x1f\ \xb3\x5a\x1f\x77\xe2\x48\x21\x41\xa2\x6b\x6b\x7e\xa0\x89\x0a\x20\ \x42\x44\xc8\xc9\x91\x29\x64\xdf\xa7\x4c\x4f\xfc\x01\x31\x1b\xe5\ \x0c\x8e\xad\x88\xc1\xd0\x29\xb0\x6d\x85\x09\x9e\x8f\xac\x78\x88\ \x62\x19\x8e\x1d\x67\xfa\x5a\x0e\xd4\x6f\x59\xae\x20\xca\xde\x92\ \x1f\x68\x9a\x07\x10\xa2\x86\x20\xd9\x6e\xb3\xf3\xe9\x47\xb9\x25\ \x99\x66\x18\x2a\x99\x60\x39\x9d\x1a\x1c\xa2\x58\x14\x35\xff\xe6\ \x01\x10\x02\xa1\x31\x58\xbf\xbe\x03\xdb\xb6\x69\x81\xb4\xd7\xd8\ \x58\x4e\xfb\x22\x22\x67\x40\x60\x18\xa6\x42\x90\x70\x5d\x7e\x3e\ \x75\x9a\x55\x2b\x92\xfa\xfe\x70\xfb\x0a\x2f\xeb\x6c\x6e\x41\x7b\ \x19\x86\xa1\x11\x51\x01\x0c\x21\x10\x86\xd0\x85\x17\x2f\xcd\x70\ \xf5\x7a\xb6\x1a\x0c\x90\x20\xa1\xe1\x58\x84\x7b\x4c\x4b\xd0\x28\ \x09\x94\x4a\x45\x4c\xc3\x08\xbd\xa3\x02\x84\x05\x3a\xa9\xc2\xd4\ \x4f\xc5\x56\xc8\x54\x5e\x42\xa1\xbc\x55\xfb\xb7\x4b\x60\xe8\x81\ \x2f\x4c\x8e\x31\x3d\x3d\x45\xa1\x90\xe7\x4e\xe4\xba\x6d\xac\x5b\ \xb7\x81\x74\xc7\x5d\xb7\xb2\x04\x46\x18\x40\x11\x48\xc9\x07\xef\ \xbf\xc3\xfc\xfc\x3c\xf9\x7c\x9e\x4a\xa5\xb2\x14\xd0\xb2\xac\x25\ \x6c\xdb\xd6\xad\x0a\xad\xc3\x03\xfa\x46\x56\x2e\x97\x97\xf8\xec\ \xf3\xe3\xda\x53\xa1\xc7\xa8\x0b\x8c\xc6\x19\x10\x08\x55\xb8\x3a\ \x95\xa6\xa6\x81\x81\x01\xfa\xfa\xfa\x38\x7c\xf8\x30\x87\x0e\x1d\ \xd2\xc7\xb7\x21\xed\xa5\x3c\x15\xfa\x2a\x8b\x0a\x50\xdf\x84\xae\ \xeb\x52\xd3\xc8\xc8\x08\xa9\x54\x8a\x74\x3a\xad\x19\x1e\x1e\x26\ \x4a\x52\x4a\xea\x42\x7b\xd5\x4e\x4c\x44\x5f\x86\xb5\x65\x10\x48\ \x59\x2f\x4c\x24\x12\xfa\xc9\x58\x9d\x62\xdd\x46\xa8\x61\x90\xb0\ \x5e\x52\xed\x8d\x98\x01\xaa\x09\x17\x43\xd4\x4d\xea\x9b\x27\x34\ \xbf\xfd\xab\x43\x82\x44\x11\x3e\xe4\xa2\xee\x84\x20\xaa\x80\xa0\ \x55\xf2\x03\x4f\xbf\x0b\x94\xcb\x25\x4d\xd3\x19\xf0\xbc\x32\xa5\ \x52\x89\x52\xb1\xa8\x77\x76\xcb\x24\x21\xb7\x90\x63\x66\xe6\x32\ \x37\xe6\x66\x9b\xcf\xc0\xcd\x85\x9b\xcc\x67\xb3\x38\x4e\x9c\x15\ \xc9\xb6\x16\x06\xf0\xb9\x30\x3e\xc6\xd8\xf9\xb3\xb4\x25\xdc\x0c\ \x30\xb8\x6c\x80\x42\xa9\xc0\xd5\xab\x33\x78\xbe\xa7\x03\x64\xbe\ \xfb\x91\x64\x32\xc9\xce\xe7\x5f\x6c\x78\x8e\x4f\x4d\xcf\xd0\x5c\ \x02\x89\xc4\x57\x3e\xb3\xb3\x37\x50\xdf\x01\x8c\x8e\xfe\x42\x3c\ \x66\x67\x1e\x7a\xf0\xfe\x03\x40\x66\xd9\x00\x97\xa6\x7f\xe7\xd7\ \xb3\xa7\xf5\xa6\xfb\xda\xb2\xf4\x86\xbb\x13\x49\x19\xbe\x5d\xf9\ \x9e\x47\x57\x57\x57\x66\xcb\x96\x47\xf4\xe0\xea\xab\x28\xff\x6f\ \x7c\x9a\x0d\xd6\x07\xaf\xeb\x7f\xfd\x09\x8d\xfd\xd4\x8a\xd6\x19\ \x48\x3f\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x06\x7e\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x06\x45\x49\x44\x41\x54\x58\xc3\xc5\x57\x79\x50\xd5\x55\ \x14\xfe\x3d\x78\x8b\x5b\x91\xcb\xa4\x19\x0a\xa8\x21\xe6\x08\x82\ \x21\xb2\x48\xa1\x52\x9a\xe2\x40\xb8\xc5\x26\x25\x0a\xa5\xe8\x28\ \x28\x35\x28\x04\x62\x46\xac\xef\xb9\xa0\x82\x90\xca\xa2\x20\xc3\ \x08\x6a\x21\x20\x13\x30\x88\x06\x21\xbb\x3a\x98\xd8\x60\x8e\xd3\ \x1f\x2d\xc8\xa8\x85\xef\x74\xbe\xdf\x5c\x8c\x99\xca\x1e\x96\xf5\ \x66\xbe\xb9\x9c\x73\xbe\x73\xee\x77\xd7\xdf\x45\x22\x22\xe9\xff\ \xc4\xe3\x83\x92\xa4\x60\x4c\x66\xb8\x31\x7c\x18\x1b\x18\x11\xa2\ \xf5\x11\x7e\xc4\x15\xff\xaa\x00\xd1\xf1\x24\xc6\xd2\xe5\xcb\x97\ \x1f\x48\x4b\x4b\x3b\xcf\xbf\xce\x8e\x8e\x8e\x9f\xbb\xbb\xbb\xf5\ \x68\x61\xc3\x8f\x38\x78\x82\xaf\xf8\xc7\x02\xf8\x67\xc4\xb0\x73\ \x75\x75\x8d\x4a\x4f\x4f\xaf\x69\x6b\x6b\xeb\x61\xd0\x99\x33\x67\ \x28\x2a\x2a\x8a\x42\x43\x43\xe5\x16\x36\xfc\x88\x83\x07\x3e\xf2\ \x90\xff\xc4\x02\x44\xe7\xb3\x3c\x3d\x3d\xb5\xc5\xc5\xc5\x57\x5b\ \x5b\x5b\x29\x33\x33\x93\x56\xf9\x07\x5e\xb7\x5b\xb8\xa2\x72\xc2\ \xe2\xf7\x4e\x8e\xf0\x8a\x3e\x8a\x16\x36\xfc\x88\x83\x07\x3e\xf2\ \x90\x3f\x18\x11\x7f\x58\x6f\x27\x27\xa7\x98\xa2\xa2\xa2\xab\x8d\ \x8d\x8d\x14\x1d\x13\x7b\xc7\x79\x59\x50\x99\x89\x4f\x42\x96\xe4\ \x9f\xa1\x95\xd6\xe4\x24\x4b\xeb\xf2\x13\xe5\x96\x6d\xf8\x11\x07\ \x0f\x7c\xe4\x21\x7f\x30\xfb\x62\xa0\x00\x25\xc3\x5b\xab\xd5\xd6\ \x36\x37\x37\x53\xaa\x6e\xcf\x1d\x87\xc0\xc8\x02\x69\x75\x66\xaa\ \xb4\xe1\xf4\x27\x52\xc4\x85\x58\x29\xba\x25\x4a\x8a\xbd\xb2\x43\ \x6e\x61\xc3\xcf\x71\xf0\xc0\x47\x1e\xf2\x51\x07\xf5\x0c\x16\x20\ \x46\x6f\xe5\xe1\xe1\x71\xb8\xb6\xb6\xf6\x6e\x49\x49\x09\xbd\xbd\ \x65\xe7\x39\xe9\xdd\xec\x64\x69\x6b\xf5\xce\xb1\xa9\x5d\x31\x2b\ \x8b\x7f\xd0\x45\x5d\xb8\x77\x64\x7f\xf3\xaf\x05\x68\x61\xc3\x8f\ \x38\x78\xe0\x23\x0f\xf9\xa8\x83\x7a\x86\xcc\x42\xbf\x00\x63\xc6\ \xc2\xb8\xb8\xb8\xea\x86\x86\x06\x4a\xd2\xed\xbf\x3e\x36\xe4\xf0\ \x21\xb9\x78\xfc\xad\x0f\x03\xca\xee\xeb\x74\x2d\xfa\xbc\xd4\x16\ \xca\xe9\x07\x6c\xf8\x11\x97\x45\x32\x1f\x79\xc8\x47\x1d\xd4\x43\ \x5d\x43\x05\xa8\x19\x6b\x72\x73\x73\x6f\xd4\xd5\xd5\xd1\x96\xf8\ \xb4\x0a\x4c\xef\xb4\xb4\x9b\xbb\xc3\xaa\xef\xa7\x9f\xbf\x45\x55\ \x95\xb7\xa8\xba\xa2\x9b\xbe\xec\x07\x6c\xf8\x11\x07\x0f\x7c\xe4\ \x21\x1f\x75\x50\x0f\x75\x0d\x15\x30\x94\xf1\x41\x69\x69\x69\x4f\ \x55\x55\x15\xbd\xb9\x3d\x33\x0f\x6b\xbc\xa9\xfc\xc7\xc3\x92\x55\ \x10\x59\x2e\xd9\x45\x2e\x01\x3a\x9a\xe3\x9b\x42\x0e\x3e\x29\x72\ \x0b\x1b\x7e\xc4\x65\x1e\xf3\x91\x87\x7c\xd4\x41\x3d\xd4\x35\x54\ \xc0\x30\x46\x5c\x79\x79\xb9\xbe\xa6\xa6\x86\x26\x87\x9d\x38\x88\ \x8d\x96\xd4\x70\xef\x84\xe4\x7e\x92\xd4\x2b\x9b\x68\x74\x60\x2b\ \x99\xae\x6b\xa3\x49\xef\xb7\xcb\x2d\x6c\xf8\x11\x97\x79\xcc\x47\ \x1e\xf2\x51\x07\xf5\x50\xd7\x50\x01\xc3\x19\x91\x3c\x75\x3d\xf5\ \xf5\xf5\xe4\x93\x7a\xfa\x18\x76\x7b\x78\xcd\x2f\x87\x24\xef\xcb\ \x24\xad\x65\xd2\x1a\xc6\x3b\x03\x00\x1b\x7e\x8e\xcb\x3c\xe6\x23\ \x0f\xf9\xa8\x83\x7a\xa8\x3b\x98\x19\x58\x9f\x98\x98\x78\x13\x9b\ \x48\x9b\x5f\xf6\x05\x46\x34\x23\xfb\x6e\xec\xb6\x3a\x3a\x18\x56\ \x4d\xa7\x83\xca\xa8\x7c\x5d\x05\x9d\x0b\x66\xa0\x85\x0d\x3f\xe2\ \xe0\x81\x8f\x3c\xe4\xa3\x0e\xea\x0d\x66\x06\xb0\x07\xbc\x43\x42\ \x42\x2e\xf0\x31\xa2\xca\x9a\xba\x6b\x93\x3f\xbe\x98\x24\x25\x7f\ \x1f\x21\xa5\xf5\x85\x49\x09\x94\x29\x23\x91\x32\x1e\xa1\xdf\x87\ \x38\xf3\xc0\x47\x1e\xf2\x51\x47\xdc\x05\x43\x07\x73\x0a\x5e\xb1\ \xb7\xb7\xcf\xcd\xc8\xc8\xe8\x6d\x6a\x6a\x22\x6d\x51\xcd\x29\x29\ \xee\x7a\xa4\xb4\xef\x5e\xb8\x94\x42\xa9\x52\x3c\xe5\x49\x9f\x52\ \xce\x23\xc0\x86\x1f\x71\xe6\x81\x8f\x3c\xe4\xa3\x0e\xea\x0d\xe6\ \x14\xe0\x1e\x78\x8e\xb1\xd6\xd7\xd7\xb7\x81\xef\x75\xaa\xff\xfa\ \xf2\xed\x2d\x79\x5f\xa5\xcb\xe7\x5c\x77\x2f\x52\x4a\xd6\x27\xf3\ \x88\xb3\xb8\xe3\x7c\xb9\x85\x0d\x3f\xc7\xc1\x03\x1f\x79\x3e\x3e\ \x3e\x8d\xa8\x23\xea\x19\x0f\xe6\x26\xc4\x32\x38\x58\x58\x58\xe8\ \x78\x0a\x6f\x54\x56\x56\x52\x53\x4b\xeb\x77\x19\x15\xcd\x85\x96\ \x7b\xbf\xd9\x2d\x2f\x87\xae\x67\xab\xb4\xef\x7e\xb8\xdc\xb2\x0d\ \x3f\xe2\x97\x9b\x5b\x6e\x83\x1f\x1c\x1c\xdc\x6b\x6e\x6e\x7e\x91\ \xeb\x04\x30\x5e\x34\xf8\x26\x1c\xf0\x2d\x30\x61\x2c\xb6\xb2\xb2\ \x3a\xe6\xe7\xe7\x77\x23\x3f\x3f\x9f\xda\xdb\xdb\xa9\xb1\xed\x6a\ \xc7\xf1\x9a\x8e\x53\xa1\x85\x57\x0e\xd8\xec\xbf\x16\x8f\x16\x36\ \xfc\x88\x83\xc7\xfc\x5e\x2f\x2f\x2f\xf2\xf7\xf7\xff\xc9\xc4\xc4\ \x24\xd7\x7a\x9c\xd1\x51\x3c\x58\x06\xfb\x35\xc4\x5e\x18\xcd\x58\ \x62\x6a\x6a\xba\xcf\xc5\xc5\xa5\x91\x67\xa3\x97\x8f\x15\xe1\x43\ \xd3\xd9\xd9\x49\x5d\x5d\x5d\x72\x0b\x1b\x7e\xc4\x99\xd7\xc4\xfc\ \x4b\xe8\x9c\x6d\xda\xf8\xc6\xd4\x07\x47\xbc\x34\x0f\x97\x4d\x57\ \x96\xfc\x9d\x88\x3f\x7b\x0f\x68\x84\x08\x57\x46\xa8\x99\x99\x59\ \xa1\xb5\xb5\xf5\x25\x47\x47\xc7\x6f\xdd\xdc\xdc\xee\xba\xbb\xbb\ \xeb\xd1\xc2\x86\x1f\x71\xf0\x18\x41\x3c\xf2\xe3\x81\x73\x2d\x1f\ \xc4\xbf\xaa\xa2\x03\x8b\xd4\x94\xcd\x22\xfc\x6c\x94\x39\x8f\x13\ \xf1\x57\x2f\x22\xb5\x58\x0e\x53\xc6\x02\x71\xaf\xe3\x62\x49\x60\ \xec\x65\x24\x32\xb6\x8b\xcd\xf6\x3a\x63\x22\x63\xca\xb8\xa1\x8a\ \xec\xd0\x19\x4a\xfd\x8e\xd9\x2a\x4a\x78\x4d\x45\x07\x59\x44\xce\ \x5b\x9a\xbe\x80\x99\x4a\x2c\xc7\xbc\x3f\xdb\x13\x8f\x7b\x13\x2a\ \xc5\xc6\xc4\x6e\x1e\x2b\x3a\xc1\x43\xe3\x25\x81\x49\x42\xe0\xf3\ \x82\x33\x82\xb1\xc8\x7a\xa4\xe2\xec\x26\x6b\xa5\x3e\xda\x41\x45\ \x49\x6e\x2a\x4a\x5f\xac\xa6\x3c\x6f\x4d\x9f\xff\x4c\xe5\x31\x31\ \x18\x23\x51\x5f\x61\xe8\xab\xd8\x58\xcc\x08\x6e\xcb\x67\x19\x23\ \xc5\x12\x8d\x11\xed\x28\xe1\x1b\x29\xfe\xf6\xb4\x1b\xa5\x28\xd8\ \xcc\x22\x3e\x9a\xa3\xa2\xe4\x79\x2a\xca\x58\xa2\xa6\x13\xcb\x34\ \x7d\xab\x6d\x95\xd9\xe2\x33\xad\x7c\x24\xc4\xa0\x57\xcb\xef\x33\ \x32\x84\xf1\x8c\xe8\x08\x23\x7f\x41\x1c\xb7\x09\x0c\x33\x86\xb9\ \x80\x2f\x8b\x28\x0c\xb3\x51\xea\x63\x1c\x55\x94\x32\x5f\x4d\x99\ \x1e\x6a\x2a\x58\xa1\x79\xc8\xcb\x81\x4b\x6a\x11\x43\x25\x8b\x30\ \xb0\x73\x63\xd1\xb9\xc9\x80\xe5\x98\x22\x5e\x3d\x2f\x33\x66\x30\ \x6c\x18\x33\x07\x60\xad\xed\x28\x45\x71\xb8\xad\x52\xbf\xd3\x49\ \x45\xda\x05\x6a\xca\x62\x11\x27\x57\x68\xf4\xfe\xb6\xca\x3c\x21\ \x42\x69\x88\x00\x23\x31\xfa\xe1\x62\xd4\x16\xa2\x53\x5b\xc6\x6c\ \xc6\x1c\x86\x33\x63\xae\x38\x39\xfd\x80\xbd\xd1\x76\xb4\xe2\xec\ \x36\x16\xb1\xcb\x59\x45\x7b\xdc\xd5\xf4\xd9\x52\x0d\x15\xae\xd4\ \xe8\x1d\x4c\x8d\xf0\x82\x1e\x67\xa8\x00\x95\x58\xff\xf1\x8c\xa9\ \xe2\xfd\xef\x28\x3a\xc2\x7f\x47\xf3\x19\xee\xe2\x44\xf4\xc3\x5d\ \x6c\xba\x30\x16\x51\x1a\x61\xc7\x22\x5c\x54\xb4\x97\x45\xac\xb7\ \x57\x55\x61\xaf\xc8\xb3\xfa\x1f\x08\xc0\xf1\xdb\xcc\x22\x3e\x8f\ \x98\xa5\xd4\xaf\x9a\x6a\x8c\x57\xb3\xaf\x38\x41\x43\x9e\xf6\x12\ \x38\x0b\xa1\x0e\x8c\x90\x09\xc3\x15\x59\xe2\x3b\x31\x45\x0c\x48\ \xfd\x34\x37\xa1\x8d\xf0\x4f\x67\x4c\x63\x58\x8a\x99\x1b\x2f\x8e\ \xec\x30\x83\x36\xe1\x13\x1e\x43\x73\x61\x4f\x14\x53\x3d\x5e\x08\ \x1f\x23\x06\x31\xac\xff\x18\xfe\x06\xa3\xbf\x6b\x5c\x6e\x71\x2e\ \x0b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x04\x94\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x04\x26\x49\x44\x41\x54\x58\x85\xc5\ \x96\x6d\x4c\x53\x57\x18\xc7\x3b\xc5\xa9\x73\x4e\x21\xc6\x45\x65\ \xbe\xc4\xf8\xc2\xc8\xc4\x84\x2d\x43\x08\x74\x33\x6a\xf4\x83\x73\ \xcb\x14\x4c\x8c\x89\xc9\x8c\xc9\xa2\x26\x66\x89\x19\x59\x50\xdc\ \xa7\xc5\x84\x7d\x33\xc6\x97\xf8\x61\x5b\xf4\x83\x13\xfc\x60\x8c\ \x41\x37\xd4\x11\xa7\x20\x82\x88\xa0\x85\xad\xa5\xb5\x40\x5b\x4a\ \x69\x7b\x5b\x5a\x28\xf2\xec\xf9\xf7\x9c\xb3\x7b\x21\x8a\x55\xae\ \x91\xe4\x97\x73\xee\xe9\xbd\xe7\xff\x7b\x9e\x7b\x7b\x8b\x85\x88\ \x2c\x6f\x92\x37\x1a\x9e\xb2\xc0\x67\xdb\x8f\xe4\x1a\xd8\x33\x86\ \x72\xe6\xa4\xa4\x82\xc9\x33\x55\x80\x37\x2c\x2d\x3d\x7a\xd6\xa6\ \x38\x7f\xf9\x76\xb7\x91\x9b\x75\x6d\xfe\xd6\x76\x57\xb8\xdd\xee\ \x8e\x34\xb7\x39\xc2\x5f\xec\x3e\xda\xc4\xd7\xac\x37\x53\xa0\x81\ \x47\x1a\x19\x21\x52\xa3\x9a\xab\xbf\x58\x2c\x4e\x1e\x8f\x97\x86\ \x87\x87\xa9\xb9\xb5\x23\x6a\x2d\x3e\x7c\x8a\xaf\xcb\x36\x4d\x40\ \x85\x3e\x0f\x4d\x8b\x50\x4b\xcb\xc3\xa4\x4c\x22\x91\xa0\xea\x1b\ \x0d\x01\x6b\xc9\xe1\x23\xa9\x48\xa4\x24\xf0\xf4\x29\x71\x75\x3a\ \x63\x8f\x83\x41\x8d\xea\xeb\xef\xfe\xdf\x91\x48\x24\x42\xd7\x6a\ \x1b\x93\x12\xa6\x09\x0c\x25\x9e\x4f\xa0\x5f\xa3\xdb\x77\xea\x47\ \xdd\x96\x48\x34\x4a\x85\x5b\x7f\x68\x34\x45\x20\x31\x3c\x3a\x70\ \x70\x68\x34\xc1\x50\x94\x6e\xfe\xf5\x37\x5d\xbd\xfa\x07\x5d\xa8\ \xac\xa4\xaa\xaa\x8b\xf4\x67\xcd\x75\xda\xb8\xa3\xec\xa1\xc5\x62\ \x79\x6b\xc2\x02\x08\x1d\x88\x0b\x62\x83\x02\x04\x63\xc4\x9a\x16\ \x4d\xd0\x23\x9b\x83\x2a\x2f\x5e\xa2\xd3\x67\x7e\xa1\xb3\xe7\x7e\ \xa7\xda\x5b\x77\x28\xff\xcb\x83\xf7\x4d\x11\x88\x4b\x81\x48\x5c\ \x17\x31\x12\x8d\x8d\x50\x5f\x28\x4e\xae\x6e\x3f\x75\xba\x3c\xe4\ \xe6\xb1\x8f\x6f\x0b\x3f\x03\xf7\x4c\x11\x88\x71\xb5\xa1\x01\x6e\ \x75\x54\x48\x18\xe7\x18\x81\x16\x13\xeb\x18\x93\x62\x7c\x8d\xfc\ \x0a\x4f\xfc\x19\x88\x0e\x8a\x8d\x55\x90\x31\x10\xf3\x40\x44\x5f\ \xc3\x1c\xeb\x90\x33\x4d\x40\x93\x55\xf7\x69\x22\x00\x8c\x9d\xab\ \x4e\xa8\x75\x48\x9b\x26\x10\xe6\xca\x7a\xc3\x62\x63\x8c\xbe\x90\ \x08\xf2\x04\xf5\x40\xac\xe1\x58\x8d\xb8\xc6\x34\x81\x20\x57\xdf\ \xd3\xaf\x87\x63\x04\xc6\x40\x88\xe0\x9c\xd7\x22\x10\xe0\xd6\xba\ \xfb\x88\xba\x02\x22\x04\x01\x4a\x06\x6b\x00\x6b\x6a\xee\xf2\xf3\ \xed\x18\x30\x59\x00\x9b\x22\x1c\x38\x7b\xc5\x31\xa4\x30\xfe\xe3\ \xd5\xe7\x10\x80\x18\xae\x31\x55\x00\xa1\xd8\x1c\x63\x87\x47\x88\ \x20\xd0\xd1\xab\x77\x07\x73\x25\xe7\xd7\x4c\x14\xf0\x86\xc5\xc6\ \x08\x40\xb5\x10\x30\x0a\x19\x3b\x82\x35\x5b\x8f\xc9\x02\x5d\x41\ \xbd\x3a\xbb\x8f\xe8\x71\xb7\x10\x41\x28\x64\x94\x18\x3e\xc3\x1c\ \x02\x3d\x21\x21\x80\x37\xe1\x78\x6f\xc3\x94\x04\x50\x0d\x42\x11\ \xd6\xd6\x25\xc2\x70\xac\x50\xc7\x10\x50\x1d\x72\xf7\x43\xa0\x1c\ \xaf\xe2\x29\x4c\x1a\x33\xe9\x59\x32\x29\x09\xf4\xb2\x40\xab\x5b\ \x60\x0c\x57\x32\x00\x55\xe3\x58\x75\x01\x1d\xe0\xdf\x82\x26\x0e\ \x7c\x97\x79\x87\x99\x6a\x14\x49\x49\x00\x27\xa2\x0a\xdc\x02\x04\ \x22\x44\x85\xb7\x3c\x11\x42\x08\x55\xe1\x4e\xd9\xfe\xfb\x4e\x7e\ \x16\xf8\x9a\xa2\xe2\x43\xcd\xbc\xc7\xfb\xcc\x1c\x66\x96\x14\x41\ \x47\x26\xbd\x50\x40\xb6\x6b\xb2\xb5\xa4\xbc\x11\xed\x6c\xea\x24\ \x7a\xe0\x12\x41\x08\x86\x00\xc0\x31\x3e\xfb\x97\xbb\xe0\xe4\x87\ \xb0\xc3\x2b\xaa\x77\x7a\x82\x43\x05\x5f\x97\xd6\xf0\x1e\xcb\x99\ \x25\xcc\x7c\x26\x5d\x4a\xa4\xa9\x2e\x8c\x27\x80\x56\xa5\x41\xc0\ \xe1\xd7\xab\x6e\xb0\xeb\xed\x6f\x76\x8a\x96\x23\x34\x29\xd9\xee\ \x8d\x9f\xbf\x52\x17\xf8\xe6\xfb\xe3\x8e\x82\xaf\x0e\xd6\xe6\x7c\ \xbe\xf3\x47\xde\x23\x97\xf9\x88\x59\x26\x25\xde\x63\xde\x56\x5d\ \x78\x91\xc0\x14\xdc\xc7\x27\xfd\x7a\xbb\xdb\xb9\xc5\x75\x76\x11\ \x8a\xf5\x7b\x36\x6f\xfc\xd8\xaf\xd5\xbe\x92\xbd\x15\x8e\xbc\xcd\ \x07\x6a\x56\xaf\xdd\x75\x62\xfe\xd2\xdc\x5d\x7c\xed\x5a\xc6\xca\ \x14\x30\x9f\x30\xd9\xcc\x22\x26\x83\x99\xf6\x52\x02\xa8\xee\x11\ \x57\xdd\xc9\x9d\x70\xf1\xf7\xbc\x11\xa1\xbf\x55\xfb\x8a\xf7\x56\ \xd8\x11\x9a\x9d\xbf\xed\xa7\x8c\x79\xcb\xb6\xf3\xf9\x1b\x98\xf5\ \xcc\x3a\xb3\x04\x92\xb7\x20\xc4\x3f\xad\x0d\x36\x5f\xec\xf8\xb9\ \x6b\x3d\x25\xfb\x7e\xee\xc8\xdf\xf2\x5d\xf5\x2a\xeb\x8e\x43\x73\ \x32\xb3\xb6\xf0\x39\x85\x4c\x91\x81\x42\x19\xba\x86\xf9\x74\x22\ \xb7\x20\xf9\x10\x16\x6d\x2b\x2b\x43\x17\xf8\x3f\xdc\xaa\x8f\x37\ \x7d\xbb\x3f\x73\x45\x1e\x36\x5e\xc9\x7c\x28\x37\xce\x61\x56\x1b\ \xc8\x91\xeb\xa8\x38\xeb\x95\x1f\x42\x83\x44\x9a\x6c\xd9\x4c\xd9\ \xbe\xb9\xcc\x3c\x66\x01\xf3\x81\x6c\xeb\x62\x03\x38\x5e\xc8\x64\ \xca\xd0\x57\xfb\x1a\x3e\x43\x02\x6d\x9b\xce\xcc\x90\x32\xd8\x70\ \xb6\xac\x2a\xc3\x40\xba\x5c\x9f\x25\xdb\x3d\xee\x8b\xe8\x3f\x61\ \x3e\xe0\x61\x6f\x4e\x8f\x30\x00\x00\x00\x00\x49\x45\x4e\x44\xae\ \x42\x60\x82\ \x00\x00\x06\xfb\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x06\x8d\x49\x44\x41\x54\x58\xc3\xed\ \x57\x79\x54\x8d\x69\x1c\xbe\x46\xe6\x18\x63\x16\x63\x3b\x0d\x33\ \xd9\xc2\xd1\x62\x89\x44\x1b\x52\x88\x5b\x42\x8b\xf6\xb2\x84\xb4\ \x58\xba\x2a\x57\x8b\xa5\xba\x15\xe9\xa6\x28\x7b\x22\xd7\x70\x42\ \xf6\x90\xce\xb1\x4b\x24\x0d\x47\x0d\x31\xb2\x9e\x28\xe4\x4a\xcb\ \x33\xcf\xc7\xe5\xcc\x41\xca\x31\x73\x66\xfe\xf0\x9d\xf3\x9c\x7b\ \xce\xfd\xbe\xf7\xf7\x3e\xdf\xf3\x3c\xbf\xdf\x7b\xaf\x08\x80\xe8\ \xbf\x84\xe8\x0b\x81\xff\x15\x01\x53\x87\x10\x6b\x13\xdb\xe0\x08\ \x63\xdb\xe0\x54\xe3\x09\x81\x69\x86\xe3\x24\xc9\x83\xac\xfc\x03\ \xf4\x46\x4c\x19\x2a\x12\x89\xbe\x21\xbe\xfa\xe4\x0d\x1a\x73\x99\ \xda\x4b\x6d\x4d\x1d\x16\xfc\xe6\x13\x9a\x79\x3b\x58\x76\xa9\x42\ \x2a\x2b\x51\x4a\x63\x4a\x94\x61\x71\x57\x2b\x25\x91\xd9\x8f\xdd\ \x66\xaf\x2b\x35\x1a\x3f\x2f\x8f\x64\xe4\xba\x43\x9c\x8c\xb9\xa4\ \x05\xd1\x44\xf4\x4f\x5c\xa6\xf6\x0b\x34\x2c\xdd\xa3\x0a\x16\xc5\ \xdf\x57\xba\xcd\x06\x46\xb9\x01\x66\x2e\x80\x85\x3b\x20\x9e\x06\ \x38\xcd\x05\x7c\x16\x01\x8b\x12\x95\x75\xe1\xf2\xbc\x4a\x7b\xef\ \x84\xdb\x24\xb2\xb3\xaf\x99\x87\x33\x97\x7f\x47\x34\xfd\x4c\x02\ \x52\x49\x90\x2c\xb7\xcc\x6e\x06\xa0\x6b\x09\x68\x5a\x10\xa3\x81\ \x5e\x36\x80\x8e\x1d\xa0\xe7\x0c\x18\x79\x92\x98\x37\xe0\x12\x04\ \x04\xc5\x01\x51\x2b\xaf\x57\xb9\xcd\x5a\x73\xcf\x40\xec\x9b\xd9\ \x67\x98\x9b\xeb\x67\x11\xa1\xf4\xc7\x83\xa2\x5e\xd4\x0e\xb6\x05\ \x34\xcc\x81\xce\x63\x80\x9e\x13\x81\xde\x1e\xc0\x40\x92\x1a\x38\ \x13\xd0\xe7\xe6\x06\x54\xc3\x90\x30\xf7\x01\x1c\x83\x49\x64\x39\ \x10\xbd\xfa\x7a\x95\xdd\x8c\xf8\xbb\x7a\x16\x53\x52\xba\xf6\xb5\ \x18\xc8\x72\xcd\x3f\xd9\x9a\x51\x6e\x91\x85\x7e\x94\x78\x80\x3d\ \xd0\xcd\x1a\xd0\x76\xe5\x1b\xfb\x03\x56\x0b\xb9\x11\xdf\xd6\x3d\ \x01\x70\xe6\xa7\x4d\x14\x6d\x91\x02\x26\x73\x08\x3f\x2a\x32\x8b\ \xf7\x42\x69\x4d\x32\x10\x1a\x77\xa2\xd2\xdc\x39\xbc\x84\x44\x64\ \x2c\xd9\x8e\x50\x6b\x34\x01\x4f\xc9\xc6\x1b\xfe\x91\xc0\x20\x7a\ \xaf\x45\xef\x0d\x59\xd8\x2e\x06\x98\xb7\x05\x48\xcc\x02\x36\x1c\ \x07\x56\xe7\x00\xb2\x3d\xc0\x9c\x34\x92\x21\x21\xcb\xc5\xc0\xb0\ \x79\xcc\x0a\xc9\x8c\x0d\x04\x66\x92\x5c\x7c\x9a\xb2\x6e\x6a\xd0\ \xa6\xb2\x3e\x66\xee\xa9\x9d\x75\x87\x19\x36\x5a\x0d\x13\x3b\xe9\ \x65\xa9\x1c\x18\x4e\x69\x0d\x28\xb5\xd5\x12\x20\x30\x1d\xd8\x96\ \x0b\x2c\x49\x39\x50\xe5\x31\x37\xa1\x32\x44\x9e\xa1\x4c\x3f\x52\ \x5c\xbd\xab\x00\x90\x1f\x05\xe6\x6e\x65\x38\x13\x49\x84\xcf\x0e\ \x67\x2e\x46\x91\x8c\x73\x38\xb0\x38\x05\x08\x8f\xa7\x1a\x4e\x61\ \x37\x75\x4d\x9d\x02\x58\xbe\x75\x83\x6a\xb0\xef\xcf\x2c\xdd\xf4\ \xa2\xd6\x36\x84\xfe\xd2\x5b\xf7\x24\x20\xe9\x08\xb0\x72\xfb\xd9\ \x97\xdd\x07\x8c\xbe\xd6\xfa\x67\xcd\xcc\x4e\xda\xa6\x07\x7a\x0f\ \x75\x29\x14\x7b\x2e\x7c\xac\x38\x56\x5c\xbd\x23\x9f\xfe\x1f\x02\ \xbc\xa9\x88\x5d\x3c\x09\x50\x91\x11\xb4\x47\xa8\x31\x87\xd9\x88\ \xdf\x58\x5a\x2d\xf6\x88\xbc\xcb\x35\x89\xdc\xa2\xc3\xdf\x49\x70\ \xd6\x68\xf3\xa5\x17\xf7\x33\x9f\x64\xf0\xaa\x9d\x07\x59\xcf\x5e\ \x2e\x5b\x7d\xe1\x99\xff\x0a\x16\x8b\x06\x7c\x53\x01\xc5\x39\x16\ \x0f\x5d\xf3\xbc\x9d\x86\xce\x41\x3e\xe4\x4b\x58\x12\x56\x1a\x5a\ \xc6\x72\xa6\xfe\xa2\xcf\xc2\xf5\x4f\x77\xe7\x3d\xaa\x5d\x77\x1a\ \x90\x66\x02\x1e\xeb\x98\x91\xa5\xc0\x48\xe6\xc6\x86\x24\xa6\xb3\ \x8e\x7c\xb3\xb2\xce\xc5\x6f\x55\x19\x9f\xdf\xc4\xb5\x1a\x44\xb3\ \x57\x9b\x73\xd0\x25\xa5\x16\x3c\xd6\x1b\x31\x75\x03\xbf\xd3\x12\ \x09\x83\xc5\x7a\x72\xf4\xad\x15\xbb\xb8\x29\x25\x0c\xdc\x06\xec\ \xb8\xc0\xa2\x01\x09\x95\x6d\x3a\xf6\x48\x17\x72\x4a\xb4\x27\x7e\ \x22\xba\x10\x43\xbb\x0f\x18\xb3\x61\xb8\xe3\xfc\x07\x69\x87\x0a\ \x5e\x66\x14\x02\xb1\xd9\x9c\x15\x0a\x60\xe2\x4a\x60\x34\xf3\x60\ \x4d\x3b\x3c\xf9\x19\xbd\x91\x35\x17\x28\x2a\xf4\x2d\xbd\x8f\xf5\ \x1e\xe6\xea\xc5\xc9\x1a\x13\xbf\xb6\xa0\x3c\xe7\x24\x30\x78\xec\ \xec\x3b\xac\x65\x2f\xa8\xd2\xa2\xff\x48\xaf\xa4\x88\x94\x93\xcf\ \xa2\x77\xd2\x43\x12\x51\xd0\xff\xd0\x84\x0c\x65\x27\xed\x21\xfb\ \x84\x0d\x89\x96\x2a\x05\x9b\xaa\x7a\xbe\x1b\xd5\x90\xe8\x0e\x71\ \x3e\x11\x18\xbb\xf5\xe9\x81\x42\x65\xdd\xaa\x33\x24\xcf\xa0\xba\ \xaf\xa7\x0a\xec\x1a\x31\x6d\x71\x89\x60\x98\x99\x95\x85\x89\x7f\ \xbe\x34\xb0\xf2\xbf\xe2\x1d\x9a\xff\x24\x96\x2f\xb9\x9f\x84\x0d\ \xc4\x7e\x8f\x58\x67\x8e\x50\xb4\x89\xa6\xde\xa8\x01\x16\x2e\xe1\ \x25\x9b\x0e\x3f\xaa\x4d\x60\xf2\xd3\x58\x2c\x75\x7f\x41\xb5\xb6\ \xb1\xfd\x45\xde\x17\x13\xad\xde\x89\x8e\x9a\x4a\x95\xc1\xbd\x06\ \x8f\xdf\xe2\xe8\xbf\xac\x6c\x7f\xc1\xa3\xda\x54\x2a\x17\xc6\x6c\ \x4c\xdd\x4c\x3b\x69\xa9\x15\xbb\x6b\x3c\x89\x4c\x24\x26\x48\x9e\ \xd6\x8d\xf5\x05\x66\x84\x51\xe1\xfd\x9c\x2f\x62\xdf\x72\xae\x97\ \xbe\x29\xd8\x9c\xed\x13\xe2\xe0\x13\xf7\x60\xfb\x29\x65\xdd\x56\ \x66\xe0\xc4\x0d\xbe\x05\x43\xd7\xee\x57\xed\x50\x95\x87\xef\xb6\ \xd4\x57\xc4\xb7\x82\x1a\x24\x21\x37\x77\x92\xde\xcf\x3c\x5f\x5a\ \xa3\xa0\x25\x11\xec\x94\x69\xb4\xd2\x69\xf5\x6b\x35\x46\xd2\x12\ \x63\xb6\xb7\xd1\x74\x5a\xcb\xd9\xb1\xfd\xe0\xfb\x04\x84\xe2\x6d\ \x29\xe9\xca\x00\xd9\xb6\xf2\x23\x57\x80\x9c\x22\x60\xdd\xae\x73\ \x55\x5a\x86\xb6\x39\xbc\x37\x48\x75\x00\x7d\xe8\x12\xd4\xe8\xd8\ \x73\xa0\x75\x84\x85\x93\xf4\x5e\x32\xd7\xa4\x93\xc4\x12\xce\x0e\ \x5f\x5a\xea\xca\x1c\xd8\xb0\x53\xcc\xc2\x5e\xcf\x0e\x2f\x06\x34\ \xe3\xe8\xfb\x04\xde\x16\x12\x52\x2b\x91\x29\x2a\xf2\x6e\x02\x85\ \x77\x01\x07\x9f\xd8\xf2\x6e\xfd\x46\xca\x55\x2a\xa8\x7d\x84\x84\ \x7a\x07\x4d\x7d\x2f\xe6\x29\x5f\x71\xa6\xb4\x3a\xf9\x22\x10\x42\ \xaf\x67\x32\x53\xee\x6c\xd7\xf1\xb4\xc4\x9a\x9b\xfb\x73\x72\x66\ \x9e\xf8\x30\x81\x37\x85\x34\xd8\xbf\x5b\x24\xd1\x8a\x8a\xc2\x3b\ \x40\x16\x65\xed\x67\x31\xf9\xf7\xef\xdb\x74\x1c\xc7\x7b\x3f\x7e\ \x64\xba\x09\x6b\xdb\x6a\x19\xd9\xcd\x27\x89\x0b\xf1\xd9\xa5\xd5\ \x51\x6c\xd3\xf9\x7c\x5b\x3f\x86\x73\x32\x87\x9b\xdb\x5a\xb6\x2d\ \xbb\xe5\xc0\xf9\xfa\x09\x08\x57\x33\xa2\x93\x40\xc2\xc1\x67\x59\ \xd9\xb9\x3f\x94\x75\x31\xeb\x0f\x3d\xef\xa1\x6f\xa5\x78\xd5\xb7\ \x22\xd1\xd7\xf5\x0d\x35\xc3\x71\x01\x9d\x0d\x6d\xe6\x2e\x4d\xde\ \x97\xff\x44\x51\x0c\xac\xe2\xe4\x8c\x63\x47\x45\x72\x9c\x2f\x60\ \x38\x83\x39\x33\x12\x38\xe4\x8e\x5f\xf9\x38\x81\xb7\x24\x74\x4c\ \x26\xae\xb1\x9a\xb4\xf8\xe1\xa1\xb3\xa5\x35\x81\x4b\x15\x15\xec\ \x96\x28\xc1\xa6\xfa\x8e\x5e\xe1\x68\xdf\xb0\x37\xb7\xec\x52\x19\ \x90\x5d\x0a\xec\xa3\x8d\xbb\xaf\xd3\x73\xe6\x49\x08\xa7\x82\x13\ \xf4\xf0\x55\xe0\xd2\xad\x86\x09\xbc\x21\xa1\xd1\x43\x5f\x2c\xe3\ \x4f\xb2\xcb\xd1\x6b\xb3\x2a\x1d\xfd\xe2\x1e\xaa\x77\xe9\x3b\x99\ \xdf\xb7\x79\xd7\x0a\x1e\xeb\x3d\x3c\x83\x53\xae\x65\xe5\x95\x3c\ \x3f\x98\x7b\xbd\x6a\xef\xd9\xe2\xea\x3d\x67\x8a\x6a\xf6\x9c\x2e\ \xaa\xc9\x3c\x55\x54\xb3\x9b\xd8\x75\x9c\x9f\x44\x46\x4e\x51\x8d\ \xb6\xb1\x43\x09\x97\x49\x1a\x3a\xab\x04\x5f\x3b\xfc\xd0\xe6\x97\ \xb1\x4c\x79\x7a\xab\xf6\x9d\x85\x30\x3a\x09\xea\x7c\x40\x85\xa6\ \xbd\x87\xba\xba\x71\xc4\xe6\x08\xe7\x86\x8e\xa9\x63\x91\x8e\x89\ \x63\x71\x7d\x50\xef\xda\x6f\x0f\xd7\xb8\x37\xe6\xc4\x56\x53\x85\ \x4f\xf0\x7f\x08\xd1\xb7\x9e\x30\x36\x51\x9d\x7e\x46\x84\x0b\xe1\ \xd5\x00\x1c\x89\xfe\x8d\xfd\xd9\xd0\x44\x15\xbe\x96\x0d\x9c\xf3\ \x6f\x46\xb5\xba\x2a\x2b\x1f\x83\xba\xea\xd9\x7f\xf7\xfa\xf2\xcf\ \xe8\x0b\x81\x86\xf0\x17\xce\x95\x4e\x3d\xa5\x4e\x62\x58\x00\x00\ \x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x07\x68\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x07\x2f\x49\x44\x41\x54\x58\xc3\xcd\x97\x09\x54\x54\x65\ \x14\xc7\x9f\x80\x88\x20\x04\x0d\x28\x9b\x6c\x02\xb2\x0c\x33\x2c\ \x6e\xa0\xc0\x11\xe8\xc4\xa8\x84\x6c\xb9\xa0\x64\x66\xb9\xe6\x12\ \x5a\x96\x29\x89\x5a\x4a\x08\xa7\x52\x3a\x99\x51\x83\x10\x03\xea\ \x00\x03\x1a\x10\x20\x8c\xc0\x40\x12\x01\xa3\x43\xc0\x60\x25\x21\ \xab\x02\x31\x0c\xdb\xcc\xbb\xdd\x37\x3d\x3b\xed\x82\xc9\xa9\x77\ \xce\xef\x0c\xe7\xfb\xee\x7b\xf7\x7e\xf7\xfb\xbe\xff\xbd\x10\x00\ \x40\xfc\x97\x4c\xc8\xc8\xdd\xdd\x9d\xe9\xe6\xe6\x76\xdc\xd5\xd5\ \x95\xeb\xe2\xe2\xf2\xd6\xfc\xf9\xf3\xfd\x09\x82\xd0\x46\xd4\x1e\ \xea\xe0\xdf\x3e\xe8\xd8\x2b\x24\x24\xe4\x56\x61\x41\x7e\x7f\x7d\ \x5d\xad\xfc\x62\x66\xe6\xc0\xf6\xed\xdb\xda\x99\x4c\x66\xb6\xbd\ \xbd\xfd\x06\x34\xd1\x45\xd4\x89\xa9\x7a\x30\x80\xf7\x44\xa5\xe9\ \x32\x68\xdd\x08\xd0\xe8\x03\xf0\xfd\x2e\x80\xfe\x02\xa8\xad\x11\ \x8d\x7a\x7b\x7b\xdf\xd1\xd6\xd6\x0e\x40\x33\x83\x29\x0b\x00\xd3\ \x5f\x0f\xcd\x2b\xa1\x86\x4b\xc0\x86\x15\x04\xbc\x14\x4a\x80\xf0\ \x1c\x66\xb7\x71\x19\x24\xc4\x1d\x1e\x32\x37\x37\xbf\x80\x66\xce\ \xc8\xf4\x29\x09\x80\xcd\x66\x7f\x2e\xe1\x11\xc0\x4b\x60\x2a\x4c\ \x4c\x4c\xc4\x16\xa6\x3a\x85\x6b\x38\x86\xa3\x50\x45\x40\x45\xce\ \x66\x85\x8d\x8d\xcd\x37\x68\xc6\x41\x9e\x98\x8a\xd5\x3f\x1d\xb5\ \x61\x8d\x74\xe8\xc6\x22\xb2\x98\x17\xa9\xb0\xb4\xb4\x14\xe3\xf0\ \xab\xae\x2c\xfb\xda\xd6\x5c\x53\x10\x0b\x96\x90\xb6\xb6\xb6\xcd\ \x38\x16\x85\x18\x4f\xc5\xfe\x27\x37\x5c\x4f\x18\x86\x6a\x5d\xe8\ \xaa\xdd\x0d\x5e\x9e\x4b\xee\xa3\xc3\x2b\x78\x00\xcb\x5a\x0a\x9f\ \x22\x6f\xf2\x9d\xc9\x79\xf3\xe6\xb5\xa2\xe9\x56\xc4\xfc\xb1\x07\ \xe0\xe4\xe4\x14\x7e\x64\x9b\xd1\x48\x7e\x02\x01\xf7\x84\x1e\xd0\ \x71\xbb\x98\xcc\xcf\xf9\x68\xa4\x40\x70\x4e\xde\xfd\xf5\x76\xc8\ \x88\xb3\x54\x9a\x9a\x9a\xde\x40\xd3\x17\x10\xd3\x09\x2c\xc8\x8f\ \x3a\xd4\x2c\x16\xeb\x88\xb5\xb5\x35\x0b\x87\x66\x3c\xec\x1d\xdd\ \xdd\xeb\xf5\x12\xa2\xa3\x74\xee\x1c\xdb\x3e\x83\xec\xae\x5a\x0f\ \x77\xeb\xe2\x54\x74\x55\xae\x83\xca\x0c\x8e\x12\x3f\x24\x41\xbb\ \x8d\xc8\x9c\x7f\x70\xfc\x7c\x58\x58\x58\x69\xdd\x37\x55\xb2\xf1\ \xb1\x11\xb2\xef\x7e\x97\xc2\xce\xce\xee\x13\x9c\xb2\x7f\x58\x00\ \xd4\xfd\x36\x43\x56\x72\x7c\xe6\xdc\xc8\x8f\x27\x60\xac\x8c\x01\ \x23\x65\x26\xa0\x2c\xd5\x04\x59\xc5\x62\xc0\x2c\x75\xe1\xfc\x96\ \xbf\xca\x00\xe5\x38\x34\x34\xb4\xb4\xae\xb6\x62\x68\x64\x64\x04\ \x54\x0c\xcb\xa0\x49\xfc\xa5\x02\xb7\xae\x06\x4d\x82\x26\xb2\x13\ \x1a\xc8\x93\x46\x46\x46\x2b\x22\x02\x67\x0f\x76\x67\xe1\x15\x2c\ \xa1\x29\xd3\x81\x7d\x3b\x23\x64\x38\xf7\x11\xda\x38\x50\x01\x7b\ \x78\x78\xe8\x52\x8e\x51\xbc\xca\x6e\x54\x97\x0c\xf5\xf7\xf7\xc3\ \x2f\x0c\xc0\xbd\x6e\x29\xf9\xda\x2b\x91\x72\x9f\xc5\x73\xee\xea\ \xeb\xeb\x67\xa1\x7d\xc4\x64\x8e\x84\xf6\x42\x37\xab\xb8\xb7\x5e\ \x9a\xa9\x84\x22\x74\x7e\x6b\x13\x90\xf2\xdb\x20\xf8\x6c\xdb\x38\ \x6a\x41\xe1\xac\x59\xb3\x82\xf0\xca\x1e\x58\xbf\x36\xac\xa9\x42\ \x98\x3f\xd4\xd1\xd1\x01\x0f\xe8\xea\xb8\x03\xd7\x8b\x2e\x28\x7c\ \x97\xba\xc8\xd8\x4e\x86\xd4\x4d\x3a\x8b\x6c\xa3\x2e\xda\x64\x02\ \x98\x46\xed\x73\xb0\xbf\x49\x91\x54\x14\x0f\xa3\xa3\xa3\x2a\x7a\ \x6f\xe7\x92\x28\xc9\xad\xe1\x61\xab\xda\x45\xd7\x05\x23\x52\xa9\ \x14\x28\x5a\xa5\xad\xaa\xdf\x16\x49\x05\xb9\x7f\x77\xf8\x30\xcb\ \xc9\x44\x3a\xd7\x58\x4b\x80\xdf\x88\x45\xc2\x91\xf9\xb4\x8c\x4f\ \xea\xd1\x30\x36\x36\xf6\xe5\x70\x38\x8d\x83\x83\x83\xa0\x62\xa0\ \x1b\x2e\xf3\x92\x94\x99\x99\x99\x50\x59\x59\x09\xf5\xf5\xf5\x2a\ \x6e\x36\xd4\x40\xee\xa5\xc4\x71\x67\x47\x9b\x4e\x57\xa7\x27\x6b\ \xf1\xdd\x44\xfa\xac\x78\x22\x26\x8f\xac\x9c\xb8\x5a\x07\x47\x47\ \xc7\x0f\xbf\xaa\xbc\x3a\xde\xd3\xd3\x03\x5c\x2e\x17\x62\x62\x62\ \x80\xcf\xe7\x43\x72\x72\x32\x08\x72\x04\x20\x12\xf2\xc9\x17\x37\ \x05\xca\xed\xe7\x99\x36\x6b\x6a\x6a\x52\x52\xfd\x2a\x75\x90\x11\ \x1b\xba\x8a\x4e\x7b\x14\x51\x5a\x48\x95\xe4\x15\x81\xbe\x8d\xe9\ \xdc\xb8\xb1\xb4\xb4\x34\x55\x8a\x3d\x3d\x3d\x41\x4f\x4f\x0f\xda\ \xda\xda\xa0\xa0\xe0\x2a\xbc\x1f\xbf\x6f\x1c\xe5\xb9\xcd\xda\xc2\ \xa0\x1c\x5f\x7b\x17\xa1\x2a\x26\x1b\x61\xd0\x07\x7a\x52\x4e\xcd\ \x90\x1d\x48\xfe\xae\x2d\x3e\xb7\x0b\x52\x9f\x1d\xcc\xbb\x9c\x04\ \xe9\xe9\xe9\x90\x98\x98\x08\x67\xcf\x9e\x05\x1e\x8f\x07\x39\xd9\ \x39\xd0\xdc\xdc\xac\xa2\xb3\xbd\x89\x0c\x5a\xe9\xf7\x13\x6e\x55\ \x0e\x7d\xca\x6d\x68\xc1\x99\xf8\xaa\xb1\x06\x04\xa3\xd3\x4f\x57\ \xaf\x5c\xdc\x98\x92\x10\xd0\xd3\x79\x6d\x99\x02\x84\x96\x30\x96\ \xa3\x09\x82\xd3\xda\x90\xce\x3d\x09\xbc\xcf\x93\xe1\x9d\xd8\x97\ \x15\x27\x8e\xee\x57\x66\x65\x9c\x51\x36\xd4\x57\xe1\xde\xd7\x81\ \xf8\xa6\x18\x7e\x1a\xb8\x07\x27\x8f\xed\x1d\xc4\xbb\x9e\x8c\x9f\ \xb3\x9c\xd0\xca\xb1\xdb\x61\xa0\xe3\xdd\x48\xf9\xc9\x83\x4b\x7f\ \x6c\xc8\xf5\x91\x83\xc8\x01\x3a\xd3\x66\x02\xff\x4d\x02\x4e\xef\ \x50\x27\xfb\x2e\x59\xc0\xdd\x14\x02\x72\x12\xcc\xc0\xdf\xd7\x4d\ \x86\x32\xdc\x80\x1a\x70\x6d\xee\xdc\xb9\xd5\x21\xab\xbc\xfa\x2b\ \x8a\x3e\x21\x45\x22\x11\x50\x74\x75\xfe\x08\x5f\x5e\xbd\x30\x8a\ \x8a\x97\xc6\x60\x30\xdc\xfe\x31\x0b\xb8\xda\x08\x3f\x5f\x0f\x71\ \x4a\xfc\xa2\x1e\x59\x39\x93\x84\xe2\xd9\x50\x83\xfa\x1f\xbb\x59\ \x9d\x0c\x7d\x4a\x7f\xc8\xcb\x9d\xd1\x84\x6d\xd8\xdd\xb6\x3c\x77\ \x52\x91\xa5\x0b\xe7\xf6\x10\xe0\xb7\xc4\xf0\x0e\xbe\xfa\x01\x7d\ \xb2\x43\x9c\xec\x18\xf1\x58\xa8\xaa\x4e\x1d\x8d\x1a\x2e\x2b\xb9\ \x02\xc5\xc5\xc5\x20\x91\x48\xa0\xa5\xb1\x5a\x89\x41\xf0\x31\xc8\ \x55\x68\xa7\xf3\xa7\x20\xa8\x92\xeb\xe7\xeb\x2e\x6e\xcd\x73\x18\ \x85\xab\xb3\x40\xf8\x0e\x01\x3b\xc3\xa7\x2b\x23\x02\x0d\x7a\x2d\ \xcc\xf4\xae\xa3\xc9\x39\x2b\x2b\xab\x92\xf3\x6f\xb3\x06\xfb\x4a\ \x56\xc0\xc7\x7b\xa7\xc3\xce\xb5\x3a\x7d\x38\x9e\x82\x6c\x46\xec\ \xe8\x8e\xc8\x02\xf1\xc1\xda\x90\x1e\xb0\x7c\x51\x6f\x7e\xd6\xbb\ \xca\xbc\xbc\x3c\x10\x0a\x85\xd0\xfe\x83\x84\x5c\x1d\xe4\xdf\x8e\ \x5b\x72\x10\x6d\x8c\x7e\xb7\x25\xaa\x92\x9b\x61\x33\x0c\x97\xd5\ \xe0\xfc\x01\x03\x32\x24\xc0\xa0\x13\x55\xad\x10\xa7\xce\xe0\xef\ \x71\x2a\x85\x27\xa2\x99\x5d\xf2\x4a\x2f\x28\x4f\x62\xc3\xde\x0d\ \xda\x03\x38\x97\x81\xec\x43\x98\xbf\xa9\x68\xea\xb4\xb0\xd8\xe1\ \x01\x3c\x88\xd9\x10\x1d\x3f\x14\x26\xcf\xbe\x7c\x01\xb2\xb3\xb3\ \xa1\xbd\xad\x19\x9e\x8b\x0a\xef\xc5\xf1\x24\xba\x74\xff\x12\xc4\ \x6a\x0e\xbb\x11\xb2\xa7\x43\x4b\xaa\x07\x2c\x5b\x68\xd6\x8b\x4e\ \xaf\xe0\xf0\xeb\x98\xb2\x37\xb0\x03\xe6\xf3\xdf\xb7\xbd\x3f\x5c\ \xce\x86\xa6\x8c\x40\xd8\xb5\x76\xc6\x18\xce\x17\xe1\xfc\x1b\xc8\ \x02\x64\xe6\xdf\xd4\x0e\x4a\x68\x96\x51\xd9\xf0\xf7\x5d\xd0\x9b\ \xf9\xe9\x7e\x65\x6a\x6a\x2a\x48\x6e\xd5\x41\xec\xe1\x2d\x83\x28\ \xdd\x31\x74\x91\x53\x27\x96\x7b\xb3\x25\x43\xd8\xef\x75\x17\x46\ \x40\xee\x19\xf3\xb1\x35\x41\x0e\xf7\x51\xd3\xbf\x7b\xe6\x69\x66\ \x6b\xfd\x25\x33\xb9\xbc\x84\x0d\xdf\x5e\x0c\x85\x17\x83\x35\x48\ \x96\xa3\x81\x98\xbe\xdb\x7e\x0f\x91\x51\x35\x7a\xbf\x6d\x0d\x0d\ \x0d\xf7\xa0\x2e\x94\x46\xef\x08\x18\x4a\xe3\x9e\x06\x61\x51\x0a\ \x25\xdd\x54\x1b\xb7\x5c\xf5\x0d\x67\x67\xe7\x98\xfd\xeb\x66\x8c\ \xb7\x70\x59\xd0\xfb\x45\x10\xc8\x85\x2e\xa0\xfc\x4a\x1f\x94\xd5\ \x06\xd0\x97\xbf\xfc\x57\xe7\x5e\xee\x4f\x34\xe2\x0b\x49\xf4\xdd\ \x36\x99\xe0\xbd\xd6\xa0\xfb\x84\x25\xd8\xce\x9d\xc7\xb3\xd6\xb3\ \x39\x72\xa9\x0c\x6f\xc5\x17\x38\xf6\x2c\x62\x48\x19\x31\xdc\x98\ \x66\x89\x5b\x23\x66\xca\x0f\x45\xaa\x01\xef\x10\x03\x04\xb1\xa6\ \x2a\x92\xa3\xf5\xe0\x40\x94\x9a\x92\x76\xfe\x21\x12\x89\x58\x4d\ \x52\xd1\xa6\xd1\xf2\x6b\xad\xa5\xa5\x15\x81\xaa\x19\x87\x7f\x47\ \x23\xde\x0f\xb2\xa8\x41\x9f\xe0\xe0\xc5\x2c\x9d\xcf\x9e\x0b\xd6\ \x95\xec\x5a\xa7\xd3\x8e\x74\x6c\x0a\xd6\x91\x1a\x33\x88\x8b\x38\ \x77\x8a\x8e\xd8\x9a\x78\xf4\xf6\x5b\x83\x96\x63\xaa\x6f\x70\xa2\ \x57\xaf\xfe\xc7\x49\xea\x54\x73\xe8\x1e\x6f\x2f\xb2\x87\xd6\x72\ \x4f\x3a\x95\x8f\xa3\xf7\x57\xa7\xfd\x4d\xfb\xbb\x49\x5d\x7a\x8f\ \xad\x68\x19\x9d\x8d\x68\x3d\x52\x05\xfb\x3f\x3c\x8f\xe5\xbf\xe3\ \xa9\xe4\x67\x2f\x79\x73\x70\x22\x76\x00\x17\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x04\xb5\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x04\x7c\x49\x44\x41\x54\x78\x5e\xb5\x94\xdd\x6b\x1c\xd5\ \x1f\xc6\x3f\xe7\x65\x66\x67\x5f\xf2\x6e\xd2\xb4\x69\xc1\x37\xea\ \x0b\xe2\x4d\xf4\xce\x4b\xa1\x88\x82\x48\x41\xe8\x95\x7a\x21\xbd\ \xf4\xc7\xef\x0f\xf0\x46\xf4\x52\xf0\xd2\x4b\x11\x5b\x14\x2d\x8a\ \x8a\x42\xac\x28\xc1\x68\x6d\xda\x9b\x94\x26\x6d\x9a\xb6\x49\x37\ \x4d\x9a\xee\x6e\x76\x67\x77\x67\x77\x66\x67\xe6\x38\x3d\x84\xb0\ \xa1\x90\x80\xe0\x03\xcf\xce\x7e\x99\x99\xe7\xf3\x3d\xdf\x39\x33\ \xc2\x18\xc3\x7f\x29\xcd\x8e\xa6\xa7\x4f\xbf\x02\xe6\x0d\x30\x47\ \x8d\x41\xf2\xef\x24\x8d\x49\x56\xe2\xb8\xfb\xcb\x95\x2b\x67\x7f\ \x04\x22\xcd\xae\xcc\x9b\xef\x7d\xf4\xbf\x93\x7a\xf8\x91\xfc\xc5\ \xb9\x59\xb9\xf0\xd7\x8c\xe8\x76\x9a\x42\x22\x11\x02\x84\xfd\x01\ \x29\x44\xdf\x7f\x89\x76\x5d\xa6\x9e\x78\x96\x27\x5f\x3c\xc1\xf8\ \xe4\x61\xe6\x67\xe7\x5e\x9a\xfb\xec\x8b\xe3\xc0\x25\xe0\x5e\x1f\ \x80\xe3\xce\xf0\x98\xf7\x6b\x59\xe9\xaf\xbf\x3c\xc7\x07\xef\xbe\ \xca\xe3\x47\x27\x91\x52\x62\x00\x23\x52\x24\xc2\xd6\x02\x01\x18\ \xa4\x52\xd8\xda\x29\x70\xe6\xd2\x26\xdf\x2e\x6b\xf4\x1f\x3f\x68\ \xe0\x08\x30\x05\x34\x76\x01\xc6\x98\x66\xa5\xea\xa7\x37\x36\xf3\ \xd4\xb7\x7d\x06\x3d\x45\xc1\x15\xf4\xe2\x08\x00\x89\x44\x6b\x9d\ \x59\xd9\x15\xf4\x7a\x11\x69\x9a\x20\x52\x81\xe7\x2a\xa2\xc5\x9f\ \xf1\x07\x5e\x63\x20\x8c\x93\x24\xe9\x45\x40\x01\x50\x9a\x3e\x49\ \x09\x45\x47\xda\x80\xd2\xe0\x10\x85\x62\x91\x38\x8e\xc9\xee\xb0\ \xa1\x4a\xd9\x70\xeb\x9d\xee\xf1\x3c\x8f\x52\x69\x80\xe9\x97\x4f\ \x72\xfd\x5a\x1e\x29\x15\x20\x00\x0c\x40\x3f\xc0\x86\x68\x47\xa2\ \xa4\x60\x28\x03\x0c\x0f\x0f\x13\x86\x21\xbd\x5e\x6f\x17\xb2\x23\ \x5b\x67\xa6\xdd\x6e\x13\x85\x21\xc5\xe1\x49\xf2\xf9\x88\x68\xf7\ \x9a\x87\x01\x68\x21\xc8\x69\x89\x56\x92\x7a\xbd\xce\x60\xc1\xf2\ \x6d\xe7\xae\xeb\xda\x11\x29\xdb\xb9\x5d\xa5\xad\x9d\xcc\xf9\x42\ \x9e\xdb\xab\x0a\xcf\xa9\xd3\x13\x86\x7e\xed\x1d\x91\x10\xb8\x8e\ \x44\x1a\xc3\xc4\xe4\x04\x47\xa6\x0e\x13\xf7\x7a\x76\x4c\x3b\xb2\ \xe1\x80\x5d\x55\xa7\xd3\x21\x30\x86\x7a\x7d\x9b\x38\x1c\xa3\xe0\ \x28\xda\x42\xec\x03\x90\x90\xd7\x12\xc7\x73\x09\x3b\x1d\x3a\x41\ \x60\x3b\xf4\xbc\x1c\x8e\xe3\xe2\x68\x85\xd2\x1a\x21\xec\x18\x11\ \x52\x61\x57\xe7\x68\x5a\xb7\x23\xf2\x2b\x15\x84\xdc\x07\xa0\xa5\ \x24\xa7\x05\x03\x87\x9f\xe6\xa9\x67\x9e\xe3\xd8\xc4\x10\x08\x30\ \x69\x4a\x6a\xc8\x6c\x48\x52\xe8\x25\x86\x4e\x02\x61\x04\x51\x22\ \x41\xc0\x76\xd7\x90\x77\x25\x12\xf6\x01\x08\x70\x94\xe1\xd1\x17\ \x4e\x30\x73\x4b\xf0\x58\x60\xb2\x5a\xd2\x89\x15\x9d\x28\xa5\x19\ \x26\x04\x9d\x88\x7a\xab\x8b\xdf\x6c\x53\x6f\x36\x69\x36\x7c\x8c\ \x72\xd0\x03\x87\xc8\xe5\x73\x28\x79\xc0\x88\x72\x0a\x26\x8e\x4c\ \xf1\xe9\xf7\xf3\xe4\x13\x1f\x11\xb5\xe9\x76\x03\xa2\x4e\x40\x1a\ \x77\x51\x26\xc6\x73\x04\x43\xc5\x1c\x23\x25\x8f\xb1\x91\x12\x13\ \x13\x87\xa8\xb9\x63\x24\xba\x80\x14\xfb\xac\x40\x09\x41\x21\xe7\ \xd2\xb8\x35\xcf\xf3\x4e\x8d\x63\x53\xc3\x94\xbc\x7c\x16\x36\x42\ \x31\x27\x19\x1d\x2c\x32\x92\xb9\x54\x2c\xe0\xe5\x5c\x94\x94\x44\ \x71\x4c\xd0\x6a\x72\xd9\x77\xb9\x19\x68\x84\xdc\x6f\x44\x4a\x90\ \x73\x35\x7e\xf9\x1a\xa7\xff\xff\x3a\xbf\xcd\xfc\xc4\xd6\x5a\x85\ \xbb\x71\xc2\xa9\x53\xa7\x30\xc6\x90\xcb\x39\x28\x25\x31\x40\x62\ \xc0\xa4\x86\x14\x41\xc9\x53\x14\x13\xbd\xff\x33\x10\x02\x3c\x47\ \xe2\x3a\x8e\xdd\x2d\x8b\x4b\x4b\xf6\x65\x1b\x1f\x1f\x27\x4d\x53\ \x80\xec\x68\x76\x2d\xa5\xc1\x60\x65\x77\x58\xde\xd3\x64\x70\x91\ \x69\x97\xb3\x07\xa8\xa4\xc8\x00\x1a\x2f\xe7\xd0\x09\x7b\x94\x4a\ \x25\xc6\xc6\xc6\x18\x1d\x1d\xb5\x80\xfd\x94\x73\x14\x3d\x7f\x83\ \x34\x0a\x30\x26\x8d\x01\xf1\x10\x40\x4b\x81\xa3\x1e\x58\xee\x7c\ \x96\xad\x39\x50\x42\xa2\xe2\x36\xcb\xb3\xdf\x98\xca\x7a\x54\xad\ \xd7\x6f\xfd\x0e\x74\x81\x64\x0f\x40\x0a\x70\x1d\x81\x94\x80\x31\ \x1c\x20\x0b\xd7\x5a\xd9\xe7\x12\x6c\x5d\x63\xe5\xf2\xed\xee\x8d\ \xeb\x17\x3e\x5f\x5f\xff\xfb\x3c\xb0\x05\x74\xf7\xee\x22\xad\x18\ \x2a\x91\x8d\x65\x14\x37\xe7\xda\x0f\x5d\x16\x62\xdf\x64\xa5\x04\ \xae\xab\xb3\x30\x3b\x67\x82\x20\x34\xf5\x7a\xc0\xfd\xfb\x0d\x6a\ \xb5\x16\xeb\xeb\x95\xf6\xca\xd2\xc2\xb9\x6a\x75\xe9\x22\x70\x13\ \xd8\x00\xc2\x7e\x80\x74\x5d\x21\xb7\xca\xcb\x24\xfe\x1a\x5a\x4d\ \xf3\xf6\x3b\x6f\xd1\x6a\x76\x4d\xbb\xdd\xe3\xea\xd5\x4d\x1a\x8d\ \xae\xa9\x56\x5b\x61\xa5\x52\xf3\x6b\xb5\xda\xa6\xef\xd7\xd6\x7d\ \xff\xde\x6a\xb5\x5a\x5e\x5d\x5c\xbc\x7c\xc7\x98\xb4\x01\xdc\x01\ \xca\x40\xcb\x64\xea\x03\x98\xd6\xfc\x85\x2b\xcd\xb9\xf3\x33\xc5\ \xf2\xea\xa6\xf9\xb0\x7c\x36\x2a\x16\xf2\x61\x1c\x87\xd5\x56\xab\ \xb1\xe1\xfb\x95\x72\xa5\xb2\xbe\x56\x2e\x5f\x5f\xab\x56\xef\xd6\ \x80\x2e\xd0\x01\x82\x3e\xb7\x80\x26\x10\x98\x4c\x7b\xb6\x69\x1c\ \x77\xbe\xfa\xe4\xfd\x8f\x37\x21\x74\xc3\xde\x76\x65\xf9\xea\xec\ \xc6\xf6\xf6\xea\x5d\x63\xd2\x10\xe8\xf4\x39\xb0\xb5\x05\xd0\xeb\ \x73\x4c\x66\x1b\xbc\xab\x3e\xc0\xc2\xc2\x99\xef\x80\x3f\x81\x11\ \x40\x00\x36\x78\xe7\x18\x01\x71\x7f\x98\xc9\xc8\x1c\x2c\xfe\x01\ \xd1\x4f\x0f\x88\x96\x78\xff\x51\x00\x00\x00\x00\x49\x45\x4e\x44\ \xae\x42\x60\x82\ \x00\x00\x06\x7e\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x06\x45\x49\x44\x41\x54\x48\x89\x9d\x95\x7b\x6c\x95\x77\ \x19\xc7\x3f\xbf\x73\xde\x73\xeb\xe5\x9c\x5e\xe0\x40\x69\xbb\xb2\ \x5e\x28\xe5\x0e\x45\x1c\x63\x83\x11\xc9\x14\xc7\x60\x5b\x34\x38\ \x63\x66\x22\x53\x11\x63\x44\x37\x35\x26\xc6\x7f\x66\x48\x34\x26\ \x6a\x36\x5d\x30\x64\x71\x19\xc8\x28\x0e\xc4\xae\x60\x69\x59\xa1\ \xe1\x3a\x2a\xd4\xf5\xc2\xb5\xd0\xd3\x3b\xbd\x9d\x9e\xeb\x7b\xf9\ \xbd\xef\xfb\xf3\x1f\x34\xa8\x98\xcc\x3d\xc9\xf3\xef\xe7\xf3\xe4\ \xfb\xc7\xf3\x15\x4a\x29\x3e\xc9\xbc\xfd\x43\x51\x5c\x51\x1a\xda\ \x3e\xbb\x6c\xc9\xf7\x95\xeb\xe8\x23\xb1\xce\x57\x8f\xb6\xbb\x6d\ \x5f\xdd\xc4\xd2\xb4\xc5\xe0\xa6\x57\xd5\x38\x80\xf6\xff\x82\xff\ \xf0\x23\x11\x2a\x29\x60\xeb\xb2\xfa\xb5\xdf\xa9\xa8\x7b\x6e\x5d\ \x51\x71\x2d\xae\x27\x48\x76\xf2\xd9\x9f\x6f\x79\xb2\xb8\x2f\x53\ \xf0\xe4\x0b\xc1\x64\xe3\x7e\x21\xc4\xd7\x94\x52\xf2\x63\x0b\x84\ \x10\xe2\xf8\x1e\xd6\xd5\x56\x45\x5f\x99\xbf\x62\xc7\x33\xd1\x79\ \x6b\x7c\x22\x79\x8d\xcc\xdd\xc3\xa8\xbc\xc5\x8c\xfb\xbf\xb8\x3c\ \xbf\xfe\xc5\xe5\x95\xb5\x9f\xe6\xc6\xe1\x13\xf3\x40\x86\x80\x87\ \x0b\x3a\xde\x14\x1a\x8a\xc0\xea\x5d\x2a\x03\xd0\xf8\x9a\xa8\x3c\ \xf3\x46\xf1\x37\xcb\x17\x6e\xfa\x56\xd9\x82\x17\xf3\xbd\xd9\x3e\ \xec\xe1\x26\x46\xc6\xa7\xe9\x9f\x09\x23\x8b\xca\x59\xf5\xec\x2e\ \xc2\x91\x08\x72\xea\x12\x77\x86\xad\x2e\xc0\xfb\x5f\x11\xfd\xe4\ \x2b\xc2\xf7\xc4\x22\x9e\x88\xce\x5f\xbe\x53\xf3\x87\x0b\x9a\x7e\ \x26\xf6\xf9\x7c\x62\x56\xcd\xaa\xad\xaf\x94\xd5\x6c\xa9\xca\xf5\ \xf9\xb1\xee\xb5\x12\x9f\x99\xe4\xc6\x10\xa4\x73\xd6\x32\x6f\xc5\ \xe7\xa8\x5e\xb0\x08\x5c\x89\x02\xe2\x77\x0e\xd9\xad\x97\x9c\x0f\ \x00\x09\x20\x94\x52\x08\x21\xc4\xb1\xd7\x58\x38\x2b\x3a\x7b\x77\ \xc5\xb2\x1d\x2f\xcd\x9e\xb7\x3a\x28\xac\x19\xe2\x89\x61\xdd\x17\ \x88\x68\x91\x48\x89\x4f\x4d\x5f\x65\x66\xa2\x8f\xc1\x29\x41\x5f\ \xba\x8a\xea\x95\x2f\x50\x5a\xb5\x84\x70\xae\x1f\x5d\xd7\x51\xca\ \x8b\x2b\xbc\x74\xbf\xbb\x66\x7c\xf8\xef\x9d\x57\xfd\xc2\x17\xd0\ \xa2\xf2\x07\xa2\xf5\x97\x62\xa5\xc7\x17\x5e\x5b\x51\xf7\xf4\x9e\ \x92\x05\xdb\x23\x41\x6b\x18\x95\xba\x89\x47\xd3\x20\x10\x45\xd9\ \x3a\xfa\xcc\x00\x77\x46\x52\x0c\x66\x4a\x09\x94\x6d\x66\x79\xfd\ \x06\x42\xb9\x21\x5c\xdb\x42\x4a\x89\xeb\x7a\x49\x26\x27\x18\xe9\ \xda\x8f\xd1\x7b\x50\x2e\x5c\xbf\x43\xcb\x8f\x56\x88\x0b\xef\xec\ \x8a\x69\x91\xa2\x92\xd7\xa3\x8f\x6e\xae\x7f\x64\xc1\xb6\xa0\x1a\ \x6f\x45\x39\x3a\x1e\x6f\x00\x29\x25\xb6\x11\x63\x62\x32\xc9\xb5\ \xd1\x20\x9e\x39\xdb\xa8\x7b\x6c\x33\x25\x25\x51\xa4\x65\x60\x19\ \x59\xa4\xed\x60\x18\x16\x77\x7b\x9a\xe9\xee\x38\x46\x6d\xc5\x1c\ \xd6\xef\xd8\xeb\xf3\x05\xe3\xa4\xa7\x53\x28\x22\xb3\x34\x8f\xd7\ \x57\xe5\xf7\x79\x82\xe9\xa1\x76\x42\x9e\x14\xc2\x9b\x8b\x61\x5a\ \x24\xd2\x3a\xd7\x06\x1d\xd2\x39\x8f\x51\xbd\xfe\x19\xca\xca\x2b\ \xf1\x0a\x07\x23\x9b\xc6\x51\x02\xcb\xb4\x18\x1d\xe8\xa2\xe3\xf4\ \xef\x40\xf9\xf8\xcc\xd3\x5b\xa9\xae\x8a\x20\x93\xed\x4c\x8f\x19\ \xdc\xbc\xf0\x11\xbd\x03\x37\x0f\x69\xca\x75\x3d\x42\xd9\x38\x2e\ \x58\xca\x83\x2d\x2d\xee\x8c\x18\xf4\xa7\xca\xa9\x58\xf1\x05\x56\ \xd6\x2c\x21\xe0\xf7\x22\x2d\x13\x43\x4a\x6c\x57\x23\x3e\xd5\xcf\ \xd5\xd3\xfb\x18\x1f\xe9\x61\xe9\x8a\xc7\xd9\xb0\xbe\x1e\xd7\x9a\ \x22\x11\x6b\x24\x9e\x01\x3d\x91\xc3\xb5\xcb\x2d\x83\xef\x5f\xe1\ \x3d\x0d\xc0\x55\x60\x49\x85\x61\x59\x0c\x8c\x26\xb9\xeb\x3e\xc5\ \xc6\xe7\x76\x92\x17\xd2\x90\xb6\xc4\xd0\x4d\x2c\xdb\xc1\x34\x2c\ \xae\x77\xbc\xc3\x8d\x8f\x5a\x29\x2d\xab\xe1\xa5\x97\xbf\x4d\x24\ \x34\xc4\xcc\xd0\x71\x46\x46\x06\x11\xde\x10\xc1\xf0\x62\xae\xb4\ \x1d\x4c\xef\x6b\xcb\xfc\xea\xf2\x2d\xba\x35\x57\x81\x6d\x3b\x18\ \x52\x92\x8c\x67\x68\xbb\x3c\xca\x86\x2f\x7f\x8a\x82\x70\x90\x6c\ \x26\x83\xe3\x80\x61\x5a\x0c\xf5\x5d\xe0\xea\xd9\x03\xf8\x7d\x41\ \x3e\xbb\x79\x0b\xd5\xb5\xc5\xe8\x63\xe7\xe8\xbf\x13\xc3\xb4\x6c\ \x14\x5e\xfc\x79\x95\x4c\x75\x7f\xc8\xdf\x7a\x6e\xb4\x5d\xbe\xc5\ \x49\x60\x52\xb3\x6d\x17\x4b\xda\x24\x93\x26\x7d\xfd\x53\x64\xc4\ \x5c\xf2\x0b\xa2\x98\xa6\xc4\xb2\x3d\x4c\x0c\x75\xd1\x79\xb1\x81\ \xf8\xf8\x5d\x56\x3f\xbe\x99\x35\xf5\x95\x08\xd9\xc7\x48\x77\x03\ \x99\xac\xc4\xb4\x24\x8e\x23\x09\x86\xcb\x48\xde\x4b\xd0\xf0\x97\ \xb6\x9e\xbd\x2d\xfc\x02\x18\x05\x74\x4d\x3a\x0a\xc3\xb4\x89\xa7\ \x4c\x7a\x6f\xdf\x43\x9b\xb3\x84\x70\x64\x16\x89\xf8\x04\x9d\xe7\ \xff\x48\xec\xfa\x39\x1e\xa9\x78\x84\xcf\x7f\x7d\x37\x05\xc1\x61\ \x12\x03\x87\x89\xc7\x13\x64\x75\x13\xdb\x96\x64\x32\x29\xfc\xa1\ \x42\x84\x98\xcb\xd0\x95\xb7\xf5\xbd\x27\xf5\xdf\x98\x92\xbb\x40\ \x52\x29\xa5\x34\x69\x29\x0c\x43\x12\x4f\x1a\xc4\xee\x19\x2c\x5d\ \x54\x81\x50\x16\xef\x1f\xf8\x31\x01\x9f\x60\xdb\xf6\x97\x29\x2d\ \xcf\x41\x1f\x6e\x62\x2c\x36\x42\x3a\x63\x91\x48\x26\x40\xb9\x68\ \xbe\x20\xbe\xdc\x72\x72\x72\x4b\xe9\x3f\x77\x82\x33\x57\x63\x47\ \x93\x3a\xed\xc0\x94\x52\xca\x06\xd0\x4c\xe9\x92\xd1\x25\x93\xd3\ \x12\x6f\xa0\x90\x39\xa5\x35\x9c\x6a\xda\xc7\x9d\xbe\x5e\x76\x7f\ \xf7\x1b\x94\xe4\xf5\x30\xd4\xd9\x4d\x36\x9b\x41\x08\x0d\xdb\x96\ \x58\x86\x81\x37\x27\x4a\x7e\xfe\xa3\x88\x89\x31\x9a\xdf\xfb\x7d\ \xe6\x50\xfb\xf4\xc9\x8b\xb7\xf9\x35\x70\x0f\x30\xff\xf9\x7e\x34\ \xdd\x52\x08\x5d\x32\x35\x63\x61\x11\xc6\x36\xa6\xe9\xb8\xf4\x01\ \x9b\x9e\x5a\xc5\xe8\xad\x23\x64\xc3\xf9\x48\xdb\xc1\x34\x4d\x5c\ \x57\xc7\xa3\xe5\x90\x17\x5d\x8e\x13\xcf\xd2\xd3\xd6\xe8\xec\x3f\ \xd6\xdb\xfb\xd7\x1e\x0e\x65\x4d\x5a\x80\x7e\x20\xa5\x1e\x28\x19\ \xcd\x30\x5c\x54\x56\x92\xd2\x5d\x24\x7e\xae\x9c\x6f\x60\x41\x75\ \x31\xb3\x82\x23\x44\xc2\x61\x10\x1e\x92\xc9\x38\xae\xf2\x10\x0c\ \x97\xe3\x15\x05\x8c\x76\x7e\xa8\xda\xda\x2f\x8d\xbe\xd9\x6c\x1d\ \x9d\xc9\xd2\x0c\xdc\x06\xc6\xee\xc3\x9d\x07\x1f\xa8\x66\x58\x0a\ \xd7\x90\x38\xca\x4f\x2a\x99\xa0\xb6\x6a\x2e\x0b\x2b\x04\x79\x41\ \x17\xc7\xb1\x71\x1c\x45\x30\x52\x8e\x10\x85\x98\xa3\x03\x9c\x69\ \x69\x48\xfd\xb6\x39\x75\xea\xd6\x18\x7f\x02\x7a\xef\x83\x67\x00\ \x43\x3d\xa4\x1e\x35\x47\x81\xab\x04\xca\x4c\x53\x56\x68\xb1\xac\ \xae\x80\x90\x88\xe1\x0f\x14\x92\x36\x20\xaf\xa8\x0e\x73\x74\x94\ \xc1\xae\x46\xf7\x8d\xc3\xb7\x3a\x4e\xdf\xa4\xc1\x92\x5c\x04\x86\ \x80\x29\x40\xff\xcf\xab\xff\x4d\x10\xf0\x7b\xc9\xc9\xd1\x28\x0c\ \x1a\x2c\x5d\x59\x8d\x9b\xee\x21\x2f\x5a\x8e\xed\x99\x47\x20\x10\ \x22\x76\xb6\x85\x23\xcd\x57\x06\x0e\x9c\x75\x8e\xa6\x4c\x8e\x03\ \x31\x60\x1c\x48\x2b\xa5\xe4\xff\x02\xff\x4b\x10\x9f\x9c\xec\x96\ \xd9\xee\x95\x75\xab\x9f\x2f\x34\xac\xeb\x44\x8a\x4a\x08\xe6\xd4\ \x92\x88\xf5\xd2\x72\xe2\xd4\xf4\xbb\xe7\xb3\xad\xdd\x03\x1c\x05\ \xae\xdd\x8f\x23\x01\x98\x0f\x8b\xe3\xa1\x82\xb7\x9a\xdc\x3f\x57\ \x17\x8f\x8b\x9d\x8b\xed\x8d\x73\x2b\x37\x10\x4e\x0f\xd2\xd1\x74\ \xd0\x7a\xfd\xc8\xc0\xb9\xce\x01\x9a\x4c\xc9\x59\x60\x04\x98\xbe\ \x1f\x87\xfb\x71\xc0\x0f\xce\xfc\xb9\x45\x3c\xff\xd6\xf7\xf2\xae\ \x37\xfe\x74\x91\xfa\xd2\xba\x60\x57\xae\x9f\x3d\xc0\x46\xa0\x06\ \x28\x00\x34\xa5\x14\x9f\x64\xff\x01\x38\xa4\x6e\x5f\x55\x49\x82\ \xf9\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x04\xb8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x04\x4a\x49\x44\x41\x54\x48\xc7\xc5\ \x56\x61\x4c\x5b\x65\x14\xfd\x6c\x32\xd3\x69\x20\x0e\x65\x24\x4b\ \x37\x56\x5a\x8a\xb3\xd2\x4e\xa5\x42\x71\x43\xc0\xb5\x94\x10\xe6\ \x02\x42\x13\xaa\x63\xa3\x63\x63\xd9\x18\x59\xb7\xa6\x01\xa3\x08\ \x88\x61\x0b\x29\xb2\xcd\x29\x66\xba\x81\x84\xda\x8a\x89\xd4\x00\ \x29\x43\x33\x1c\x20\xa5\x50\xd7\x6a\x57\x4a\x23\xc4\x6c\x51\x59\ \x94\x31\xbb\xf8\xc3\x6e\xbb\xde\xbb\xbc\x45\xd4\x15\x12\x33\xb5\ \xc9\xc9\x4b\x5f\xdf\xbd\xe7\xfb\xce\x3d\xe7\x7d\x65\x00\xc0\xfe\ \x4d\xb0\xff\x8d\x00\x3f\x31\x08\x85\x4a\xa5\x32\x28\x14\x8a\x23\ \x3c\x1e\xef\x65\xfc\xbe\x1f\x51\x8c\x50\x22\xe2\x10\xbc\x7f\x44\ \x80\x9f\x8d\x52\xa9\xb4\xb2\xae\xae\xee\xe3\xfe\xfe\xfe\x4b\x1e\ \x8f\xe7\x46\x30\x18\xbc\x35\x3e\x3e\x7e\xd5\x66\xb3\xf9\x4c\x26\ \x93\x5d\x22\x91\x18\x39\xa2\xfb\x97\x22\xba\x5b\xf3\xf4\xb2\xb2\ \xb2\x77\x1d\x0e\x87\x3f\x10\x08\x80\xd3\xe9\x84\xb6\xb6\x36\x30\ \x9b\xcd\xd0\xd1\xd1\x01\x13\x13\x13\xe0\xf5\x7a\xc1\x62\xb1\x04\ \x0b\x0b\x0b\x3b\xf1\xf9\x1c\xc4\xca\x48\x24\x7f\x5b\x39\x35\x1f\ \x19\x1d\xfd\xde\xed\x76\x83\xe9\x95\xda\xdf\xf2\xf7\x1b\xaf\x15\ \x34\x1c\x0b\x6b\xdf\xb6\xc2\xd6\xba\x37\x43\xbb\x1b\xcd\x3f\x77\ \x5a\x3f\x0a\xe3\x6e\xc0\x6a\xb3\x5d\xd1\x68\x34\x16\xac\xcb\x8c\ \x44\xf2\x27\xcd\x49\x16\x5a\x39\x35\x2f\x3d\x5c\x73\xf5\xe9\x43\ \xaf\x4f\xa5\x34\x77\x06\x59\x4c\x1a\xb0\xd8\xcd\xc0\x56\x67\x82\ \xac\xd9\x32\xf3\xc2\x89\xae\xe9\xf6\xbe\xb3\x0b\x93\x93\x93\x50\ \x5f\x5f\x3f\x23\x10\x08\xea\xb0\x5e\x4c\x72\x2d\x45\xa0\x20\xcd\ \x49\x16\x5a\x39\x35\x97\x1f\xfd\xc0\xa9\x3e\xd5\xe7\x79\x76\x5b\ \x25\x3c\x5f\x56\x0b\xcf\x14\x18\x20\xf3\xcc\xe0\xcc\xa3\x6d\x03\ \x5f\x96\x7f\x78\xd6\x37\x3c\x3e\x11\xee\xee\xee\x86\xdc\xdc\xdc\ \x41\xac\xcf\x47\x44\xfd\x75\x17\x8b\x09\x0a\xec\x76\xbb\x97\x34\ \xd7\x54\x1c\xfc\x51\xd4\xf0\xfe\x68\x71\xa7\xe3\x2b\xe3\x39\x9f\ \xf7\xc5\x7d\x47\x60\xbb\xa1\x15\x4a\x4d\x27\xe1\xc0\xc8\xcc\x45\ \x79\x8f\xff\xb3\x64\xab\x7b\xe0\xd4\xb9\xf1\x1f\x48\xaa\x92\x92\ \x92\x20\xd6\x57\x21\x62\x11\x2b\x22\x11\xec\x45\x69\xe6\x69\xa0\ \x4a\x43\xfd\x34\x8b\x51\xc2\xc6\xac\x72\x78\xae\xa8\x1a\xb6\xe8\ \x5e\x83\xac\x97\x1a\x21\xa7\xbc\x19\x32\x74\x0d\xc0\xe2\x0b\x81\ \xad\xc9\x83\xc3\x03\x6e\xaf\xcf\xe7\x83\x8a\x8a\x8a\x6b\x58\xff\ \x06\x42\x80\xe0\x47\x22\x30\xa1\x15\x6f\x92\x5b\xe4\xb5\x6f\xb9\ \x59\x6c\x06\xac\x4c\x2a\x86\x98\x94\xdd\xb0\x3e\xdb\x00\xa2\x1c\ \x13\xac\xdb\x62\x84\x28\xc5\x5e\x60\x49\xdb\x81\x25\xea\x60\x6b\ \xef\xd7\xe7\xa7\xa6\xa6\x88\xe0\x26\xd6\x1f\x47\x08\x11\x0f\x44\ \x22\xd8\xe7\x72\xb9\xe6\xc9\x8a\xaa\x57\xcd\xd3\x34\x50\x96\x50\ \x04\x6c\xc3\x4e\x84\xfe\x0f\x3c\x86\x90\xd2\x75\x27\xd4\x8c\x04\ \x2f\xf8\xfd\x7e\xd0\x6a\xb5\xb4\x83\xa3\x88\x04\xc4\x83\x91\x08\ \x8a\x29\x44\xe4\xf3\x8a\xa6\xd6\xb9\xa4\x63\x3d\x43\xc2\xf7\xbe\ \x19\x13\xda\x7e\x1a\x63\x22\x5c\xb1\x04\x89\x24\x7a\x10\xdb\x43\ \xc3\x8a\xb1\x5f\x7a\x9e\x1a\x9a\xfb\xd4\xea\xf9\xf6\x32\x39\x09\ \xd3\x4e\x33\xa8\x5e\x6e\x07\x4a\x4a\x28\x85\x88\x7c\x5e\x7c\xd2\ \x7a\x31\xfe\x84\xcb\xb5\xf6\xf4\xe5\x49\xb6\x06\x35\x17\x92\x2c\ \x7a\x10\x7d\x12\x1a\x4d\x19\x99\xb7\x1b\xc7\x66\xdd\x9e\xa9\x40\ \xb8\xa5\xa5\x05\x64\x32\xd9\x10\xd6\xef\x58\x6e\x06\x71\x14\x7f\ \x4a\x28\x39\xa3\xbd\x6f\x70\x41\xdf\xf5\xb9\x3f\xb1\xfd\xc2\x17\ \x2c\x2e\x0f\xd8\x7a\xdd\xed\x5d\x24\x3b\xe6\x1c\xd4\xbc\xd7\xed\ \xfb\x75\x78\x78\x18\xd4\x6a\xf5\x42\x74\x74\xf4\x19\xac\xdf\xbc\ \x9c\x8b\x78\xb4\x0b\x8a\x3f\x25\x94\xb6\x4e\x3e\x27\x2b\x92\x5b\ \x68\xa0\xa4\x39\xc9\xe2\xf1\x07\xc2\xd4\x5c\xbf\x6b\xd7\xad\xf4\ \xf4\xf4\xeb\x58\xd7\x8b\xa0\xb0\xc9\x23\xe6\x80\x23\xa1\x17\x57\ \x0e\xc5\x9f\x12\x4a\x21\xa2\xdd\x90\x15\xc9\x2d\x34\x50\x22\x26\ \x59\xf0\x99\x05\xa5\x52\x19\x4a\x4d\x4d\x85\xfc\x34\xe1\xf5\x83\ \xdb\x36\x5c\xc1\xda\x03\x94\xe8\xa5\x08\x78\xdc\x3b\x25\x93\xe2\ \x4f\x09\xa5\x10\x91\xcf\xc9\x8a\xe4\x16\x1a\x28\x69\x8e\xb2\x9c\ \xe6\xf3\xf9\xce\xac\xc7\xe3\x6f\xd4\xe4\x25\xc2\x3b\x7b\x52\xa0\ \x56\x27\xbb\x44\x6e\x5c\x4c\x72\xb7\xb7\xe9\x1d\x12\x31\x17\xff\ \x2a\x2e\x44\xc7\x39\x2b\x56\x73\x03\xcd\xb8\x8f\xb1\xd1\x4d\x6b\ \x57\x85\x2a\x37\xad\x83\xa6\x22\x29\x74\x54\xa5\x41\xe3\x8e\x27\ \x66\x17\x93\x44\x3a\x0f\x78\x9c\x5c\x51\xdc\xe0\x04\x9c\x05\x13\ \xb8\xab\x80\xbb\x2f\x47\x92\xf3\xd9\xa2\x47\x42\xc6\x6c\x21\x98\ \x4b\x92\xa1\xeb\x50\x3a\x34\xe9\x9f\xbc\x4d\xb2\xec\x91\xc9\x11\ \xad\x20\xeb\x91\xbf\x29\x44\xdc\x95\xcf\xdd\xa7\xdf\xc5\x48\xd2\ \xaf\x12\xae\xfa\xae\x5a\x2d\x82\xd6\x52\x39\xec\xd1\x88\x7d\x78\ \x5f\x7b\xcf\xce\x64\x8e\xa4\x5b\x23\x7e\x78\x36\x2f\x79\x35\x35\ \x2f\x47\x3c\x74\x4f\x0f\x7d\x6e\x66\xa4\xbd\xf6\x4e\xf3\xff\xe4\ \x5f\xc5\xef\x49\x57\xd6\xb7\x03\x79\xba\xe9\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x05\xb0\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x05\x77\x49\x44\x41\x54\x48\xc7\x95\x55\x7b\x4c\x53\x77\ \x14\xfe\x0a\x2d\x7d\xf0\x1c\x94\x67\x79\xad\x16\x61\x20\x0c\x21\ \x19\xf1\x31\xdc\x26\x81\xe1\x24\x4e\xc4\x2d\x19\x8b\xd1\x18\x47\ \x32\x97\x98\x2d\x66\xce\x18\x97\x91\x68\xd8\xf6\xc7\xfe\x71\x4c\ \xb7\xb8\x64\x13\x1d\x99\x64\x66\x59\x8c\xc9\x04\x8c\x03\xff\x90\ \x81\x0a\x4c\x10\xf7\xc0\x29\xe3\xfd\xa8\xb4\xb4\xbd\x6d\x6f\x7b\ \x77\xce\x0f\x0a\x3a\x75\x73\x27\x3d\xf9\xdd\x7b\x7b\xef\xf7\x9d\ \xf3\x9d\xef\x77\xaf\x4a\x51\x14\x94\x96\xed\x85\x5f\xf6\x69\xb2\ \x73\x0a\x3e\x8e\x7a\x42\x1d\x91\x9f\x9b\x7c\x57\xf2\xf8\x8b\x64\ \xd9\x27\x5b\xcc\x89\x06\xaf\xec\x5b\xa1\x09\xd1\xea\xbd\x6e\xd5\ \xd4\xd6\xaa\x97\x0b\x26\x67\xfa\x86\xf0\xb8\xc1\x04\x1b\x36\xec\ \x47\x59\xd9\xbb\xd8\x52\xb5\xff\xa4\xf2\x1f\xf1\xd5\x89\x16\x85\ \x1e\x4b\xfd\x5f\x04\x80\x9a\x52\xc5\xa7\xaa\xfa\x63\x97\x05\x90\ \x83\x72\xda\xb5\x94\x56\xf7\x3c\x81\x97\xd2\x64\x5a\xf9\xcd\xe3\ \xe2\x07\xcd\x2f\x4c\xa0\x11\x7c\x0d\x5f\x7f\x51\x77\x6b\x06\x70\ \xd3\x89\x4d\x5a\xca\xbb\x4e\x60\x4c\x9a\xbf\x73\x53\xd5\xeb\x95\ \xb4\xa4\x3f\x36\x41\x72\xc2\x53\x30\x25\x64\x23\xde\xb8\x02\x7d\ \xd7\x5a\xbf\xff\xfd\xd7\x39\xb8\x7c\x80\xcb\x0b\x38\x3c\x4b\x69\ \x9d\x03\xe8\x87\xc2\x55\xeb\xb4\xb4\x14\xff\x13\x2c\x29\x29\x09\ \xd1\xd1\xd1\x0f\x12\x78\x65\x2f\x64\xaf\x17\x3e\x1f\xa1\xaa\x54\ \x3f\x77\xb4\x5f\xb6\xce\xd1\xa1\x83\xd4\x73\x78\x97\x72\x8e\x48\ \x26\xfc\x40\x56\x41\x21\x3d\xa5\x7d\x4e\xaf\x8b\x81\x5e\x1f\x8b\ \xca\xca\x4a\x1c\x3e\x7c\x18\xb2\x2c\x2f\x48\xbe\x14\xdc\x31\x9e\ \x59\xbb\x51\xfc\xe1\x27\x02\x99\xc8\x9a\xcf\x7e\xdb\xb1\xf1\xad\ \x92\x17\x5d\x32\x20\xfb\x02\xe3\x61\x6e\x3a\x9f\x05\x24\xaa\x3f\ \x3c\xfc\xc9\x82\x30\xfd\x38\xd2\xcc\x19\xf0\x52\x71\x0c\xee\xf7\ \xfb\x1f\x20\x10\x1d\x84\xea\x06\xa1\x56\xf5\x63\xeb\x16\x8b\x48\ \xaf\xa4\x34\xdd\xf8\x8d\x74\xa7\x6a\x27\xed\xc0\xf0\x14\x70\x6b\ \x0c\x18\xf8\x13\x18\x1a\x99\x2f\xeb\xfd\xda\x0f\x9e\x96\x24\x69\ \xb7\xc7\xe3\x79\x24\xf8\x62\x07\x7c\xdd\xef\x57\x81\x15\x92\x65\ \x7f\xf9\xae\x9a\xf5\x5f\xaa\x46\x25\x58\x87\x75\x88\x30\x00\xe6\ \x44\xc0\x40\x55\xeb\x82\x9c\x54\x91\x0b\x6a\xba\xf1\x85\xb7\x5f\ \x85\x2c\xfd\xf1\xe9\x89\x86\x93\x31\x44\xf2\x19\xc9\x3b\xc5\x04\ \x0f\x95\x28\x70\xad\xa5\xe5\x22\x91\x78\x93\x4e\x9f\x66\x17\x86\ \xc0\x35\x67\x43\xcf\xb5\x2e\x48\x23\x5e\xd8\x65\x37\x82\x78\x26\ \x92\x84\xa0\x20\x2d\x6e\xdd\x8e\x80\xc5\x92\x81\xe3\xc7\x8f\xd7\ \x4e\x4f\x4f\xd7\xb6\xb5\xb5\xdd\x24\xa2\xd5\xf4\xe0\xcc\x43\x08\ \x14\x1e\x30\x15\xe6\x3b\x90\x90\x90\x54\xd9\xdc\xfc\x13\x22\xc3\ \x43\x41\x12\xa0\xb3\xb3\x13\x92\xdb\x0d\x63\x6c\x3c\x22\xc2\xc2\ \xa0\xd1\x6a\x60\x30\x68\xe0\x71\xfb\xb1\x6a\xf5\x6a\xe1\x9c\xf1\ \xf1\x71\x64\x64\x64\x64\x46\x44\x44\x4c\x1f\x3a\x74\xa8\x80\x20\ \xaf\xdd\x47\x40\xc0\x45\xd9\xd9\xd9\x5f\xed\xda\xf5\x46\x96\xcb\ \xe5\x84\xc3\xe1\x80\xe4\xf1\xa2\xbb\xf7\x3a\x2c\x99\x59\x28\x24\ \xd7\xb0\xce\xa1\xa1\xa1\x88\x89\x89\xa1\x0e\xe6\xb7\x8f\xcd\x66\ \x07\x55\x4f\xc3\x57\x61\x64\x64\x04\xdb\xb6\x6d\x63\xb2\xce\xfa\ \xfa\xfa\xb8\x40\x27\x82\xc0\x60\x30\x7c\x58\x5d\x5d\x9d\x95\x91\ \x61\xc1\xf0\xf0\x30\x34\x1a\x0d\x74\x3a\x1d\x72\x72\x72\xd0\xdf\ \xdf\x8f\xf8\xf8\x78\x71\x8d\x63\x72\x72\x12\x56\xab\x55\x74\x37\ \x3b\x3b\x0b\xa7\xd3\x49\x8e\x0a\x87\xd9\x6c\x46\x5a\x5a\x1a\xca\ \xcb\xcb\x83\x9b\x9a\x9a\x3e\x9f\x98\x98\xd8\xba\x48\x40\x0e\x30\ \x04\x00\xb8\x1a\x3e\x66\x10\xde\x17\x99\x99\x99\x68\x6d\x6d\x85\ \xd1\x68\x14\x76\x54\xab\xd5\xc2\x31\x54\x14\xcb\x22\x8e\x9d\x4e\ \x17\x24\xa7\x1b\xd7\x7b\xae\xe3\xce\xed\x3b\xfc\x7c\x3e\x41\x19\ \xb9\x0b\x41\x30\x36\x36\xa6\xd0\xb0\x40\x5d\x20\x35\x35\x15\x51\ \x51\x51\x08\x09\x09\x11\xed\xeb\xf5\x7a\x14\x16\x16\x92\x1c\x36\ \x41\x4c\x3a\x83\xad\x39\x3a\x3a\x8a\xde\xde\x5e\xd8\xed\x76\x3a\ \x1e\xc3\xf0\xd0\x10\xa6\xac\x33\x88\x8b\x89\x43\x30\xd4\xb4\x83\ \xa0\xe3\x7a\x05\x01\x81\xfc\x95\x97\x97\x57\xc4\x72\x9c\x39\x73\ \x46\x00\x66\x65\x65\x21\x25\x25\x45\x00\x30\x19\x77\xc3\x3a\x0f\ \x11\x10\x13\xb3\x34\x81\xd5\x9c\x66\x41\xee\xca\x5c\x5c\x8c\x3c\ \x06\x7b\xb7\x0f\x3e\xb7\x10\x83\xb7\xa8\x5f\x10\xb8\xdd\xee\x1b\ \xc9\xc9\xc9\x28\x29\x29\x11\x1a\x33\x09\xbb\x87\x35\x2d\x2e\x2e\ \x46\x57\x57\x17\x06\x06\x06\xc4\xf0\x59\x26\xad\x56\x8b\x30\x72\ \x54\x6e\x6e\x2e\x96\x2f\x5f\x8e\xe8\xc8\x68\x38\x3d\x0e\xa8\x9c\ \xaf\xc1\x99\xac\x42\x93\x72\xee\x7e\x9b\x06\x07\x07\x47\xb2\x14\ \x1c\xb1\xb1\xb1\xa8\xa9\xa9\xc1\xe0\xe0\x20\xba\xbb\xbb\xd1\xd0\ \xd0\x20\x2a\x8f\x8b\x8b\x13\x69\x32\x99\xc0\xc5\x30\x01\xeb\xcf\ \x5d\xf4\xf4\xfc\x82\x53\x0d\xa7\xf0\x52\x49\x05\xe2\x92\x8d\xb0\ \x4b\x36\xff\x42\x07\x8a\x20\x20\x19\x26\xce\x9f\x3f\x8f\x35\x6b\ \xd6\x2c\x32\xa7\xa7\xa7\x0b\x20\xbe\xd6\xdc\xdc\x42\x32\x69\x10\ \x19\x19\x29\xe6\x30\x3d\x3d\x89\xab\x57\xaf\x0a\xb9\xdc\xbc\x47\ \xc8\x00\x55\xaf\x54\x22\x31\x31\x51\xb8\x6f\xd9\x32\x8b\x91\xe6\ \x13\x22\x4c\xc3\x9b\x8c\x7d\x4d\xeb\x3a\xd2\xbc\xb1\xae\xae\x2e\ \x91\x87\x1d\xd8\x80\x6c\xc7\x0b\x17\x2e\x08\x69\x74\xba\x10\x1c\ \x39\xf2\x09\x0d\xdc\x25\x86\x9d\x92\x92\x8a\x84\x84\x44\xe4\xe7\ \xe7\xa3\xa2\xa2\x82\x95\x80\x5f\xf1\x23\x2f\x37\xcf\xde\xd7\xd7\ \xf7\x3c\x41\xdc\x14\x20\x3c\xc4\x7b\x24\xab\x2d\x2a\x2a\x52\x5a\ \x5a\x5a\x16\x3f\x93\x34\x0f\xa5\xbd\xfd\xa2\xd2\xd6\x76\x45\xd9\ \xb3\xe7\x88\xb2\x73\xe7\x6e\x65\xdf\xbe\xbd\xca\xb9\x73\x67\x17\ \xef\xb9\x74\xe9\x92\x52\x5a\x5a\xca\xe3\xed\xa2\xfc\x88\x3f\x0f\ \x02\x8f\x09\xb8\x2d\xf6\xff\x3d\x91\x40\xf9\xc3\xe6\xcd\x9b\x15\ \xb2\xa3\xd2\xd1\xd1\xa1\x1c\x3c\x78\x40\x59\xbb\xf6\x59\x65\xc7\ \x8e\x5a\xe5\xe8\xd1\x2b\x8a\xcd\x36\x0f\xdc\xd8\xd8\xa8\x90\x19\ \xe8\x7b\x87\x1f\x29\xdf\xa1\x34\xdf\xf7\xb6\x0b\x10\x04\xb6\x7f\ \x20\xd8\x29\x14\xeb\xe9\xd5\x70\x83\x36\x1b\xbf\x0e\xad\x94\xdf\ \x51\xbe\x67\x32\xa5\xb7\x6f\xdf\xfe\xa6\x42\x3b\x98\x5f\x07\x8d\ \x94\xd5\x0b\x15\x3f\x18\x8f\x22\x60\x97\xdc\x13\x9b\x28\x4b\xb0\ \xf0\xe1\x5e\x88\xb2\x85\xd4\xe2\x5f\xe2\x6f\x80\x26\xfe\x87\xb0\ \x39\x3e\x91\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x2b\x93\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x80\x00\x00\x00\x80\x08\x06\x00\x00\x00\xc3\x3e\x61\xcb\ \x00\x00\x2b\x5a\x49\x44\x41\x54\x78\xda\xed\x9d\x07\x78\x15\x45\ \xd7\xc7\xe7\x55\x44\xc5\x8a\x4a\x55\x8a\x80\x88\x60\xa3\x0b\x0a\ \x48\x57\x04\xe5\xa5\x77\x11\x50\x04\x41\x8a\x02\x0a\xf2\xd1\x5b\ \x50\x7a\x91\x1a\x7a\x28\xa9\x84\x14\x08\x21\x90\x40\x28\x01\x02\ \x84\x24\x90\x9e\xd0\x6b\x48\xa3\x09\x9e\xef\x9c\xd9\xd9\xbd\xbb\ \x77\xf7\xe6\xde\x9b\xdc\x24\xc0\x9b\xfb\x3c\xbf\x07\x08\x7b\x37\ \x3b\xf3\xff\xcf\x99\x33\xb3\xb3\xb3\x8c\x15\x7e\x0a\x3f\x85\x9f\ \xc2\x4f\xe1\xc7\xda\x67\x36\xfb\x1c\xe9\x8b\x0c\x2f\xac\x8c\x27\ \x57\xe4\x57\x85\xd0\xc3\x91\xb9\x48\x10\x92\x88\x40\xe9\x65\x2f\ \x72\x9e\x99\xf3\x1f\x60\x33\xd9\x7a\x3c\xba\x48\x61\x85\x3d\xbe\ \x42\x7f\x8c\xb4\x47\x26\x22\xce\x42\x68\x20\xde\x5e\x55\x1c\x6a\ \x6e\x2a\x03\xcd\x3c\xde\x86\x7e\xfb\x6a\xc1\xe0\xd0\x7a\x30\x25\ \xa2\x19\xa7\x47\xe0\x07\xd0\xc2\xe7\x25\x78\x65\xd1\xd3\xc0\xa6\ \xb0\x2d\x78\xa6\x67\x0a\x2b\xf3\xf1\x08\xdb\x13\x85\xc8\xe1\x24\ \x72\xf1\x45\xcf\x71\xa1\x1b\x6e\x2b\x07\x6d\x76\x54\x85\xfe\xc1\ \xb5\x60\x5c\x78\x13\x98\x7a\xba\x79\xb6\xb4\xde\x5e\x09\xbe\x0e\ \x78\x05\xbe\xf4\x7f\x59\x32\xc1\x64\xb6\xb5\xd0\x04\x8f\xa6\xf0\ \x1e\x24\x74\x99\x65\x2f\x41\xf5\x75\x25\xa0\xb9\x67\x25\xe8\xb8\ \xb3\x06\x0c\x08\xae\x0d\xd3\x4e\xb7\xb0\x99\xd9\x51\xed\x60\x65\ \xdc\x8f\xfc\x4f\xfa\x77\x23\xf7\x32\xdc\x00\x85\x26\x78\xf4\x0d\ \x90\x3a\xf4\xe0\x27\x30\x3d\xb2\xa5\x21\xf3\xcf\x74\x81\x55\x28\ \x2c\xe1\x7d\x7e\x36\x78\x5f\x98\x0d\x41\x57\x56\x41\xd8\x0d\x0f\ \x4e\x5c\xc6\x11\x48\xc9\x8a\xe0\x9c\x43\xe6\x9f\xed\xca\xbf\xd7\ \x62\x7b\x69\xc5\x00\x39\x36\x81\xd4\xe5\x84\xf3\x7c\xa3\xf0\x93\ \x67\x89\x1c\xcc\x88\x6c\xc5\xf1\xbe\xe0\x04\x87\xaf\xbb\x72\x92\ \x32\xc3\x05\x27\x14\x92\x33\x4f\x9a\xc8\x32\x91\x92\x75\x4a\x41\ \x3e\xd7\xfb\x9b\x9e\xd3\x18\xc0\x6e\x13\xa0\xf8\x14\x95\x6a\xbb\ \x94\xa5\x44\x32\x02\x3b\xa7\x52\xf8\xd3\xff\x14\x8a\xe6\xc8\xcf\ \x2c\xd6\xb4\x2c\x56\xf2\xcc\xa8\xd6\x9c\xd3\xb7\x02\x21\x31\xf3\ \xb8\x82\xc9\x04\xe1\x1a\x43\x24\xcb\x18\x98\x80\xce\x33\xe6\x68\ \x63\xf8\xd4\xe3\x05\x9d\x01\x88\x26\xdb\xc5\xe8\x20\x3b\x13\xa0\ \xf8\x74\x5d\x13\x4f\x36\xe7\xe7\xab\xed\xf2\x26\xb0\x19\x2c\x8a\ \xf5\x66\xa5\x0b\x4d\xe0\xc8\xcf\x4c\xd6\xaf\xc6\xba\x52\x30\x2b\ \xea\x0b\x4e\x62\xe6\x31\x1d\x49\xdc\x08\x32\xe1\xba\xc8\x20\x19\ \x41\xe6\x24\x3f\xcf\xc0\x90\x7a\xbc\xb5\x1b\x19\x40\x63\x82\x3f\ \x70\xf8\x68\x6e\x02\x2e\xfe\xcb\x30\xe9\x64\x0b\xe5\xba\x88\x3a\ \x64\x82\xe9\x2c\xba\xd0\x04\x8e\xfc\xcc\x60\x53\x5b\x7a\xbd\x03\ \x4e\xd1\x5f\x82\x73\xc2\x60\x48\xc8\x3c\xaa\xa0\x37\x83\x1c\x15\ \x8c\x0d\x91\x8c\x9c\x4c\xf5\xe5\xe7\xa2\xd1\x82\x25\xf1\x75\x26\ \x18\xcd\x46\x28\xf3\x04\x42\xfc\xc9\xa7\x5a\xf2\xf3\x98\x53\xc7\ \xe5\xad\x42\x13\x38\xb8\x0b\x08\xee\x1b\x54\x1b\xfe\x8c\x6e\x03\ \x5b\x53\xc6\xa2\xf0\x61\x2a\x64\x23\x1c\x35\x8c\x0c\x46\x66\x08\ \xbb\xe1\xce\xcf\xf5\xc5\x8e\x8a\x56\x0d\xa0\x31\xc1\x58\xf6\x33\ \x73\x62\x6b\x48\xfc\x29\xa7\x5a\xf1\x73\x10\xc1\x57\xd7\x70\xe4\ \x7f\x13\x75\x36\x17\x9a\xc0\x71\x1f\x27\x96\x3c\xf2\x70\x23\xf8\ \xeb\x4c\x5b\xf0\xc1\xec\x3e\x1e\x33\xfa\xf8\xcc\x23\x66\x46\x30\ \x37\xc3\x51\x8b\x91\x21\xec\x86\x1b\x3f\x57\xbd\x2d\x65\x2d\xe6\ \x00\x96\x4c\x40\xe2\x4f\x8d\x68\xcd\xbf\x4f\x90\xf0\xe7\xc4\xc8\ \x82\xfe\x2e\xff\x9c\xa8\x5b\x68\x02\x87\x8d\x02\x60\xce\x99\x76\ \x9c\xc3\xd7\xb7\xa2\x01\x0e\x4b\x26\x50\x8c\x60\x6c\x86\x44\x1d\ \x92\x19\x42\xaf\x6d\x54\xce\x47\xfc\x76\xac\x09\x8c\x0d\x6f\x00\ \x83\x0f\x55\x87\x1e\x7b\xdf\xb4\x68\x82\xce\x81\x65\x61\x5a\xc4\ \x17\xfc\x3b\x0b\x63\x3a\xc3\xb1\x9b\x9e\x3c\xa1\x3c\xa7\x10\x01\ \x21\x68\x02\xf5\xb9\xeb\x6e\x2e\x57\x68\x82\xdc\xce\xfc\xbd\xb6\ \xb8\x18\xcc\x3d\xfb\x35\x27\xe2\xd6\x4e\x61\x00\x15\x99\x6a\x23\ \x58\x8f\x0c\x7e\x17\xff\x52\xce\x67\x04\x0d\x0f\x7f\x3e\x5c\x13\ \xda\xfa\x97\x56\x92\xc4\x66\xdb\x4b\xc2\xf4\xd3\x5f\xf2\xff\x5f\ \x14\xd3\x05\x4e\xdd\xf2\x47\xf1\x4f\xaa\x30\x0d\x31\xc9\x04\xea\ \xf3\xd5\xfb\x9f\x34\x81\x34\x76\xf7\xe0\xd3\xb6\xb9\x0b\xff\x93\ \xaa\x38\xbf\x01\xf3\xce\x7e\xc3\x89\xcb\x38\xa4\x10\xaf\xa0\x37\ \x43\x76\x91\x21\xec\x86\x2b\xb8\x9d\xfb\x3f\x4c\x28\x7f\x50\xce\ \x6b\x89\x51\x47\x3e\x87\x0e\xfe\xef\xc1\x8c\xd3\x6d\xf8\xbf\x17\ \xc7\x76\x45\xf1\xfd\x54\x23\x8a\x13\x28\xfa\x09\x33\x33\x9c\x84\ \x90\x6b\x6b\x34\xe7\xa9\xb7\xb9\xfc\xff\x90\x09\x24\xf1\xc3\x3f\ \xd8\x50\x06\x9e\x9f\xf7\x0c\x8d\xa5\x07\xe2\x4f\x9f\xb6\xf3\xfb\ \x34\xd7\x9f\xfa\xe6\xf2\x57\x60\x74\x58\x53\x98\x1f\xd3\x1e\x36\ \x24\xfd\x8c\xc2\x1f\x34\xc3\xcc\x10\x99\x87\x35\x24\x58\x88\x0c\ \x89\x9c\xa3\x10\x93\xbe\x1f\xfb\xee\x55\xb0\x25\x65\x0c\x2c\x89\ \xed\xc6\x7f\x8f\x25\xe8\xff\x25\xf1\xc3\x55\xa8\x4d\xa0\x35\xc3\ \x7e\x34\x81\xfa\xfb\xf5\xb6\xfc\x2f\x98\x40\x88\x5f\x1f\x0b\xbb\ \x20\xe6\xbf\x30\x26\xac\x99\x64\x82\x71\x6c\xa8\x55\x13\xa8\x84\ \xa7\xef\xff\x1c\xda\x88\x9f\x43\xc6\xef\xd2\x6c\x14\x3a\x54\xa0\ \x37\x42\xbc\x39\x8a\x09\x64\x8e\xe8\x48\x54\xcc\x20\x19\xe2\xe0\ \xf5\x8d\xe0\x71\x7e\x82\xe6\xf7\x12\x4b\xe3\xba\xf3\xe1\x63\x52\ \xd6\x71\x14\x5c\x26\x5c\x47\x8a\x99\x19\xf6\x5f\x5b\xab\x39\x4f\ \xfd\x27\xda\x04\x8a\xf8\x15\x60\x61\x6c\x07\x85\xdf\x8e\x36\xcf\ \xde\x04\x1a\xe1\x2b\xc0\xa4\x93\x5f\x68\xbe\xef\x7e\x7e\x3c\x6f\ \x79\xb1\x19\x07\x04\xa1\x1c\x63\x23\x1c\x44\xf1\x0f\x0a\x03\xc8\ \x1c\xb6\x62\x06\xf3\xc8\x10\xc6\x23\x43\xc8\xd5\xd5\xb0\x36\x71\ \x10\xac\x43\xe8\xf7\x26\x65\x1d\xd3\x91\x6c\xd1\x10\xa6\xc8\x40\ \x26\x50\x97\x87\xca\xf8\xe4\x99\x40\x88\xff\x09\x16\x6e\x51\x6c\ \x47\x1d\xbf\x5b\x32\x81\x74\x0f\x3f\xf1\x1d\xe7\x12\x30\xec\x60\ \x63\xcd\x77\x36\x25\x0f\x83\x93\xb7\x7c\x21\x26\x63\x3f\x27\x96\ \x73\xc0\x82\x11\x42\x75\xd1\x41\x1b\x0d\xf4\x86\xb0\x1c\x15\xf4\ \x91\x41\x26\x49\x8d\xc6\x0c\xc7\xcd\xa2\x83\xd6\x10\x64\x02\x75\ \xd9\xa8\x9e\xd8\x2c\x96\xfe\x64\x98\x40\x11\xbf\x22\x2c\x89\xeb\ \xa4\x40\x02\x06\x5c\x9e\xa7\xfc\x7b\xec\xb1\x16\x26\x13\x4c\x60\ \x95\xe9\x7e\xfe\xeb\x8b\x5f\x80\x81\x21\x0d\x35\xdf\x5b\x9d\xd8\ \x0f\x0e\xdf\x70\x41\xd1\x43\xcc\x90\x4d\x60\x6e\x84\x03\x28\xf8\ \x01\x43\x13\x28\x64\xa2\x21\x38\x5a\x23\x24\x18\x62\xa9\x8b\xd0\ \x1a\x22\x29\xeb\xa8\x85\xa8\xa0\x8f\x0c\x07\xae\xaf\x55\xca\xf7\ \x67\xf4\x37\xd0\xc0\xb5\x04\x94\x5b\x55\x54\x8a\x04\xdd\x59\x99\ \xc7\xd7\x04\x42\xfc\x06\x28\xfe\xd2\xb8\xce\x0a\xeb\x93\x06\x41\ \x44\x9a\x3f\x44\xa7\x07\x41\xd0\xd5\xa5\xca\xcf\xc7\x1e\x6b\x29\ \x99\xc0\x89\xdd\x6a\xe6\xfe\x0e\xfc\x15\xdd\x5e\xf9\xbf\x15\xf1\ \xbd\xc0\x1f\xfb\xf9\xb3\xe9\xc1\x9c\x98\x0c\x19\xad\x09\xb4\x46\ \xd8\x6f\xc5\x08\xe6\x51\x41\x90\xa9\x8d\x0a\x09\x1c\x7b\xf2\x85\ \x30\x6d\x54\xc8\x32\x36\x04\x19\x80\xc4\x97\xcb\x48\xe5\x6d\xe0\ \x5a\x52\x99\x5b\x50\x4c\xf0\x58\x46\x02\x59\xfc\xad\x15\xe1\xef\ \xf8\x2e\x0a\x1b\x92\x07\xa3\xf8\x7e\x28\xfe\x1e\x05\x32\x81\xfc\ \xff\xd3\x22\xda\x72\xd4\xdf\x71\x3d\x37\x06\x93\x2c\x6f\x14\x7e\ \x9f\x44\x06\x11\xcc\x31\x36\x42\x08\x0a\x1e\x62\x66\x04\x23\x33\ \xa8\x0c\x91\x19\xaa\x8a\x04\x6a\xcc\xcd\x60\x39\x2a\x24\x1a\x76\ \x11\x48\x16\xa1\x37\x02\x89\x2f\x97\x71\xce\x99\xff\x42\x43\x95\ \xf8\x8f\xb7\x09\x14\xf1\xdf\x86\x65\xf1\x5d\x15\x24\xf1\x7d\x51\ \xf4\x40\x81\xc9\x04\x7b\xd1\x04\xea\x63\x89\x55\x09\x7d\xb0\x7f\ \x74\x46\xd1\xf7\x9a\xb1\x4f\x8b\xc6\x08\x5a\x43\xc4\x5a\x34\xc3\ \x7e\x63\x23\x08\x33\xc4\x73\xac\x99\xe1\x90\xa1\x19\x12\x75\xa8\ \xcd\x20\x99\xe0\xc0\xf5\x35\x4a\x39\xe7\x9e\xe9\x60\x28\xfe\xe3\ \x69\x02\x21\x7e\x43\x14\x7f\x79\x42\x77\x85\x8d\x29\x3f\x09\xf1\ \x77\xab\x0c\xa0\x35\xc2\xde\xab\x7f\x2b\xc7\xfb\x5c\x9a\x06\xa7\ \xd3\x76\xc2\x19\xec\x26\x88\xb3\x1c\x95\x09\x32\xf6\xe9\x88\xe1\ \x68\x8d\x10\xab\x31\x81\xb1\x19\xe2\x34\x46\x38\x20\xa2\x81\x6c\ \x02\xcb\x66\x48\xd0\x60\x32\x41\xa2\x82\x30\x40\x96\x8c\x14\x0d\ \x48\x7c\xb9\x9c\xf3\xce\x76\xcc\x56\xfc\xc7\xcb\x04\x8a\xf8\x95\ \x60\x45\x42\x0f\x85\x4d\x29\x43\x70\xa8\xe6\x03\x51\xe9\x01\xc8\ \x6e\x61\x82\xdd\x86\x66\xd8\x77\xed\x6f\x38\x74\x63\x23\x8a\xbe\ \x47\x85\xda\x04\x41\xfa\x88\xa0\x33\x81\x91\x11\xac\x9b\x21\x2e\ \x1b\x33\xc4\x65\x63\x86\x04\x9d\x19\xf4\x91\x41\x36\x43\x28\x8a\ \x2f\xd7\xcb\xfc\xb3\x9d\xa0\xa1\x5b\x49\x9b\x6e\x38\x11\x7c\x25\ \xd2\x23\x6b\x02\x21\xfe\xa7\xdb\x2a\xc1\xca\xc4\x9e\x0a\x2e\x24\ \x7e\xda\x0e\x21\xbe\x89\x68\x4e\xf6\x66\xd0\x9a\x40\x42\x31\x41\ \x86\xcc\x5e\x33\xd4\x26\xd8\x07\x61\x37\x37\x43\xc8\xf5\x15\xb0\ \xfb\xca\x5c\x8e\xeb\xf9\x51\x0a\xf2\xcf\xf6\x5f\x5f\x09\xe1\xa9\ \x9e\x26\x13\x64\xca\x1c\xd0\x11\x6f\x21\x32\x24\x28\x58\x36\x03\ \x89\x2f\xd7\xcb\x82\x98\xce\xf0\xa9\x5b\x29\x9b\xc5\xd7\x2c\x47\ \x9b\xc0\xdc\xb1\xc6\x9f\x7f\x74\x4c\xa0\x12\x7f\x55\x62\x2f\x85\ \xb5\x49\xdf\x61\xcb\x47\xf1\xd3\x76\x49\xa4\xef\xb2\x60\x84\x00\ \x8b\x46\x38\xa3\x41\x6d\x04\x95\x19\xd2\x4d\x66\x38\x78\x63\x2d\ \xf8\x5f\x9e\x09\x5b\xce\x0d\xd3\x5c\xcb\xe8\x23\x2d\x61\xc8\x81\ \x26\xf0\x8d\xcf\x87\x86\xd0\xff\x4d\x0c\x6f\x03\x5e\x17\xfe\x40\ \x43\xac\xe2\xbf\x23\x4e\x63\x08\x73\x23\x18\x9b\x21\xc1\x82\x19\ \x42\xaf\x3b\x2b\xd7\xb2\x30\xa6\x8b\xdd\xe2\xeb\x4c\x30\x91\xb9\ \x61\xcd\x17\x7d\x64\xc4\xff\x6c\x5b\x65\x70\x4e\xea\xad\xb0\x2e\ \xb9\x1f\x84\xa5\xba\xa0\xc8\x3b\x05\xbb\x0c\xc8\xce\x04\x26\x33\ \x18\x9a\x20\x03\x0d\x20\x08\xbb\xb9\x09\x73\x86\xc9\xf8\x3b\xfb\ \x2b\xbf\x7f\x4c\x58\x2b\x68\xe9\x59\x0d\xaa\xad\x29\xc5\x1f\x00\ \xa1\xbb\x86\x74\xe3\xa8\xf5\xf6\x77\xa1\x95\x57\x55\xa0\x55\x44\ \x2d\x3c\xab\x40\x73\xcf\xca\xd0\xcc\xb3\x12\x7f\x6e\xe0\xd5\x45\ \xcf\x41\xb1\x79\x45\xa1\xe6\xa6\x72\x30\xe2\x60\x2b\xf0\xbd\x3c\ \x15\x4e\xa7\xfb\x59\x8c\x08\xf1\x16\x8d\x10\xaa\x31\x42\xe8\x0d\ \x67\x4d\xdd\x74\xda\xf9\x51\xb6\xcb\xcd\x6c\x36\x41\x81\x2f\x51\ \x57\x89\xbf\x26\xa9\x8f\xc2\x7a\x14\x22\xec\xa6\x0b\x44\xe2\x58\ \x3f\x32\x9d\xd8\x69\xc5\x08\xbb\x54\x26\xd0\x1b\xe2\x0c\x27\x50\ \x47\xc8\xb5\xe5\xd8\xc5\x0c\x56\x7e\xef\xe4\x13\x6d\x81\xae\x85\ \x44\xa4\x49\xa4\x66\x1e\xef\xc0\x0f\xc1\x0d\xc1\x29\xaa\x1d\xbf\ \xe1\x42\xb7\x5f\x69\x31\xc6\xec\xe8\x36\x7c\x8d\xde\x8c\xc8\xd6\ \x30\xed\x74\x4b\x98\x12\xd1\x1c\x26\x9d\x6a\x0a\x13\x4e\x35\x81\ \x9f\x0f\xd5\x85\x96\xdb\xdf\xc6\x0a\x7e\x16\xde\x58\xf2\x22\x0c\ \xdc\xd7\x14\xf6\x5c\x9d\xaf\x32\x81\xbe\x8b\xc8\xce\x08\xa7\x6e\ \x79\x6b\xea\x86\xf8\x33\xb2\x03\x14\x9b\xff\xd4\x63\x6e\x02\x45\ \xfc\x2a\xb0\x36\xf9\x5b\x85\x0d\x29\x03\x78\xcb\x8f\xc4\x96\x23\ \x89\x6f\x22\x4a\x63\x04\xbd\x21\x8c\x4d\x10\x20\x0c\x80\x64\x48\ \x84\x5c\x5f\x0e\x9b\xcf\xfd\xa4\xfc\xce\x01\xfb\x3e\x85\xf2\x2b\ \x5e\xe3\xc2\xb7\xf0\x78\x17\xfe\x38\xde\x1a\x96\xe2\xd8\x7a\x71\ \x5c\x27\x3e\xbf\x6e\xab\xf8\xe3\x4f\x36\x82\x71\x27\x3e\x85\xdf\ \xc3\x1b\xc0\x98\xe3\xf5\xa1\x5b\x60\x35\x28\xb9\xb4\x18\x3f\xf7\ \x9c\xd3\x7d\x79\x99\xe2\x32\x43\x04\x5a\x33\xc4\x6b\x8c\xa0\x35\ \xc3\xc6\x94\xef\x35\x75\x44\x54\x5b\x5b\x1a\x6a\x6e\x79\x3e\xc7\ \x06\x20\x68\xd9\x3a\x9b\xc9\x32\x51\x8d\xf2\xf9\x6b\x02\xe9\x59\ \xbb\xf0\x46\x28\xfe\xba\xe4\xbe\x0a\x54\x50\xa9\xe5\xfb\x69\x49\ \x37\x8a\x04\x5a\x13\x44\x1b\xa2\x8d\x06\x47\x6e\x6e\xc4\xbe\x7d\ \x88\xf2\xfb\xbe\xdf\xf7\x19\x6f\xa5\x44\xbf\xbd\x0d\x78\x66\xbd\ \x2c\xbe\x1b\x2c\x8d\xb3\x26\x7e\x2b\xab\xe2\x8f\x3a\x56\x17\x7e\ \x39\x5a\x1b\x46\x84\xd5\x84\x4f\xb6\x95\xe6\xe6\x1a\x14\xdc\x0c\ \x4e\xde\xf2\xcc\xc6\x04\x32\x5a\x23\xf8\x5f\x9e\xae\xa9\x27\xf9\ \xda\xa9\x05\xe7\x54\x7c\x5a\x86\xc6\x9f\x6f\xfc\x94\x2d\x45\x45\ \x5a\x22\xaf\xe5\xa7\xf8\xa9\x8d\x5c\xab\xc0\xfa\x94\xef\x14\x36\ \x9d\xfb\x01\x5b\xfe\x26\xde\x67\x46\x1a\x42\x11\xc0\x08\xeb\x46\ \x38\x9d\xe6\x03\xde\x97\xc6\x2b\xbf\x6b\xec\xd1\x2f\x79\xab\x24\ \xe1\xfb\xef\x6d\xc8\x13\xab\xbc\x12\x7f\xd8\x91\x8f\x60\xe8\xe1\ \x0f\xa0\xfd\xce\x8a\xf0\xec\xdc\xa7\x61\x50\x48\x73\x38\x99\xa6\ \x36\x81\x75\x23\x50\x8e\xa2\xae\x2b\x62\x59\x7c\x4f\x2e\x60\x4e\ \xba\x01\x65\x21\x6a\x1b\xe6\x8b\x8a\x4c\x40\x3a\x20\xa5\xf2\x43\ \xfc\x8a\x24\x7e\x63\xd7\x77\x30\xd4\xf7\x53\x70\x39\x37\x90\x17\ \x32\x32\xcd\xd7\x44\xba\x8c\xd6\x08\xd6\x4d\xb0\x13\x45\x97\xd9\ \x85\x59\xbd\x33\x9e\xff\x47\xfe\x7b\x96\xc7\xf7\x82\xda\x9b\x2a\ \xf0\xd6\xd8\x23\xa0\x1e\x26\x54\x7d\xf2\x45\xfc\x9f\x0e\xd5\x80\ \x41\x87\xde\x83\x4e\x01\x15\xa1\xe8\xdc\xa7\x60\xc2\xb1\xf6\xc2\ \x04\xc1\x66\x46\x30\x19\x22\x5e\x05\x8d\x50\xd4\xf5\x25\xf3\xde\ \xda\x32\x50\xcf\xb5\x58\x6e\xc4\x9f\x86\x0c\x42\xea\x21\x2f\xe6\ \xbd\x01\x66\xb0\xb7\xe9\x46\xcd\xc0\xe0\xc6\xb0\xf1\x5c\x7f\x85\ \x1d\x97\xc7\x63\xcb\xf7\xe1\x44\x72\x7c\x0d\x50\x9b\x40\x8d\xde\ \x08\xb2\x01\x02\xae\xce\x52\x7e\xc7\xc8\x43\x2d\x30\x71\x2a\x8a\ \x06\x28\x8f\x42\xf7\xc8\xa1\xf8\x2d\x72\x26\xfe\xc1\xf7\x60\xe0\ \xc1\x6a\xf0\x7d\x68\x55\x68\xec\x51\x92\x5f\xc7\xea\xc4\xfe\x28\ \xec\x6e\x61\x02\x35\x26\x23\xa8\x4d\xe0\x79\x71\x94\xa6\xce\x88\ \x8e\x7e\xb5\xa0\xd2\x9a\x67\xed\x4a\xfc\x28\x79\x64\xfd\xd8\x51\ \x21\xfe\x10\xa4\x11\xf2\x3a\xf2\x54\x7e\x74\x00\x4f\xb3\x1e\xe8\ \xbd\x99\x2c\xeb\xc7\xe0\x26\x18\xf6\x07\x28\xf8\x5f\x9e\xcc\x43\ \xb5\xc9\x04\x6a\x6c\x37\x41\x34\x72\x3a\xcd\x1b\x43\xfe\xef\xca\ \xb9\x1b\xbb\x56\xe5\xad\x7e\xf8\xc1\xe6\x3c\x81\x2a\x28\xf1\xfb\ \x1f\xa8\x02\xdf\xed\xaf\x04\xe5\x57\x15\xe3\xd7\xe4\x77\x79\x92\ \x81\x01\xcc\x4d\x20\xb1\xe7\xea\x1c\x4d\x7d\x11\xe3\x8f\x7d\x05\ \x6f\x2c\x2d\x62\x93\xf8\xca\x3e\x05\x83\x58\x04\xea\x30\x1d\x19\ \x86\x7c\x8e\x94\xb0\x6b\x49\x5d\xae\x0d\xc0\xb0\x1b\xf8\x84\xfd\ \x86\xd1\xe0\xce\x8f\x21\x4d\xc0\xe5\xfc\xf7\x0a\xfe\x57\xa6\x18\ \x88\xaf\x8f\x0a\x51\x1c\x3f\x03\xfc\x21\x22\xdd\x1b\x3c\x2f\x8d\ \xe2\xe7\x5b\x70\xb6\x3b\x54\x58\xf9\x3a\x0f\x95\xcb\xe2\x7a\x3e\ \x12\xe2\x7f\x1b\x52\x11\x3a\x04\x94\x85\xa2\x73\x9e\xe2\xd7\x17\ \x96\xba\x01\x85\xde\xa7\xc2\xd8\x0c\x47\x31\x3f\x52\xd7\x95\x5c\ \x3e\xca\x03\xcc\x43\x3c\x75\x0b\xef\xae\x7f\x8e\x8f\x12\x28\x42\ \xf0\x56\x4f\x09\xdf\x74\x76\x17\xc7\x5e\xf4\x28\xda\x2f\x48\x6b\ \xa4\x74\x7e\x8a\xcf\xc4\xd4\xe3\x4b\x48\x2d\x56\x87\x4d\x24\x13\ \x0c\x0a\xf9\x1c\xb6\x9c\x1f\xa8\xb0\xf3\xca\x54\x14\x79\x87\x40\ \x6f\x82\x28\x43\x24\x03\x1c\x4f\xdd\x0c\xdb\x2e\x0c\xe1\xe7\x99\ \x15\xd1\x11\x5e\xc0\x50\x4b\xf9\x06\x25\x4d\xb9\x13\xbf\x99\x24\ \xfe\x49\x7b\xc5\x7f\x57\x27\x7e\xef\xe0\xf2\xd0\x73\xdf\x5b\x50\ \xc9\xb9\x18\x34\xc1\x28\xe0\x71\x71\xa4\x99\x01\xb4\x26\x88\x17\ \x50\xf9\xd4\xf5\x24\x43\xc2\x52\x14\x90\x45\x2e\xb1\xe4\x25\xa8\ \xbe\xb6\x2c\x74\xf6\xaf\x03\xdf\x06\x36\x84\x09\xc7\xdb\xc1\xea\ \x84\xbe\xfc\x77\xf1\xbe\x7f\x0c\x4b\xc0\xfa\xff\x1a\x29\xc7\x0a\ \x68\xdb\x1a\xea\x6b\x5e\x56\x9b\x60\x70\x48\x53\xd8\x7a\xe1\x47\ \x85\x5d\x57\xd5\x26\xd0\x9b\x41\x67\x80\x0c\x5f\x38\x7e\x6b\x33\ \xb8\x5e\x1c\xca\xbf\x4f\xe7\x23\xf1\x29\xd7\x30\x89\xdf\x5b\x2f\ \x7e\x6c\xc1\x88\xdf\x7d\x6f\x59\x68\xbb\xb3\x04\xbf\x46\xba\xde\ \xc3\x37\x9d\x51\xec\xbd\x02\x63\x33\x90\x09\xd4\x75\x24\x43\x65\ \x1d\x75\xb8\x35\x4c\x08\xff\xda\xf0\xff\x65\xaa\xaf\x2b\xcb\x23\ \x03\xef\x06\x46\xf3\xed\x6a\x5e\x64\x05\xf8\xd1\x99\xe0\x27\x2c\ \xc8\xb6\x0b\x83\x14\x02\xaf\x39\x19\x98\x60\x87\xca\x04\x32\xbe\ \x10\x91\xe6\x85\x7d\xfe\x18\xfe\x3d\x3a\x4f\xb1\x02\x14\xbf\xd7\ \xde\x2a\xf0\xb5\x7f\x79\xbe\x2c\xab\xd6\xe6\xd7\xa0\xe6\xe6\xe2\ \xf0\xb1\xcb\xab\x50\x77\x6b\x71\x68\xb9\xa3\x04\x74\x0a\x2c\x0d\ \x5d\x83\x4a\x43\xe7\x3d\x25\xe1\xd5\xc5\x45\x60\x22\x0a\xb7\xe3\ \xf2\xef\x2a\x03\x58\x32\xc2\x3e\xf0\xbb\x32\x41\x53\x47\xf6\xf0\ \xc2\xfc\x67\x79\x1e\x40\xf0\x48\xf0\x2b\xef\x06\x8a\x3c\x1a\x26\ \x18\xc0\xbc\x4a\x62\xe8\x72\xbd\x38\x58\xe1\xd0\xcd\x55\x26\xd1\ \x33\x76\x60\x2b\xf7\x31\x24\x22\xdd\x13\x2b\xf0\x37\xfe\x9d\x9f\ \xf6\x37\xe3\xe2\x4f\x3f\xd5\x3e\xdf\xc4\xef\x17\x5c\x1d\x1a\xbb\ \x97\x85\x4a\xab\x5f\xe6\xe3\x7c\xde\xcf\x8e\x66\x29\x3c\xd9\xea\ \xc1\x0e\x28\x50\xe6\x4d\x3f\xc7\x30\x4d\xc2\xd7\xd9\xf6\x12\x54\ \x58\xfd\x2c\x74\xd9\x59\x97\x5f\x3b\x99\x39\x2e\x33\xc8\x64\x80\ \x2c\x35\xfb\x38\xfb\x6e\xcc\x03\xff\xab\x13\x39\x01\xd7\xa6\xc1\ \xfe\x9b\x4b\x38\x47\x52\xd7\xe2\xb0\xd2\x95\x13\x9d\xe1\x0f\x09\ \x59\x21\x18\x11\x5d\x94\xba\x5c\x9b\xd4\x5f\x93\x2b\x50\x24\xe0\ \x33\x80\x03\x58\xf3\xfc\xce\x01\xf4\x26\x68\x87\x7d\xd1\x2c\x96\ \x3e\xf9\x44\x7b\x70\xbb\xf8\x13\xc7\xef\xca\x78\x45\xfc\x28\x73\ \xcc\x0c\xe0\x77\x75\x3c\xff\xce\x90\xfd\xcd\x2d\x88\xdf\x33\x87\ \xe2\x7f\x9e\xad\xf8\xad\xbd\x2b\xc0\x5b\x2b\xc4\x6c\xda\x70\x16\ \xc3\xc7\xd5\xe5\xd8\x32\x46\xcf\x1b\xd3\x80\x97\xb1\xc9\xc8\x78\ \x64\x2c\xf2\xbb\xe0\x0f\xfe\xf3\xcf\x99\x9b\x6c\x86\x1a\xeb\xde\ \xe4\xd7\x7f\x24\xd5\x59\x18\x20\x48\x1f\x0d\xd0\x04\xf1\x9c\x7d\ \x06\x04\x2b\x24\x70\x42\x38\xa1\x37\x97\x2a\xf5\x39\x39\xbc\xbd\ \x6e\xb4\x40\x49\x22\x9b\x8a\xd7\xdd\x0a\x93\xf2\x7c\x1a\x02\x5a\ \x7a\x3c\xcb\xb3\xa9\x7b\x35\x70\xbf\x34\x44\x21\xec\xd6\x5a\x6c\ \xf5\xde\x0a\x51\x3c\x02\xa8\x91\xc4\x0f\xbc\x3e\x83\x1f\xff\x57\ \x54\x37\x1e\xe2\x46\x1c\x6c\x91\xa7\xe2\xff\x7c\xb8\x16\x34\x74\ \x2d\x2b\xb5\xf4\x3f\xd8\x15\x2e\xfa\x2b\x6c\xbe\x10\x9c\x66\xd4\ \x46\x89\xb1\x75\x3f\xa4\x2b\xd2\x4e\x64\xdb\x34\xd5\xda\x0a\xf9\ \x4a\xfc\xfc\x07\x9e\x89\xb7\x65\x9e\xef\xa3\x01\xa8\x0c\x41\xd7\ \x67\xa3\xd0\x41\x66\xec\xd5\x61\xd9\x08\xfb\x34\x46\x08\xbc\x36\ \x43\xa9\xcf\x7e\x41\x8d\xf8\x8a\x20\xf3\xa1\x61\xe9\xe5\xcf\xd0\ \x6d\xe1\x3d\x78\x2d\x2f\x14\xcc\xda\x80\xd9\xec\x73\x12\x6e\x43\ \xca\x0f\xe0\x71\x69\x28\x27\xe0\xda\x64\x6c\xf9\xdb\x11\x12\xde\ \x08\xc9\x04\x87\x52\x97\xf3\xe3\xe7\x08\xf1\xf5\x7d\xbe\xe3\xc4\ \x1f\x7e\xa4\x36\x7c\xea\xfa\xa6\x24\x3c\xb5\xdc\xba\xcc\x85\xd1\ \xde\x22\x8c\x4d\x12\xa2\xff\x20\xa6\x53\x69\x52\xe5\x7d\xe4\x6d\ \xa4\xac\x18\x63\xd3\x1c\x7b\x71\xc1\x1b\xe2\xe7\xef\x20\x0d\xd9\ \x7b\xec\x27\x8a\x02\x54\x8e\x5d\xd7\x68\x4e\x60\x8f\x8a\x20\x43\ \x43\xc4\x6b\x30\x36\x01\x19\xc0\x1f\x23\xa3\x5c\xa7\xed\xbc\x3f\ \xe6\x2d\xde\xe2\x1d\xc1\xdf\xd9\xc2\x82\x59\x1b\x30\x9b\x25\xf6\ \x0f\x6a\x0c\x9e\x97\x7f\x56\x38\x91\xbe\x15\x5b\xfd\x76\x81\x1c\ \x01\xb4\x84\xa7\xb9\x80\xf7\x95\x91\xb0\x31\x65\x20\xbc\xbd\xb2\ \x04\x7c\xe1\x55\xc3\x81\xe2\x37\xd6\x88\xff\x95\x4f\x65\x23\xe1\ \x27\x88\x89\x94\x6e\x48\x63\xa4\x9a\x18\x53\xbf\x24\xee\xaa\x59\ \x6b\x4d\x4f\x8b\x56\x57\x81\x0c\x40\xe5\xf6\xbd\xfa\x1b\x0a\xbc\ \xc7\x0c\xbd\x09\xe2\x75\x26\xd0\x9a\x21\x81\x13\xac\xa9\xd3\xf7\ \xd7\xbd\x65\x71\xca\x58\x99\x1a\x1e\x86\x19\x41\xbe\x26\x85\xb3\ \x59\xdf\x92\x4b\x5f\x86\xed\x97\x87\x29\x04\x5d\x9f\xc9\x85\x8f\ \xd2\xa1\x35\x80\xff\xd5\x3f\xf8\xf1\xcd\xdc\xab\xf3\x49\x1e\xbd\ \xf8\xdd\x73\x2e\xfe\x09\x49\xfc\xc1\xa1\xb5\xa0\xfc\xca\x97\x01\ \xdb\xf8\x2d\xec\xb3\x3d\x54\xc2\xff\x8c\x74\x12\xf3\xe7\xe5\x45\ \x22\x5b\x24\x87\x21\xf4\x19\x32\x80\x5c\xfe\xb8\xac\x40\x81\xde\ \x04\xf1\x3a\x2c\x1b\x21\x32\xc3\x4b\x53\xaf\x14\x21\x49\x68\x4b\ \xb3\x84\x3c\x29\x9c\xc5\x32\xd8\xf7\xac\x59\xfe\x25\x85\xd8\xfa\ \xa7\x9f\xea\x84\x2d\x79\xb8\xc2\xc9\xf4\x2d\x06\xe2\x6b\x0d\x10\ \x7c\x63\x0e\x3f\x76\x58\x68\x2b\x3e\xbd\x6b\x9a\xe1\x73\x9c\xf8\ \x2d\xbd\x2a\xc2\x73\x73\x8b\x48\x73\xe6\xaf\xb0\x79\x22\xa1\x1b\ \xae\x12\xfe\x2d\xa4\x58\xae\x93\xa7\x29\xd8\x2d\xa0\x01\xe4\xf2\ \x9b\x0c\x10\x68\x18\x0d\x6c\x35\xc1\x89\xb4\xcd\x9a\x7a\x35\x9f\ \x2d\x34\x82\x66\x0c\x79\x52\xf8\x05\x46\xa5\x3c\x4f\x0a\x67\xb3\ \xe1\x1f\xac\x7f\x0b\x76\x5c\x19\xa1\xb0\xfb\xfa\x24\x14\xd8\x4b\ \xb0\xdd\x90\x63\x69\xeb\xf8\xb1\xab\xe2\xfb\x73\x57\xd3\x6d\x5d\ \xc7\x89\xff\x19\xfc\x1a\x56\x1f\xaa\xae\x79\x4d\x6a\xf5\x52\xb8\ \xa7\x39\xf3\xdf\x90\xde\xbc\xcf\x96\x66\xcf\x8a\x39\xac\x82\x66\ \xb1\xa6\x95\x56\x95\x50\xea\x40\x6b\x00\xbd\x11\xe2\x35\x58\x36\ \xc2\xa1\xd4\x65\xca\x39\x67\x9c\xea\x6c\xf3\xba\x01\x1a\x29\xe0\ \xb8\xc5\x2b\xef\x93\x42\x27\x96\x34\xf3\x54\x17\xf0\xb9\x3a\x52\ \xe1\x78\xda\x5a\x14\xd9\x53\x65\x02\xbd\x11\x02\xae\xff\x1f\x3f\ \xf6\x83\xf5\xe5\xa0\xb5\x57\x75\x03\xf1\xbb\x9a\xc4\x8f\xb1\x4f\ \xfc\x01\x21\x1f\x43\xa9\xbf\x5f\x90\x86\x74\x52\xab\x9f\x24\x32\ \xfa\x2f\x91\xaa\x22\xd4\x3b\x36\x3c\xce\x60\xcd\xa8\x2c\x54\xa6\ \x5d\xd7\xc6\xa1\xc8\xbb\x2d\x98\x20\xd0\xc0\x00\x7b\xf4\x11\xe1\ \x76\x10\x24\x20\xc1\x37\x9d\x94\x7a\x1d\x11\xda\x9a\x67\xfb\x76\ \xdd\x2d\x1c\xc5\xef\x14\x16\xcd\xb3\xbe\xbf\xd2\xaa\x92\x98\xf4\ \xfc\xaa\xb0\xe7\xc6\x14\x03\xf1\xb5\x26\x38\x94\xba\x94\x1f\x3b\ \xfe\xe8\x37\x7c\x21\xc7\xd2\xd8\xee\x0e\x13\xbf\x77\xd0\xfb\x52\ \xc8\xa7\x09\x1b\x69\x48\x37\x56\xb4\xfa\xfa\x62\xa1\xc4\x33\x79\ \xd2\x22\x66\xb2\x29\xed\x7d\x6a\xf3\x72\x05\xdd\x98\x2e\x0c\xb0\ \xdb\xd0\x08\xf1\x9c\xec\x4d\x90\x20\x08\xbc\x3e\x59\xa9\xdb\x9e\ \x01\x0d\x0d\x47\x00\x56\xd7\x0b\x0c\xe6\xdd\x5d\x11\x47\x8b\x4f\ \xab\x81\x12\x47\x1e\xfc\x12\xfc\xae\x8d\x52\x38\x9a\xb6\x0a\xa2\ \x32\x3d\x05\x5e\x1a\xa2\x91\xc8\x0c\x77\xd8\x79\xfd\x37\x7e\x6c\ \xa9\xa5\xaf\xf0\x35\x7c\x8e\x12\xbf\x9d\xef\x3b\xd2\xec\x9d\xb4\ \x40\x62\xba\xb8\x53\xd6\x5e\x64\xf6\x2f\xe6\x69\x7f\x38\x8b\x6d\ \x1f\xb8\xaf\x19\x2f\xd7\xc1\xd4\x85\x28\x74\x80\x99\x09\x76\xa3\ \xb0\xbb\x85\xf8\xc8\x6d\x62\x8f\x05\xa4\xd6\x4f\xa8\xeb\xf6\x43\ \x8c\x30\xf6\x2e\x1a\xe1\x6b\x05\x27\xb2\x70\x31\x6c\x7d\xca\x5e\ \x91\x5f\x35\xd8\x76\x9d\xbf\x44\x81\xc4\x6b\xb8\xe5\x1d\xf0\xbf\ \x36\x5a\x61\xf7\xf5\xf1\xd8\xc2\x3d\x24\x14\x13\x78\x72\xe1\x65\ \x0e\xdd\x5a\xc8\x8f\xed\x15\xf0\x29\x54\x5b\x53\xda\x40\xfc\xce\ \xb9\x13\xbf\x3a\x73\xc6\x2b\x9f\x8a\x0c\x15\x93\x36\xe5\x44\x08\ \xcc\xdb\xc9\x11\x27\x96\xbc\xe4\x6c\x5f\x5e\x36\x6a\x04\x92\x01\ \x02\x0c\x0c\x60\x66\x04\x33\x33\x24\xa8\xa0\xfa\x52\xd7\x2f\xd5\ \xb9\xad\xdb\xd5\xc9\xd0\x6d\x64\xec\x06\x4e\xe0\x15\xd6\x16\x39\ \x8f\x55\xd1\xdb\x0b\xa1\x53\x49\xe8\x8f\xd6\x97\xe7\x42\xf7\xde\ \xfd\x19\x4c\x38\xde\x01\x66\x9f\xee\x8e\x2d\x78\x8c\x21\x61\x69\ \xcb\x51\x70\x73\xf1\x65\xb0\xf5\x67\xba\x41\xc0\x8d\xb1\xe0\x7e\ \x71\x18\xbc\x88\x89\x1f\xad\xd7\xcf\x03\xf1\x27\x89\xc9\x9c\x46\ \x22\xe4\x17\xc9\x87\x51\xd0\xc7\x54\x1e\xb9\x1e\xa2\x32\xdd\x21\ \xee\x76\x80\x86\xf8\xdb\xbb\x2d\x10\xa8\x90\xa0\x20\x19\x20\x22\ \x63\xb3\xa6\x7e\x6d\x19\x01\x18\x8e\x08\xfa\xf0\x19\xc2\xb6\x62\ \x32\xcb\xfa\x74\x6e\x07\xdf\xba\xfc\xb9\xfd\x5d\x18\xaa\x6d\x65\ \xf7\x8d\x71\x70\x3a\xd3\x55\x18\xc0\x43\x25\xbc\x89\xc3\xb7\x16\ \xf1\x63\x07\x05\x37\x87\x77\xd7\x94\xca\x2b\xf1\x69\xea\xb6\x8e\ \x98\xad\xcb\x9f\x71\xb0\x13\x1b\xd1\xca\xf3\x03\x51\x0f\x7f\xf0\ \x96\x1f\x7f\x5b\x66\xb7\x0d\x18\x99\x20\x10\x23\xc9\x0a\xa5\x7e\ \x97\xc6\x7c\xc7\x93\x3a\x7b\x0d\xc0\x47\x03\xcd\xd9\x26\xd1\x15\ \x96\xb4\xa5\x2f\x0b\xfe\x2b\xb2\x27\x16\xe4\x77\x85\xe0\xd4\xe9\ \xb0\x3f\x75\x16\x1c\x4e\x5b\xa8\x70\x14\x5b\xfb\x89\xf4\xb5\x0a\ \xd1\x5c\x74\x73\x4c\xe2\x47\x61\xeb\x0f\xc4\xca\xa1\xf3\x51\x28\ \xa3\xc7\xaf\xb4\xe2\x77\x74\x94\xf8\xb5\x44\x96\x9f\x7f\x37\x45\ \x9c\xd8\x89\x51\x87\xda\xf2\xb2\x1d\xba\x35\x5f\x25\xbe\x65\x23\ \x24\xe8\x08\xd4\x11\x7a\x6b\x8e\xa2\xc1\xa4\xe3\x1d\x6d\x5e\x32\ \xa6\x86\xdf\xe0\xaa\x88\x57\x28\x75\x87\xc5\x6d\x09\x67\xe0\x75\ \x69\x24\x04\xde\x1c\xcb\xd9\x7b\x73\x22\x17\x4f\x21\x8b\x70\xe7\ \x44\xeb\xf0\xb0\x80\x27\x1c\x4b\x5f\xc9\xcf\x37\x39\xbc\x13\x7f\ \x52\x27\xb7\xe2\xf7\xda\xf3\xfe\xa3\x21\xfe\x6c\x56\xf1\xc5\xf9\ \xcf\x29\x75\x16\x91\xb1\x09\x05\xde\x95\xad\x09\x0c\xc5\xbf\xa3\ \x27\x04\x1b\x9e\xac\x43\x9f\xdd\x8d\xec\x1a\x01\xc8\x6b\x07\x79\ \x1d\x31\x36\x12\xf9\x44\xcc\x09\x58\x2f\xcc\x9e\x9b\xe3\x14\x0e\ \xa2\x0b\xd5\x06\x88\x96\x31\x34\x80\xde\x04\x67\x04\x21\xa9\xd3\ \xf8\xf9\x3e\xdd\x5a\x15\xba\xee\xaa\xa5\x17\xff\xac\x7d\xe3\x7c\ \x3e\xd4\x6b\xc3\x7c\x0a\x54\x7c\xa9\xce\xe6\xb6\xf6\xfc\x90\x97\ \x2d\x38\x75\x8a\x10\x5f\x6f\x80\x04\x05\x49\xf4\x33\x59\x14\x15\ \x5d\xb1\xdb\xdc\x0c\xc7\xb1\x71\x10\x87\xd2\xe6\x61\xab\xff\x13\ \xf6\xdf\x9a\xa1\xd1\x40\xae\x37\x7b\x9f\x1e\xe2\xd3\xc2\xa3\x59\ \x32\x5e\xe5\x4f\x48\x0d\xeb\x4f\x0c\xcd\x62\x4d\x3f\xde\x50\x01\ \x82\x52\xff\x50\x38\x9e\xbe\x1c\x85\x74\x45\xdc\x2c\xa0\x35\xc0\ \x19\x8e\x87\x86\xc8\xcc\x2d\xfc\x5c\xde\x97\x7f\xe5\x21\x69\x7a\ \x44\xdb\x1c\x8b\xff\x4b\x58\x7d\x69\x92\x47\x1a\xe7\x4f\x15\x09\ \x5f\x9d\x02\x12\x9f\x46\x49\xa9\x2b\xe2\xbe\x17\x75\xb5\x02\xe2\ \xef\xec\x32\x03\x45\x47\x4e\x67\xba\xc0\xc1\xb4\x3f\x35\x75\x6b\ \x0f\x55\x56\x97\xb2\x7b\x04\xc0\xd7\x09\xf4\x64\x21\xa2\x81\xbc\ \x6d\x7d\x24\x34\x8b\x4d\xee\xe4\x57\x1f\xf6\xa6\x8e\x57\x38\x9d\ \xb9\x49\x18\xc0\xd5\xa2\x11\xce\x28\xc2\x9b\x23\x19\xe0\x78\xfa\ \x32\x7e\xae\xa9\x27\xba\xc0\x5b\xcb\x5f\x55\x89\xff\x5f\xbb\xc4\ \x1f\x17\xde\x10\x3e\xdc\x58\x42\x9a\xe1\x93\xc6\xf9\x43\x45\xb6\ \x5f\xbc\x40\x16\x42\xe0\xd0\x98\x1a\x8c\x5c\x57\x67\xb3\xb6\xab\ \x22\xc0\x2e\x14\xde\xc4\x21\x14\x5f\x5d\xaf\xd6\x58\x19\xf7\x03\ \xaf\xaf\xef\xf7\x36\x81\x5e\x81\xb5\xf9\x1a\x00\x7b\x9f\x1c\xe2\ \x09\x60\x33\xbe\x66\xb0\x33\x52\xc6\x96\xd9\xac\xf5\xdf\x05\x36\ \x81\x7d\xb7\xfe\x8f\xb3\xff\xd6\x54\x43\xe1\xcf\x28\xa8\xc4\xbe\ \xad\xc6\x43\xc3\xc1\x34\x27\x7e\xbe\x2f\xbc\x3e\x82\xaf\x76\x54\ \xcf\xb1\xf8\x6d\x7d\x2b\x9b\x2f\x87\x6e\x29\x86\x7a\x4f\x17\x80\ \xf8\xbc\xf5\xcf\x8f\xfa\x96\x97\xed\x68\xfa\x22\x6c\xed\x3b\x39\ \x6a\xe1\x89\x98\xdb\xde\x4a\x9d\x9a\x43\xdf\xff\xfd\xc8\x37\x30\ \x2c\xb4\x19\xb4\xf0\xac\x0c\x5f\xf9\x56\xe0\xa1\xde\xde\xd6\x6e\ \x04\x9f\x05\x94\x12\xc0\x56\xb6\x25\x80\x33\x59\xc8\x82\xe8\x6f\ \x21\xf8\xd6\x04\xce\x91\xf4\x79\x28\xae\xab\x0a\x37\x0b\xb8\xeb\ \xcc\x70\x96\xe3\xc1\x91\xcf\x57\xfa\xef\x57\xf9\x26\x8f\x39\x11\ \x7f\x70\x68\x4d\xa9\xdf\x97\x6e\xec\x8c\x13\xc3\x9a\x02\x5b\x0e\ \x4d\xad\xbf\xe6\x86\x8a\x4a\xd9\x62\x6f\x6f\x47\xb1\x77\xaa\x30\ \x19\xe0\x58\xc6\x62\xe5\x38\x35\x5f\x7a\x7d\xec\x10\xa1\x2d\x26\ \x80\x34\x02\xb0\x39\x01\x14\x23\x80\x6d\xe7\x87\x43\x48\xda\x44\ \xce\x89\xcc\x15\x28\xa6\xab\x01\x6e\x3a\xce\x72\xdc\x75\x9c\xce\ \x5c\xcf\xcf\xe5\x77\xf5\x37\x7e\x41\x92\xf8\xdf\xd8\x25\xfe\xef\ \xe1\x9f\x48\xf7\xf3\xa5\xc7\xa0\xe8\x76\xee\xb7\xc8\x7b\xac\xa0\ \x76\xc5\x10\xcf\x45\x3a\x27\xfc\xc8\xcb\x16\x9e\xb1\xcc\x4c\x7c\ \x13\xf1\x77\x7c\xe1\x40\xda\x54\xa5\x4e\x65\xe4\xfa\x20\xa1\xf2\ \xc2\x00\x22\x01\x4c\x11\x37\xc1\xde\xb7\x9e\x00\x8a\x57\xae\x1d\ \x48\x9b\xac\x10\x95\xb5\x89\x0b\x7e\x56\x83\x9b\x05\xf4\xe2\xc7\ \x60\xeb\x3f\x95\xb9\x9a\x9f\x6b\xe1\x99\xef\x80\x76\xf4\xb6\x5b\ \xfc\xe3\x9f\x40\x87\x9d\x55\xe5\xd0\x3f\x47\x14\xe8\x13\xb1\x62\ \xe7\x3f\x05\x64\x00\x8f\x2e\xfe\x0d\x78\xb9\x42\xd3\xa6\x41\xdc\ \x1d\x1f\x14\xdb\x5f\x27\x7e\x22\x72\x2a\x73\x95\xa6\x4e\x65\xfa\ \xed\x69\x6a\xb8\xb6\xcf\x51\xf0\x04\xb0\x1f\x0b\xc3\xab\xa5\xd5\ \x41\x95\x6c\x49\x00\x9b\xd6\xdc\xf8\x36\x84\xa6\x4f\xe1\x1c\x4a\ \x9f\x69\x26\xbc\x35\x13\x90\xe0\x2a\xee\x48\x9c\xc8\x5c\xc6\xcf\ \x37\x2e\xac\x03\xdf\x96\xc5\x5e\xf1\xc7\x1c\xaf\x07\xaf\x2c\x7c\ \x56\x1e\xf2\xd1\x6a\xdc\x36\xa2\xdf\x7f\xaa\x80\xc4\x6f\x4f\x43\ \xe5\x9d\xd7\xc6\xf2\x72\x45\x64\xad\x85\x84\xbb\xfe\x9c\x44\x85\ \x9d\x0a\x87\xd3\x67\x29\x75\x2a\x43\xdf\xa5\x73\xe4\x55\xf8\x57\ \x12\xc0\xaf\xf8\x7a\x80\xae\x62\xed\xa2\xd5\x19\xc0\x91\x5f\x6d\ \xaf\x09\x07\xd3\xa7\x72\x8e\x65\x2e\xb4\x2a\x7e\x8c\x21\x5a\x23\ \x1c\xcb\x98\xcf\xcf\xd7\x3f\xa8\x19\xdf\x93\xc7\x5e\xf1\x9b\x79\ \x96\x97\x43\x19\x0d\xf9\xfa\x8a\x3b\x7b\xcf\x14\x90\xf8\x3c\xf1\ \x9b\x75\xaa\x27\x2f\xd3\x51\x2c\x5b\x76\xe2\x47\xdd\xde\xa8\xd4\ \xa7\x1a\xaa\x8b\x9c\xcc\xea\xd9\x03\x5f\x0b\xf0\x01\x5b\x24\xd6\ \x40\xbc\x6e\xcb\x82\x86\x85\x03\xf0\xc2\x0e\x65\x4c\xe3\x44\x64\ \xad\x82\xb3\x77\x5c\x15\x62\x34\xb8\x19\x60\x6a\xf5\xb1\x2a\x8e\ \x65\xce\xe5\xe7\xa3\x73\xd3\x86\x4c\xf6\x88\x4f\xaf\x63\xe1\x8b\ \x38\xeb\xf2\xb9\xec\x91\x62\xd1\xe6\x2b\x05\x18\xfa\x83\xbe\xda\ \x5e\x8b\x97\xe7\x70\xc6\x4c\x0c\xfd\x5e\x2a\xe1\xf5\x26\x08\xcb\ \x98\xad\xd4\xa7\x4c\xc0\xf5\x3f\xf2\xbc\xf5\xd3\x70\x51\x24\x80\ \xbf\x22\x9f\xd9\xf6\xe8\x18\x8e\x00\x96\x9e\x1d\x80\x05\x9b\xce\ \x39\x73\x67\x13\x8a\xb9\xcd\x4c\x78\x63\x13\xc4\x6a\x30\x37\xc0\ \x3c\x7e\xbe\x01\x41\xcd\xf9\x6e\x5c\xb6\x8a\x3f\xea\x58\x1d\xfe\ \xba\x36\xd1\xfa\x27\x88\xb1\x6c\xf9\x02\x7b\xfa\x05\xb3\xfe\xaa\ \xce\x65\x60\xf7\x8d\xf1\xbc\x3c\xd1\xb7\x37\xa0\xc8\x7e\x02\xbd\ \x09\xa2\xb1\xf5\xcb\x75\xa9\x86\x0c\x94\x97\x7d\x3f\x41\xe6\x12\ \xf5\x46\x8b\x5e\x3f\xb2\x2d\x59\x76\x62\xb7\xe8\x55\x2b\x47\x32\ \x67\xc0\xd1\xcc\xd9\x16\xc5\x8f\xe5\xb8\x19\x73\xd7\x5d\xc7\xf1\ \xac\xf9\xfc\x9c\xdf\xa3\x01\x68\x2b\x36\x5b\xc5\xff\xe5\x68\x2d\ \x78\x79\x61\x51\xb9\xef\xff\x59\x2c\xe0\x2c\x56\x40\xe2\xf7\x7d\ \x69\xc1\x73\x20\xd7\xcf\xa9\xac\x65\x2a\xf1\xfd\x20\x89\xe3\x6f\ \xe2\x9e\x3f\x1a\xff\x2f\x7e\xac\x9a\x0d\x49\x43\xf3\x34\xf3\x37\ \x48\x00\xbf\x47\x2a\xdb\x96\x2f\xe1\x85\x85\x65\xce\xe4\x9c\xcc\ \x5a\x2c\x0c\xb0\x0d\x85\xdd\x26\x44\x37\x42\x6b\x80\x38\x8e\xbb\ \xc4\x5d\x89\x13\x59\x8b\xf8\x39\x7f\xd8\xdb\x82\xef\xc3\x67\xab\ \xf8\x9d\x03\xaa\x48\x0b\x3a\x19\x9b\x88\x74\x11\x63\xfe\x82\x98\ \xed\xe3\xfb\x20\xfd\x1d\xf3\x03\x2f\x47\x78\x16\xf5\xfb\x3b\x84\ \xe8\x06\xe2\xf3\xd6\xbf\x5e\xa9\x4b\x35\xb5\x37\x56\xb2\xfb\x86\ \x4e\x4e\xe0\x4f\x09\xd9\x95\x00\xce\x66\x9f\x57\x75\x2e\x0b\x47\ \xb3\x66\x71\xa2\xee\xac\xc6\xd6\x8b\xc2\xdf\x75\x35\xc0\x8d\x13\ \xa7\xc3\xdd\x90\xd3\xb7\x57\xf2\x73\x4e\x3c\xd6\x05\xde\x5b\x57\ \xc2\x26\xf1\x47\x84\x7d\x0c\xd5\xd7\xbf\x26\xbb\x98\xfa\xfe\x4f\ \x59\x41\x3c\x02\x2d\xc4\xa7\x6b\xa7\x32\x1c\xcb\xfa\x13\x12\xef\ \xa1\xf8\xf7\xfc\x0c\xf0\x57\x38\x8e\xc7\xc9\x75\x29\xf3\x4b\x68\ \xbb\x5c\xef\x07\x68\x6d\xfd\x1f\x85\x7e\x32\x18\x4f\x00\x1b\xb0\ \x95\xb6\x27\x80\xb3\xd8\x77\x9f\xbb\xd6\xc0\x02\x3a\x71\xa2\xee\ \x38\x63\x0e\xb0\x5e\xc5\x5a\x88\xbc\xb3\xc2\x8c\x95\xf8\xf3\x0d\ \x56\x8d\x10\x8d\xdf\xa5\x73\x2e\x8f\xfd\x11\x4a\x2f\x7b\xd1\x26\ \xf1\x87\x1d\xf9\x50\x4a\xfe\x6a\xb0\x15\x62\xd2\xa7\x72\xbe\xf7\ \xfd\x2a\xf1\xe9\xfa\x8f\x67\xfd\xc5\xcb\x63\x2c\xbe\x1f\x24\x73\ \xfc\x39\x31\x77\x5d\x94\xba\x24\xe8\x91\xf1\x97\x16\x38\x66\x7a\ \x97\xce\x41\x53\xc5\x24\x34\xb5\x74\xfe\x38\x98\xbc\x63\x08\xf5\ \xfb\x34\x59\xd6\x81\x05\x32\xe9\x31\xb7\x46\x62\xbe\xc4\xea\x08\ \x60\xea\xc0\xbd\xad\x20\xfc\xf6\x6c\xbb\x88\xbc\xb3\x1c\xe2\xef\ \xb9\x09\xdc\x0d\x89\xbd\xbb\x95\x1f\x4b\xb7\x4a\xe9\x42\xc7\x1c\ \x6b\x68\x55\xfc\x0e\xbb\x2a\xc9\xe1\x9f\x56\xf4\x7e\xc1\xf2\x6d\ \xdf\x3b\xad\xf8\x5f\x7b\xd7\xe1\xd7\x7e\xe2\xf6\x1c\x88\x47\xf1\ \x93\xef\xf9\x0a\xa1\xcd\xf1\xd7\x11\x8d\x8d\x48\xae\xa7\x49\xc7\ \xbb\xe6\xba\xf5\xf3\xc5\x9d\x24\x34\x3d\xc8\x4a\x42\xd3\xdd\x50\ \x5a\xfc\x2a\x4d\x8d\x3b\x31\xd3\x93\xcc\x93\xc4\x54\xf9\x77\x62\ \x06\xf0\x39\x9b\x56\x01\xcd\x8d\xec\x8b\x05\xfd\xd3\x2e\x4e\xde\ \x9e\xa7\x32\x80\x64\x82\x04\x03\x4e\xde\x9e\xcf\x8f\x7f\x17\xbb\ \x99\x2e\x01\xef\x99\xc4\x3f\xa6\x17\x9f\x36\x67\xa8\xb7\xb5\xa4\ \x1c\xfe\xe9\x6e\x5f\x4d\xdb\x0a\xe1\x58\xf1\x27\x1f\xef\x26\xca\ \x38\x17\xfb\x7c\x59\x7c\x5f\x9d\x09\x52\x34\xf8\x6b\xa0\x06\x22\ \xd7\xd5\xd7\xde\x75\xf9\xcd\x99\xec\x1e\xeb\xb2\x3a\xae\x37\x3d\ \xcf\x38\x4d\xe4\x46\x63\xc5\x50\x8f\x9e\x6d\xfc\x51\x88\xde\x45\ \x4c\x96\xd5\xb1\x7d\x25\xb0\x13\x4b\x5e\x15\x37\x18\x4e\xde\xf9\ \x4b\x03\xfd\x8c\x2a\xe2\xc7\x7d\xad\xa1\xce\xa6\xca\x5c\xc0\xb9\ \x91\xdf\x69\x8e\x89\xbb\xb7\x05\x45\x76\x33\x14\x5e\xc2\x03\xa2\ \xef\xae\xe6\xc7\x8e\x3a\xd4\x1e\x3e\xdc\x58\x52\x11\xff\x57\x03\ \xf1\x69\x67\x8e\xb2\xcb\x8b\x01\x6b\xca\xb6\x89\xf5\xfc\x15\xf2\ \x2d\xf9\x93\x56\x3f\xa7\x4e\xc1\x32\xd3\xf5\x9e\xba\x33\x8f\x97\ \x21\xf9\xbe\x2f\x27\x85\xe3\x67\x05\x7f\x85\xe4\xfb\x3e\x70\xfa\ \xce\x62\xa5\xae\xbe\xde\x91\x33\x13\xf0\x95\xbd\x52\x44\xa4\xc9\ \xb0\x11\xa2\x5b\xec\xc8\xa4\xc7\xd5\x3f\x13\x8d\xa4\xaa\xa8\xab\ \x32\xa2\xdf\x7f\xd1\xf6\x1b\x65\x18\x5a\x06\xa1\xc8\xbd\x76\x35\ \x46\xa1\xab\xf0\xfe\x8a\x7e\x46\x3b\x70\xd6\xda\x54\x8e\x6f\xa1\ \xfe\xd3\x81\xc6\x40\x6f\xfe\xa0\xe3\x4e\xdd\x99\xab\x70\xf6\xee\ \x1a\x45\xec\x44\x1d\x1e\x9c\xf8\x7b\xdb\xf8\xb1\xf4\x98\x33\x9d\ \x77\xe0\x81\x8f\xb8\xf8\x23\x51\xfc\xe1\x28\xfe\xcf\x28\xfe\x90\ \xc3\xef\x2b\x7b\xf2\xf0\xfe\x5f\x9a\xc5\x6a\x63\x5b\x12\xe3\x98\ \x71\x3e\x95\x7b\x5e\x64\x3f\x7e\xad\xa7\xef\x2c\xe4\x65\x48\x51\ \x84\xb7\x5d\xfc\x73\x2a\x92\xef\x7b\x43\xc4\x9d\xf9\x4a\x7d\x7d\ \xb3\xa3\x9e\xdd\x26\xe0\xad\x5f\x1a\x0e\x53\x42\xdc\x4c\x2c\xee\ \x28\x2d\xba\xc6\x97\x44\x84\xcc\x45\x23\x71\x62\x69\xb4\x23\x55\ \x27\xff\xda\x7c\xbf\xba\x79\xd1\x5d\x60\x5d\xca\x77\xb0\x26\xf9\ \x5b\x58\x9d\xd4\x9b\xbf\xd4\x80\x5e\x69\xf2\xed\x9e\x7a\xd0\xcc\ \xed\x03\x88\xb8\x3b\x4f\xe1\xf4\x5d\xac\xa8\xfb\xee\xd9\xe0\xc1\ \x89\xbe\xb7\x82\x1f\x4f\x15\x50\x63\xc3\xeb\x3a\xf1\x07\xa3\xf8\ \x3f\xa2\xf8\x3f\x84\xbe\x2b\xcf\x62\xd1\xfd\xfe\x86\xb6\xdd\xc6\ \xcc\xf5\xf4\x6e\x50\x35\xe7\x37\x61\xdb\xb9\x51\xfc\x1a\xa3\xef\ \x2e\xe3\xc2\x69\xc5\xd7\x9a\xe0\x9c\x0e\x21\xfa\x3f\x7a\x92\xee\ \x7b\x62\x3d\x2d\x50\xea\xcc\x1e\x13\xa8\x5a\x3f\xdd\x05\xed\x91\ \x37\x11\x51\x6c\xf8\x48\x1b\x1e\xd2\xb6\xa5\x46\xe2\xff\x1d\xdf\ \x95\xbf\xca\xed\xcd\x65\xaf\x61\x61\xe6\x6b\x88\xbf\xbf\x59\x23\ \x7a\x92\x82\x87\x42\xe2\x7d\x37\x88\xc4\x4a\xd8\x75\x75\x02\x8f\ \x30\x9d\x70\x9c\x6f\x24\x7e\xb7\x3d\x15\x65\x03\x50\xff\xff\x61\ \x9e\xde\xf2\x95\x9e\x81\x48\x6d\x8f\x82\x1c\x4c\x9b\xc9\xcb\x12\ \x73\x6f\x0d\x0a\xec\x83\x62\xfa\x1a\xe0\x67\x05\x7f\x1d\xe7\xff\ \x91\x48\xb8\xbf\x55\x53\x67\xed\x6d\x34\x81\xaa\xf5\xff\x22\xb2\ \xfa\x97\xf3\xa2\x2a\xca\xb2\x52\x98\x76\x8d\x67\x97\x68\xfb\xd5\ \x25\xb1\xdd\x75\xe2\x2f\x89\xeb\xcc\xdf\x64\x49\xe2\x04\x5c\x9b\ \x00\x91\xf7\x16\x28\x9c\xbd\xbf\x12\x92\xfe\x71\x37\xc3\x43\x47\ \xfc\xfd\x4d\xfc\xf8\xdf\x0e\x77\xe0\xb3\x7c\x3f\x1c\xa8\x8e\xe2\ \x57\x57\xc4\x1f\x70\xe0\x1d\x68\xe3\x5b\x56\x9e\xc6\xa4\x7d\x6f\ \xdf\xc9\x93\xfe\x5f\xbc\xb1\x9c\x8c\xb8\x30\x7a\x00\xbf\xa6\xe8\ \x7b\x4b\xd0\xa8\xae\xd8\x62\x7d\x54\xf8\x1a\xe0\x67\xc8\x79\x8e\ \x7f\xb6\xc4\xde\x5f\xa3\xa9\xb7\xba\x2e\x55\xb2\xbd\x29\x64\xd6\ \xfa\x7b\x8a\xd0\x9f\x27\xc3\x61\x0a\xb3\x1f\xb3\x12\x58\xe9\x63\ \x58\x62\xf9\x15\xc5\x61\x61\x4c\x67\x9d\xf8\xf4\x52\x63\xba\xa5\ \x3b\xfd\x44\x2f\x88\xba\xb7\x50\x21\xfa\xde\x62\x14\xd8\x8d\x0b\ \x9f\x8c\x42\x67\x47\xec\x7d\x67\xfe\x9d\xf6\x3b\xea\xc3\x1b\x4b\ \x9e\x83\x7e\x21\x55\x15\xf1\xfb\xed\xaf\x0c\x5f\xf8\x94\x91\x86\ \x3a\x8c\xf5\x67\x8c\x6f\x7a\xe4\x68\xf1\x87\x53\xab\x6f\xee\xf6\ \x21\x1c\x4e\x77\xe2\xd7\x12\x77\x7f\x1d\xa4\xfc\xe3\x6d\x28\xfc\ \x79\x0d\x7e\x56\xb0\x24\xfe\x4e\x8c\x80\xdb\x34\x75\x46\x75\x98\ \x5d\x04\xa0\x21\x23\x5f\xd2\x25\x65\xfe\x79\xda\xfa\x99\x68\x65\ \x2f\x8a\xa5\xc3\xdd\xd8\x10\x76\x8c\xd6\xee\xd3\xcb\x16\xd4\xe2\ \xd3\xfb\xed\xdb\xfb\xbd\x0f\xcd\xdd\x3f\x84\x33\xf7\x17\x69\x88\ \xbf\xbf\x1e\x05\xc6\xa4\x89\xe3\x61\x01\x4f\x4e\xec\xfd\xd5\xfc\ \x3b\xff\xf5\xf9\x04\x5e\x5f\xf2\x2c\xf4\x09\xae\xc4\xc5\xef\x1b\ \xf2\x36\xfe\xbd\x82\xdc\x05\x90\xe3\xdf\x72\x70\x86\x9f\xf8\xde\ \x9a\xb7\x60\x5d\xc2\x30\xfe\xfb\x63\x31\x72\x25\xa3\x71\xcf\x3f\ \xf0\x51\xe1\x6b\x91\x0b\x1c\x3f\x0b\xf8\x5b\x60\x27\x36\x8c\x6d\ \x9a\xba\xea\x13\xd0\xd4\x6a\xf8\xe7\x8f\x74\x49\x8b\x5f\x69\x5c\ \xdf\x5d\x34\x86\x3c\x9d\x0c\xa3\x5b\xac\xcf\x8b\xe1\x44\x07\x1c\ \x68\x04\xd0\xab\x5b\xe9\x8d\xde\xb2\xf8\x73\xce\xb4\x83\x71\xc7\ \x9b\xc1\xcb\x18\x3a\xe9\x56\xe7\xd9\xfb\x8b\x15\x62\xee\xff\x6d\ \x55\xfc\x73\x2a\xe2\x30\x12\xd0\xf7\xc8\x04\xb4\xed\x7a\xb3\xed\ \xa5\xb8\xf8\xbd\x82\xcb\x49\x06\x28\xc9\x06\x8a\xf9\xff\xdc\x86\ \x7a\x6a\xf1\x89\x6f\x2e\x7b\x1d\x66\x9e\xe8\x2d\xae\x75\x19\x8a\ \xb2\xc5\x4c\x78\x89\x0b\x1c\x5f\x0b\xd8\x26\xfe\x45\x15\xf1\xff\ \xac\xd3\xd4\x13\x95\xd7\x9a\xf8\xfc\x6e\x1e\xcd\xec\x95\x63\x4b\ \xc4\x8d\xb0\xfa\x79\x9e\x0c\xab\x4c\xf0\xac\x70\xdb\x57\x98\x22\ \xb9\x90\x09\x7a\xec\xae\xc5\xc5\xff\x33\xfa\x2b\x70\x8a\xfe\x12\ \x2a\xad\x7e\x0d\x66\x9e\xec\x03\x31\xff\x2c\xd1\x90\xfc\x60\x2b\ \x9c\x7b\xe0\x61\x86\xa7\x45\x12\x1f\x6c\xe4\xdf\x5b\x72\x66\x20\ \x90\x40\xa5\x96\x3d\x0b\x2d\xbc\xdf\x80\x92\x7f\x17\xa5\x9b\x19\ \x8b\x6d\x5b\xca\x64\x31\xb9\x73\x26\x23\xd5\x77\xa9\x0a\xeb\x13\ \x47\xf0\xdf\x13\xf7\x0f\xe6\x2a\x0f\xb6\x08\x91\x8d\xb0\x5d\xf8\ \x8b\x1a\xfc\x0d\x49\xf8\x67\xbd\xa6\x7e\x6c\x11\x5f\x79\x27\xa0\ \x34\x9d\x4b\x7b\x11\x7e\x23\xc6\xf6\xf9\x7a\x23\xec\x19\x11\x7e\ \x5b\xb2\x2f\xd8\x0a\xda\xfe\xb5\x5b\xc0\x47\x5c\xfc\x99\x51\xad\ \xa1\xd3\xce\x1a\x40\xa1\x34\xf6\x9f\xa5\x0a\x49\x0f\x36\x19\x88\ \x6f\x32\xc1\x79\x43\xbc\x20\xe5\x81\x2b\xb6\x92\xd5\x70\x2c\x73\ \x0e\xfc\x1c\xd2\x96\x1b\x81\x47\x80\xb1\x18\xfe\xfa\xf0\x09\x8f\ \x22\x36\x08\xfe\xb9\x68\xe9\x1e\xd4\xbf\xd3\xb5\x8d\x3b\xd2\x19\ \xf6\xde\x98\xca\xaf\x2d\x11\x5b\x61\xca\x03\x37\x14\x6e\x47\xb6\ \xe2\x5f\xcc\x16\x3f\x0b\x18\x8b\x9f\x88\xe2\xab\xeb\xa7\x83\x4f\ \x03\x9b\xc4\xe7\xad\x9f\xca\xff\x2a\xfb\x53\xac\xe7\xb3\x71\x3a\ \xd7\xf1\x9f\x22\x62\xed\x5d\x13\x56\x0b\x03\x12\x9a\xa0\xb6\xcb\ \x9b\x30\x3d\xb2\x25\xd4\xda\x54\x16\xbb\x81\x62\x10\xf7\xe0\x6f\ \x4e\xe2\x83\x75\x70\xfe\xa1\x87\x05\x3c\x2d\xe0\xa5\x21\xe5\xe1\ \x36\x48\x78\xb0\x9a\x9f\x6f\xe9\xd9\x41\xd0\x77\x77\x73\x34\x99\ \xe8\x0e\xa4\x3d\x09\x82\x0c\xe0\x8f\xb0\xd3\x71\x1d\xb1\x82\x9d\ \x4e\x7d\x0b\x7b\x6f\x4e\x13\xd7\xb4\x16\xcf\xb9\x15\x2e\x3c\xdc\ \x0e\x17\x1f\xee\x10\xf8\x58\xc1\xd7\x02\x7e\x1a\x2e\x29\xf8\x1b\ \x92\xf4\x60\x83\x52\x37\x84\xad\xe2\x6b\x5e\x0d\x3b\x9e\x5d\xc4\ \x26\xd8\x5e\x4c\xf6\x14\xd8\x4b\x21\x9f\x16\xf3\xc9\x0d\x70\x40\ \xf6\x1b\x0d\x13\x8b\x2f\x7a\x9e\x8b\xbf\xe3\xd2\x78\x88\x7f\x80\ \x7d\x29\x56\xb4\x25\xe1\x2f\xe8\xf0\xb2\xca\xf9\x87\x98\x47\x3c\ \x74\x41\x01\x9d\xf9\xf9\x09\xfa\x5d\x9b\x92\x7e\xd1\xb1\xef\xe6\ \x74\xe5\x98\xc4\x07\x6b\xb0\x0b\xda\x08\xe7\xd0\x48\xf6\x89\x2e\ \x09\x7f\xc9\x10\x3f\x2b\xe8\xc5\xa7\x6b\x90\xaf\x89\xe8\x68\xa7\ \xf8\x1a\x13\xd0\x4e\x5f\x1d\xd8\x9b\xac\x80\xdf\x0a\x4a\x26\x78\ \x95\xd1\x0e\x13\x23\x58\x08\x89\xef\x73\x79\x3c\x24\x3c\x5c\x0e\ \x49\x0f\x57\x63\x65\x7b\x98\xe1\x69\x01\x93\xc8\x17\x2d\xb2\x5d\ \xc7\x05\x34\xc4\xf9\x87\x38\x3e\xc7\xd6\x4c\xc6\x90\x39\xff\xd0\ \x8d\x73\xf1\x5f\x3c\xee\xdf\x1d\x0a\x97\x74\xf8\x58\xc1\xd7\x02\ \x7e\x3a\x2e\x6b\xf0\xd7\x40\xdf\x49\x79\xb8\x89\xd7\x8b\x4c\x47\ \xdf\x86\xbc\x3f\xcf\xe9\x0d\xa0\x47\xe9\x25\xd1\x4f\x61\x17\xb0\ \xa1\x3a\x86\xda\x93\xb7\x17\x40\xe2\xc3\x15\x28\xbe\x33\x17\xe7\ \x22\x8a\x6e\xc2\xd3\x02\x5e\x36\xa0\x17\xff\xd2\x43\x6f\x1b\xd8\ \xa1\xc5\x0e\x13\x5c\x46\xd1\xb2\xc7\xcf\x02\xfe\x66\xf8\x42\xf2\ \xc3\xb5\xbc\x5e\x64\x3a\x09\xf1\x73\xbb\x00\xe4\xd1\x30\x01\x66\ \xd4\xd5\xd7\x96\x83\x53\x77\x16\x42\xd2\xbf\xab\x20\xf9\x5f\x6c\ \xf9\xff\xba\x62\x8b\x43\xd1\xff\xf5\x34\xc0\xcb\x90\x4b\x1a\xb6\ \x5b\xc0\xdb\x0a\xc6\x22\x5f\xd6\xe0\x63\x81\xec\x05\xa7\x6b\x3f\ \xff\x2f\x46\x9a\x7f\xd7\x73\xa4\xb2\xae\xc1\x9f\x6d\x86\x2b\x28\ \xb4\x31\xd8\xf2\xff\x5d\xc7\x8f\x95\xe9\xe4\xfb\xa9\x43\xc4\x7f\ \x34\x4c\xc0\xc5\x2f\x0f\x11\x77\x16\x61\x41\x57\x23\xce\x58\x51\ \xae\x58\xe9\x9e\x86\x5c\x46\x71\xad\xb3\xdd\x02\xde\x56\x30\x89\ \x7c\xc5\x22\x3e\x16\xf0\x35\xe4\x12\x9a\xf8\xfc\xbf\x1b\x79\xb9\ \xa4\xf2\x19\x73\xe1\x5f\x17\xb8\x8a\x82\xab\xb9\x82\xd1\xe0\x1c\ \x37\x8b\xe9\x38\x47\x8b\xaf\x59\xe7\x37\x95\x1d\x66\xf9\xfa\xa6\ \x70\x14\xbf\x06\x8a\x7f\xfa\xee\x62\x38\x07\xce\x9c\x8b\xb0\x05\ \x2e\x83\xa7\x05\xbc\x6c\x60\x3b\xe7\x8a\x06\x6f\x1b\xd8\x61\x03\ \x3e\x3a\xae\x82\xaf\x0e\x3a\xdf\x45\xd8\x8a\xe5\x59\xa3\x94\xcb\ \x9c\x95\xb1\x43\xa1\xc1\xe6\x6a\xe0\x7f\x65\x92\xf2\xb3\x0b\xb0\ \x49\x9c\x03\x0d\x00\x7e\x70\x1e\xd6\x6b\xbe\xd3\xd9\x2f\x6f\xc4\ \x57\xf6\xfb\xeb\xce\x27\x86\xaa\x8a\xb9\x9a\xfc\x11\x3f\xd2\x66\ \xf1\x73\x66\x04\xfb\xcd\x90\x33\x23\x48\x60\x6e\x01\x9b\x2d\x8a\ \x4e\x1c\x4c\x9b\x0d\xad\x3d\x6a\xf1\x0a\xaf\xbb\xa2\x0e\x94\x58\ \x50\x52\x63\x82\xf3\xb0\x81\x9f\x8b\xfe\xd4\x8a\xff\x59\x9e\x88\ \xcf\x6f\x08\xd1\x50\x58\xba\x23\x38\x4a\xac\x07\x78\x35\xaf\xc5\ \x1f\xfe\xd6\xf2\x37\x34\xe2\x4b\x06\x70\x41\xc1\x3c\x0c\xb0\xdd\ \x14\x97\xc0\x9d\xe3\x38\x43\x58\x37\x05\x5d\xe3\x05\xd8\x98\xad\ \xf0\xc4\xc8\x03\xed\xf9\x10\x57\xb3\x19\xc3\xea\xae\x50\x79\xe1\ \x07\x1a\x13\x98\x93\x0f\xe2\xcb\x6f\x06\x1d\x2c\xa6\x85\xf3\x78\ \x85\xf4\x14\x1c\xf2\x39\xb1\xb4\x39\xa7\xfb\xeb\x0a\x7b\x01\x9d\ \x7f\x09\xdc\xb0\x52\xdd\x05\x1e\x36\x9b\xe2\x12\xb8\x2a\x61\xf7\ \x3c\xac\xc5\x73\xb9\xa0\xa9\xb6\x65\x13\x35\x72\x1f\x25\xa4\x50\ \x9f\xbd\xf0\x54\x4e\x32\x3c\xdd\x9a\x35\x5a\xb9\xdb\x63\xd5\x50\ \xa8\xb4\xe0\x7d\x43\x13\xe4\xa3\xf8\x43\xc4\xa3\x71\xf9\xf2\x72\ \xc8\xe7\x59\x5b\xd6\x0d\x87\x7e\xb7\xa9\x55\x98\x17\xfa\x3c\xac\ \xe3\xc2\x99\x5a\xb3\xbb\x55\x43\x50\xf7\x91\x9d\x08\x74\x4e\xc9\ \x10\x5b\x2d\x44\x88\x9c\x19\x82\xce\x69\x4d\x78\x5a\x74\x61\x6d\ \x03\xa6\xee\x2b\x87\xc0\x47\xf3\x9b\x6b\x4c\xf0\xa4\x8a\xcf\x44\ \x92\x51\x8d\xd5\x63\x7f\xd0\x14\x30\x15\x54\x5f\x81\x6b\x14\xb1\ \x8c\x50\x9b\x82\x92\x27\x6b\xad\xd0\xb2\x29\x36\xe2\xf9\x3c\x72\ \x9c\x4b\x5c\x30\xeb\xab\xa9\x5b\x9b\x78\xb4\xbb\xcd\xc2\xab\xe9\ \xb3\x62\x34\xd4\x9d\xdf\x8e\x9b\xe0\x49\x16\x5f\x5e\x1f\xa0\x79\ \x17\xa0\xb1\x09\x9c\x79\x0b\xa3\x2e\x41\x8b\xc9\x08\xb6\xf4\xbd\ \xd6\x90\x0c\x95\xb3\x91\x06\x75\x35\xea\x04\xef\xdd\xb5\xd2\xb3\ \xf3\xf6\x6e\xba\x2c\xd3\x7b\xf9\x28\x68\x30\xa3\xff\x13\x2d\x7e\ \x0e\x4c\xb0\x81\xf7\xef\x5a\x13\xb8\xf2\x16\xac\x3e\x6e\xc0\xde\ \xc6\x50\x63\x7d\x29\x1e\x7a\xcd\x13\xcc\xec\xc8\xcd\x88\x43\x7d\ \x9e\xad\x29\x63\x1c\x22\x5a\xdf\x39\x0b\xa0\xe7\xdf\xbf\x38\x5e\ \x7c\x5a\x03\x20\xad\x00\x2a\x70\xf1\xed\x36\x01\xb5\xb4\x4b\x3c\ \x2f\x70\xe5\x7f\x1a\x89\x4f\x95\x4f\xf0\xdd\x2b\xd0\xe9\x34\xdc\ \x22\x33\x50\xcb\xcc\xae\x1b\xc8\xf9\x88\xc3\x43\x97\xe5\x3b\x42\ \xac\x6f\xfc\xca\x40\x9f\x3f\xe7\x41\xf7\xa5\x23\x1d\x2b\xbe\xb4\ \xeb\xe9\x64\xb1\x1e\xb2\x51\x41\x8b\x6f\xb7\x09\xa4\xbc\xc0\x45\ \x37\xc1\x22\x8b\x6f\xbe\x8b\x15\x3d\xee\xc4\x67\xb8\xd0\x0c\xd4\ \x27\x93\x21\x48\x24\xf5\xe8\x83\x26\x5b\x72\x32\xe2\x30\x8d\x3a\ \x4c\xd7\x31\xe6\xc8\x97\x0e\x6b\xb1\x64\x82\x5e\xb3\xe7\x40\xb7\ \xc5\xc3\x1d\x29\xfe\x24\xb1\x06\xa0\xbe\x78\x1e\xa2\xc0\xc5\x37\ \x36\xc1\x64\x96\x6a\xd9\x04\xda\x84\xab\xed\xf6\xda\x36\x3d\x0f\ \x4f\xb3\x5d\xf2\x43\x8f\x94\x9c\x51\xb8\x96\x67\xdf\xb2\x4b\x30\ \xb3\x33\x84\xf9\x10\xb0\xcb\xae\x0f\x1c\x1a\xb6\xc9\x04\x3d\x66\ \xfd\x05\x5d\x17\x0d\x73\x94\xf8\xfd\x98\xb4\xaf\xff\x2b\xac\x40\ \xdf\x00\x6a\xcd\x04\x25\xd8\x4f\xb4\x36\x20\x3b\x13\x90\xf8\x1f\ \x6d\xa8\x90\xa3\x5b\xa1\x94\x60\x99\x0c\xe0\x62\x31\xc1\xb4\x66\ \x88\x8b\x66\x43\x40\x7a\xe9\xb3\xa3\x1f\xcb\x26\x13\xb4\x73\x1a\ \x0d\x55\x16\x55\xb6\x2b\xbf\xb0\x20\x7e\xc1\xec\x77\x9c\x03\x13\ \x7c\xcc\x17\x6d\x8e\x67\x17\x8d\x4c\x90\x1b\xf1\xe5\x2d\xce\xd5\ \xd3\xcf\xfa\x51\x46\xf6\x86\xb8\x64\x30\xfc\xa4\x6b\xca\x8b\x7d\ \x79\x28\x62\xf1\x79\xfa\x3f\xd8\x15\x5b\x47\x06\x8f\xab\xf8\x6a\ \x13\xd0\x0a\xd5\xea\xe2\x61\x12\x8d\x09\x72\x2b\xbe\xb9\x01\x2e\ \xf1\xb9\x06\x57\x15\x6e\x36\x20\x99\x40\x7d\xb3\x86\x22\x8a\x23\ \xb7\x66\x21\x33\xf1\xc5\x9b\xf4\x0c\x83\xfc\xd4\xee\x20\x76\xca\ \x9a\x09\x1e\x77\xf1\xcd\x97\x90\x57\x53\x9b\x80\xc4\xa7\x1b\x48\ \x39\x1d\x63\x1b\x1b\x60\x9b\x0a\x57\x03\x64\xd1\xb7\xf1\x3e\x9f\ \x5a\x3d\x09\xaf\x1e\xff\x13\x34\xf9\xe3\xa8\x2d\x58\xf9\x28\x86\ \x44\x94\x56\xee\xd2\xe3\xda\x13\x99\xfc\x88\xf6\x10\x76\xd4\x92\ \x09\x9e\x14\xf1\x2d\x9a\x80\x6e\xa4\xd8\xbb\xa7\x7d\x76\x06\x20\ \x11\x2f\x6a\x0c\x20\xb3\x95\xdf\xd5\x93\xc4\x5e\x97\xed\x6d\x5d\ \x47\x8d\x00\x48\x78\xb1\x30\xe3\x2e\xdf\x9c\x41\x7a\x1f\x21\x3d\ \xae\xfd\x2b\x93\xde\x3b\x5c\x5f\x3c\xcb\xd8\x8e\x0d\x65\x61\xe6\ \xeb\x00\x9f\x34\xf1\x2d\x9a\x20\x37\x6b\xe0\x64\xaa\xae\x29\xa9\ \x9a\x0a\x96\x85\xde\x60\xb3\xd8\x6a\x68\xda\x96\xee\xed\xd7\xdd\ \x52\x26\xc7\xa1\x9e\x0f\x55\x49\x3c\xd3\xeb\x67\x69\xa2\x86\xde\ \x42\x4a\x1b\x32\x7c\x2e\x9e\xa3\x78\x41\x4c\xa1\x97\xe7\xcf\x54\ \xa8\x4c\xf0\xa4\x8a\xaf\x37\x01\xed\x4a\xd5\x07\xc3\x22\xb6\xe0\ \xdc\xec\x86\xd5\x76\xc7\xfb\x76\x89\x4c\x5d\x0f\xf5\xf1\x34\x7f\ \x40\xf3\x08\xb4\x90\x83\xe6\x15\xe8\x3a\x68\x48\x99\xd3\xa9\x5f\ \x25\xd4\x9b\x5a\x3c\x09\xff\xbb\x10\x90\xb6\xaa\x7f\x57\xdc\x9b\ \x2f\x62\xf6\x4c\x85\xc6\x04\x4f\xb2\xf8\xe6\x26\xa0\x0a\xe9\xc8\ \x3e\x62\x73\x31\x39\xba\x9c\xd3\x68\x60\xc9\x00\x34\x63\x48\x42\ \x93\xc8\x94\x73\x90\xd0\xd4\xed\x90\xd0\x24\x16\xb5\x54\x32\x1e\ \x89\x9d\xdb\x28\x44\xdf\x17\x4f\xe6\xce\x52\xb5\x78\x7a\x60\x95\ \x76\xe5\x78\x4f\xac\xd7\xb7\xf4\x16\x52\x93\x09\xba\x31\x2f\x56\ \x83\xad\x7a\x92\xc5\x57\x9b\x80\x9e\x60\xa9\x20\x5a\xc7\x20\xd6\ \x9b\xed\xa5\x16\x40\x33\x7e\xf6\x54\x7e\x63\xb7\x4a\x3c\x6c\x93\ \xd0\x34\x3b\x48\x89\x25\x89\x4c\xe7\x22\xa1\xe9\xc1\x49\x12\x9a\ \xc2\x73\x1e\x6f\xb7\x4e\xef\xdb\xf9\x3f\x31\x3b\xd7\x42\x44\xb9\ \xd7\x99\x6d\xaf\x9f\x95\x4d\xd0\x46\x4c\xed\xf6\x79\x92\xc5\x37\ \x7f\xa2\xe8\x0d\x51\xd8\xae\x3c\x1a\x60\x4b\x22\xe1\xac\x89\x45\ \x99\xb3\xb2\xed\x99\xe8\x46\x1c\xf5\xf6\x8c\x1c\xed\xb6\x29\xbd\ \x6f\x67\xa0\x28\x4b\x71\x66\xff\x7b\x87\xe9\x78\x7a\xb0\xa3\xa6\ \x30\xcf\x13\x2f\xbe\x7a\xae\xa0\x98\x48\x8e\x5a\x62\x9b\xf9\x05\ \x83\xe7\xa1\xec\xa2\x01\x85\x5c\x2e\xfe\x20\x16\x81\x69\x95\x07\ \x99\xc6\x11\x09\x65\xae\x56\xe1\x76\x62\xfe\x78\xfd\xf4\xe2\xe5\ \xd2\xb9\x6c\x10\xcf\x8b\x04\xf1\x7f\x42\x7c\xa3\x68\x40\x5b\x96\ \xf5\x64\x0d\xd9\x72\x39\x1a\xa8\xc7\xc9\xca\xaa\x57\xe9\x8d\x20\ \x33\x44\xd8\x1d\xcb\x7a\xb1\x7d\x94\x40\x51\xc8\xcf\xab\x1d\x36\ \xb3\x4d\x00\x1b\xf0\x8d\x2a\xf3\x7f\x9f\xc2\x27\x30\x1a\xd0\x10\ \x89\xb6\x7b\xf9\x12\xa3\xc1\x28\x39\x1a\x50\x3f\x6b\xb6\x08\x42\ \x7e\xe3\xb7\xbc\x05\x5a\x4f\xf6\x36\x1a\x62\x34\x4b\xa2\x6c\x3e\ \xb7\x13\x4c\x76\xbf\x71\xb3\x38\x37\x62\x63\x96\x87\x3b\x73\xfc\ \xaf\x7c\xfe\x23\xfa\xc3\x52\x62\xc2\xa4\x17\x76\x0c\xeb\xe8\xd6\ \xb2\xd9\x22\x88\x61\x42\xf8\x0a\xa2\xd5\x55\x16\xc9\xd7\xf7\xfc\ \xfd\xb7\x78\xac\x2d\xb9\x84\x43\x5e\xb8\x24\xbd\x71\x73\xb8\xb8\ \x3b\xf7\x7c\xa1\x84\x8e\x8b\x06\x2f\x8a\x68\xd0\x06\xa3\xc1\x68\ \x94\x7a\x81\x6a\x11\x44\x13\xd1\xdf\x16\x51\x75\x21\xaf\x89\x19\ \xb6\x0e\xf8\xb7\xb1\x18\x3d\x0e\x53\xf4\xc8\xcb\x5d\xb7\xc5\x7e\ \xfb\x34\x02\x18\x2c\x92\xb7\xa7\x0b\xa5\x73\x7c\x34\x20\xa1\x69\ \x1f\xc0\x1e\x02\x4b\x8b\x20\xe4\xe1\x25\x6d\x58\x41\xbb\x62\x7e\ \x8b\x76\x58\x40\xf3\x0c\xd4\x2d\xe4\xd5\x1d\x3e\x34\xda\x11\x31\ \xd3\x57\x91\x15\xf0\x93\xb9\x4f\xea\xe7\x69\xd1\xb7\x56\x10\x58\ \x1b\x22\xc9\xc7\xbf\xcb\xa4\x6d\xd0\x07\xf3\x2c\x1d\x43\x75\x4e\ \xde\xaa\x99\xdd\x04\x10\x1f\x01\xf4\x66\x7b\x99\xb4\xef\x6e\x99\ \x42\xa9\xf2\x36\x1a\x3c\x25\xc4\xfd\x8f\x1d\xd1\xa3\xa4\xe8\x9b\ \xbb\x62\xb7\x30\x9e\x8d\x60\x67\xa8\x5b\xb0\xe7\x46\x14\x09\x4d\ \x49\xa5\x6e\xdb\x75\x9a\xfd\xa3\x7d\x0a\x2b\xf2\x2d\x5a\xbe\x12\ \xa3\x98\xc2\xcf\x23\x3a\xcf\x50\x41\xdc\x8c\xe9\xc7\x5f\x90\x20\ \x86\x98\xea\xb9\x03\x4a\xe8\x0c\x85\x56\xef\xaf\xaf\xdf\x76\x9d\ \x46\x23\xb4\x29\x73\x9e\xee\xcd\x57\xf8\x71\xcc\x3c\x03\xdd\x8c\ \xa9\x8e\x7c\x8d\x19\xc4\x18\x1e\xba\xc5\xbd\x01\xc3\x17\x29\x90\ \xd0\xaf\xb0\xf9\x4c\xbf\xbf\xfe\x28\x31\x0a\x19\xc8\xa4\xdd\xb8\ \xa9\x9b\xa1\x5d\xca\x8a\x16\x56\xf3\xa3\xdf\x8d\x14\x15\x7d\xf5\ \x27\x62\xee\x60\x26\xa6\x94\x1b\x2c\x08\x3d\x5a\x0c\xef\x06\x33\ \xd3\xfe\xfa\x5f\x8a\xd6\x5e\x53\x8c\x50\x68\x0e\xbf\x84\x48\x3e\ \x0b\x13\xc0\xc7\x6c\x88\x59\x85\x49\x6f\xcb\xa6\x3b\x77\x43\xcd\ \x84\x6e\x23\x86\x9a\xb5\xc5\xf0\xae\x22\x33\xed\xaf\xef\x80\x6d\ \xd7\x0b\x3f\x8f\xca\x10\x93\x04\xad\x2a\xe6\x0f\xcc\x85\x7e\x59\ \x4c\xec\x3c\x5d\xd8\xba\x9f\x6c\x23\x14\x11\x5d\x43\xa1\xd0\x85\ \x9f\xc2\x4f\xe1\xa7\xf0\x53\xf8\x29\xfc\x68\x3f\xff\x0f\x1d\xf6\ \x57\xee\x7c\x6e\x76\x4b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\ \x60\x82\ \x00\x00\x05\xca\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x05\x91\x49\x44\x41\x54\x78\x5e\x8d\x95\x0b\x6c\x54\xc7\ \x15\x86\xbf\x99\xfb\xd8\xf5\x9a\xf5\xda\x06\xf3\x30\x8e\x1d\x13\ \x48\xf3\xb0\xdc\xd0\x84\xf4\x21\x4a\xd4\x9a\x10\x48\x1c\xea\xa4\ \x69\xe2\x84\x20\x28\x88\x47\x53\x09\x0a\x69\x52\x29\xa9\x2a\x48\ \x48\xab\x4a\x81\x54\x51\xc5\x2b\x85\xd0\x16\xb7\x29\xb8\x51\x12\ \x90\x5c\x2b\x34\xcd\x8b\x50\x4a\x95\xb5\xe5\x26\xc6\x50\x82\xed\ \xae\xb7\x36\xf5\xf3\x81\xbd\x8f\xbb\x73\xba\x8a\x56\xb8\x1b\x5a\ \xe8\x2f\xfd\x73\x74\x66\xa4\xf3\xcf\x3f\x47\xa3\xa3\x44\x84\x0c\ \xd8\xb7\x4e\x2d\xfd\x43\x98\x79\x6d\x11\x66\x8e\xc7\xf1\x23\x28\ \x40\x50\x08\xa0\xf2\x72\x29\xbc\xa9\x94\xf8\xd7\x6e\x66\x27\x9a\ \xe6\x55\xbb\xa4\x9b\xab\x41\x44\x3e\xe5\xee\xd5\x3c\xd2\x52\x77\ \xdb\xd0\xa6\x07\x27\x27\xe4\x7f\x20\xe6\x89\x3c\xfd\xed\x42\xf9\ \xdb\x1e\xf5\xaf\x23\x4f\x13\xdd\xfa\x00\x65\x22\xc2\x95\x68\x93\ \x81\xf1\x58\x59\x71\xfb\xbc\xbc\xe2\x93\xed\x74\x75\x75\x60\x3b\ \x01\x3c\x2f\x89\xa0\xd0\xca\x22\x85\xe2\xa7\x5b\x36\x53\x22\xfd\ \x9c\xe9\x20\x77\x74\x90\x84\x5f\xb3\x65\xe7\x0a\xd5\xa5\xe1\x5a\ \x81\x5c\xdb\x66\xff\x9a\x7d\x72\x84\x09\xa0\xc9\x40\x0c\x53\xb1\ \x87\xc0\xeb\xa5\xb3\xa3\x9d\xa6\x70\x33\xe1\x70\x13\xcd\x69\x7e\ \x18\x0e\xf3\xde\xe1\x2d\xcc\xcd\x0f\x53\x3e\xeb\x56\x42\xe5\xdf\ \xf2\xcd\xbe\x63\x63\xa8\xfa\xb1\xdd\x0f\xdd\xfb\x64\xc3\xa6\x65\ \xcf\x9f\xad\x5d\xbb\x3f\x51\x73\x73\xd5\xda\x03\x3b\x96\xa9\xef\ \xfe\xd7\x27\xfa\xf9\x23\x34\xc9\xe9\x6f\xca\x73\x1b\x02\xf2\xe2\ \x8b\x2f\xc8\xea\xd5\xdf\x91\xda\x87\x97\xc9\x3d\xd5\x35\xb2\x70\ \xd1\xbd\xf2\x54\x8d\x92\xc4\xd8\x90\x5c\x8e\xb8\x24\x92\x63\x97\ \xb2\x86\x9f\x2d\x8a\xee\x78\x94\x8d\x99\xba\x13\x0e\x8c\x42\xa5\ \x8c\x61\x4e\x65\x25\xc7\x8e\xd5\xf3\x51\xcb\x31\x22\x1d\x27\x19\ \xe8\x6d\x21\xe0\x6f\xc3\xe7\x0a\x82\x07\x24\x41\x06\xc0\xf4\x83\ \xe9\x25\x3e\x36\x40\xff\x85\x4e\xbc\x94\x07\xc0\xe2\x8d\x8d\x33\ \x5c\x8b\xe5\x4a\x29\x07\x98\xe8\x81\x32\x08\x28\xe6\x55\xe4\x31\ \x9a\xd0\x8c\x8c\xd8\xd8\xb6\x85\x42\x51\x5e\x1e\xe2\xc2\xf1\x0e\ \x14\x49\x60\x0c\x52\x17\x41\x04\x94\x22\x11\x1b\x66\xa0\xaf\x1b\ \x74\x80\xbc\xfc\xa9\x38\x8e\x8f\x50\xf1\x75\x45\x70\x6e\x1a\x10\ \xb9\x24\x20\x1a\x2c\x5b\x31\xa5\xc8\xc7\xdd\x8b\x4b\x89\x5d\x4c\ \x90\xf0\x52\x68\xad\xc8\xc9\xb1\x39\xd1\xec\x64\xec\xa6\x80\x18\ \x68\x0b\xc4\x43\x29\x43\xd2\x8b\xd3\xdc\xf4\x5e\x3a\x5a\x14\x4e\ \x2e\x21\xda\x71\x2e\x09\xe4\x65\x3b\x50\x08\x8e\xc6\xef\x6a\xb4\ \xed\x10\xf0\x6b\x40\xb0\x2d\x85\xdf\x67\xa5\x73\x0b\xcb\xd1\x80\ \x02\xdb\x01\x49\x81\xd1\xd8\x96\xa4\xcf\x40\x52\xe3\xc4\x63\x1e\ \x29\xaf\x88\xd8\x38\x06\xb0\xb2\x04\x04\x40\x2b\x6c\x5b\x61\x05\ \x1c\x94\xd2\x1c\x79\xe3\x0c\xaf\x1d\x6d\x65\x6c\x2c\x46\x57\xeb\ \x10\xbf\x09\xaf\x40\x69\x43\x61\x41\x90\xfb\x6b\xee\x64\xc1\xc2\ \xaf\x60\xeb\x04\xf9\xa1\x00\xe5\xa5\x93\x89\x7b\x3e\x82\xa1\xe9\ \x04\x5c\x3c\xc0\x7c\xd6\x01\x68\xf5\x29\x95\xa3\x89\xb4\x0f\x70\ \xf0\xe8\x38\x0f\x6f\xfe\x0b\xa7\x3a\x83\xcc\x1c\x18\xc6\x32\x2e\ \xae\x11\xe6\x96\x5e\xe0\xd5\xd7\x7f\xc0\x82\x45\x5f\xc4\x76\x85\ \xe0\x24\x07\x9f\x5b\x80\x51\x41\x7c\x39\xd3\xf0\xbb\x18\x20\x99\ \x25\x60\x5b\x08\xd6\xc4\xcf\xc8\x0d\x38\x78\xf1\x51\xfa\x47\x87\ \x69\xe8\x2a\xe4\xa3\xd6\xc9\x24\xfa\xc0\x17\x87\x4d\x4b\x82\x74\ \x76\x9e\x07\x46\x41\x3c\x5c\x3b\x85\x63\x81\x4a\x2f\xb8\xb9\xe9\ \x1c\x03\x98\xac\x8f\xe6\xda\x80\x23\x60\x03\x16\x14\x5c\x13\xe4\ \x89\x75\x33\x78\xfd\x99\x5b\xb8\x2d\xe7\x14\x3a\x07\xd0\x10\x57\ \xe0\x79\x43\x04\x73\x73\xc0\x18\x90\x4c\x10\x00\x05\x80\x12\x00\ \xc8\x72\xb0\xb5\x9e\xca\xfe\xa2\x30\x0f\xdc\x57\xcc\xb4\xb2\x11\ \xa2\xd1\x21\xce\xb6\xf5\x30\xbb\x62\x01\x3d\x6e\x11\xe2\x07\x72\ \x40\x01\x96\x0d\x22\x99\xca\x69\x8a\x08\x00\x64\x22\x64\x0b\xa0\ \x94\x7a\x70\xeb\x81\xdd\xd6\x94\xd9\x9f\xe3\xb9\xfd\x3f\x61\xb8\ \xe7\x38\x45\x25\xb3\x28\xbb\x7d\x2d\xd1\xfb\x56\xf2\xe6\x19\xf0\ \x5c\xc8\x9b\x0a\xf6\x18\xe0\x68\x8c\x11\x10\xc1\xa4\x0c\xc6\x98\ \xcc\xcd\x0d\x1a\xb9\x5c\x00\xe8\xee\x6d\xff\x3b\xd7\x57\xd7\x52\ \xb2\xbd\x91\x9e\x9e\x24\xed\x9e\x43\x63\x2f\x44\xbb\xc1\xe7\x87\ \xbb\x3e\x0f\x37\xfc\xf3\x4f\x78\xbe\x59\xcc\x29\x2f\xa3\xf5\x62\ \x02\x8c\x60\xc4\x20\x69\x02\x99\x98\x0d\x0d\x20\x22\xef\xc6\xde\ \x7c\xbe\xf3\x77\xcb\x2b\x09\x1e\xd9\x85\x52\x31\x86\x05\xf2\x7c\ \xf0\xd5\xc2\x38\x8f\x15\x9f\xe1\xa6\x77\x96\xf3\xf1\x6f\x1f\x67\ \xe0\xed\x27\x88\x45\x1a\x99\xff\xe5\x4a\xc4\x4b\x61\x52\x29\x44\ \x24\xe3\x48\x01\xf6\xa5\x56\x64\x35\xf9\x4b\x37\xd0\x77\x78\xcf\ \x17\x78\xeb\xc0\x8f\x71\x5f\xda\x4c\xcd\x89\xed\xac\x6b\xdf\x47\ \xd5\xc7\xcf\xd2\x73\x68\x25\x47\xeb\x0e\xd2\xd0\x70\x88\x6d\x4f\ \xad\xe0\xb5\x5f\x3d\xc3\xd2\xea\xf9\x24\x93\x1e\x06\x0d\xca\x45\ \xd9\x41\x2c\x77\x0a\xe0\x60\x69\x34\xa0\xb2\x9a\x1c\xf7\x50\xf6\ \x94\x20\x47\xf7\x46\xf8\xf3\x07\xbf\xe0\x83\x0f\xa1\x25\x02\x17\ \xc7\x41\x83\xb7\xe6\x4e\x48\xe1\xd8\xa5\xe5\x25\xd4\xa5\x2f\x50\ \x50\x90\x8f\x88\x83\xe5\x4c\x42\xdb\x79\x58\x6e\x88\xe4\x68\xdc\ \x74\xb7\xbd\x3c\x7a\xea\x3c\x9f\x00\x5e\x96\x03\x01\x0b\xaf\x8d\ \x37\x1a\xe1\x9d\x26\xe8\x1f\x24\x31\x33\x48\xdf\xad\x33\xe8\x9c\ \x3f\x9d\x56\xe3\x31\x60\x8c\x83\x31\x2e\x05\x85\x25\x68\x67\x3a\ \x6e\x70\x0e\xda\x2e\x26\x7a\xba\x69\xe8\xc4\xc1\xc7\xff\xf1\xfb\ \x1f\x95\x9f\xdd\xb2\x79\xd5\x5b\x0d\xcd\xd4\x03\x83\xd9\x23\x73\ \x15\x07\xce\xfd\x11\xd9\xba\x8a\xc1\x9d\xeb\xf9\xa4\x6e\x03\xa7\ \xd7\x57\x51\x7f\xf7\x2d\x6c\xcb\xf7\xb3\x64\x7b\x2d\xef\x4b\x2a\ \x2e\x22\xa3\x22\xa6\x4f\x06\x23\x27\xc7\xff\x5a\xbf\x21\xf2\xea\ \x0f\x4b\xda\x7e\xbd\x9e\xd6\xaa\x1b\xd9\x9e\x6b\xf3\x0d\xe0\x46\ \xa0\x00\xd0\x22\x32\x21\xb0\x6f\x1d\x5f\xdf\xbb\x86\x43\xdf\xbf\ \x87\x5d\xf3\x66\xf1\x64\x51\x90\x25\xc0\x6c\x20\x5f\x44\x78\x79\ \x2d\xbf\x4c\x8c\x74\x49\xdf\xf9\xe3\xb1\xb7\xf7\x2c\xed\x78\xe5\ \x7b\x56\xdb\xe2\x0a\x5e\x2a\x2b\x60\x25\x30\x17\x98\x0e\xe4\x7c\ \x76\x26\x73\xd9\x06\x84\x80\x7c\xc0\xf9\xcf\xfd\x57\x36\xb0\x70\ \xef\x6a\xea\x9f\xbd\x9f\xc3\xf3\xe7\xb0\x2d\xe0\x50\x0d\x5c\x07\ \x4c\xba\xd2\xd0\x57\x99\xa2\xff\x37\x94\x52\x21\xc0\x01\x46\x44\ \x24\xce\x55\xf0\x6f\x03\xe2\xf6\xe2\xcc\x69\x65\x93\x00\x00\x00\ \x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x05\x2d\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x04\xf4\x49\x44\x41\x54\x78\x5e\xa5\x96\x4b\x6c\x5c\x57\ \x1d\xc6\x7f\xe7\xdc\xc7\x78\x66\xfc\x9a\xc4\xaf\x3c\x5a\x16\xa1\ \x20\x12\xa8\xda\x80\x84\x28\xdb\x2e\x4a\xbb\x0e\x2c\x50\x14\x60\ \xd7\x05\x48\x48\x25\x8b\xb2\x41\x95\x80\x45\x5a\x09\x51\xd4\x76\ \x55\x44\x53\x15\xd5\x55\x9b\x84\x2a\x02\x16\x55\xa8\x68\x4b\xb1\ \x23\x53\x5c\xda\x18\xbf\x82\xe3\x57\xec\xf1\x8c\x3d\x1e\xcf\xcc\ \x7d\x9c\x73\xfe\x8d\xee\x5c\x09\x5b\x42\x10\x95\xdf\xe6\x7f\x75\ \x75\xf5\xff\xf4\x7d\xdf\xb9\xba\x57\x89\x08\x77\xc3\xa5\x9f\x9e\ \x7e\xd8\x99\xf4\xbc\x73\xe6\x7e\x11\x69\x23\xe2\xf8\x37\xea\x0e\ \xbd\x9e\xef\xbf\x5e\x2a\x86\x4f\x3f\xf2\xa3\xa9\x45\x72\x7c\x72\ \x5e\xf8\x9e\x7a\xd4\x39\xfa\x10\x12\x81\x2f\x20\x00\x08\xc2\x31\ \x11\x06\x0b\x25\xbe\xf1\xf5\x6f\xff\xfc\xd0\xe7\x1f\x3a\x43\xda\ \xde\xc1\x3a\x4b\x86\x73\xa0\x35\x41\xa1\x8f\xcd\xc5\xc9\xc7\xa7\ \xdf\xbc\xf0\x38\xa0\x0e\x08\x3c\xff\x5d\x75\xee\x81\x47\x7f\xf8\ \x6c\xa1\x54\x71\x36\x8d\xd2\xa1\x7b\x4f\x17\x51\x28\x40\x4a\x83\ \xf7\x04\xa5\xca\xbd\x7e\x1a\xb5\xf4\x9f\x5f\x3e\x47\x6a\x22\xee\ \xfb\xf2\xc3\x28\x4c\x66\x42\x10\x6c\x2a\x68\x7f\x80\xd2\xe1\xa3\ \x04\xe5\x43\xfc\xf2\xfb\x9f\x3d\xfb\x83\x67\xe7\x2f\x02\x20\x22\ \xfc\xea\x2c\xd7\xac\x4d\xe4\x3f\x11\x27\x56\x36\x36\xb7\xc4\x8a\ \x48\x75\x63\x55\x5e\xf9\xf1\x09\xb9\x76\xf1\x5b\xb2\x36\xfb\x92\ \xd4\x56\xdf\x90\xea\xd2\x6b\x32\x37\xfd\xa2\xb4\x5b\xdb\x52\xbd\ \xfd\x91\xac\xdd\x78\x55\xde\x7b\xe9\x8c\xbc\xf1\xd4\x17\x9f\x10\ \x11\x34\x80\x38\x8c\x4b\x3b\x80\x80\x44\x20\x06\x30\xd9\x75\xdc\ \xaa\xb2\xb6\xb2\x48\x1c\x25\x0c\x8d\x1c\xe5\xa1\xef\x5c\xa2\x32\ \xfc\x20\xff\x78\xe7\x77\xb4\xdb\x71\xe6\x62\x7b\xbb\xc1\xd6\xd6\ \x16\x43\xa3\x27\x91\xde\x13\x3c\xf0\xd8\x13\x28\xe4\x49\x00\x0d\ \xe4\x46\x0c\x10\x83\x8d\xc0\xc5\x60\x9a\xe0\xa2\x6c\x41\xa7\xbd\ \x47\x75\x63\x1d\x11\x38\xf2\x99\x53\x8c\xdd\xff\x4d\x56\x3f\x7a\ \x9b\xad\x5a\x83\xd4\x18\xb4\xd6\x5c\x1e\xbf\xc0\xcf\x7e\x72\x8e\ \xd9\x8f\xff\x42\x9c\x46\x58\x6b\x07\x94\x52\x15\x4d\x0e\x08\x60\ \xbb\x0e\x5c\xa3\x3b\xb1\x04\xbe\x41\x2b\xc3\x07\x7f\xbf\xce\xd5\ \xab\x6f\xf2\xde\xbb\x7f\xa2\x5e\xdf\x20\x8a\xcd\x9d\xb9\x8b\xb3\ \x8e\x81\xfe\x32\x5f\x39\xfd\x39\xbe\xf6\xd5\x93\x8c\x8e\x0c\x22\ \x62\xb0\x4e\x00\x0a\x3e\x39\x48\x0c\xa8\x3c\x1e\x47\x86\x33\x04\ \x9e\x61\x74\xb8\x4c\xad\x7a\x8b\xcd\xf5\x3a\xde\x91\xa3\x14\x8e\ \xde\x87\xb3\x42\x14\xc5\x24\x69\x82\xd6\x30\x32\x3c\x90\x39\x09\ \x7b\x8a\x94\xfa\x0e\xd3\x57\xf4\x35\xe0\xed\x13\xb0\x60\x5b\x60\ \x77\x41\x97\x40\x12\x70\x6d\x7c\xe0\xd8\xd8\x00\x95\xbe\x53\xa4\ \x56\x51\x28\xf4\xa2\x7d\x0d\x1a\xac\x75\x58\x6b\x33\x17\xce\x39\ \x40\x10\x55\xc8\xee\x81\x70\x50\x40\x59\x90\x0e\xb8\x0e\x5d\x14\ \xa8\x02\x88\x21\xf0\x2d\x03\x7d\x09\xe8\x5e\x08\x0b\x98\xc8\x22\ \xd6\x92\x24\x31\xc6\x18\xac\xb1\x58\x6b\x10\x11\x3c\xdf\x60\x5d\ \x0a\xa8\x83\x2f\x5a\xb6\xd8\xc6\x80\xce\x45\x52\x20\x00\x0c\x48\ \x00\x84\x20\x0a\xcc\x1e\x22\x3e\xa2\xc8\x0a\x8e\xa3\x98\x34\x4d\ \xbb\xcb\x3d\x0f\xb4\x26\xde\xab\xd3\xec\x58\x01\xd0\xe4\xa0\x7d\ \xd0\x01\xd8\x2d\x70\xbb\x40\x01\x70\xdd\xc8\xb0\x5d\x51\xb3\x05\ \x28\xc4\x39\xc4\x48\xb6\x38\x8a\x22\x80\x2c\xa2\x24\x49\x48\x93\ \x04\x71\xa0\xc8\xb0\xfb\x3a\x30\x60\xb6\xbb\xb1\x28\x1f\xcc\x3a\ \xd8\x36\x19\xfe\xa1\xac\x0f\x4c\x13\x82\x10\xa4\x17\x41\x50\x0a\ \x4c\x16\x55\x92\x39\xe8\x29\x16\xb1\x22\x88\x22\x57\xc0\x1d\x3c\ \x45\x4a\x83\x6b\x81\x2e\xe6\x91\xd5\xc0\xab\x40\x34\x0f\xde\x20\ \x78\x7d\xf9\x73\x3e\x22\x8a\x38\x4e\xf1\xfd\x00\xfc\x1e\xd0\x8a\ \x62\xb9\x9f\xca\xd0\x11\x7a\xfb\x07\xf0\xb4\x56\x79\x2e\x39\x08\ \x90\x80\xb9\x05\xce\x81\x3f\x02\x5e\x3f\x60\xc9\x48\x97\xbb\xe2\ \xe1\x29\x04\x85\xf6\x34\x85\x62\x99\xde\xc1\x11\x8a\x77\xa6\xe7\ \x07\x48\xd4\xc0\xd6\x16\x59\x9a\x5f\x66\x72\xa6\x79\x0d\x10\x1f\ \x72\x3b\xb2\x07\xc9\x2c\xe0\xe7\x2e\x7a\xba\x91\xc4\x73\xa0\xca\ \xe0\x95\xba\x51\x89\x41\xab\x90\x20\xec\x61\x74\xe4\x38\x65\x95\ \xd0\xbc\xf9\x21\x8d\xd5\x7f\x92\xb6\xeb\x4c\x7e\xb8\x36\x53\xdb\ \xb5\x33\x17\xc6\x57\x7e\x01\x34\x7d\x0e\x50\x02\xb7\x03\xe1\x18\ \xb4\x26\x41\x85\x79\x37\x4b\x20\x15\x08\x8f\x81\x12\xb4\x36\x48\ \xdc\x64\xe5\xfd\xdf\xe2\x1d\x36\xbc\x7e\x6d\xf9\xf2\x8d\xa5\xf6\ \xbb\xb7\x36\xa2\xe9\x85\xf5\x78\x1e\x68\x02\x2d\x11\x69\xef\xeb\ \xa0\x03\xd2\xca\x4f\x8a\x0f\xa4\xe0\x0f\x01\x7d\x60\x02\x08\x4a\ \xa0\x77\xa1\x38\x84\x17\xa7\xec\xd4\x3b\xcd\xe7\x2f\x5d\x7f\xa6\ \xd5\xb1\xbf\xaf\xef\xd9\x15\xa0\x01\x74\xe4\xe0\x87\x88\x83\x02\ \x66\x07\x82\x31\x88\x17\x21\x1c\x05\xb5\x07\xc5\x13\x10\x7e\x09\ \x3c\x8f\x76\x75\x27\x59\x9b\xba\xd2\xd9\xab\xad\xf0\xc1\x12\x6f\ \x2d\x57\x93\x71\x11\xb9\xc1\x7f\xc1\x27\x07\xd5\x03\xe1\x30\xa4\ \x0d\x28\xdf\x03\x85\x61\x08\xfb\xe9\x54\x37\xd3\xb9\x89\x2b\xb5\ \xb5\x99\xa9\x56\x63\x63\xce\xfc\x71\x22\x99\x6e\xa7\xac\x8f\x4f\ \x32\x0e\xac\x00\xfc\x4f\x01\xa5\x08\x7c\xcf\x41\x78\x18\xda\xbd\ \xec\x35\xe3\x78\xf9\xfa\xdb\x8d\xd9\x77\xae\xee\x34\x6e\x2f\x9b\ \xcb\x93\x4c\x2e\x6c\xf2\xb7\xb5\x6d\x3e\xde\x6a\x71\x33\x8f\xa3\ \x05\x74\xee\x4a\x40\x7b\xac\xc7\xad\x1a\x3d\xc1\x71\xe6\xa7\xae\ \xd4\xe7\xff\xfa\x87\xc6\xee\xed\x59\x73\xfe\xa2\x7b\x6e\xa9\xc6\ \x04\xb0\x0e\xd4\xf3\xe2\x2c\x77\x4d\x2e\x10\x86\xfc\xe6\xd7\xe7\ \xcf\xf6\x20\x1c\x9f\x58\x60\x61\xea\x5f\x4c\xdc\xdc\xe4\xfd\x66\ \xc2\x1c\x50\xcf\x8a\xfb\x94\x1c\xf8\x6d\x51\x4a\x55\x80\x12\xd0\ \x06\x1a\xd9\xe2\xff\x93\x4f\x00\xc2\x30\xec\x24\xf5\x72\x95\x25\ \x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x06\xe8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x20\x00\x00\x00\x20\x08\x06\x00\x00\x00\x73\x7a\x7a\xf4\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x06\x7a\x49\x44\x41\x54\x58\xc3\xed\ \x57\x09\x4c\x54\x57\x14\x1d\x6a\xed\xa6\x4d\x69\x69\xb5\x2e\x15\ \xf7\x1d\xb1\x20\x8a\x0a\x28\x2a\xb2\xa9\x88\xc0\x20\x28\x22\xae\ \xe0\x30\x08\x6e\x6c\x23\x42\x01\xc5\x71\x41\x76\x71\xa1\x0a\x28\ \xe2\x5a\xc0\x0a\x5a\x91\x60\xc0\x15\xad\x88\x68\xcd\x18\xd4\xaa\ \xd4\x5a\xb1\x2e\xe8\x8c\x0a\x9e\x9e\x0f\x3f\x8d\x52\x29\x9a\x9a\ \x36\x69\x9c\xe4\x64\x32\x33\xff\xdd\x73\xef\x39\xf7\xde\xff\x47\ \x02\x40\xf2\x5f\x42\xf2\x36\x81\xff\x65\x02\x66\x52\x85\x91\x99\ \x34\x58\x66\xea\x14\x14\x6f\xea\x18\x98\x66\xea\x18\x90\x3e\xd4\ \x7e\xc1\xaa\x81\xb6\xde\x93\x25\x12\xc9\xc7\x44\x33\xc9\x9b\x7e\ \x0d\x9b\x18\xd2\x97\xc4\x11\xc3\x9c\x17\x17\x7b\x2c\xdc\x7c\x39\ \x60\xf9\xe1\xdb\xa1\xd1\x17\xab\x15\x2b\xae\xa8\x15\xcb\xaf\xa8\ \x03\xa3\xce\x3c\x90\x29\x76\xdf\x1a\x6c\xe7\x97\x6f\x60\x31\x5d\ \xc6\x23\x9f\x10\xef\xbe\x01\xe2\xc5\x96\x24\x4d\x99\x34\x37\x59\ \x15\x91\x50\x76\x37\x3c\x41\x53\x2b\x0f\x07\x26\x2d\x00\xc6\x7a\ \x02\xa3\xa7\x02\x23\xdd\x00\x6b\x77\xc0\x7d\x1e\x10\x16\x5d\xf9\ \xc4\xc2\x75\xc9\xb5\xd6\xba\x7a\x52\x1e\xd7\xf9\xc7\xc4\xd3\x17\ \xa5\x56\x28\x93\xaf\x3e\x0c\x8c\x06\xdc\x02\x49\x24\x03\x4c\xa6\ \x01\x86\x93\x01\x3d\x29\xd0\xdb\x1e\xe8\x66\x4b\x8c\x06\xfa\xd9\ \x00\xd2\x39\xc0\x82\xf0\x22\x75\xaf\xc1\x13\x72\x18\xc6\xe0\xf5\ \x89\x9d\x17\xeb\x12\x8a\x49\xbe\xc9\xaa\x95\x1b\x49\xbc\x06\x70\ \x0d\x02\x2c\xe4\xc0\x50\x56\x6c\x4c\x0c\x64\x12\x83\xbc\x09\x92\ \xe9\x7b\x00\x3d\x5d\x80\x4e\x63\x00\x5d\x0b\x60\x88\x13\x10\x10\ \xa5\x7e\x36\xd0\x56\x56\xc9\x70\x4e\xaf\x45\x3e\x7c\x62\x88\xdc\ \xc6\x23\xaa\x2c\x3c\xbe\xa4\x2a\x3c\x19\x98\xba\x84\x15\xfb\x01\ \x66\x73\x89\xf9\x94\x5b\x01\xd8\x47\x01\x93\xa9\xc6\xd4\x38\x26\ \xc6\xf7\x71\xdf\x50\x11\x5f\xa0\xef\x14\xa0\xab\x1d\x60\xe4\x0c\ \xcc\xa5\x45\xe6\x4e\x01\x77\x19\xd2\xf7\xb5\xaa\x96\x2d\xd9\x71\ \x35\x26\x5d\x53\xeb\x4d\x92\xf1\x01\xf4\x96\xa4\x23\xfc\x01\x9b\ \x08\x92\x92\x70\x7e\x3a\xb0\x7c\x2f\xb0\xbe\x10\xd8\x54\x04\x24\ \xfc\x00\xf8\x6f\xa5\xec\x2b\xa8\x0e\x13\xed\xc3\x5e\x18\xcc\x5e\ \xf0\x5d\xc6\xe4\xbc\xe3\xab\x19\x5a\xf1\x0a\xe4\x0a\x27\xa1\xea\ \xc8\xc4\x92\xaa\x88\x75\x24\x0a\x63\xd5\x24\x1d\x45\xbf\x6d\x22\ \xd9\x6c\x09\xf4\x74\x1b\x10\x7b\x08\xc8\x2a\x03\xb6\x1e\x54\xd5\ \x84\xc4\xee\x51\x7b\x2c\x88\x7b\x18\xb9\x2e\x4f\xb3\xbd\x84\x92\ \x67\x50\x09\x5e\x6b\x4c\x6b\x46\xd1\x2a\x45\x2c\xed\x19\x23\xbf\ \xc7\xf0\x4b\xfe\x1c\x1f\x8e\x86\x31\xbf\xf8\x88\xd0\x7a\x5e\x72\ \x07\xcf\x98\x0b\xb1\x69\x37\x35\xf3\xe9\xb5\x53\x08\x60\x49\x99\ \xad\x59\xb1\x34\x06\x90\xb1\x62\xe5\x01\x60\x57\x29\xb0\xad\x40\ \x55\x33\xc6\x23\xf4\x41\x5f\xd3\x89\x57\x3b\xf4\x1a\x5a\xac\xd3\ \xae\xfb\x4e\x36\xda\xb1\xb5\xbb\x4a\x34\x89\xf9\xb4\x24\x91\x7d\ \x12\x54\x1f\x63\x55\x9a\xfa\x99\x91\xb5\xe7\xed\x3a\x05\x04\xf2\ \xc4\xd4\xb2\xdf\x0d\x2d\x67\x6d\xea\xd2\xdf\x62\xbc\xb8\x28\xb4\ \x98\x58\xf0\x0c\xff\xd4\x8a\xd8\x2d\x9a\x5a\x2f\x25\xbd\xe5\x41\ \x2b\xfa\x69\xbf\x0a\xf0\x48\x61\x15\x39\x40\xca\x31\x20\xfb\xf4\ \x9d\x5a\x59\xe8\x86\x47\x02\xf1\x97\x9d\xf4\xf3\x79\x76\x39\xe1\ \x45\x8c\x63\x3c\x7f\xdf\xc8\xf4\xdf\x32\x4f\x02\x3e\xa9\x4c\x9a\ \x71\x7c\xe3\x81\xc8\xa4\x13\x4f\xba\x1b\x8d\x39\xcf\x6b\xfc\x04\ \x05\x4a\x0b\x8f\x30\xab\x75\xa7\x1f\xe9\x9b\xbb\x65\xe9\x99\xb9\ \xc8\xb9\xc1\xb6\xf9\x45\xe4\x5c\x57\x6e\x06\xa6\xd1\x6f\x3b\xca\ \x6e\xcb\x77\x97\x24\x40\x9e\x09\xac\x2c\x00\xf6\x94\x03\x69\xfb\ \xcb\x9e\x8e\x70\xf6\xbf\xdf\xa1\xb7\x49\x09\x83\xad\x21\x3c\x09\ \x73\xa2\x33\xf1\x59\xff\x11\xee\x16\x5e\x21\x29\xd7\x77\xfd\x48\ \x1b\xb6\x53\x31\x5a\x18\x9f\x45\x05\xdd\x42\x1f\x68\xb7\xea\xb8\ \x9b\xd7\xb8\x08\x0d\x56\x96\xcb\x80\x2b\xf9\xa3\x97\xe2\x94\xda\ \x78\x9c\xef\x85\xf0\xa4\xeb\x1a\x7f\x7a\xeb\xb6\x94\xcb\x84\x72\ \xdb\x0b\x5d\xfd\x2d\x83\xb0\xc1\xd6\x1e\x07\xf2\xca\xd5\xcf\x16\ \x29\xb7\x70\x96\xed\x2b\x3e\x6f\xdf\x63\x5f\x9d\x97\x12\x89\x1d\ \xd1\xf5\xf9\x55\x6b\xe2\xb0\x68\xda\xb2\x0d\xfb\x7f\xcd\x64\x1f\ \x84\x91\x58\xf9\x1d\x10\x9e\x74\xf8\x71\x57\x03\x2b\xa1\xfa\x30\ \xc2\x58\xb0\xe0\xdc\xae\x5c\x60\x4e\x28\x3b\xdb\x07\x70\x5c\x54\ \x5d\xeb\x42\x52\x07\x62\x1c\xbb\x55\x4a\xc9\x66\x6d\x01\x42\xe9\ \x75\x2a\x2b\xc9\x2d\xbb\x53\x3b\x51\xae\xac\xee\xd4\x6f\x44\x29\ \x03\xc4\x10\x33\x89\x21\x44\xeb\x86\xab\x55\xb8\x17\x64\x1c\xbc\ \x58\x9d\xce\xa4\xe3\x38\x11\x69\x07\xef\xd4\x9a\x3b\xf9\xdf\x6f\ \xa1\xdd\x3a\x93\x3f\xbb\x12\x6d\xeb\x12\xd8\xb9\x9f\xbe\x72\xa6\ \x4d\xbc\x00\x53\x8e\x8b\x55\x58\x7d\xd5\x93\xd6\x03\x9e\x94\x6e\ \x29\x3b\x3c\x93\x92\xe7\x9c\xba\x51\x23\x4a\x7e\x92\x87\x95\x84\ \x83\x58\x75\x0b\xe2\x9d\x86\xf7\x06\xa9\x3c\xe6\x42\xf1\x65\x36\ \x28\x7b\x60\xe7\x51\xf5\x33\x47\x2f\x65\xb5\x78\x36\x98\x30\x24\ \x3e\xa8\x4b\x60\x0f\x09\x66\x2b\xeb\x67\x7a\x24\x95\xb0\x67\x87\ \x4f\xa1\xff\x3e\x94\x2c\x92\x33\x9d\x41\xf2\xb5\x59\x27\x9e\x8c\ \x24\x79\xbb\x6e\x03\x8f\xf0\x60\x24\x31\x96\x68\xdf\xd8\x0d\x45\ \x68\xee\xf4\xbc\xb2\xbb\x85\x2a\x20\xff\x02\x30\x2f\x72\x8b\x5a\ \x54\x4d\x48\xdc\x96\xf8\xa2\x6e\xe2\x84\x04\x72\x8a\xd9\x9d\xdc\ \x6c\x76\x4c\xc2\x81\x92\x4f\xe5\x78\x79\xd3\xb3\x10\xf6\x46\xf2\ \x19\x56\x70\xec\x46\x0d\x1b\xb4\x52\xbb\x95\x6e\x8e\xb8\x3c\xac\ \x88\x36\x8d\x91\x0b\xbb\xc3\xc3\x3f\x59\x55\xfe\x0b\x70\xfa\x2a\ \xf7\xc4\xd2\xad\x8f\x44\xdf\x57\x13\x13\x5e\x48\x5c\x48\x20\xef\ \x14\xc7\x8a\xdd\xed\xbe\x11\x98\xc1\xa5\x31\x97\xcd\x16\x4c\x55\ \xa2\x38\x66\x6b\x0a\xea\xc9\xdb\x77\x1f\x54\xc8\xcb\x17\x0a\xd6\ \x8a\xd9\xbf\xbc\x72\xa7\x20\x1d\x26\xb0\xf3\x50\xe9\x4d\x4d\x79\ \x25\xc9\xa3\xb6\x3e\x14\xc9\x85\x7e\x11\xee\x80\xba\x2f\x9c\x15\ \x12\x28\xa2\x44\x71\x5c\x16\x41\x9c\xed\xc5\x6c\xb6\x65\x5c\xa3\ \xd1\xec\xdc\xb5\xdc\x6c\x99\x97\xb8\x52\xb3\x4e\x3e\xee\x3d\x64\ \xc2\x51\x9d\xb6\xdd\x3c\xc5\xec\x1b\x7d\xa0\x60\xbc\x39\x71\x19\ \x45\xb7\x4a\x2a\x34\xb5\xce\xb2\x15\xf7\xba\x19\x5a\x97\x8b\x23\ \xea\x4c\x74\x24\x9a\x37\x3c\x70\xee\xec\xcf\xc0\xc1\x9f\x48\x56\ \x5a\xdf\x6c\x7b\xe8\x5b\x76\x05\xb0\x8f\xf2\x15\xdc\x00\xce\x56\ \x01\xeb\x76\x17\xa9\xfb\x98\x48\x77\xf0\x48\x1f\xe2\xfd\x46\x1e\ \x4a\xec\x42\x13\xf7\x5e\xcb\x3f\x7d\x53\x33\x76\x7a\xc4\xed\xce\ \xfa\xa3\x84\xfd\xb0\x52\xbc\xeb\xfd\x95\x5c\x9c\xd5\x8c\xec\xa2\ \xcb\x9a\xec\xe2\x4b\x4f\xb3\x8a\x54\x35\xd9\x47\x55\x35\x39\xc4\ \xde\x63\xc4\x71\x55\xcd\xf7\x44\xee\x09\x01\x97\x9e\xba\xfa\xae\ \xae\x6a\xa5\xab\xe7\x23\xfa\xaf\xd5\xe0\xf9\xa0\x87\x47\xc0\xfa\ \x8b\xab\xd3\x0a\xab\x0c\x2d\x67\x9e\xfb\xaa\xe7\xe0\x03\xfc\x3a\ \x82\xb0\x17\x65\x6f\xfe\x52\xc9\x0c\x46\xcf\x70\x19\x60\x35\xbb\ \xa0\xdf\xf0\xc9\xe7\xf5\xcc\x5c\x2f\x35\x8a\x61\xae\xaa\x36\x5d\ \x0c\x72\xc4\xb9\xef\xf2\x12\x1b\x9a\x75\x37\xb2\x35\xef\x3d\xd4\ \x71\xe3\x87\x2d\x3f\x8d\xe2\x67\x39\x31\x92\x68\xd7\xd4\xa3\x97\ \xb0\xb9\x06\x88\x8b\x61\x76\x13\x70\x13\x44\x13\x1f\xa5\xb4\x1a\ \xc4\x11\x3e\x6b\x13\x5f\x0b\xf7\x31\xd1\x2a\xed\x57\x79\xee\x6b\ \x26\x26\xd1\x46\x6c\xb0\xbf\x43\x9b\x26\x9e\x6a\xb5\xea\x96\x8b\ \x44\xd2\x92\x78\xef\x25\x49\xfe\xfb\xaf\xb7\xff\x8c\xde\x26\xd0\ \x14\xfe\x00\xc6\x8f\x6d\x5f\x51\xaa\x96\x24\x00\x00\x00\x00\x49\ \x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x04\x23\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\x70\x65\x2e\x6f\x72\ \x67\x9b\xee\x3c\x1a\x00\x00\x03\xb5\x49\x44\x41\x54\x48\xc7\xb5\ \x96\x4d\x4c\x5c\x55\x14\xc7\x7f\x6f\xbe\x87\x19\xa6\x83\x0c\xb4\ \x60\x1b\x09\x25\x4e\x44\x0c\x56\xa3\x4d\xb4\x8d\x35\x52\x8d\xc6\ \x60\xfd\x58\x10\x83\x2c\x48\x8c\x31\x76\xe1\xae\x6e\x4d\x77\x2e\ \xba\x6b\xba\xa8\xc4\x98\x36\xb3\x6e\x58\xd8\x26\x65\x23\xa6\xb8\ \x80\xa8\x69\x1b\x2d\xa5\x15\xaa\x7c\x07\xda\x0e\xf3\xc1\x9b\xf7\ \xee\xbd\xc7\xc5\x1b\x06\x86\x40\x03\x89\xdc\xc5\x7b\xf7\xde\x97\ \x7b\x7e\xf7\x9c\xff\x39\xf7\x3e\x4b\x44\xd8\xcb\xe6\x63\x8f\x5b\ \x60\xad\xf3\xe2\xa7\xe7\xfb\xf6\xa7\xf6\x7d\x5d\x13\x0e\x44\x98\ \x7d\xf0\x74\xb2\x94\xdd\x99\x05\xf1\x1e\x4b\x89\x03\xca\x57\xdf\ \x38\x5f\x2c\xda\x85\x7f\xa6\x17\x3f\x1b\x1f\x3c\x33\x5e\x05\x38\ \xd0\x90\x38\xf3\xcd\xe7\x6f\xb7\xdf\x99\xce\x92\xbb\x3a\xc5\xcb\ \x77\x7f\xdf\xd5\x4e\x7f\x69\xff\x84\xba\x57\x3b\x9f\xaa\x0d\xfb\ \x19\x1a\xfe\xe3\x7b\xe0\x78\x15\x20\x1a\x0e\x84\xff\x9c\x5e\xe1\ \xee\xcc\x0a\xcb\xbf\xde\xa4\x79\xf4\xda\xae\x00\xbf\x59\x2f\xd0\ \xd8\x90\xc6\x68\x4d\x3c\x12\x4a\xfd\xff\x1a\x08\x18\xad\xd1\xda\ \x20\x5b\x69\xb0\xb9\xc5\x5a\x5a\x78\x77\x6c\x8c\xe2\xec\x2c\x13\ \x17\x2e\x50\xd7\xd9\x49\xc3\xb1\x63\x68\xdb\xe6\xe7\xee\x6e\x5e\ \xcf\x64\xf0\x47\xa3\xe4\x27\x27\xb9\xd1\xd3\x83\x88\xa0\xb5\x41\ \x6b\xbd\x26\xcc\x93\x01\x00\x73\x43\x43\x8c\x9d\x3e\xcd\x6b\x97\ \x2f\x53\x98\x9a\x62\xa4\xb7\x97\x78\x5b\x1b\x87\xfb\xfb\x01\x18\ \xe9\xeb\xa3\xb4\xb4\x54\x76\x40\x30\x46\x7b\x00\xd9\x61\x9a\x36\ \x75\x75\xf1\xc6\xe0\x20\xf7\x2e\x5e\xac\xcc\x15\xa7\xa7\x09\xd7\ \xd7\x03\xd0\x79\xf6\x2c\x87\x4e\x9d\xaa\x84\x48\x29\x8d\x52\x7a\ \xeb\x34\xdd\xce\x83\x1b\x3d\x3d\x1e\xec\xe4\x49\x12\xe9\x34\xf5\ \x47\x8f\xf2\xe8\xd6\x2d\xea\x8e\x1c\x61\xa4\xaf\x0f\x63\xdb\x9e\ \x7d\x91\x0a\x40\x82\x3b\x08\x91\x9b\xcb\x31\x7f\xfd\x7a\x65\xbc\ \x38\x3c\x4c\xe3\x89\x13\xe4\x26\x26\x98\xbc\x74\x89\x50\x32\x89\ \x28\xb5\xae\xb1\x08\x5a\x69\xb4\xd2\x55\x56\xb7\x05\x38\xcb\xcb\ \xdc\x1f\x18\xa8\x8c\xa7\x32\x19\xa6\x32\x99\xca\xf8\xce\xb9\x73\ \xd5\x49\x54\x09\x91\x02\xac\xed\x01\x96\xcf\xc7\xe3\x78\x0a\xc7\ \x1f\xc2\x27\x66\x47\x19\xba\x1a\xaa\xc1\x0e\xd7\x60\x55\x34\x08\ \x3c\x01\x00\xa4\xde\xe9\xe6\x4a\x6b\x1a\xad\x3d\x80\x18\x83\x08\ \x88\xac\xbf\x8d\x08\x62\x04\x63\x04\xf1\xfb\x09\x36\x1d\x44\x29\ \xe5\x01\xc4\xbf\x35\x40\xc4\x5b\x10\x4d\xc4\x89\x3e\xd3\x4a\x2e\ \x57\x44\x8b\x29\x03\xbc\x6f\xc6\x18\x44\x0c\x5a\x7b\x42\x06\x83\ \x01\xc4\x08\x58\x82\x72\x0d\x4a\x29\x84\xd0\x16\x80\x0d\x3b\xba\ \x7d\x73\x9c\xda\x90\xe6\xa3\xe3\x07\xf1\x59\x82\x11\x83\x31\x06\ \xa5\x34\x46\x6b\x94\xd6\x28\x57\x31\xff\x68\x95\xdb\x73\x16\xb5\ \xa9\x7a\x1e\xfc\x3d\x43\x24\x1a\xc6\x75\xd5\xd6\x95\x2c\xe5\x62\ \xd1\xda\xa5\x26\x16\xa5\x39\x29\xbc\x94\xae\xe3\x87\x81\x1f\xb9\ \xfa\xd3\x35\x44\xe0\xcb\xaf\xbe\xe0\xf9\x8e\x76\x1c\xc7\xc1\x29\ \x29\x9a\x12\x7e\xc6\x17\x0c\x87\x0e\x35\x33\xf3\xef\x02\xae\xab\ \x70\x5d\x55\x55\x68\x81\xcd\x99\x60\x8c\x78\xe7\x8a\x31\xd8\x76\ \x89\xb9\xb9\x79\xee\x4d\xdc\x07\xe0\xe1\xf2\x43\x0a\xf9\x3c\x8e\ \xe3\x50\x2a\x95\xb0\xed\x12\x5a\x47\x2b\xe1\xf5\x00\xee\xf6\x85\ \x26\xc6\x60\xb4\xf1\xca\x5e\x1b\x6c\xdb\x2e\xa7\x5d\x39\x5b\xec\ \x55\xf2\xf9\x3c\xb6\x5d\xc2\xb6\x6d\x6c\xdb\xc6\xe8\x70\x79\xad\ \x54\x3c\xd8\x78\x4b\x06\xd6\x17\xbb\x56\x34\xec\x43\x1b\xaf\xd4\ \xb5\xd1\x14\x0b\x05\x0e\xb7\xb5\xf2\x56\xd7\x9b\x18\x63\x88\xc5\ \x62\x64\xb3\x2b\x15\xe3\xab\xab\x36\xda\xa4\xd6\x2b\xd9\x75\x51\ \xae\xaa\xf6\xc0\xb2\x2c\x0b\xb0\x3a\x3e\xf8\xae\x7f\x74\xf4\xaf\ \xc1\xfd\x4d\xa9\x44\x21\x16\x20\x12\x34\x2c\x3c\x76\x79\xb6\xe3\ \x15\x5a\xd2\x9d\xb8\x8e\x8b\xe3\xb8\x64\x6d\x07\xc7\x09\x52\x72\ \x0c\x8e\x82\x64\x3c\x4c\x50\x1c\x52\xc9\x08\xd1\x80\x66\x5f\x2c\ \xa4\x6a\x22\xc1\x49\xcb\xb2\xfc\x80\xb1\x80\x08\xd0\x0c\xc4\x1a\ \x9e\x7b\xaf\xe3\xfd\x0f\x3f\xee\x0d\x05\x03\xc1\x35\xa5\x84\xf5\ \xd3\x57\x36\x8a\xc5\xe6\x39\x6f\xda\x6f\xdc\xb9\x2b\x03\xdf\x9e\ \x5f\x5c\x9c\xc9\x02\xf3\x56\xf9\x44\x8d\x03\x21\xc0\xbf\xa1\xce\ \xad\xdd\x5f\x39\x55\x7d\x07\xc8\x59\x7b\xfd\xdb\xf2\x1f\x88\xe0\ \x23\xf6\xca\xd4\xed\xc7\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\ \x60\x82\ \x00\x00\x04\xca\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x04\x5c\x49\x44\x41\x54\x48\xc7\xc5\ \x56\x0b\x4c\x5b\x05\x14\xad\x4d\x66\x98\x06\xe2\xe6\x67\x31\x96\ \xb1\xd2\x82\x9b\x08\x1d\x4a\x65\x6d\xdc\x84\x39\x4a\xc9\x02\x59\ \x40\xa8\xa9\x33\x5b\xda\xe1\x30\x8e\xb1\x8d\x35\x08\xc6\x91\x82\ \x43\x9c\x13\xdc\x4f\xc5\xec\x47\x45\xa0\x15\x32\xa9\x02\x29\x43\ \x03\xa3\xed\xa0\xa5\x6f\xb4\xae\x2b\xa5\x19\x6c\xb2\xa8\x2c\xc2\ \x8a\x25\xc6\xd8\x8d\xeb\xbd\xe6\x2d\xa2\xae\x90\x98\xa9\x4d\x4e\ \x5e\xfa\xfa\xee\x3d\xef\x9e\x7b\xce\x7b\xe5\x00\x00\xe7\xdf\x04\ \xe7\x7f\x23\xc0\xcf\x52\x84\x38\x2d\x2d\x6d\x8f\x58\x2c\x7e\x87\ \xcb\xe5\xbe\x81\xdf\x77\x20\xf2\x10\x12\xc4\x32\x04\xf7\x1f\x11\ \xe0\x67\x75\x5c\x5c\x5c\xa1\x56\xab\x6d\xed\xec\xec\x1c\x77\x3a\ \x9d\x37\x7d\x3e\xdf\xac\xcd\x66\xbb\x61\x30\x18\xdc\x25\x25\x25\ \xc6\xd8\xd8\x58\x0d\x4b\x74\xef\x7c\x44\x77\x6a\x2e\x55\xa9\x54\ \x1f\x9b\x4c\x26\x8f\xd7\xeb\x85\x81\x81\x01\xa8\xab\xab\x83\x9a\ \x9a\x1a\xd0\xe9\x74\x30\x38\x38\x08\x2e\x97\x0b\x9a\x9a\x9a\x7c\ \x39\x39\x39\x0d\x78\x7d\x3a\x62\x71\x28\x92\xbf\xdd\x39\x35\xb7\ \x58\xad\xdf\x31\x0c\x03\x25\x6f\x96\xff\x9a\xb9\x43\x33\x9d\x5d\ \x79\x38\xa8\xf8\x50\x0f\x59\xda\xf7\x03\xaf\xec\xaf\x99\x6c\xd0\ \x7f\x16\xc4\x69\x40\x6f\x30\x5c\x97\xcb\xe5\x4d\x58\x97\x12\x8a\ \xe4\x4f\x9a\x93\x2c\x74\xe7\xd4\x7c\xcb\xde\xb2\x1b\xcf\x14\xbf\ \x35\x9c\x74\xb0\xc1\xb7\xa9\xde\xf4\xcb\xe6\x56\x33\x28\x5b\x2d\ \xb3\x09\x07\x9b\x46\x5f\x38\xda\x38\x52\xdf\x71\xd6\xef\x70\x38\ \xa0\xa2\xa2\x62\x94\xc7\xe3\x69\xb1\x5e\x48\x72\xcd\x47\x20\x26\ \xcd\x49\x16\xba\x73\x6a\x2e\x3a\xf0\xc9\x80\xec\x78\x87\x53\x63\ \x72\x4c\x54\x9e\xbb\x38\x53\xd8\xe9\x98\x4e\x39\xdd\x3d\xba\xb2\ \xae\xeb\x7c\x7e\xf3\x59\xb7\xd9\x36\x18\x6c\x69\x69\x81\x8c\x8c\ \x8c\x6e\xac\xcf\x44\x84\xff\x75\x8a\xb9\x04\xd9\x46\xa3\xd1\x45\ \x9a\xcb\x0b\x76\xff\x20\xa8\x3c\x69\xcd\x6b\x30\x5d\xd0\xf4\xb8\ \x5d\x6f\x33\xe3\x9e\x2a\xe6\xdb\xcb\x55\x8e\xab\x57\x76\x5a\x46\ \x2f\x89\xda\x3c\x5f\xc5\xeb\x99\xae\xe3\x3d\xb6\xef\x49\x2a\xa5\ \x52\xe9\xc3\xfa\x22\xc4\xc3\x88\x45\xa1\x08\x5e\x45\x69\xa6\x68\ \xa1\x92\x3d\x15\x23\x31\xef\x36\xf7\xad\x7e\x4e\x05\xcf\xe7\x96\ \xc2\x86\x17\xf7\x41\x6a\x6e\x19\xa4\x2b\xcb\x61\x5d\xf6\xeb\xc0\ \x79\x2c\x0b\x12\x4d\x57\x3a\xf6\x76\x31\x2e\xb7\xdb\x0d\x05\x05\ \x05\xd3\x58\x5f\x85\xe0\x21\xc2\x42\x11\x94\xa0\x15\x6f\x91\x5b\ \x44\xe5\xc7\x98\xc7\x0f\xb7\xf5\x2e\x5e\x91\x09\x4b\x13\x55\xb0\ \x22\x75\x37\x08\x36\x14\xc3\xf2\x94\x5d\x10\x9e\x98\x0f\x9c\xd8\ \x97\xe1\xe9\xde\x89\x2f\xb2\xda\xbf\xe9\x1b\x1e\x1e\x26\x82\x5b\ \x58\x7f\x04\xc1\x47\xdc\x17\x8a\xe0\x35\xbb\xdd\x3e\x45\x56\x4c\ \xdb\x57\x33\xb2\xf2\xd8\x97\x3d\x9c\x47\xe5\xc0\x11\x6e\x06\xce\ \x2a\xf5\x1f\x78\x02\x11\xa7\x86\x24\xf3\xa4\xb1\xcc\xe2\x1b\xf2\ \x78\x3c\xa0\x50\x28\x68\x82\x03\x88\x68\xc4\xfd\xa1\x08\xf2\x28\ \x44\xe4\xf3\x82\xea\x43\x13\x34\x01\xff\xc4\xc5\x7e\xbe\xe1\xc7\ \x7e\xc1\x99\x80\x55\xd0\x16\xb0\x44\x9f\x09\x9c\x17\x1a\x03\x66\ \x71\xff\x4f\x6d\x34\x81\xde\x79\xf9\x1a\x39\x09\xd3\x4e\x3b\x28\ \x5d\x68\x02\x09\x25\x94\x42\x44\x3e\xcf\xfb\x40\x7f\x29\xea\xa8\ \xdd\x1e\x79\xea\x9a\x83\xf7\xa9\x7f\x88\xd7\x3c\xc3\x20\x2e\x08\ \x3e\x0f\x58\x93\x2c\x53\x46\x4d\xff\x18\xe3\x1c\xf6\x06\x6b\x6b\ \x6b\x21\x21\x21\xa1\x17\xeb\xb7\x2e\xb4\x83\x65\x14\x7f\x4a\x28\ \x39\xa3\xbe\xa3\xdb\xaf\x6e\xfc\xda\x13\x53\x3f\x74\x2e\x4a\x37\ \x6e\x8b\x6c\x98\x74\x08\x5a\xa7\xac\xf1\xa6\x09\x13\x35\x6f\x67\ \xdc\x3f\x9b\xcd\x66\x90\xc9\x64\xfe\x88\x88\x88\xd3\x58\xbf\x76\ \x21\x17\x71\x69\x0a\x8a\x3f\x25\x94\x46\x27\x9f\x93\x15\xc9\x2d\ \xb4\x50\xd2\x9c\x64\x71\x7a\xbc\x41\x6a\xae\xde\xb6\x6d\x56\x2a\ \x95\xce\x60\x5d\x3b\x82\xc2\x26\x0a\x99\x03\x96\x84\x1e\x5c\xe9\ \x14\x7f\x4a\x28\x85\x88\xa6\x21\x2b\x92\x5b\x68\xa1\x44\x4c\xb2\ \xe0\x35\x7e\x89\x44\x12\x48\x4e\x4e\x86\xcc\x35\xfc\x99\x5d\x9b\ \x56\x5d\xc7\xda\x9d\x94\xe8\xf9\x08\xb8\xec\x33\x25\x85\xe2\x4f\ \x09\xa5\x10\x91\xcf\xc9\x8a\xe4\x16\x5a\x28\x69\x8e\xb2\x9c\x0a\ \x0b\x0b\x1b\x48\x7d\x32\xea\x66\xd9\xc6\x18\xf8\x68\x7b\x12\x94\ \xbf\x94\x30\x4e\x6e\x9c\x4b\x72\xa7\xa7\xe9\x6d\x12\x21\x1b\xff\ \x22\x36\x44\x47\x58\x2b\x96\xb2\x0b\x5d\x77\x0f\x87\x63\x5d\x1b\ \xb9\x24\x50\xf8\xec\x72\xa8\xce\x8d\x03\x5d\xd1\x1a\xd8\xbf\x35\ \x71\x6c\x2e\x49\xa8\xf7\x01\x97\x95\x2b\x9c\x5d\x1c\x8f\xb5\x60\ \x34\x7b\xe4\xb1\xe7\x45\x48\xd2\xb7\x3e\xfa\xa1\x80\x66\x3d\x1f\ \xde\x53\xc6\x43\x63\xb1\x14\xaa\xd5\x4f\xfd\x4e\xb2\xe0\x2b\x93\ \x25\x5a\x44\xd6\x23\x7f\x53\x88\xd8\x63\x18\x7b\x9e\x7e\x17\x22\ \x49\x67\x1a\x7f\xc9\xd5\x52\x99\x00\x0e\x6d\x11\xc1\x76\xb9\xd0\ \x8d\xe7\x15\x77\xed\x9d\xcc\x92\xb4\xc8\x85\x0f\x8e\x6d\x8c\x7f\ \x84\x9a\xe7\x23\x1e\xb8\xab\x2f\x7d\x76\x67\xa4\xbd\xe2\x76\xf3\ \xff\xe4\x5f\xc5\x6f\x26\x4d\xee\x1d\xf0\xc3\x08\x75\x00\x00\x00\ \x00\x49\x45\x4e\x44\xae\x42\x60\x82\ \x00\x00\x03\x00\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ \x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\ \x79\x71\xc9\x65\x3c\x00\x00\x02\x92\x49\x44\x41\x54\x48\xc7\xb5\ \x96\x4d\x4b\x54\x51\x1c\xc6\x7f\xe7\xde\x99\x3b\xbe\x0c\x86\x12\ \x96\xa6\x34\x44\x8a\x94\x42\x90\xd9\x62\x10\xfb\x0e\x6d\x6c\x97\ \x50\xab\x56\x2d\xdc\xf6\x2d\xa2\x45\x50\x14\xb8\xa8\x90\x12\x37\ \x51\x1b\xb5\x30\x2b\x2a\xad\xc1\x34\x4c\x57\xa1\xf9\x92\xa2\xce\ \x78\xe7\xde\x7b\xee\x69\x31\x67\x5e\x1a\xbd\xea\x38\x74\xe0\x70\ \x0f\x33\xdc\xe7\x77\xfe\xcf\xff\x65\x46\x28\xa5\xf8\x9f\x2b\x14\ \xf4\xc5\xdd\x3e\x61\x6d\x6e\x12\x4f\xed\xe0\xd4\xd4\xd1\xe9\xd8\ \x18\x4a\x21\xab\x22\xc4\x22\x95\x46\x53\xb5\x25\xe4\xab\x8f\xf2\ \xde\xf0\x67\xc6\x7c\x20\xa5\xef\x59\x7c\xe1\x40\x80\x30\xe9\x6f\ \xe9\xec\xbe\xb1\xb3\xb5\xb6\xde\xd4\xd6\x73\xca\xf3\x95\x81\x74\ \xbd\xda\x93\xad\xb5\xc7\xea\xcf\x44\x2c\x53\xb2\xb8\xd6\xdb\x3c\ \xf8\x89\xab\x02\x7e\x07\x86\xa0\x94\xda\x73\x3f\xb9\x73\x5e\x05\ \xad\xb4\x7e\x2e\xcd\xbe\x54\xbd\xed\x3c\x07\xaa\x82\xf4\x02\x01\ \x8f\xfa\x63\xa9\x20\x40\x62\x3a\xa1\x1c\x99\x39\x7f\x7f\xfb\x50\ \xdd\xea\xe1\x41\x10\xc0\x08\x8a\xcc\xf7\x3d\x2f\x73\xf2\x50\xa4\ \x80\x24\x60\x03\x2e\xd2\xdd\xc6\xd9\x49\x01\xd0\x16\xbf\x4e\xbc\ \xfb\x5c\x1f\x10\x87\xdd\x7a\xa1\x83\xeb\x20\x8d\xc0\x03\x14\xe0\ \x01\x16\xd1\x68\x05\x43\x43\x4f\x59\x59\xd9\xe6\xc2\xe5\x2b\xac\ \x27\x7d\x80\x76\x60\x8e\xa2\x7c\x18\x07\x03\x5c\x14\x2e\xe4\xb6\ \x4d\xf3\xe9\x13\xb4\x9c\x6d\xa0\xb5\xb5\x8e\x8e\x8e\x18\x21\xec\ \xec\x65\xcd\x12\x22\x50\x05\x11\x48\x40\xa1\x10\x08\x14\x61\x33\ \xc4\xa5\xae\x8b\x80\x05\x44\x39\x16\xb5\xd0\x74\x79\x24\x8b\x14\ \x3e\xe2\x1f\xa8\x0b\x08\x20\x0d\xd4\x90\xcd\x56\x49\x8d\x96\x5f\ \x36\x02\x85\xd2\x92\x99\x28\xd0\xd0\xac\xc3\xf2\x28\x80\xbc\x45\ \x00\x42\x23\x44\xb6\x11\xcb\x1d\x15\xf9\xfc\xdb\x45\xd2\x59\xbc\ \x2a\xf8\x44\x94\x63\x51\x5a\x5b\x91\x95\xcc\x98\x94\x91\xf4\xcb\ \x01\x88\x82\x24\x0b\x04\x46\xce\x26\x95\xcb\x84\x2c\xc7\x22\x00\ \x47\x77\xaf\x99\xcb\x42\x7e\x49\x9d\x27\xb7\x20\x5f\x25\x27\xd9\ \xd5\x10\xb3\x28\x2a\x89\xc2\xd0\x1d\xee\x80\x71\x24\x8b\x8c\x1c\ \x40\x10\xce\x95\xa5\x42\xea\x58\x0c\x20\x0c\x54\x53\x11\xae\xc8\ \xbe\x60\x94\x18\x81\xa3\xab\x48\x22\xf0\x01\x1f\x41\x15\x10\x03\ \x8e\xeb\x01\x38\xc7\xea\xea\x46\xe9\x00\x21\x30\xd0\x16\x08\x4c\ \x2d\xd8\x06\x78\x6c\x2d\x8c\x31\xfb\x61\x82\xd1\x91\xf7\xfe\xb3\ \xc1\xaf\xf3\x3f\x37\x99\xd1\x83\x2e\x79\x68\x40\xc4\xaa\x8c\x40\ \xa3\x1e\x92\x0d\xa4\x96\x12\x8c\xbf\xb8\xcd\x9b\xd1\x71\x7f\xe8\ \xf5\xf2\xb7\xa9\x35\x26\x81\x19\xe0\x0b\xf0\x03\x58\xd4\x15\x71\ \x38\x40\x63\x9d\x50\xb0\xc4\xc8\xc0\x63\x86\x07\xee\x3b\xe3\x93\ \x72\x61\x62\x91\x77\x5a\x30\x01\x4c\x03\xcb\x05\xcd\xb0\xb7\x13\ \x41\xff\x2a\xba\x9a\xc5\xb5\xe4\x06\x37\xe7\xb7\xf9\x63\xc3\x28\ \x30\x05\xcc\x03\xbf\xf6\xab\xcb\x5d\x7a\x41\x3f\x99\x3d\x2d\x00\ \x44\x81\xfa\xbd\xe6\xfc\x7e\x80\xc2\xfd\x17\xfb\xc6\x93\x82\x32\ \x2c\x7f\xcc\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ " qt_resource_name = "\ \x00\x04\ \x00\x06\xfa\x5e\ \x00\x69\ \x00\x63\x00\x6f\x00\x6e\ \x00\x04\ \x00\x07\x35\xdf\ \x00\x6c\ \x00\x6f\x00\x67\x00\x6f\ \x00\x06\ \x07\x03\x7d\xc3\ \x00\x69\ \x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\ \x00\x08\ \x05\xe2\x5f\x07\ \x00\x6c\ \x00\x6f\x00\x67\x00\x6f\x00\x2e\x00\x6a\x00\x70\x00\x67\ \x00\x03\ \x00\x00\x7d\xfe\ \x00\x77\ \x00\x69\x00\x6e\ \x00\x03\ \x00\x00\x73\x73\ \x00\x6d\ \x00\x61\x00\x63\ \x00\x0c\ \x06\xc8\x40\x47\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x72\x00\x65\x00\x64\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0b\ \x0a\x10\x36\x07\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x63\x00\x75\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0c\ \x05\x68\x0e\x67\ \x00\x66\ \x00\x69\x00\x6c\x00\x65\x00\x73\x00\x61\x00\x76\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0c\ \x0b\x21\x0f\x87\ \x00\x66\ \x00\x69\x00\x6c\x00\x65\x00\x6f\x00\x70\x00\x65\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0a\ \x04\x11\x7b\x87\ \x00\x7a\ \x00\x6f\x00\x6f\x00\x6d\x00\x69\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0d\ \x06\x52\xd9\xe7\ \x00\x66\ \x00\x69\x00\x6c\x00\x65\x00\x70\x00\x72\x00\x69\x00\x6e\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x08\ \x0e\xb6\x5a\xc7\ \x00\x65\ \x00\x78\x00\x65\x00\x63\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0d\ \x0d\xc9\x3b\xe7\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x70\x00\x61\x00\x73\x00\x74\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0c\ \x0b\x0e\x42\x07\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x63\x00\x6f\x00\x70\x00\x79\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0c\ \x09\xc8\x40\xc7\ \x00\x65\ \x00\x64\x00\x69\x00\x74\x00\x75\x00\x6e\x00\x64\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0d\ \x0f\x47\x85\x87\ \x00\x65\ \x00\x78\x00\x70\x00\x6f\x00\x72\x00\x74\x00\x70\x00\x64\x00\x66\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0b\ \x07\xc5\x9b\xc7\ \x00\x7a\ \x00\x6f\x00\x6f\x00\x6d\x00\x6f\x00\x75\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\ \x00\x0b\ \x04\x14\x52\xc7\ \x00\x66\ \x00\x69\x00\x6c\x00\x65\x00\x6e\x00\x65\x00\x77\x00\x2e\x00\x70\x00\x6e\x00\x67\ " qt_resource_struct = "\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\ \x00\x00\x00\x0e\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ \x00\x00\x00\x1c\x00\x02\x00\x00\x00\x01\x00\x00\x00\x04\ \x00\x00\x00\x2e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ \x00\x00\x00\x1c\x00\x02\x00\x00\x00\x02\x00\x00\x00\x06\ \x00\x00\x00\x50\x00\x02\x00\x00\x00\x0d\x00\x00\x00\x15\ \x00\x00\x00\x44\x00\x02\x00\x00\x00\x0d\x00\x00\x00\x08\ \x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x96\x82\ \x00\x00\x01\xba\x00\x00\x00\x00\x00\x01\x00\x00\xe7\x69\ \x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x8b\x47\ \x00\x00\x00\xec\x00\x00\x00\x00\x00\x01\x00\x00\x9b\x3e\ \x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x7c\xdc\ \x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\xe2\x9b\ \x00\x00\x01\x60\x00\x00\x00\x00\x00\x01\x00\x00\xd7\x88\ \x00\x00\x00\x7a\x00\x00\x00\x00\x00\x01\x00\x00\x83\xdb\ \x00\x00\x01\x42\x00\x00\x00\x00\x00\x01\x00\x00\xd2\x57\ \x00\x00\x00\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x90\x00\ \x00\x00\x01\x22\x00\x00\x00\x00\x00\x01\x00\x00\xcc\x89\ \x00\x00\x01\x0c\x00\x00\x00\x00\x00\x01\x00\x00\xa0\xf2\ \x00\x00\x01\x7e\x00\x00\x00\x00\x00\x01\x00\x00\xde\x74\ \x00\x00\x00\xd2\x00\x00\x00\x00\x00\x01\x00\x00\x1e\x8d\ \x00\x00\x01\xba\x00\x00\x00\x00\x00\x01\x00\x00\x78\x44\ \x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x11\x57\ \x00\x00\x00\xec\x00\x00\x00\x00\x00\x01\x00\x00\x25\x31\ \x00\x00\x00\x5c\x00\x00\x00\x00\x00\x01\x00\x00\x04\x8f\ \x00\x00\x01\x9e\x00\x00\x00\x00\x00\x01\x00\x00\x71\xc2\ \x00\x00\x01\x60\x00\x00\x00\x00\x00\x01\x00\x00\x66\x29\ \x00\x00\x00\x7a\x00\x00\x00\x00\x00\x01\x00\x00\x0b\x6b\ \x00\x00\x01\x42\x00\x00\x00\x00\x00\x01\x00\x00\x60\x69\ \x00\x00\x00\xb4\x00\x00\x00\x00\x00\x01\x00\x00\x16\x11\ \x00\x00\x01\x22\x00\x00\x00\x00\x00\x01\x00\x00\x58\xf3\ \x00\x00\x01\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x2d\x5c\ \x00\x00\x01\x7e\x00\x00\x00\x00\x00\x01\x00\x00\x6c\xff\ " def qInitResources(): QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) def qCleanupResources(): QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) qInitResources()
ajibawa-2023/Python-Code-Large/train/row_294
9
3,947
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_294:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0025, 0.0003, 0, 0.66, 0.0, 154, 0, 1, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Assign_L12_C0", "label": "qt_resource_data =", "type": "assigned_variable", "loc": [12, 3823], "level": 0, "parent": null, "vector": [14, 0, 0.4858, 0.9658, 0, 0.66, 0.1667, 131, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "qt_resource_data", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "qt_resource_data = \"\\\n\\x00\\x00\\x04\\x8b\\\n\\xff\\\n\\xd8\\xff\\xe0\\x00\\x10\\x4a\\x46\\x49\\x46\\x00\\x01\\x01\\x00\\x00\\x01\\x00\\\n\\x01\\x00\\x00\\xff\\xdb\\x00\\x84\\x00\\x09\\x06\\x06\\x13\\x06\\x05\\x09\\x14\\\n\\x10\\x08\\x0a\\x09\\x09\\x0a\\x0d\\x16\\x0e\\x0d\\x0c\\x18\\x17\\x1a\\x13\\x14\\\n\\x19\\x16\\x1f\\x1c\\x21\\x20\\x1f\\x1c\\x1e\\x1e\\x22\\x27\\x32\\x26\\x23\\x25\\\n\\x2f\\x20\\x1e\\x1f\\x2b\\x3b\\x24\\x2f\\x2c\\x35\\x2d\\x38\\x38\\x21\\x23\\x31\\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Assign_L3825_C0", "label": "qt_resource_name =", "type": "assigned_variable", "loc": [3825, 3902], "level": 0, "parent": null, "vector": [14, 0, 0.9788, 0.0198, 0, 0.66, 0.3333, 392, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "qt_resource_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "qt_resource_name = \"\\\n\\x00\\x04\\\n\\x00\\x06\\xfa\\x5e\\\n\\x00\\x69\\\n\\x00\\x63\\x00\\x6f\\x00\\x6e\\\n\\x00\\x04\\\n\\x00\\x07\\x35\\xdf\\\n\\x00\\x6c\\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Assign_L3904_C0", "label": "qt_resource_struct =", "type": "assigned_variable", "loc": [3904, 3939], "level": 0, "parent": null, "vector": [14, 0, 0.9935, 0.0091, 0, 0.66, 0.5, 406, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "qt_resource_struct", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "qt_resource_struct = \"\\\n\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\\n\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x05\\\n\\x00\\x00\\x00\\x0e\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\\n\\x00\\x00\\x00\\x1c\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x04\\\n\\x00\\x00\\x00\\x2e\\x00\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00\\\n\\x00\\x00\\x00\\x1c\\x00\\x02\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x06\\\n\\x00\\x00\\x00\\x50\\x00\\x02\\x00\\x00\\x00\\x0d\\x00\\x00\\x00\\x15\\"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3941_C0", "label": "qInitResources", "type": "function", "loc": [3941, 3942], "level": 0, "parent": null, "vector": [2, 0, 0.9986, 0.0005, 0, 0.66, 0.6667, 797, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "qInitResources", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def qInitResources():\n QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Expr_L3942_C4", "label": "qRegisterResourceData()", "type": "expression", "loc": [3942, 3942], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3941_C0", "vector": [8, 1, 0.9987, 0.0003, 1, 0.01, 0.0, 248, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "qRegisterResourceData", "arg_names": [], "import_names": [], "rhs_call_name": "qRegisterResourceData", "annotation": ""}, "snippet": " QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3944_C0", "label": "qCleanupResources", "type": "function", "loc": [3944, 3945], "level": 0, "parent": null, "vector": [2, 0, 0.9994, 0.0005, 0, 0.66, 0.8333, 619, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "qCleanupResources", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def qCleanupResources():\n QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Expr_L3945_C4", "label": "qUnregisterResourceData()", "type": "expression", "loc": [3945, 3945], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3944_C0", "vector": [8, 1, 0.9995, 0.0003, 1, 0.52, 0.0, 987, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "qUnregisterResourceData", "arg_names": [], "import_names": [], "rhs_call_name": "qUnregisterResourceData", "annotation": ""}, "snippet": " QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_294:Expr_L3947_C0", "label": "qInitResources()", "type": "expression", "loc": [3947, 3947], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0003, 0, 0.66, 1.0, 797, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "qInitResources", "arg_names": [], "import_names": [], "rhs_call_name": "qInitResources", "annotation": ""}, "snippet": "qInitResources()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3941_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_294:Expr_L3942_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_294:FunctionDef_L3944_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_294:Expr_L3945_C4"}]
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'yaraeditor.ui' # # Created: Tue Feb 26 07:52:45 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_YaraEditor(object): def setupUi(self, YaraEditor): YaraEditor.setObjectName(_fromUtf8("YaraEditor")) YaraEditor.resize(1117, 609) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/logo/images/logo.jpg")), QtGui.QIcon.Normal, QtGui.QIcon.Off) YaraEditor.setWindowIcon(icon) YaraEditor.setUnifiedTitleAndToolBarOnMac(True) self.centralwidget = QtGui.QWidget(YaraEditor) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.MainWidget = QtGui.QWidget(self.centralwidget) self.MainWidget.setObjectName(_fromUtf8("MainWidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.MainWidget) self.horizontalLayout.setMargin(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.widgetEditor = QtGui.QWidget(self.MainWidget) self.widgetEditor.setObjectName(_fromUtf8("widgetEditor")) self.horizontalLayout.addWidget(self.widgetEditor) self.verticalLayout.addWidget(self.MainWidget) YaraEditor.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(YaraEditor) self.menubar.setGeometry(QtCore.QRect(0, 0, 1117, 25)) self.menubar.setObjectName(_fromUtf8("menubar")) YaraEditor.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(YaraEditor) self.statusbar.setObjectName(_fromUtf8("statusbar")) YaraEditor.setStatusBar(self.statusbar) self.dockWidgetYara = QtGui.QDockWidget(YaraEditor) self.dockWidgetYara.setMinimumSize(QtCore.QSize(300, 208)) self.dockWidgetYara.setObjectName(_fromUtf8("dockWidgetYara")) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.verticalLayout_5 = QtGui.QVBoxLayout(self.dockWidgetContents) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.widgetYara = QtGui.QWidget(self.dockWidgetContents) self.widgetYara.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.widgetYara.setObjectName(_fromUtf8("widgetYara")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.widgetYara) self.verticalLayout_2.setMargin(0) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.label_3 = QtGui.QLabel(self.widgetYara) self.label_3.setObjectName(_fromUtf8("label_3")) self.verticalLayout_2.addWidget(self.label_3) self.pathYara = QtGui.QLineEdit(self.widgetYara) self.pathYara.setMaximumSize(QtCore.QSize(300, 16777215)) self.pathYara.setReadOnly(False) self.pathYara.setObjectName(_fromUtf8("pathYara")) self.verticalLayout_2.addWidget(self.pathYara) self.yaraTree = QtGui.QTreeView(self.widgetYara) self.yaraTree.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.yaraTree.setObjectName(_fromUtf8("yaraTree")) self.verticalLayout_2.addWidget(self.yaraTree) self.verticalLayout_5.addWidget(self.widgetYara) self.dockWidgetYara.setWidget(self.dockWidgetContents) YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidgetYara) self.dockWidgetMalware = QtGui.QDockWidget(YaraEditor) self.dockWidgetMalware.setMinimumSize(QtCore.QSize(310, 231)) self.dockWidgetMalware.setObjectName(_fromUtf8("dockWidgetMalware")) self.dockWidgetContents_2 = QtGui.QWidget() self.dockWidgetContents_2.setObjectName(_fromUtf8("dockWidgetContents_2")) self.verticalLayout_4 = QtGui.QVBoxLayout(self.dockWidgetContents_2) self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.widgetMalware = QtGui.QWidget(self.dockWidgetContents_2) self.widgetMalware.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.widgetMalware.setObjectName(_fromUtf8("widgetMalware")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.widgetMalware) self.verticalLayout_3.setMargin(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.pathMalware = QtGui.QLineEdit(self.widgetMalware) self.pathMalware.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.pathMalware.setReadOnly(False) self.pathMalware.setObjectName(_fromUtf8("pathMalware")) self.verticalLayout_3.addWidget(self.pathMalware) self.malwareTree = QtGui.QTreeView(self.widgetMalware) self.malwareTree.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.malwareTree.setObjectName(_fromUtf8("malwareTree")) self.verticalLayout_3.addWidget(self.malwareTree) self.verticalLayout_4.addWidget(self.widgetMalware) self.dockWidgetMalware.setWidget(self.dockWidgetContents_2) YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidgetMalware) self.dockWidgetInspector = QtGui.QDockWidget(YaraEditor) self.dockWidgetInspector.setObjectName(_fromUtf8("dockWidgetInspector")) self.dockWidgetContents_4 = QtGui.QWidget() self.dockWidgetContents_4.setObjectName(_fromUtf8("dockWidgetContents_4")) self.verticalLayout_6 = QtGui.QVBoxLayout(self.dockWidgetContents_4) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6")) self.tabWidget = QtGui.QTabWidget(self.dockWidgetContents_4) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab_properties = QtGui.QWidget() self.tab_properties.setObjectName(_fromUtf8("tab_properties")) self.verticalLayout_8 = QtGui.QVBoxLayout(self.tab_properties) self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8")) self.treeMalwareProperties = QtGui.QTreeWidget(self.tab_properties) self.treeMalwareProperties.setObjectName(_fromUtf8("treeMalwareProperties")) self.verticalLayout_8.addWidget(self.treeMalwareProperties) self.tabWidget.addTab(self.tab_properties, _fromUtf8("")) self.tab_strings = QtGui.QWidget() self.tab_strings.setObjectName(_fromUtf8("tab_strings")) self.verticalLayout_7 = QtGui.QVBoxLayout(self.tab_strings) self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7")) self.tabWidget.addTab(self.tab_strings, _fromUtf8("")) self.verticalLayout_6.addWidget(self.tabWidget) self.dockWidgetInspector.setWidget(self.dockWidgetContents_4) YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidgetInspector) self.dockWidget = QtGui.QDockWidget(YaraEditor) self.dockWidget.setObjectName(_fromUtf8("dockWidget")) self.dockWidgetContents_3 = QtGui.QWidget() self.dockWidgetContents_3.setObjectName(_fromUtf8("dockWidgetContents_3")) self.verticalLayout_9 = QtGui.QVBoxLayout(self.dockWidgetContents_3) self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9")) self.outputEdit = QtGui.QTextEdit(self.dockWidgetContents_3) self.outputEdit.setMinimumSize(QtCore.QSize(0, 100)) self.outputEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.outputEdit.setReadOnly(True) self.outputEdit.setObjectName(_fromUtf8("outputEdit")) self.verticalLayout_9.addWidget(self.outputEdit) self.dockWidget.setWidget(self.dockWidgetContents_3) YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(8), self.dockWidget) self.actionNouveau = QtGui.QAction(YaraEditor) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icon/images/win/filenew.png")), QtGui.QIcon.Normal, QtGui.QIcon.On) self.actionNouveau.setIcon(icon1) self.actionNouveau.setObjectName(_fromUtf8("actionNouveau")) self.actionExit = QtGui.QAction(YaraEditor) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionEnregistrer = QtGui.QAction(YaraEditor) self.actionEnregistrer.setObjectName(_fromUtf8("actionEnregistrer")) self.retranslateUi(YaraEditor) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(YaraEditor) def retranslateUi(self, YaraEditor): YaraEditor.setWindowTitle(QtGui.QApplication.translate("YaraEditor", "Yara-Editor", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("YaraEditor", "Yara Browser", None, QtGui.QApplication.UnicodeUTF8)) self.dockWidgetMalware.setWindowTitle(QtGui.QApplication.translate("YaraEditor", "Malware Browser", None, QtGui.QApplication.UnicodeUTF8)) self.dockWidgetInspector.setWindowTitle(QtGui.QApplication.translate("YaraEditor", "Inspector", None, QtGui.QApplication.UnicodeUTF8)) self.treeMalwareProperties.headerItem().setText(0, QtGui.QApplication.translate("YaraEditor", "Name", None, QtGui.QApplication.UnicodeUTF8)) self.treeMalwareProperties.headerItem().setText(1, QtGui.QApplication.translate("YaraEditor", "Value", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_properties), QtGui.QApplication.translate("YaraEditor", "Tab Properties", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_strings), QtGui.QApplication.translate("YaraEditor", "Strings", None, QtGui.QApplication.UnicodeUTF8)) self.actionNouveau.setText(QtGui.QApplication.translate("YaraEditor", "New", None, QtGui.QApplication.UnicodeUTF8)) self.actionNouveau.setShortcut(QtGui.QApplication.translate("YaraEditor", "Ctrl+N", None, QtGui.QApplication.UnicodeUTF8)) self.actionExit.setText(QtGui.QApplication.translate("YaraEditor", "Exit", None, QtGui.QApplication.UnicodeUTF8)) self.actionExit.setShortcut(QtGui.QApplication.translate("YaraEditor", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8)) self.actionEnregistrer.setText(QtGui.QApplication.translate("YaraEditor", "Save", None, QtGui.QApplication.UnicodeUTF8)) self.actionEnregistrer.setShortcut(QtGui.QApplication.translate("YaraEditor", "Ctrl+S", None, QtGui.QApplication.UnicodeUTF8)) import yaraeditor_rc
ajibawa-2023/Python-Code-Large/train/row_295
152
167
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_295:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0599, 0.006, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore", "QtGui"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore, QtGui"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Try_L12_C0", "label": "try", "type": "try", "loc": [12, 15], "level": 0, "parent": null, "vector": [7, 0, 0.0808, 0.024, 0, 0.66, 0.3333, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L13_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:Try_L12_C0", "vector": [14, 1, 0.0778, 0.006, 1, 0.29, 0.0, 412, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = QtCore.QString.fromUtf8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L15_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:Try_L12_C0", "vector": [14, 1, 0.0898, 0.006, 1, 0.29, 0.0, 412, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:ClassDef_L17_C0", "label": "Ui_YaraEditor", "type": "class", "loc": [17, 165], "level": 0, "parent": null, "vector": [3, 0, 0.5449, 0.8922, 0, 0.66, 0.6667, 884, 0, 2, 0, 0, 186, 0, 99], "semantic": {"name": "Ui_YaraEditor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Ui_YaraEditor(object):\n def setupUi(self, YaraEditor):\n YaraEditor.setObjectName(_fromUtf8(\"YaraEditor\"))\n YaraEditor.resize(1117, 609)\n icon = QtGui.QIcon()\n icon.addPixmap(QtGui.QPixmap(_fromUtf8(\":/logo/images/logo.jpg\")), QtGui.QIcon.Normal, QtGui.QIcon.Off)\n YaraEditor.setWindowIcon(icon)\n YaraEditor.setUnifiedTitleAndToolBarOnMac(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "label": "setupUi", "type": "function", "loc": [18, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:ClassDef_L17_C0", "vector": [2, 1, 0.5, 0.7904, 1, 0.94, 0.0, 419, 0, 2, 0, 0, 0, 0, 99], "semantic": {"name": "setupUi", "arg_names": ["self", "YaraEditor"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setupUi(self, YaraEditor):\n YaraEditor.setObjectName(_fromUtf8(\"YaraEditor\"))\n YaraEditor.resize(1117, 609)\n icon = QtGui.QIcon()\n icon.addPixmap(QtGui.QPixmap(_fromUtf8(\":/logo/images/logo.jpg\")), QtGui.QIcon.Normal, QtGui.QIcon.Off)\n YaraEditor.setWindowIcon(icon)\n YaraEditor.setUnifiedTitleAndToolBarOnMac(True)\n self.centralwidget = QtGui.QWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L19_C8", "label": "setObjectName()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1138, 0.006, 2, 0.64, 0.0, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " YaraEditor.setObjectName(_fromUtf8(\"YaraEditor\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L20_C8", "label": "resize()", "type": "expression", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1198, 0.006, 2, 0.64, 0.0078, 834, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "resize", "arg_names": [], "import_names": [], "rhs_call_name": "resize", "annotation": ""}, "snippet": " YaraEditor.resize(1117, 609)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L21_C8", "label": "icon = QIcon()", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.1257, 0.006, 2, 0.64, 0.0155, 736, 3, 0, 0, 0, 833, 10, 1], "semantic": {"name": "icon", "arg_names": [], "import_names": [], "rhs_call_name": "QIcon", "annotation": ""}, "snippet": " icon = QtGui.QIcon()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L22_C8", "label": "addPixmap()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1317, 0.006, 2, 0.64, 0.0233, 106, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "addPixmap", "arg_names": [], "import_names": [], "rhs_call_name": "addPixmap", "annotation": ""}, "snippet": " icon.addPixmap(QtGui.QPixmap(_fromUtf8(\":/logo/images/logo.jpg\")), QtGui.QIcon.Normal, QtGui.QIcon.Off)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L23_C8", "label": "setWindowIcon()", "type": "expression", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1377, 0.006, 2, 0.64, 0.031, 270, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWindowIcon", "arg_names": [], "import_names": [], "rhs_call_name": "setWindowIcon", "annotation": ""}, "snippet": " YaraEditor.setWindowIcon(icon)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L24_C8", "label": "setUnifiedTitleAndToolBarOnMac()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1437, 0.006, 2, 0.64, 0.0388, 289, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setUnifiedTitleAndToolBarOnMac", "arg_names": [], "import_names": [], "rhs_call_name": "setUnifiedTitleAndToolBarOnMac", "annotation": ""}, "snippet": " YaraEditor.setUnifiedTitleAndToolBarOnMac(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L25_C8", "label": "self.centralwidget = QWidget()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.1497, 0.006, 2, 0.64, 0.0465, 863, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.centralwidget", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.centralwidget = QtGui.QWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L26_C8", "label": "setObjectName()", "type": "expression", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1557, 0.006, 2, 0.64, 0.0543, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.centralwidget.setObjectName(_fromUtf8(\"centralwidget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L27_C8", "label": "self.verticalLayout = QVBoxLayout()", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.1617, 0.006, 2, 0.64, 0.062, 781, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L28_C8", "label": "setObjectName()", "type": "expression", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1677, 0.006, 2, 0.64, 0.0698, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout.setObjectName(_fromUtf8(\"verticalLayout\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L29_C8", "label": "self.MainWidget = QWidget()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.1737, 0.006, 2, 0.64, 0.0775, 781, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.MainWidget", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.MainWidget = QtGui.QWidget(self.centralwidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L30_C8", "label": "setObjectName()", "type": "expression", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1796, 0.006, 2, 0.64, 0.0853, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.MainWidget.setObjectName(_fromUtf8(\"MainWidget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L31_C8", "label": "self.horizontalLayout = QHBoxLayout()", "type": "assigned_variable", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.1856, 0.006, 2, 0.64, 0.093, 138, 3, 1, 0, 0, 792, 10, 1], "semantic": {"name": "self.horizontalLayout", "arg_names": [], "import_names": [], "rhs_call_name": "QHBoxLayout", "annotation": ""}, "snippet": " self.horizontalLayout = QtGui.QHBoxLayout(self.MainWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L32_C8", "label": "setMargin()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1916, 0.006, 2, 0.64, 0.1008, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.horizontalLayout.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L33_C8", "label": "setObjectName()", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.1976, 0.006, 2, 0.64, 0.1085, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.horizontalLayout.setObjectName(_fromUtf8(\"horizontalLayout\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L34_C8", "label": "self.widgetEditor = QWidget()", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.2036, 0.006, 2, 0.64, 0.1163, 109, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widgetEditor", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widgetEditor = QtGui.QWidget(self.MainWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L35_C8", "label": "setObjectName()", "type": "expression", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2096, 0.006, 2, 0.64, 0.124, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widgetEditor.setObjectName(_fromUtf8(\"widgetEditor\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L36_C8", "label": "addWidget()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2156, 0.006, 2, 0.64, 0.1318, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout.addWidget(self.widgetEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L37_C8", "label": "addWidget()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2216, 0.006, 2, 0.64, 0.1395, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.MainWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L38_C8", "label": "setCentralWidget()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2275, 0.006, 2, 0.64, 0.1473, 601, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCentralWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setCentralWidget", "annotation": ""}, "snippet": " YaraEditor.setCentralWidget(self.centralwidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L39_C8", "label": "self.menubar = QMenuBar()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.2335, 0.006, 2, 0.64, 0.155, 552, 3, 1, 0, 0, 241, 10, 1], "semantic": {"name": "self.menubar", "arg_names": [], "import_names": [], "rhs_call_name": "QMenuBar", "annotation": ""}, "snippet": " self.menubar = QtGui.QMenuBar(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L40_C8", "label": "setGeometry()", "type": "expression", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2395, 0.006, 2, 0.64, 0.1628, 648, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setGeometry", "arg_names": [], "import_names": [], "rhs_call_name": "setGeometry", "annotation": ""}, "snippet": " self.menubar.setGeometry(QtCore.QRect(0, 0, 1117, 25))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L41_C8", "label": "setObjectName()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2455, 0.006, 2, 0.64, 0.1705, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.menubar.setObjectName(_fromUtf8(\"menubar\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L42_C8", "label": "setMenuBar()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2515, 0.006, 2, 0.64, 0.1783, 254, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMenuBar", "arg_names": [], "import_names": [], "rhs_call_name": "setMenuBar", "annotation": ""}, "snippet": " YaraEditor.setMenuBar(self.menubar)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L43_C8", "label": "self.statusbar = QStatusBar()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.2575, 0.006, 2, 0.64, 0.186, 108, 3, 1, 0, 0, 271, 10, 1], "semantic": {"name": "self.statusbar", "arg_names": [], "import_names": [], "rhs_call_name": "QStatusBar", "annotation": ""}, "snippet": " self.statusbar = QtGui.QStatusBar(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L44_C8", "label": "setObjectName()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2635, 0.006, 2, 0.64, 0.1938, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.statusbar.setObjectName(_fromUtf8(\"statusbar\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L45_C8", "label": "setStatusBar()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2695, 0.006, 2, 0.64, 0.2016, 555, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setStatusBar", "arg_names": [], "import_names": [], "rhs_call_name": "setStatusBar", "annotation": ""}, "snippet": " YaraEditor.setStatusBar(self.statusbar)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L46_C8", "label": "self.dockWidgetYara = QDockWidget()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.2754, 0.006, 2, 0.64, 0.2093, 797, 3, 1, 0, 0, 771, 10, 1], "semantic": {"name": "self.dockWidgetYara", "arg_names": [], "import_names": [], "rhs_call_name": "QDockWidget", "annotation": ""}, "snippet": " self.dockWidgetYara = QtGui.QDockWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L47_C8", "label": "setMinimumSize()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2814, 0.006, 2, 0.64, 0.2171, 28, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMinimumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMinimumSize", "annotation": ""}, "snippet": " self.dockWidgetYara.setMinimumSize(QtCore.QSize(300, 208))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L48_C8", "label": "setObjectName()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2874, 0.006, 2, 0.64, 0.2248, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetYara.setObjectName(_fromUtf8(\"dockWidgetYara\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L49_C8", "label": "self.dockWidgetContents = QWidget()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.2934, 0.006, 2, 0.64, 0.2326, 459, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.dockWidgetContents", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.dockWidgetContents = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L50_C8", "label": "setObjectName()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.2994, 0.006, 2, 0.64, 0.2403, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetContents.setObjectName(_fromUtf8(\"dockWidgetContents\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L51_C8", "label": "self.verticalLayout_5 = QVBoxLayout()", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.3054, 0.006, 2, 0.64, 0.2481, 340, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_5", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_5 = QtGui.QVBoxLayout(self.dockWidgetContents)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L52_C8", "label": "setObjectName()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3114, 0.006, 2, 0.64, 0.2558, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_5.setObjectName(_fromUtf8(\"verticalLayout_5\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L53_C8", "label": "self.widgetYara = QWidget()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.3174, 0.006, 2, 0.64, 0.2636, 518, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widgetYara", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widgetYara = QtGui.QWidget(self.dockWidgetContents)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L54_C8", "label": "setMaximumSize()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3234, 0.006, 2, 0.64, 0.2713, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.widgetYara.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L55_C8", "label": "setObjectName()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3293, 0.006, 2, 0.64, 0.2791, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widgetYara.setObjectName(_fromUtf8(\"widgetYara\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L56_C8", "label": "self.verticalLayout_2 = QVBoxLayout()", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.3353, 0.006, 2, 0.64, 0.2868, 744, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_2", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_2 = QtGui.QVBoxLayout(self.widgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L57_C8", "label": "setMargin()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3413, 0.006, 2, 0.64, 0.2946, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.verticalLayout_2.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L58_C8", "label": "setObjectName()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3473, 0.006, 2, 0.64, 0.3023, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_2.setObjectName(_fromUtf8(\"verticalLayout_2\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L59_C8", "label": "self.label_3 = QLabel()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.3533, 0.006, 2, 0.64, 0.3101, 304, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label_3", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label_3 = QtGui.QLabel(self.widgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L60_C8", "label": "setObjectName()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3593, 0.006, 2, 0.64, 0.3178, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label_3.setObjectName(_fromUtf8(\"label_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L61_C8", "label": "addWidget()", "type": "expression", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3653, 0.006, 2, 0.64, 0.3256, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_2.addWidget(self.label_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L62_C8", "label": "self.pathYara = QLineEdit()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.3713, 0.006, 2, 0.64, 0.3333, 191, 3, 1, 0, 0, 755, 10, 1], "semantic": {"name": "self.pathYara", "arg_names": [], "import_names": [], "rhs_call_name": "QLineEdit", "annotation": ""}, "snippet": " self.pathYara = QtGui.QLineEdit(self.widgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L63_C8", "label": "setMaximumSize()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3772, 0.006, 2, 0.64, 0.3411, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.pathYara.setMaximumSize(QtCore.QSize(300, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L64_C8", "label": "setReadOnly()", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3832, 0.006, 2, 0.64, 0.3488, 279, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setReadOnly", "arg_names": [], "import_names": [], "rhs_call_name": "setReadOnly", "annotation": ""}, "snippet": " self.pathYara.setReadOnly(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L65_C8", "label": "setObjectName()", "type": "expression", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3892, 0.006, 2, 0.64, 0.3566, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.pathYara.setObjectName(_fromUtf8(\"pathYara\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L66_C8", "label": "addWidget()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.3952, 0.006, 2, 0.64, 0.3643, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_2.addWidget(self.pathYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L67_C8", "label": "self.yaraTree = QTreeView()", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.4012, 0.006, 2, 0.64, 0.3721, 326, 3, 1, 0, 0, 801, 10, 1], "semantic": {"name": "self.yaraTree", "arg_names": [], "import_names": [], "rhs_call_name": "QTreeView", "annotation": ""}, "snippet": " self.yaraTree = QtGui.QTreeView(self.widgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L68_C8", "label": "setMaximumSize()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4072, 0.006, 2, 0.64, 0.3798, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.yaraTree.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L69_C8", "label": "setObjectName()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4132, 0.006, 2, 0.64, 0.3876, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.yaraTree.setObjectName(_fromUtf8(\"yaraTree\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L70_C8", "label": "addWidget()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4192, 0.006, 2, 0.64, 0.3953, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_2.addWidget(self.yaraTree)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L71_C8", "label": "addWidget()", "type": "expression", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4251, 0.006, 2, 0.64, 0.4031, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_5.addWidget(self.widgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L72_C8", "label": "setWidget()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4311, 0.006, 2, 0.64, 0.4109, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " self.dockWidgetYara.setWidget(self.dockWidgetContents)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L73_C8", "label": "addDockWidget()", "type": "expression", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4371, 0.006, 2, 0.64, 0.4186, 944, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addDockWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addDockWidget", "annotation": ""}, "snippet": " YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidgetYara)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L74_C8", "label": "self.dockWidgetMalware = QDockWidget()", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.4431, 0.006, 2, 0.64, 0.4264, 726, 3, 1, 0, 0, 771, 10, 1], "semantic": {"name": "self.dockWidgetMalware", "arg_names": [], "import_names": [], "rhs_call_name": "QDockWidget", "annotation": ""}, "snippet": " self.dockWidgetMalware = QtGui.QDockWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L75_C8", "label": "setMinimumSize()", "type": "expression", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4491, 0.006, 2, 0.64, 0.4341, 28, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMinimumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMinimumSize", "annotation": ""}, "snippet": " self.dockWidgetMalware.setMinimumSize(QtCore.QSize(310, 231))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L76_C8", "label": "setObjectName()", "type": "expression", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4551, 0.006, 2, 0.64, 0.4419, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetMalware.setObjectName(_fromUtf8(\"dockWidgetMalware\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L77_C8", "label": "self.dockWidgetContents_2 = QWidget()", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.4611, 0.006, 2, 0.64, 0.4496, 947, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.dockWidgetContents_2", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.dockWidgetContents_2 = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L78_C8", "label": "setObjectName()", "type": "expression", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.4671, 0.006, 2, 0.64, 0.4574, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetContents_2.setObjectName(_fromUtf8(\"dockWidgetContents_2\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L79_C8", "label": "self.verticalLayout_4 = QVBoxLayout()", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.4731, 0.006, 2, 0.64, 0.4651, 611, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_4", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_4 = QtGui.QVBoxLayout(self.dockWidgetContents_2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L80_C8", "label": "setObjectName()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.479, 0.006, 2, 0.64, 0.4729, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_4.setObjectName(_fromUtf8(\"verticalLayout_4\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L81_C8", "label": "self.widgetMalware = QWidget()", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.485, 0.006, 2, 0.64, 0.4806, 643, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widgetMalware", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widgetMalware = QtGui.QWidget(self.dockWidgetContents_2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L82_C8", "label": "setMaximumSize()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.491, 0.006, 2, 0.64, 0.4884, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.widgetMalware.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L83_C8", "label": "setObjectName()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.497, 0.006, 2, 0.64, 0.4961, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widgetMalware.setObjectName(_fromUtf8(\"widgetMalware\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L84_C8", "label": "self.verticalLayout_3 = QVBoxLayout()", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.503, 0.006, 2, 0.64, 0.5039, 521, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_3", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_3 = QtGui.QVBoxLayout(self.widgetMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L85_C8", "label": "setMargin()", "type": "expression", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.509, 0.006, 2, 0.64, 0.5116, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.verticalLayout_3.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L86_C8", "label": "setObjectName()", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.515, 0.006, 2, 0.64, 0.5194, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_3.setObjectName(_fromUtf8(\"verticalLayout_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L87_C8", "label": "self.pathMalware = QLineEdit()", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.521, 0.006, 2, 0.64, 0.5271, 70, 3, 1, 0, 0, 755, 10, 1], "semantic": {"name": "self.pathMalware", "arg_names": [], "import_names": [], "rhs_call_name": "QLineEdit", "annotation": ""}, "snippet": " self.pathMalware = QtGui.QLineEdit(self.widgetMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L88_C8", "label": "setMaximumSize()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5269, 0.006, 2, 0.64, 0.5349, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.pathMalware.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L89_C8", "label": "setReadOnly()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5329, 0.006, 2, 0.64, 0.5426, 279, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setReadOnly", "arg_names": [], "import_names": [], "rhs_call_name": "setReadOnly", "annotation": ""}, "snippet": " self.pathMalware.setReadOnly(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L90_C8", "label": "setObjectName()", "type": "expression", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5389, 0.006, 2, 0.64, 0.5504, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.pathMalware.setObjectName(_fromUtf8(\"pathMalware\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L91_C8", "label": "addWidget()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5449, 0.006, 2, 0.64, 0.5581, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_3.addWidget(self.pathMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L92_C8", "label": "self.malwareTree = QTreeView()", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.5509, 0.006, 2, 0.64, 0.5659, 91, 3, 1, 0, 0, 801, 10, 1], "semantic": {"name": "self.malwareTree", "arg_names": [], "import_names": [], "rhs_call_name": "QTreeView", "annotation": ""}, "snippet": " self.malwareTree = QtGui.QTreeView(self.widgetMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L93_C8", "label": "setMaximumSize()", "type": "expression", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5569, 0.006, 2, 0.64, 0.5736, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.malwareTree.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L94_C8", "label": "setObjectName()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5629, 0.006, 2, 0.64, 0.5814, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.malwareTree.setObjectName(_fromUtf8(\"malwareTree\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L95_C8", "label": "addWidget()", "type": "expression", "loc": [95, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5689, 0.006, 2, 0.64, 0.5891, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_3.addWidget(self.malwareTree)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L96_C8", "label": "addWidget()", "type": "expression", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5749, 0.006, 2, 0.64, 0.5969, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_4.addWidget(self.widgetMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L97_C8", "label": "setWidget()", "type": "expression", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5808, 0.006, 2, 0.64, 0.6047, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " self.dockWidgetMalware.setWidget(self.dockWidgetContents_2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L98_C8", "label": "addDockWidget()", "type": "expression", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5868, 0.006, 2, 0.64, 0.6124, 944, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addDockWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addDockWidget", "annotation": ""}, "snippet": " YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidgetMalware)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L99_C8", "label": "self.dockWidgetInspector = QDockWidget()", "type": "assigned_variable", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.5928, 0.006, 2, 0.64, 0.6202, 392, 3, 1, 0, 0, 771, 10, 1], "semantic": {"name": "self.dockWidgetInspector", "arg_names": [], "import_names": [], "rhs_call_name": "QDockWidget", "annotation": ""}, "snippet": " self.dockWidgetInspector = QtGui.QDockWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L100_C8", "label": "setObjectName()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.5988, 0.006, 2, 0.64, 0.6279, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetInspector.setObjectName(_fromUtf8(\"dockWidgetInspector\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L101_C8", "label": "self.dockWidgetContents_4 = QWidget()", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6048, 0.006, 2, 0.64, 0.6357, 389, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.dockWidgetContents_4", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.dockWidgetContents_4 = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L102_C8", "label": "setObjectName()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6108, 0.006, 2, 0.64, 0.6434, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetContents_4.setObjectName(_fromUtf8(\"dockWidgetContents_4\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L103_C8", "label": "self.verticalLayout_6 = QVBoxLayout()", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6168, 0.006, 2, 0.64, 0.6512, 887, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_6", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_6 = QtGui.QVBoxLayout(self.dockWidgetContents_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L104_C8", "label": "setObjectName()", "type": "expression", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6228, 0.006, 2, 0.64, 0.6589, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_6.setObjectName(_fromUtf8(\"verticalLayout_6\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L105_C8", "label": "self.tabWidget = QTabWidget()", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6287, 0.006, 2, 0.64, 0.6667, 651, 3, 1, 0, 0, 115, 10, 1], "semantic": {"name": "self.tabWidget", "arg_names": [], "import_names": [], "rhs_call_name": "QTabWidget", "annotation": ""}, "snippet": " self.tabWidget = QtGui.QTabWidget(self.dockWidgetContents_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L106_C8", "label": "setObjectName()", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6347, 0.006, 2, 0.64, 0.6744, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.tabWidget.setObjectName(_fromUtf8(\"tabWidget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L107_C8", "label": "self.tab_properties = QWidget()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6407, 0.006, 2, 0.64, 0.6822, 40, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.tab_properties", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.tab_properties = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L108_C8", "label": "setObjectName()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6467, 0.006, 2, 0.64, 0.6899, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.tab_properties.setObjectName(_fromUtf8(\"tab_properties\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L109_C8", "label": "self.verticalLayout_8 = QVBoxLayout()", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6527, 0.006, 2, 0.64, 0.6977, 160, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_8", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_8 = QtGui.QVBoxLayout(self.tab_properties)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L110_C8", "label": "setObjectName()", "type": "expression", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6587, 0.006, 2, 0.64, 0.7054, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_8.setObjectName(_fromUtf8(\"verticalLayout_8\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L111_C8", "label": "self.treeMalwareProperties = QTreeWidget()", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6647, 0.006, 2, 0.64, 0.7132, 8, 3, 1, 0, 0, 772, 10, 1], "semantic": {"name": "self.treeMalwareProperties", "arg_names": [], "import_names": [], "rhs_call_name": "QTreeWidget", "annotation": ""}, "snippet": " self.treeMalwareProperties = QtGui.QTreeWidget(self.tab_properties)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L112_C8", "label": "setObjectName()", "type": "expression", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6707, 0.006, 2, 0.64, 0.7209, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.treeMalwareProperties.setObjectName(_fromUtf8(\"treeMalwareProperties\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L113_C8", "label": "addWidget()", "type": "expression", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6766, 0.006, 2, 0.64, 0.7287, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_8.addWidget(self.treeMalwareProperties)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L114_C8", "label": "addTab()", "type": "expression", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6826, 0.006, 2, 0.64, 0.7364, 380, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addTab", "arg_names": [], "import_names": [], "rhs_call_name": "addTab", "annotation": ""}, "snippet": " self.tabWidget.addTab(self.tab_properties, _fromUtf8(\"\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L115_C8", "label": "self.tab_strings = QWidget()", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.6886, 0.006, 2, 0.64, 0.7442, 352, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.tab_strings", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.tab_strings = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L116_C8", "label": "setObjectName()", "type": "expression", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.6946, 0.006, 2, 0.64, 0.7519, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.tab_strings.setObjectName(_fromUtf8(\"tab_strings\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L117_C8", "label": "self.verticalLayout_7 = QVBoxLayout()", "type": "assigned_variable", "loc": [117, 117], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.7006, 0.006, 2, 0.64, 0.7597, 332, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_7", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_7 = QtGui.QVBoxLayout(self.tab_strings)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L118_C8", "label": "setObjectName()", "type": "expression", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7066, 0.006, 2, 0.64, 0.7674, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_7.setObjectName(_fromUtf8(\"verticalLayout_7\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L119_C8", "label": "addTab()", "type": "expression", "loc": [119, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7126, 0.006, 2, 0.64, 0.7752, 380, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addTab", "arg_names": [], "import_names": [], "rhs_call_name": "addTab", "annotation": ""}, "snippet": " self.tabWidget.addTab(self.tab_strings, _fromUtf8(\"\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L120_C8", "label": "addWidget()", "type": "expression", "loc": [120, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7186, 0.006, 2, 0.64, 0.7829, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_6.addWidget(self.tabWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L121_C8", "label": "setWidget()", "type": "expression", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7246, 0.006, 2, 0.64, 0.7907, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " self.dockWidgetInspector.setWidget(self.dockWidgetContents_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L122_C8", "label": "addDockWidget()", "type": "expression", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7305, 0.006, 2, 0.64, 0.7984, 944, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addDockWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addDockWidget", "annotation": ""}, "snippet": " YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidgetInspector)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L123_C8", "label": "self.dockWidget = QDockWidget()", "type": "assigned_variable", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.7365, 0.006, 2, 0.64, 0.8062, 445, 3, 1, 0, 0, 771, 10, 1], "semantic": {"name": "self.dockWidget", "arg_names": [], "import_names": [], "rhs_call_name": "QDockWidget", "annotation": ""}, "snippet": " self.dockWidget = QtGui.QDockWidget(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L124_C8", "label": "setObjectName()", "type": "expression", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7425, 0.006, 2, 0.64, 0.814, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidget.setObjectName(_fromUtf8(\"dockWidget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L125_C8", "label": "self.dockWidgetContents_3 = QWidget()", "type": "assigned_variable", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.7485, 0.006, 2, 0.64, 0.8217, 261, 3, 0, 0, 0, 317, 10, 1], "semantic": {"name": "self.dockWidgetContents_3", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.dockWidgetContents_3 = QtGui.QWidget()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L126_C8", "label": "setObjectName()", "type": "expression", "loc": [126, 126], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7545, 0.006, 2, 0.64, 0.8295, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.dockWidgetContents_3.setObjectName(_fromUtf8(\"dockWidgetContents_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L127_C8", "label": "self.verticalLayout_9 = QVBoxLayout()", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.7605, 0.006, 2, 0.64, 0.8372, 981, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_9", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_9 = QtGui.QVBoxLayout(self.dockWidgetContents_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L128_C8", "label": "setObjectName()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7665, 0.006, 2, 0.64, 0.845, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_9.setObjectName(_fromUtf8(\"verticalLayout_9\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L129_C8", "label": "self.outputEdit = QTextEdit()", "type": "assigned_variable", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.7725, 0.006, 2, 0.64, 0.8527, 880, 3, 1, 0, 0, 714, 10, 1], "semantic": {"name": "self.outputEdit", "arg_names": [], "import_names": [], "rhs_call_name": "QTextEdit", "annotation": ""}, "snippet": " self.outputEdit = QtGui.QTextEdit(self.dockWidgetContents_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L130_C8", "label": "setMinimumSize()", "type": "expression", "loc": [130, 130], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7784, 0.006, 2, 0.64, 0.8605, 28, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMinimumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMinimumSize", "annotation": ""}, "snippet": " self.outputEdit.setMinimumSize(QtCore.QSize(0, 100))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L131_C8", "label": "setMaximumSize()", "type": "expression", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7844, 0.006, 2, 0.64, 0.8682, 816, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setMaximumSize", "arg_names": [], "import_names": [], "rhs_call_name": "setMaximumSize", "annotation": ""}, "snippet": " self.outputEdit.setMaximumSize(QtCore.QSize(16777215, 16777215))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L132_C8", "label": "setReadOnly()", "type": "expression", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7904, 0.006, 2, 0.64, 0.876, 279, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setReadOnly", "arg_names": [], "import_names": [], "rhs_call_name": "setReadOnly", "annotation": ""}, "snippet": " self.outputEdit.setReadOnly(True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L133_C8", "label": "setObjectName()", "type": "expression", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.7964, 0.006, 2, 0.64, 0.8837, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.outputEdit.setObjectName(_fromUtf8(\"outputEdit\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L134_C8", "label": "addWidget()", "type": "expression", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8024, 0.006, 2, 0.64, 0.8915, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_9.addWidget(self.outputEdit)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L135_C8", "label": "setWidget()", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8084, 0.006, 2, 0.64, 0.8992, 656, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setWidget", "arg_names": [], "import_names": [], "rhs_call_name": "setWidget", "annotation": ""}, "snippet": " self.dockWidget.setWidget(self.dockWidgetContents_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L136_C8", "label": "addDockWidget()", "type": "expression", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8144, 0.006, 2, 0.64, 0.907, 944, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "addDockWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addDockWidget", "annotation": ""}, "snippet": " YaraEditor.addDockWidget(QtCore.Qt.DockWidgetArea(8), self.dockWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L137_C8", "label": "self.actionNouveau = QAction()", "type": "assigned_variable", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.8204, 0.006, 2, 0.64, 0.9147, 910, 3, 1, 0, 0, 900, 10, 1], "semantic": {"name": "self.actionNouveau", "arg_names": [], "import_names": [], "rhs_call_name": "QAction", "annotation": ""}, "snippet": " self.actionNouveau = QtGui.QAction(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L138_C8", "label": "icon1 = QIcon()", "type": "assigned_variable", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.8263, 0.006, 2, 0.64, 0.9225, 215, 3, 0, 0, 0, 833, 10, 1], "semantic": {"name": "icon1", "arg_names": [], "import_names": [], "rhs_call_name": "QIcon", "annotation": ""}, "snippet": " icon1 = QtGui.QIcon()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L139_C8", "label": "addPixmap()", "type": "expression", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8323, 0.006, 2, 0.64, 0.9302, 106, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "addPixmap", "arg_names": [], "import_names": [], "rhs_call_name": "addPixmap", "annotation": ""}, "snippet": " icon1.addPixmap(QtGui.QPixmap(_fromUtf8(\":/icon/images/win/filenew.png\")), QtGui.QIcon.Normal, QtGui.QIcon.On)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L140_C8", "label": "setIcon()", "type": "expression", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8383, 0.006, 2, 0.64, 0.938, 972, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setIcon", "arg_names": [], "import_names": [], "rhs_call_name": "setIcon", "annotation": ""}, "snippet": " self.actionNouveau.setIcon(icon1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L141_C8", "label": "setObjectName()", "type": "expression", "loc": [141, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8443, 0.006, 2, 0.64, 0.9457, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.actionNouveau.setObjectName(_fromUtf8(\"actionNouveau\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L142_C8", "label": "self.actionExit = QAction()", "type": "assigned_variable", "loc": [142, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.8503, 0.006, 2, 0.64, 0.9535, 363, 3, 1, 0, 0, 900, 10, 1], "semantic": {"name": "self.actionExit", "arg_names": [], "import_names": [], "rhs_call_name": "QAction", "annotation": ""}, "snippet": " self.actionExit = QtGui.QAction(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L143_C8", "label": "setObjectName()", "type": "expression", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8563, 0.006, 2, 0.64, 0.9612, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.actionExit.setObjectName(_fromUtf8(\"actionExit\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L144_C8", "label": "self.actionEnregistrer = QAction()", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [14, 2, 0.8623, 0.006, 2, 0.64, 0.969, 182, 3, 1, 0, 0, 900, 10, 1], "semantic": {"name": "self.actionEnregistrer", "arg_names": [], "import_names": [], "rhs_call_name": "QAction", "annotation": ""}, "snippet": " self.actionEnregistrer = QtGui.QAction(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L145_C8", "label": "setObjectName()", "type": "expression", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8683, 0.006, 2, 0.64, 0.9767, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.actionEnregistrer.setObjectName(_fromUtf8(\"actionEnregistrer\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L147_C8", "label": "retranslateUi()", "type": "expression", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8802, 0.006, 2, 0.64, 0.9845, 520, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "retranslateUi", "arg_names": [], "import_names": [], "rhs_call_name": "retranslateUi", "annotation": ""}, "snippet": " self.retranslateUi(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L148_C8", "label": "setCurrentIndex()", "type": "expression", "loc": [148, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8862, 0.006, 2, 0.64, 0.9922, 142, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setCurrentIndex", "arg_names": [], "import_names": [], "rhs_call_name": "setCurrentIndex", "annotation": ""}, "snippet": " self.tabWidget.setCurrentIndex(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L149_C8", "label": "connectSlotsByName()", "type": "expression", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "vector": [8, 2, 0.8922, 0.006, 2, 0.64, 1.0, 419, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "connectSlotsByName", "arg_names": [], "import_names": [], "rhs_call_name": "connectSlotsByName", "annotation": ""}, "snippet": " QtCore.QMetaObject.connectSlotsByName(YaraEditor)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "label": "retranslateUi", "type": "function", "loc": [151, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:ClassDef_L17_C0", "vector": [2, 1, 0.9461, 0.0898, 1, 0.94, 1.0, 520, 0, 2, 0, 0, 0, 0, 32], "semantic": {"name": "retranslateUi", "arg_names": ["self", "YaraEditor"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def retranslateUi(self, YaraEditor):\n YaraEditor.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Yara-Editor\", None, QtGui.QApplication.UnicodeUTF8))\n self.label_3.setText(QtGui.QApplication.translate(\"YaraEditor\", \"Yara Browser\", None, QtGui.QApplication.UnicodeUTF8))\n self.dockWidgetMalware.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Malware Browser\", None, QtGui.QApplication.UnicodeUTF8))\n self.dockWidgetInspector.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Inspector\", None, QtGui.QApplication.UnicodeUTF8))\n self.treeMalwareProperties.headerItem().setText(0, QtGui.QApplication.translate(\"YaraEditor\", \"Name\", None, QtGui.QApplication.UnicodeUTF8))\n self.treeMalwareProperties.headerItem().setText(1, QtGui.QApplication.translate(\"YaraEditor\", \"Value\", None, QtGui.QApplication.UnicodeUTF8))\n self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_properties), QtGui.QApplication.translate(\"YaraEditor\", \"Tab Properties\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L152_C8", "label": "setWindowTitle()", "type": "expression", "loc": [152, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9102, 0.006, 2, 0.05, 0.0, 38, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setWindowTitle", "arg_names": [], "import_names": [], "rhs_call_name": "setWindowTitle", "annotation": ""}, "snippet": " YaraEditor.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Yara-Editor\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L153_C8", "label": "setText()", "type": "expression", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9162, 0.006, 2, 0.05, 0.0769, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label_3.setText(QtGui.QApplication.translate(\"YaraEditor\", \"Yara Browser\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L154_C8", "label": "setWindowTitle()", "type": "expression", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9222, 0.006, 2, 0.05, 0.1538, 38, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setWindowTitle", "arg_names": [], "import_names": [], "rhs_call_name": "setWindowTitle", "annotation": ""}, "snippet": " self.dockWidgetMalware.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Malware Browser\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L155_C8", "label": "setWindowTitle()", "type": "expression", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9281, 0.006, 2, 0.05, 0.2308, 38, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setWindowTitle", "arg_names": [], "import_names": [], "rhs_call_name": "setWindowTitle", "annotation": ""}, "snippet": " self.dockWidgetInspector.setWindowTitle(QtGui.QApplication.translate(\"YaraEditor\", \"Inspector\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L156_C8", "label": "setText()", "type": "expression", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9341, 0.006, 2, 0.05, 0.3077, 40, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.treeMalwareProperties.headerItem().setText(0, QtGui.QApplication.translate(\"YaraEditor\", \"Name\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L157_C8", "label": "setText()", "type": "expression", "loc": [157, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9401, 0.006, 2, 0.05, 0.3846, 40, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.treeMalwareProperties.headerItem().setText(1, QtGui.QApplication.translate(\"YaraEditor\", \"Value\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L158_C8", "label": "setTabText()", "type": "expression", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9461, 0.006, 2, 0.05, 0.4615, 78, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setTabText", "arg_names": [], "import_names": [], "rhs_call_name": "setTabText", "annotation": ""}, "snippet": " self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_properties), QtGui.QApplication.translate(\"YaraEditor\", \"Tab Properties\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L159_C8", "label": "setTabText()", "type": "expression", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9521, 0.006, 2, 0.05, 0.5385, 78, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setTabText", "arg_names": [], "import_names": [], "rhs_call_name": "setTabText", "annotation": ""}, "snippet": " self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_strings), QtGui.QApplication.translate(\"YaraEditor\", \"Strings\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L160_C8", "label": "setText()", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9581, 0.006, 2, 0.05, 0.6154, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.actionNouveau.setText(QtGui.QApplication.translate(\"YaraEditor\", \"New\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L161_C8", "label": "setShortcut()", "type": "expression", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9641, 0.006, 2, 0.05, 0.6923, 917, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setShortcut", "arg_names": [], "import_names": [], "rhs_call_name": "setShortcut", "annotation": ""}, "snippet": " self.actionNouveau.setShortcut(QtGui.QApplication.translate(\"YaraEditor\", \"Ctrl+N\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L162_C8", "label": "setText()", "type": "expression", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.9701, 0.006, 2, 0.05, 0.7692, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.actionExit.setText(QtGui.QApplication.translate(\"YaraEditor\", \"Exit\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L163_C8", "label": "setShortcut()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.976, 0.006, 2, 0.05, 0.8462, 917, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setShortcut", "arg_names": [], "import_names": [], "rhs_call_name": "setShortcut", "annotation": ""}, "snippet": " self.actionExit.setShortcut(QtGui.QApplication.translate(\"YaraEditor\", \"Ctrl+Q\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L164_C8", "label": "setText()", "type": "expression", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.982, 0.006, 2, 0.05, 0.9231, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.actionEnregistrer.setText(QtGui.QApplication.translate(\"YaraEditor\", \"Save\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L165_C8", "label": "setShortcut()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "vector": [8, 2, 0.988, 0.006, 2, 0.05, 1.0, 917, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setShortcut", "arg_names": [], "import_names": [], "rhs_call_name": "setShortcut", "annotation": ""}, "snippet": " self.actionEnregistrer.setShortcut(QtGui.QApplication.translate(\"YaraEditor\", \"Ctrl+S\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_295:Import_L167_C0", "label": "yaraeditor_rc import yaraeditor_rc", "type": "import", "loc": [167, 167], "level": 0, "parent": null, "vector": [1, 0, 1.0, 0.006, 0, 0.66, 1.0, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "yaraeditor_rc", "arg_names": [], "import_names": ["yaraeditor_rc"], "rhs_call_name": "", "annotation": ""}, "snippet": "import yaraeditor_rc"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_295:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L95_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L117_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L120_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L130_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L143_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L148_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L157_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_295:FunctionDef_L151_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_295:Expr_L165_C8"}]
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'rules_generator.ui' # # Created: Tue Feb 26 07:52:45 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_DialogGenerator(object): def setupUi(self, DialogGenerator): DialogGenerator.setObjectName(_fromUtf8("DialogGenerator")) DialogGenerator.resize(728, 610) self.verticalLayout = QtGui.QVBoxLayout(DialogGenerator) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label = QtGui.QLabel(DialogGenerator) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.label_4 = QtGui.QLabel(DialogGenerator) self.label_4.setObjectName(_fromUtf8("label_4")) self.verticalLayout.addWidget(self.label_4) self.label_5 = QtGui.QLabel(DialogGenerator) self.label_5.setObjectName(_fromUtf8("label_5")) self.verticalLayout.addWidget(self.label_5) self.widget = QtGui.QWidget(DialogGenerator) self.widget.setObjectName(_fromUtf8("widget")) self.horizontalLayout = QtGui.QHBoxLayout(self.widget) self.horizontalLayout.setMargin(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.widget_3 = QtGui.QWidget(self.widget) self.widget_3.setObjectName(_fromUtf8("widget_3")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget_3) self.verticalLayout_2.setMargin(0) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.widget_4 = QtGui.QWidget(self.widget_3) self.widget_4.setObjectName(_fromUtf8("widget_4")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.widget_4) self.horizontalLayout_3.setMargin(0) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.label_2 = QtGui.QLabel(self.widget_4) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout_3.addWidget(self.label_2) self.btnBrowseNewFile = QtGui.QToolButton(self.widget_4) self.btnBrowseNewFile.setObjectName(_fromUtf8("btnBrowseNewFile")) self.horizontalLayout_3.addWidget(self.btnBrowseNewFile) self.verticalLayout_2.addWidget(self.widget_4) self.listFiles = QtGui.QListWidget(self.widget_3) self.listFiles.setObjectName(_fromUtf8("listFiles")) self.verticalLayout_2.addWidget(self.listFiles) self.horizontalLayout.addWidget(self.widget_3) self.treeWidget = QtGui.QTreeWidget(self.widget) self.treeWidget.setObjectName(_fromUtf8("treeWidget")) self.treeWidget.headerItem().setText(0, _fromUtf8("1")) self.treeWidget.header().setVisible(False) self.horizontalLayout.addWidget(self.treeWidget) self.widget_5 = QtGui.QWidget(self.widget) self.widget_5.setObjectName(_fromUtf8("widget_5")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.widget_5) self.verticalLayout_3.setMargin(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.widget_6 = QtGui.QWidget(self.widget_5) self.widget_6.setObjectName(_fromUtf8("widget_6")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.widget_6) self.horizontalLayout_4.setMargin(0) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.label_3 = QtGui.QLabel(self.widget_6) self.label_3.setObjectName(_fromUtf8("label_3")) self.horizontalLayout_4.addWidget(self.label_3) self.btnBrowseNewFamily = QtGui.QToolButton(self.widget_6) self.btnBrowseNewFamily.setObjectName(_fromUtf8("btnBrowseNewFamily")) self.horizontalLayout_4.addWidget(self.btnBrowseNewFamily) self.verticalLayout_3.addWidget(self.widget_6) self.listFilesFamily = QtGui.QListWidget(self.widget_5) self.listFilesFamily.setObjectName(_fromUtf8("listFilesFamily")) self.verticalLayout_3.addWidget(self.listFilesFamily) self.horizontalLayout.addWidget(self.widget_5) self.verticalLayout.addWidget(self.widget) self.buttonBox = QtGui.QDialogButtonBox(DialogGenerator) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.verticalLayout.addWidget(self.buttonBox) self.retranslateUi(DialogGenerator) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), DialogGenerator.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), DialogGenerator.reject) QtCore.QMetaObject.connectSlotsByName(DialogGenerator) def retranslateUi(self, DialogGenerator): DialogGenerator.setWindowTitle(QtGui.QApplication.translate("DialogGenerator", "Dialog", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("DialogGenerator", "1 - Adding elements in the \"Same Family\", the strings will be retained only those that are found in each element.", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("DialogGenerator", "2 - Adding elements in the \"Other Malware\", the strings in these files will not be selected to build the rule.", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("DialogGenerator", "3 - In the middle part, you can see only the strings used for the detection.", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("DialogGenerator", "Other Malware (False positive)", None, QtGui.QApplication.UnicodeUTF8)) self.btnBrowseNewFile.setText(QtGui.QApplication.translate("DialogGenerator", "...", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("DialogGenerator", "Same Family", None, QtGui.QApplication.UnicodeUTF8)) self.btnBrowseNewFamily.setText(QtGui.QApplication.translate("DialogGenerator", "...", None, QtGui.QApplication.UnicodeUTF8))
ajibawa-2023/Python-Code-Large/train/row_296
90
105
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_296:ImportFrom_L10_C0", "label": "from PyQt4 import QtCore, QtGui", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0952, 0.0095, 0, 0.66, 0.0, 154, 0, 2, 0, 0, 154, 0, 0], "semantic": {"name": "PyQt4", "arg_names": [], "import_names": ["QtCore", "QtGui"], "rhs_call_name": "", "annotation": ""}, "snippet": "from PyQt4 import QtCore, QtGui"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Try_L12_C0", "label": "try", "type": "try", "loc": [12, 15], "level": 0, "parent": null, "vector": [7, 0, 0.1286, 0.0381, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L13_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:Try_L12_C0", "vector": [14, 1, 0.1238, 0.0095, 1, 0.4, 0.0, 412, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = QtCore.QString.fromUtf8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L15_C4", "label": "_fromUtf8 =", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:Try_L12_C0", "vector": [14, 1, 0.1429, 0.0095, 1, 0.4, 0.0, 412, 9, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_fromUtf8", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _fromUtf8 = lambda s: s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:ClassDef_L17_C0", "label": "Ui_DialogGenerator", "type": "class", "loc": [17, 104], "level": 0, "parent": null, "vector": [3, 0, 0.5762, 0.8381, 0, 0.66, 1.0, 169, 0, 2, 0, 0, 186, 0, 99], "semantic": {"name": "Ui_DialogGenerator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Ui_DialogGenerator(object):\n def setupUi(self, DialogGenerator):\n DialogGenerator.setObjectName(_fromUtf8(\"DialogGenerator\"))\n DialogGenerator.resize(728, 610)\n self.verticalLayout = QtGui.QVBoxLayout(DialogGenerator)\n self.verticalLayout.setObjectName(_fromUtf8(\"verticalLayout\"))\n self.label = QtGui.QLabel(DialogGenerator)\n self.label.setObjectName(_fromUtf8(\"label\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "label": "setupUi", "type": "function", "loc": [18, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:ClassDef_L17_C0", "vector": [2, 1, 0.5333, 0.7333, 1, 0.64, 0.0, 419, 0, 2, 0, 0, 0, 0, 99], "semantic": {"name": "setupUi", "arg_names": ["self", "DialogGenerator"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setupUi(self, DialogGenerator):\n DialogGenerator.setObjectName(_fromUtf8(\"DialogGenerator\"))\n DialogGenerator.resize(728, 610)\n self.verticalLayout = QtGui.QVBoxLayout(DialogGenerator)\n self.verticalLayout.setObjectName(_fromUtf8(\"verticalLayout\"))\n self.label = QtGui.QLabel(DialogGenerator)\n self.label.setObjectName(_fromUtf8(\"label\"))\n self.verticalLayout.addWidget(self.label)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L19_C8", "label": "setObjectName()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.181, 0.0095, 2, 0.9, 0.0, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " DialogGenerator.setObjectName(_fromUtf8(\"DialogGenerator\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L20_C8", "label": "resize()", "type": "expression", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.1905, 0.0095, 2, 0.9, 0.0135, 834, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "resize", "arg_names": [], "import_names": [], "rhs_call_name": "resize", "annotation": ""}, "snippet": " DialogGenerator.resize(728, 610)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L21_C8", "label": "self.verticalLayout = QVBoxLayout()", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.2, 0.0095, 2, 0.9, 0.027, 781, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout = QtGui.QVBoxLayout(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L22_C8", "label": "setObjectName()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2095, 0.0095, 2, 0.9, 0.0405, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout.setObjectName(_fromUtf8(\"verticalLayout\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L23_C8", "label": "self.label = QLabel()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.219, 0.0095, 2, 0.9, 0.0541, 51, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label = QtGui.QLabel(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L24_C8", "label": "setObjectName()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2286, 0.0095, 2, 0.9, 0.0676, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label.setObjectName(_fromUtf8(\"label\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L25_C8", "label": "addWidget()", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2381, 0.0095, 2, 0.9, 0.0811, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.label)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L26_C8", "label": "self.label_4 = QLabel()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.2476, 0.0095, 2, 0.9, 0.0946, 794, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label_4", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label_4 = QtGui.QLabel(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L27_C8", "label": "setObjectName()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2571, 0.0095, 2, 0.9, 0.1081, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label_4.setObjectName(_fromUtf8(\"label_4\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L28_C8", "label": "addWidget()", "type": "expression", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2667, 0.0095, 2, 0.9, 0.1216, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.label_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L29_C8", "label": "self.label_5 = QLabel()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.2762, 0.0095, 2, 0.9, 0.1351, 161, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label_5", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label_5 = QtGui.QLabel(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L30_C8", "label": "setObjectName()", "type": "expression", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2857, 0.0095, 2, 0.9, 0.1486, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label_5.setObjectName(_fromUtf8(\"label_5\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L31_C8", "label": "addWidget()", "type": "expression", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.2952, 0.0095, 2, 0.9, 0.1622, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.label_5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L32_C8", "label": "self.widget = QWidget()", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.3048, 0.0095, 2, 0.9, 0.1757, 102, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widget", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widget = QtGui.QWidget(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L33_C8", "label": "setObjectName()", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.3143, 0.0095, 2, 0.9, 0.1892, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widget.setObjectName(_fromUtf8(\"widget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L34_C8", "label": "self.horizontalLayout = QHBoxLayout()", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.3238, 0.0095, 2, 0.9, 0.2027, 138, 3, 1, 0, 0, 792, 10, 1], "semantic": {"name": "self.horizontalLayout", "arg_names": [], "import_names": [], "rhs_call_name": "QHBoxLayout", "annotation": ""}, "snippet": " self.horizontalLayout = QtGui.QHBoxLayout(self.widget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L35_C8", "label": "setMargin()", "type": "expression", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.3333, 0.0095, 2, 0.9, 0.2162, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.horizontalLayout.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L36_C8", "label": "setObjectName()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.3429, 0.0095, 2, 0.9, 0.2297, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.horizontalLayout.setObjectName(_fromUtf8(\"horizontalLayout\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L37_C8", "label": "self.widget_3 = QWidget()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.3524, 0.0095, 2, 0.9, 0.2432, 323, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widget_3", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widget_3 = QtGui.QWidget(self.widget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L38_C8", "label": "setObjectName()", "type": "expression", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.3619, 0.0095, 2, 0.9, 0.2568, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widget_3.setObjectName(_fromUtf8(\"widget_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L39_C8", "label": "self.verticalLayout_2 = QVBoxLayout()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.3714, 0.0095, 2, 0.9, 0.2703, 744, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_2", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L40_C8", "label": "setMargin()", "type": "expression", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.381, 0.0095, 2, 0.9, 0.2838, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.verticalLayout_2.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L41_C8", "label": "setObjectName()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.3905, 0.0095, 2, 0.9, 0.2973, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_2.setObjectName(_fromUtf8(\"verticalLayout_2\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L42_C8", "label": "self.widget_4 = QWidget()", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.4, 0.0095, 2, 0.9, 0.3108, 976, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widget_4", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widget_4 = QtGui.QWidget(self.widget_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L43_C8", "label": "setObjectName()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4095, 0.0095, 2, 0.9, 0.3243, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widget_4.setObjectName(_fromUtf8(\"widget_4\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L44_C8", "label": "self.horizontalLayout_3 = QHBoxLayout()", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.419, 0.0095, 2, 0.9, 0.3378, 926, 3, 1, 0, 0, 792, 10, 1], "semantic": {"name": "self.horizontalLayout_3", "arg_names": [], "import_names": [], "rhs_call_name": "QHBoxLayout", "annotation": ""}, "snippet": " self.horizontalLayout_3 = QtGui.QHBoxLayout(self.widget_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L45_C8", "label": "setMargin()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4286, 0.0095, 2, 0.9, 0.3514, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.horizontalLayout_3.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L46_C8", "label": "setObjectName()", "type": "expression", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4381, 0.0095, 2, 0.9, 0.3649, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.horizontalLayout_3.setObjectName(_fromUtf8(\"horizontalLayout_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L47_C8", "label": "self.label_2 = QLabel()", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.4476, 0.0095, 2, 0.9, 0.3784, 286, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label_2", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label_2 = QtGui.QLabel(self.widget_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L48_C8", "label": "setObjectName()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4571, 0.0095, 2, 0.9, 0.3919, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label_2.setObjectName(_fromUtf8(\"label_2\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L49_C8", "label": "addWidget()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4667, 0.0095, 2, 0.9, 0.4054, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout_3.addWidget(self.label_2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L50_C8", "label": "self.btnBrowseNewFile = QToolButton()", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.4762, 0.0095, 2, 0.9, 0.4189, 784, 3, 1, 0, 0, 387, 10, 1], "semantic": {"name": "self.btnBrowseNewFile", "arg_names": [], "import_names": [], "rhs_call_name": "QToolButton", "annotation": ""}, "snippet": " self.btnBrowseNewFile = QtGui.QToolButton(self.widget_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L51_C8", "label": "setObjectName()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4857, 0.0095, 2, 0.9, 0.4324, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.btnBrowseNewFile.setObjectName(_fromUtf8(\"btnBrowseNewFile\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L52_C8", "label": "addWidget()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.4952, 0.0095, 2, 0.9, 0.4459, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout_3.addWidget(self.btnBrowseNewFile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L53_C8", "label": "addWidget()", "type": "expression", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5048, 0.0095, 2, 0.9, 0.4595, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_2.addWidget(self.widget_4)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L54_C8", "label": "self.listFiles = QListWidget()", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.5143, 0.0095, 2, 0.9, 0.473, 975, 3, 1, 0, 0, 727, 10, 1], "semantic": {"name": "self.listFiles", "arg_names": [], "import_names": [], "rhs_call_name": "QListWidget", "annotation": ""}, "snippet": " self.listFiles = QtGui.QListWidget(self.widget_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L55_C8", "label": "setObjectName()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5238, 0.0095, 2, 0.9, 0.4865, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.listFiles.setObjectName(_fromUtf8(\"listFiles\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L56_C8", "label": "addWidget()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5333, 0.0095, 2, 0.9, 0.5, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_2.addWidget(self.listFiles)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L57_C8", "label": "addWidget()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5429, 0.0095, 2, 0.9, 0.5135, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout.addWidget(self.widget_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L58_C8", "label": "self.treeWidget = QTreeWidget()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.5524, 0.0095, 2, 0.9, 0.527, 503, 3, 1, 0, 0, 772, 10, 1], "semantic": {"name": "self.treeWidget", "arg_names": [], "import_names": [], "rhs_call_name": "QTreeWidget", "annotation": ""}, "snippet": " self.treeWidget = QtGui.QTreeWidget(self.widget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L59_C8", "label": "setObjectName()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5619, 0.0095, 2, 0.9, 0.5405, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.treeWidget.setObjectName(_fromUtf8(\"treeWidget\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L60_C8", "label": "setText()", "type": "expression", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5714, 0.0095, 2, 0.9, 0.5541, 40, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.treeWidget.headerItem().setText(0, _fromUtf8(\"1\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L61_C8", "label": "setVisible()", "type": "expression", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.581, 0.0095, 2, 0.9, 0.5676, 951, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setVisible", "arg_names": [], "import_names": [], "rhs_call_name": "setVisible", "annotation": ""}, "snippet": " self.treeWidget.header().setVisible(False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L62_C8", "label": "addWidget()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.5905, 0.0095, 2, 0.9, 0.5811, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout.addWidget(self.treeWidget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L63_C8", "label": "self.widget_5 = QWidget()", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.6, 0.0095, 2, 0.9, 0.5946, 279, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widget_5", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widget_5 = QtGui.QWidget(self.widget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L64_C8", "label": "setObjectName()", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6095, 0.0095, 2, 0.9, 0.6081, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widget_5.setObjectName(_fromUtf8(\"widget_5\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L65_C8", "label": "self.verticalLayout_3 = QVBoxLayout()", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.619, 0.0095, 2, 0.9, 0.6216, 521, 3, 1, 0, 0, 282, 10, 1], "semantic": {"name": "self.verticalLayout_3", "arg_names": [], "import_names": [], "rhs_call_name": "QVBoxLayout", "annotation": ""}, "snippet": " self.verticalLayout_3 = QtGui.QVBoxLayout(self.widget_5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L66_C8", "label": "setMargin()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6286, 0.0095, 2, 0.9, 0.6351, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.verticalLayout_3.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L67_C8", "label": "setObjectName()", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6381, 0.0095, 2, 0.9, 0.6486, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.verticalLayout_3.setObjectName(_fromUtf8(\"verticalLayout_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L68_C8", "label": "self.widget_6 = QWidget()", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.6476, 0.0095, 2, 0.9, 0.6622, 254, 3, 1, 0, 0, 317, 10, 1], "semantic": {"name": "self.widget_6", "arg_names": [], "import_names": [], "rhs_call_name": "QWidget", "annotation": ""}, "snippet": " self.widget_6 = QtGui.QWidget(self.widget_5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L69_C8", "label": "setObjectName()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6571, 0.0095, 2, 0.9, 0.6757, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.widget_6.setObjectName(_fromUtf8(\"widget_6\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L70_C8", "label": "self.horizontalLayout_4 = QHBoxLayout()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.6667, 0.0095, 2, 0.9, 0.6892, 640, 3, 1, 0, 0, 792, 10, 1], "semantic": {"name": "self.horizontalLayout_4", "arg_names": [], "import_names": [], "rhs_call_name": "QHBoxLayout", "annotation": ""}, "snippet": " self.horizontalLayout_4 = QtGui.QHBoxLayout(self.widget_6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L71_C8", "label": "setMargin()", "type": "expression", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6762, 0.0095, 2, 0.9, 0.7027, 470, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setMargin", "arg_names": [], "import_names": [], "rhs_call_name": "setMargin", "annotation": ""}, "snippet": " self.horizontalLayout_4.setMargin(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L72_C8", "label": "setObjectName()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.6857, 0.0095, 2, 0.9, 0.7162, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.horizontalLayout_4.setObjectName(_fromUtf8(\"horizontalLayout_4\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L73_C8", "label": "self.label_3 = QLabel()", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.6952, 0.0095, 2, 0.9, 0.7297, 304, 3, 1, 0, 0, 495, 10, 1], "semantic": {"name": "self.label_3", "arg_names": [], "import_names": [], "rhs_call_name": "QLabel", "annotation": ""}, "snippet": " self.label_3 = QtGui.QLabel(self.widget_6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L74_C8", "label": "setObjectName()", "type": "expression", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7048, 0.0095, 2, 0.9, 0.7432, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.label_3.setObjectName(_fromUtf8(\"label_3\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L75_C8", "label": "addWidget()", "type": "expression", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7143, 0.0095, 2, 0.9, 0.7568, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout_4.addWidget(self.label_3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L76_C8", "label": "self.btnBrowseNewFamily = QToolButton()", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.7238, 0.0095, 2, 0.9, 0.7703, 330, 3, 1, 0, 0, 387, 10, 1], "semantic": {"name": "self.btnBrowseNewFamily", "arg_names": [], "import_names": [], "rhs_call_name": "QToolButton", "annotation": ""}, "snippet": " self.btnBrowseNewFamily = QtGui.QToolButton(self.widget_6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L77_C8", "label": "setObjectName()", "type": "expression", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7333, 0.0095, 2, 0.9, 0.7838, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.btnBrowseNewFamily.setObjectName(_fromUtf8(\"btnBrowseNewFamily\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L78_C8", "label": "addWidget()", "type": "expression", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7429, 0.0095, 2, 0.9, 0.7973, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout_4.addWidget(self.btnBrowseNewFamily)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L79_C8", "label": "addWidget()", "type": "expression", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7524, 0.0095, 2, 0.9, 0.8108, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_3.addWidget(self.widget_6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L80_C8", "label": "self.listFilesFamily = QListWidget()", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.7619, 0.0095, 2, 0.9, 0.8243, 37, 3, 1, 0, 0, 727, 10, 1], "semantic": {"name": "self.listFilesFamily", "arg_names": [], "import_names": [], "rhs_call_name": "QListWidget", "annotation": ""}, "snippet": " self.listFilesFamily = QtGui.QListWidget(self.widget_5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L81_C8", "label": "setObjectName()", "type": "expression", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7714, 0.0095, 2, 0.9, 0.8378, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.listFilesFamily.setObjectName(_fromUtf8(\"listFilesFamily\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L82_C8", "label": "addWidget()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.781, 0.0095, 2, 0.9, 0.8514, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout_3.addWidget(self.listFilesFamily)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L83_C8", "label": "addWidget()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.7905, 0.0095, 2, 0.9, 0.8649, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.horizontalLayout.addWidget(self.widget_5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L84_C8", "label": "addWidget()", "type": "expression", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8, 0.0095, 2, 0.9, 0.8784, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.widget)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L85_C8", "label": "self.buttonBox = QDialogButtonBox()", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [14, 2, 0.8095, 0.0095, 2, 0.9, 0.8919, 268, 3, 1, 0, 0, 424, 10, 1], "semantic": {"name": "self.buttonBox", "arg_names": [], "import_names": [], "rhs_call_name": "QDialogButtonBox", "annotation": ""}, "snippet": " self.buttonBox = QtGui.QDialogButtonBox(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L86_C8", "label": "setOrientation()", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.819, 0.0095, 2, 0.9, 0.9054, 920, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setOrientation", "arg_names": [], "import_names": [], "rhs_call_name": "setOrientation", "annotation": ""}, "snippet": " self.buttonBox.setOrientation(QtCore.Qt.Horizontal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L87_C8", "label": "setStandardButtons()", "type": "expression", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8286, 0.0095, 2, 0.9, 0.9189, 794, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setStandardButtons", "arg_names": [], "import_names": [], "rhs_call_name": "setStandardButtons", "annotation": ""}, "snippet": " self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L88_C8", "label": "setObjectName()", "type": "expression", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8381, 0.0095, 2, 0.9, 0.9324, 470, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setObjectName", "arg_names": [], "import_names": [], "rhs_call_name": "setObjectName", "annotation": ""}, "snippet": " self.buttonBox.setObjectName(_fromUtf8(\"buttonBox\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L89_C8", "label": "addWidget()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8476, 0.0095, 2, 0.9, 0.9459, 653, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "addWidget", "arg_names": [], "import_names": [], "rhs_call_name": "addWidget", "annotation": ""}, "snippet": " self.verticalLayout.addWidget(self.buttonBox)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L91_C8", "label": "retranslateUi()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8667, 0.0095, 2, 0.9, 0.9595, 520, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "retranslateUi", "arg_names": [], "import_names": [], "rhs_call_name": "retranslateUi", "annotation": ""}, "snippet": " self.retranslateUi(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L92_C8", "label": "connect()", "type": "expression", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8762, 0.0095, 2, 0.9, 0.973, 242, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8(\"accepted()\")), DialogGenerator.accept)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L93_C8", "label": "connect()", "type": "expression", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8857, 0.0095, 2, 0.9, 0.9865, 242, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "connect", "arg_names": [], "import_names": [], "rhs_call_name": "connect", "annotation": ""}, "snippet": " QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8(\"rejected()\")), DialogGenerator.reject)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L94_C8", "label": "connectSlotsByName()", "type": "expression", "loc": [94, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "vector": [8, 2, 0.8952, 0.0095, 2, 0.9, 1.0, 419, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "connectSlotsByName", "arg_names": [], "import_names": [], "rhs_call_name": "connectSlotsByName", "annotation": ""}, "snippet": " QtCore.QMetaObject.connectSlotsByName(DialogGenerator)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "label": "retranslateUi", "type": "function", "loc": [96, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:ClassDef_L17_C0", "vector": [2, 1, 0.9524, 0.0857, 1, 0.64, 1.0, 520, 0, 2, 0, 0, 0, 0, 16], "semantic": {"name": "retranslateUi", "arg_names": ["self", "DialogGenerator"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def retranslateUi(self, DialogGenerator):\n DialogGenerator.setWindowTitle(QtGui.QApplication.translate(\"DialogGenerator\", \"Dialog\", None, QtGui.QApplication.UnicodeUTF8))\n self.label.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"1 - Adding elements in the \\\"Same Family\\\", the strings will be retained only those that are found in each element.\", None, QtGui.QApplication.UnicodeUTF8))\n self.label_4.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"2 - Adding elements in the \\\"Other Malware\\\", the strings in these files will not be selected to build the rule.\", None, QtGui.QApplication.UnicodeUTF8))\n self.label_5.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"3 - In the middle part, you can see only the strings used for the detection.\", None, QtGui.QApplication.UnicodeUTF8))\n self.label_2.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"Other Malware (False positive)\", None, QtGui.QApplication.UnicodeUTF8))\n self.btnBrowseNewFile.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"...\", None, QtGui.QApplication.UnicodeUTF8))\n self.label_3.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"Same Family\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L97_C8", "label": "setWindowTitle()", "type": "expression", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9238, 0.0095, 2, 0.58, 0.0, 38, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setWindowTitle", "arg_names": [], "import_names": [], "rhs_call_name": "setWindowTitle", "annotation": ""}, "snippet": " DialogGenerator.setWindowTitle(QtGui.QApplication.translate(\"DialogGenerator\", \"Dialog\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L98_C8", "label": "setText()", "type": "expression", "loc": [98, 98], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9333, 0.0095, 2, 0.58, 0.1429, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"1 - Adding elements in the \\\"Same Family\\\", the strings will be retained only those that are found in each element.\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L99_C8", "label": "setText()", "type": "expression", "loc": [99, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9429, 0.0095, 2, 0.58, 0.2857, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label_4.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"2 - Adding elements in the \\\"Other Malware\\\", the strings in these files will not be selected to build the rule.\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L100_C8", "label": "setText()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9524, 0.0095, 2, 0.58, 0.4286, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label_5.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"3 - In the middle part, you can see only the strings used for the detection.\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L101_C8", "label": "setText()", "type": "expression", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9619, 0.0095, 2, 0.58, 0.5714, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label_2.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"Other Malware (False positive)\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L102_C8", "label": "setText()", "type": "expression", "loc": [102, 102], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9714, 0.0095, 2, 0.58, 0.7143, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.btnBrowseNewFile.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"...\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L103_C8", "label": "setText()", "type": "expression", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.981, 0.0095, 2, 0.58, 0.8571, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.label_3.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"Same Family\", None, QtGui.QApplication.UnicodeUTF8))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L104_C8", "label": "setText()", "type": "expression", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "vector": [8, 2, 0.9905, 0.0095, 2, 0.58, 1.0, 40, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setText", "arg_names": [], "import_names": [], "rhs_call_name": "setText", "annotation": ""}, "snippet": " self.btnBrowseNewFamily.setText(QtGui.QApplication.translate(\"DialogGenerator\", \"...\", None, QtGui.QApplication.UnicodeUTF8))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_296:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:Try_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Assign_L85_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:ClassDef_L17_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_296:FunctionDef_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_296:Expr_L104_C8"}]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_297
2
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_297:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.4167, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_297:Assign_L10_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.8333, 0.0833, 0, 0.66, 1.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = []"}]
[]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ __all__ = [] # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_298
2
12
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_298:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.5, 0.4167, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_298:Assign_L10_C0", "label": "__all__ =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.8333, 0.0833, 0, 0.66, 1.0, 272, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "__all__", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__all__ = []"}]
[]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Ivan Fontarensky @license: GNU General Public License 3.0 @contact: ivan.fontarensky_at_gmail.com """ import os VERSION = "0.1.5" DEBUG = 1 AUTHOR = "Ivan Fontarensky" NAME = "yara-editor" LOG_FILE = "./%s.log" % (NAME) CONF_PATH = "%s/.yara/%s" % (os.path.expanduser('~'),NAME) CONF_FILE = "conf" CONF_LANG = "lang" CONF_LANG_PATH = "%s/i18n/i18n_en.qm" % (CONF_PATH) CONF_PREFERENCE = "preference" CONF_PATH_YARA = "path_yara_rules" CONF_PATH_MALWARE = "path_malwares" ERROR_LOADING_CONTROLLEUR = 1 # # Message in log file # MSG_LAUNCH_APPLICATION = "Application start..." MSG_INFO_READ_CONFIG_FILE = "Reading Configuration" MSG_ITEM_DELETE = "Item deleted" MSG_TRY_ITEM_DELETE = "Trying to delete" MSG_COMPRESSION = "Compressed data with password 'infected'" MSG_ERROR_WRITTING_CONFIG_FILE = "Error when writing configuration file" MSG_ERROR_READING_CONFIG_FILE = "Error when reading configuration file" MSG_ERROR_STOP_APPLICATION = "Error unknow, application stop now " MSG_INFO_MALWARE_IDENTIFIED = "File identified" MSG_TRY_ITEM_ADD = "Trying to add" MSG_ITEM_ADD = "Item added " MSG_ITEM_SET = "Item setted " MSG_ORPHELIN = "Orphan detected " MSG_ERROR_RUN_MODULE_FAILED = "Error during execution of the function run" MSG_ERROR_REPORT = "Can't read report for this file" MSG_WARNING_DELETE = "Are you really really sure you want to delete that project ? y@m be careful." MSG_WARNING_DELETE_CLEAN = "Are you really really sure you want to delete that object ?" TEMPLATE_YARA=""" rule Generated_Rules { meta: author="Generated by Yara-Editor" comment="Yara Editor" strings: ###STRINGS### condition: ###CONDITION### } """ # vim:ts=4:expandtab:sw=4
ajibawa-2023/Python-Code-Large/train/row_299
33
67
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_299:Expr_L4_C0", "label": "expression", "type": "expression", "loc": [4, 8], "level": 0, "parent": null, "vector": [8, 0, 0.0896, 0.0746, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\n@author: Ivan Fontarensky\n@license: GNU General Public License 3.0\n@contact: ivan.fontarensky_at_gmail.com\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Import_L11_C0", "label": "os import os", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1642, 0.0149, 0, 0.66, 0.0312, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L13_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.194, 0.0149, 0, 0.66, 0.0625, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VERSION = \"0.1.5\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L14_C0", "label": "DEBUG =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.209, 0.0149, 0, 0.66, 0.0938, 309, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "DEBUG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEBUG = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L15_C0", "label": "AUTHOR =", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.2239, 0.0149, 0, 0.66, 0.125, 928, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "AUTHOR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "AUTHOR = \"Ivan Fontarensky\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L16_C0", "label": "NAME =", "type": "assigned_variable", "loc": [16, 16], "level": 0, "parent": null, "vector": [14, 0, 0.2388, 0.0149, 0, 0.66, 0.1562, 181, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "NAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "NAME = \"yara-editor\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L17_C0", "label": "LOG_FILE =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.2537, 0.0149, 0, 0.66, 0.1875, 260, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "LOG_FILE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LOG_FILE = \"./%s.log\" % (NAME)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L19_C0", "label": "CONF_PATH =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.2836, 0.0149, 0, 0.66, 0.2188, 48, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "CONF_PATH", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_PATH = \"%s/.yara/%s\" % (os.path.expanduser('~'),NAME)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L20_C0", "label": "CONF_FILE =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.2985, 0.0149, 0, 0.66, 0.25, 187, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CONF_FILE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_FILE = \"conf\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L21_C0", "label": "CONF_LANG =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.3134, 0.0149, 0, 0.66, 0.2812, 29, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CONF_LANG", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_LANG = \"lang\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L22_C0", "label": "CONF_LANG_PATH =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.3284, 0.0149, 0, 0.66, 0.3125, 895, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CONF_LANG_PATH", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_LANG_PATH = \"%s/i18n/i18n_en.qm\" % (CONF_PATH)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L23_C0", "label": "CONF_PREFERENCE =", "type": "assigned_variable", "loc": [23, 23], "level": 0, "parent": null, "vector": [14, 0, 0.3433, 0.0149, 0, 0.66, 0.3438, 318, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CONF_PREFERENCE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_PREFERENCE = \"preference\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L24_C0", "label": "CONF_PATH_YARA =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.3582, 0.0149, 0, 0.66, 0.375, 446, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CONF_PATH_YARA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_PATH_YARA = \"path_yara_rules\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L25_C0", "label": "CONF_PATH_MALWARE =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.3731, 0.0149, 0, 0.66, 0.4062, 6, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "CONF_PATH_MALWARE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONF_PATH_MALWARE = \"path_malwares\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L27_C0", "label": "ERROR_LOADING_CONTROLLEUR =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.403, 0.0149, 0, 0.66, 0.4375, 228, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "ERROR_LOADING_CONTROLLEUR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ERROR_LOADING_CONTROLLEUR = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L32_C0", "label": "MSG_LAUNCH_APPLICATION =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.4776, 0.0149, 0, 0.66, 0.4688, 288, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_LAUNCH_APPLICATION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_LAUNCH_APPLICATION = \"Application start...\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L33_C0", "label": "MSG_INFO_READ_CONFIG_FILE =", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.4925, 0.0149, 0, 0.66, 0.5, 202, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_INFO_READ_CONFIG_FILE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_INFO_READ_CONFIG_FILE = \"Reading Configuration\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L34_C0", "label": "MSG_ITEM_DELETE =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.5075, 0.0149, 0, 0.66, 0.5312, 584, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ITEM_DELETE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ITEM_DELETE = \"Item deleted\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L35_C0", "label": "MSG_TRY_ITEM_DELETE =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.5224, 0.0149, 0, 0.66, 0.5625, 485, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_TRY_ITEM_DELETE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_TRY_ITEM_DELETE = \"Trying to delete\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L36_C0", "label": "MSG_COMPRESSION =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.5373, 0.0149, 0, 0.66, 0.5938, 712, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_COMPRESSION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_COMPRESSION = \"Compressed data with password 'infected'\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L37_C0", "label": "MSG_ERROR_WRITTING_CONFIG_FILE =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.5522, 0.0149, 0, 0.66, 0.625, 568, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ERROR_WRITTING_CONFIG_FILE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ERROR_WRITTING_CONFIG_FILE = \"Error when writing configuration file\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L38_C0", "label": "MSG_ERROR_READING_CONFIG_FILE =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.5672, 0.0149, 0, 0.66, 0.6562, 77, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ERROR_READING_CONFIG_FILE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ERROR_READING_CONFIG_FILE = \"Error when reading configuration file\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L39_C0", "label": "MSG_ERROR_STOP_APPLICATION =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.5821, 0.0149, 0, 0.66, 0.6875, 49, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ERROR_STOP_APPLICATION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ERROR_STOP_APPLICATION = \"Error unknow, application stop now \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L40_C0", "label": "MSG_INFO_MALWARE_IDENTIFIED =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.597, 0.0149, 0, 0.66, 0.7188, 216, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_INFO_MALWARE_IDENTIFIED", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_INFO_MALWARE_IDENTIFIED = \"File identified\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L41_C0", "label": "MSG_TRY_ITEM_ADD =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.6119, 0.0149, 0, 0.66, 0.75, 808, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_TRY_ITEM_ADD", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_TRY_ITEM_ADD = \"Trying to add\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L42_C0", "label": "MSG_ITEM_ADD =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.6269, 0.0149, 0, 0.66, 0.7812, 298, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ITEM_ADD", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ITEM_ADD = \"Item added \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L43_C0", "label": "MSG_ITEM_SET =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.6418, 0.0149, 0, 0.66, 0.8125, 877, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ITEM_SET", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ITEM_SET = \"Item setted \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L44_C0", "label": "MSG_ORPHELIN =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.6567, 0.0149, 0, 0.66, 0.8438, 817, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ORPHELIN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ORPHELIN = \"Orphan detected \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L45_C0", "label": "MSG_ERROR_RUN_MODULE_FAILED =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.6716, 0.0149, 0, 0.66, 0.875, 729, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ERROR_RUN_MODULE_FAILED", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ERROR_RUN_MODULE_FAILED = \"Error during execution of the function run\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L46_C0", "label": "MSG_ERROR_REPORT =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.6866, 0.0149, 0, 0.66, 0.9062, 933, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_ERROR_REPORT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_ERROR_REPORT = \"Can't read report for this file\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L47_C0", "label": "MSG_WARNING_DELETE =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.7015, 0.0149, 0, 0.66, 0.9375, 482, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_WARNING_DELETE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_WARNING_DELETE = \"Are you really really sure you want to delete that project ? y@m be careful.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L48_C0", "label": "MSG_WARNING_DELETE_CLEAN =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.7164, 0.0149, 0, 0.66, 0.9688, 176, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MSG_WARNING_DELETE_CLEAN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MSG_WARNING_DELETE_CLEAN = \"Are you really really sure you want to delete that object ?\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_299:Assign_L50_C0", "label": "TEMPLATE_YARA =", "type": "assigned_variable", "loc": [50, 64], "level": 0, "parent": null, "vector": [14, 0, 0.8507, 0.2239, 0, 0.66, 1.0, 347, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TEMPLATE_YARA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TEMPLATE_YARA=\"\"\"\nrule Generated_Rules\n{\n meta:\n author=\"Generated by Yara-Editor\"\n comment=\"Yara Editor\"\n \n strings:"}]
[]
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
ajibawa-2023/Python-Code-Large/train/row_300
10
11
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_300:Import_L2_C0", "label": "time import time", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1818, 0.0909, 0, 0.66, 0.0, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Assign_L3_C0", "label": "t = time()", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.2727, 0.0909, 0, 0.66, 0.1111, 15, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": "t = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Assign_L4_C0", "label": "u = gmtime()", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.3636, 0.0909, 0, 0.66, 0.2222, 609, 3, 1, 0, 0, 68, 10, 1], "semantic": {"name": "u", "arg_names": [], "import_names": [], "rhs_call_name": "gmtime", "annotation": ""}, "snippet": "u = time.gmtime(t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Assign_L5_C0", "label": "s = strftime()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.4545, 0.0909, 0, 0.66, 0.3333, 553, 3, 2, 0, 0, 668, 10, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "strftime", "annotation": ""}, "snippet": "s = time.strftime('%a, %e %b %Y %T GMT', u)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L6_C0", "label": "print()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.5455, 0.0909, 0, 0.66, 0.4444, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('Content-Type: text/javascript')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L7_C0", "label": "print()", "type": "expression", "loc": [7, 7], "level": 0, "parent": null, "vector": [8, 0, 0.6364, 0.0909, 0, 0.66, 0.5556, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('Cache-Control: no-cache')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L8_C0", "label": "print()", "type": "expression", "loc": [8, 8], "level": 0, "parent": null, "vector": [8, 0, 0.7273, 0.0909, 0, 0.66, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('Date: ' + s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L9_C0", "label": "print()", "type": "expression", "loc": [9, 9], "level": 0, "parent": null, "vector": [8, 0, 0.8182, 0.0909, 0, 0.66, 0.7778, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('Expires: ' + s)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L10_C0", "label": "print()", "type": "expression", "loc": [10, 10], "level": 0, "parent": null, "vector": [8, 0, 0.9091, 0.0909, 0, 0.66, 0.8889, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_300:Expr_L11_C0", "label": "print()", "type": "expression", "loc": [11, 11], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0909, 0, 0.66, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": "print('var timeskew = new Date().getTime() - ' + str(t*1000) + ';')"}]
[]
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india # Initial VCS. v = vcs.init() # Now get the line 'continents' object. lc = v.getline('continents') # Change line attribute values lc.color=30#light blue #244 # light blue #250 dark blue lc.width=1 #lc.list() cf_asd = v.getboxfill( 'ASD' ) cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region #cf_asd.datawc(0,0,80,80) cf_asd.level_1=1e20 # change to default minimum level cf_asd.level_2=1e20 # change to default maximum level cf_asd.color_1=240 # change 1st color index value cf_asd.color_2=240 # change 2nd color index value cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'} # our own template # Assign the variable "t_asd" to the persistent 'ASD' template. t_asd = v.gettemplate( 'ASD' ) t_asd.data.priority = 1 t_asd.legend.priority = 0 t_asd.max.priority = 0 t_asd.min.priority = 0 t_asd.mean.priority = 0 #t_asd.source.priority = 1 t_asd.title.priority = 0 t_asd.units.priority = 0 t_asd.crdate.priority = 0 t_asd.crtime.priority = 0 t_asd.dataname.priority = 0 t_asd.zunits.priority = 0 t_asd.tunits.priority = 0 t_asd.xname.priority = 0 t_asd.yname.priority = 0 t_asd.xvalue.priority = 0 t_asd.yvalue.priority = 0 t_asd.tvalue.priority = 0 t_asd.zvalue.priority = 0 t_asd.box1.priority = 0 t_asd.xlabel2.priority = 1 t_asd.xtic2.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel2.priority = 0 t_asd.ytic2.priority = 0 # set the top x-axis (secind y axis) to be blank t_asd.xlabel1.priority = 0 t_asd.xtic1.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel1.priority = 1 #t_asd.ymintic1.priority = 1 t_asd.ytic1.priority = 0 t_asd.scalefont(0.1) # lat and long text font size #t_asd.ylabel1.list() v.plot( data, t_asd ,cf_asd,bg=0) v.update() arr=[] t=[] c=[] s=[] for i in range(0,31): arr.append(0) t.append(0) c.append(0) s.append(0) # plotting marker m=v.createmarker() mytmpl=v.createtemplate() m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing m.worldcoordinate=[60.,100.,0,40] #use m.viewport and m.wordcoordinate to define you're area t[0]=None t[1]=113 c[0]=None c[1]=85 s[0]=5 s[1]=5 s[2]=5 s[3]=5 s[4]=8 s[5]=5 s[6]=5 s[7]=5 s[8]=10 s[9]=12 s[10]=15 s[11]=15 s[12]=15 s[13]=25 s[14]=10 s[15]=10 s[16]=10 s[17]=8 s[18]=15 s[19]=15 s[20]=10 s[21]=5 s[22]=5 s[23]=5 s[24]=5 s[25]=5 s[26]=5 s[27]=5 s[28]=5 s[29]=10 s[30]=8 m.type=[130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159] m.color=[241,] size=[] for i in range(0,31): size.append(s[i]) m.size=size m.x=[[64],[66],[68],[70],[73],[76],[78],[81],[83],[86],[89],[92],[95],[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],] m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[15],[10],[10],[10],[10],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],] v.update() v.plot(m,bg=0) #v.svg("/home/arulalan/marker1",width=30,height=30,units="cm") raw_input()
ajibawa-2023/Python-Code-Large/train/row_302
106
151
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_302:Import_L1_C0", "label": "vcs import vcs, cdms2, cdutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0066, 0.0066, 0, 0.66, 0.0, 11, 0, 3, 0, 0, 11, 0, 0], "semantic": {"name": "vcs", "arg_names": [], "import_names": ["vcs", "cdms2", "cdutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import vcs, cdms2, cdutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Import_L2_C0", "label": "time import time, os, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0066, 0, 0.66, 0.01, 654, 0, 3, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time,os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L5_C0", "label": "filepath = join()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0331, 0.0066, 0, 0.66, 0.02, 137, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L6_C0", "label": "cdmsfile = open()", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0397, 0.0066, 0, 0.66, 0.03, 132, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "cdmsfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "cdmsfile = cdms2.open( filepath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L10_C0", "label": "data = cdmsfile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0662, 0.0066, 0, 0.66, 0.04, 929, 3, 3, 0, 0, 132, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "cdmsfile", "annotation": ""}, "snippet": "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L13_C0", "label": "v = init()", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.0861, 0.0066, 0, 0.66, 0.05, 553, 3, 0, 0, 0, 319, 10, 1], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "v = vcs.init()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L17_C0", "label": "lc = getline()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1126, 0.0066, 0, 0.66, 0.06, 255, 3, 1, 0, 0, 299, 10, 1], "semantic": {"name": "lc", "arg_names": [], "import_names": [], "rhs_call_name": "getline", "annotation": ""}, "snippet": "lc = v.getline('continents')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L19_C0", "label": "lc.color =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1258, 0.0066, 0, 0.66, 0.07, 593, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.color=30#light blue #244 # light blue #250 dark blue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L20_C0", "label": "lc.width =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.1325, 0.0066, 0, 0.66, 0.08, 241, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.width=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L22_C0", "label": "cf_asd = getboxfill()", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.1457, 0.0066, 0, 0.66, 0.09, 189, 3, 1, 0, 0, 845, 10, 1], "semantic": {"name": "cf_asd", "arg_names": [], "import_names": [], "rhs_call_name": "getboxfill", "annotation": ""}, "snippet": "cf_asd = v.getboxfill( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L23_C0", "label": "datawc()", "type": "expression", "loc": [23, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1523, 0.0066, 0, 0.66, 0.1, 868, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "datawc", "arg_names": [], "import_names": [], "rhs_call_name": "datawc", "annotation": ""}, "snippet": "cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L25_C0", "label": "cf_asd.level_1 =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.1656, 0.0066, 0, 0.66, 0.11, 605, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_1=1e20 # change to default minimum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L26_C0", "label": "cf_asd.level_2 =", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.1722, 0.0066, 0, 0.66, 0.12, 892, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_2=1e20 # change to default maximum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L27_C0", "label": "cf_asd.color_1 =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.1788, 0.0066, 0, 0.66, 0.13, 697, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_1=240 # change 1st color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L28_C0", "label": "cf_asd.color_2 =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.1854, 0.0066, 0, 0.66, 0.14, 977, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_2=240 # change 2nd color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L29_C0", "label": "cf_asd.yticlabels1 =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.1921, 0.0066, 0, 0.66, 0.15, 370, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cf_asd.yticlabels1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L33_C0", "label": "t_asd = gettemplate()", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.2185, 0.0066, 0, 0.66, 0.16, 241, 3, 1, 0, 0, 871, 10, 1], "semantic": {"name": "t_asd", "arg_names": [], "import_names": [], "rhs_call_name": "gettemplate", "annotation": ""}, "snippet": "t_asd = v.gettemplate( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L36_C0", "label": "t_asd.data.priority =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2384, 0.0066, 0, 0.66, 0.17, 717, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.data.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.data.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L37_C0", "label": "t_asd.legend.priority =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.245, 0.0066, 0, 0.66, 0.18, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.legend.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.legend.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L39_C0", "label": "t_asd.max.priority =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.2583, 0.0066, 0, 0.66, 0.19, 386, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.max.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.max.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L40_C0", "label": "t_asd.min.priority =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.2649, 0.0066, 0, 0.66, 0.2, 559, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.min.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.min.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L41_C0", "label": "t_asd.mean.priority =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.2715, 0.0066, 0, 0.66, 0.21, 913, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.mean.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.mean.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L43_C0", "label": "t_asd.title.priority =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.2848, 0.0066, 0, 0.66, 0.22, 733, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.title.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.title.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L44_C0", "label": "t_asd.units.priority =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.2914, 0.0066, 0, 0.66, 0.23, 345, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.units.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.units.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L45_C0", "label": "t_asd.crdate.priority =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.298, 0.0066, 0, 0.66, 0.24, 562, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crdate.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crdate.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L46_C0", "label": "t_asd.crtime.priority =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.3046, 0.0066, 0, 0.66, 0.25, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crtime.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crtime.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L47_C0", "label": "t_asd.dataname.priority =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.3113, 0.0066, 0, 0.66, 0.26, 983, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.dataname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.dataname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L48_C0", "label": "t_asd.zunits.priority =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.3179, 0.0066, 0, 0.66, 0.27, 273, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L49_C0", "label": "t_asd.tunits.priority =", "type": "assigned_variable", "loc": [49, 49], "level": 0, "parent": null, "vector": [14, 0, 0.3245, 0.0066, 0, 0.66, 0.28, 671, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L50_C0", "label": "t_asd.xname.priority =", "type": "assigned_variable", "loc": [50, 50], "level": 0, "parent": null, "vector": [14, 0, 0.3311, 0.0066, 0, 0.66, 0.29, 841, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L51_C0", "label": "t_asd.yname.priority =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.3377, 0.0066, 0, 0.66, 0.3, 773, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L53_C0", "label": "t_asd.xvalue.priority =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.351, 0.0066, 0, 0.66, 0.31, 219, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L54_C0", "label": "t_asd.yvalue.priority =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.3576, 0.0066, 0, 0.66, 0.32, 569, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L55_C0", "label": "t_asd.tvalue.priority =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.3642, 0.0066, 0, 0.66, 0.33, 215, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L56_C0", "label": "t_asd.zvalue.priority =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.3709, 0.0066, 0, 0.66, 0.34, 73, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L57_C0", "label": "t_asd.box1.priority =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.3775, 0.0066, 0, 0.66, 0.35, 891, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.box1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.box1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L59_C0", "label": "t_asd.xlabel2.priority =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.3907, 0.0066, 0, 0.66, 0.36, 115, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel2.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L60_C0", "label": "t_asd.xtic2.priority =", "type": "assigned_variable", "loc": [60, 60], "level": 0, "parent": null, "vector": [14, 0, 0.3974, 0.0066, 0, 0.66, 0.37, 203, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L62_C0", "label": "t_asd.ylabel2.priority =", "type": "assigned_variable", "loc": [62, 62], "level": 0, "parent": null, "vector": [14, 0, 0.4106, 0.0066, 0, 0.66, 0.38, 145, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L63_C0", "label": "t_asd.ytic2.priority =", "type": "assigned_variable", "loc": [63, 63], "level": 0, "parent": null, "vector": [14, 0, 0.4172, 0.0066, 0, 0.66, 0.39, 255, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L65_C0", "label": "t_asd.xlabel1.priority =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.4305, 0.0066, 0, 0.66, 0.4, 921, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L66_C0", "label": "t_asd.xtic1.priority =", "type": "assigned_variable", "loc": [66, 66], "level": 0, "parent": null, "vector": [14, 0, 0.4371, 0.0066, 0, 0.66, 0.41, 577, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L68_C0", "label": "t_asd.ylabel1.priority =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.4503, 0.0066, 0, 0.66, 0.42, 966, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel1.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L70_C0", "label": "t_asd.ytic1.priority =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.4636, 0.0066, 0, 0.66, 0.43, 330, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L72_C0", "label": "scalefont()", "type": "expression", "loc": [72, 72], "level": 0, "parent": null, "vector": [8, 0, 0.4768, 0.0066, 0, 0.66, 0.44, 322, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "scalefont", "arg_names": [], "import_names": [], "rhs_call_name": "scalefont", "annotation": ""}, "snippet": "t_asd.scalefont(0.1) # lat and long text font size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L76_C0", "label": "plot()", "type": "expression", "loc": [76, 76], "level": 0, "parent": null, "vector": [8, 0, 0.5033, 0.0066, 0, 0.66, 0.45, 929, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot( data, t_asd ,cf_asd,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L78_C0", "label": "update()", "type": "expression", "loc": [78, 78], "level": 0, "parent": null, "vector": [8, 0, 0.5166, 0.0066, 0, 0.66, 0.46, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L81_C0", "label": "arr =", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.5364, 0.0066, 0, 0.66, 0.47, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "arr=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L82_C0", "label": "t =", "type": "assigned_variable", "loc": [82, 82], "level": 0, "parent": null, "vector": [14, 0, 0.543, 0.0066, 0, 0.66, 0.48, 15, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L83_C0", "label": "c =", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.5497, 0.0066, 0, 0.66, 0.49, 411, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L84_C0", "label": "s =", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.5563, 0.0066, 0, 0.66, 0.5, 553, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "label": "for i", "type": "for", "loc": [85, 89], "level": 0, "parent": null, "vector": [6, 0, 0.5762, 0.0331, 0, 0.66, 0.51, 826, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tarr.append(0)\n\tt.append(0)\n\tc.append(0)\n\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L86_C1", "label": "append()", "type": "expression", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "vector": [8, 1, 0.5695, 0.0066, 1, 0.82, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tarr.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L87_C1", "label": "append()", "type": "expression", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "vector": [8, 1, 0.5762, 0.0066, 1, 0.82, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tt.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L88_C1", "label": "append()", "type": "expression", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "vector": [8, 1, 0.5828, 0.0066, 1, 0.82, 0.6667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tc.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L89_C1", "label": "append()", "type": "expression", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "vector": [8, 1, 0.5894, 0.0066, 1, 0.82, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L91_C0", "label": "m = createmarker()", "type": "assigned_variable", "loc": [91, 91], "level": 0, "parent": null, "vector": [14, 0, 0.6026, 0.0066, 0, 0.66, 0.52, 711, 3, 0, 0, 0, 895, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "createmarker", "annotation": ""}, "snippet": "m=v.createmarker()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L92_C0", "label": "mytmpl = createtemplate()", "type": "assigned_variable", "loc": [92, 92], "level": 0, "parent": null, "vector": [14, 0, 0.6093, 0.0066, 0, 0.66, 0.53, 792, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "mytmpl", "arg_names": [], "import_names": [], "rhs_call_name": "createtemplate", "annotation": ""}, "snippet": "mytmpl=v.createtemplate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L93_C0", "label": "m.viewport =", "type": "assigned_variable", "loc": [93, 93], "level": 0, "parent": null, "vector": [14, 0, 0.6159, 0.0066, 0, 0.66, 0.54, 979, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.viewport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L94_C0", "label": "m.worldcoordinate =", "type": "assigned_variable", "loc": [94, 94], "level": 0, "parent": null, "vector": [14, 0, 0.6225, 0.0066, 0, 0.66, 0.55, 427, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.worldcoordinate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.worldcoordinate=[60.,100.,0,40]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L96_C0", "label": "assign", "type": "assigned_variable", "loc": [96, 96], "level": 0, "parent": null, "vector": [14, 0, 0.6358, 0.0066, 0, 0.66, 0.56, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L97_C0", "label": "assign", "type": "assigned_variable", "loc": [97, 97], "level": 0, "parent": null, "vector": [14, 0, 0.6424, 0.0066, 0, 0.66, 0.57, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[1]=113"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L98_C0", "label": "assign", "type": "assigned_variable", "loc": [98, 98], "level": 0, "parent": null, "vector": [14, 0, 0.649, 0.0066, 0, 0.66, 0.58, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L99_C0", "label": "assign", "type": "assigned_variable", "loc": [99, 99], "level": 0, "parent": null, "vector": [14, 0, 0.6556, 0.0066, 0, 0.66, 0.59, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[1]=85"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L103_C0", "label": "assign", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.6821, 0.0066, 0, 0.66, 0.6, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[0]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L104_C0", "label": "assign", "type": "assigned_variable", "loc": [104, 104], "level": 0, "parent": null, "vector": [14, 0, 0.6887, 0.0066, 0, 0.66, 0.61, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[1]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L105_C0", "label": "assign", "type": "assigned_variable", "loc": [105, 105], "level": 0, "parent": null, "vector": [14, 0, 0.6954, 0.0066, 0, 0.66, 0.62, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[2]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L106_C0", "label": "assign", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.702, 0.0066, 0, 0.66, 0.63, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[3]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L107_C0", "label": "assign", "type": "assigned_variable", "loc": [107, 107], "level": 0, "parent": null, "vector": [14, 0, 0.7086, 0.0066, 0, 0.66, 0.64, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[4]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L108_C0", "label": "assign", "type": "assigned_variable", "loc": [108, 108], "level": 0, "parent": null, "vector": [14, 0, 0.7152, 0.0066, 0, 0.66, 0.65, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[5]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L109_C0", "label": "assign", "type": "assigned_variable", "loc": [109, 109], "level": 0, "parent": null, "vector": [14, 0, 0.7219, 0.0066, 0, 0.66, 0.66, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[6]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L110_C0", "label": "assign", "type": "assigned_variable", "loc": [110, 110], "level": 0, "parent": null, "vector": [14, 0, 0.7285, 0.0066, 0, 0.66, 0.67, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[7]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L111_C0", "label": "assign", "type": "assigned_variable", "loc": [111, 111], "level": 0, "parent": null, "vector": [14, 0, 0.7351, 0.0066, 0, 0.66, 0.68, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[8]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L112_C0", "label": "assign", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.7417, 0.0066, 0, 0.66, 0.69, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[9]=12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L113_C0", "label": "assign", "type": "assigned_variable", "loc": [113, 113], "level": 0, "parent": null, "vector": [14, 0, 0.7483, 0.0066, 0, 0.66, 0.7, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[10]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L114_C0", "label": "assign", "type": "assigned_variable", "loc": [114, 114], "level": 0, "parent": null, "vector": [14, 0, 0.755, 0.0066, 0, 0.66, 0.71, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[11]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L115_C0", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 0, "parent": null, "vector": [14, 0, 0.7616, 0.0066, 0, 0.66, 0.72, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[12]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L116_C0", "label": "assign", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.7682, 0.0066, 0, 0.66, 0.73, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[13]=25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L117_C0", "label": "assign", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.7748, 0.0066, 0, 0.66, 0.74, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[14]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L118_C0", "label": "assign", "type": "assigned_variable", "loc": [118, 118], "level": 0, "parent": null, "vector": [14, 0, 0.7815, 0.0066, 0, 0.66, 0.75, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[15]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L119_C0", "label": "assign", "type": "assigned_variable", "loc": [119, 119], "level": 0, "parent": null, "vector": [14, 0, 0.7881, 0.0066, 0, 0.66, 0.76, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[16]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L120_C0", "label": "assign", "type": "assigned_variable", "loc": [120, 120], "level": 0, "parent": null, "vector": [14, 0, 0.7947, 0.0066, 0, 0.66, 0.77, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[17]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L121_C0", "label": "assign", "type": "assigned_variable", "loc": [121, 121], "level": 0, "parent": null, "vector": [14, 0, 0.8013, 0.0066, 0, 0.66, 0.78, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[18]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L122_C0", "label": "assign", "type": "assigned_variable", "loc": [122, 122], "level": 0, "parent": null, "vector": [14, 0, 0.8079, 0.0066, 0, 0.66, 0.79, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[19]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L123_C0", "label": "assign", "type": "assigned_variable", "loc": [123, 123], "level": 0, "parent": null, "vector": [14, 0, 0.8146, 0.0066, 0, 0.66, 0.8, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[20]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L124_C0", "label": "assign", "type": "assigned_variable", "loc": [124, 124], "level": 0, "parent": null, "vector": [14, 0, 0.8212, 0.0066, 0, 0.66, 0.81, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[21]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L125_C0", "label": "assign", "type": "assigned_variable", "loc": [125, 125], "level": 0, "parent": null, "vector": [14, 0, 0.8278, 0.0066, 0, 0.66, 0.82, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[22]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L126_C0", "label": "assign", "type": "assigned_variable", "loc": [126, 126], "level": 0, "parent": null, "vector": [14, 0, 0.8344, 0.0066, 0, 0.66, 0.83, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[23]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L127_C0", "label": "assign", "type": "assigned_variable", "loc": [127, 127], "level": 0, "parent": null, "vector": [14, 0, 0.8411, 0.0066, 0, 0.66, 0.84, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[24]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L128_C0", "label": "assign", "type": "assigned_variable", "loc": [128, 128], "level": 0, "parent": null, "vector": [14, 0, 0.8477, 0.0066, 0, 0.66, 0.85, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[25]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L129_C0", "label": "assign", "type": "assigned_variable", "loc": [129, 129], "level": 0, "parent": null, "vector": [14, 0, 0.8543, 0.0066, 0, 0.66, 0.86, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[26]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L130_C0", "label": "assign", "type": "assigned_variable", "loc": [130, 130], "level": 0, "parent": null, "vector": [14, 0, 0.8609, 0.0066, 0, 0.66, 0.87, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[27]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L131_C0", "label": "assign", "type": "assigned_variable", "loc": [131, 131], "level": 0, "parent": null, "vector": [14, 0, 0.8675, 0.0066, 0, 0.66, 0.88, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[28]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L132_C0", "label": "assign", "type": "assigned_variable", "loc": [132, 132], "level": 0, "parent": null, "vector": [14, 0, 0.8742, 0.0066, 0, 0.66, 0.89, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[29]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L133_C0", "label": "assign", "type": "assigned_variable", "loc": [133, 133], "level": 0, "parent": null, "vector": [14, 0, 0.8808, 0.0066, 0, 0.66, 0.9, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[30]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L137_C0", "label": "m.type =", "type": "assigned_variable", "loc": [137, 137], "level": 0, "parent": null, "vector": [14, 0, 0.9073, 0.0066, 0, 0.66, 0.91, 148, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.type=[130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159]\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L138_C0", "label": "m.color =", "type": "assigned_variable", "loc": [138, 138], "level": 0, "parent": null, "vector": [14, 0, 0.9139, 0.0066, 0, 0.66, 0.92, 882, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.color=[241,]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L139_C0", "label": "size =", "type": "assigned_variable", "loc": [139, 139], "level": 0, "parent": null, "vector": [14, 0, 0.9205, 0.0066, 0, 0.66, 0.93, 714, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "size=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:For_L140_C0", "label": "for i", "type": "for", "loc": [140, 141], "level": 0, "parent": null, "vector": [6, 0, 0.9305, 0.0132, 0, 0.66, 0.94, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L141_C1", "label": "append()", "type": "expression", "loc": [141, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_302:For_L140_C0", "vector": [8, 1, 0.9338, 0.0066, 1, 0.25, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L143_C0", "label": "m.size =", "type": "assigned_variable", "loc": [143, 143], "level": 0, "parent": null, "vector": [14, 0, 0.947, 0.0066, 0, 0.66, 0.95, 820, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m.size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.size=size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L145_C0", "label": "m.x =", "type": "assigned_variable", "loc": [145, 145], "level": 0, "parent": null, "vector": [14, 0, 0.9603, 0.0066, 0, 0.66, 0.96, 46, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.x=[[64],[66],[68],[70],[73],[76],[78],[81],[83],[86],[89],[92],[95],[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Assign_L146_C0", "label": "m.y =", "type": "assigned_variable", "loc": [146, 146], "level": 0, "parent": null, "vector": [14, 0, 0.9669, 0.0066, 0, 0.66, 0.97, 640, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[15],[10],[10],[10],[10],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L147_C0", "label": "update()", "type": "expression", "loc": [147, 147], "level": 0, "parent": null, "vector": [8, 0, 0.9735, 0.0066, 0, 0.66, 0.98, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L148_C0", "label": "plot()", "type": "expression", "loc": [148, 148], "level": 0, "parent": null, "vector": [8, 0, 0.9801, 0.0066, 0, 0.66, 0.99, 929, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot(m,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L151_C0", "label": "raw_input()", "type": "expression", "loc": [151, 151], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0066, 0, 0.66, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "raw_input()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L86_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L87_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L88_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_302:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_302:For_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_302:Expr_L141_C1"}]
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india # Initial VCS. v = vcs.init() # Now get the line 'continents' object. lc = v.getline('continents') # Change line attribute values lc.color=30#light blue #244 # light blue #250 dark blue lc.width=1 #lc.list() cf_asd = v.getboxfill( 'ASD' ) cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region #cf_asd.datawc(0,0,80,80) cf_asd.level_1=1e20 # change to default minimum level cf_asd.level_2=1e20 # change to default maximum level cf_asd.color_1=240 # change 1st color index value cf_asd.color_2=240 # change 2nd color index value cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'} # our own template # Assign the variable "t_asd" to the persistent 'ASD' template. t_asd = v.gettemplate( 'ASD' ) t_asd.data.priority = 1 t_asd.legend.priority = 0 t_asd.max.priority = 0 t_asd.min.priority = 0 t_asd.mean.priority = 0 #t_asd.source.priority = 1 t_asd.title.priority = 0 t_asd.units.priority = 0 t_asd.crdate.priority = 0 t_asd.crtime.priority = 0 t_asd.dataname.priority = 0 t_asd.zunits.priority = 0 t_asd.tunits.priority = 0 t_asd.xname.priority = 0 t_asd.yname.priority = 0 t_asd.xvalue.priority = 0 t_asd.yvalue.priority = 0 t_asd.tvalue.priority = 0 t_asd.zvalue.priority = 0 t_asd.box1.priority = 0 t_asd.xlabel2.priority = 1 t_asd.xtic2.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel2.priority = 0 t_asd.ytic2.priority = 0 # set the top x-axis (secind y axis) to be blank t_asd.xlabel1.priority = 0 t_asd.xtic1.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel1.priority = 1 #t_asd.ymintic1.priority = 1 t_asd.ytic1.priority = 0 t_asd.scalefont(0.1) # lat and long text font size #t_asd.ylabel1.list() v.plot( data, t_asd ,cf_asd,bg=0) v.update() arr=[] t=[] c=[] s=[] for i in range(0,31): arr.append(0) t.append(0) c.append(0) s.append(0) # plotting marker m=v.createmarker() mytmpl=v.createtemplate() m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing m.worldcoordinate=[60.,100.,0,40] #use m.viewport and m.wordcoordinate to define you're area t[0]=None t[1]=113 c[0]=None c[1]=85 s[0]=10 s[1]=10 s[2]=10 s[3]=10 s[4]=25 s[5]=35 s[6]=10 s[7]=8 s[8]=10 s[9]=12 s[10]=15 s[11]=15 s[12]=15 s[13]=25 s[14]=10 s[15]=10 s[16]=10 s[17]=8 s[18]=10 s[19]=5 s[20]=15 s[21]=5 s[22]=5 s[23]=5 s[24]=5 s[25]=5 s[26]=5 s[27]=5 s[28]=5 s[29]=20 s[30]=5 m.type=[100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129] m.color=[242,] size=[] for i in range(0,31): size.append(s[i]) m.size=size m.x=[[64],[66],[68],[70],[72],[75],[77],[81],[83],[86],[89],[92],[95],[98],[62],[66],[68],[72],[73],[75],[78],[82],[83],[86],[89],[92],[95],[97],[74],[79],] m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[10],[10],[10],[10],[10],[8],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],] v.update() v.plot(m,bg=0) v.svg("/home/arulalan/marker",width=30,height=30,units="cm") raw_input()
ajibawa-2023/Python-Code-Large/train/row_303
107
151
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_303:Import_L1_C0", "label": "vcs import vcs, cdms2, cdutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0066, 0.0066, 0, 0.66, 0.0, 11, 0, 3, 0, 0, 11, 0, 0], "semantic": {"name": "vcs", "arg_names": [], "import_names": ["vcs", "cdms2", "cdutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import vcs, cdms2, cdutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Import_L2_C0", "label": "time import time, os, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0132, 0.0066, 0, 0.66, 0.0099, 654, 0, 3, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time,os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L5_C0", "label": "filepath = join()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0331, 0.0066, 0, 0.66, 0.0198, 137, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L6_C0", "label": "cdmsfile = open()", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0397, 0.0066, 0, 0.66, 0.0297, 132, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "cdmsfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "cdmsfile = cdms2.open( filepath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L10_C0", "label": "data = cdmsfile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0662, 0.0066, 0, 0.66, 0.0396, 929, 3, 3, 0, 0, 132, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "cdmsfile", "annotation": ""}, "snippet": "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L13_C0", "label": "v = init()", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.0861, 0.0066, 0, 0.66, 0.0495, 553, 3, 0, 0, 0, 319, 10, 1], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "v = vcs.init()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L17_C0", "label": "lc = getline()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1126, 0.0066, 0, 0.66, 0.0594, 255, 3, 1, 0, 0, 299, 10, 1], "semantic": {"name": "lc", "arg_names": [], "import_names": [], "rhs_call_name": "getline", "annotation": ""}, "snippet": "lc = v.getline('continents')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L19_C0", "label": "lc.color =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1258, 0.0066, 0, 0.66, 0.0693, 593, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.color=30#light blue #244 # light blue #250 dark blue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L20_C0", "label": "lc.width =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.1325, 0.0066, 0, 0.66, 0.0792, 241, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.width=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L22_C0", "label": "cf_asd = getboxfill()", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.1457, 0.0066, 0, 0.66, 0.0891, 189, 3, 1, 0, 0, 845, 10, 1], "semantic": {"name": "cf_asd", "arg_names": [], "import_names": [], "rhs_call_name": "getboxfill", "annotation": ""}, "snippet": "cf_asd = v.getboxfill( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L23_C0", "label": "datawc()", "type": "expression", "loc": [23, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1523, 0.0066, 0, 0.66, 0.099, 868, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "datawc", "arg_names": [], "import_names": [], "rhs_call_name": "datawc", "annotation": ""}, "snippet": "cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L25_C0", "label": "cf_asd.level_1 =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.1656, 0.0066, 0, 0.66, 0.1089, 605, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_1=1e20 # change to default minimum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L26_C0", "label": "cf_asd.level_2 =", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.1722, 0.0066, 0, 0.66, 0.1188, 892, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_2=1e20 # change to default maximum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L27_C0", "label": "cf_asd.color_1 =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.1788, 0.0066, 0, 0.66, 0.1287, 697, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_1=240 # change 1st color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L28_C0", "label": "cf_asd.color_2 =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.1854, 0.0066, 0, 0.66, 0.1386, 977, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_2=240 # change 2nd color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L29_C0", "label": "cf_asd.yticlabels1 =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.1921, 0.0066, 0, 0.66, 0.1485, 370, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cf_asd.yticlabels1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L33_C0", "label": "t_asd = gettemplate()", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.2185, 0.0066, 0, 0.66, 0.1584, 241, 3, 1, 0, 0, 871, 10, 1], "semantic": {"name": "t_asd", "arg_names": [], "import_names": [], "rhs_call_name": "gettemplate", "annotation": ""}, "snippet": "t_asd = v.gettemplate( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L36_C0", "label": "t_asd.data.priority =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2384, 0.0066, 0, 0.66, 0.1683, 717, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.data.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.data.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L37_C0", "label": "t_asd.legend.priority =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.245, 0.0066, 0, 0.66, 0.1782, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.legend.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.legend.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L39_C0", "label": "t_asd.max.priority =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.2583, 0.0066, 0, 0.66, 0.1881, 386, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.max.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.max.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L40_C0", "label": "t_asd.min.priority =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.2649, 0.0066, 0, 0.66, 0.198, 559, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.min.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.min.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L41_C0", "label": "t_asd.mean.priority =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.2715, 0.0066, 0, 0.66, 0.2079, 913, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.mean.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.mean.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L43_C0", "label": "t_asd.title.priority =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.2848, 0.0066, 0, 0.66, 0.2178, 733, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.title.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.title.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L44_C0", "label": "t_asd.units.priority =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.2914, 0.0066, 0, 0.66, 0.2277, 345, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.units.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.units.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L45_C0", "label": "t_asd.crdate.priority =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.298, 0.0066, 0, 0.66, 0.2376, 562, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crdate.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crdate.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L46_C0", "label": "t_asd.crtime.priority =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.3046, 0.0066, 0, 0.66, 0.2475, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crtime.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crtime.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L47_C0", "label": "t_asd.dataname.priority =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.3113, 0.0066, 0, 0.66, 0.2574, 983, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.dataname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.dataname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L48_C0", "label": "t_asd.zunits.priority =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.3179, 0.0066, 0, 0.66, 0.2673, 273, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L49_C0", "label": "t_asd.tunits.priority =", "type": "assigned_variable", "loc": [49, 49], "level": 0, "parent": null, "vector": [14, 0, 0.3245, 0.0066, 0, 0.66, 0.2772, 671, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L50_C0", "label": "t_asd.xname.priority =", "type": "assigned_variable", "loc": [50, 50], "level": 0, "parent": null, "vector": [14, 0, 0.3311, 0.0066, 0, 0.66, 0.2871, 841, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L51_C0", "label": "t_asd.yname.priority =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.3377, 0.0066, 0, 0.66, 0.297, 773, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L53_C0", "label": "t_asd.xvalue.priority =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.351, 0.0066, 0, 0.66, 0.3069, 219, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L54_C0", "label": "t_asd.yvalue.priority =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.3576, 0.0066, 0, 0.66, 0.3168, 569, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L55_C0", "label": "t_asd.tvalue.priority =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.3642, 0.0066, 0, 0.66, 0.3267, 215, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L56_C0", "label": "t_asd.zvalue.priority =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.3709, 0.0066, 0, 0.66, 0.3366, 73, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L57_C0", "label": "t_asd.box1.priority =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.3775, 0.0066, 0, 0.66, 0.3465, 891, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.box1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.box1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L59_C0", "label": "t_asd.xlabel2.priority =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.3907, 0.0066, 0, 0.66, 0.3564, 115, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel2.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L60_C0", "label": "t_asd.xtic2.priority =", "type": "assigned_variable", "loc": [60, 60], "level": 0, "parent": null, "vector": [14, 0, 0.3974, 0.0066, 0, 0.66, 0.3663, 203, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L62_C0", "label": "t_asd.ylabel2.priority =", "type": "assigned_variable", "loc": [62, 62], "level": 0, "parent": null, "vector": [14, 0, 0.4106, 0.0066, 0, 0.66, 0.3762, 145, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L63_C0", "label": "t_asd.ytic2.priority =", "type": "assigned_variable", "loc": [63, 63], "level": 0, "parent": null, "vector": [14, 0, 0.4172, 0.0066, 0, 0.66, 0.3861, 255, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L65_C0", "label": "t_asd.xlabel1.priority =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.4305, 0.0066, 0, 0.66, 0.396, 921, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L66_C0", "label": "t_asd.xtic1.priority =", "type": "assigned_variable", "loc": [66, 66], "level": 0, "parent": null, "vector": [14, 0, 0.4371, 0.0066, 0, 0.66, 0.4059, 577, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L68_C0", "label": "t_asd.ylabel1.priority =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.4503, 0.0066, 0, 0.66, 0.4158, 966, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel1.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L70_C0", "label": "t_asd.ytic1.priority =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.4636, 0.0066, 0, 0.66, 0.4257, 330, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L72_C0", "label": "scalefont()", "type": "expression", "loc": [72, 72], "level": 0, "parent": null, "vector": [8, 0, 0.4768, 0.0066, 0, 0.66, 0.4356, 322, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "scalefont", "arg_names": [], "import_names": [], "rhs_call_name": "scalefont", "annotation": ""}, "snippet": "t_asd.scalefont(0.1) # lat and long text font size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L76_C0", "label": "plot()", "type": "expression", "loc": [76, 76], "level": 0, "parent": null, "vector": [8, 0, 0.5033, 0.0066, 0, 0.66, 0.4455, 929, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot( data, t_asd ,cf_asd,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L78_C0", "label": "update()", "type": "expression", "loc": [78, 78], "level": 0, "parent": null, "vector": [8, 0, 0.5166, 0.0066, 0, 0.66, 0.4554, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L81_C0", "label": "arr =", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.5364, 0.0066, 0, 0.66, 0.4653, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "arr=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L82_C0", "label": "t =", "type": "assigned_variable", "loc": [82, 82], "level": 0, "parent": null, "vector": [14, 0, 0.543, 0.0066, 0, 0.66, 0.4752, 15, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L83_C0", "label": "c =", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.5497, 0.0066, 0, 0.66, 0.4851, 411, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L84_C0", "label": "s =", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.5563, 0.0066, 0, 0.66, 0.495, 553, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "label": "for i", "type": "for", "loc": [85, 89], "level": 0, "parent": null, "vector": [6, 0, 0.5762, 0.0331, 0, 0.66, 0.505, 826, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tarr.append(0)\n\tt.append(0)\n\tc.append(0)\n\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L86_C1", "label": "append()", "type": "expression", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "vector": [8, 1, 0.5695, 0.0066, 1, 0.41, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tarr.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L87_C1", "label": "append()", "type": "expression", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "vector": [8, 1, 0.5762, 0.0066, 1, 0.41, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tt.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L88_C1", "label": "append()", "type": "expression", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "vector": [8, 1, 0.5828, 0.0066, 1, 0.41, 0.6667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tc.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L89_C1", "label": "append()", "type": "expression", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "vector": [8, 1, 0.5894, 0.0066, 1, 0.41, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L91_C0", "label": "m = createmarker()", "type": "assigned_variable", "loc": [91, 91], "level": 0, "parent": null, "vector": [14, 0, 0.6026, 0.0066, 0, 0.66, 0.5149, 711, 3, 0, 0, 0, 895, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "createmarker", "annotation": ""}, "snippet": "m=v.createmarker()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L92_C0", "label": "mytmpl = createtemplate()", "type": "assigned_variable", "loc": [92, 92], "level": 0, "parent": null, "vector": [14, 0, 0.6093, 0.0066, 0, 0.66, 0.5248, 792, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "mytmpl", "arg_names": [], "import_names": [], "rhs_call_name": "createtemplate", "annotation": ""}, "snippet": "mytmpl=v.createtemplate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L93_C0", "label": "m.viewport =", "type": "assigned_variable", "loc": [93, 93], "level": 0, "parent": null, "vector": [14, 0, 0.6159, 0.0066, 0, 0.66, 0.5347, 979, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.viewport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L94_C0", "label": "m.worldcoordinate =", "type": "assigned_variable", "loc": [94, 94], "level": 0, "parent": null, "vector": [14, 0, 0.6225, 0.0066, 0, 0.66, 0.5446, 427, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.worldcoordinate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.worldcoordinate=[60.,100.,0,40]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L96_C0", "label": "assign", "type": "assigned_variable", "loc": [96, 96], "level": 0, "parent": null, "vector": [14, 0, 0.6358, 0.0066, 0, 0.66, 0.5545, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L97_C0", "label": "assign", "type": "assigned_variable", "loc": [97, 97], "level": 0, "parent": null, "vector": [14, 0, 0.6424, 0.0066, 0, 0.66, 0.5644, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[1]=113"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L98_C0", "label": "assign", "type": "assigned_variable", "loc": [98, 98], "level": 0, "parent": null, "vector": [14, 0, 0.649, 0.0066, 0, 0.66, 0.5743, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L99_C0", "label": "assign", "type": "assigned_variable", "loc": [99, 99], "level": 0, "parent": null, "vector": [14, 0, 0.6556, 0.0066, 0, 0.66, 0.5842, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[1]=85"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L103_C0", "label": "assign", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.6821, 0.0066, 0, 0.66, 0.5941, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[0]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L104_C0", "label": "assign", "type": "assigned_variable", "loc": [104, 104], "level": 0, "parent": null, "vector": [14, 0, 0.6887, 0.0066, 0, 0.66, 0.604, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[1]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L105_C0", "label": "assign", "type": "assigned_variable", "loc": [105, 105], "level": 0, "parent": null, "vector": [14, 0, 0.6954, 0.0066, 0, 0.66, 0.6139, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[2]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L106_C0", "label": "assign", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.702, 0.0066, 0, 0.66, 0.6238, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[3]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L107_C0", "label": "assign", "type": "assigned_variable", "loc": [107, 107], "level": 0, "parent": null, "vector": [14, 0, 0.7086, 0.0066, 0, 0.66, 0.6337, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[4]=25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L108_C0", "label": "assign", "type": "assigned_variable", "loc": [108, 108], "level": 0, "parent": null, "vector": [14, 0, 0.7152, 0.0066, 0, 0.66, 0.6436, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[5]=35"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L109_C0", "label": "assign", "type": "assigned_variable", "loc": [109, 109], "level": 0, "parent": null, "vector": [14, 0, 0.7219, 0.0066, 0, 0.66, 0.6535, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[6]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L110_C0", "label": "assign", "type": "assigned_variable", "loc": [110, 110], "level": 0, "parent": null, "vector": [14, 0, 0.7285, 0.0066, 0, 0.66, 0.6634, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[7]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L111_C0", "label": "assign", "type": "assigned_variable", "loc": [111, 111], "level": 0, "parent": null, "vector": [14, 0, 0.7351, 0.0066, 0, 0.66, 0.6733, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[8]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L112_C0", "label": "assign", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.7417, 0.0066, 0, 0.66, 0.6832, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[9]=12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L113_C0", "label": "assign", "type": "assigned_variable", "loc": [113, 113], "level": 0, "parent": null, "vector": [14, 0, 0.7483, 0.0066, 0, 0.66, 0.6931, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[10]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L114_C0", "label": "assign", "type": "assigned_variable", "loc": [114, 114], "level": 0, "parent": null, "vector": [14, 0, 0.755, 0.0066, 0, 0.66, 0.703, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[11]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L115_C0", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 0, "parent": null, "vector": [14, 0, 0.7616, 0.0066, 0, 0.66, 0.7129, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[12]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L116_C0", "label": "assign", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.7682, 0.0066, 0, 0.66, 0.7228, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[13]=25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L117_C0", "label": "assign", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.7748, 0.0066, 0, 0.66, 0.7327, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[14]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L118_C0", "label": "assign", "type": "assigned_variable", "loc": [118, 118], "level": 0, "parent": null, "vector": [14, 0, 0.7815, 0.0066, 0, 0.66, 0.7426, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[15]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L119_C0", "label": "assign", "type": "assigned_variable", "loc": [119, 119], "level": 0, "parent": null, "vector": [14, 0, 0.7881, 0.0066, 0, 0.66, 0.7525, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[16]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L120_C0", "label": "assign", "type": "assigned_variable", "loc": [120, 120], "level": 0, "parent": null, "vector": [14, 0, 0.7947, 0.0066, 0, 0.66, 0.7624, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[17]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L121_C0", "label": "assign", "type": "assigned_variable", "loc": [121, 121], "level": 0, "parent": null, "vector": [14, 0, 0.8013, 0.0066, 0, 0.66, 0.7723, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[18]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L122_C0", "label": "assign", "type": "assigned_variable", "loc": [122, 122], "level": 0, "parent": null, "vector": [14, 0, 0.8079, 0.0066, 0, 0.66, 0.7822, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[19]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L123_C0", "label": "assign", "type": "assigned_variable", "loc": [123, 123], "level": 0, "parent": null, "vector": [14, 0, 0.8146, 0.0066, 0, 0.66, 0.7921, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[20]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L124_C0", "label": "assign", "type": "assigned_variable", "loc": [124, 124], "level": 0, "parent": null, "vector": [14, 0, 0.8212, 0.0066, 0, 0.66, 0.802, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[21]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L125_C0", "label": "assign", "type": "assigned_variable", "loc": [125, 125], "level": 0, "parent": null, "vector": [14, 0, 0.8278, 0.0066, 0, 0.66, 0.8119, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[22]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L126_C0", "label": "assign", "type": "assigned_variable", "loc": [126, 126], "level": 0, "parent": null, "vector": [14, 0, 0.8344, 0.0066, 0, 0.66, 0.8218, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[23]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L127_C0", "label": "assign", "type": "assigned_variable", "loc": [127, 127], "level": 0, "parent": null, "vector": [14, 0, 0.8411, 0.0066, 0, 0.66, 0.8317, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[24]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L128_C0", "label": "assign", "type": "assigned_variable", "loc": [128, 128], "level": 0, "parent": null, "vector": [14, 0, 0.8477, 0.0066, 0, 0.66, 0.8416, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[25]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L129_C0", "label": "assign", "type": "assigned_variable", "loc": [129, 129], "level": 0, "parent": null, "vector": [14, 0, 0.8543, 0.0066, 0, 0.66, 0.8515, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[26]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L130_C0", "label": "assign", "type": "assigned_variable", "loc": [130, 130], "level": 0, "parent": null, "vector": [14, 0, 0.8609, 0.0066, 0, 0.66, 0.8614, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[27]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L131_C0", "label": "assign", "type": "assigned_variable", "loc": [131, 131], "level": 0, "parent": null, "vector": [14, 0, 0.8675, 0.0066, 0, 0.66, 0.8713, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[28]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L132_C0", "label": "assign", "type": "assigned_variable", "loc": [132, 132], "level": 0, "parent": null, "vector": [14, 0, 0.8742, 0.0066, 0, 0.66, 0.8812, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[29]=20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L133_C0", "label": "assign", "type": "assigned_variable", "loc": [133, 133], "level": 0, "parent": null, "vector": [14, 0, 0.8808, 0.0066, 0, 0.66, 0.8911, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[30]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L137_C0", "label": "m.type =", "type": "assigned_variable", "loc": [137, 137], "level": 0, "parent": null, "vector": [14, 0, 0.9073, 0.0066, 0, 0.66, 0.901, 148, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.type=[100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129]\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L138_C0", "label": "m.color =", "type": "assigned_variable", "loc": [138, 138], "level": 0, "parent": null, "vector": [14, 0, 0.9139, 0.0066, 0, 0.66, 0.9109, 882, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.color=[242,]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L139_C0", "label": "size =", "type": "assigned_variable", "loc": [139, 139], "level": 0, "parent": null, "vector": [14, 0, 0.9205, 0.0066, 0, 0.66, 0.9208, 714, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "size=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:For_L140_C0", "label": "for i", "type": "for", "loc": [140, 141], "level": 0, "parent": null, "vector": [6, 0, 0.9305, 0.0132, 0, 0.66, 0.9307, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L141_C1", "label": "append()", "type": "expression", "loc": [141, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_303:For_L140_C0", "vector": [8, 1, 0.9338, 0.0066, 1, 0.09, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L143_C0", "label": "m.size =", "type": "assigned_variable", "loc": [143, 143], "level": 0, "parent": null, "vector": [14, 0, 0.947, 0.0066, 0, 0.66, 0.9406, 820, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m.size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.size=size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L145_C0", "label": "m.x =", "type": "assigned_variable", "loc": [145, 145], "level": 0, "parent": null, "vector": [14, 0, 0.9603, 0.0066, 0, 0.66, 0.9505, 46, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.x=[[64],[66],[68],[70],[72],[75],[77],[81],[83],[86],[89],[92],[95],[98],[62],[66],[68],[72],[73],[75],[78],[82],[83],[86],[89],[92],[95],[97],[74],[79],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Assign_L146_C0", "label": "m.y =", "type": "assigned_variable", "loc": [146, 146], "level": 0, "parent": null, "vector": [14, 0, 0.9669, 0.0066, 0, 0.66, 0.9604, 640, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[10],[10],[10],[10],[10],[8],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L147_C0", "label": "update()", "type": "expression", "loc": [147, 147], "level": 0, "parent": null, "vector": [8, 0, 0.9735, 0.0066, 0, 0.66, 0.9703, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L148_C0", "label": "plot()", "type": "expression", "loc": [148, 148], "level": 0, "parent": null, "vector": [8, 0, 0.9801, 0.0066, 0, 0.66, 0.9802, 929, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot(m,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L150_C0", "label": "svg()", "type": "expression", "loc": [150, 150], "level": 0, "parent": null, "vector": [8, 0, 0.9934, 0.0066, 0, 0.66, 0.9901, 873, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "svg", "arg_names": [], "import_names": [], "rhs_call_name": "svg", "annotation": ""}, "snippet": "v.svg(\"/home/arulalan/marker\",width=30,height=30,units=\"cm\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L151_C0", "label": "raw_input()", "type": "expression", "loc": [151, 151], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0066, 0, 0.66, 1.0, 821, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "raw_input", "arg_names": [], "import_names": [], "rhs_call_name": "raw_input", "annotation": ""}, "snippet": "raw_input()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L86_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L87_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L88_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_303:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_303:For_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_303:Expr_L141_C1"}]
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india # Initial VCS. v = vcs.init() # Now get the line 'continents' object. lc = v.getline('continents') # Change line attribute values lc.color=30#light blue #244 # light blue #250 dark blue lc.width=1 #lc.list() cf_asd = v.getboxfill( 'ASD' ) cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region #cf_asd.datawc(0,0,80,80) cf_asd.level_1=1e20 # change to default minimum level cf_asd.level_2=1e20 # change to default maximum level cf_asd.color_1=240 # change 1st color index value cf_asd.color_2=240 # change 2nd color index value cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'} # our own template # Assign the variable "t_asd" to the persistent 'ASD' template. t_asd = v.gettemplate( 'ASD' ) t_asd.data.priority = 1 t_asd.legend.priority = 0 t_asd.max.priority = 0 t_asd.min.priority = 0 t_asd.mean.priority = 0 #t_asd.source.priority = 1 t_asd.title.priority = 0 t_asd.units.priority = 0 t_asd.crdate.priority = 0 t_asd.crtime.priority = 0 t_asd.dataname.priority = 0 t_asd.zunits.priority = 0 t_asd.tunits.priority = 0 t_asd.xname.priority = 0 t_asd.yname.priority = 0 t_asd.xvalue.priority = 0 t_asd.yvalue.priority = 0 t_asd.tvalue.priority = 0 t_asd.zvalue.priority = 0 t_asd.box1.priority = 0 t_asd.xlabel2.priority = 1 t_asd.xtic2.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel2.priority = 0 t_asd.ytic2.priority = 0 # set the top x-axis (secind y axis) to be blank t_asd.xlabel1.priority = 0 t_asd.xtic1.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel1.priority = 1 #t_asd.ymintic1.priority = 1 t_asd.ytic1.priority = 0 t_asd.scalefont(0.1) # lat and long text font size #t_asd.ylabel1.list() v.plot( data, t_asd ,cf_asd,bg=0) v.update() arr=[] t=[] c=[] s=[] for i in range(0,14): arr.append(0) t.append(0) c.append(0) s.append(0) # plotting marker m=v.createmarker() mytmpl=v.createtemplate() m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing m.worldcoordinate=[60.,100.,0,40] #use m.viewport and m.wordcoordinate to define you're area t[0]=None t[1]=113 c[0]=None c[1]=85 s[0]=10 s[1]=10 s[2]=10 s[3]=10 s[4]=10 s[5]=10 s[6]=10 s[7]=10 s[8]=10 s[9]=20 s[10]=20 s[11]=10 s[12]=20 s[13]=10 m.type=[190,191,192,193,194,195,196,197,198,199,200,201,202] m.color=[241,241,241,241,241,241,241,241,241,241,242,242,242] size=[] for i in range(0,14): size.append(s[i]) m.size=size m.x=[[64],[68],[76],[70],[77],[65],[78],[81],[88],[86],[89],[92],[95]]#,[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],] m.y=[[33],[35],[35],[15],[25],[18],[18],[35],[5],[35],[15],[35],[35]]#,[15],[10],[10],[10],[15],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],] v.update() v.plot(m,bg=0) #v.svg("/home/arulalan/marker3",width=30,height=30,units="cm") raw_input()7
ajibawa-2023/Python-Code-Large/train/row_304
88
135
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_304:Import_L1_C0", "label": "vcs import vcs, cdms2, cdutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0074, 0.0074, 0, 0.66, 0.0, 11, 0, 3, 0, 0, 11, 0, 0], "semantic": {"name": "vcs", "arg_names": [], "import_names": ["vcs", "cdms2", "cdutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import vcs, cdms2, cdutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Import_L2_C0", "label": "time import time, os, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0148, 0.0074, 0, 0.66, 0.0122, 654, 0, 3, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time,os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L5_C0", "label": "filepath = join()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.037, 0.0074, 0, 0.66, 0.0244, 137, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L6_C0", "label": "cdmsfile = open()", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0444, 0.0074, 0, 0.66, 0.0366, 132, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "cdmsfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "cdmsfile = cdms2.open( filepath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L10_C0", "label": "data = cdmsfile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0741, 0.0074, 0, 0.66, 0.0488, 929, 3, 3, 0, 0, 132, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "cdmsfile", "annotation": ""}, "snippet": "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L13_C0", "label": "v = init()", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.0963, 0.0074, 0, 0.66, 0.061, 553, 3, 0, 0, 0, 319, 10, 1], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "v = vcs.init()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L17_C0", "label": "lc = getline()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1259, 0.0074, 0, 0.66, 0.0732, 255, 3, 1, 0, 0, 299, 10, 1], "semantic": {"name": "lc", "arg_names": [], "import_names": [], "rhs_call_name": "getline", "annotation": ""}, "snippet": "lc = v.getline('continents')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L19_C0", "label": "lc.color =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1407, 0.0074, 0, 0.66, 0.0854, 593, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.color=30#light blue #244 # light blue #250 dark blue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L20_C0", "label": "lc.width =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.1481, 0.0074, 0, 0.66, 0.0976, 241, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.width=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L22_C0", "label": "cf_asd = getboxfill()", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.163, 0.0074, 0, 0.66, 0.1098, 189, 3, 1, 0, 0, 845, 10, 1], "semantic": {"name": "cf_asd", "arg_names": [], "import_names": [], "rhs_call_name": "getboxfill", "annotation": ""}, "snippet": "cf_asd = v.getboxfill( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L23_C0", "label": "datawc()", "type": "expression", "loc": [23, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1704, 0.0074, 0, 0.66, 0.122, 868, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "datawc", "arg_names": [], "import_names": [], "rhs_call_name": "datawc", "annotation": ""}, "snippet": "cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L25_C0", "label": "cf_asd.level_1 =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.1852, 0.0074, 0, 0.66, 0.1341, 605, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_1=1e20 # change to default minimum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L26_C0", "label": "cf_asd.level_2 =", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.1926, 0.0074, 0, 0.66, 0.1463, 892, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_2=1e20 # change to default maximum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L27_C0", "label": "cf_asd.color_1 =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.2, 0.0074, 0, 0.66, 0.1585, 697, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_1=240 # change 1st color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L28_C0", "label": "cf_asd.color_2 =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.2074, 0.0074, 0, 0.66, 0.1707, 977, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_2=240 # change 2nd color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L29_C0", "label": "cf_asd.yticlabels1 =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.2148, 0.0074, 0, 0.66, 0.1829, 370, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cf_asd.yticlabels1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L33_C0", "label": "t_asd = gettemplate()", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.2444, 0.0074, 0, 0.66, 0.1951, 241, 3, 1, 0, 0, 871, 10, 1], "semantic": {"name": "t_asd", "arg_names": [], "import_names": [], "rhs_call_name": "gettemplate", "annotation": ""}, "snippet": "t_asd = v.gettemplate( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L36_C0", "label": "t_asd.data.priority =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0074, 0, 0.66, 0.2073, 717, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.data.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.data.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L37_C0", "label": "t_asd.legend.priority =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.2741, 0.0074, 0, 0.66, 0.2195, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.legend.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.legend.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L39_C0", "label": "t_asd.max.priority =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.2889, 0.0074, 0, 0.66, 0.2317, 386, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.max.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.max.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L40_C0", "label": "t_asd.min.priority =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.2963, 0.0074, 0, 0.66, 0.2439, 559, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.min.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.min.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L41_C0", "label": "t_asd.mean.priority =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.3037, 0.0074, 0, 0.66, 0.2561, 913, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.mean.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.mean.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L43_C0", "label": "t_asd.title.priority =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.3185, 0.0074, 0, 0.66, 0.2683, 733, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.title.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.title.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L44_C0", "label": "t_asd.units.priority =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.3259, 0.0074, 0, 0.66, 0.2805, 345, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.units.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.units.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L45_C0", "label": "t_asd.crdate.priority =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.0074, 0, 0.66, 0.2927, 562, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crdate.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crdate.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L46_C0", "label": "t_asd.crtime.priority =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.3407, 0.0074, 0, 0.66, 0.3049, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crtime.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crtime.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L47_C0", "label": "t_asd.dataname.priority =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.3481, 0.0074, 0, 0.66, 0.3171, 983, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.dataname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.dataname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L48_C0", "label": "t_asd.zunits.priority =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.3556, 0.0074, 0, 0.66, 0.3293, 273, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L49_C0", "label": "t_asd.tunits.priority =", "type": "assigned_variable", "loc": [49, 49], "level": 0, "parent": null, "vector": [14, 0, 0.363, 0.0074, 0, 0.66, 0.3415, 671, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L50_C0", "label": "t_asd.xname.priority =", "type": "assigned_variable", "loc": [50, 50], "level": 0, "parent": null, "vector": [14, 0, 0.3704, 0.0074, 0, 0.66, 0.3537, 841, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L51_C0", "label": "t_asd.yname.priority =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.3778, 0.0074, 0, 0.66, 0.3659, 773, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L53_C0", "label": "t_asd.xvalue.priority =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.3926, 0.0074, 0, 0.66, 0.378, 219, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L54_C0", "label": "t_asd.yvalue.priority =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.4, 0.0074, 0, 0.66, 0.3902, 569, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L55_C0", "label": "t_asd.tvalue.priority =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.4074, 0.0074, 0, 0.66, 0.4024, 215, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L56_C0", "label": "t_asd.zvalue.priority =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.4148, 0.0074, 0, 0.66, 0.4146, 73, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L57_C0", "label": "t_asd.box1.priority =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.4222, 0.0074, 0, 0.66, 0.4268, 891, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.box1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.box1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L59_C0", "label": "t_asd.xlabel2.priority =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.437, 0.0074, 0, 0.66, 0.439, 115, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel2.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L60_C0", "label": "t_asd.xtic2.priority =", "type": "assigned_variable", "loc": [60, 60], "level": 0, "parent": null, "vector": [14, 0, 0.4444, 0.0074, 0, 0.66, 0.4512, 203, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L62_C0", "label": "t_asd.ylabel2.priority =", "type": "assigned_variable", "loc": [62, 62], "level": 0, "parent": null, "vector": [14, 0, 0.4593, 0.0074, 0, 0.66, 0.4634, 145, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L63_C0", "label": "t_asd.ytic2.priority =", "type": "assigned_variable", "loc": [63, 63], "level": 0, "parent": null, "vector": [14, 0, 0.4667, 0.0074, 0, 0.66, 0.4756, 255, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L65_C0", "label": "t_asd.xlabel1.priority =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.4815, 0.0074, 0, 0.66, 0.4878, 921, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L66_C0", "label": "t_asd.xtic1.priority =", "type": "assigned_variable", "loc": [66, 66], "level": 0, "parent": null, "vector": [14, 0, 0.4889, 0.0074, 0, 0.66, 0.5, 577, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L68_C0", "label": "t_asd.ylabel1.priority =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.5037, 0.0074, 0, 0.66, 0.5122, 966, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel1.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L70_C0", "label": "t_asd.ytic1.priority =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.5185, 0.0074, 0, 0.66, 0.5244, 330, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L72_C0", "label": "scalefont()", "type": "expression", "loc": [72, 72], "level": 0, "parent": null, "vector": [8, 0, 0.5333, 0.0074, 0, 0.66, 0.5366, 322, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "scalefont", "arg_names": [], "import_names": [], "rhs_call_name": "scalefont", "annotation": ""}, "snippet": "t_asd.scalefont(0.1) # lat and long text font size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L76_C0", "label": "plot()", "type": "expression", "loc": [76, 76], "level": 0, "parent": null, "vector": [8, 0, 0.563, 0.0074, 0, 0.66, 0.5488, 929, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot( data, t_asd ,cf_asd,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L78_C0", "label": "update()", "type": "expression", "loc": [78, 78], "level": 0, "parent": null, "vector": [8, 0, 0.5778, 0.0074, 0, 0.66, 0.561, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L81_C0", "label": "arr =", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.6, 0.0074, 0, 0.66, 0.5732, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "arr=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L82_C0", "label": "t =", "type": "assigned_variable", "loc": [82, 82], "level": 0, "parent": null, "vector": [14, 0, 0.6074, 0.0074, 0, 0.66, 0.5854, 15, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L83_C0", "label": "c =", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.6148, 0.0074, 0, 0.66, 0.5976, 411, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L84_C0", "label": "s =", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.6222, 0.0074, 0, 0.66, 0.6098, 553, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "label": "for i", "type": "for", "loc": [85, 89], "level": 0, "parent": null, "vector": [6, 0, 0.6444, 0.037, 0, 0.66, 0.622, 826, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,14):\n\tarr.append(0)\n\tt.append(0)\n\tc.append(0)\n\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L86_C1", "label": "append()", "type": "expression", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "vector": [8, 1, 0.637, 0.0074, 1, 0.59, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tarr.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L87_C1", "label": "append()", "type": "expression", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "vector": [8, 1, 0.6444, 0.0074, 1, 0.59, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tt.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L88_C1", "label": "append()", "type": "expression", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "vector": [8, 1, 0.6519, 0.0074, 1, 0.59, 0.6667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tc.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L89_C1", "label": "append()", "type": "expression", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "vector": [8, 1, 0.6593, 0.0074, 1, 0.59, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L91_C0", "label": "m = createmarker()", "type": "assigned_variable", "loc": [91, 91], "level": 0, "parent": null, "vector": [14, 0, 0.6741, 0.0074, 0, 0.66, 0.6341, 711, 3, 0, 0, 0, 895, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "createmarker", "annotation": ""}, "snippet": "m=v.createmarker()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L92_C0", "label": "mytmpl = createtemplate()", "type": "assigned_variable", "loc": [92, 92], "level": 0, "parent": null, "vector": [14, 0, 0.6815, 0.0074, 0, 0.66, 0.6463, 792, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "mytmpl", "arg_names": [], "import_names": [], "rhs_call_name": "createtemplate", "annotation": ""}, "snippet": "mytmpl=v.createtemplate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L93_C0", "label": "m.viewport =", "type": "assigned_variable", "loc": [93, 93], "level": 0, "parent": null, "vector": [14, 0, 0.6889, 0.0074, 0, 0.66, 0.6585, 979, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.viewport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L94_C0", "label": "m.worldcoordinate =", "type": "assigned_variable", "loc": [94, 94], "level": 0, "parent": null, "vector": [14, 0, 0.6963, 0.0074, 0, 0.66, 0.6707, 427, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.worldcoordinate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.worldcoordinate=[60.,100.,0,40]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L96_C0", "label": "assign", "type": "assigned_variable", "loc": [96, 96], "level": 0, "parent": null, "vector": [14, 0, 0.7111, 0.0074, 0, 0.66, 0.6829, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L97_C0", "label": "assign", "type": "assigned_variable", "loc": [97, 97], "level": 0, "parent": null, "vector": [14, 0, 0.7185, 0.0074, 0, 0.66, 0.6951, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[1]=113"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L98_C0", "label": "assign", "type": "assigned_variable", "loc": [98, 98], "level": 0, "parent": null, "vector": [14, 0, 0.7259, 0.0074, 0, 0.66, 0.7073, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L99_C0", "label": "assign", "type": "assigned_variable", "loc": [99, 99], "level": 0, "parent": null, "vector": [14, 0, 0.7333, 0.0074, 0, 0.66, 0.7195, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[1]=85"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L103_C0", "label": "assign", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.763, 0.0074, 0, 0.66, 0.7317, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[0]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L104_C0", "label": "assign", "type": "assigned_variable", "loc": [104, 104], "level": 0, "parent": null, "vector": [14, 0, 0.7704, 0.0074, 0, 0.66, 0.7439, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[1]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L105_C0", "label": "assign", "type": "assigned_variable", "loc": [105, 105], "level": 0, "parent": null, "vector": [14, 0, 0.7778, 0.0074, 0, 0.66, 0.7561, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[2]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L106_C0", "label": "assign", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.7852, 0.0074, 0, 0.66, 0.7683, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[3]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L107_C0", "label": "assign", "type": "assigned_variable", "loc": [107, 107], "level": 0, "parent": null, "vector": [14, 0, 0.7926, 0.0074, 0, 0.66, 0.7805, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[4]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L108_C0", "label": "assign", "type": "assigned_variable", "loc": [108, 108], "level": 0, "parent": null, "vector": [14, 0, 0.8, 0.0074, 0, 0.66, 0.7927, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[5]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L109_C0", "label": "assign", "type": "assigned_variable", "loc": [109, 109], "level": 0, "parent": null, "vector": [14, 0, 0.8074, 0.0074, 0, 0.66, 0.8049, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[6]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L110_C0", "label": "assign", "type": "assigned_variable", "loc": [110, 110], "level": 0, "parent": null, "vector": [14, 0, 0.8148, 0.0074, 0, 0.66, 0.8171, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[7]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L111_C0", "label": "assign", "type": "assigned_variable", "loc": [111, 111], "level": 0, "parent": null, "vector": [14, 0, 0.8222, 0.0074, 0, 0.66, 0.8293, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[8]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L112_C0", "label": "assign", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.8296, 0.0074, 0, 0.66, 0.8415, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[9]=20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L113_C0", "label": "assign", "type": "assigned_variable", "loc": [113, 113], "level": 0, "parent": null, "vector": [14, 0, 0.837, 0.0074, 0, 0.66, 0.8537, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[10]=20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L114_C0", "label": "assign", "type": "assigned_variable", "loc": [114, 114], "level": 0, "parent": null, "vector": [14, 0, 0.8444, 0.0074, 0, 0.66, 0.8659, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[11]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L115_C0", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 0, "parent": null, "vector": [14, 0, 0.8519, 0.0074, 0, 0.66, 0.878, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[12]=20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L116_C0", "label": "assign", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.8593, 0.0074, 0, 0.66, 0.8902, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[13]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L122_C0", "label": "m.type =", "type": "assigned_variable", "loc": [122, 122], "level": 0, "parent": null, "vector": [14, 0, 0.9037, 0.0074, 0, 0.66, 0.9024, 148, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.type=[190,191,192,193,194,195,196,197,198,199,200,201,202]\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L123_C0", "label": "m.color =", "type": "assigned_variable", "loc": [123, 123], "level": 0, "parent": null, "vector": [14, 0, 0.9111, 0.0074, 0, 0.66, 0.9146, 882, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.color=[241,241,241,241,241,241,241,241,241,241,242,242,242]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L124_C0", "label": "size =", "type": "assigned_variable", "loc": [124, 124], "level": 0, "parent": null, "vector": [14, 0, 0.9185, 0.0074, 0, 0.66, 0.9268, 714, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "size=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:For_L125_C0", "label": "for i", "type": "for", "loc": [125, 126], "level": 0, "parent": null, "vector": [6, 0, 0.9296, 0.0148, 0, 0.66, 0.939, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,14):\n\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L126_C1", "label": "append()", "type": "expression", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_304:For_L125_C0", "vector": [8, 1, 0.9333, 0.0074, 1, 0.26, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L128_C0", "label": "m.size =", "type": "assigned_variable", "loc": [128, 128], "level": 0, "parent": null, "vector": [14, 0, 0.9481, 0.0074, 0, 0.66, 0.9512, 820, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m.size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.size=size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L130_C0", "label": "m.x =", "type": "assigned_variable", "loc": [130, 130], "level": 0, "parent": null, "vector": [14, 0, 0.963, 0.0074, 0, 0.66, 0.9634, 46, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.x=[[64],[68],[76],[70],[77],[65],[78],[81],[88],[86],[89],[92],[95]]#,[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Assign_L131_C0", "label": "m.y =", "type": "assigned_variable", "loc": [131, 131], "level": 0, "parent": null, "vector": [14, 0, 0.9704, 0.0074, 0, 0.66, 0.9756, 640, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.y=[[33],[35],[35],[15],[25],[18],[18],[35],[5],[35],[15],[35],[35]]#,[15],[10],[10],[10],[15],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L132_C0", "label": "update()", "type": "expression", "loc": [132, 132], "level": 0, "parent": null, "vector": [8, 0, 0.9778, 0.0074, 0, 0.66, 0.9878, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L133_C0", "label": "plot()", "type": "expression", "loc": [133, 133], "level": 0, "parent": null, "vector": [8, 0, 0.9852, 0.0074, 0, 0.66, 1.0, 929, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot(m,bg=0)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L86_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L87_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L88_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_304:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_304:For_L125_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_304:Expr_L126_C1"}]
import vcs, cdms2, cdutil import time,os, sys # Open data file: filepath = os.path.join(sys.prefix, 'sample_data/clt.nc') cdmsfile = cdms2.open( filepath ) # Extract a 3 dimensional data set and get a subset of the time dimension #data = cdmsfile('clt', longitude=(-180, 180), latitude = (-180., 180.)) data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india # Initial VCS. v = vcs.init() # Now get the line 'continents' object. lc = v.getline('continents') # Change line attribute values lc.color=30#light blue #244 # light blue #250 dark blue lc.width=1 #lc.list() cf_asd = v.getboxfill( 'ASD' ) cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region #cf_asd.datawc(0,0,80,80) cf_asd.level_1=1e20 # change to default minimum level cf_asd.level_2=1e20 # change to default maximum level cf_asd.color_1=240 # change 1st color index value cf_asd.color_2=240 # change 2nd color index value cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'} # our own template # Assign the variable "t_asd" to the persistent 'ASD' template. t_asd = v.gettemplate( 'ASD' ) t_asd.data.priority = 1 t_asd.legend.priority = 0 t_asd.max.priority = 0 t_asd.min.priority = 0 t_asd.mean.priority = 0 #t_asd.source.priority = 1 t_asd.title.priority = 0 t_asd.units.priority = 0 t_asd.crdate.priority = 0 t_asd.crtime.priority = 0 t_asd.dataname.priority = 0 t_asd.zunits.priority = 0 t_asd.tunits.priority = 0 t_asd.xname.priority = 0 t_asd.yname.priority = 0 t_asd.xvalue.priority = 0 t_asd.yvalue.priority = 0 t_asd.tvalue.priority = 0 t_asd.zvalue.priority = 0 t_asd.box1.priority = 0 t_asd.xlabel2.priority = 1 t_asd.xtic2.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel2.priority = 0 t_asd.ytic2.priority = 0 # set the top x-axis (secind y axis) to be blank t_asd.xlabel1.priority = 0 t_asd.xtic1.priority = 0 # set the right y-axis (second y axis) to be blank (priority=0) t_asd.ylabel1.priority = 1 #t_asd.ymintic1.priority = 1 t_asd.ytic1.priority = 0 t_asd.scalefont(0.1) # lat and long text font size #t_asd.ylabel1.list() v.plot( data, t_asd ,cf_asd,bg=0) v.update() arr=[] t=[] c=[] s=[] for i in range(0,31): arr.append(0) t.append(0) c.append(0) s.append(0) # plotting marker m=v.createmarker() mytmpl=v.createtemplate() m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing m.worldcoordinate=[60.,100.,0,40] #use m.viewport and m.wordcoordinate to define you're area t[0]=None t[1]=113 c[0]=None c[1]=85 s[0]=5 s[1]=5 s[2]=5 s[3]=5 s[4]=5 s[5]=5 s[6]=5 s[7]=5 s[8]=5 s[9]=5 s[10]=5 s[11]=5 s[12]=5 s[13]=8 s[14]=5 s[15]=5 s[16]=10 s[17]=12 s[18]=15 s[19]=15 s[20]=10 s[21]=8 s[22]=8 s[23]=8 s[24]=8 s[25]=8 s[26]=8 s[27]=8 s[28]=10 s[29]=10 s[30]=10 m.type=[160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189] m.color=[242,] size=[] for i in range(0,31): size.append(s[i]) m.size=size m.x=[[64],[66],[68],[70],[72],[76],[78],[81],[83],[86],[89],[92],[95],[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],] m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[15],[10],[10],[10],[15],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],] v.update() v.plot(m,bg=0) #v.svg("/home/arulalan/marker2",width=30,height=30,units="cm") raw_input()7
ajibawa-2023/Python-Code-Large/train/row_305
105
150
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_305:Import_L1_C0", "label": "vcs import vcs, cdms2, cdutil", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0067, 0.0067, 0, 0.66, 0.0, 11, 0, 3, 0, 0, 11, 0, 0], "semantic": {"name": "vcs", "arg_names": [], "import_names": ["vcs", "cdms2", "cdutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import vcs, cdms2, cdutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Import_L2_C0", "label": "time import time, os, sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0133, 0.0067, 0, 0.66, 0.0101, 654, 0, 3, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time,os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L5_C0", "label": "filepath = join()", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0333, 0.0067, 0, 0.66, 0.0202, 137, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": "filepath = os.path.join(sys.prefix, 'sample_data/clt.nc')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L6_C0", "label": "cdmsfile = open()", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.04, 0.0067, 0, 0.66, 0.0303, 132, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "cdmsfile", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "cdmsfile = cdms2.open( filepath )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L10_C0", "label": "data = cdmsfile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0667, 0.0067, 0, 0.66, 0.0404, 929, 3, 3, 0, 0, 132, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "cdmsfile", "annotation": ""}, "snippet": "data = cdmsfile('clt', longitude=(60, 100), latitude = (0., 40.)) # for india "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L13_C0", "label": "v = init()", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.0867, 0.0067, 0, 0.66, 0.0505, 553, 3, 0, 0, 0, 319, 10, 1], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "init", "annotation": ""}, "snippet": "v = vcs.init()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L17_C0", "label": "lc = getline()", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.1133, 0.0067, 0, 0.66, 0.0606, 255, 3, 1, 0, 0, 299, 10, 1], "semantic": {"name": "lc", "arg_names": [], "import_names": [], "rhs_call_name": "getline", "annotation": ""}, "snippet": "lc = v.getline('continents')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L19_C0", "label": "lc.color =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.1267, 0.0067, 0, 0.66, 0.0707, 593, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.color=30#light blue #244 # light blue #250 dark blue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L20_C0", "label": "lc.width =", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.1333, 0.0067, 0, 0.66, 0.0808, 241, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "lc.width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "lc.width=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L22_C0", "label": "cf_asd = getboxfill()", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.1467, 0.0067, 0, 0.66, 0.0909, 189, 3, 1, 0, 0, 845, 10, 1], "semantic": {"name": "cf_asd", "arg_names": [], "import_names": [], "rhs_call_name": "getboxfill", "annotation": ""}, "snippet": "cf_asd = v.getboxfill( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L23_C0", "label": "datawc()", "type": "expression", "loc": [23, 23], "level": 0, "parent": null, "vector": [8, 0, 0.1533, 0.0067, 0, 0.66, 0.101, 868, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "datawc", "arg_names": [], "import_names": [], "rhs_call_name": "datawc", "annotation": ""}, "snippet": "cf_asd.datawc(1e20,1e20,1e20,1e20) # change to default region"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L25_C0", "label": "cf_asd.level_1 =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.1667, 0.0067, 0, 0.66, 0.1111, 605, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_1=1e20 # change to default minimum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L26_C0", "label": "cf_asd.level_2 =", "type": "assigned_variable", "loc": [26, 26], "level": 0, "parent": null, "vector": [14, 0, 0.1733, 0.0067, 0, 0.66, 0.1212, 892, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "cf_asd.level_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.level_2=1e20 # change to default maximum level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L27_C0", "label": "cf_asd.color_1 =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.18, 0.0067, 0, 0.66, 0.1313, 697, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_1=240 # change 1st color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L28_C0", "label": "cf_asd.color_2 =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.1867, 0.0067, 0, 0.66, 0.1414, 977, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "cf_asd.color_2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.color_2=240 # change 2nd color index value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L29_C0", "label": "cf_asd.yticlabels1 =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.1933, 0.0067, 0, 0.66, 0.1515, 370, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "cf_asd.yticlabels1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "cf_asd.yticlabels1={0:'0',5:'5',10:'10',15:'15',20:'20',25:'25',30:'30',35:'35',40:'40'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L33_C0", "label": "t_asd = gettemplate()", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.22, 0.0067, 0, 0.66, 0.1616, 241, 3, 1, 0, 0, 871, 10, 1], "semantic": {"name": "t_asd", "arg_names": [], "import_names": [], "rhs_call_name": "gettemplate", "annotation": ""}, "snippet": "t_asd = v.gettemplate( 'ASD' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L36_C0", "label": "t_asd.data.priority =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.24, 0.0067, 0, 0.66, 0.1717, 717, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.data.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.data.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L37_C0", "label": "t_asd.legend.priority =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.2467, 0.0067, 0, 0.66, 0.1818, 442, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.legend.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.legend.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L39_C0", "label": "t_asd.max.priority =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.26, 0.0067, 0, 0.66, 0.1919, 386, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.max.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.max.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L40_C0", "label": "t_asd.min.priority =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0067, 0, 0.66, 0.202, 559, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.min.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.min.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L41_C0", "label": "t_asd.mean.priority =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.2733, 0.0067, 0, 0.66, 0.2121, 913, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.mean.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.mean.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L43_C0", "label": "t_asd.title.priority =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.2867, 0.0067, 0, 0.66, 0.2222, 733, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.title.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.title.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L44_C0", "label": "t_asd.units.priority =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.2933, 0.0067, 0, 0.66, 0.2323, 345, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.units.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.units.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L45_C0", "label": "t_asd.crdate.priority =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.3, 0.0067, 0, 0.66, 0.2424, 562, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crdate.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crdate.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L46_C0", "label": "t_asd.crtime.priority =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.3067, 0.0067, 0, 0.66, 0.2525, 292, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.crtime.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.crtime.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L47_C0", "label": "t_asd.dataname.priority =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.3133, 0.0067, 0, 0.66, 0.2626, 983, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.dataname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.dataname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L48_C0", "label": "t_asd.zunits.priority =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.32, 0.0067, 0, 0.66, 0.2727, 273, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L49_C0", "label": "t_asd.tunits.priority =", "type": "assigned_variable", "loc": [49, 49], "level": 0, "parent": null, "vector": [14, 0, 0.3267, 0.0067, 0, 0.66, 0.2828, 671, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tunits.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tunits.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L50_C0", "label": "t_asd.xname.priority =", "type": "assigned_variable", "loc": [50, 50], "level": 0, "parent": null, "vector": [14, 0, 0.3333, 0.0067, 0, 0.66, 0.2929, 841, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L51_C0", "label": "t_asd.yname.priority =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.34, 0.0067, 0, 0.66, 0.303, 773, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yname.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yname.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L53_C0", "label": "t_asd.xvalue.priority =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.3533, 0.0067, 0, 0.66, 0.3131, 219, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L54_C0", "label": "t_asd.yvalue.priority =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.36, 0.0067, 0, 0.66, 0.3232, 569, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.yvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.yvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L55_C0", "label": "t_asd.tvalue.priority =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.3667, 0.0067, 0, 0.66, 0.3333, 215, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.tvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.tvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L56_C0", "label": "t_asd.zvalue.priority =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.3733, 0.0067, 0, 0.66, 0.3434, 73, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.zvalue.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.zvalue.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L57_C0", "label": "t_asd.box1.priority =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.38, 0.0067, 0, 0.66, 0.3535, 891, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.box1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.box1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L59_C0", "label": "t_asd.xlabel2.priority =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.3933, 0.0067, 0, 0.66, 0.3636, 115, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel2.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L60_C0", "label": "t_asd.xtic2.priority =", "type": "assigned_variable", "loc": [60, 60], "level": 0, "parent": null, "vector": [14, 0, 0.4, 0.0067, 0, 0.66, 0.3737, 203, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L62_C0", "label": "t_asd.ylabel2.priority =", "type": "assigned_variable", "loc": [62, 62], "level": 0, "parent": null, "vector": [14, 0, 0.4133, 0.0067, 0, 0.66, 0.3838, 145, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L63_C0", "label": "t_asd.ytic2.priority =", "type": "assigned_variable", "loc": [63, 63], "level": 0, "parent": null, "vector": [14, 0, 0.42, 0.0067, 0, 0.66, 0.3939, 255, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic2.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic2.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L65_C0", "label": "t_asd.xlabel1.priority =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.4333, 0.0067, 0, 0.66, 0.404, 921, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xlabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xlabel1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L66_C0", "label": "t_asd.xtic1.priority =", "type": "assigned_variable", "loc": [66, 66], "level": 0, "parent": null, "vector": [14, 0, 0.44, 0.0067, 0, 0.66, 0.4141, 577, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.xtic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.xtic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L68_C0", "label": "t_asd.ylabel1.priority =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.4533, 0.0067, 0, 0.66, 0.4242, 966, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ylabel1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ylabel1.priority = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L70_C0", "label": "t_asd.ytic1.priority =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.4667, 0.0067, 0, 0.66, 0.4343, 330, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "t_asd.ytic1.priority", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t_asd.ytic1.priority = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L72_C0", "label": "scalefont()", "type": "expression", "loc": [72, 72], "level": 0, "parent": null, "vector": [8, 0, 0.48, 0.0067, 0, 0.66, 0.4444, 322, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "scalefont", "arg_names": [], "import_names": [], "rhs_call_name": "scalefont", "annotation": ""}, "snippet": "t_asd.scalefont(0.1) # lat and long text font size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L76_C0", "label": "plot()", "type": "expression", "loc": [76, 76], "level": 0, "parent": null, "vector": [8, 0, 0.5067, 0.0067, 0, 0.66, 0.4545, 929, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot( data, t_asd ,cf_asd,bg=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L78_C0", "label": "update()", "type": "expression", "loc": [78, 78], "level": 0, "parent": null, "vector": [8, 0, 0.52, 0.0067, 0, 0.66, 0.4646, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L81_C0", "label": "arr =", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.54, 0.0067, 0, 0.66, 0.4747, 395, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "arr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "arr=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L82_C0", "label": "t =", "type": "assigned_variable", "loc": [82, 82], "level": 0, "parent": null, "vector": [14, 0, 0.5467, 0.0067, 0, 0.66, 0.4848, 15, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L83_C0", "label": "c =", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.5533, 0.0067, 0, 0.66, 0.4949, 411, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L84_C0", "label": "s =", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.56, 0.0067, 0, 0.66, 0.5051, 553, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "label": "for i", "type": "for", "loc": [85, 89], "level": 0, "parent": null, "vector": [6, 0, 0.58, 0.0333, 0, 0.66, 0.5152, 826, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tarr.append(0)\n\tt.append(0)\n\tc.append(0)\n\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L86_C1", "label": "append()", "type": "expression", "loc": [86, 86], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "vector": [8, 1, 0.5733, 0.0067, 1, 0.82, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tarr.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L87_C1", "label": "append()", "type": "expression", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "vector": [8, 1, 0.58, 0.0067, 1, 0.82, 0.3333, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tt.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L88_C1", "label": "append()", "type": "expression", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "vector": [8, 1, 0.5867, 0.0067, 1, 0.82, 0.6667, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tc.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L89_C1", "label": "append()", "type": "expression", "loc": [89, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "vector": [8, 1, 0.5933, 0.0067, 1, 0.82, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\ts.append(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L91_C0", "label": "m = createmarker()", "type": "assigned_variable", "loc": [91, 91], "level": 0, "parent": null, "vector": [14, 0, 0.6067, 0.0067, 0, 0.66, 0.5253, 711, 3, 0, 0, 0, 895, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "createmarker", "annotation": ""}, "snippet": "m=v.createmarker()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L92_C0", "label": "mytmpl = createtemplate()", "type": "assigned_variable", "loc": [92, 92], "level": 0, "parent": null, "vector": [14, 0, 0.6133, 0.0067, 0, 0.66, 0.5354, 792, 3, 0, 0, 0, 291, 10, 1], "semantic": {"name": "mytmpl", "arg_names": [], "import_names": [], "rhs_call_name": "createtemplate", "annotation": ""}, "snippet": "mytmpl=v.createtemplate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L93_C0", "label": "m.viewport =", "type": "assigned_variable", "loc": [93, 93], "level": 0, "parent": null, "vector": [14, 0, 0.62, 0.0067, 0, 0.66, 0.5455, 979, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.viewport", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.viewport=[mytmpl.data.x1,mytmpl.data.x2,mytmpl.data.y1,mytmpl.data.y2] # this sets the area used for drawing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L94_C0", "label": "m.worldcoordinate =", "type": "assigned_variable", "loc": [94, 94], "level": 0, "parent": null, "vector": [14, 0, 0.6267, 0.0067, 0, 0.66, 0.5556, 427, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.worldcoordinate", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.worldcoordinate=[60.,100.,0,40]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L96_C0", "label": "assign", "type": "assigned_variable", "loc": [96, 96], "level": 0, "parent": null, "vector": [14, 0, 0.64, 0.0067, 0, 0.66, 0.5657, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L97_C0", "label": "assign", "type": "assigned_variable", "loc": [97, 97], "level": 0, "parent": null, "vector": [14, 0, 0.6467, 0.0067, 0, 0.66, 0.5758, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "t[1]=113"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L98_C0", "label": "assign", "type": "assigned_variable", "loc": [98, 98], "level": 0, "parent": null, "vector": [14, 0, 0.6533, 0.0067, 0, 0.66, 0.5859, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[0]=None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L99_C0", "label": "assign", "type": "assigned_variable", "loc": [99, 99], "level": 0, "parent": null, "vector": [14, 0, 0.66, 0.0067, 0, 0.66, 0.596, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "c[1]=85"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L103_C0", "label": "assign", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.6867, 0.0067, 0, 0.66, 0.6061, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[0]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L104_C0", "label": "assign", "type": "assigned_variable", "loc": [104, 104], "level": 0, "parent": null, "vector": [14, 0, 0.6933, 0.0067, 0, 0.66, 0.6162, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[1]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L105_C0", "label": "assign", "type": "assigned_variable", "loc": [105, 105], "level": 0, "parent": null, "vector": [14, 0, 0.7, 0.0067, 0, 0.66, 0.6263, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[2]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L106_C0", "label": "assign", "type": "assigned_variable", "loc": [106, 106], "level": 0, "parent": null, "vector": [14, 0, 0.7067, 0.0067, 0, 0.66, 0.6364, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[3]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L107_C0", "label": "assign", "type": "assigned_variable", "loc": [107, 107], "level": 0, "parent": null, "vector": [14, 0, 0.7133, 0.0067, 0, 0.66, 0.6465, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[4]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L108_C0", "label": "assign", "type": "assigned_variable", "loc": [108, 108], "level": 0, "parent": null, "vector": [14, 0, 0.72, 0.0067, 0, 0.66, 0.6566, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[5]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L109_C0", "label": "assign", "type": "assigned_variable", "loc": [109, 109], "level": 0, "parent": null, "vector": [14, 0, 0.7267, 0.0067, 0, 0.66, 0.6667, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[6]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L110_C0", "label": "assign", "type": "assigned_variable", "loc": [110, 110], "level": 0, "parent": null, "vector": [14, 0, 0.7333, 0.0067, 0, 0.66, 0.6768, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[7]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L111_C0", "label": "assign", "type": "assigned_variable", "loc": [111, 111], "level": 0, "parent": null, "vector": [14, 0, 0.74, 0.0067, 0, 0.66, 0.6869, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[8]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L112_C0", "label": "assign", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.7467, 0.0067, 0, 0.66, 0.697, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[9]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L113_C0", "label": "assign", "type": "assigned_variable", "loc": [113, 113], "level": 0, "parent": null, "vector": [14, 0, 0.7533, 0.0067, 0, 0.66, 0.7071, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[10]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L114_C0", "label": "assign", "type": "assigned_variable", "loc": [114, 114], "level": 0, "parent": null, "vector": [14, 0, 0.76, 0.0067, 0, 0.66, 0.7172, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[11]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L115_C0", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 0, "parent": null, "vector": [14, 0, 0.7667, 0.0067, 0, 0.66, 0.7273, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[12]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L116_C0", "label": "assign", "type": "assigned_variable", "loc": [116, 116], "level": 0, "parent": null, "vector": [14, 0, 0.7733, 0.0067, 0, 0.66, 0.7374, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[13]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L117_C0", "label": "assign", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.78, 0.0067, 0, 0.66, 0.7475, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[14]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L118_C0", "label": "assign", "type": "assigned_variable", "loc": [118, 118], "level": 0, "parent": null, "vector": [14, 0, 0.7867, 0.0067, 0, 0.66, 0.7576, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[15]=5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L119_C0", "label": "assign", "type": "assigned_variable", "loc": [119, 119], "level": 0, "parent": null, "vector": [14, 0, 0.7933, 0.0067, 0, 0.66, 0.7677, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[16]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L120_C0", "label": "assign", "type": "assigned_variable", "loc": [120, 120], "level": 0, "parent": null, "vector": [14, 0, 0.8, 0.0067, 0, 0.66, 0.7778, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[17]=12"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L121_C0", "label": "assign", "type": "assigned_variable", "loc": [121, 121], "level": 0, "parent": null, "vector": [14, 0, 0.8067, 0.0067, 0, 0.66, 0.7879, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[18]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L122_C0", "label": "assign", "type": "assigned_variable", "loc": [122, 122], "level": 0, "parent": null, "vector": [14, 0, 0.8133, 0.0067, 0, 0.66, 0.798, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[19]=15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L123_C0", "label": "assign", "type": "assigned_variable", "loc": [123, 123], "level": 0, "parent": null, "vector": [14, 0, 0.82, 0.0067, 0, 0.66, 0.8081, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[20]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L124_C0", "label": "assign", "type": "assigned_variable", "loc": [124, 124], "level": 0, "parent": null, "vector": [14, 0, 0.8267, 0.0067, 0, 0.66, 0.8182, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[21]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L125_C0", "label": "assign", "type": "assigned_variable", "loc": [125, 125], "level": 0, "parent": null, "vector": [14, 0, 0.8333, 0.0067, 0, 0.66, 0.8283, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[22]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L126_C0", "label": "assign", "type": "assigned_variable", "loc": [126, 126], "level": 0, "parent": null, "vector": [14, 0, 0.84, 0.0067, 0, 0.66, 0.8384, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[23]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L127_C0", "label": "assign", "type": "assigned_variable", "loc": [127, 127], "level": 0, "parent": null, "vector": [14, 0, 0.8467, 0.0067, 0, 0.66, 0.8485, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[24]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L128_C0", "label": "assign", "type": "assigned_variable", "loc": [128, 128], "level": 0, "parent": null, "vector": [14, 0, 0.8533, 0.0067, 0, 0.66, 0.8586, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[25]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L129_C0", "label": "assign", "type": "assigned_variable", "loc": [129, 129], "level": 0, "parent": null, "vector": [14, 0, 0.86, 0.0067, 0, 0.66, 0.8687, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[26]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L130_C0", "label": "assign", "type": "assigned_variable", "loc": [130, 130], "level": 0, "parent": null, "vector": [14, 0, 0.8667, 0.0067, 0, 0.66, 0.8788, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[27]=8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L131_C0", "label": "assign", "type": "assigned_variable", "loc": [131, 131], "level": 0, "parent": null, "vector": [14, 0, 0.8733, 0.0067, 0, 0.66, 0.8889, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[28]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L132_C0", "label": "assign", "type": "assigned_variable", "loc": [132, 132], "level": 0, "parent": null, "vector": [14, 0, 0.88, 0.0067, 0, 0.66, 0.899, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[29]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L133_C0", "label": "assign", "type": "assigned_variable", "loc": [133, 133], "level": 0, "parent": null, "vector": [14, 0, 0.8867, 0.0067, 0, 0.66, 0.9091, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "s[30]=10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L137_C0", "label": "m.type =", "type": "assigned_variable", "loc": [137, 137], "level": 0, "parent": null, "vector": [14, 0, 0.9133, 0.0067, 0, 0.66, 0.9192, 148, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.type", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.type=[160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189]\t"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L138_C0", "label": "m.color =", "type": "assigned_variable", "loc": [138, 138], "level": 0, "parent": null, "vector": [14, 0, 0.92, 0.0067, 0, 0.66, 0.9293, 882, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.color=[242,]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L139_C0", "label": "size =", "type": "assigned_variable", "loc": [139, 139], "level": 0, "parent": null, "vector": [14, 0, 0.9267, 0.0067, 0, 0.66, 0.9394, 714, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "size=[]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:For_L140_C0", "label": "for i", "type": "for", "loc": [140, 141], "level": 0, "parent": null, "vector": [6, 0, 0.9367, 0.0133, 0, 0.66, 0.9495, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for i in range(0,31):\n\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L141_C1", "label": "append()", "type": "expression", "loc": [141, 141], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_305:For_L140_C0", "vector": [8, 1, 0.94, 0.0067, 1, 0.16, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\tsize.append(s[i])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L143_C0", "label": "m.size =", "type": "assigned_variable", "loc": [143, 143], "level": 0, "parent": null, "vector": [14, 0, 0.9533, 0.0067, 0, 0.66, 0.9596, 820, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "m.size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.size=size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L145_C0", "label": "m.x =", "type": "assigned_variable", "loc": [145, 145], "level": 0, "parent": null, "vector": [14, 0, 0.9667, 0.0067, 0, 0.66, 0.9697, 46, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.x=[[64],[66],[68],[70],[72],[76],[78],[81],[83],[86],[89],[92],[95],[64],[62],[64],[68],[70],[73],[75],[78],[82],[84],[86],[89],[92],[95],[97],[74],[79],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Assign_L146_C0", "label": "m.y =", "type": "assigned_variable", "loc": [146, 146], "level": 0, "parent": null, "vector": [14, 0, 0.9733, 0.0067, 0, 0.66, 0.9798, 640, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "m.y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "m.y=[[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[35],[15],[10],[10],[10],[15],[10],[6],[12],[10],[10],[10],[10],[10],[10],[10],[25],[25],]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L147_C0", "label": "update()", "type": "expression", "loc": [147, 147], "level": 0, "parent": null, "vector": [8, 0, 0.98, 0.0067, 0, 0.66, 0.9899, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": "v.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L148_C0", "label": "plot()", "type": "expression", "loc": [148, 148], "level": 0, "parent": null, "vector": [8, 0, 0.9867, 0.0067, 0, 0.66, 1.0, 929, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "v.plot(m,bg=0)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L86_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L87_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L88_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_305:For_L85_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_305:For_L140_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_305:Expr_L141_C1"}]
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This is the integration file for Python. """ import cgi import os import re import string def escape(text, replace=string.replace): """Converts the special characters '<', '>', and '&'. RFC 1866 specifies that these characters be represented in HTML as &lt; &gt; and &amp; respectively. In Python 1.5 we use the new string.replace() function for speed. """ text = replace(text, '&', '&amp;') # must be done 1st text = replace(text, '<', '&lt;') text = replace(text, '>', '&gt;') text = replace(text, '"', '&quot;') text = replace(text, "'", '&#39;') return text # The FCKeditor class class FCKeditor(object): def __init__(self, instanceName): self.InstanceName = instanceName self.BasePath = '/fckeditor/' self.Width = '100%' self.Height = '200' self.ToolbarSet = 'Default' self.Value = ''; self.Config = {} def Create(self): return self.CreateHtml() def CreateHtml(self): HtmlValue = escape(self.Value) Html = "" if (self.IsCompatible()): File = "fckeditor.html" Link = "%seditor/%s?InstanceName=%s" % ( self.BasePath, File, self.InstanceName ) if (self.ToolbarSet is not None): Link += "&amp;Toolbar=%s" % self.ToolbarSet # Render the linked hidden field Html += "<input type=\"hidden\" id=\"%s\" name=\"%s\" value=\"%s\" style=\"display:none\" />" % ( self.InstanceName, self.InstanceName, HtmlValue ) # Render the configurations hidden field Html += "<input type=\"hidden\" id=\"%s___Config\" value=\"%s\" style=\"display:none\" />" % ( self.InstanceName, self.GetConfigFieldString() ) # Render the editor iframe Html += "<iframe id=\"%s\__Frame\" src=\"%s\" width=\"%s\" height=\"%s\" frameborder=\"0\" scrolling=\"no\"></iframe>" % ( self.InstanceName, Link, self.Width, self.Height ) else: if (self.Width.find("%%") < 0): WidthCSS = "%spx" % self.Width else: WidthCSS = self.Width if (self.Height.find("%%") < 0): HeightCSS = "%spx" % self.Height else: HeightCSS = self.Height Html += "<textarea name=\"%s\" rows=\"4\" cols=\"40\" style=\"width: %s; height: %s;\" wrap=\"virtual\">%s</textarea>" % ( self.InstanceName, WidthCSS, HeightCSS, HtmlValue ) return Html def IsCompatible(self): if (os.environ.has_key("HTTP_USER_AGENT")): sAgent = os.environ.get("HTTP_USER_AGENT", "") else: sAgent = "" if (sAgent.find("MSIE") >= 0) and (sAgent.find("mac") < 0) and (sAgent.find("Opera") < 0): i = sAgent.find("MSIE") iVersion = float(sAgent[i+5:i+5+3]) if (iVersion >= 5.5): return True return False elif (sAgent.find("Gecko/") >= 0): i = sAgent.find("Gecko/") iVersion = int(sAgent[i+6:i+6+8]) if (iVersion >= 20030210): return True return False elif (sAgent.find("Opera/") >= 0): i = sAgent.find("Opera/") iVersion = float(sAgent[i+6:i+6+4]) if (iVersion >= 9.5): return True return False elif (sAgent.find("AppleWebKit/") >= 0): p = re.compile('AppleWebKit\/(\d+)', re.IGNORECASE) m = p.search(sAgent) if (m.group(1) >= 522): return True return False else: return False def GetConfigFieldString(self): sParams = "" bFirst = True for sKey in self.Config.keys(): sValue = self.Config[sKey] if (not bFirst): sParams += "&amp;" else: bFirst = False if (sValue): k = escape(sKey) v = escape(sValue) if (sValue == "true"): sParams += "%s=true" % k elif (sValue == "false"): sParams += "%s=false" % k else: sParams += "%s=%s" % (k, v) return sParams
ajibawa-2023/Python-Code-Large/train/row_306
80
160
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_306:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 22], "level": 0, "parent": null, "vector": [8, 0, 0.0719, 0.1375, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Import_L24_C0", "label": "cgi import cgi", "type": "import", "loc": [24, 24], "level": 0, "parent": null, "vector": [1, 0, 0.15, 0.0063, 0, 0.66, 0.1667, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Import_L25_C0", "label": "os import os", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.1562, 0.0063, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Import_L26_C0", "label": "re import re", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.1625, 0.0063, 0, 0.66, 0.5, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Import_L27_C0", "label": "string import string", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.1688, 0.0063, 0, 0.66, 0.6667, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "label": "escape", "type": "function", "loc": [29, 41], "level": 0, "parent": null, "vector": [2, 0, 0.2188, 0.0813, 0, 0.66, 0.8333, 494, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "escape", "arg_names": ["text", "replace"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def escape(text, replace=string.replace):\n \"\"\"Converts the special characters '<', '>', and '&'.\n\n RFC 1866 specifies that these characters be represented\n in HTML as &lt; &gt; and &amp; respectively. In Python\n 1.5 we use the new string.replace() function for speed.\n \"\"\"\n text = replace(text, '&', '&amp;') # must be done 1st"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Expr_L30_C4", "label": "expression", "type": "expression", "loc": [30, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [8, 1, 0.2031, 0.0375, 1, 0.15, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Converts the special characters '<', '>', and '&'.\n\n RFC 1866 specifies that these characters be represented\n in HTML as &lt; &gt; and &amp; respectively. In Python\n 1.5 we use the new string.replace() function for speed.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L36_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [14, 1, 0.225, 0.0063, 1, 0.15, 0.1667, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = replace(text, '&', '&amp;') # must be done 1st"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L37_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [14, 1, 0.2313, 0.0063, 1, 0.15, 0.3333, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = replace(text, '<', '&lt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L38_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [14, 1, 0.2375, 0.0063, 1, 0.15, 0.5, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = replace(text, '>', '&gt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L39_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [14, 1, 0.2437, 0.0063, 1, 0.15, 0.6667, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = replace(text, '\"', '&quot;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L40_C4", "label": "text = replace()", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [14, 1, 0.25, 0.0063, 1, 0.15, 0.8333, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " text = replace(text, \"'\", '&#39;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L41_C4", "label": "return", "type": "return", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "vector": [13, 1, 0.2562, 0.0063, 1, 0.15, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "label": "FCKeditor", "type": "class", "loc": [44, 160], "level": 0, "parent": null, "vector": [3, 0, 0.6375, 0.7312, 0, 0.66, 1.0, 443, 0, 5, 0, 0, 186, 0, 26], "semantic": {"name": "FCKeditor", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditor(object):\n\tdef __init__(self, instanceName):\n\t\tself.InstanceName = instanceName\n\t\tself.BasePath = '/fckeditor/'\n\t\tself.Width = '100%'\n\t\tself.Height = '200'\n\t\tself.ToolbarSet = 'Default'\n\t\tself.Value = '';"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "label": "__init__", "type": "function", "loc": [45, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "vector": [2, 1, 0.3063, 0.0563, 1, 0.36, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "instanceName"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, instanceName):\n\t\tself.InstanceName = instanceName\n\t\tself.BasePath = '/fckeditor/'\n\t\tself.Width = '100%'\n\t\tself.Height = '200'\n\t\tself.ToolbarSet = 'Default'\n\t\tself.Value = '';\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L46_C2", "label": "self.InstanceName =", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.2875, 0.0063, 2, 0.14, 0.0, 169, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.InstanceName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.InstanceName = instanceName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L47_C2", "label": "self.BasePath =", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.2938, 0.0063, 2, 0.14, 0.1667, 43, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.BasePath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.BasePath = '/fckeditor/'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L48_C2", "label": "self.Width =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.3, 0.0063, 2, 0.14, 0.3333, 907, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.Width", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.Width = '100%'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L49_C2", "label": "self.Height =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.3063, 0.0063, 2, 0.14, 0.5, 660, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.Height", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.Height = '200'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L50_C2", "label": "self.ToolbarSet =", "type": "assigned_variable", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.3125, 0.0063, 2, 0.14, 0.6667, 964, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.ToolbarSet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.ToolbarSet = 'Default'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L51_C2", "label": "self.Value =", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.3187, 0.0063, 2, 0.14, 0.8333, 946, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.Value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.Value = '';"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L53_C2", "label": "self.Config =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "vector": [14, 2, 0.3312, 0.0063, 2, 0.14, 1.0, 410, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.Config", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.Config = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L55_C1", "label": "Create", "type": "function", "loc": [55, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "vector": [2, 1, 0.3469, 0.0125, 1, 0.36, 0.25, 86, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "Create", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef Create(self):\n\t\treturn self.CreateHtml()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L56_C2", "label": "return", "type": "return", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L55_C1", "vector": [13, 2, 0.35, 0.0063, 2, 0.2, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn self.CreateHtml()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "label": "CreateHtml", "type": "function", "loc": [58, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "vector": [2, 1, 0.5188, 0.3187, 1, 0.36, 0.5, 341, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "CreateHtml", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef CreateHtml(self):\n\t\tHtmlValue = escape(self.Value)\n\t\tHtml = \"\"\n\n\t\tif (self.IsCompatible()):\n\t\t\tFile = \"fckeditor.html\"\n\t\t\tLink = \"%seditor/%s?InstanceName=%s\" % (\n\t\t\t\t\tself.BasePath,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L59_C2", "label": "HtmlValue = escape()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "vector": [14, 2, 0.3688, 0.0063, 2, 0.3, 0.0, 247, 3, 1, 0, 0, 494, 10, 1], "semantic": {"name": "HtmlValue", "arg_names": [], "import_names": [], "rhs_call_name": "escape", "annotation": ""}, "snippet": "\t\tHtmlValue = escape(self.Value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L60_C2", "label": "Html =", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "vector": [14, 2, 0.375, 0.0063, 2, 0.3, 0.3333, 800, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "Html", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tHtml = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "label": "if", "type": "if", "loc": [62, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "vector": [4, 2, 0.5281, 0.2875, 2, 0.3, 0.6667, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif (self.IsCompatible()):\n\t\t\tFile = \"fckeditor.html\"\n\t\t\tLink = \"%seditor/%s?InstanceName=%s\" % (\n\t\t\t\t\tself.BasePath,\n\t\t\t\t\tFile,\n\t\t\t\t\tself.InstanceName\n\t\t\t\t\t)\n\t\t\tif (self.ToolbarSet is not None):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L63_C3", "label": "File =", "type": "assigned_variable", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "vector": [14, 3, 0.3937, 0.0063, 3, 0.3, 0.0, 491, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "File", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tFile = \"fckeditor.html\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L64_C3", "label": "Link =", "type": "assigned_variable", "loc": [64, 68], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "vector": [14, 3, 0.4125, 0.0312, 3, 0.3, 0.25, 72, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "Link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tLink = \"%seditor/%s?InstanceName=%s\" % (\n\t\t\t\t\tself.BasePath,\n\t\t\t\t\tFile,\n\t\t\t\t\tself.InstanceName\n\t\t\t\t\t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L69_C3", "label": "if", "type": "if", "loc": [69, 70], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "vector": [4, 3, 0.4344, 0.0125, 3, 0.3, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (self.ToolbarSet is not None):\n\t\t\t\tLink += \"&amp;Toolbar=%s\" % self.ToolbarSet"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3", "label": "if", "type": "if", "loc": [93, 96], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "vector": [4, 3, 0.5906, 0.025, 3, 0.3, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (self.Width.find(\"%%\") < 0):\n\t\t\t\tWidthCSS = \"%spx\" % self.Width\n\t\t\telse:\n\t\t\t\tWidthCSS = self.Width"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L94_C4", "label": "WidthCSS =", "type": "assigned_variable", "loc": [94, 94], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3", "vector": [14, 4, 0.5875, 0.0063, 4, 0.29, 0.0, 445, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "WidthCSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tWidthCSS = \"%spx\" % self.Width"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L96_C4", "label": "WidthCSS =", "type": "assigned_variable", "loc": [96, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3", "vector": [14, 4, 0.6, 0.0063, 4, 0.29, 1.0, 445, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "WidthCSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tWidthCSS = self.Width"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3", "label": "if", "type": "if", "loc": [97, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "vector": [4, 3, 0.6156, 0.025, 3, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (self.Height.find(\"%%\") < 0):\n\t\t\t\tHeightCSS = \"%spx\" % self.Height\n\t\t\telse:\n\t\t\t\tHeightCSS = self.Height"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L98_C4", "label": "HeightCSS =", "type": "assigned_variable", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3", "vector": [14, 4, 0.6125, 0.0063, 4, 0.3, 0.0, 273, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "HeightCSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tHeightCSS = \"%spx\" % self.Height"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L100_C4", "label": "HeightCSS =", "type": "assigned_variable", "loc": [100, 100], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3", "vector": [14, 4, 0.625, 0.0063, 4, 0.3, 1.0, 273, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "HeightCSS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tHeightCSS = self.Height"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L108_C2", "label": "return", "type": "return", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "vector": [13, 2, 0.675, 0.0063, 2, 0.3, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn Html"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1", "label": "IsCompatible", "type": "function", "loc": [110, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "vector": [2, 1, 0.7812, 0.1938, 1, 0.36, 0.75, 587, 0, 1, 1, 0, 0, 0, 17], "semantic": {"name": "IsCompatible", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef IsCompatible(self):\n\t\tif (os.environ.has_key(\"HTTP_USER_AGENT\")):\n\t\t\tsAgent = os.environ.get(\"HTTP_USER_AGENT\", \"\")\n\t\telse:\n\t\t\tsAgent = \"\"\n\t\tif (sAgent.find(\"MSIE\") >= 0) and (sAgent.find(\"mac\") < 0) and (sAgent.find(\"Opera\") < 0):\n\t\t\ti = sAgent.find(\"MSIE\")\n\t\t\tiVersion = float(sAgent[i+5:i+5+3])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2", "label": "if", "type": "if", "loc": [111, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1", "vector": [4, 2, 0.7031, 0.025, 2, 0.63, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif (os.environ.has_key(\"HTTP_USER_AGENT\")):\n\t\t\tsAgent = os.environ.get(\"HTTP_USER_AGENT\", \"\")\n\t\telse:\n\t\t\tsAgent = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L112_C3", "label": "sAgent = get()", "type": "assigned_variable", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2", "vector": [14, 3, 0.7, 0.0063, 3, 0.44, 0.0, 211, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "sAgent", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\t\tsAgent = os.environ.get(\"HTTP_USER_AGENT\", \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L114_C3", "label": "sAgent =", "type": "assigned_variable", "loc": [114, 114], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2", "vector": [14, 3, 0.7125, 0.0063, 3, 0.44, 1.0, 211, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sAgent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tsAgent = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "label": "if", "type": "if", "loc": [115, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1", "vector": [4, 2, 0.7969, 0.1625, 2, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 15], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif (sAgent.find(\"MSIE\") >= 0) and (sAgent.find(\"mac\") < 0) and (sAgent.find(\"Opera\") < 0):\n\t\t\ti = sAgent.find(\"MSIE\")\n\t\t\tiVersion = float(sAgent[i+5:i+5+3])\n\t\t\tif (iVersion >= 5.5):\n\t\t\t\treturn True\n\t\t\treturn False\n\t\telif (sAgent.find(\"Gecko/\") >= 0):\n\t\t\ti = sAgent.find(\"Gecko/\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L116_C3", "label": "i = find()", "type": "assigned_variable", "loc": [116, 116], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "vector": [14, 3, 0.725, 0.0063, 3, 0.08, 0.0, 826, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": "\t\t\ti = sAgent.find(\"MSIE\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L117_C3", "label": "iVersion = float()", "type": "assigned_variable", "loc": [117, 117], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "vector": [14, 3, 0.7312, 0.0063, 3, 0.08, 0.25, 94, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "iVersion", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": "\t\t\tiVersion = float(sAgent[i+5:i+5+3])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L118_C3", "label": "if", "type": "if", "loc": [118, 119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "vector": [4, 3, 0.7406, 0.0125, 3, 0.08, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (iVersion >= 5.5):\n\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L119_C4", "label": "return", "type": "return", "loc": [119, 119], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L118_C3", "vector": [13, 4, 0.7438, 0.0063, 4, 0.67, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L120_C3", "label": "return", "type": "return", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "vector": [13, 3, 0.75, 0.0063, 3, 0.08, 0.75, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "label": "if", "type": "if", "loc": [121, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "vector": [4, 3, 0.8156, 0.125, 3, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\telif (sAgent.find(\"Gecko/\") >= 0):\n\t\t\ti = sAgent.find(\"Gecko/\")\n\t\t\tiVersion = int(sAgent[i+6:i+6+8])\n\t\t\tif (iVersion >= 20030210):\n\t\t\t\treturn True\n\t\t\treturn False\n\t\telif (sAgent.find(\"Opera/\") >= 0):\n\t\t\ti = sAgent.find(\"Opera/\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L122_C3", "label": "i = find()", "type": "assigned_variable", "loc": [122, 122], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "vector": [14, 4, 0.7625, 0.0063, 4, 0.3, 0.0, 826, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": "\t\t\ti = sAgent.find(\"Gecko/\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L123_C3", "label": "iVersion = int()", "type": "assigned_variable", "loc": [123, 123], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "vector": [14, 4, 0.7688, 0.0063, 4, 0.3, 0.25, 94, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "iVersion", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "\t\t\tiVersion = int(sAgent[i+6:i+6+8])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L124_C3", "label": "if", "type": "if", "loc": [124, 125], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "vector": [4, 4, 0.7781, 0.0125, 4, 0.3, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (iVersion >= 20030210):\n\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L125_C4", "label": "return", "type": "return", "loc": [125, 125], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L124_C3", "vector": [13, 5, 0.7812, 0.0063, 5, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L126_C3", "label": "return", "type": "return", "loc": [126, 126], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "vector": [13, 4, 0.7875, 0.0063, 4, 0.3, 0.75, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "label": "if", "type": "if", "loc": [127, 140], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "vector": [4, 4, 0.8344, 0.0875, 4, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\telif (sAgent.find(\"Opera/\") >= 0):\n\t\t\ti = sAgent.find(\"Opera/\")\n\t\t\tiVersion = float(sAgent[i+6:i+6+4])\n\t\t\tif (iVersion >= 9.5):\n\t\t\t\treturn True\n\t\t\treturn False\n\t\telif (sAgent.find(\"AppleWebKit/\") >= 0):\n\t\t\tp = re.compile('AppleWebKit\\/(\\d+)', re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L128_C3", "label": "i = find()", "type": "assigned_variable", "loc": [128, 128], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "vector": [14, 5, 0.8, 0.0063, 5, 0.41, 0.0, 826, 3, 1, 0, 0, 340, 10, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "find", "annotation": ""}, "snippet": "\t\t\ti = sAgent.find(\"Opera/\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L129_C3", "label": "iVersion = float()", "type": "assigned_variable", "loc": [129, 129], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "vector": [14, 5, 0.8063, 0.0063, 5, 0.41, 0.25, 94, 3, 1, 0, 0, 639, 10, 1], "semantic": {"name": "iVersion", "arg_names": [], "import_names": [], "rhs_call_name": "float", "annotation": ""}, "snippet": "\t\t\tiVersion = float(sAgent[i+6:i+6+4])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L130_C3", "label": "if", "type": "if", "loc": [130, 131], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "vector": [4, 5, 0.8156, 0.0125, 5, 0.41, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (iVersion >= 9.5):\n\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L131_C4", "label": "return", "type": "return", "loc": [131, 131], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L130_C3", "vector": [13, 6, 0.8187, 0.0063, 6, 0.5, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L132_C3", "label": "return", "type": "return", "loc": [132, 132], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "vector": [13, 5, 0.825, 0.0063, 5, 0.41, 0.75, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "label": "if", "type": "if", "loc": [133, 140], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "vector": [4, 5, 0.8531, 0.05, 5, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\telif (sAgent.find(\"AppleWebKit/\") >= 0):\n\t\t\tp = re.compile('AppleWebKit\\/(\\d+)', re.IGNORECASE)\n\t\t\tm = p.search(sAgent)\n\t\t\tif (m.group(1) >= 522):\n\t\t\t\treturn True\n\t\t\treturn False\n\t\telse:\n\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L134_C3", "label": "p = compile()", "type": "assigned_variable", "loc": [134, 134], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "vector": [14, 6, 0.8375, 0.0063, 6, 0.28, 0.0, 491, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "p", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "\t\t\tp = re.compile('AppleWebKit\\/(\\d+)', re.IGNORECASE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L135_C3", "label": "m = search()", "type": "assigned_variable", "loc": [135, 135], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "vector": [14, 6, 0.8438, 0.0063, 6, 0.28, 0.25, 711, 3, 1, 0, 0, 163, 10, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": "\t\t\tm = p.search(sAgent)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L136_C3", "label": "if", "type": "if", "loc": [136, 137], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "vector": [4, 6, 0.8531, 0.0125, 6, 0.28, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (m.group(1) >= 522):\n\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L137_C4", "label": "return", "type": "return", "loc": [137, 137], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L136_C3", "vector": [13, 7, 0.8562, 0.0063, 7, 0.43, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L138_C3", "label": "return", "type": "return", "loc": [138, 138], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "vector": [13, 6, 0.8625, 0.0063, 6, 0.28, 0.75, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L140_C3", "label": "return", "type": "return", "loc": [140, 140], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "vector": [13, 6, 0.875, 0.0063, 6, 0.28, 1.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "label": "GetConfigFieldString", "type": "function", "loc": [142, 160], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "vector": [2, 1, 0.9437, 0.1187, 1, 0.36, 1.0, 936, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "GetConfigFieldString", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef GetConfigFieldString(self):\n\t\tsParams = \"\"\n\t\tbFirst = True\n\t\tfor sKey in self.Config.keys():\n\t\t\tsValue = self.Config[sKey]\n\t\t\tif (not bFirst):\n\t\t\t\tsParams += \"&amp;\"\n\t\t\telse:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L143_C2", "label": "sParams =", "type": "assigned_variable", "loc": [143, 143], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "vector": [14, 2, 0.8938, 0.0063, 2, 0.27, 0.0, 651, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "sParams", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tsParams = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L144_C2", "label": "bFirst =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "vector": [14, 2, 0.9, 0.0063, 2, 0.27, 0.3333, 190, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bFirst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tbFirst = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "label": "for sKey", "type": "for", "loc": [145, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "vector": [6, 2, 0.95, 0.0938, 2, 0.27, 0.6667, 119, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "sKey", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tfor sKey in self.Config.keys():\n\t\t\tsValue = self.Config[sKey]\n\t\t\tif (not bFirst):\n\t\t\t\tsParams += \"&amp;\"\n\t\t\telse:\n\t\t\t\tbFirst = False\n\t\t\tif (sValue):\n\t\t\t\tk = escape(sKey)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L146_C3", "label": "sValue =", "type": "assigned_variable", "loc": [146, 146], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "vector": [14, 3, 0.9125, 0.0063, 3, 0.71, 0.0, 881, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tsValue = self.Config[sKey]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L147_C3", "label": "if", "type": "if", "loc": [147, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "vector": [4, 3, 0.9281, 0.025, 3, 0.71, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (not bFirst):\n\t\t\t\tsParams += \"&amp;\"\n\t\t\telse:\n\t\t\t\tbFirst = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L150_C4", "label": "bFirst =", "type": "assigned_variable", "loc": [150, 150], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L147_C3", "vector": [14, 4, 0.9375, 0.0063, 4, 0.96, 0.0, 190, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "bFirst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tbFirst = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "label": "if", "type": "if", "loc": [151, 159], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "vector": [4, 3, 0.9688, 0.0563, 3, 0.71, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (sValue):\n\t\t\t\tk = escape(sKey)\n\t\t\t\tv = escape(sValue)\n\t\t\t\tif (sValue == \"true\"):\n\t\t\t\t\tsParams += \"%s=true\" % k\n\t\t\t\telif (sValue == \"false\"):\n\t\t\t\t\tsParams += \"%s=false\" % k\n\t\t\t\telse:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L152_C4", "label": "k = escape()", "type": "assigned_variable", "loc": [152, 152], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "vector": [14, 4, 0.95, 0.0063, 4, 0.46, 0.0, 954, 3, 1, 0, 0, 494, 10, 1], "semantic": {"name": "k", "arg_names": [], "import_names": [], "rhs_call_name": "escape", "annotation": ""}, "snippet": "\t\t\t\tk = escape(sKey)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L153_C4", "label": "v = escape()", "type": "assigned_variable", "loc": [153, 153], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "vector": [14, 4, 0.9563, 0.0063, 4, 0.46, 0.5, 553, 3, 1, 0, 0, 494, 10, 1], "semantic": {"name": "v", "arg_names": [], "import_names": [], "rhs_call_name": "escape", "annotation": ""}, "snippet": "\t\t\t\tv = escape(sValue)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L154_C4", "label": "if", "type": "if", "loc": [154, 159], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "vector": [4, 4, 0.9781, 0.0375, 4, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\tif (sValue == \"true\"):\n\t\t\t\t\tsParams += \"%s=true\" % k\n\t\t\t\telif (sValue == \"false\"):\n\t\t\t\t\tsParams += \"%s=false\" % k\n\t\t\t\telse:\n\t\t\t\t\tsParams += \"%s=%s\" % (k, v)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:If_L156_C4", "label": "if", "type": "if", "loc": [156, 159], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:If_L154_C4", "vector": [4, 5, 0.9844, 0.025, 5, 0.34, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\telif (sValue == \"false\"):\n\t\t\t\t\tsParams += \"%s=false\" % k\n\t\t\t\telse:\n\t\t\t\t\tsParams += \"%s=%s\" % (k, v)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L160_C2", "label": "return", "type": "return", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "vector": [13, 2, 1.0, 0.0063, 2, 0.27, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn sParams"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L47_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L48_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L55_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L63_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L64_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L69_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L93_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L62_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L97_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L100_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L58_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L108_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L112_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L111_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L114_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L110_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L116_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L117_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L118_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L118_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L119_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L120_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L115_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L122_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L123_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L124_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L124_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L125_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L126_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L121_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L128_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L129_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L130_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L130_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L132_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L127_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L134_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L135_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L136_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L136_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L137_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L138_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L133_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L140_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:ClassDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L143_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L144_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L146_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L147_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L147_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:For_L145_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L152_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Assign_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L151_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:If_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_306:If_L156_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_306:FunctionDef_L142_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_306:Return_L160_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector/QuickUpload for Python (WSGI wrapper). See config.py for configuration settings """ from connector import FCKeditorConnector from upload import FCKeditorQuickUpload import cgitb from cStringIO import StringIO # Running from WSGI capable server (recomended) def App(environ, start_response): "WSGI entry point. Run the connector" if environ['SCRIPT_NAME'].endswith("connector.py"): conn = FCKeditorConnector(environ) elif environ['SCRIPT_NAME'].endswith("upload.py"): conn = FCKeditorQuickUpload(environ) else: start_response ("200 Ok", [('Content-Type','text/html')]) yield "Unknown page requested: " yield environ['SCRIPT_NAME'] return try: # run the connector data = conn.doResponse() # Start WSGI response: start_response ("200 Ok", conn.headers) # Send response text yield data except: start_response("500 Internal Server Error",[("Content-type","text/html")]) file = StringIO() cgitb.Hook(file = file).handle() yield file.getvalue()
ajibawa-2023/Python-Code-Large/train/row_310
23
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:ImportFrom_L29_C0", "label": "from connector import FCKeditorConnector", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0], "semantic": {"name": "connector", "arg_names": [], "import_names": ["FCKeditorConnector"], "rhs_call_name": "", "annotation": ""}, "snippet": "from connector import FCKeditorConnector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:ImportFrom_L30_C0", "label": "from upload import FCKeditorQuickUpload", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.5172, 0.0172, 0, 0.66, 0.4, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "upload", "arg_names": [], "import_names": ["FCKeditorQuickUpload"], "rhs_call_name": "", "annotation": ""}, "snippet": "from upload import FCKeditorQuickUpload"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Import_L32_C0", "label": "cgitb import cgitb", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.5517, 0.0172, 0, 0.66, 0.6, 691, 0, 1, 0, 0, 691, 0, 0], "semantic": {"name": "cgitb", "arg_names": [], "import_names": ["cgitb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgitb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:ImportFrom_L33_C0", "label": "from cStringIO import StringIO", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.569, 0.0172, 0, 0.66, 0.8, 764, 0, 1, 0, 0, 764, 0, 0], "semantic": {"name": "cStringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from cStringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "label": "App", "type": "function", "loc": [36, 58], "level": 0, "parent": null, "vector": [2, 0, 0.8103, 0.3966, 0, 0.66, 1.0, 789, 0, 2, 0, 0, 0, 0, 12], "semantic": {"name": "App", "arg_names": ["environ", "start_response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def App(environ, start_response):\n\t\"WSGI entry point. Run the connector\"\n\tif environ['SCRIPT_NAME'].endswith(\"connector.py\"):\n\t\tconn = FCKeditorConnector(environ)\n\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L37_C1", "label": "expression", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "vector": [8, 1, 0.6379, 0.0172, 1, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"WSGI entry point. Run the connector\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1", "label": "if", "type": "if", "loc": [38, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "vector": [4, 1, 0.7241, 0.1552, 1, 0.57, 0.5, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tif environ['SCRIPT_NAME'].endswith(\"connector.py\"):\n\t\tconn = FCKeditorConnector(environ)\n\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])\n\t\tyield \"Unknown page requested: \"\n\t\tyield environ['SCRIPT_NAME']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L39_C2", "label": "conn = FCKeditorConnector()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1", "vector": [14, 2, 0.6724, 0.0172, 2, 0.49, 0.0, 345, 3, 1, 0, 0, 439, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorConnector", "annotation": ""}, "snippet": "\t\tconn = FCKeditorConnector(environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "label": "if", "type": "if", "loc": [40, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1", "vector": [4, 2, 0.7414, 0.1207, 2, 0.49, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])\n\t\tyield \"Unknown page requested: \"\n\t\tyield environ['SCRIPT_NAME']\n\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L41_C2", "label": "conn = FCKeditorQuickUpload()", "type": "assigned_variable", "loc": [41, 41], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "vector": [14, 3, 0.7069, 0.0172, 3, 0.43, 0.0, 345, 3, 1, 0, 0, 339, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorQuickUpload", "annotation": ""}, "snippet": "\t\tconn = FCKeditorQuickUpload(environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L43_C2", "label": "start_response()", "type": "expression", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "vector": [8, 3, 0.7414, 0.0172, 3, 0.43, 0.25, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L44_C2", "label": "expression", "type": "expression", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "vector": [8, 3, 0.7586, 0.0172, 3, 0.43, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield \"Unknown page requested: \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L45_C2", "label": "expression", "type": "expression", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "vector": [8, 3, 0.7759, 0.0172, 3, 0.43, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield environ['SCRIPT_NAME']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Return_L46_C2", "label": "return", "type": "return", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "vector": [13, 3, 0.7931, 0.0172, 3, 0.43, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "label": "try", "type": "try", "loc": [47, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "vector": [7, 1, 0.9052, 0.2069, 1, 0.57, 1.0, 0, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ttry:\n\t\t# run the connector\n\t\tdata = conn.doResponse()\n\t\t# Start WSGI response:\n\t\tstart_response (\"200 Ok\", conn.headers)\n\t\t# Send response text\n\t\tyield data\n\texcept:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L49_C2", "label": "data = doResponse()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [14, 2, 0.8448, 0.0172, 2, 0.33, 0.0, 929, 3, 0, 0, 0, 492, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "doResponse", "annotation": ""}, "snippet": "\t\tdata = conn.doResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L51_C2", "label": "start_response()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [8, 2, 0.8793, 0.0172, 2, 0.33, 0.5, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response (\"200 Ok\", conn.headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L53_C2", "label": "expression", "type": "expression", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [8, 2, 0.9138, 0.0172, 2, 0.33, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L55_C2", "label": "start_response()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [8, 2, 0.9483, 0.0172, 2, 0.33, 0.0, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response(\"500 Internal Server Error\",[(\"Content-type\",\"text/html\")])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L56_C2", "label": "file = StringIO()", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [14, 2, 0.9655, 0.0172, 2, 0.33, 0.3333, 107, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": "\t\tfile = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L57_C2", "label": "handle()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [8, 2, 0.9828, 0.0172, 2, 0.33, 0.6667, 346, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "handle", "arg_names": [], "import_names": [], "rhs_call_name": "handle", "annotation": ""}, "snippet": "\t\tcgitb.Hook(file = file).handle()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L58_C2", "label": "expression", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "vector": [8, 2, 1.0, 0.0172, 2, 0.33, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield file.getvalue()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Return_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Assign_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_310:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_310:Expr_L58_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This is the "File Uploader" for Python """ import os from fckutil import * from fckcommands import * # default command's implementation from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorQuickUpload( FCKeditorConnectorBase, UploadFileCommandMixin, BaseHttpMixin, BaseHtmlMixin): def doResponse(self): "Main function. Process the request, set headers and return a string as response." # Check if this connector is disabled if not(Config.Enabled): return self.sendUploadResults(1, "This file uploader is disabled. Please check the \"editor/filemanager/connectors/py/config.py\"") command = 'QuickUpload' # The file type (from the QueryString, by default 'File'). resourceType = self.request.get('Type','File') currentFolder = "/" # Check for invalid paths if currentFolder is None: return self.sendUploadResults(102, '', '', "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendUploadResults( 1, '', '', 'Invalid type specified' ) # Setup paths self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFoldercreateServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here return self.uploadFile(resourceType, currentFolder) # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorQuickUpload() data = conn.doResponse() for header in conn.headers: if not header is None: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception()
ajibawa-2023/Python-Code-Large/train/row_312
28
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_312:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:ImportFrom_L3_C0", "label": "from fckutil import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:ImportFrom_L4_C0", "label": "from fckcommands import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0851, 0.0213, 0, 0.66, 0.4, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:ImportFrom_L5_C0", "label": "from fckconnector import FCKeditorConnectorBase", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0213, 0, 0.66, 0.6, 725, 0, 1, 0, 0, 725, 0, 0], "semantic": {"name": "fckconnector", "arg_names": [], "import_names": ["FCKeditorConnectorBase"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckconnector import FCKeditorConnectorBase # import base connector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Import_L6_C0", "label": "config import Config", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1277, 0.0213, 0, 0.66, 0.8, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:ClassDef_L8_C0", "label": "FCKeditorQuickUpload", "type": "class", "loc": [8, 46], "level": 0, "parent": null, "vector": [3, 0, 0.5745, 0.8298, 0, 0.66, 1.0, 339, 0, 1, 0, 0, 693, 0, 10], "semantic": {"name": "FCKeditorQuickUpload", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t\t\t\t\tBaseHttpMixin, BaseHtmlMixin):\n\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "label": "doResponse", "type": "function", "loc": [11, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:ClassDef_L8_C0", "vector": [2, 1, 0.6064, 0.766, 1, 0.29, 0.0, 492, 0, 1, 1, 0, 0, 0, 10], "semantic": {"name": "doResponse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")\n\t\tcommand = 'QuickUpload'\n\t\t# The file type (from the QueryString, by default 'File').\n\t\tresourceType = self.request.get('Type','File')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Expr_L12_C2", "label": "expression", "type": "expression", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [8, 2, 0.2553, 0.0213, 2, 0.19, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Main function. Process the request, set headers and return a string as response.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L14_C2", "label": "if", "type": "if", "loc": [14, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.3085, 0.0426, 2, 0.19, 0.0833, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L15_C3", "label": "return", "type": "return", "loc": [15, 15], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L14_C2", "vector": [13, 3, 0.3191, 0.0213, 3, 0.44, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L16_C2", "label": "command =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [14, 2, 0.3404, 0.0213, 2, 0.19, 0.1667, 842, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "command", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcommand = 'QuickUpload'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L18_C2", "label": "resourceType = get()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [14, 2, 0.383, 0.0213, 2, 0.19, 0.25, 551, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "resourceType", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tresourceType = self.request.get('Type','File')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L19_C2", "label": "currentFolder =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [14, 2, 0.4043, 0.0213, 2, 0.19, 0.3333, 885, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "currentFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcurrentFolder = \"/\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L21_C2", "label": "if", "type": "if", "loc": [21, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.4574, 0.0426, 2, 0.19, 0.4167, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif currentFolder is None:\n\t\t\treturn self.sendUploadResults(102, '', '', \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L22_C3", "label": "return", "type": "return", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L21_C2", "vector": [13, 3, 0.4681, 0.0213, 3, 0.2, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults(102, '', '', \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L25_C2", "label": "if", "type": "if", "loc": [25, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.5426, 0.0426, 2, 0.19, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not command in Config.ConfigAllowedCommands ):\n\t\t\treturn self.sendUploadResults( 1, '', '', 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L26_C3", "label": "return", "type": "return", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L25_C2", "vector": [13, 3, 0.5532, 0.0213, 3, 0.83, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults( 1, '', '', 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L28_C2", "label": "if", "type": "if", "loc": [28, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.6064, 0.0426, 2, 0.19, 0.5833, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not resourceType in Config.ConfigAllowedTypes ):\n\t\t\treturn self.sendUploadResults( 1, '', '', 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L29_C3", "label": "return", "type": "return", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L28_C2", "vector": [13, 3, 0.617, 0.0213, 3, 0.51, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults( 1, '', '', 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L32_C2", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [14, 2, 0.6809, 0.0213, 2, 0.19, 0.6667, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L33_C2", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [14, 2, 0.7021, 0.0213, 2, 0.19, 0.75, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L34_C2", "label": "if", "type": "if", "loc": [34, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.7447, 0.0638, 2, 0.19, 0.8333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not self.userFilesFolder: # no absolute path given (dangerous...)\n\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L35_C3", "label": "self.userFilesFolder = mapServerPath()", "type": "assigned_variable", "loc": [35, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L34_C2", "vector": [14, 3, 0.7553, 0.0426, 3, 0.49, 0.0, 308, 3, 2, 0, 0, 872, 10, 1], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "mapServerPath", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:If_L39_C2", "label": "if", "type": "if", "loc": [39, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [4, 2, 0.8723, 0.1064, 2, 0.19, 0.9167, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not os.path.exists(self.userFilesFolder):\n\t\t\ttry:\n\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3", "label": "try", "type": "try", "loc": [40, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:If_L39_C2", "vector": [7, 3, 0.883, 0.0851, 3, 0.95, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Expr_L41_C4", "label": "createServerFoldercreateServerFolder()", "type": "expression", "loc": [41, 41], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3", "vector": [8, 4, 0.8723, 0.0213, 4, 0.28, 0.0, 921, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "createServerFoldercreateServerFolder", "arg_names": [], "import_names": [], "rhs_call_name": "createServerFoldercreateServerFolder", "annotation": ""}, "snippet": "\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L43_C4", "label": "return", "type": "return", "loc": [43, 43], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3", "vector": [13, 4, 0.9149, 0.0213, 4, 0.28, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L46_C2", "label": "return", "type": "return", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "vector": [13, 2, 0.9787, 0.0213, 2, 0.19, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn self.uploadFile(resourceType, currentFolder)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_312:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L15_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L21_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L22_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L26_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L28_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L29_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Assign_L35_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:If_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:If_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:Try_L40_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_312:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_312:Return_L46_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Base Connector for Python (CGI and WSGI). See config.py for configuration settings """ import cgi, os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins import config as Config class FCKeditorConnectorBase( object ): "The base connector class. Subclass it to extend functionality (see Zope example)" def __init__(self, environ=None): "Constructor: Here you should parse request fields, initialize variables, etc." self.request = FCKeditorRequest(environ) # Parse request self.headers = [] # Clean Headers if environ: self.environ = environ else: self.environ = os.environ # local functions def setHeader(self, key, value): self.headers.append ((key, value)) return class FCKeditorRequest(object): "A wrapper around the request object" def __init__(self, environ): if environ: # WSGI self.request = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ, keep_blank_values=1) self.environ = environ else: # plain old cgi self.environ = os.environ self.request = cgi.FieldStorage() if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ: if self.environ['REQUEST_METHOD'].upper()=='POST': # we are in a POST, but GET query_string exists # cgi parses by default POST data, so parse GET QUERY_STRING too self.get_request = cgi.FieldStorage(fp=None, environ={ 'REQUEST_METHOD':'GET', 'QUERY_STRING':self.environ['QUERY_STRING'], }, ) else: self.get_request={} def has_key(self, key): return self.request.has_key(key) or self.get_request.has_key(key) def get(self, key, default=None): if key in self.request.keys(): field = self.request[key] elif key in self.get_request.keys(): field = self.get_request[key] else: return default if hasattr(field,"filename") and field.filename: #file upload, do not convert return value return field else: return field.value
ajibawa-2023/Python-Code-Large/train/row_313
41
90
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Import_L28_C0", "label": "cgi import cgi, os", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:ImportFrom_L30_C0", "label": "from fckutil import *", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.0111, 0, 0.66, 0.2857, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:ImportFrom_L31_C0", "label": "from fckcommands import *", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.3444, 0.0111, 0, 0.66, 0.4286, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:ImportFrom_L32_C0", "label": "from fckoutput import *", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.3556, 0.0111, 0, 0.66, 0.5714, 314, 0, 1, 0, 0, 314, 0, 0], "semantic": {"name": "fckoutput", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckoutput import * \t# base http, xml and html output mixins"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Import_L33_C0", "label": "config import Config", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.3667, 0.0111, 0, 0.66, 0.7143, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "label": "FCKeditorConnectorBase", "type": "class", "loc": [35, 51], "level": 0, "parent": null, "vector": [3, 0, 0.4778, 0.1889, 0, 0.66, 0.8571, 693, 0, 2, 0, 0, 186, 0, 2], "semantic": {"name": "FCKeditorConnectorBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorConnectorBase( object ):\n\t\"The base connector class. Subclass it to extend functionality (see Zope example)\"\n\n\tdef __init__(self, environ=None):\n\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\"\n\t\tself.request = FCKeditorRequest(environ) # Parse request\n\t\tself.headers = []\t\t\t\t\t\t# Clean Headers\n\t\tif environ:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L36_C1", "label": "expression", "type": "expression", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "vector": [8, 1, 0.4, 0.0111, 1, 0.32, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"The base connector class. Subclass it to extend functionality (see Zope example)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "label": "__init__", "type": "function", "loc": [38, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "vector": [2, 1, 0.4611, 0.0889, 1, 0.32, 0.5, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "environ"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, environ=None):\n\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\"\n\t\tself.request = FCKeditorRequest(environ) # Parse request\n\t\tself.headers = []\t\t\t\t\t\t# Clean Headers\n\t\tif environ:\n\t\t\tself.environ = environ\n\t\telse:\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L39_C2", "label": "expression", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "vector": [8, 2, 0.4333, 0.0111, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L40_C2", "label": "self.request = FCKeditorRequest()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "vector": [14, 2, 0.4444, 0.0111, 2, 0.58, 0.3333, 952, 3, 1, 0, 0, 272, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorRequest", "annotation": ""}, "snippet": "\t\tself.request = FCKeditorRequest(environ) # Parse request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L41_C2", "label": "self.headers =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "vector": [14, 2, 0.4556, 0.0111, 2, 0.58, 0.6667, 131, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.headers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.headers = []\t\t\t\t\t\t# Clean Headers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2", "label": "if", "type": "if", "loc": [42, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "vector": [4, 2, 0.4833, 0.0444, 2, 0.58, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif environ:\n\t\t\tself.environ = environ\n\t\telse:\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L43_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2", "vector": [14, 3, 0.4778, 0.0111, 3, 0.61, 0.0, 50, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L45_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2", "vector": [14, 3, 0.5, 0.0111, 3, 0.61, 1.0, 50, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1", "label": "setHeader", "type": "function", "loc": [49, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "vector": [2, 1, 0.5556, 0.0333, 1, 0.32, 1.0, 623, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": ["self", "key", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef setHeader(self, key, value):\n\t\tself.headers.append ((key, value))\n\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L50_C2", "label": "append()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1", "vector": [8, 2, 0.5556, 0.0111, 2, 0.3, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\tself.headers.append ((key, value))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L51_C2", "label": "return", "type": "return", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1", "vector": [13, 2, 0.5667, 0.0111, 2, 0.3, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "label": "FCKeditorRequest", "type": "class", "loc": [53, 90], "level": 0, "parent": null, "vector": [3, 0, 0.7944, 0.4222, 0, 0.66, 1.0, 272, 0, 3, 0, 0, 186, 0, 9], "semantic": {"name": "FCKeditorRequest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorRequest(object):\n\t\"A wrapper around the request object\"\n\tdef __init__(self, environ):\n\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L54_C1", "label": "expression", "type": "expression", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "vector": [8, 1, 0.6, 0.0111, 1, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"A wrapper around the request object\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1", "label": "__init__", "type": "function", "loc": [55, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "vector": [2, 1, 0.7222, 0.2333, 1, 0.14, 0.3333, 555, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "__init__", "arg_names": ["self", "environ"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, environ):\n\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ\n\t\telse: # plain old cgi\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "label": "if", "type": "if", "loc": [56, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1", "vector": [4, 2, 0.6611, 0.0889, 2, 0.31, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ\n\t\telse: # plain old cgi\n\t\t\tself.environ = os.environ\n\t\t\tself.request = cgi.FieldStorage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L57_C3", "label": "self.request = FieldStorage()", "type": "assigned_variable", "loc": [57, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "vector": [14, 3, 0.6444, 0.0333, 3, 0.14, 0.0, 952, 3, 3, 0, 0, 892, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L60_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "vector": [14, 3, 0.6667, 0.0111, 3, 0.14, 0.3333, 50, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L62_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "vector": [14, 3, 0.6889, 0.0111, 3, 0.14, 0.6667, 50, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L63_C3", "label": "self.request = FieldStorage()", "type": "assigned_variable", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "vector": [14, 3, 0.7, 0.0111, 3, 0.14, 1.0, 952, 3, 0, 0, 0, 892, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\tself.request = cgi.FieldStorage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2", "label": "if", "type": "if", "loc": [64, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1", "vector": [4, 2, 0.7722, 0.1333, 2, 0.31, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ:\n\t\t\tif self.environ['REQUEST_METHOD'].upper()=='POST':\n\t\t\t\t# we are in a POST, but GET query_string exists\n\t\t\t\t# cgi parses by default POST data, so parse GET QUERY_STRING too\n\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L65_C3", "label": "if", "type": "if", "loc": [65, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2", "vector": [4, 3, 0.7667, 0.1, 3, 0.63, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif self.environ['REQUEST_METHOD'].upper()=='POST':\n\t\t\t\t# we are in a POST, but GET query_string exists\n\t\t\t\t# cgi parses by default POST data, so parse GET QUERY_STRING too\n\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],\n\t\t\t\t\t\t\t},"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L68_C4", "label": "self.get_request = FieldStorage()", "type": "assigned_variable", "loc": [68, 73], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L65_C3", "vector": [14, 4, 0.7833, 0.0667, 4, 0.38, 0.0, 565, 3, 2, 0, 0, 892, 10, 1], "semantic": {"name": "self.get_request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L75_C3", "label": "self.get_request =", "type": "assigned_variable", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2", "vector": [14, 3, 0.8333, 0.0111, 3, 0.63, 1.0, 565, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.get_request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.get_request={}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L77_C1", "label": "has_key", "type": "function", "loc": [77, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "vector": [2, 1, 0.8611, 0.0222, 1, 0.14, 0.6667, 882, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "has_key", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef has_key(self, key):\n\t\treturn self.request.has_key(key) or self.get_request.has_key(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L78_C2", "label": "return", "type": "return", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L77_C1", "vector": [13, 2, 0.8667, 0.0111, 2, 0.26, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn self.request.has_key(key) or self.get_request.has_key(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1", "label": "get", "type": "function", "loc": [80, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "vector": [2, 1, 0.9444, 0.1222, 1, 0.14, 1.0, 607, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "get", "arg_names": ["self", "key", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef get(self, key, default=None):\n\t\tif key in self.request.keys():\n\t\t\tfield = self.request[key]\n\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default\n\t\tif hasattr(field,\"filename\") and field.filename: #file upload, do not convert return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2", "label": "if", "type": "if", "loc": [81, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1", "vector": [4, 2, 0.9278, 0.0667, 2, 0.03, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif key in self.request.keys():\n\t\t\tfield = self.request[key]\n\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L82_C3", "label": "field =", "type": "assigned_variable", "loc": [82, 82], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2", "vector": [14, 3, 0.9111, 0.0111, 3, 0.0, 0.0, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfield = self.request[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2", "label": "if", "type": "if", "loc": [83, 86], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2", "vector": [4, 3, 0.9389, 0.0444, 3, 0.0, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L84_C3", "label": "field =", "type": "assigned_variable", "loc": [84, 84], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2", "vector": [14, 4, 0.9333, 0.0111, 4, 0.05, 0.0, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfield = self.get_request[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L86_C3", "label": "return", "type": "return", "loc": [86, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2", "vector": [13, 4, 0.9556, 0.0111, 4, 0.05, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2", "label": "if", "type": "if", "loc": [87, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1", "vector": [4, 2, 0.9833, 0.0444, 2, 0.03, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif hasattr(field,\"filename\") and field.filename: #file upload, do not convert return value\n\t\t\treturn field\n\t\telse:\n\t\t\treturn field.value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L88_C3", "label": "return", "type": "return", "loc": [88, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2", "vector": [13, 3, 0.9778, 0.0111, 3, 0.41, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn field"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L90_C3", "label": "return", "type": "return", "loc": [90, 90], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2", "vector": [13, 3, 1.0, 0.0111, 3, 0.41, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn field.value"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L43_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L42_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L45_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L49_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Expr_L54_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L57_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L60_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L62_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L63_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L65_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L65_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L64_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L75_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L77_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L77_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L82_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Assign_L84_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L83_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L86_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:FunctionDef_L80_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L88_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_313:If_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_313:Return_L90_C3"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). See config.py for configuration settings """ import os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorConnector( FCKeditorConnectorBase, GetFoldersCommandMixin, GetFoldersAndFilesCommandMixin, CreateFolderCommandMixin, UploadFileCommandMixin, BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ): "The Standard connector class." def doResponse(self): "Main function. Process the request, set headers and return a string as response." s = "" # Check if this connector is disabled if not(Config.Enabled): return self.sendError(1, "This connector is disabled. Please check the connector configurations in \"editor/filemanager/connectors/py/config.py\" and try again.") # Make sure we have valid inputs for key in ("Command","Type","CurrentFolder"): if not self.request.has_key (key): return # Get command, resource type and current folder command = self.request.get("Command") resourceType = self.request.get("Type") currentFolder = getCurrentFolder(self.request.get("CurrentFolder")) # Check for invalid paths if currentFolder is None: if (command == "FileUpload"): return self.sendUploadResults( errorNo = 102, customMsg = "" ) else: return self.sendError(102, "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendError( 1, 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendError( 1, 'Invalid type specified' ) # Setup paths if command == "QuickUpload": self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] else: self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType] self.webUserFilesFolder = Config.FileTypesPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here if (command == "FileUpload"): return self.uploadFile(resourceType, currentFolder) # Create Url url = combinePaths( self.webUserFilesFolder, currentFolder ) # Begin XML s += self.createXmlHeader(command, resourceType, currentFolder, url) # Execute the command selector = {"GetFolders": self.getFolders, "GetFoldersAndFiles": self.getFoldersAndFiles, "CreateFolder": self.createFolder, } s += selector[command](resourceType, currentFolder) s += self.createXmlFooter() return s # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorConnector() data = conn.doResponse() for header in conn.headers: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception()
ajibawa-2023/Python-Code-Large/train/row_314
43
79
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_314:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:ImportFrom_L3_C0", "label": "from fckutil import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:ImportFrom_L4_C0", "label": "from fckcommands import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0506, 0.0127, 0, 0.66, 0.3333, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:ImportFrom_L5_C0", "label": "from fckoutput import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0633, 0.0127, 0, 0.66, 0.5, 314, 0, 1, 0, 0, 314, 0, 0], "semantic": {"name": "fckoutput", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckoutput import * \t# base http, xml and html output mixins"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:ImportFrom_L6_C0", "label": "from fckconnector import FCKeditorConnectorBase", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0759, 0.0127, 0, 0.66, 0.6667, 725, 0, 1, 0, 0, 725, 0, 0], "semantic": {"name": "fckconnector", "arg_names": [], "import_names": ["FCKeditorConnectorBase"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckconnector import FCKeditorConnectorBase # import base connector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Import_L7_C0", "label": "config import Config", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0886, 0.0127, 0, 0.66, 0.8333, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:ClassDef_L9_C0", "label": "FCKeditorConnector", "type": "class", "loc": [9, 78], "level": 0, "parent": null, "vector": [3, 0, 0.5506, 0.8861, 0, 0.66, 1.0, 439, 0, 1, 0, 0, 693, 0, 19], "semantic": {"name": "FCKeditorConnector", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorConnector(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tGetFoldersCommandMixin,\n\t\t\t\t\t\t\tGetFoldersAndFilesCommandMixin,\n\t\t\t\t\t\t\tCreateFolderCommandMixin,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t\t\t\t\tBaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ):\n\t\"The Standard connector class.\"\n\tdef doResponse(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L15_C1", "label": "expression", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:ClassDef_L9_C0", "vector": [8, 1, 0.1899, 0.0127, 1, 0.2, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"The Standard connector class.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "label": "doResponse", "type": "function", "loc": [16, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:ClassDef_L9_C0", "vector": [2, 1, 0.5949, 0.7975, 1, 0.2, 1.0, 492, 0, 1, 1, 0, 0, 0, 19], "semantic": {"name": "doResponse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\ts = \"\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")\n\t\t# Make sure we have valid inputs\n\t\tfor key in (\"Command\",\"Type\",\"CurrentFolder\"):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L17_C2", "label": "expression", "type": "expression", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [8, 2, 0.2152, 0.0127, 2, 0.04, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Main function. Process the request, set headers and return a string as response.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L18_C2", "label": "s =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.2278, 0.0127, 2, 0.04, 0.0625, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ts = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L20_C2", "label": "if", "type": "if", "loc": [20, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.2595, 0.0253, 2, 0.04, 0.125, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not(Config.Enabled):\n\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L21_C3", "label": "return", "type": "return", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L20_C2", "vector": [13, 3, 0.2658, 0.0127, 3, 0.78, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:For_L23_C2", "label": "for key", "type": "for", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [6, 2, 0.3038, 0.038, 2, 0.04, 0.1875, 230, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tfor key in (\"Command\",\"Type\",\"CurrentFolder\"):\n\t\t\tif not self.request.has_key (key):\n\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L24_C3", "label": "if", "type": "if", "loc": [24, 25], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:For_L23_C2", "vector": [4, 3, 0.3101, 0.0253, 3, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif not self.request.has_key (key):\n\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L25_C4", "label": "return", "type": "return", "loc": [25, 25], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L24_C3", "vector": [13, 4, 0.3165, 0.0127, 4, 0.52, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L27_C2", "label": "command = get()", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.3418, 0.0127, 2, 0.04, 0.25, 842, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "command", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tcommand = self.request.get(\"Command\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L28_C2", "label": "resourceType = get()", "type": "assigned_variable", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.3544, 0.0127, 2, 0.04, 0.3125, 551, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "resourceType", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tresourceType = self.request.get(\"Type\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L29_C2", "label": "currentFolder = getCurrentFolder()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.3671, 0.0127, 2, 0.04, 0.375, 885, 3, 1, 0, 0, 970, 10, 2], "semantic": {"name": "currentFolder", "arg_names": [], "import_names": [], "rhs_call_name": "getCurrentFolder", "annotation": ""}, "snippet": "\t\tcurrentFolder = getCurrentFolder(self.request.get(\"CurrentFolder\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L31_C2", "label": "if", "type": "if", "loc": [31, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.4177, 0.0633, 2, 0.04, 0.4375, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif currentFolder is None:\n\t\t\tif (command == \"FileUpload\"):\n\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )\n\t\t\telse:\n\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3", "label": "if", "type": "if", "loc": [32, 35], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L31_C2", "vector": [4, 3, 0.4241, 0.0506, 3, 0.41, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (command == \"FileUpload\"):\n\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )\n\t\t\telse:\n\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L33_C4", "label": "return", "type": "return", "loc": [33, 33], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3", "vector": [13, 4, 0.4177, 0.0127, 4, 0.96, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L35_C4", "label": "return", "type": "return", "loc": [35, 35], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3", "vector": [13, 4, 0.443, 0.0127, 4, 0.96, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L38_C2", "label": "if", "type": "if", "loc": [38, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.4873, 0.0253, 2, 0.04, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not command in Config.ConfigAllowedCommands ):\n\t\t\treturn self.sendError( 1, 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L39_C3", "label": "return", "type": "return", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L38_C2", "vector": [13, 3, 0.4937, 0.0127, 3, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError( 1, 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L41_C2", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.5253, 0.0253, 2, 0.04, 0.5625, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not resourceType in Config.ConfigAllowedTypes ):\n\t\t\treturn self.sendError( 1, 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L42_C3", "label": "return", "type": "return", "loc": [42, 42], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L41_C2", "vector": [13, 3, 0.5316, 0.0127, 3, 0.09, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError( 1, 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "label": "if", "type": "if", "loc": [45, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.6013, 0.0759, 2, 0.04, 0.625, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif command == \"QuickUpload\":\n\t\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]\n\t\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]\n\t\telse:\n\t\t\tself.userFilesFolder = Config.FileTypesAbsolutePath[resourceType]\n\t\t\tself.webUserFilesFolder = Config.FileTypesPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L46_C3", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "vector": [14, 3, 0.5823, 0.0127, 3, 0.96, 0.0, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L47_C3", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "vector": [14, 3, 0.5949, 0.0127, 3, 0.96, 0.3333, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L49_C3", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [49, 49], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "vector": [14, 3, 0.6203, 0.0127, 3, 0.96, 0.6667, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = Config.FileTypesAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L50_C3", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [50, 50], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "vector": [14, 3, 0.6329, 0.0127, 3, 0.96, 1.0, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.webUserFilesFolder = Config.FileTypesPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L52_C2", "label": "if", "type": "if", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.6709, 0.038, 2, 0.04, 0.6875, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not self.userFilesFolder: # no absolute path given (dangerous...)\n\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L53_C3", "label": "self.userFilesFolder = mapServerPath()", "type": "assigned_variable", "loc": [53, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L52_C2", "vector": [14, 3, 0.6772, 0.0253, 3, 0.72, 0.0, 308, 3, 2, 0, 0, 872, 10, 1], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "mapServerPath", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L56_C2", "label": "if", "type": "if", "loc": [56, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.7342, 0.0633, 2, 0.04, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not os.path.exists(self.userFilesFolder):\n\t\t\ttry:\n\t\t\t\tself.createServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3", "label": "try", "type": "try", "loc": [57, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L56_C2", "vector": [7, 3, 0.7405, 0.0506, 3, 0.32, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tself.createServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L58_C4", "label": "createServerFolder()", "type": "expression", "loc": [58, 58], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3", "vector": [8, 4, 0.7342, 0.0127, 4, 0.93, 0.0, 611, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "createServerFolder", "arg_names": [], "import_names": [], "rhs_call_name": "createServerFolder", "annotation": ""}, "snippet": "\t\t\t\tself.createServerFolder( self.userFilesFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L60_C4", "label": "return", "type": "return", "loc": [60, 60], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3", "vector": [13, 4, 0.7595, 0.0127, 4, 0.93, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:If_L63_C2", "label": "if", "type": "if", "loc": [63, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [4, 2, 0.8038, 0.0253, 2, 0.04, 0.8125, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif (command == \"FileUpload\"):\n\t\t\treturn self.uploadFile(resourceType, currentFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L64_C3", "label": "return", "type": "return", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:If_L63_C2", "vector": [13, 3, 0.8101, 0.0127, 3, 0.13, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.uploadFile(resourceType, currentFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L67_C2", "label": "url = combinePaths()", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.8481, 0.0127, 2, 0.04, 0.875, 789, 3, 2, 0, 0, 334, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "combinePaths", "annotation": ""}, "snippet": "\t\turl = combinePaths( self.webUserFilesFolder, currentFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L72_C2", "label": "selector =", "type": "assigned_variable", "loc": [72, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [14, 2, 0.9304, 0.0506, 2, 0.04, 0.9375, 542, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "selector", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tselector = {\"GetFolders\": self.getFolders,\n\t\t\t\t\t\"GetFoldersAndFiles\": self.getFoldersAndFiles,\n\t\t\t\t\t\"CreateFolder\": self.createFolder,\n\t\t\t\t\t}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L78_C2", "label": "return", "type": "return", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "vector": [13, 2, 0.9873, 0.0127, 2, 0.04, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn s"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_314:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L21_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:For_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:For_L23_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L24_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L31_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L32_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L39_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L42_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L46_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L47_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L49_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L50_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L53_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:Try_L57_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:If_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:If_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L64_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_314:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_314:Return_L78_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). """ from time import gmtime, strftime import string def escape(text, replace=string.replace): """ Converts the special characters '<', '>', and '&'. RFC 1866 specifies that these characters be represented in HTML as &lt; &gt; and &amp; respectively. In Python 1.5 we use the new string.replace() function for speed. """ text = replace(text, '&', '&amp;') # must be done 1st text = replace(text, '<', '&lt;') text = replace(text, '>', '&gt;') text = replace(text, '"', '&quot;') return text def convertToXmlAttribute(value): if (value is None): value = "" return escape(value) class BaseHttpMixin(object): def setHttpHeaders(self, content_type='text/xml'): "Purpose: to prepare the headers for the xml to return" # Prevent the browser from caching the result. # Date in the past self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT') # always modified self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime())) # HTTP/1.1 self.setHeader('Cache-Control','no-store, no-cache, must-revalidate') self.setHeader('Cache-Control','post-check=0, pre-check=0') # HTTP/1.0 self.setHeader('Pragma','no-cache') # Set the response format. self.setHeader( 'Content-Type', content_type + '; charset=utf-8' ) return class BaseXmlMixin(object): def createXmlHeader(self, command, resourceType, currentFolder, url): "Purpose: returns the xml header" self.setHttpHeaders() # Create the XML document header s = """<?xml version="1.0" encoding="utf-8" ?>""" # Create the main connector node s += """<Connector command="%s" resourceType="%s">""" % ( command, resourceType ) # Add the current folder node s += """<CurrentFolder path="%s" url="%s" />""" % ( convertToXmlAttribute(currentFolder), convertToXmlAttribute(url), ) return s def createXmlFooter(self): "Purpose: returns the xml footer" return """</Connector>""" def sendError(self, number, text): "Purpose: in the event of an error, return an xml based error" self.setHttpHeaders() return ("""<?xml version="1.0" encoding="utf-8" ?>""" + """<Connector>""" + self.sendErrorNode (number, text) + """</Connector>""" ) def sendErrorNode(self, number, text): if number != 1: return """<Error number="%s" />""" % (number) else: return """<Error number="%s" text="%s" />""" % (number, convertToXmlAttribute(text)) class BaseHtmlMixin(object): def sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ): self.setHttpHeaders("text/html") "This is the function that sends the results of the uploading process" "Minified version of the document.domain automatic fix script (#1919)." "The original script can be found at _dev/domain_fix_template.js" return """<script type="text/javascript"> (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); window.parent.OnUploadCompleted(%(errorNumber)s,"%(fileUrl)s","%(fileName)s","%(customMsg)s"); </script>""" % { 'errorNumber': errorNo, 'fileUrl': fileUrl.replace ('"', '\\"'), 'fileName': fileName.replace ( '"', '\\"' ) , 'customMsg': customMsg.replace ( '"', '\\"' ), }
ajibawa-2023/Python-Code-Large/train/row_316
48
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:ImportFrom_L27_C0", "label": "from time import gmtime, strftime", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["gmtime", "strftime"], "rhs_call_name": "", "annotation": ""}, "snippet": "from time import gmtime, strftime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Import_L28_C0", "label": "string import string", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.2353, 0.0084, 0, 0.66, 0.2857, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "label": "escape", "type": "function", "loc": [30, 42], "level": 0, "parent": null, "vector": [2, 0, 0.3025, 0.1092, 0, 0.66, 0.4286, 494, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "escape", "arg_names": ["text", "replace"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def escape(text, replace=string.replace):\n\t\"\"\"\n\tConverts the special characters '<', '>', and '&'.\n\n\tRFC 1866 specifies that these characters be represented\n\tin HTML as &lt; &gt; and &amp; respectively. In Python\n\t1.5 we use the new string.replace() function for speed.\n\t\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L31_C1", "label": "expression", "type": "expression", "loc": [31, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [8, 1, 0.2857, 0.0588, 1, 0.12, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"\"\"\n\tConverts the special characters '<', '>', and '&'.\n\n\tRFC 1866 specifies that these characters be represented\n\tin HTML as &lt; &gt; and &amp; respectively. In Python\n\t1.5 we use the new string.replace() function for speed.\n\t\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L38_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [14, 1, 0.3193, 0.0084, 1, 0.12, 0.2, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '&', '&amp;') # must be done 1st"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L39_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [14, 1, 0.3277, 0.0084, 1, 0.12, 0.4, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '<', '&lt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L40_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [14, 1, 0.3361, 0.0084, 1, 0.12, 0.6, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '>', '&gt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L41_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [14, 1, 0.3445, 0.0084, 1, 0.12, 0.8, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '\"', '&quot;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L42_C1", "label": "return", "type": "return", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "vector": [13, 1, 0.3529, 0.0084, 1, 0.12, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L44_C0", "label": "convertToXmlAttribute", "type": "function", "loc": [44, 47], "level": 0, "parent": null, "vector": [2, 0, 0.3824, 0.0336, 0, 0.66, 0.5714, 746, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "convertToXmlAttribute", "arg_names": ["value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def convertToXmlAttribute(value):\n\tif (value is None):\n\t\tvalue = \"\"\n\treturn escape(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:If_L45_C1", "label": "if", "type": "if", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L44_C0", "vector": [4, 1, 0.3824, 0.0168, 1, 0.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tif (value is None):\n\t\tvalue = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L46_C2", "label": "value =", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:If_L45_C1", "vector": [14, 2, 0.3866, 0.0084, 2, 0.01, 0.0, 441, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tvalue = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L47_C1", "label": "return", "type": "return", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L44_C0", "vector": [13, 1, 0.395, 0.0084, 1, 0.8, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn escape(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L49_C0", "label": "BaseHttpMixin", "type": "class", "loc": [49, 65], "level": 0, "parent": null, "vector": [3, 0, 0.479, 0.1429, 0, 0.66, 0.7143, 519, 0, 1, 0, 0, 186, 0, 8], "semantic": {"name": "BaseHttpMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseHttpMixin(object):\n\tdef setHttpHeaders(self, content_type='text/xml'):\n\t\t\"Purpose: to prepare the headers for the xml to return\"\n\t\t# Prevent the browser from caching the result.\n\t\t# Date in the past\n\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')\n\t\t# always modified\n\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "label": "setHttpHeaders", "type": "function", "loc": [50, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L49_C0", "vector": [2, 1, 0.4832, 0.1345, 1, 0.28, 0.0, 32, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "setHttpHeaders", "arg_names": ["self", "content_type"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef setHttpHeaders(self, content_type='text/xml'):\n\t\t\"Purpose: to prepare the headers for the xml to return\"\n\t\t# Prevent the browser from caching the result.\n\t\t# Date in the past\n\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')\n\t\t# always modified\n\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))\n\t\t# HTTP/1.1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L51_C2", "label": "expression", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.4286, 0.0084, 2, 0.63, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: to prepare the headers for the xml to return\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L54_C2", "label": "setHeader()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.4538, 0.0084, 2, 0.63, 0.1429, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L56_C2", "label": "setHeader()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.4706, 0.0084, 2, 0.63, 0.2857, 623, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L58_C2", "label": "setHeader()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.4874, 0.0084, 2, 0.63, 0.4286, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Cache-Control','no-store, no-cache, must-revalidate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L59_C2", "label": "setHeader()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.4958, 0.0084, 2, 0.63, 0.5714, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Cache-Control','post-check=0, pre-check=0')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L61_C2", "label": "setHeader()", "type": "expression", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.5126, 0.0084, 2, 0.63, 0.7143, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Pragma','no-cache')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L64_C2", "label": "setHeader()", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [8, 2, 0.5378, 0.0084, 2, 0.63, 0.8571, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader( 'Content-Type', content_type + '; charset=utf-8' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L65_C2", "label": "return", "type": "return", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "vector": [13, 2, 0.5462, 0.0084, 2, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "label": "BaseXmlMixin", "type": "class", "loc": [67, 101], "level": 0, "parent": null, "vector": [3, 0, 0.7059, 0.2941, 0, 0.66, 0.8571, 52, 0, 4, 0, 0, 186, 0, 6], "semantic": {"name": "BaseXmlMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseXmlMixin(object):\n\tdef createXmlHeader(self, command, resourceType, currentFolder, url):\n\t\t\"Purpose: returns the xml header\"\n\t\tself.setHttpHeaders()\n\t\t# Create the XML document header\n\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\"\n\t\t# Create the main connector node\n\t\ts += \"\"\"<Connector command=\"%s\" resourceType=\"%s\">\"\"\" % ("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "label": "createXmlHeader", "type": "function", "loc": [68, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "vector": [2, 1, 0.6345, 0.1345, 1, 0.83, 0.0, 310, 0, 5, 1, 0, 0, 0, 3], "semantic": {"name": "createXmlHeader", "arg_names": ["self", "command", "resourceType", "currentFolder", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef createXmlHeader(self, command, resourceType, currentFolder, url):\n\t\t\"Purpose: returns the xml header\"\n\t\tself.setHttpHeaders()\n\t\t# Create the XML document header\n\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\"\n\t\t# Create the main connector node\n\t\ts += \"\"\"<Connector command=\"%s\" resourceType=\"%s\">\"\"\" % (\n\t\t\t\tcommand,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L69_C2", "label": "expression", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "vector": [8, 2, 0.5798, 0.0084, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: returns the xml header\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L70_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "vector": [8, 2, 0.5882, 0.0084, 2, 0.79, 0.3333, 32, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L72_C2", "label": "s =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "vector": [14, 2, 0.605, 0.0084, 2, 0.79, 0.6667, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L83_C2", "label": "return", "type": "return", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "vector": [13, 2, 0.6975, 0.0084, 2, 0.79, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1", "label": "createXmlFooter", "type": "function", "loc": [85, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "vector": [2, 1, 0.7227, 0.0252, 1, 0.83, 0.3333, 453, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "createXmlFooter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef createXmlFooter(self):\n\t\t\"Purpose: returns the xml footer\"\n\t\treturn \"\"\"</Connector>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L86_C2", "label": "expression", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1", "vector": [8, 2, 0.7227, 0.0084, 2, 0.03, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: returns the xml footer\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L87_C2", "label": "return", "type": "return", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1", "vector": [13, 2, 0.7311, 0.0084, 2, 0.03, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn \"\"\"</Connector>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "label": "sendError", "type": "function", "loc": [89, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "vector": [2, 1, 0.7731, 0.0588, 1, 0.83, 0.6667, 543, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "sendError", "arg_names": ["self", "number", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendError(self, number, text):\n\t\t\"Purpose: in the event of an error, return an xml based error\"\n\t\tself.setHttpHeaders()\n\t\treturn (\"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\" +\n\t\t\t\t\"\"\"<Connector>\"\"\" +\n\t\t\t\tself.sendErrorNode (number, text) +\n\t\t\t\t\"\"\"</Connector>\"\"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L90_C2", "label": "expression", "type": "expression", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "vector": [8, 2, 0.7563, 0.0084, 2, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: in the event of an error, return an xml based error\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L91_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "vector": [8, 2, 0.7647, 0.0084, 2, 0.96, 0.5, 32, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L92_C2", "label": "return", "type": "return", "loc": [92, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "vector": [13, 2, 0.7857, 0.0336, 2, 0.96, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn (\"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\" +\n\t\t\t\t\"\"\"<Connector>\"\"\" +\n\t\t\t\tself.sendErrorNode (number, text) +\n\t\t\t\t\"\"\"</Connector>\"\"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L97_C1", "label": "sendErrorNode", "type": "function", "loc": [97, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "vector": [2, 1, 0.8319, 0.042, 1, 0.83, 1.0, 516, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "sendErrorNode", "arg_names": ["self", "number", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendErrorNode(self, number, text):\n\t\tif number != 1:\n\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)\n\t\telse:\n\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2", "label": "if", "type": "if", "loc": [98, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L97_C1", "vector": [4, 2, 0.8361, 0.0336, 2, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif number != 1:\n\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)\n\t\telse:\n\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L99_C3", "label": "return", "type": "return", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2", "vector": [13, 3, 0.8319, 0.0084, 3, 0.55, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L101_C3", "label": "return", "type": "return", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2", "vector": [13, 3, 0.8487, 0.0084, 3, 0.55, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L103_C0", "label": "BaseHtmlMixin", "type": "class", "loc": [103, 119], "level": 0, "parent": null, "vector": [3, 0, 0.9328, 0.1429, 0, 0.66, 1.0, 166, 0, 1, 0, 0, 186, 0, 4], "semantic": {"name": "BaseHtmlMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseHtmlMixin(object):\n\tdef sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ):\n\t\tself.setHttpHeaders(\"text/html\")\n\t\t\"This is the function that sends the results of the uploading process\"\n\n\t\t\"Minified version of the document.domain automatic fix script (#1919).\"\n\t\t\"The original script can be found at _dev/domain_fix_template.js\"\n\t\treturn \"\"\"<script type=\"text/javascript\">"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "label": "sendUploadResults", "type": "function", "loc": [104, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L103_C0", "vector": [2, 1, 0.937, 0.1345, 1, 0.43, 0.0, 110, 0, 5, 1, 0, 0, 0, 4], "semantic": {"name": "sendUploadResults", "arg_names": ["self", "errorNo", "fileUrl", "fileName", "customMsg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ):\n\t\tself.setHttpHeaders(\"text/html\")\n\t\t\"This is the function that sends the results of the uploading process\"\n\n\t\t\"Minified version of the document.domain automatic fix script (#1919).\"\n\t\t\"The original script can be found at _dev/domain_fix_template.js\"\n\t\treturn \"\"\"<script type=\"text/javascript\">\n\t\t\t(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L105_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "vector": [8, 2, 0.8824, 0.0084, 2, 0.89, 0.0, 32, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders(\"text/html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L106_C2", "label": "expression", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "vector": [8, 2, 0.8908, 0.0084, 2, 0.89, 0.25, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"This is the function that sends the results of the uploading process\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L108_C2", "label": "expression", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "vector": [8, 2, 0.9076, 0.0084, 2, 0.89, 0.5, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Minified version of the document.domain automatic fix script (#1919).\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L109_C2", "label": "expression", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "vector": [8, 2, 0.916, 0.0084, 2, 0.89, 0.75, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"The original script can be found at _dev/domain_fix_template.js\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L110_C2", "label": "return", "type": "return", "loc": [110, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "vector": [13, 2, 0.9622, 0.084, 2, 0.89, 1.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn \"\"\"<script type=\"text/javascript\">\n\t\t\t(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n\n\t\t\twindow.parent.OnUploadCompleted(%(errorNumber)s,\"%(fileUrl)s\",\"%(fileName)s\",\"%(customMsg)s\");\n\t\t\t</script>\"\"\" % {\n\t\t\t'errorNumber': errorNo,\n\t\t\t'fileUrl': fileUrl.replace ('\"', '\\\\\"'),\n\t\t\t'fileName': fileName.replace ( '\"', '\\\\\"' ) ,"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L39_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L40_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L41_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L42_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:If_L45_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:If_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L47_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L70_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L86_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L85_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L97_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L99_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:If_L98_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L101_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L105_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L106_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L108_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Expr_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_316:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_316:Return_L110_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Base Connector for Python (CGI and WSGI). See config.py for configuration settings """ import cgi, os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins import config as Config class FCKeditorConnectorBase( object ): "The base connector class. Subclass it to extend functionality (see Zope example)" def __init__(self, environ=None): "Constructor: Here you should parse request fields, initialize variables, etc." self.request = FCKeditorRequest(environ) # Parse request self.headers = [] # Clean Headers if environ: self.environ = environ else: self.environ = os.environ # local functions def setHeader(self, key, value): self.headers.append ((key, value)) return class FCKeditorRequest(object): "A wrapper around the request object" def __init__(self, environ): if environ: # WSGI self.request = cgi.FieldStorage(fp=environ['wsgi.input'], environ=environ, keep_blank_values=1) self.environ = environ else: # plain old cgi self.environ = os.environ self.request = cgi.FieldStorage() if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ: if self.environ['REQUEST_METHOD'].upper()=='POST': # we are in a POST, but GET query_string exists # cgi parses by default POST data, so parse GET QUERY_STRING too self.get_request = cgi.FieldStorage(fp=None, environ={ 'REQUEST_METHOD':'GET', 'QUERY_STRING':self.environ['QUERY_STRING'], }, ) else: self.get_request={} def has_key(self, key): return self.request.has_key(key) or self.get_request.has_key(key) def get(self, key, default=None): if key in self.request.keys(): field = self.request[key] elif key in self.get_request.keys(): field = self.get_request[key] else: return default if hasattr(field,"filename") and field.filename: #file upload, do not convert return value return field else: return field.value
ajibawa-2023/Python-Code-Large/train/row_318
41
90
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.1667, 0.2778, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Import_L28_C0", "label": "cgi import cgi, os", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi", "os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi, os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:ImportFrom_L30_C0", "label": "from fckutil import *", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.0111, 0, 0.66, 0.2857, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:ImportFrom_L31_C0", "label": "from fckcommands import *", "type": "import", "loc": [31, 31], "level": 0, "parent": null, "vector": [1, 0, 0.3444, 0.0111, 0, 0.66, 0.4286, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:ImportFrom_L32_C0", "label": "from fckoutput import *", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.3556, 0.0111, 0, 0.66, 0.5714, 314, 0, 1, 0, 0, 314, 0, 0], "semantic": {"name": "fckoutput", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckoutput import * \t# base http, xml and html output mixins"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Import_L33_C0", "label": "config import Config", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.3667, 0.0111, 0, 0.66, 0.7143, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "label": "FCKeditorConnectorBase", "type": "class", "loc": [35, 51], "level": 0, "parent": null, "vector": [3, 0, 0.4778, 0.1889, 0, 0.66, 0.8571, 693, 0, 2, 0, 0, 186, 0, 2], "semantic": {"name": "FCKeditorConnectorBase", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorConnectorBase( object ):\n\t\"The base connector class. Subclass it to extend functionality (see Zope example)\"\n\n\tdef __init__(self, environ=None):\n\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\"\n\t\tself.request = FCKeditorRequest(environ) # Parse request\n\t\tself.headers = []\t\t\t\t\t\t# Clean Headers\n\t\tif environ:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L36_C1", "label": "expression", "type": "expression", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "vector": [8, 1, 0.4, 0.0111, 1, 0.43, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"The base connector class. Subclass it to extend functionality (see Zope example)\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "label": "__init__", "type": "function", "loc": [38, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "vector": [2, 1, 0.4611, 0.0889, 1, 0.43, 0.5, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "environ"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, environ=None):\n\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\"\n\t\tself.request = FCKeditorRequest(environ) # Parse request\n\t\tself.headers = []\t\t\t\t\t\t# Clean Headers\n\t\tif environ:\n\t\t\tself.environ = environ\n\t\telse:\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L39_C2", "label": "expression", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "vector": [8, 2, 0.4333, 0.0111, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Constructor: Here you should parse request fields, initialize variables, etc.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L40_C2", "label": "self.request = FCKeditorRequest()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "vector": [14, 2, 0.4444, 0.0111, 2, 0.18, 0.3333, 952, 3, 1, 0, 0, 272, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorRequest", "annotation": ""}, "snippet": "\t\tself.request = FCKeditorRequest(environ) # Parse request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L41_C2", "label": "self.headers =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "vector": [14, 2, 0.4556, 0.0111, 2, 0.18, 0.6667, 131, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.headers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.headers = []\t\t\t\t\t\t# Clean Headers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2", "label": "if", "type": "if", "loc": [42, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "vector": [4, 2, 0.4833, 0.0444, 2, 0.18, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif environ:\n\t\t\tself.environ = environ\n\t\telse:\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L43_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2", "vector": [14, 3, 0.4778, 0.0111, 3, 0.47, 0.0, 50, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L45_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2", "vector": [14, 3, 0.5, 0.0111, 3, 0.47, 1.0, 50, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1", "label": "setHeader", "type": "function", "loc": [49, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "vector": [2, 1, 0.5556, 0.0333, 1, 0.43, 1.0, 623, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": ["self", "key", "value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef setHeader(self, key, value):\n\t\tself.headers.append ((key, value))\n\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L50_C2", "label": "append()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1", "vector": [8, 2, 0.5556, 0.0111, 2, 0.98, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": "\t\tself.headers.append ((key, value))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L51_C2", "label": "return", "type": "return", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1", "vector": [13, 2, 0.5667, 0.0111, 2, 0.98, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "label": "FCKeditorRequest", "type": "class", "loc": [53, 90], "level": 0, "parent": null, "vector": [3, 0, 0.7944, 0.4222, 0, 0.66, 1.0, 272, 0, 3, 0, 0, 186, 0, 9], "semantic": {"name": "FCKeditorRequest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorRequest(object):\n\t\"A wrapper around the request object\"\n\tdef __init__(self, environ):\n\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L54_C1", "label": "expression", "type": "expression", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "vector": [8, 1, 0.6, 0.0111, 1, 0.86, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"A wrapper around the request object\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1", "label": "__init__", "type": "function", "loc": [55, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "vector": [2, 1, 0.7222, 0.2333, 1, 0.86, 0.3333, 555, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "__init__", "arg_names": ["self", "environ"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef __init__(self, environ):\n\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ\n\t\telse: # plain old cgi\n\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "label": "if", "type": "if", "loc": [56, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1", "vector": [4, 2, 0.6611, 0.0889, 2, 0.11, 0.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif environ: # WSGI\n\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)\n\t\t\tself.environ = environ\n\t\telse: # plain old cgi\n\t\t\tself.environ = os.environ\n\t\t\tself.request = cgi.FieldStorage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L57_C3", "label": "self.request = FieldStorage()", "type": "assigned_variable", "loc": [57, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "vector": [14, 3, 0.6444, 0.0333, 3, 0.52, 0.0, 952, 3, 3, 0, 0, 892, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\tself.request = cgi.FieldStorage(fp=environ['wsgi.input'],\n\t\t\t\t\t\t\tenviron=environ,\n\t\t\t\t\t\t\tkeep_blank_values=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L60_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "vector": [14, 3, 0.6667, 0.0111, 3, 0.52, 0.3333, 50, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L62_C3", "label": "self.environ =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "vector": [14, 3, 0.6889, 0.0111, 3, 0.52, 0.6667, 50, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.environ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.environ = os.environ"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L63_C3", "label": "self.request = FieldStorage()", "type": "assigned_variable", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "vector": [14, 3, 0.7, 0.0111, 3, 0.52, 1.0, 952, 3, 0, 0, 0, 892, 10, 1], "semantic": {"name": "self.request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\tself.request = cgi.FieldStorage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2", "label": "if", "type": "if", "loc": [64, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1", "vector": [4, 2, 0.7722, 0.1333, 2, 0.11, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ:\n\t\t\tif self.environ['REQUEST_METHOD'].upper()=='POST':\n\t\t\t\t# we are in a POST, but GET query_string exists\n\t\t\t\t# cgi parses by default POST data, so parse GET QUERY_STRING too\n\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L65_C3", "label": "if", "type": "if", "loc": [65, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2", "vector": [4, 3, 0.7667, 0.1, 3, 0.92, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif self.environ['REQUEST_METHOD'].upper()=='POST':\n\t\t\t\t# we are in a POST, but GET query_string exists\n\t\t\t\t# cgi parses by default POST data, so parse GET QUERY_STRING too\n\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],\n\t\t\t\t\t\t\t},"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L68_C4", "label": "self.get_request = FieldStorage()", "type": "assigned_variable", "loc": [68, 73], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L65_C3", "vector": [14, 4, 0.7833, 0.0667, 4, 0.17, 0.0, 565, 3, 2, 0, 0, 892, 10, 1], "semantic": {"name": "self.get_request", "arg_names": [], "import_names": [], "rhs_call_name": "FieldStorage", "annotation": ""}, "snippet": "\t\t\t\tself.get_request = cgi.FieldStorage(fp=None,\n\t\t\t\t\t\t\tenviron={\n\t\t\t\t\t\t\t'REQUEST_METHOD':'GET',\n\t\t\t\t\t\t\t'QUERY_STRING':self.environ['QUERY_STRING'],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L75_C3", "label": "self.get_request =", "type": "assigned_variable", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2", "vector": [14, 3, 0.8333, 0.0111, 3, 0.92, 1.0, 565, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.get_request", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.get_request={}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L77_C1", "label": "has_key", "type": "function", "loc": [77, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "vector": [2, 1, 0.8611, 0.0222, 1, 0.86, 0.6667, 882, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "has_key", "arg_names": ["self", "key"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef has_key(self, key):\n\t\treturn self.request.has_key(key) or self.get_request.has_key(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L78_C2", "label": "return", "type": "return", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L77_C1", "vector": [13, 2, 0.8667, 0.0111, 2, 0.39, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn self.request.has_key(key) or self.get_request.has_key(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1", "label": "get", "type": "function", "loc": [80, 90], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "vector": [2, 1, 0.9444, 0.1222, 1, 0.86, 1.0, 607, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "get", "arg_names": ["self", "key", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef get(self, key, default=None):\n\t\tif key in self.request.keys():\n\t\t\tfield = self.request[key]\n\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default\n\t\tif hasattr(field,\"filename\") and field.filename: #file upload, do not convert return value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2", "label": "if", "type": "if", "loc": [81, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1", "vector": [4, 2, 0.9278, 0.0667, 2, 0.62, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif key in self.request.keys():\n\t\t\tfield = self.request[key]\n\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L82_C3", "label": "field =", "type": "assigned_variable", "loc": [82, 82], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2", "vector": [14, 3, 0.9111, 0.0111, 3, 0.17, 0.0, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfield = self.request[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2", "label": "if", "type": "if", "loc": [83, 86], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2", "vector": [4, 3, 0.9389, 0.0444, 3, 0.17, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\telif key in self.get_request.keys():\n\t\t\tfield = self.get_request[key]\n\t\telse:\n\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L84_C3", "label": "field =", "type": "assigned_variable", "loc": [84, 84], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2", "vector": [14, 4, 0.9333, 0.0111, 4, 0.53, 0.0, 480, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tfield = self.get_request[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L86_C3", "label": "return", "type": "return", "loc": [86, 86], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2", "vector": [13, 4, 0.9556, 0.0111, 4, 0.53, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2", "label": "if", "type": "if", "loc": [87, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1", "vector": [4, 2, 0.9833, 0.0444, 2, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif hasattr(field,\"filename\") and field.filename: #file upload, do not convert return value\n\t\t\treturn field\n\t\telse:\n\t\t\treturn field.value"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L88_C3", "label": "return", "type": "return", "loc": [88, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2", "vector": [13, 3, 0.9778, 0.0111, 3, 0.21, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn field"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L90_C3", "label": "return", "type": "return", "loc": [90, 90], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2", "vector": [13, 3, 1.0, 0.0111, 3, 0.21, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn field.value"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L36_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L43_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L42_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L45_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L49_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Expr_L54_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L57_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L60_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L62_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L63_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L55_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L65_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L65_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L64_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L75_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L77_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L77_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:ClassDef_L53_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L82_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Assign_L84_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L83_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L86_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:FunctionDef_L80_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L88_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_318:If_L87_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_318:Return_L90_C3"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). See config.py for configuration settings """ import os from fckutil import * from fckcommands import * # default command's implementation from fckoutput import * # base http, xml and html output mixins from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorConnector( FCKeditorConnectorBase, GetFoldersCommandMixin, GetFoldersAndFilesCommandMixin, CreateFolderCommandMixin, UploadFileCommandMixin, BaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ): "The Standard connector class." def doResponse(self): "Main function. Process the request, set headers and return a string as response." s = "" # Check if this connector is disabled if not(Config.Enabled): return self.sendError(1, "This connector is disabled. Please check the connector configurations in \"editor/filemanager/connectors/py/config.py\" and try again.") # Make sure we have valid inputs for key in ("Command","Type","CurrentFolder"): if not self.request.has_key (key): return # Get command, resource type and current folder command = self.request.get("Command") resourceType = self.request.get("Type") currentFolder = getCurrentFolder(self.request.get("CurrentFolder")) # Check for invalid paths if currentFolder is None: if (command == "FileUpload"): return self.sendUploadResults( errorNo = 102, customMsg = "" ) else: return self.sendError(102, "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendError( 1, 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendError( 1, 'Invalid type specified' ) # Setup paths if command == "QuickUpload": self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] else: self.userFilesFolder = Config.FileTypesAbsolutePath[resourceType] self.webUserFilesFolder = Config.FileTypesPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here if (command == "FileUpload"): return self.uploadFile(resourceType, currentFolder) # Create Url url = combinePaths( self.webUserFilesFolder, currentFolder ) # Begin XML s += self.createXmlHeader(command, resourceType, currentFolder, url) # Execute the command selector = {"GetFolders": self.getFolders, "GetFoldersAndFiles": self.getFoldersAndFiles, "CreateFolder": self.createFolder, } s += selector[command](resourceType, currentFolder) s += self.createXmlFooter() return s # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorConnector() data = conn.doResponse() for header in conn.headers: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception()
ajibawa-2023/Python-Code-Large/train/row_319
43
79
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_319:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0127, 0.0127, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:ImportFrom_L3_C0", "label": "from fckutil import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:ImportFrom_L4_C0", "label": "from fckcommands import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0506, 0.0127, 0, 0.66, 0.3333, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:ImportFrom_L5_C0", "label": "from fckoutput import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0633, 0.0127, 0, 0.66, 0.5, 314, 0, 1, 0, 0, 314, 0, 0], "semantic": {"name": "fckoutput", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckoutput import * \t# base http, xml and html output mixins"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:ImportFrom_L6_C0", "label": "from fckconnector import FCKeditorConnectorBase", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0759, 0.0127, 0, 0.66, 0.6667, 725, 0, 1, 0, 0, 725, 0, 0], "semantic": {"name": "fckconnector", "arg_names": [], "import_names": ["FCKeditorConnectorBase"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckconnector import FCKeditorConnectorBase # import base connector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Import_L7_C0", "label": "config import Config", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0886, 0.0127, 0, 0.66, 0.8333, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:ClassDef_L9_C0", "label": "FCKeditorConnector", "type": "class", "loc": [9, 78], "level": 0, "parent": null, "vector": [3, 0, 0.5506, 0.8861, 0, 0.66, 1.0, 439, 0, 1, 0, 0, 693, 0, 19], "semantic": {"name": "FCKeditorConnector", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorConnector(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tGetFoldersCommandMixin,\n\t\t\t\t\t\t\tGetFoldersAndFilesCommandMixin,\n\t\t\t\t\t\t\tCreateFolderCommandMixin,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t\t\t\t\tBaseHttpMixin, BaseXmlMixin, BaseHtmlMixin ):\n\t\"The Standard connector class.\"\n\tdef doResponse(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L15_C1", "label": "expression", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:ClassDef_L9_C0", "vector": [8, 1, 0.1899, 0.0127, 1, 0.86, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"The Standard connector class.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "label": "doResponse", "type": "function", "loc": [16, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:ClassDef_L9_C0", "vector": [2, 1, 0.5949, 0.7975, 1, 0.86, 1.0, 492, 0, 1, 1, 0, 0, 0, 19], "semantic": {"name": "doResponse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\ts = \"\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")\n\t\t# Make sure we have valid inputs\n\t\tfor key in (\"Command\",\"Type\",\"CurrentFolder\"):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L17_C2", "label": "expression", "type": "expression", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [8, 2, 0.2152, 0.0127, 2, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Main function. Process the request, set headers and return a string as response.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L18_C2", "label": "s =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.2278, 0.0127, 2, 0.46, 0.0625, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ts = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L20_C2", "label": "if", "type": "if", "loc": [20, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.2595, 0.0253, 2, 0.46, 0.125, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not(Config.Enabled):\n\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L21_C3", "label": "return", "type": "return", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L20_C2", "vector": [13, 3, 0.2658, 0.0127, 3, 0.65, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError(1, \"This connector is disabled. Please check the connector configurations in \\\"editor/filemanager/connectors/py/config.py\\\" and try again.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:For_L23_C2", "label": "for key", "type": "for", "loc": [23, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [6, 2, 0.3038, 0.038, 2, 0.46, 0.1875, 230, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tfor key in (\"Command\",\"Type\",\"CurrentFolder\"):\n\t\t\tif not self.request.has_key (key):\n\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L24_C3", "label": "if", "type": "if", "loc": [24, 25], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:For_L23_C2", "vector": [4, 3, 0.3101, 0.0253, 3, 0.91, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif not self.request.has_key (key):\n\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L25_C4", "label": "return", "type": "return", "loc": [25, 25], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L24_C3", "vector": [13, 4, 0.3165, 0.0127, 4, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L27_C2", "label": "command = get()", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.3418, 0.0127, 2, 0.46, 0.25, 842, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "command", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tcommand = self.request.get(\"Command\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L28_C2", "label": "resourceType = get()", "type": "assigned_variable", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.3544, 0.0127, 2, 0.46, 0.3125, 551, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "resourceType", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tresourceType = self.request.get(\"Type\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L29_C2", "label": "currentFolder = getCurrentFolder()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.3671, 0.0127, 2, 0.46, 0.375, 885, 3, 1, 0, 0, 970, 10, 2], "semantic": {"name": "currentFolder", "arg_names": [], "import_names": [], "rhs_call_name": "getCurrentFolder", "annotation": ""}, "snippet": "\t\tcurrentFolder = getCurrentFolder(self.request.get(\"CurrentFolder\"))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L31_C2", "label": "if", "type": "if", "loc": [31, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.4177, 0.0633, 2, 0.46, 0.4375, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif currentFolder is None:\n\t\t\tif (command == \"FileUpload\"):\n\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )\n\t\t\telse:\n\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3", "label": "if", "type": "if", "loc": [32, 35], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L31_C2", "vector": [4, 3, 0.4241, 0.0506, 3, 0.54, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tif (command == \"FileUpload\"):\n\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )\n\t\t\telse:\n\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L33_C4", "label": "return", "type": "return", "loc": [33, 33], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3", "vector": [13, 4, 0.4177, 0.0127, 4, 0.23, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendUploadResults( errorNo = 102, customMsg = \"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L35_C4", "label": "return", "type": "return", "loc": [35, 35], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3", "vector": [13, 4, 0.443, 0.0127, 4, 0.23, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(102, \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L38_C2", "label": "if", "type": "if", "loc": [38, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.4873, 0.0253, 2, 0.46, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not command in Config.ConfigAllowedCommands ):\n\t\t\treturn self.sendError( 1, 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L39_C3", "label": "return", "type": "return", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L38_C2", "vector": [13, 3, 0.4937, 0.0127, 3, 0.4, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError( 1, 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L41_C2", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.5253, 0.0253, 2, 0.46, 0.5625, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not resourceType in Config.ConfigAllowedTypes ):\n\t\t\treturn self.sendError( 1, 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L42_C3", "label": "return", "type": "return", "loc": [42, 42], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L41_C2", "vector": [13, 3, 0.5316, 0.0127, 3, 0.74, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendError( 1, 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "label": "if", "type": "if", "loc": [45, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.6013, 0.0759, 2, 0.46, 0.625, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif command == \"QuickUpload\":\n\t\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]\n\t\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]\n\t\telse:\n\t\t\tself.userFilesFolder = Config.FileTypesAbsolutePath[resourceType]\n\t\t\tself.webUserFilesFolder = Config.FileTypesPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L46_C3", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "vector": [14, 3, 0.5823, 0.0127, 3, 0.39, 0.0, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L47_C3", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "vector": [14, 3, 0.5949, 0.0127, 3, 0.39, 0.3333, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L49_C3", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [49, 49], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "vector": [14, 3, 0.6203, 0.0127, 3, 0.39, 0.6667, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = Config.FileTypesAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L50_C3", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [50, 50], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "vector": [14, 3, 0.6329, 0.0127, 3, 0.39, 1.0, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\tself.webUserFilesFolder = Config.FileTypesPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L52_C2", "label": "if", "type": "if", "loc": [52, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.6709, 0.038, 2, 0.46, 0.6875, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not self.userFilesFolder: # no absolute path given (dangerous...)\n\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L53_C3", "label": "self.userFilesFolder = mapServerPath()", "type": "assigned_variable", "loc": [53, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L52_C2", "vector": [14, 3, 0.6772, 0.0253, 3, 0.66, 0.0, 308, 3, 2, 0, 0, 872, 10, 1], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "mapServerPath", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L56_C2", "label": "if", "type": "if", "loc": [56, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.7342, 0.0633, 2, 0.46, 0.75, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not os.path.exists(self.userFilesFolder):\n\t\t\ttry:\n\t\t\t\tself.createServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3", "label": "try", "type": "try", "loc": [57, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L56_C2", "vector": [7, 3, 0.7405, 0.0506, 3, 0.02, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tself.createServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L58_C4", "label": "createServerFolder()", "type": "expression", "loc": [58, 58], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3", "vector": [8, 4, 0.7342, 0.0127, 4, 0.08, 0.0, 611, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "createServerFolder", "arg_names": [], "import_names": [], "rhs_call_name": "createServerFolder", "annotation": ""}, "snippet": "\t\t\t\tself.createServerFolder( self.userFilesFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L60_C4", "label": "return", "type": "return", "loc": [60, 60], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3", "vector": [13, 4, 0.7595, 0.0127, 4, 0.08, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:If_L63_C2", "label": "if", "type": "if", "loc": [63, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [4, 2, 0.8038, 0.0253, 2, 0.46, 0.8125, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif (command == \"FileUpload\"):\n\t\t\treturn self.uploadFile(resourceType, currentFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L64_C3", "label": "return", "type": "return", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:If_L63_C2", "vector": [13, 3, 0.8101, 0.0127, 3, 0.24, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.uploadFile(resourceType, currentFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L67_C2", "label": "url = combinePaths()", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.8481, 0.0127, 2, 0.46, 0.875, 789, 3, 2, 0, 0, 334, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "combinePaths", "annotation": ""}, "snippet": "\t\turl = combinePaths( self.webUserFilesFolder, currentFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L72_C2", "label": "selector =", "type": "assigned_variable", "loc": [72, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [14, 2, 0.9304, 0.0506, 2, 0.46, 0.9375, 542, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "selector", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tselector = {\"GetFolders\": self.getFolders,\n\t\t\t\t\t\"GetFoldersAndFiles\": self.getFoldersAndFiles,\n\t\t\t\t\t\"CreateFolder\": self.createFolder,\n\t\t\t\t\t}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L78_C2", "label": "return", "type": "return", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "vector": [13, 2, 0.9873, 0.0127, 2, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn s"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_319:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L15_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L21_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:For_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:For_L23_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L24_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L24_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L31_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L32_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L39_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L41_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L42_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L46_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L47_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L49_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L45_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L50_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L53_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L56_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Expr_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:Try_L57_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:If_L63_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:If_L63_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L64_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_319:FunctionDef_L16_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_319:Return_L78_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector for Python (CGI and WSGI). """ from time import gmtime, strftime import string def escape(text, replace=string.replace): """ Converts the special characters '<', '>', and '&'. RFC 1866 specifies that these characters be represented in HTML as &lt; &gt; and &amp; respectively. In Python 1.5 we use the new string.replace() function for speed. """ text = replace(text, '&', '&amp;') # must be done 1st text = replace(text, '<', '&lt;') text = replace(text, '>', '&gt;') text = replace(text, '"', '&quot;') return text def convertToXmlAttribute(value): if (value is None): value = "" return escape(value) class BaseHttpMixin(object): def setHttpHeaders(self, content_type='text/xml'): "Purpose: to prepare the headers for the xml to return" # Prevent the browser from caching the result. # Date in the past self.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT') # always modified self.setHeader('Last-Modified',strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime())) # HTTP/1.1 self.setHeader('Cache-Control','no-store, no-cache, must-revalidate') self.setHeader('Cache-Control','post-check=0, pre-check=0') # HTTP/1.0 self.setHeader('Pragma','no-cache') # Set the response format. self.setHeader( 'Content-Type', content_type + '; charset=utf-8' ) return class BaseXmlMixin(object): def createXmlHeader(self, command, resourceType, currentFolder, url): "Purpose: returns the xml header" self.setHttpHeaders() # Create the XML document header s = """<?xml version="1.0" encoding="utf-8" ?>""" # Create the main connector node s += """<Connector command="%s" resourceType="%s">""" % ( command, resourceType ) # Add the current folder node s += """<CurrentFolder path="%s" url="%s" />""" % ( convertToXmlAttribute(currentFolder), convertToXmlAttribute(url), ) return s def createXmlFooter(self): "Purpose: returns the xml footer" return """</Connector>""" def sendError(self, number, text): "Purpose: in the event of an error, return an xml based error" self.setHttpHeaders() return ("""<?xml version="1.0" encoding="utf-8" ?>""" + """<Connector>""" + self.sendErrorNode (number, text) + """</Connector>""" ) def sendErrorNode(self, number, text): if number != 1: return """<Error number="%s" />""" % (number) else: return """<Error number="%s" text="%s" />""" % (number, convertToXmlAttribute(text)) class BaseHtmlMixin(object): def sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ): self.setHttpHeaders("text/html") "This is the function that sends the results of the uploading process" "Minified version of the document.domain automatic fix script (#1919)." "The original script can be found at _dev/domain_fix_template.js" return """<script type="text/javascript"> (function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})(); window.parent.OnUploadCompleted(%(errorNumber)s,"%(fileUrl)s","%(fileName)s","%(customMsg)s"); </script>""" % { 'errorNumber': errorNo, 'fileUrl': fileUrl.replace ('"', '\\"'), 'fileName': fileName.replace ( '"', '\\"' ) , 'customMsg': customMsg.replace ( '"', '\\"' ), }
ajibawa-2023/Python-Code-Large/train/row_321
48
119
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 25], "level": 0, "parent": null, "vector": [8, 0, 0.1176, 0.1933, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:ImportFrom_L27_C0", "label": "from time import gmtime, strftime", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["gmtime", "strftime"], "rhs_call_name": "", "annotation": ""}, "snippet": "from time import gmtime, strftime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Import_L28_C0", "label": "string import string", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.2353, 0.0084, 0, 0.66, 0.2857, 890, 0, 1, 0, 0, 890, 0, 0], "semantic": {"name": "string", "arg_names": [], "import_names": ["string"], "rhs_call_name": "", "annotation": ""}, "snippet": "import string"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "label": "escape", "type": "function", "loc": [30, 42], "level": 0, "parent": null, "vector": [2, 0, 0.3025, 0.1092, 0, 0.66, 0.4286, 494, 0, 2, 1, 0, 0, 0, 4], "semantic": {"name": "escape", "arg_names": ["text", "replace"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def escape(text, replace=string.replace):\n\t\"\"\"\n\tConverts the special characters '<', '>', and '&'.\n\n\tRFC 1866 specifies that these characters be represented\n\tin HTML as &lt; &gt; and &amp; respectively. In Python\n\t1.5 we use the new string.replace() function for speed.\n\t\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L31_C1", "label": "expression", "type": "expression", "loc": [31, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [8, 1, 0.2857, 0.0588, 1, 0.56, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"\"\"\n\tConverts the special characters '<', '>', and '&'.\n\n\tRFC 1866 specifies that these characters be represented\n\tin HTML as &lt; &gt; and &amp; respectively. In Python\n\t1.5 we use the new string.replace() function for speed.\n\t\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L38_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [14, 1, 0.3193, 0.0084, 1, 0.56, 0.2, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '&', '&amp;') # must be done 1st"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L39_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [14, 1, 0.3277, 0.0084, 1, 0.56, 0.4, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '<', '&lt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L40_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [14, 1, 0.3361, 0.0084, 1, 0.56, 0.6, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '>', '&gt;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L41_C1", "label": "text = replace()", "type": "assigned_variable", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [14, 1, 0.3445, 0.0084, 1, 0.56, 0.8, 439, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": "\ttext = replace(text, '\"', '&quot;')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L42_C1", "label": "return", "type": "return", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "vector": [13, 1, 0.3529, 0.0084, 1, 0.56, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L44_C0", "label": "convertToXmlAttribute", "type": "function", "loc": [44, 47], "level": 0, "parent": null, "vector": [2, 0, 0.3824, 0.0336, 0, 0.66, 0.5714, 746, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "convertToXmlAttribute", "arg_names": ["value"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def convertToXmlAttribute(value):\n\tif (value is None):\n\t\tvalue = \"\"\n\treturn escape(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:If_L45_C1", "label": "if", "type": "if", "loc": [45, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L44_C0", "vector": [4, 1, 0.3824, 0.0168, 1, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tif (value is None):\n\t\tvalue = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L46_C2", "label": "value =", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:If_L45_C1", "vector": [14, 2, 0.3866, 0.0084, 2, 0.08, 0.0, 441, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tvalue = \"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L47_C1", "label": "return", "type": "return", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L44_C0", "vector": [13, 1, 0.395, 0.0084, 1, 0.56, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\treturn escape(value)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L49_C0", "label": "BaseHttpMixin", "type": "class", "loc": [49, 65], "level": 0, "parent": null, "vector": [3, 0, 0.479, 0.1429, 0, 0.66, 0.7143, 519, 0, 1, 0, 0, 186, 0, 8], "semantic": {"name": "BaseHttpMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseHttpMixin(object):\n\tdef setHttpHeaders(self, content_type='text/xml'):\n\t\t\"Purpose: to prepare the headers for the xml to return\"\n\t\t# Prevent the browser from caching the result.\n\t\t# Date in the past\n\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')\n\t\t# always modified\n\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "label": "setHttpHeaders", "type": "function", "loc": [50, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L49_C0", "vector": [2, 1, 0.4832, 0.1345, 1, 0.81, 0.0, 32, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "setHttpHeaders", "arg_names": ["self", "content_type"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef setHttpHeaders(self, content_type='text/xml'):\n\t\t\"Purpose: to prepare the headers for the xml to return\"\n\t\t# Prevent the browser from caching the result.\n\t\t# Date in the past\n\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')\n\t\t# always modified\n\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))\n\t\t# HTTP/1.1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L51_C2", "label": "expression", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.4286, 0.0084, 2, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: to prepare the headers for the xml to return\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L54_C2", "label": "setHeader()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.4538, 0.0084, 2, 0.35, 0.1429, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L56_C2", "label": "setHeader()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.4706, 0.0084, 2, 0.35, 0.2857, 623, 3, 2, 0, 0, 0, 0, 3], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Last-Modified',strftime(\"%a, %d %b %Y %H:%M:%S GMT\", gmtime()))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L58_C2", "label": "setHeader()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.4874, 0.0084, 2, 0.35, 0.4286, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Cache-Control','no-store, no-cache, must-revalidate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L59_C2", "label": "setHeader()", "type": "expression", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.4958, 0.0084, 2, 0.35, 0.5714, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Cache-Control','post-check=0, pre-check=0')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L61_C2", "label": "setHeader()", "type": "expression", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.5126, 0.0084, 2, 0.35, 0.7143, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader('Pragma','no-cache')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L64_C2", "label": "setHeader()", "type": "expression", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [8, 2, 0.5378, 0.0084, 2, 0.35, 0.8571, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setHeader", "arg_names": [], "import_names": [], "rhs_call_name": "setHeader", "annotation": ""}, "snippet": "\t\tself.setHeader( 'Content-Type', content_type + '; charset=utf-8' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L65_C2", "label": "return", "type": "return", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "vector": [13, 2, 0.5462, 0.0084, 2, 0.35, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "label": "BaseXmlMixin", "type": "class", "loc": [67, 101], "level": 0, "parent": null, "vector": [3, 0, 0.7059, 0.2941, 0, 0.66, 0.8571, 52, 0, 4, 0, 0, 186, 0, 6], "semantic": {"name": "BaseXmlMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseXmlMixin(object):\n\tdef createXmlHeader(self, command, resourceType, currentFolder, url):\n\t\t\"Purpose: returns the xml header\"\n\t\tself.setHttpHeaders()\n\t\t# Create the XML document header\n\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\"\n\t\t# Create the main connector node\n\t\ts += \"\"\"<Connector command=\"%s\" resourceType=\"%s\">\"\"\" % ("}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "label": "createXmlHeader", "type": "function", "loc": [68, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "vector": [2, 1, 0.6345, 0.1345, 1, 0.22, 0.0, 310, 0, 5, 1, 0, 0, 0, 3], "semantic": {"name": "createXmlHeader", "arg_names": ["self", "command", "resourceType", "currentFolder", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef createXmlHeader(self, command, resourceType, currentFolder, url):\n\t\t\"Purpose: returns the xml header\"\n\t\tself.setHttpHeaders()\n\t\t# Create the XML document header\n\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\"\n\t\t# Create the main connector node\n\t\ts += \"\"\"<Connector command=\"%s\" resourceType=\"%s\">\"\"\" % (\n\t\t\t\tcommand,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L69_C2", "label": "expression", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "vector": [8, 2, 0.5798, 0.0084, 2, 0.82, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: returns the xml header\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L70_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "vector": [8, 2, 0.5882, 0.0084, 2, 0.82, 0.3333, 32, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L72_C2", "label": "s =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "vector": [14, 2, 0.605, 0.0084, 2, 0.82, 0.6667, 553, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\ts = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L83_C2", "label": "return", "type": "return", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "vector": [13, 2, 0.6975, 0.0084, 2, 0.82, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn s"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1", "label": "createXmlFooter", "type": "function", "loc": [85, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "vector": [2, 1, 0.7227, 0.0252, 1, 0.22, 0.3333, 453, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "createXmlFooter", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef createXmlFooter(self):\n\t\t\"Purpose: returns the xml footer\"\n\t\treturn \"\"\"</Connector>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L86_C2", "label": "expression", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1", "vector": [8, 2, 0.7227, 0.0084, 2, 0.13, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: returns the xml footer\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L87_C2", "label": "return", "type": "return", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1", "vector": [13, 2, 0.7311, 0.0084, 2, 0.13, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn \"\"\"</Connector>\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "label": "sendError", "type": "function", "loc": [89, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "vector": [2, 1, 0.7731, 0.0588, 1, 0.22, 0.6667, 543, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "sendError", "arg_names": ["self", "number", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendError(self, number, text):\n\t\t\"Purpose: in the event of an error, return an xml based error\"\n\t\tself.setHttpHeaders()\n\t\treturn (\"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\" +\n\t\t\t\t\"\"\"<Connector>\"\"\" +\n\t\t\t\tself.sendErrorNode (number, text) +\n\t\t\t\t\"\"\"</Connector>\"\"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L90_C2", "label": "expression", "type": "expression", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "vector": [8, 2, 0.7563, 0.0084, 2, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Purpose: in the event of an error, return an xml based error\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L91_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "vector": [8, 2, 0.7647, 0.0084, 2, 0.77, 0.5, 32, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L92_C2", "label": "return", "type": "return", "loc": [92, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "vector": [13, 2, 0.7857, 0.0336, 2, 0.77, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn (\"\"\"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\"\"\" +\n\t\t\t\t\"\"\"<Connector>\"\"\" +\n\t\t\t\tself.sendErrorNode (number, text) +\n\t\t\t\t\"\"\"</Connector>\"\"\" )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L97_C1", "label": "sendErrorNode", "type": "function", "loc": [97, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "vector": [2, 1, 0.8319, 0.042, 1, 0.22, 1.0, 516, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "sendErrorNode", "arg_names": ["self", "number", "text"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendErrorNode(self, number, text):\n\t\tif number != 1:\n\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)\n\t\telse:\n\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2", "label": "if", "type": "if", "loc": [98, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L97_C1", "vector": [4, 2, 0.8361, 0.0336, 2, 0.53, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif number != 1:\n\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)\n\t\telse:\n\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L99_C3", "label": "return", "type": "return", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2", "vector": [13, 3, 0.8319, 0.0084, 3, 0.91, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn \"\"\"<Error number=\"%s\" />\"\"\" % (number)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L101_C3", "label": "return", "type": "return", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2", "vector": [13, 3, 0.8487, 0.0084, 3, 0.91, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn \"\"\"<Error number=\"%s\" text=\"%s\" />\"\"\" % (number, convertToXmlAttribute(text))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L103_C0", "label": "BaseHtmlMixin", "type": "class", "loc": [103, 119], "level": 0, "parent": null, "vector": [3, 0, 0.9328, 0.1429, 0, 0.66, 1.0, 166, 0, 1, 0, 0, 186, 0, 4], "semantic": {"name": "BaseHtmlMixin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BaseHtmlMixin(object):\n\tdef sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ):\n\t\tself.setHttpHeaders(\"text/html\")\n\t\t\"This is the function that sends the results of the uploading process\"\n\n\t\t\"Minified version of the document.domain automatic fix script (#1919).\"\n\t\t\"The original script can be found at _dev/domain_fix_template.js\"\n\t\treturn \"\"\"<script type=\"text/javascript\">"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "label": "sendUploadResults", "type": "function", "loc": [104, 119], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L103_C0", "vector": [2, 1, 0.937, 0.1345, 1, 0.91, 0.0, 110, 0, 5, 1, 0, 0, 0, 4], "semantic": {"name": "sendUploadResults", "arg_names": ["self", "errorNo", "fileUrl", "fileName", "customMsg"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef sendUploadResults( self, errorNo = 0, fileUrl = '', fileName = '', customMsg = '' ):\n\t\tself.setHttpHeaders(\"text/html\")\n\t\t\"This is the function that sends the results of the uploading process\"\n\n\t\t\"Minified version of the document.domain automatic fix script (#1919).\"\n\t\t\"The original script can be found at _dev/domain_fix_template.js\"\n\t\treturn \"\"\"<script type=\"text/javascript\">\n\t\t\t(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L105_C2", "label": "setHttpHeaders()", "type": "expression", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "vector": [8, 2, 0.8824, 0.0084, 2, 0.24, 0.0, 32, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setHttpHeaders", "arg_names": [], "import_names": [], "rhs_call_name": "setHttpHeaders", "annotation": ""}, "snippet": "\t\tself.setHttpHeaders(\"text/html\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L106_C2", "label": "expression", "type": "expression", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "vector": [8, 2, 0.8908, 0.0084, 2, 0.24, 0.25, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"This is the function that sends the results of the uploading process\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L108_C2", "label": "expression", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "vector": [8, 2, 0.9076, 0.0084, 2, 0.24, 0.5, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Minified version of the document.domain automatic fix script (#1919).\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L109_C2", "label": "expression", "type": "expression", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "vector": [8, 2, 0.916, 0.0084, 2, 0.24, 0.75, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"The original script can be found at _dev/domain_fix_template.js\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L110_C2", "label": "return", "type": "return", "loc": [110, 119], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "vector": [13, 2, 0.9622, 0.084, 2, 0.24, 1.0, 0, 4, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn \"\"\"<script type=\"text/javascript\">\n\t\t\t(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();\n\n\t\t\twindow.parent.OnUploadCompleted(%(errorNumber)s,\"%(fileUrl)s\",\"%(fileName)s\",\"%(customMsg)s\");\n\t\t\t</script>\"\"\" % {\n\t\t\t'errorNumber': errorNo,\n\t\t\t'fileUrl': fileUrl.replace ('\"', '\\\\\"'),\n\t\t\t'fileName': fileName.replace ( '\"', '\\\\\"' ) ,"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L31_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L39_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L40_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L41_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L42_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:If_L45_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:If_L45_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L47_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L49_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L59_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L64_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L50_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L69_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L70_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L68_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L86_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L85_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L89_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L67_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L97_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L97_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L99_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:If_L98_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L101_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:ClassDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L105_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L106_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L108_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Expr_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_321:FunctionDef_L104_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_321:Return_L110_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Connector/QuickUpload for Python (WSGI wrapper). See config.py for configuration settings """ from connector import FCKeditorConnector from upload import FCKeditorQuickUpload import cgitb from cStringIO import StringIO # Running from WSGI capable server (recomended) def App(environ, start_response): "WSGI entry point. Run the connector" if environ['SCRIPT_NAME'].endswith("connector.py"): conn = FCKeditorConnector(environ) elif environ['SCRIPT_NAME'].endswith("upload.py"): conn = FCKeditorQuickUpload(environ) else: start_response ("200 Ok", [('Content-Type','text/html')]) yield "Unknown page requested: " yield environ['SCRIPT_NAME'] return try: # run the connector data = conn.doResponse() # Start WSGI response: start_response ("200 Ok", conn.headers) # Send response text yield data except: start_response("500 Internal Server Error",[("Content-type","text/html")]) file = StringIO() cgitb.Hook(file = file).handle() yield file.getvalue()
ajibawa-2023/Python-Code-Large/train/row_322
23
58
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L3_C0", "label": "expression", "type": "expression", "loc": [3, 27], "level": 0, "parent": null, "vector": [8, 0, 0.2586, 0.431, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:ImportFrom_L29_C0", "label": "from connector import FCKeditorConnector", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0], "semantic": {"name": "connector", "arg_names": [], "import_names": ["FCKeditorConnector"], "rhs_call_name": "", "annotation": ""}, "snippet": "from connector import FCKeditorConnector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:ImportFrom_L30_C0", "label": "from upload import FCKeditorQuickUpload", "type": "import", "loc": [30, 30], "level": 0, "parent": null, "vector": [1, 0, 0.5172, 0.0172, 0, 0.66, 0.4, 920, 0, 1, 0, 0, 920, 0, 0], "semantic": {"name": "upload", "arg_names": [], "import_names": ["FCKeditorQuickUpload"], "rhs_call_name": "", "annotation": ""}, "snippet": "from upload import FCKeditorQuickUpload"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Import_L32_C0", "label": "cgitb import cgitb", "type": "import", "loc": [32, 32], "level": 0, "parent": null, "vector": [1, 0, 0.5517, 0.0172, 0, 0.66, 0.6, 691, 0, 1, 0, 0, 691, 0, 0], "semantic": {"name": "cgitb", "arg_names": [], "import_names": ["cgitb"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgitb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:ImportFrom_L33_C0", "label": "from cStringIO import StringIO", "type": "import", "loc": [33, 33], "level": 0, "parent": null, "vector": [1, 0, 0.569, 0.0172, 0, 0.66, 0.8, 764, 0, 1, 0, 0, 764, 0, 0], "semantic": {"name": "cStringIO", "arg_names": [], "import_names": ["StringIO"], "rhs_call_name": "", "annotation": ""}, "snippet": "from cStringIO import StringIO"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "label": "App", "type": "function", "loc": [36, 58], "level": 0, "parent": null, "vector": [2, 0, 0.8103, 0.3966, 0, 0.66, 1.0, 789, 0, 2, 0, 0, 0, 0, 12], "semantic": {"name": "App", "arg_names": ["environ", "start_response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def App(environ, start_response):\n\t\"WSGI entry point. Run the connector\"\n\tif environ['SCRIPT_NAME'].endswith(\"connector.py\"):\n\t\tconn = FCKeditorConnector(environ)\n\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L37_C1", "label": "expression", "type": "expression", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "vector": [8, 1, 0.6379, 0.0172, 1, 0.6, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\"WSGI entry point. Run the connector\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1", "label": "if", "type": "if", "loc": [38, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "vector": [4, 1, 0.7241, 0.1552, 1, 0.6, 0.5, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tif environ['SCRIPT_NAME'].endswith(\"connector.py\"):\n\t\tconn = FCKeditorConnector(environ)\n\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])\n\t\tyield \"Unknown page requested: \"\n\t\tyield environ['SCRIPT_NAME']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L39_C2", "label": "conn = FCKeditorConnector()", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1", "vector": [14, 2, 0.6724, 0.0172, 2, 0.48, 0.0, 345, 3, 1, 0, 0, 439, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorConnector", "annotation": ""}, "snippet": "\t\tconn = FCKeditorConnector(environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "label": "if", "type": "if", "loc": [40, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1", "vector": [4, 2, 0.7414, 0.1207, 2, 0.48, 1.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\telif environ['SCRIPT_NAME'].endswith(\"upload.py\"):\n\t\tconn = FCKeditorQuickUpload(environ)\n\telse:\n\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])\n\t\tyield \"Unknown page requested: \"\n\t\tyield environ['SCRIPT_NAME']\n\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L41_C2", "label": "conn = FCKeditorQuickUpload()", "type": "assigned_variable", "loc": [41, 41], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "vector": [14, 3, 0.7069, 0.0172, 3, 0.7, 0.0, 345, 3, 1, 0, 0, 339, 10, 1], "semantic": {"name": "conn", "arg_names": [], "import_names": [], "rhs_call_name": "FCKeditorQuickUpload", "annotation": ""}, "snippet": "\t\tconn = FCKeditorQuickUpload(environ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L43_C2", "label": "start_response()", "type": "expression", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "vector": [8, 3, 0.7414, 0.0172, 3, 0.7, 0.25, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response (\"200 Ok\", [('Content-Type','text/html')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L44_C2", "label": "expression", "type": "expression", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "vector": [8, 3, 0.7586, 0.0172, 3, 0.7, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield \"Unknown page requested: \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L45_C2", "label": "expression", "type": "expression", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "vector": [8, 3, 0.7759, 0.0172, 3, 0.7, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield environ['SCRIPT_NAME']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Return_L46_C2", "label": "return", "type": "return", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "vector": [13, 3, 0.7931, 0.0172, 3, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "label": "try", "type": "try", "loc": [47, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "vector": [7, 1, 0.9052, 0.2069, 1, 0.6, 1.0, 0, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\ttry:\n\t\t# run the connector\n\t\tdata = conn.doResponse()\n\t\t# Start WSGI response:\n\t\tstart_response (\"200 Ok\", conn.headers)\n\t\t# Send response text\n\t\tyield data\n\texcept:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L49_C2", "label": "data = doResponse()", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [14, 2, 0.8448, 0.0172, 2, 0.56, 0.0, 929, 3, 0, 0, 0, 492, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "doResponse", "annotation": ""}, "snippet": "\t\tdata = conn.doResponse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L51_C2", "label": "start_response()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [8, 2, 0.8793, 0.0172, 2, 0.56, 0.5, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response (\"200 Ok\", conn.headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L53_C2", "label": "expression", "type": "expression", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [8, 2, 0.9138, 0.0172, 2, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L55_C2", "label": "start_response()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [8, 2, 0.9483, 0.0172, 2, 0.56, 0.0, 638, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "start_response", "arg_names": [], "import_names": [], "rhs_call_name": "start_response", "annotation": ""}, "snippet": "\t\tstart_response(\"500 Internal Server Error\",[(\"Content-type\",\"text/html\")])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L56_C2", "label": "file = StringIO()", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [14, 2, 0.9655, 0.0172, 2, 0.56, 0.3333, 107, 3, 0, 0, 0, 609, 10, 1], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "StringIO", "annotation": ""}, "snippet": "\t\tfile = StringIO()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L57_C2", "label": "handle()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [8, 2, 0.9828, 0.0172, 2, 0.56, 0.6667, 346, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "handle", "arg_names": [], "import_names": [], "rhs_call_name": "handle", "annotation": ""}, "snippet": "\t\tcgitb.Hook(file = file).handle()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L58_C2", "label": "expression", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "vector": [8, 2, 1.0, 0.0172, 2, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tyield file.getvalue()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L37_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L38_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L41_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:If_L40_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Return_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:FunctionDef_L36_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L55_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Assign_L56_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_322:Try_L47_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_322:Expr_L58_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This is the "File Uploader" for Python """ import os from fckutil import * from fckcommands import * # default command's implementation from fckconnector import FCKeditorConnectorBase # import base connector import config as Config class FCKeditorQuickUpload( FCKeditorConnectorBase, UploadFileCommandMixin, BaseHttpMixin, BaseHtmlMixin): def doResponse(self): "Main function. Process the request, set headers and return a string as response." # Check if this connector is disabled if not(Config.Enabled): return self.sendUploadResults(1, "This file uploader is disabled. Please check the \"editor/filemanager/connectors/py/config.py\"") command = 'QuickUpload' # The file type (from the QueryString, by default 'File'). resourceType = self.request.get('Type','File') currentFolder = "/" # Check for invalid paths if currentFolder is None: return self.sendUploadResults(102, '', '', "") # Check if it is an allowed command if ( not command in Config.ConfigAllowedCommands ): return self.sendUploadResults( 1, '', '', 'The %s command isn\'t allowed' % command ) if ( not resourceType in Config.ConfigAllowedTypes ): return self.sendUploadResults( 1, '', '', 'Invalid type specified' ) # Setup paths self.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType] self.webUserFilesFolder = Config.QuickUploadPath[resourceType] if not self.userFilesFolder: # no absolute path given (dangerous...) self.userFilesFolder = mapServerPath(self.environ, self.webUserFilesFolder) # Ensure that the directory exists. if not os.path.exists(self.userFilesFolder): try: self.createServerFoldercreateServerFolder( self.userFilesFolder ) except: return self.sendError(1, "This connector couldn\'t access to local user\'s files directories. Please check the UserFilesAbsolutePath in \"editor/filemanager/connectors/py/config.py\" and try again. ") # File upload doesn't have to return XML, so intercept here return self.uploadFile(resourceType, currentFolder) # Running from command line (plain old CGI) if __name__ == '__main__': try: # Create a Connector Instance conn = FCKeditorQuickUpload() data = conn.doResponse() for header in conn.headers: if not header is None: print '%s: %s' % header print print data except: print "Content-Type: text/plain" print import cgi cgi.print_exception()
ajibawa-2023/Python-Code-Large/train/row_323
28
47
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_323:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0213, 0.0213, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:ImportFrom_L3_C0", "label": "from fckutil import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0], "semantic": {"name": "fckutil", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckutil import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:ImportFrom_L4_C0", "label": "from fckcommands import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0851, 0.0213, 0, 0.66, 0.4, 66, 0, 1, 0, 0, 66, 0, 0], "semantic": {"name": "fckcommands", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckcommands import * \t# default command's implementation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:ImportFrom_L5_C0", "label": "from fckconnector import FCKeditorConnectorBase", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1064, 0.0213, 0, 0.66, 0.6, 725, 0, 1, 0, 0, 725, 0, 0], "semantic": {"name": "fckconnector", "arg_names": [], "import_names": ["FCKeditorConnectorBase"], "rhs_call_name": "", "annotation": ""}, "snippet": "from fckconnector import FCKeditorConnectorBase # import base connector"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Import_L6_C0", "label": "config import Config", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1277, 0.0213, 0, 0.66, 0.8, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["Config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config as Config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:ClassDef_L8_C0", "label": "FCKeditorQuickUpload", "type": "class", "loc": [8, 46], "level": 0, "parent": null, "vector": [3, 0, 0.5745, 0.8298, 0, 0.66, 1.0, 339, 0, 1, 0, 0, 693, 0, 10], "semantic": {"name": "FCKeditorQuickUpload", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t\t\t\t\tBaseHttpMixin, BaseHtmlMixin):\n\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "label": "doResponse", "type": "function", "loc": [11, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:ClassDef_L8_C0", "vector": [2, 1, 0.6064, 0.766, 1, 0.43, 0.0, 492, 0, 1, 1, 0, 0, 0, 10], "semantic": {"name": "doResponse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef doResponse(self):\n\t\t\"Main function. Process the request, set headers and return a string as response.\"\n\t\t# Check if this connector is disabled\n\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")\n\t\tcommand = 'QuickUpload'\n\t\t# The file type (from the QueryString, by default 'File').\n\t\tresourceType = self.request.get('Type','File')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Expr_L12_C2", "label": "expression", "type": "expression", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [8, 2, 0.2553, 0.0213, 2, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\"Main function. Process the request, set headers and return a string as response.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L14_C2", "label": "if", "type": "if", "loc": [14, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.3085, 0.0426, 2, 0.01, 0.0833, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not(Config.Enabled):\n\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L15_C3", "label": "return", "type": "return", "loc": [15, 15], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L14_C2", "vector": [13, 3, 0.3191, 0.0213, 3, 0.88, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults(1, \"This file uploader is disabled. Please check the \\\"editor/filemanager/connectors/py/config.py\\\"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L16_C2", "label": "command =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [14, 2, 0.3404, 0.0213, 2, 0.01, 0.1667, 842, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "command", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcommand = 'QuickUpload'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L18_C2", "label": "resourceType = get()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [14, 2, 0.383, 0.0213, 2, 0.01, 0.25, 551, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "resourceType", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": "\t\tresourceType = self.request.get('Type','File')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L19_C2", "label": "currentFolder =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [14, 2, 0.4043, 0.0213, 2, 0.01, 0.3333, 885, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "currentFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tcurrentFolder = \"/\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L21_C2", "label": "if", "type": "if", "loc": [21, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.4574, 0.0426, 2, 0.01, 0.4167, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif currentFolder is None:\n\t\t\treturn self.sendUploadResults(102, '', '', \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L22_C3", "label": "return", "type": "return", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L21_C2", "vector": [13, 3, 0.4681, 0.0213, 3, 0.91, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults(102, '', '', \"\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L25_C2", "label": "if", "type": "if", "loc": [25, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.5426, 0.0426, 2, 0.01, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not command in Config.ConfigAllowedCommands ):\n\t\t\treturn self.sendUploadResults( 1, '', '', 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L26_C3", "label": "return", "type": "return", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L25_C2", "vector": [13, 3, 0.5532, 0.0213, 3, 0.74, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults( 1, '', '', 'The %s command isn\\'t allowed' % command )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L28_C2", "label": "if", "type": "if", "loc": [28, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.6064, 0.0426, 2, 0.01, 0.5833, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif ( not resourceType in Config.ConfigAllowedTypes ):\n\t\t\treturn self.sendUploadResults( 1, '', '', 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L29_C3", "label": "return", "type": "return", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L28_C2", "vector": [13, 3, 0.617, 0.0213, 3, 0.28, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\treturn self.sendUploadResults( 1, '', '', 'Invalid type specified' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L32_C2", "label": "self.userFilesFolder =", "type": "assigned_variable", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [14, 2, 0.6809, 0.0213, 2, 0.01, 0.6667, 308, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.userFilesFolder = Config.QuickUploadAbsolutePath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L33_C2", "label": "self.webUserFilesFolder =", "type": "assigned_variable", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [14, 2, 0.7021, 0.0213, 2, 0.01, 0.75, 772, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.webUserFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tself.webUserFilesFolder = Config.QuickUploadPath[resourceType]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L34_C2", "label": "if", "type": "if", "loc": [34, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.7447, 0.0638, 2, 0.01, 0.8333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not self.userFilesFolder: # no absolute path given (dangerous...)\n\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L35_C3", "label": "self.userFilesFolder = mapServerPath()", "type": "assigned_variable", "loc": [35, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L34_C2", "vector": [14, 3, 0.7553, 0.0426, 3, 0.19, 0.0, 308, 3, 2, 0, 0, 872, 10, 1], "semantic": {"name": "self.userFilesFolder", "arg_names": [], "import_names": [], "rhs_call_name": "mapServerPath", "annotation": ""}, "snippet": "\t\t\tself.userFilesFolder = mapServerPath(self.environ,\n\t\t\t\t\t\t\t\t\tself.webUserFilesFolder)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:If_L39_C2", "label": "if", "type": "if", "loc": [39, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [4, 2, 0.8723, 0.1064, 2, 0.01, 0.9167, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\tif not os.path.exists(self.userFilesFolder):\n\t\t\ttry:\n\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3", "label": "try", "type": "try", "loc": [40, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:If_L39_C2", "vector": [7, 3, 0.883, 0.0851, 3, 0.06, 0.0, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\ttry:\n\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )\n\t\t\texcept:\n\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Expr_L41_C4", "label": "createServerFoldercreateServerFolder()", "type": "expression", "loc": [41, 41], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3", "vector": [8, 4, 0.8723, 0.0213, 4, 0.9, 0.0, 921, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "createServerFoldercreateServerFolder", "arg_names": [], "import_names": [], "rhs_call_name": "createServerFoldercreateServerFolder", "annotation": ""}, "snippet": "\t\t\t\tself.createServerFoldercreateServerFolder( self.userFilesFolder )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L43_C4", "label": "return", "type": "return", "loc": [43, 43], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3", "vector": [13, 4, 0.9149, 0.0213, 4, 0.9, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\t\t\treturn self.sendError(1, \"This connector couldn\\'t access to local user\\'s files directories. Please check the UserFilesAbsolutePath in \\\"editor/filemanager/connectors/py/config.py\\\" and try again. \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L46_C2", "label": "return", "type": "return", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "vector": [13, 2, 0.9787, 0.0213, 2, 0.01, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn self.uploadFile(resourceType, currentFolder)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_323:ClassDef_L8_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L15_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L21_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L22_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L25_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L26_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L28_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L29_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Assign_L35_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:If_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:If_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:Try_L40_C3", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_323:FunctionDef_L11_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_323:Return_L46_C2"}]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Sample page. """ import cgi import os # Ensure that the fckeditor.py is included in your classpath import fckeditor # Tell the browser to render html print "Content-Type: text/html" print "" # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Python - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.py" method="post" target="_blank"> """ # This is the real work try: sBasePath = os.environ.get("SCRIPT_NAME") sBasePath = sBasePath[0:sBasePath.find("_samples")] oFCKeditor = fckeditor.FCKeditor('FCKeditor1') oFCKeditor.BasePath = sBasePath oFCKeditor.Value = """<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>""" print oFCKeditor.Create() except Exception, e: print e print """ <br> <input type="submit" value="Submit"> </form> """ # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
ajibawa-2023/Python-Code-Large/train/row_325
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_325:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_325:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_325:Import_L4_C0", "label": "fckeditor import fckeditor", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.8, 0.2, 0, 0.66, 1.0, 669, 0, 1, 0, 0, 669, 0, 0], "semantic": {"name": "fckeditor", "arg_names": [], "import_names": ["fckeditor"], "rhs_call_name": "", "annotation": ""}, "snippet": "import fckeditor"}]
[]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This page lists the data posted by a form. """ import cgi import os # Tell the browser to render html print "Content-Type: text/html" print "" try: # Create a cgi object form = cgi.FieldStorage() except Exception, e: print e # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> """ # This is the real work print """ <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> """ for key in form.keys(): try: value = form[key].value print """ <tr> <th>%s</th> <td><pre>%s</pre></td> </tr> """ % (cgi.escape(key), cgi.escape(value)) except Exception, e: print e print "</table>" # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
ajibawa-2023/Python-Code-Large/train/row_326
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_326:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_326:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.6667, 0.3333, 0, 0.66, 1.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}]
[]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == Sample page. """ import cgi import os # Ensure that the fckeditor.py is included in your classpath import fckeditor # Tell the browser to render html print "Content-Type: text/html" print "" # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Sample</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1>FCKeditor - Python - Sample 1</h1> This sample displays a normal HTML form with an FCKeditor with full features enabled. <hr> <form action="sampleposteddata.py" method="post" target="_blank"> """ # This is the real work try: sBasePath = os.environ.get("SCRIPT_NAME") sBasePath = sBasePath[0:sBasePath.find("_samples")] oFCKeditor = fckeditor.FCKeditor('FCKeditor1') oFCKeditor.BasePath = sBasePath oFCKeditor.Value = """<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>""" print oFCKeditor.Create() except Exception, e: print e print """ <br> <input type="submit" value="Submit"> </form> """ # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
ajibawa-2023/Python-Code-Large/train/row_327
3
5
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_327:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.2, 0.2, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_327:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_327:Import_L4_C0", "label": "fckeditor import fckeditor", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.8, 0.2, 0, 0.66, 1.0, 669, 0, 1, 0, 0, 669, 0, 0], "semantic": {"name": "fckeditor", "arg_names": [], "import_names": ["fckeditor"], "rhs_call_name": "", "annotation": ""}, "snippet": "import fckeditor"}]
[]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html - GNU Lesser General Public License Version 2.1 or later (the "LGPL") http://www.gnu.org/licenses/lgpl.html - Mozilla Public License Version 1.1 or later (the "MPL") http://www.mozilla.org/MPL/MPL-1.1.html == END LICENSE == This page lists the data posted by a form. """ import cgi import os # Tell the browser to render html print "Content-Type: text/html" print "" try: # Create a cgi object form = cgi.FieldStorage() except Exception, e: print e # Document header print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FCKeditor - Samples - Posted Data</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="robots" content="noindex, nofollow"> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> """ # This is the real work print """ <h1>FCKeditor - Samples - Posted Data</h1> This page lists all data posted by the form. <hr> <table border="1" cellspacing="0" id="outputSample"> <colgroup><col width="80"><col></colgroup> <thead> <tr> <th>Field Name</th> <th>Value</th> </tr> </thead> """ for key in form.keys(): try: value = form[key].value print """ <tr> <th>%s</th> <td><pre>%s</pre></td> </tr> """ % (cgi.escape(key), cgi.escape(value)) except Exception, e: print e print "</table>" # For testing your environments #print "<hr>" #for key in os.environ.keys(): # print "%s: %s<br>" % (key, os.environ.get(key, "")) #print "<hr>" # Document footer print """ </body> </html> """
ajibawa-2023/Python-Code-Large/train/row_328
2
3
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_328:Import_L1_C0", "label": "cgi import cgi", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.3333, 0.3333, 0, 0.66, 0.0, 934, 0, 1, 0, 0, 934, 0, 0], "semantic": {"name": "cgi", "arg_names": [], "import_names": ["cgi"], "rhs_call_name": "", "annotation": ""}, "snippet": "import cgi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_328:Import_L2_C0", "label": "os import os", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.6667, 0.3333, 0, 0.66, 1.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}]
[]
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the arguments to run ''' process = subprocess.Popen(args, stdout=subprocess.PIPE, universal_newlines = True, shell = False) output = process.communicate()[0] return output.splitlines() def FillMercurialRevisions(filename, parsed_file): ''' Fills the revs attribute of all strings in the given parsed file with a list of revisions that touched the lines corresponding to that string. @param filename: the name of the file to get history for @param parsed_file: the parsed file to modify ''' # Take output of hg annotate to get revision of each line output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename]) # Create a map of line -> revision (key is list index, line 0 doesn't exist) line_revs = ['dummy'] for line in output_lines: rev_match = REVISION_REGEX.match(line) if not rev_match: raise 'Unexpected line of output from hg: %s' % line rev_hash = rev_match.group('hash') line_revs.append(rev_hash) for str in parsed_file.itervalues(): # Get the lines that correspond to each string start_line = str['startLine'] end_line = str['endLine'] # Get the revisions that touched those lines revs = [] for line_number in range(start_line, end_line + 1): revs.append(line_revs[line_number]) # Merge with any revisions that were already there # (for explict revision specification) if 'revs' in str: revs += str['revs'] # Assign the revisions to the string str['revs'] = frozenset(revs) def DoesRevisionSuperceed(filename, rev1, rev2): ''' Tells whether a revision superceeds another. This essentially means that the older revision is an ancestor of the newer one. This also returns True if the two revisions are the same. @param rev1: the revision that may be superceeding the other @param rev2: the revision that may be superceeded @return: True if rev1 superceeds rev2 or they're the same ''' if rev1 == rev2: return True # TODO: Add filename args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\n', filename] output_lines = _GetOutputLines(args) return rev2 in output_lines def NewestRevision(filename, rev1, rev2): ''' Returns which of two revisions is closest to the head of the repository. If none of them is the ancestor of the other, then we return either one. @param rev1: the first revision @param rev2: the second revision ''' if DoesRevisionSuperceed(filename, rev1, rev2): return rev1 return rev2
ajibawa-2023/Python-Code-Large/train/row_329
38
94
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0319, 0.0532, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Import_L7_C0", "label": "re import re", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0745, 0.0106, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Import_L8_C0", "label": "subprocess import subprocess", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0851, 0.0106, 0, 0.66, 0.2857, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L10_C0", "label": "REVISION_REGEX = compile()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.1064, 0.0106, 0, 0.66, 0.4286, 883, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "REVISION_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "label": "_GetOutputLines", "type": "function", "loc": [12, 23], "level": 0, "parent": null, "vector": [2, 0, 0.1862, 0.1277, 0, 0.66, 0.5714, 359, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "_GetOutputLines", "arg_names": ["args"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''\n process = subprocess.Popen(args,\n stdout=subprocess.PIPE,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L13_C2", "label": "expression", "type": "expression", "loc": [13, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "vector": [8, 1, 0.1596, 0.0532, 1, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Runs an external process and returns its output as a list of lines.\n\n @param args: the arguments to run\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L18_C2", "label": "process = Popen()", "type": "assigned_variable", "loc": [18, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "vector": [14, 1, 0.2074, 0.0426, 1, 0.71, 0.3333, 712, 3, 4, 0, 0, 568, 10, 1], "semantic": {"name": "process", "arg_names": [], "import_names": [], "rhs_call_name": "Popen", "annotation": ""}, "snippet": " process = subprocess.Popen(args,\n stdout=subprocess.PIPE,\n universal_newlines = True,\n shell = False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L22_C2", "label": "output =", "type": "assigned_variable", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "vector": [14, 1, 0.234, 0.0106, 1, 0.71, 0.6667, 886, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "output", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " output = process.communicate()[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L23_C2", "label": "return", "type": "return", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "vector": [13, 1, 0.2447, 0.0106, 1, 0.71, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return output.splitlines()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "label": "FillMercurialRevisions", "type": "function", "loc": [26, 62], "level": 0, "parent": null, "vector": [2, 0, 0.4681, 0.3936, 0, 0.66, 0.7143, 942, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "FillMercurialRevisions", "arg_names": ["filename", "parsed_file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def FillMercurialRevisions(filename, parsed_file):\n '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L27_C2", "label": "expression", "type": "expression", "loc": [27, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "vector": [8, 1, 0.3191, 0.0745, 1, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Fills the revs attribute of all strings in the given parsed file with\n a list of revisions that touched the lines corresponding to that string.\n \n @param filename: the name of the file to get history for\n @param parsed_file: the parsed file to modify\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L35_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "vector": [14, 1, 0.3723, 0.0106, 1, 0.91, 0.25, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(['hg', 'annotate', '-c', filename])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L38_C2", "label": "line_revs =", "type": "assigned_variable", "loc": [38, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "vector": [14, 1, 0.4043, 0.0106, 1, 0.91, 0.5, 348, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "line_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line_revs = ['dummy']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "label": "for line", "type": "for", "loc": [39, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "vector": [6, 1, 0.4415, 0.0638, 1, 0.91, 0.75, 373, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in output_lines:\n rev_match = REVISION_REGEX.match(line)\n if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line\n rev_hash = rev_match.group('hash')\n line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L40_C4", "label": "rev_match = match()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "vector": [14, 2, 0.4255, 0.0106, 2, 0.86, 0.0, 931, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "rev_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " rev_match = REVISION_REGEX.match(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:If_L41_C4", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "vector": [4, 2, 0.4415, 0.0213, 2, 0.86, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not rev_match:\n raise 'Unexpected line of output from hg: %s' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L43_C4", "label": "rev_hash = group()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "vector": [14, 2, 0.4574, 0.0106, 2, 0.86, 0.6667, 682, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev_hash", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev_hash = rev_match.group('hash')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L44_C4", "label": "append()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "vector": [8, 2, 0.4681, 0.0106, 2, 0.86, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " line_revs.append(rev_hash)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "label": "for str", "type": "for", "loc": [46, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "vector": [6, 1, 0.5745, 0.1809, 1, 0.91, 1.0, 52, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for str in parsed_file.itervalues():\n # Get the lines that correspond to each string\n start_line = str['startLine']\n end_line = str['endLine']\n\n # Get the revisions that touched those lines\n revs = []\n for line_number in range(start_line, end_line + 1):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L48_C4", "label": "start_line =", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [14, 2, 0.5106, 0.0106, 2, 0.27, 0.0, 501, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start_line = str['startLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L49_C4", "label": "end_line =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [14, 2, 0.5213, 0.0106, 2, 0.27, 0.2, 54, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_line = str['endLine']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L52_C4", "label": "revs =", "type": "assigned_variable", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [14, 2, 0.5532, 0.0106, 2, 0.27, 0.4, 848, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " revs = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:For_L53_C4", "label": "for line_number", "type": "for", "loc": [53, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [6, 2, 0.5691, 0.0213, 2, 0.27, 0.6, 490, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "line_number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line_number in range(start_line, end_line + 1):\n revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L54_C6", "label": "append()", "type": "expression", "loc": [54, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L53_C4", "vector": [8, 3, 0.5745, 0.0106, 3, 0.11, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " revs.append(line_revs[line_number])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:If_L58_C4", "label": "if", "type": "if", "loc": [58, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [4, 2, 0.6223, 0.0213, 2, 0.27, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'revs' in str:\n revs += str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L62_C4", "label": " = frozenset()", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "vector": [14, 2, 0.6596, 0.0106, 2, 0.27, 1.0, 0, 3, 1, 0, 0, 80, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " str['revs'] = frozenset(revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "label": "DoesRevisionSuperceed", "type": "function", "loc": [64, 82], "level": 0, "parent": null, "vector": [2, 0, 0.7766, 0.2021, 0, 0.66, 0.8571, 330, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "DoesRevisionSuperceed", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def DoesRevisionSuperceed(filename, rev1, rev2):\n '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L65_C2", "label": "expression", "type": "expression", "loc": [65, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "vector": [8, 1, 0.7394, 0.1064, 1, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Tells whether a revision superceeds another.\n This essentially means that the older revision is an ancestor of the newer\n one.\n This also returns True if the two revisions are the same.\n\n @param rev1: the revision that may be superceeding the other\n @param rev2: the revision that may be superceeded"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:If_L75_C2", "label": "if", "type": "if", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "vector": [4, 1, 0.8032, 0.0213, 1, 0.8, 0.25, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev1 == rev2:\n return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L76_C4", "label": "return", "type": "return", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:If_L75_C2", "vector": [13, 2, 0.8085, 0.0106, 2, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L79_C2", "label": "args =", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "vector": [14, 1, 0.8404, 0.0106, 1, 0.8, 0.5, 805, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "args", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " args = ['hg', 'log', '-r', 'ancestors(%s)' % rev1, '--template', '{node|short}\\n', filename]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L80_C2", "label": "output_lines = _GetOutputLines()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "vector": [14, 1, 0.8511, 0.0106, 1, 0.8, 0.75, 574, 3, 1, 0, 0, 359, 10, 1], "semantic": {"name": "output_lines", "arg_names": [], "import_names": [], "rhs_call_name": "_GetOutputLines", "annotation": ""}, "snippet": " output_lines = _GetOutputLines(args)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L82_C2", "label": "return", "type": "return", "loc": [82, 82], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "vector": [13, 1, 0.8723, 0.0106, 1, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2 in output_lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "label": "NewestRevision", "type": "function", "loc": [84, 94], "level": 0, "parent": null, "vector": [2, 0, 0.9468, 0.117, 0, 0.66, 1.0, 256, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "NewestRevision", "arg_names": ["filename", "rev1", "rev2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def NewestRevision(filename, rev1, rev2):\n '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L85_C2", "label": "expression", "type": "expression", "loc": [85, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "vector": [8, 1, 0.9362, 0.0745, 1, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns which of two revisions is closest to the head of the repository.\n If none of them is the ancestor of the other, then we return either one.\n\n @param rev1: the first revision\n @param rev2: the second revision\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:If_L92_C2", "label": "if", "type": "if", "loc": [92, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "vector": [4, 1, 0.984, 0.0213, 1, 0.88, 0.5, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if DoesRevisionSuperceed(filename, rev1, rev2):\n return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L93_C4", "label": "return", "type": "return", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:If_L92_C2", "vector": [13, 2, 0.9894, 0.0106, 2, 0.36, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L94_C2", "label": "return", "type": "return", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "vector": [13, 1, 1.0, 0.0106, 1, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return rev2"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L13_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:If_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L39_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L26_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:For_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L54_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:If_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:For_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:If_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:If_L75_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L64_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:If_L92_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:If_L92_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_329:FunctionDef_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_329:Return_L94_C2"}]
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @param languages: a dictionary mapping each language to its corresponding directory ''' self._langs = {} self._master = None self._language_paths = languages parser = StringsParser() for lang, lang_dir in languages.iteritems(): filename = os.path.join(lang_dir, 'strings.xml') parsed_file = parser.Parse(filename) mytracks.history.FillMercurialRevisions(filename, parsed_file) if lang == 'en': self._master = parsed_file else: self._langs[lang] = parsed_file self._Reset() def Validate(self): ''' Computes whether all the data in the files for the given languages is valid. ''' self._Reset() self._ValidateMissingKeys() self._ValidateOutdatedKeys() def valid(self): return (len(self._missing_in_master) == 0 and len(self._missing_in_lang) == 0 and len(self._outdated_in_lang) == 0) def missing_in_master(self): return self._missing_in_master def missing_in_lang(self): return self._missing_in_lang def outdated_in_lang(self): return self._outdated_in_lang def _Reset(self): # These are maps from language to string name list self._missing_in_master = {} self._missing_in_lang = {} self._outdated_in_lang = {} def _ValidateMissingKeys(self): ''' Computes whether there are missing keys on either side. ''' master_keys = frozenset(self._master.iterkeys()) for lang, file in self._langs.iteritems(): keys = frozenset(file.iterkeys()) missing_in_master = keys - master_keys missing_in_lang = master_keys - keys if len(missing_in_master) > 0: self._missing_in_master[lang] = missing_in_master if len(missing_in_lang) > 0: self._missing_in_lang[lang] = missing_in_lang def _ValidateOutdatedKeys(self): ''' Computers whether any of the language keys are outdated with relation to the master keys. ''' for lang, file in self._langs.iteritems(): outdated = [] for key, str in file.iteritems(): # Get all revisions that touched master and language files for this # string. master_str = self._master[key] master_revs = master_str['revs'] lang_revs = str['revs'] if not master_revs or not lang_revs: print 'WARNING: No revision for %s in %s' % (key, lang) continue master_file = os.path.join(self._language_paths['en'], 'strings.xml') lang_file = os.path.join(self._language_paths[lang], 'strings.xml') # Assume that the repository has a single head (TODO: check that), # and as such there is always one revision which superceeds all others. master_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2), master_revs) lang_rev = reduce( lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2), lang_revs) # If the master version is newer than the lang version if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev): outdated.append(key) if len(outdated) > 0: self._outdated_in_lang[lang] = outdated
ajibawa-2023/Python-Code-Large/train/row_330
65
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0304, 0.0522, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Import_L8_C0", "label": "os import os", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:ImportFrom_L9_C0", "label": "from mytracks.parser import StringsParser", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0783, 0.0087, 0, 0.66, 0.5, 161, 0, 1, 0, 0, 161, 0, 0], "semantic": {"name": "mytracks.parser", "arg_names": [], "import_names": ["StringsParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from mytracks.parser import StringsParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Import_L10_C0", "label": "mytracks.history import mytracks.history", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.087, 0.0087, 0, 0.66, 0.75, 247, 0, 1, 0, 0, 247, 0, 0], "semantic": {"name": "mytracks.history", "arg_names": [], "import_names": ["mytracks.history"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.history "}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "label": "Validator", "type": "class", "loc": [12, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5522, 0.9043, 0, 0.66, 1.0, 957, 0, 9, 0, 0, 186, 0, 31], "semantic": {"name": "Validator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.2174, 0.2, 1, 0.18, 0.0, 555, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "__init__", "arg_names": ["self", "languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, languages):\n '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''\n self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [8, 2, 0.1522, 0.0522, 2, 0.02, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Builds a strings file validator.\n \n Params:\n @param languages: a dictionary mapping each language to its corresponding directory\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L21_C4", "label": "self._langs =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [14, 2, 0.1826, 0.0087, 2, 0.02, 0.1667, 591, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._langs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L22_C4", "label": "self._master =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [14, 2, 0.1913, 0.0087, 2, 0.02, 0.3333, 265, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L23_C4", "label": "self._language_paths =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [14, 2, 0.2, 0.0087, 2, 0.02, 0.5, 356, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language_paths", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language_paths = languages"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L25_C4", "label": "parser = StringsParser()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [14, 2, 0.2174, 0.0087, 2, 0.02, 0.6667, 968, 3, 0, 0, 0, 282, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "StringsParser", "annotation": ""}, "snippet": " parser = StringsParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "label": "for lang, lang_dir", "type": "for", "loc": [26, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [6, 2, 0.2609, 0.0783, 2, 0.02, 0.8333, 114, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "lang, lang_dir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, lang_dir in languages.iteritems():\n filename = os.path.join(lang_dir, 'strings.xml')\n parsed_file = parser.Parse(filename)\n mytracks.history.FillMercurialRevisions(filename, parsed_file)\n\n if lang == 'en':\n self._master = parsed_file\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L27_C6", "label": "filename = join()", "type": "assigned_variable", "loc": [27, 27], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "vector": [14, 3, 0.2348, 0.0087, 3, 0.68, 0.0, 275, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " filename = os.path.join(lang_dir, 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L28_C6", "label": "parsed_file = Parse()", "type": "assigned_variable", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "vector": [14, 3, 0.2435, 0.0087, 3, 0.68, 0.3333, 76, 3, 1, 0, 0, 291, 10, 1], "semantic": {"name": "parsed_file", "arg_names": [], "import_names": [], "rhs_call_name": "Parse", "annotation": ""}, "snippet": " parsed_file = parser.Parse(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L29_C6", "label": "FillMercurialRevisions()", "type": "expression", "loc": [29, 29], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "vector": [8, 3, 0.2522, 0.0087, 3, 0.68, 0.6667, 942, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "FillMercurialRevisions", "arg_names": [], "import_names": [], "rhs_call_name": "FillMercurialRevisions", "annotation": ""}, "snippet": " mytracks.history.FillMercurialRevisions(filename, parsed_file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6", "label": "if", "type": "if", "loc": [31, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "vector": [4, 3, 0.2826, 0.0348, 3, 0.68, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lang == 'en':\n self._master = parsed_file\n else:\n self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L32_C8", "label": "self._master =", "type": "assigned_variable", "loc": [32, 32], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6", "vector": [14, 4, 0.2783, 0.0087, 4, 0.03, 0.0, 265, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L34_C8", "label": "assign", "type": "assigned_variable", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6", "vector": [14, 4, 0.2957, 0.0087, 4, 0.03, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._langs[lang] = parsed_file"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L36_C4", "label": "_Reset()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "vector": [8, 2, 0.313, 0.0087, 2, 0.02, 1.0, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "label": "Validate", "type": "function", "loc": [38, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.3565, 0.0609, 1, 0.18, 0.125, 60, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "Validate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Validate(self):\n '''\n Computes whether all the data in the files for the given languages is valid.\n '''\n self._Reset()\n self._ValidateMissingKeys()\n self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L39_C4", "label": "expression", "type": "expression", "loc": [39, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "vector": [8, 2, 0.3478, 0.0261, 2, 0.71, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether all the data in the files for the given languages is valid.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L42_C4", "label": "_Reset()", "type": "expression", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "vector": [8, 2, 0.3652, 0.0087, 2, 0.71, 0.3333, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L43_C4", "label": "_ValidateMissingKeys()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "vector": [8, 2, 0.3739, 0.0087, 2, 0.71, 0.6667, 427, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateMissingKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateMissingKeys", "annotation": ""}, "snippet": " self._ValidateMissingKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L44_C4", "label": "_ValidateOutdatedKeys()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "vector": [8, 2, 0.3826, 0.0087, 2, 0.71, 1.0, 676, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": [], "import_names": [], "rhs_call_name": "_ValidateOutdatedKeys", "annotation": ""}, "snippet": " self._ValidateOutdatedKeys()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L46_C2", "label": "valid", "type": "function", "loc": [46, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.413, 0.0348, 1, 0.18, 0.25, 552, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "valid", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def valid(self):\n return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L47_C4", "label": "return", "type": "return", "loc": [47, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L46_C2", "vector": [13, 2, 0.4174, 0.0261, 2, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (len(self._missing_in_master) == 0 and\n len(self._missing_in_lang) == 0 and\n len(self._outdated_in_lang) == 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L51_C2", "label": "missing_in_master", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.4478, 0.0174, 1, 0.18, 0.375, 277, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_master(self):\n return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L52_C4", "label": "return", "type": "return", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L51_C2", "vector": [13, 2, 0.4522, 0.0087, 2, 0.56, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L54_C2", "label": "missing_in_lang", "type": "function", "loc": [54, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.4739, 0.0174, 1, 0.18, 0.5, 449, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def missing_in_lang(self):\n return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L55_C4", "label": "return", "type": "return", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L54_C2", "vector": [13, 2, 0.4783, 0.0087, 2, 0.73, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L57_C2", "label": "outdated_in_lang", "type": "function", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.5, 0.0174, 1, 0.18, 0.625, 862, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "outdated_in_lang", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def outdated_in_lang(self):\n return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L58_C4", "label": "return", "type": "return", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L57_C2", "vector": [13, 2, 0.5043, 0.0087, 2, 0.12, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._outdated_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "label": "_Reset", "type": "function", "loc": [60, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.5391, 0.0435, 1, 0.18, 0.75, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n # These are maps from language to string name list\n self._missing_in_master = {}\n self._missing_in_lang = {}\n self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L62_C4", "label": "self._missing_in_master =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "vector": [14, 2, 0.5391, 0.0087, 2, 0.91, 0.0, 252, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L63_C4", "label": "self._missing_in_lang =", "type": "assigned_variable", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "vector": [14, 2, 0.5478, 0.0087, 2, 0.91, 0.5, 473, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L64_C4", "label": "self._outdated_in_lang =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "vector": [14, 2, 0.5565, 0.0087, 2, 0.91, 1.0, 575, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._outdated_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "label": "_ValidateMissingKeys", "type": "function", "loc": [66, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.6304, 0.1217, 1, 0.18, 0.875, 427, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "_ValidateMissingKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateMissingKeys(self):\n '''\n Computes whether there are missing keys on either side.\n '''\n master_keys = frozenset(self._master.iterkeys())\n for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L67_C4", "label": "expression", "type": "expression", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "vector": [8, 2, 0.5913, 0.0261, 2, 0.92, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes whether there are missing keys on either side.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L70_C4", "label": "master_keys = frozenset()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "vector": [14, 2, 0.6087, 0.0087, 2, 0.92, 0.5, 468, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "master_keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " master_keys = frozenset(self._master.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "label": "for lang, file", "type": "for", "loc": [71, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "vector": [6, 2, 0.6522, 0.0783, 2, 0.92, 1.0, 275, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n keys = frozenset(file.iterkeys())\n missing_in_master = keys - master_keys\n missing_in_lang = master_keys - keys\n\n if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master\n if len(missing_in_lang) > 0:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L72_C6", "label": "keys = frozenset()", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.62, 0.0, 204, 3, 1, 0, 0, 80, 10, 2], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "frozenset", "annotation": ""}, "snippet": " keys = frozenset(file.iterkeys())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L73_C6", "label": "missing_in_master =", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "vector": [14, 3, 0.6348, 0.0087, 3, 0.62, 0.25, 277, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_master = keys - master_keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L74_C6", "label": "missing_in_lang =", "type": "assigned_variable", "loc": [74, 74], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "vector": [14, 3, 0.6435, 0.0087, 3, 0.62, 0.5, 449, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "missing_in_lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " missing_in_lang = master_keys - keys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L76_C6", "label": "if", "type": "if", "loc": [76, 77], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "vector": [4, 3, 0.6652, 0.0174, 3, 0.62, 0.75, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_master) > 0:\n self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L77_C8", "label": "assign", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L76_C6", "vector": [14, 4, 0.6696, 0.0087, 4, 0.58, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_master[lang] = missing_in_master"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L78_C6", "label": "if", "type": "if", "loc": [78, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "vector": [4, 3, 0.6826, 0.0174, 3, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(missing_in_lang) > 0:\n self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L79_C8", "label": "assign", "type": "assigned_variable", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L78_C6", "vector": [14, 4, 0.687, 0.0087, 4, 0.24, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._missing_in_lang[lang] = missing_in_lang"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2", "label": "_ValidateOutdatedKeys", "type": "function", "loc": [81, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "vector": [2, 1, 0.8522, 0.3043, 1, 0.18, 1.0, 676, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "_ValidateOutdatedKeys", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _ValidateOutdatedKeys(self):\n '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''\n for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L82_C4", "label": "expression", "type": "expression", "loc": [82, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2", "vector": [8, 2, 0.7261, 0.0348, 2, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computers whether any of the language keys are outdated with relation to the\n master keys.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "label": "for lang, file", "type": "for", "loc": [86, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2", "vector": [6, 2, 0.8739, 0.2609, 2, 0.01, 1.0, 275, 3, 0, 0, 0, 0, 0, 12], "semantic": {"name": "lang, file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, file in self._langs.iteritems():\n outdated = []\n for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L87_C6", "label": "outdated =", "type": "assigned_variable", "loc": [87, 87], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "vector": [14, 3, 0.7565, 0.0087, 3, 0.39, 0.0, 362, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " outdated = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "label": "for key, str", "type": "for", "loc": [88, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "vector": [6, 3, 0.8696, 0.2174, 3, 0.39, 0.5, 83, 3, 0, 0, 0, 0, 0, 10], "semantic": {"name": "key, str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, str in file.iteritems():\n # Get all revisions that touched master and language files for this\n # string.\n master_str = self._master[key]\n master_revs = master_str['revs']\n lang_revs = str['revs']\n if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L91_C8", "label": "master_str =", "type": "assigned_variable", "loc": [91, 91], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.7913, 0.0087, 4, 0.77, 0.0, 440, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_str", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_str = self._master[key]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L92_C8", "label": "master_revs =", "type": "assigned_variable", "loc": [92, 92], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.8, 0.0087, 4, 0.77, 0.125, 616, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "master_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " master_revs = master_str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L93_C8", "label": "lang_revs =", "type": "assigned_variable", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.8087, 0.0087, 4, 0.77, 0.25, 522, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lang_revs", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lang_revs = str['revs']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L94_C8", "label": "if", "type": "if", "loc": [94, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [4, 4, 0.8261, 0.0261, 4, 0.77, 0.375, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not master_revs or not lang_revs:\n print('WARNING: No revision for %s in %s' % (key, lang))\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L95_C10", "label": "print()", "type": "expression", "loc": [95, 95], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L94_C8", "vector": [8, 5, 0.8261, 0.0087, 5, 0.37, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('WARNING: No revision for %s in %s' % (key, lang))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L98_C8", "label": "master_file = join()", "type": "assigned_variable", "loc": [98, 98], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.8522, 0.0087, 4, 0.77, 0.5, 377, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "master_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_file = os.path.join(self._language_paths['en'], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L99_C8", "label": "lang_file = join()", "type": "assigned_variable", "loc": [99, 99], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.8609, 0.0087, 4, 0.77, 0.625, 906, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "lang_file", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " lang_file = os.path.join(self._language_paths[lang], 'strings.xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L103_C8", "label": "master_rev = reduce()", "type": "assigned_variable", "loc": [103, 105], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.9043, 0.0261, 4, 0.77, 0.75, 609, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "master_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " master_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(master_file, r1, r2),\n master_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L106_C8", "label": "lang_rev = reduce()", "type": "assigned_variable", "loc": [106, 108], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [14, 4, 0.9304, 0.0261, 4, 0.77, 0.875, 74, 3, 2, 0, 0, 622, 10, 2], "semantic": {"name": "lang_rev", "arg_names": [], "import_names": [], "rhs_call_name": "reduce", "annotation": ""}, "snippet": " lang_rev = reduce(\n lambda r1, r2: mytracks.history.NewestRevision(lang_file, r1, r2),\n lang_revs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L111_C8", "label": "if", "type": "if", "loc": [111, 112], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "vector": [4, 4, 0.9696, 0.0174, 4, 0.77, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if mytracks.history.DoesRevisionSuperceed(lang_file, master_rev, lang_rev):\n outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L112_C10", "label": "append()", "type": "expression", "loc": [112, 112], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L111_C8", "vector": [8, 5, 0.9739, 0.0087, 5, 0.84, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " outdated.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:If_L114_C6", "label": "if", "type": "if", "loc": [114, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "vector": [4, 3, 0.9957, 0.0174, 3, 0.39, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(outdated) > 0:\n self._outdated_in_lang[lang] = outdated"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L115_C8", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_330:If_L114_C6", "vector": [14, 4, 1.0, 0.0087, 4, 0.39, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._outdated_in_lang[lang] = outdated"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L27_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L28_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L29_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L31_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L38_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L46_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L46_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L51_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L57_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Return_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L60_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L64_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L66_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L73_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L74_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L76_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L76_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L78_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L78_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:ClassDef_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:FunctionDef_L81_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L87_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L94_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L95_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L103_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L88_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L111_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Expr_L112_C10"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:For_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_330:If_L114_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_330:If_L114_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_330:Assign_L115_C8"}]
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' print ' validate' sys.exit(1) def Translate(languages): ''' Asks the user to interactively translate any missing or oudated strings from the files for the given languages. @param languages: the languages to translate ''' validator = mytracks.validate.Validator(languages) validator.Validate() missing = validator.missing_in_lang() outdated = validator.outdated_in_lang() for lang in languages: untranslated = missing[lang] + outdated[lang] if len(untranslated) == 0: continue translator = mytracks.translate.Translator(lang) translator.Translate(untranslated) def Validate(languages): ''' Computes and displays errors in the string files for the given languages. @param languages: the languages to compute for ''' validator = mytracks.validate.Validator(languages) validator.Validate() error_count = 0 if (validator.valid()): print 'All files OK' else: for lang, missing in validator.missing_in_master().iteritems(): print 'Missing in master, present in %s: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, missing in validator.missing_in_lang().iteritems(): print 'Missing in %s, present in master: %s:' % (lang, str(missing)) error_count = error_count + len(missing) for lang, outdated in validator.outdated_in_lang().iteritems(): print 'Outdated in %s: %s:' % (lang, str(outdated)) error_count = error_count + len(outdated) return error_count if __name__ == '__main__': argv = sys.argv argc = len(argv) if argc < 2: Usage() languages = mytracks.files.GetAllLanguageFiles() if argc == 3: langs = set(argv[2:]) if not langs.issubset(languages): raise 'Language(s) not found' # Filter just to the languages specified languages = dict((lang, lang_file) for lang, lang_file in languages.iteritems() if lang in langs or lang == 'en' ) cmd = argv[1] if cmd == 'translate': Translate(languages) elif cmd == 'validate': error_count = Validate(languages) else: Usage() error_count = 0 print '%d errors found.' % error_count
ajibawa-2023/Python-Code-Large/train/row_331
58
96
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 6], "level": 0, "parent": null, "vector": [8, 0, 0.0417, 0.0521, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Import_L8_C0", "label": "mytracks.files import mytracks.files", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0833, 0.0104, 0, 0.66, 0.125, 640, 0, 1, 0, 0, 640, 0, 0], "semantic": {"name": "mytracks.files", "arg_names": [], "import_names": ["mytracks.files"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.files"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Import_L9_C0", "label": "mytracks.translate import mytracks.translate", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0104, 0, 0.66, 0.25, 802, 0, 1, 0, 0, 802, 0, 0], "semantic": {"name": "mytracks.translate", "arg_names": [], "import_names": ["mytracks.translate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.translate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Import_L10_C0", "label": "mytracks.validate import mytracks.validate", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1042, 0.0104, 0, 0.66, 0.375, 355, 0, 1, 0, 0, 355, 0, 0], "semantic": {"name": "mytracks.validate", "arg_names": [], "import_names": ["mytracks.validate"], "rhs_call_name": "", "annotation": ""}, "snippet": "import mytracks.validate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Import_L11_C0", "label": "sys import sys", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1146, 0.0104, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "label": "Usage", "type": "function", "loc": [13, 19], "level": 0, "parent": null, "vector": [2, 0, 0.1667, 0.0729, 0, 0.66, 0.625, 208, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n print(' translate')\n print(' validate')\n sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L14_C2", "label": "print()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1458, 0.0104, 1, 0.3, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L15_C2", "label": "print()", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1562, 0.0104, 1, 0.3, 0.2, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Commands are:')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L16_C2", "label": "print()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1667, 0.0104, 1, 0.3, 0.4, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' cleanup')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L17_C2", "label": "print()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1771, 0.0104, 1, 0.3, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' translate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L18_C2", "label": "print()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1875, 0.0104, 1, 0.3, 0.8, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(' validate')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L19_C2", "label": "exit()", "type": "expression", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "vector": [8, 1, 0.1979, 0.0104, 1, 0.3, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " sys.exit(1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "label": "Translate", "type": "function", "loc": [22, 41], "level": 0, "parent": null, "vector": [2, 0, 0.3281, 0.2083, 0, 0.66, 0.75, 749, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "Translate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Translate(languages):\n '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''\n validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L23_C2", "label": "expression", "type": "expression", "loc": [23, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [8, 1, 0.2656, 0.0625, 1, 0.91, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Asks the user to interactively translate any missing or oudated strings from\n the files for the given languages.\n\n @param languages: the languages to translate\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L29_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [14, 1, 0.3021, 0.0104, 1, 0.91, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L30_C2", "label": "Validate()", "type": "expression", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [8, 1, 0.3125, 0.0104, 1, 0.91, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L31_C2", "label": "missing = missing_in_lang()", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [14, 1, 0.3229, 0.0104, 1, 0.91, 0.6, 249, 3, 0, 0, 0, 449, 10, 1], "semantic": {"name": "missing", "arg_names": [], "import_names": [], "rhs_call_name": "missing_in_lang", "annotation": ""}, "snippet": " missing = validator.missing_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L32_C2", "label": "outdated = outdated_in_lang()", "type": "assigned_variable", "loc": [32, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [14, 1, 0.3333, 0.0104, 1, 0.91, 0.8, 362, 3, 0, 0, 0, 862, 10, 1], "semantic": {"name": "outdated", "arg_names": [], "import_names": [], "rhs_call_name": "outdated_in_lang", "annotation": ""}, "snippet": " outdated = validator.outdated_in_lang()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "label": "for lang", "type": "for", "loc": [34, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "vector": [6, 1, 0.3906, 0.0833, 1, 0.91, 1.0, 312, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "lang", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang in languages:\n untranslated = missing[lang] + outdated[lang]\n \n if len(untranslated) == 0:\n continue\n\n translator = mytracks.translate.Translator(lang)\n translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L35_C4", "label": "untranslated =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "vector": [14, 2, 0.3646, 0.0104, 2, 0.12, 0.0, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "untranslated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " untranslated = missing[lang] + outdated[lang]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L37_C4", "label": "if", "type": "if", "loc": [37, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "vector": [4, 2, 0.3906, 0.0208, 2, 0.12, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(untranslated) == 0:\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L40_C4", "label": "translator = Translator()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "vector": [14, 2, 0.4167, 0.0104, 2, 0.12, 0.6667, 380, 3, 1, 0, 0, 229, 10, 1], "semantic": {"name": "translator", "arg_names": [], "import_names": [], "rhs_call_name": "Translator", "annotation": ""}, "snippet": " translator = mytracks.translate.Translator(lang)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L41_C4", "label": "Translate()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "vector": [8, 2, 0.4271, 0.0104, 2, 0.12, 1.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " translator.Translate(untranslated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "label": "Validate", "type": "function", "loc": [44, 67], "level": 0, "parent": null, "vector": [2, 0, 0.5781, 0.25, 0, 0.66, 0.875, 60, 0, 1, 1, 0, 0, 0, 19], "semantic": {"name": "Validate", "arg_names": ["languages"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Validate(languages):\n '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''\n validator = mytracks.validate.Validator(languages)\n validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L45_C2", "label": "expression", "type": "expression", "loc": [45, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [8, 1, 0.4896, 0.0521, 1, 0.46, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Computes and displays errors in the string files for the given languages.\n\n @param languages: the languages to compute for\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L50_C2", "label": "validator = Validator()", "type": "assigned_variable", "loc": [50, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [14, 1, 0.5208, 0.0104, 1, 0.46, 0.2, 145, 3, 1, 0, 0, 957, 10, 1], "semantic": {"name": "validator", "arg_names": [], "import_names": [], "rhs_call_name": "Validator", "annotation": ""}, "snippet": " validator = mytracks.validate.Validator(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L51_C2", "label": "Validate()", "type": "expression", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [8, 1, 0.5312, 0.0104, 1, 0.46, 0.4, 60, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Validate", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " validator.Validate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L53_C2", "label": "error_count =", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [14, 1, 0.5521, 0.0104, 1, 0.46, 0.6, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "label": "if", "type": "if", "loc": [54, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [4, 1, 0.6198, 0.125, 1, 0.46, 0.8, 0, 3, 0, 0, 0, 0, 0, 17], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (validator.valid()):\n print('All files OK')\n else:\n for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)\n for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L55_C4", "label": "print()", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "vector": [8, 2, 0.5729, 0.0104, 2, 0.28, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('All files OK')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4", "label": "for lang, missing", "type": "for", "loc": [57, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "vector": [6, 2, 0.6042, 0.0312, 2, 0.28, 0.3333, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_master().iteritems():\n print('Missing in master, present in %s: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L58_C6", "label": "print()", "type": "expression", "loc": [58, 58], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4", "vector": [8, 3, 0.6042, 0.0104, 3, 0.37, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in master, present in %s: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L59_C6", "label": "error_count =", "type": "assigned_variable", "loc": [59, 59], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4", "vector": [14, 3, 0.6146, 0.0104, 3, 0.37, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4", "label": "for lang, missing", "type": "for", "loc": [60, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "vector": [6, 2, 0.6354, 0.0312, 2, 0.28, 0.6667, 399, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, missing", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, missing in validator.missing_in_lang().iteritems():\n print('Missing in %s, present in master: %s:' % (lang, str(missing)))\n error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L61_C6", "label": "print()", "type": "expression", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4", "vector": [8, 3, 0.6354, 0.0104, 3, 0.99, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Missing in %s, present in master: %s:' % (lang, str(missing)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L62_C6", "label": "error_count =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4", "vector": [14, 3, 0.6458, 0.0104, 3, 0.99, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(missing)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4", "label": "for lang, outdated", "type": "for", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "vector": [6, 2, 0.6667, 0.0312, 2, 0.28, 1.0, 928, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "lang, outdated", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for lang, outdated in validator.outdated_in_lang().iteritems():\n print('Outdated in %s: %s:' % (lang, str(outdated)))\n error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L64_C6", "label": "print()", "type": "expression", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4", "vector": [8, 3, 0.6667, 0.0104, 3, 0.25, 0.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('Outdated in %s: %s:' % (lang, str(outdated)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L65_C6", "label": "error_count =", "type": "assigned_variable", "loc": [65, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4", "vector": [14, 3, 0.6771, 0.0104, 3, 0.25, 1.0, 59, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = error_count + len(outdated)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Return_L67_C2", "label": "return", "type": "return", "loc": [67, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "vector": [13, 1, 0.6979, 0.0104, 1, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return error_count"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "label": "if", "type": "if", "loc": [70, 96], "level": 0, "parent": null, "vector": [4, 0, 0.8646, 0.2812, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 11], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n argv = sys.argv\n argc = len(argv)\n if argc < 2:\n Usage()\n\n languages = mytracks.files.GetAllLanguageFiles()\n if argc == 3:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L71_C2", "label": "argv =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [14, 1, 0.7396, 0.0104, 1, 0.41, 0.0, 612, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "argv", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " argv = sys.argv"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L72_C2", "label": "argc = len()", "type": "assigned_variable", "loc": [72, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [14, 1, 0.75, 0.0104, 1, 0.41, 0.1429, 123, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "argc", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " argc = len(argv)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L73_C2", "label": "if", "type": "if", "loc": [73, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [4, 1, 0.7656, 0.0208, 1, 0.41, 0.2857, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc < 2:\n Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L74_C4", "label": "Usage()", "type": "expression", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L73_C2", "vector": [8, 2, 0.7708, 0.0104, 2, 0.02, 0.0, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L76_C2", "label": "languages = GetAllLanguageFiles()", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [14, 1, 0.7917, 0.0104, 1, 0.41, 0.4286, 126, 3, 0, 0, 0, 438, 10, 1], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "GetAllLanguageFiles", "annotation": ""}, "snippet": " languages = mytracks.files.GetAllLanguageFiles()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "label": "if", "type": "if", "loc": [77, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [4, 1, 0.8438, 0.0938, 1, 0.41, 0.5714, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if argc == 3:\n langs = set(argv[2:])\n if not langs.issubset(languages):\n raise 'Language(s) not found'\n\n # Filter just to the languages specified\n languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L78_C4", "label": "langs = set()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "vector": [14, 2, 0.8125, 0.0104, 2, 0.39, 0.0, 986, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "langs", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " langs = set(argv[2:])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L79_C4", "label": "if", "type": "if", "loc": [79, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "vector": [4, 2, 0.8281, 0.0208, 2, 0.39, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not langs.issubset(languages):\n raise 'Language(s) not found'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L83_C4", "label": "languages = dict()", "type": "assigned_variable", "loc": [83, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "vector": [14, 2, 0.875, 0.0312, 2, 0.39, 1.0, 126, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "languages", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " languages = dict((lang, lang_file)\n for lang, lang_file in languages.iteritems()\n if lang in langs or lang == 'en' )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L87_C2", "label": "cmd =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [14, 1, 0.9062, 0.0104, 1, 0.41, 0.7143, 604, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2", "label": "if", "type": "if", "loc": [88, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [4, 1, 0.9479, 0.0729, 1, 0.41, 0.8571, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cmd == 'translate':\n Translate(languages)\n elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L89_C4", "label": "Translate()", "type": "expression", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2", "vector": [8, 2, 0.9271, 0.0104, 2, 0.36, 0.0, 749, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": [], "import_names": [], "rhs_call_name": "Translate", "annotation": ""}, "snippet": " Translate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "label": "if", "type": "if", "loc": [90, 94], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2", "vector": [4, 2, 0.9583, 0.0521, 2, 0.36, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif cmd == 'validate':\n error_count = Validate(languages)\n else:\n Usage()\n error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L91_C4", "label": "error_count = Validate()", "type": "assigned_variable", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "vector": [14, 3, 0.9479, 0.0104, 3, 0.92, 0.0, 59, 3, 1, 0, 0, 60, 10, 1], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "Validate", "annotation": ""}, "snippet": " error_count = Validate(languages)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L93_C4", "label": "Usage()", "type": "expression", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "vector": [8, 3, 0.9688, 0.0104, 3, 0.92, 0.5, 208, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "Usage", "arg_names": [], "import_names": [], "rhs_call_name": "Usage", "annotation": ""}, "snippet": " Usage()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L94_C4", "label": "error_count =", "type": "assigned_variable", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "vector": [14, 3, 0.9792, 0.0104, 3, 0.92, 1.0, 59, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "error_count", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " error_count = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L96_C2", "label": "print()", "type": "expression", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "vector": [8, 1, 1.0, 0.0104, 1, 0.41, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('%d errors found.' % error_count)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L29_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L30_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L32_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L22_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L34_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L45_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L50_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L51_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L53_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L58_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L57_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L59_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L61_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L54_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L64_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:For_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L65_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:FunctionDef_L44_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Return_L67_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L87_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L88_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L90_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_331:If_L70_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_331:Expr_L96_C2"}]
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTracks directory is located. ''' path = os.getcwd() while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)): if path == '/': raise 'Not in My Tracks project' # Go up one level path = os.path.split(path)[0] return path def GetAllLanguageFiles(): ''' Returns a mapping from all found languages to their respective directories. ''' mytracks_path = GetMyTracksDir() res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK) language_dirs = glob(res_dir) master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES) if len(language_dirs) == 0: raise 'No languages found!' if not os.path.isdir(master_dir): raise 'Couldn\'t find master file' language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs] language_tuples.append(('en', master_dir)) return dict(language_tuples)
ajibawa-2023/Python-Code-Large/train/row_332
25
45
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0667, 0.1111, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Import_L6_C0", "label": "os.path import os.path", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1333, 0.0222, 0, 0.66, 0.125, 79, 0, 1, 0, 0, 79, 0, 0], "semantic": {"name": "os.path", "arg_names": [], "import_names": ["os.path"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os.path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:ImportFrom_L7_C0", "label": "from glob import glob", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1556, 0.0222, 0, 0.66, 0.25, 958, 0, 1, 0, 0, 958, 0, 0], "semantic": {"name": "glob", "arg_names": [], "import_names": ["glob"], "rhs_call_name": "", "annotation": ""}, "snippet": "from glob import glob"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.1778, 0.0222, 0, 0.66, 0.375, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L10_C0", "label": "MYTRACKS_RES_DIR =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.2222, 0.0222, 0, 0.66, 0.5, 40, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "MYTRACKS_RES_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MYTRACKS_RES_DIR = 'MyTracks/res'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L11_C0", "label": "ANDROID_MASTER_VALUES =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.2444, 0.0222, 0, 0.66, 0.625, 918, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_MASTER_VALUES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_MASTER_VALUES = 'values'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L12_C0", "label": "ANDROID_VALUES_MASK =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.2667, 0.0222, 0, 0.66, 0.75, 115, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "ANDROID_VALUES_MASK", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ANDROID_VALUES_MASK = 'values-*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "label": "GetMyTracksDir", "type": "function", "loc": [15, 27], "level": 0, "parent": null, "vector": [2, 0, 0.4667, 0.2889, 0, 0.66, 0.875, 854, 0, 0, 1, 0, 0, 0, 4], "semantic": {"name": "GetMyTracksDir", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetMyTracksDir():\n '''\n Returns the directory in which the MyTracks directory is located.\n '''\n path = os.getcwd()\n while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L16_C2", "label": "expression", "type": "expression", "loc": [16, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "vector": [8, 1, 0.3778, 0.0667, 1, 0.57, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns the directory in which the MyTracks directory is located.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L19_C2", "label": "path = getcwd()", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "vector": [14, 1, 0.4222, 0.0222, 1, 0.57, 0.3333, 358, 3, 0, 0, 0, 320, 10, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "getcwd", "annotation": ""}, "snippet": " path = os.getcwd()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2", "label": "while", "type": "while", "loc": [20, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "vector": [5, 1, 0.5, 0.1333, 1, 0.57, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while not os.path.isdir(os.path.join(path, MYTRACKS_RES_DIR)):\n if path == '/':\n raise 'Not in My Tracks project'\n\n # Go up one level\n path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:If_L21_C4", "label": "if", "type": "if", "loc": [21, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2", "vector": [4, 2, 0.4778, 0.0444, 2, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path == '/':\n raise 'Not in My Tracks project'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L25_C4", "label": "path =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2", "vector": [14, 2, 0.5556, 0.0222, 2, 0.35, 1.0, 358, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = os.path.split(path)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Return_L27_C2", "label": "return", "type": "return", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "vector": [13, 1, 0.6, 0.0222, 1, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return path"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "label": "GetAllLanguageFiles", "type": "function", "loc": [30, 45], "level": 0, "parent": null, "vector": [2, 0, 0.8333, 0.3556, 0, 0.66, 1.0, 438, 0, 0, 1, 0, 0, 0, 9], "semantic": {"name": "GetAllLanguageFiles", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GetAllLanguageFiles():\n '''\n Returns a mapping from all found languages to their respective directories.\n '''\n mytracks_path = GetMyTracksDir()\n res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)\n language_dirs = glob(res_dir)\n master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L31_C2", "label": "expression", "type": "expression", "loc": [31, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [8, 1, 0.7111, 0.0667, 1, 0.8, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Returns a mapping from all found languages to their respective directories.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L34_C2", "label": "mytracks_path = GetMyTracksDir()", "type": "assigned_variable", "loc": [34, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [14, 1, 0.7556, 0.0222, 1, 0.8, 0.1111, 720, 3, 0, 0, 0, 854, 10, 1], "semantic": {"name": "mytracks_path", "arg_names": [], "import_names": [], "rhs_call_name": "GetMyTracksDir", "annotation": ""}, "snippet": " mytracks_path = GetMyTracksDir()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L35_C2", "label": "res_dir = join()", "type": "assigned_variable", "loc": [35, 35], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [14, 1, 0.7778, 0.0222, 1, 0.8, 0.2222, 400, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "res_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " res_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_VALUES_MASK)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L36_C2", "label": "language_dirs = glob()", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [14, 1, 0.8, 0.0222, 1, 0.8, 0.3333, 191, 3, 1, 0, 0, 958, 10, 1], "semantic": {"name": "language_dirs", "arg_names": [], "import_names": [], "rhs_call_name": "glob", "annotation": ""}, "snippet": " language_dirs = glob(res_dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L37_C2", "label": "master_dir = join()", "type": "assigned_variable", "loc": [37, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [14, 1, 0.8222, 0.0222, 1, 0.8, 0.4444, 493, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "master_dir", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " master_dir = os.path.join(mytracks_path, MYTRACKS_RES_DIR, ANDROID_MASTER_VALUES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:If_L38_C2", "label": "if", "type": "if", "loc": [38, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [4, 1, 0.8556, 0.0444, 1, 0.8, 0.5556, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(language_dirs) == 0:\n raise 'No languages found!'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:If_L40_C2", "label": "if", "type": "if", "loc": [40, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [4, 1, 0.9, 0.0444, 1, 0.8, 0.6667, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.path.isdir(master_dir):\n raise 'Couldn\\'t find master file'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L43_C2", "label": "language_tuples =", "type": "assigned_variable", "loc": [43, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [14, 1, 0.9556, 0.0222, 1, 0.8, 0.7778, 966, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "language_tuples", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " language_tuples = [(re.findall(r'.*values-([A-Za-z-]+)', dir)[0],dir) for dir in language_dirs]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L44_C2", "label": "append()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [8, 1, 0.9778, 0.0222, 1, 0.8, 0.8889, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " language_tuples.append(('en', master_dir))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_332:Return_L45_C2", "label": "return", "type": "return", "loc": [45, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "vector": [13, 1, 1.0, 0.0222, 1, 0.8, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return dict(language_tuples)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_332:If_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:While_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Return_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L34_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L35_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L36_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L37_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:If_L38_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:If_L40_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Assign_L43_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Expr_L44_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_332:FunctionDef_L30_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_332:Return_L45_C2"}]
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time, only. ''' def Parse(self, file): ''' Parses the given file and returns a dictionary mapping keys to an object with attributes for that key, such as the value, start/end line and explicit revisions. In addition to the standard XML format of the strings file, this parser supports an annotation inside comments, in one of these formats: <!-- KEEP_PARENT name="bla" --> <!-- KEEP_PARENT name="bla" rev="123456789012" --> Such an annotation indicates that we're explicitly inheriting form the master file (and the optional revision says that this decision is compatible with the master file up to that revision). @param file: the name of the file to parse ''' self._Reset() # Unfortunately expat is the only parser that will give us line numbers self._xml_parser = ParserCreate() self._xml_parser.StartElementHandler = self._StartElementHandler self._xml_parser.EndElementHandler = self._EndElementHandler self._xml_parser.CharacterDataHandler = self._CharacterDataHandler self._xml_parser.CommentHandler = self._CommentHandler file_obj = open(file) self._xml_parser.ParseFile(file_obj) file_obj.close() return self._all_strings def _Reset(self): self._currentString = None self._currentStringName = None self._currentStringValue = None self._all_strings = {} def _StartElementHandler(self, name, attrs): if name != 'string': return if 'name' not in attrs: return assert not self._currentString assert not self._currentStringName self._currentString = { 'startLine' : self._xml_parser.CurrentLineNumber, } if 'rev' in attrs: self._currentString['revs'] = [attrs['rev']] self._currentStringName = attrs['name'] self._currentStringValue = '' def _EndElementHandler(self, name): if name != 'string': return assert self._currentString assert self._currentStringName self._currentString['value'] = self._currentStringValue self._currentString['endLine'] = self._xml_parser.CurrentLineNumber self._all_strings[self._currentStringName] = self._currentString self._currentString = None self._currentStringName = None self._currentStringValue = None def _CharacterDataHandler(self, data): if not self._currentString: return self._currentStringValue += data _KEEP_PARENT_REGEX = re.compile(r'\s*KEEP_PARENT\s+' r'name\s*=\s*[\'"]?(?P<name>[a-z0-9_]+)[\'"]?' r'(?:\s+rev=[\'"]?(?P<rev>[0-9a-f]{12})[\'"]?)?\s*', re.MULTILINE | re.DOTALL) def _CommentHandler(self, data): keep_parent_match = self._KEEP_PARENT_REGEX.match(data) if not keep_parent_match: return name = keep_parent_match.group('name') self._all_strings[name] = { 'keepParent' : True, 'startLine' : self._xml_parser.CurrentLineNumber, 'endLine' : self._xml_parser.CurrentLineNumber } rev = keep_parent_match.group('rev') if rev: self._all_strings[name]['revs'] = [rev]
ajibawa-2023/Python-Code-Large/train/row_333
54
115
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 5], "level": 0, "parent": null, "vector": [8, 0, 0.0261, 0.0435, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:ImportFrom_L7_C0", "label": "from xml.parsers.expat import ParserCreate", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0609, 0.0087, 0, 0.66, 0.3333, 573, 0, 1, 0, 0, 573, 0, 0], "semantic": {"name": "xml.parsers.expat", "arg_names": [], "import_names": ["ParserCreate"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.parsers.expat import ParserCreate"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Import_L8_C0", "label": "re import re", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0696, 0.0087, 0, 0.66, 0.6667, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "label": "StringsParser", "type": "class", "loc": [11, 115], "level": 0, "parent": null, "vector": [3, 0, 0.5478, 0.913, 0, 0.66, 1.0, 282, 0, 6, 0, 0, 186, 0, 9], "semantic": {"name": "StringsParser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L12_C2", "label": "expression", "type": "expression", "loc": [12, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [8, 1, 0.1261, 0.0522, 1, 0.14, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "label": "Parse", "type": "function", "loc": [19, 50], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.3, 0.2783, 1, 0.14, 0.1429, 291, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "Parse", "arg_names": ["self", "file"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Parse(self, file):\n '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L20_C4", "label": "expression", "type": "expression", "loc": [20, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [8, 2, 0.2435, 0.1478, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Parses the given file and returns a dictionary mapping keys to an object\n with attributes for that key, such as the value, start/end line and explicit\n revisions.\n \n In addition to the standard XML format of the strings file, this parser\n supports an annotation inside comments, in one of these formats:\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L37_C4", "label": "_Reset()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [8, 2, 0.3217, 0.0087, 2, 0.24, 0.1, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_Reset", "arg_names": [], "import_names": [], "rhs_call_name": "_Reset", "annotation": ""}, "snippet": " self._Reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L40_C4", "label": "self._xml_parser = ParserCreate()", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.3478, 0.0087, 2, 0.24, 0.2, 822, 3, 0, 0, 0, 684, 10, 1], "semantic": {"name": "self._xml_parser", "arg_names": [], "import_names": [], "rhs_call_name": "ParserCreate", "annotation": ""}, "snippet": " self._xml_parser = ParserCreate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L41_C4", "label": "self._xml_parser.StartElementHandler =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.3565, 0.0087, 2, 0.24, 0.3, 260, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.StartElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.StartElementHandler = self._StartElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L42_C4", "label": "self._xml_parser.EndElementHandler =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.3652, 0.0087, 2, 0.24, 0.4, 744, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.EndElementHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.EndElementHandler = self._EndElementHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L43_C4", "label": "self._xml_parser.CharacterDataHandler =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.3739, 0.0087, 2, 0.24, 0.5, 144, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CharacterDataHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CharacterDataHandler = self._CharacterDataHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L44_C4", "label": "self._xml_parser.CommentHandler =", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.3826, 0.0087, 2, 0.24, 0.6, 403, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._xml_parser.CommentHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._xml_parser.CommentHandler = self._CommentHandler"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L46_C4", "label": "file_obj = open()", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [14, 2, 0.4, 0.0087, 2, 0.24, 0.7, 425, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "file_obj", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " file_obj = open(file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L47_C4", "label": "ParseFile()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [8, 2, 0.4087, 0.0087, 2, 0.24, 0.8, 341, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "ParseFile", "arg_names": [], "import_names": [], "rhs_call_name": "ParseFile", "annotation": ""}, "snippet": " self._xml_parser.ParseFile(file_obj)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L48_C4", "label": "close()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [8, 2, 0.4174, 0.0087, 2, 0.24, 0.9, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " file_obj.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L50_C4", "label": "return", "type": "return", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "vector": [13, 2, 0.4348, 0.0087, 2, 0.24, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._all_strings"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "label": "_Reset", "type": "function", "loc": [52, 56], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.4696, 0.0435, 1, 0.14, 0.2857, 412, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_Reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _Reset(self):\n self._currentString = None\n self._currentStringName = None\n self._currentStringValue = None\n self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L53_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "vector": [14, 2, 0.4609, 0.0087, 2, 0.96, 0.0, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L54_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "vector": [14, 2, 0.4696, 0.0087, 2, 0.96, 0.3333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L55_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "vector": [14, 2, 0.4783, 0.0087, 2, 0.96, 0.6667, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L56_C4", "label": "self._all_strings =", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "vector": [14, 2, 0.487, 0.0087, 2, 0.96, 1.0, 463, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._all_strings", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "label": "_StartElementHandler", "type": "function", "loc": [58, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.5783, 0.1565, 1, 0.14, 0.4286, 355, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "_StartElementHandler", "arg_names": ["self", "name", "attrs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _StartElementHandler(self, name, attrs):\n if name != 'string':\n return\n\n if 'name' not in attrs:\n return\n\n assert not self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L59_C4", "label": "if", "type": "if", "loc": [59, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [4, 2, 0.5174, 0.0174, 2, 0.49, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L60_C6", "label": "return", "type": "return", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L59_C4", "vector": [13, 3, 0.5217, 0.0087, 3, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L62_C4", "label": "if", "type": "if", "loc": [62, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [4, 2, 0.5435, 0.0174, 2, 0.49, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'name' not in attrs:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L63_C6", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L62_C4", "vector": [13, 3, 0.5478, 0.0087, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L67_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [67, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [14, 2, 0.5913, 0.0261, 2, 0.49, 0.4, 654, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = {\n 'startLine' : self._xml_parser.CurrentLineNumber,\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L71_C4", "label": "if", "type": "if", "loc": [71, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [4, 2, 0.6217, 0.0174, 2, 0.49, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'rev' in attrs:\n self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L72_C6", "label": "assign", "type": "assigned_variable", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L71_C4", "vector": [14, 3, 0.6261, 0.0087, 3, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['revs'] = [attrs['rev']]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L74_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [14, 2, 0.6435, 0.0087, 2, 0.49, 0.8, 294, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = attrs['name']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L75_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "vector": [14, 2, 0.6522, 0.0087, 2, 0.49, 1.0, 884, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "label": "_EndElementHandler", "type": "function", "loc": [77, 89], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.7217, 0.113, 1, 0.14, 0.5714, 486, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_EndElementHandler", "arg_names": ["self", "name"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _EndElementHandler(self, name):\n if name != 'string':\n return\n\n assert self._currentString\n assert self._currentStringName\n self._currentString['value'] = self._currentStringValue\n self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L78_C4", "label": "if", "type": "if", "loc": [78, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [4, 2, 0.6826, 0.0174, 2, 0.38, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if name != 'string':\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L79_C6", "label": "return", "type": "return", "loc": [79, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L78_C4", "vector": [13, 3, 0.687, 0.0087, 3, 0.89, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L83_C4", "label": "assign", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7217, 0.0087, 2, 0.38, 0.1667, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['value'] = self._currentStringValue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L84_C4", "label": "assign", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7304, 0.0087, 2, 0.38, 0.3333, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString['endLine'] = self._xml_parser.CurrentLineNumber"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L85_C4", "label": "assign", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7391, 0.0087, 2, 0.38, 0.5, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[self._currentStringName] = self._currentString"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L87_C4", "label": "self._currentString =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7565, 0.0087, 2, 0.38, 0.6667, 654, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentString", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentString = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L88_C4", "label": "self._currentStringName =", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7652, 0.0087, 2, 0.38, 0.8333, 294, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringName", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringName = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L89_C4", "label": "self._currentStringValue =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "vector": [14, 2, 0.7739, 0.0087, 2, 0.38, 1.0, 884, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._currentStringValue", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._currentStringValue = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L91_C2", "label": "_CharacterDataHandler", "type": "function", "loc": [91, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.8087, 0.0435, 1, 0.14, 0.7143, 825, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "_CharacterDataHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CharacterDataHandler(self, data):\n if not self._currentString:\n return\n\n self._currentStringValue += data"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L92_C4", "label": "if", "type": "if", "loc": [92, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L91_C2", "vector": [4, 2, 0.8043, 0.0174, 2, 0.61, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self._currentString:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L93_C6", "label": "return", "type": "return", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L92_C4", "vector": [13, 3, 0.8087, 0.0087, 3, 0.64, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L97_C2", "label": "_KEEP_PARENT_REGEX = compile()", "type": "assigned_variable", "loc": [97, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [14, 1, 0.8565, 0.0348, 1, 0.14, 0.8571, 591, 3, 2, 0, 0, 821, 10, 1], "semantic": {"name": "_KEEP_PARENT_REGEX", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " _KEEP_PARENT_REGEX = re.compile(r'\\s*KEEP_PARENT\\s+'\n r'name\\s*=\\s*[\\'\"]?(?P<name>[a-z0-9_]+)[\\'\"]?'\n r'(?:\\s+rev=[\\'\"]?(?P<rev>[0-9a-f]{12})[\\'\"]?)?\\s*',\n re.MULTILINE | re.DOTALL)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "label": "_CommentHandler", "type": "function", "loc": [102, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "vector": [2, 1, 0.9435, 0.1217, 1, 0.14, 1.0, 562, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "_CommentHandler", "arg_names": ["self", "data"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _CommentHandler(self, data):\n keep_parent_match = self._KEEP_PARENT_REGEX.match(data)\n if not keep_parent_match:\n return\n\n name = keep_parent_match.group('name')\n self._all_strings[name] = {\n 'keepParent' : True,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L103_C4", "label": "keep_parent_match = match()", "type": "assigned_variable", "loc": [103, 103], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [14, 2, 0.8957, 0.0087, 2, 0.4, 0.0, 885, 3, 1, 0, 0, 36, 10, 1], "semantic": {"name": "keep_parent_match", "arg_names": [], "import_names": [], "rhs_call_name": "match", "annotation": ""}, "snippet": " keep_parent_match = self._KEEP_PARENT_REGEX.match(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L104_C4", "label": "if", "type": "if", "loc": [104, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [4, 2, 0.9087, 0.0174, 2, 0.4, 0.2, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not keep_parent_match:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L105_C6", "label": "return", "type": "return", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L104_C4", "vector": [13, 3, 0.913, 0.0087, 3, 0.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L107_C4", "label": "name = group()", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [14, 2, 0.9304, 0.0087, 2, 0.4, 0.4, 57, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " name = keep_parent_match.group('name')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L108_C4", "label": "assign", "type": "assigned_variable", "loc": [108, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [14, 2, 0.9565, 0.0435, 2, 0.4, 0.6, 0, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name] = {\n 'keepParent' : True,\n 'startLine' : self._xml_parser.CurrentLineNumber,\n 'endLine' : self._xml_parser.CurrentLineNumber\n }"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L113_C4", "label": "rev = group()", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [14, 2, 0.9826, 0.0087, 2, 0.4, 0.8, 337, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "rev", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " rev = keep_parent_match.group('rev')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:If_L114_C4", "label": "if", "type": "if", "loc": [114, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "vector": [4, 2, 0.9957, 0.0174, 2, 0.4, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if rev:\n self._all_strings[name]['revs'] = [rev]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L115_C6", "label": "assign", "type": "assigned_variable", "loc": [115, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_333:If_L114_C4", "vector": [14, 3, 1.0, 0.0087, 3, 0.39, 0.0, 0, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._all_strings[name]['revs'] = [rev]"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L43_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Expr_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L19_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L52_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L60_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L62_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L62_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L72_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L58_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L78_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L79_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L84_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L77_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L91_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L91_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L92_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L97_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:ClassDef_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Return_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:FunctionDef_L102_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_333:If_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_333:If_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_333:Assign_L115_C6"}]
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
ajibawa-2023/Python-Code-Large/train/row_334
8
21
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L1_C0", "label": "expression", "type": "expression", "loc": [1, 7], "level": 0, "parent": null, "vector": [8, 0, 0.1905, 0.3333, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "label": "Translator", "type": "class", "loc": [9, 21], "level": 0, "parent": null, "vector": [3, 0, 0.7143, 0.619, 0, 0.66, 1.0, 229, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Translator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L10_C2", "label": "expression", "type": "expression", "loc": [10, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "vector": [8, 1, 0.5238, 0.1429, 1, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n classdocs\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2", "label": "__init__", "type": "function", "loc": [14, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "vector": [2, 1, 0.7619, 0.2381, 1, 0.77, 0.5, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "language"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, language):\n '''\n Constructor\n '''\n self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L15_C4", "label": "expression", "type": "expression", "loc": [15, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2", "vector": [8, 2, 0.7619, 0.1429, 2, 0.03, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''\n Constructor\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:Assign_L18_C4", "label": "self._language =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2", "vector": [14, 2, 0.8571, 0.0476, 2, 0.03, 1.0, 494, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._language", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._language = language"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L20_C2", "label": "Translate", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "vector": [2, 1, 0.9762, 0.0952, 1, 0.77, 1.0, 749, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "Translate", "arg_names": ["self", "string_names"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def Translate(self, string_names):\n print(string_names)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L21_C4", "label": "print()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L20_C2", "vector": [8, 2, 1.0, 0.0476, 2, 0.26, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(string_names)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L10_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L14_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_334:Assign_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_334:ClassDef_L9_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L20_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_334:FunctionDef_L20_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_334:Expr_L21_C4"}]
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self): logging.warn('do_GET: %s, %s', self.command, self.path) url = urlparse.urlparse(self.path) logging.warn('do_GET: %s', url) query = urlparse.parse_qs(url.query) query_keys = [pair[0] for pair in query] response = self.handle_url(url) if response != None: self.send_200() shutil.copyfileobj(response, self.wfile) self.wfile.close() do_POST = do_GET def handle_url(self, url): path = None if url.path == '/v1/venue': path = '../captures/api/v1/venue.xml' elif url.path == '/v1/addvenue': path = '../captures/api/v1/venue.xml' elif url.path == '/v1/venues': path = '../captures/api/v1/venues.xml' elif url.path == '/v1/user': path = '../captures/api/v1/user.xml' elif url.path == '/v1/checkcity': path = '../captures/api/v1/checkcity.xml' elif url.path == '/v1/checkins': path = '../captures/api/v1/checkins.xml' elif url.path == '/v1/cities': path = '../captures/api/v1/cities.xml' elif url.path == '/v1/switchcity': path = '../captures/api/v1/switchcity.xml' elif url.path == '/v1/tips': path = '../captures/api/v1/tips.xml' elif url.path == '/v1/checkin': path = '../captures/api/v1/checkin.xml' elif url.path == '/history/12345.rss': path = '../captures/api/v1/feed.xml' if path is None: self.send_error(404) else: logging.warn('Using: %s' % path) return open(path) def send_200(self): self.send_response(200) self.send_header('Content-type', 'text/xml') self.end_headers() def main(): if len(sys.argv) > 1: port = int(sys.argv[1]) else: port = 8080 server_address = ('0.0.0.0', port) httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler) sa = httpd.socket.getsockname() print "Serving HTTP on", sa[0], "port", sa[1], "..." httpd.serve_forever() if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_335
63
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L6_C0", "label": "shutil import shutil", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import shutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0824, 0.0118, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L8_C0", "label": "urlparse import urlparse", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0941, 0.0118, 0, 0.66, 0.375, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L10_C0", "label": "SimpleHTTPServer import SimpleHTTPServer", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0118, 0, 0.66, 0.5, 643, 0, 1, 0, 0, 643, 0, 0], "semantic": {"name": "SimpleHTTPServer", "arg_names": [], "import_names": ["SimpleHTTPServer"], "rhs_call_name": "", "annotation": ""}, "snippet": "import SimpleHTTPServer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Import_L11_C0", "label": "BaseHTTPServer import BaseHTTPServer", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1294, 0.0118, 0, 0.66, 0.625, 801, 0, 1, 0, 0, 801, 0, 0], "semantic": {"name": "BaseHTTPServer", "arg_names": [], "import_names": ["BaseHTTPServer"], "rhs_call_name": "", "annotation": ""}, "snippet": "import BaseHTTPServer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "label": "RequestHandler", "type": "class", "loc": [14, 68], "level": 0, "parent": null, "vector": [3, 0, 0.4824, 0.6471, 0, 0.66, 0.75, 200, 0, 3, 0, 0, 814, 0, 14], "semantic": {"name": "RequestHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s', self.command, self.path)\n\n url = urlparse.urlparse(self.path)\n logging.warn('do_GET: %s', url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L15_C2", "label": "expression", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "vector": [8, 1, 0.1765, 0.0118, 1, 0.99, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handle playfoursquare.com requests, for testing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "label": "do_GET", "type": "function", "loc": [17, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "vector": [2, 1, 0.2706, 0.1529, 1, 0.99, 0.25, 269, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "do_GET", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def do_GET(self):\n logging.warn('do_GET: %s, %s', self.command, self.path)\n\n url = urlparse.urlparse(self.path)\n logging.warn('do_GET: %s', url)\n query = urlparse.parse_qs(url.query)\n query_keys = [pair[0] for pair in query]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L18_C4", "label": "warn()", "type": "expression", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [8, 2, 0.2118, 0.0118, 2, 0.32, 0.0, 960, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('do_GET: %s, %s', self.command, self.path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L20_C4", "label": "url = urlparse()", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [14, 2, 0.2353, 0.0118, 2, 0.32, 0.1429, 789, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " url = urlparse.urlparse(self.path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L21_C4", "label": "warn()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [8, 2, 0.2471, 0.0118, 2, 0.32, 0.2857, 960, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('do_GET: %s', url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L22_C4", "label": "query = parse_qs()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [14, 2, 0.2588, 0.0118, 2, 0.32, 0.4286, 546, 3, 1, 0, 0, 709, 10, 1], "semantic": {"name": "query", "arg_names": [], "import_names": [], "rhs_call_name": "parse_qs", "annotation": ""}, "snippet": " query = urlparse.parse_qs(url.query)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L23_C4", "label": "query_keys =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [14, 2, 0.2706, 0.0118, 2, 0.32, 0.5714, 890, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "query_keys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " query_keys = [pair[0] for pair in query]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L25_C4", "label": "response = handle_url()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [14, 2, 0.2941, 0.0118, 2, 0.32, 0.7143, 511, 3, 1, 0, 0, 906, 10, 1], "semantic": {"name": "response", "arg_names": [], "import_names": [], "rhs_call_name": "handle_url", "annotation": ""}, "snippet": " response = self.handle_url(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4", "label": "if", "type": "if", "loc": [26, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [4, 2, 0.3176, 0.0353, 2, 0.32, 0.8571, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if response != None:\n self.send_200()\n shutil.copyfileobj(response, self.wfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L27_C6", "label": "send_200()", "type": "expression", "loc": [27, 27], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4", "vector": [8, 3, 0.3176, 0.0118, 3, 0.47, 0.0, 966, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "send_200", "arg_names": [], "import_names": [], "rhs_call_name": "send_200", "annotation": ""}, "snippet": " self.send_200()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L28_C6", "label": "copyfileobj()", "type": "expression", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4", "vector": [8, 3, 0.3294, 0.0118, 3, 0.47, 1.0, 462, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "copyfileobj", "arg_names": [], "import_names": [], "rhs_call_name": "copyfileobj", "annotation": ""}, "snippet": " shutil.copyfileobj(response, self.wfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L29_C4", "label": "close()", "type": "expression", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "vector": [8, 2, 0.3412, 0.0118, 2, 0.32, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " self.wfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L31_C2", "label": "do_POST =", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "vector": [14, 1, 0.3647, 0.0118, 1, 0.99, 0.5, 67, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "do_POST", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " do_POST = do_GET"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "label": "handle_url", "type": "function", "loc": [33, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "vector": [2, 1, 0.5647, 0.3647, 1, 0.99, 0.75, 906, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "handle_url", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def handle_url(self, url):\n path = None\n\n if url.path == '/v1/venue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L34_C4", "label": "path =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "vector": [14, 2, 0.4, 0.0118, 2, 0.02, 0.0, 358, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4", "label": "if", "type": "if", "loc": [36, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "vector": [4, 2, 0.5471, 0.2588, 2, 0.02, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if url.path == '/v1/venue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L37_C6", "label": "path =", "type": "assigned_variable", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4", "vector": [14, 3, 0.4353, 0.0118, 3, 0.15, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venue.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4", "label": "if", "type": "if", "loc": [38, 57], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4", "vector": [4, 3, 0.5588, 0.2353, 3, 0.15, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L39_C6", "label": "path =", "type": "assigned_variable", "loc": [39, 39], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4", "vector": [14, 4, 0.4588, 0.0118, 4, 0.87, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venue.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4", "label": "if", "type": "if", "loc": [40, 57], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4", "vector": [4, 4, 0.5706, 0.2118, 4, 0.87, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L41_C6", "label": "path =", "type": "assigned_variable", "loc": [41, 41], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4", "vector": [14, 5, 0.4824, 0.0118, 5, 0.79, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venues.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4", "label": "if", "type": "if", "loc": [42, 57], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4", "vector": [4, 5, 0.5824, 0.1882, 5, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L43_C6", "label": "path =", "type": "assigned_variable", "loc": [43, 43], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4", "vector": [14, 6, 0.5059, 0.0118, 6, 0.2, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/user.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4", "label": "if", "type": "if", "loc": [44, 57], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4", "vector": [4, 6, 0.5941, 0.1647, 6, 0.2, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L45_C6", "label": "path =", "type": "assigned_variable", "loc": [45, 45], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4", "vector": [14, 7, 0.5294, 0.0118, 7, 0.15, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4", "label": "if", "type": "if", "loc": [46, 57], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4", "vector": [4, 7, 0.6059, 0.1412, 7, 0.15, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L47_C6", "label": "path =", "type": "assigned_variable", "loc": [47, 47], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4", "vector": [14, 8, 0.5529, 0.0118, 8, 0.07, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkins.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4", "label": "if", "type": "if", "loc": [48, 57], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4", "vector": [4, 8, 0.6176, 0.1176, 8, 0.07, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L49_C6", "label": "path =", "type": "assigned_variable", "loc": [49, 49], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4", "vector": [14, 9, 0.5765, 0.0118, 9, 0.52, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/cities.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4", "label": "if", "type": "if", "loc": [50, 57], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4", "vector": [4, 9, 0.6294, 0.0941, 9, 0.52, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L51_C6", "label": "path =", "type": "assigned_variable", "loc": [51, 51], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4", "vector": [14, 10, 0.6, 0.0118, 10, 0.6, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/switchcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4", "label": "if", "type": "if", "loc": [52, 57], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4", "vector": [4, 10, 0.6412, 0.0706, 10, 0.6, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L53_C6", "label": "path =", "type": "assigned_variable", "loc": [53, 53], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4", "vector": [14, 11, 0.6235, 0.0118, 11, 0.24, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/tips.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4", "label": "if", "type": "if", "loc": [54, 57], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4", "vector": [4, 11, 0.6529, 0.0471, 11, 0.24, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L55_C6", "label": "path =", "type": "assigned_variable", "loc": [55, 55], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4", "vector": [14, 12, 0.6471, 0.0118, 12, 0.47, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkin.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L56_C4", "label": "if", "type": "if", "loc": [56, 57], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4", "vector": [4, 12, 0.6647, 0.0235, 12, 0.47, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L57_C6", "label": "path =", "type": "assigned_variable", "loc": [57, 57], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L56_C4", "vector": [14, 13, 0.6706, 0.0118, 13, 0.53, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "label": "if", "type": "if", "loc": [59, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "vector": [4, 2, 0.7176, 0.0588, 2, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path is None:\n self.send_error(404)\n else:\n logging.warn('Using: %s' % path)\n return open(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L60_C6", "label": "send_error()", "type": "expression", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "vector": [8, 3, 0.7059, 0.0118, 3, 0.17, 0.0, 886, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "send_error", "arg_names": [], "import_names": [], "rhs_call_name": "send_error", "annotation": ""}, "snippet": " self.send_error(404)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L62_C6", "label": "warn()", "type": "expression", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "vector": [8, 3, 0.7294, 0.0118, 3, 0.17, 0.5, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Using: %s' % path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Return_L63_C6", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "vector": [13, 3, 0.7412, 0.0118, 3, 0.17, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return open(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "label": "send_200", "type": "function", "loc": [65, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "vector": [2, 1, 0.7824, 0.0471, 1, 0.99, 1.0, 966, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "send_200", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def send_200(self):\n self.send_response(200)\n self.send_header('Content-type', 'text/xml')\n self.end_headers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L66_C4", "label": "send_response()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "vector": [8, 2, 0.7765, 0.0118, 2, 0.43, 0.0, 844, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "send_response", "arg_names": [], "import_names": [], "rhs_call_name": "send_response", "annotation": ""}, "snippet": " self.send_response(200)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L67_C4", "label": "send_header()", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "vector": [8, 2, 0.7882, 0.0118, 2, 0.43, 0.5, 81, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "send_header", "arg_names": [], "import_names": [], "rhs_call_name": "send_header", "annotation": ""}, "snippet": " self.send_header('Content-type', 'text/xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L68_C4", "label": "end_headers()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "vector": [8, 2, 0.8, 0.0118, 2, 0.43, 1.0, 683, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "end_headers", "arg_names": [], "import_names": [], "rhs_call_name": "end_headers", "annotation": ""}, "snippet": " self.end_headers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "label": "main", "type": "function", "loc": [71, 81], "level": 0, "parent": null, "vector": [2, 0, 0.8941, 0.1294, 0, 0.66, 0.875, 624, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n if len(sys.argv) > 1:\n port = int(sys.argv[1])\n else:\n port = 8080\n server_address = ('0.0.0.0', port)\n httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2", "label": "if", "type": "if", "loc": [72, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [4, 1, 0.8647, 0.0471, 1, 0.68, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(sys.argv) > 1:\n port = int(sys.argv[1])\n else:\n port = 8080"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L73_C4", "label": "port = int()", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2", "vector": [14, 2, 0.8588, 0.0118, 2, 0.55, 0.0, 308, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " port = int(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L75_C4", "label": "port =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2", "vector": [14, 2, 0.8824, 0.0118, 2, 0.55, 1.0, 308, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " port = 8080"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L76_C2", "label": "server_address =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [14, 1, 0.8941, 0.0118, 1, 0.68, 0.2, 816, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "server_address", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " server_address = ('0.0.0.0', port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L77_C2", "label": "httpd = HTTPServer()", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [14, 1, 0.9059, 0.0118, 1, 0.68, 0.4, 471, 3, 2, 0, 0, 258, 10, 1], "semantic": {"name": "httpd", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPServer", "annotation": ""}, "snippet": " httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L79_C2", "label": "sa = getsockname()", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [14, 1, 0.9294, 0.0118, 1, 0.68, 0.6, 756, 3, 0, 0, 0, 994, 10, 1], "semantic": {"name": "sa", "arg_names": [], "import_names": [], "rhs_call_name": "getsockname", "annotation": ""}, "snippet": " sa = httpd.socket.getsockname()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L80_C2", "label": "print()", "type": "expression", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [8, 1, 0.9412, 0.0118, 1, 0.68, 0.8, 535, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Serving HTTP on\", sa[0], \"port\", sa[1], \"...\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L81_C2", "label": "serve_forever()", "type": "expression", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "vector": [8, 1, 0.9529, 0.0118, 1, 0.68, 1.0, 993, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "serve_forever", "arg_names": [], "import_names": [], "rhs_call_name": "serve_forever", "annotation": ""}, "snippet": " httpd.serve_forever()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:If_L84_C0", "label": "if", "type": "if", "loc": [84, 85], "level": 0, "parent": null, "vector": [4, 0, 0.9941, 0.0235, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L85_C2", "label": "main()", "type": "expression", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_335:If_L84_C0", "vector": [8, 1, 1.0, 0.0118, 1, 0.03, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L27_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L28_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L37_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L39_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L41_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L43_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L45_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L47_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L49_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L51_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L53_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L55_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L57_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L60_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Return_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L72_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_335:If_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_335:Expr_L85_C2"}]
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basename.split('_')]) fullpath = os.path.join(TYPESDIR, f) typepath = os.path.join(BASEDIR, 'types', javaname + '.java') parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java') cmd = 'python gen_class.py %s > %s' % (fullpath, typepath) print cmd subprocess.call(cmd, stdout=sys.stdout, shell=True) cmd = 'python gen_parser.py %s > %s' % (fullpath, parserpath) print cmd subprocess.call(cmd, stdout=sys.stdout, shell=True)
ajibawa-2023/Python-Code-Large/train/row_336
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_336:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Import_L4_C0", "label": "subprocess import subprocess", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2857, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L7_C0", "label": "BASEDIR =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.2593, 0.037, 0, 0.66, 0.4286, 914, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BASEDIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BASEDIR = '../main/src/com/joelapenna/foursquare'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L8_C0", "label": "TYPESDIR =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.2963, 0.037, 0, 0.66, 0.5714, 369, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TYPESDIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TYPESDIR = '../captures/types/v1'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L10_C0", "label": "captures =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.3704, 0.037, 0, 0.66, 0.7143, 890, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "captures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "captures = sys.argv[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:If_L11_C0", "label": "if", "type": "if", "loc": [11, 12], "level": 0, "parent": null, "vector": [4, 0, 0.4259, 0.0741, 0, 0.66, 0.8571, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not captures:\n captures = os.listdir(TYPESDIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L12_C2", "label": "captures = listdir()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:If_L11_C0", "vector": [14, 1, 0.4444, 0.037, 1, 0.55, 0.0, 890, 3, 1, 0, 0, 551, 10, 1], "semantic": {"name": "captures", "arg_names": [], "import_names": [], "rhs_call_name": "listdir", "annotation": ""}, "snippet": " captures = os.listdir(TYPESDIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "label": "for f", "type": "for", "loc": [14, 27], "level": 0, "parent": null, "vector": [6, 0, 0.7593, 0.5185, 0, 0.66, 1.0, 899, 2, 0, 0, 0, 0, 0, 11], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for f in captures:\n basename = f.split('.')[0]\n javaname = ''.join([c.capitalize() for c in basename.split('_')])\n fullpath = os.path.join(TYPESDIR, f)\n typepath = os.path.join(BASEDIR, 'types', javaname + '.java')\n parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java')\n\n cmd = 'python gen_class.py %s > %s' % (fullpath, typepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L15_C2", "label": "basename =", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.5556, 0.037, 1, 0.41, 0.0, 164, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " basename = f.split('.')[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L16_C2", "label": "javaname = join()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.41, 0.1, 554, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "javaname", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " javaname = ''.join([c.capitalize() for c in basename.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L17_C2", "label": "fullpath = join()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.41, 0.2, 858, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "fullpath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " fullpath = os.path.join(TYPESDIR, f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L18_C2", "label": "typepath = join()", "type": "assigned_variable", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.6667, 0.037, 1, 0.41, 0.3, 428, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "typepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " typepath = os.path.join(BASEDIR, 'types', javaname + '.java')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L19_C2", "label": "parserpath = join()", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.41, 0.4, 114, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "parserpath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L21_C2", "label": "cmd =", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.41, 0.5, 604, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = 'python gen_class.py %s > %s' % (fullpath, typepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L22_C2", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.41, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L23_C2", "label": "call()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.41, 0.7, 832, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "call", "arg_names": [], "import_names": [], "rhs_call_name": "call", "annotation": ""}, "snippet": " subprocess.call(cmd, stdout=sys.stdout, shell=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L25_C2", "label": "cmd =", "type": "assigned_variable", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [14, 1, 0.9259, 0.037, 1, 0.41, 0.8, 604, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = 'python gen_parser.py %s > %s' % (fullpath, parserpath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L26_C2", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.41, 0.9, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L27_C2", "label": "call()", "type": "expression", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "vector": [8, 1, 1.0, 0.037, 1, 0.41, 1.0, 832, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "call", "arg_names": [], "import_names": [], "rhs_call_name": "call", "annotation": ""}, "snippet": " subprocess.call(cmd, stdout=sys.stdout, shell=True)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_336:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Assign_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_336:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_336:Expr_L27_C2"}]
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml.dom import pulldom from xml.dom import minidom import oauth """From: http://groups.google.com/group/foursquare-api/web/oauth @consumer = OAuth::Consumer.new("consumer_token","consumer_secret", { :site => "http://foursquare.com", :scheme => :header, :http_method => :post, :request_token_path => "/oauth/request_token", :access_token_path => "/oauth/access_token", :authorize_path => "/oauth/authorize" }) """ SERVER = 'api.foursquare.com:80' CONTENT_TYPE_HEADER = {'Content-Type' :'application/x-www-form-urlencoded'} SIGNATURE_METHOD = oauth.OAuthSignatureMethod_HMAC_SHA1() AUTHEXCHANGE_URL = 'http://api.foursquare.com/v1/authexchange' def parse_auth_response(auth_response): return ( re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0], re.search('<oauth_token_secret>(.*)</oauth_token_secret>', auth_response).groups()[0] ) def create_signed_oauth_request(username, password, consumer): oauth_request = oauth.OAuthRequest.from_consumer_and_token( consumer, http_method='POST', http_url=AUTHEXCHANGE_URL, parameters=dict(fs_username=username, fs_password=password)) oauth_request.sign_request(SIGNATURE_METHOD, consumer, None) return oauth_request def main(): url = urlparse.urlparse(sys.argv[1]) # Nevermind that the query can have repeated keys. parameters = dict(urlparse.parse_qsl(url.query)) password_file = open(os.path.join(user.home, '.oget')) lines = [line.strip() for line in password_file.readlines()] if len(lines) == 4: cons_key, cons_key_secret, username, password = lines access_token = None else: cons_key, cons_key_secret, username, password, token, secret = lines access_token = oauth.OAuthToken(token, secret) consumer = oauth.OAuthConsumer(cons_key, cons_key_secret) if not access_token: oauth_request = create_signed_oauth_request(username, password, consumer) connection = httplib.HTTPConnection(SERVER) headers = {'Content-Type' :'application/x-www-form-urlencoded'} connection.request(oauth_request.http_method, AUTHEXCHANGE_URL, body=oauth_request.to_postdata(), headers=headers) auth_response = connection.getresponse().read() token = parse_auth_response(auth_response) access_token = oauth.OAuthToken(*token) open(os.path.join(user.home, '.oget'), 'w').write('\n'.join(( cons_key, cons_key_secret, username, password, token[0], token[1]))) oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer, access_token, http_method='POST', http_url=url.geturl(), parameters=parameters) oauth_request.sign_request(SIGNATURE_METHOD, consumer, access_token) connection = httplib.HTTPConnection(SERVER) connection.request(oauth_request.http_method, oauth_request.to_url(), body=oauth_request.to_postdata(), headers=CONTENT_TYPE_HEADER) print connection.getresponse().read() #print minidom.parse(connection.getresponse()).toprettyxml(indent=' ') if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_337
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L14_C0", "label": "httplib import httplib", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import httplib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1351, 0.009, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L16_C0", "label": "re import re", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1441, 0.009, 0, 0.66, 0.15, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1532, 0.009, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L18_C0", "label": "urllib import urllib", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1622, 0.009, 0, 0.66, 0.25, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L19_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1712, 0.009, 0, 0.66, 0.3, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L20_C0", "label": "urlparse import urlparse", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.1802, 0.009, 0, 0.66, 0.35, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L21_C0", "label": "user import user", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1892, 0.009, 0, 0.66, 0.4, 503, 0, 1, 0, 0, 503, 0, 0], "semantic": {"name": "user", "arg_names": [], "import_names": ["user"], "rhs_call_name": "", "annotation": ""}, "snippet": "import user"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:ImportFrom_L22_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.1982, 0.009, 0, 0.66, 0.45, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:ImportFrom_L23_C0", "label": "from xml.dom import minidom", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.2072, 0.009, 0, 0.66, 0.5, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["minidom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import minidom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Import_L25_C0", "label": "oauth import oauth", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.2252, 0.009, 0, 0.66, 0.55, 234, 0, 1, 0, 0, 234, 0, 0], "semantic": {"name": "oauth", "arg_names": [], "import_names": ["oauth"], "rhs_call_name": "", "annotation": ""}, "snippet": "import oauth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L27_C0", "label": "expression", "type": "expression", "loc": [27, 37], "level": 0, "parent": null, "vector": [8, 0, 0.2883, 0.0991, 0, 0.66, 0.6, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"From: http://groups.google.com/group/foursquare-api/web/oauth\n\n@consumer = OAuth::Consumer.new(\"consumer_token\",\"consumer_secret\", {\n :site => \"http://foursquare.com\",\n :scheme => :header,\n :http_method => :post,\n :request_token_path => \"/oauth/request_token\",\n :access_token_path => \"/oauth/access_token\","}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L39_C0", "label": "SERVER =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.3514, 0.009, 0, 0.66, 0.65, 784, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SERVER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SERVER = 'api.foursquare.com:80'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L41_C0", "label": "CONTENT_TYPE_HEADER =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.3694, 0.009, 0, 0.66, 0.7, 415, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CONTENT_TYPE_HEADER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONTENT_TYPE_HEADER = {'Content-Type' :'application/x-www-form-urlencoded'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L43_C0", "label": "SIGNATURE_METHOD = OAuthSignatureMethod_HMAC_SHA1()", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.3874, 0.009, 0, 0.66, 0.75, 339, 3, 0, 0, 0, 605, 10, 1], "semantic": {"name": "SIGNATURE_METHOD", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthSignatureMethod_HMAC_SHA1", "annotation": ""}, "snippet": "SIGNATURE_METHOD = oauth.OAuthSignatureMethod_HMAC_SHA1()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L45_C0", "label": "AUTHEXCHANGE_URL =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.4054, 0.009, 0, 0.66, 0.8, 898, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "AUTHEXCHANGE_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "AUTHEXCHANGE_URL = 'http://api.foursquare.com/v1/authexchange'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L48_C0", "label": "parse_auth_response", "type": "function", "loc": [48, 53], "level": 0, "parent": null, "vector": [2, 0, 0.455, 0.0541, 0, 0.66, 0.85, 168, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "parse_auth_response", "arg_names": ["auth_response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def parse_auth_response(auth_response):\n return (\n re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0],\n re.search('<oauth_token_secret>(.*)</oauth_token_secret>',\n auth_response).groups()[0]\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Return_L49_C2", "label": "return", "type": "return", "loc": [49, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L48_C0", "vector": [13, 1, 0.4595, 0.045, 1, 0.04, 0.0, 0, 0, 0, 0, 0, 0, 8, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (\n re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0],\n re.search('<oauth_token_secret>(.*)</oauth_token_secret>',\n auth_response).groups()[0]\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "label": "create_signed_oauth_request", "type": "function", "loc": [56, 62], "level": 0, "parent": null, "vector": [2, 0, 0.5315, 0.0631, 0, 0.66, 0.9, 448, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "create_signed_oauth_request", "arg_names": ["username", "password", "consumer"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_signed_oauth_request(username, password, consumer):\n oauth_request = oauth.OAuthRequest.from_consumer_and_token(\n consumer, http_method='POST', http_url=AUTHEXCHANGE_URL,\n parameters=dict(fs_username=username, fs_password=password))\n\n oauth_request.sign_request(SIGNATURE_METHOD, consumer, None)\n return oauth_request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L57_C2", "label": "oauth_request = from_consumer_and_token()", "type": "assigned_variable", "loc": [57, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "vector": [14, 1, 0.5225, 0.027, 1, 0.73, 0.0, 1, 3, 4, 0, 0, 319, 10, 2], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "from_consumer_and_token", "annotation": ""}, "snippet": " oauth_request = oauth.OAuthRequest.from_consumer_and_token(\n consumer, http_method='POST', http_url=AUTHEXCHANGE_URL,\n parameters=dict(fs_username=username, fs_password=password))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L61_C2", "label": "sign_request()", "type": "expression", "loc": [61, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "vector": [8, 1, 0.5495, 0.009, 1, 0.73, 0.5, 817, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "sign_request", "arg_names": [], "import_names": [], "rhs_call_name": "sign_request", "annotation": ""}, "snippet": " oauth_request.sign_request(SIGNATURE_METHOD, consumer, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Return_L62_C2", "label": "return", "type": "return", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "vector": [13, 1, 0.5586, 0.009, 1, 0.73, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return oauth_request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "label": "main", "type": "function", "loc": [65, 106], "level": 0, "parent": null, "vector": [2, 0, 0.7703, 0.3784, 0, 0.66, 0.95, 624, 0, 0, 0, 0, 0, 0, 32], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n url = urlparse.urlparse(sys.argv[1])\n # Nevermind that the query can have repeated keys.\n parameters = dict(urlparse.parse_qsl(url.query))\n\n password_file = open(os.path.join(user.home, '.oget'))\n lines = [line.strip() for line in password_file.readlines()]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L66_C2", "label": "url = urlparse()", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.5946, 0.009, 1, 0.37, 0.0, 789, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " url = urlparse.urlparse(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L68_C2", "label": "parameters = dict()", "type": "assigned_variable", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.6126, 0.009, 1, 0.37, 0.0909, 29, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "parameters", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " parameters = dict(urlparse.parse_qsl(url.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L70_C2", "label": "password_file = open()", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.6306, 0.009, 1, 0.37, 0.1818, 18, 3, 1, 0, 0, 693, 10, 2], "semantic": {"name": "password_file", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " password_file = open(os.path.join(user.home, '.oget'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L71_C2", "label": "lines =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.6396, 0.009, 1, 0.37, 0.2727, 73, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lines = [line.strip() for line in password_file.readlines()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "label": "if", "type": "if", "loc": [73, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [4, 1, 0.6802, 0.0541, 1, 0.37, 0.3636, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(lines) == 4:\n cons_key, cons_key_secret, username, password = lines\n access_token = None\n else:\n cons_key, cons_key_secret, username, password, token, secret = lines\n access_token = oauth.OAuthToken(token, secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L74_C4", "label": "cons_key, cons_key_secret, username, password =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "vector": [14, 2, 0.6667, 0.009, 2, 0.91, 0.0, 564, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cons_key, cons_key_secret, username, password", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cons_key, cons_key_secret, username, password = lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L75_C4", "label": "access_token =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "vector": [14, 2, 0.6757, 0.009, 2, 0.91, 0.3333, 797, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_token = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L77_C4", "label": "cons_key, cons_key_secret, username, password, token, secret =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "vector": [14, 2, 0.6937, 0.009, 2, 0.91, 0.6667, 616, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cons_key, cons_key_secret, username, password, token, secret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cons_key, cons_key_secret, username, password, token, secret = lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L78_C4", "label": "access_token = OAuthToken()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "vector": [14, 2, 0.7027, 0.009, 2, 0.91, 1.0, 797, 3, 2, 0, 0, 512, 10, 1], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthToken", "annotation": ""}, "snippet": " access_token = oauth.OAuthToken(token, secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L80_C2", "label": "consumer = OAuthConsumer()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.7207, 0.009, 1, 0.37, 0.4545, 352, 3, 2, 0, 0, 660, 10, 1], "semantic": {"name": "consumer", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthConsumer", "annotation": ""}, "snippet": " consumer = oauth.OAuthConsumer(cons_key, cons_key_secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "label": "if", "type": "if", "loc": [82, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [4, 1, 0.7973, 0.1261, 1, 0.37, 0.5455, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not access_token:\n oauth_request = create_signed_oauth_request(username, password, consumer)\n\n connection = httplib.HTTPConnection(SERVER)\n\n headers = {'Content-Type' :'application/x-www-form-urlencoded'}\n connection.request(oauth_request.http_method, AUTHEXCHANGE_URL,\n body=oauth_request.to_postdata(), headers=headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L83_C4", "label": "oauth_request = create_signed_oauth_request()", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.7477, 0.009, 2, 0.1, 0.0, 1, 3, 3, 0, 0, 448, 10, 1], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "create_signed_oauth_request", "annotation": ""}, "snippet": " oauth_request = create_signed_oauth_request(username, password, consumer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L85_C4", "label": "connection = HTTPConnection()", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.7658, 0.009, 2, 0.1, 0.1429, 351, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "connection", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": " connection = httplib.HTTPConnection(SERVER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L87_C4", "label": "headers =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.7838, 0.009, 2, 0.1, 0.2857, 950, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "headers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " headers = {'Content-Type' :'application/x-www-form-urlencoded'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L88_C4", "label": "request()", "type": "expression", "loc": [88, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [8, 2, 0.7973, 0.018, 2, 0.1, 0.4286, 50, 3, 4, 0, 0, 0, 0, 2], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " connection.request(oauth_request.http_method, AUTHEXCHANGE_URL,\n body=oauth_request.to_postdata(), headers=headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L91_C4", "label": "auth_response = read()", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.8198, 0.009, 2, 0.1, 0.5714, 446, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "auth_response", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " auth_response = connection.getresponse().read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L92_C4", "label": "token = parse_auth_response()", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.8288, 0.009, 2, 0.1, 0.7143, 129, 3, 1, 0, 0, 168, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "parse_auth_response", "annotation": ""}, "snippet": " token = parse_auth_response(auth_response)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L93_C4", "label": "access_token = OAuthToken()", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [14, 2, 0.8378, 0.009, 2, 0.1, 0.8571, 797, 3, 1, 0, 0, 512, 10, 1], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthToken", "annotation": ""}, "snippet": " access_token = oauth.OAuthToken(*token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L94_C4", "label": "write()", "type": "expression", "loc": [94, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "vector": [8, 2, 0.8514, 0.018, 2, 0.1, 1.0, 837, 3, 1, 0, 0, 0, 0, 4], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " open(os.path.join(user.home, '.oget'), 'w').write('\\n'.join((\n cons_key, cons_key_secret, username, password, token[0], token[1])))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L97_C2", "label": "oauth_request = from_consumer_and_token()", "type": "assigned_variable", "loc": [97, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.8829, 0.027, 1, 0.37, 0.6364, 1, 3, 5, 0, 0, 319, 10, 2], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "from_consumer_and_token", "annotation": ""}, "snippet": " oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer,\n access_token, http_method='POST', http_url=url.geturl(),\n parameters=parameters)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L100_C2", "label": "sign_request()", "type": "expression", "loc": [100, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [8, 1, 0.9009, 0.009, 1, 0.37, 0.7273, 817, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "sign_request", "arg_names": [], "import_names": [], "rhs_call_name": "sign_request", "annotation": ""}, "snippet": " oauth_request.sign_request(SIGNATURE_METHOD, consumer, access_token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L102_C2", "label": "connection = HTTPConnection()", "type": "assigned_variable", "loc": [102, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [14, 1, 0.9189, 0.009, 1, 0.37, 0.8182, 351, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "connection", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": " connection = httplib.HTTPConnection(SERVER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L103_C2", "label": "request()", "type": "expression", "loc": [103, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [8, 1, 0.9324, 0.018, 1, 0.37, 0.9091, 50, 3, 4, 0, 0, 0, 0, 3], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " connection.request(oauth_request.http_method, oauth_request.to_url(),\n body=oauth_request.to_postdata(), headers=CONTENT_TYPE_HEADER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L106_C2", "label": "print()", "type": "expression", "loc": [106, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "vector": [8, 1, 0.955, 0.009, 1, 0.37, 1.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(connection.getresponse().read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:If_L110_C0", "label": "if", "type": "if", "loc": [110, 111], "level": 0, "parent": null, "vector": [4, 0, 0.9955, 0.018, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L111_C2", "label": "main()", "type": "expression", "loc": [111, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_337:If_L110_C0", "vector": [8, 1, 1.0, 0.009, 1, 0.61, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Return_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L68_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L70_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L97_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L100_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Assign_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L103_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L106_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_337:If_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_337:Expr_L111_C2"}]
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joelapenna.foursquare.error.FoursquareParseException; import com.joelapenna.foursquare.types.%(type_name)s; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * Auto-generated: %(timestamp)s * * @author Joe LaPenna (joe@joelapenna.com) * @param <T> */ public class %(type_name)sParser extends AbstractParser<%(type_name)s> { private static final Logger LOG = Logger.getLogger(%(type_name)sParser.class.getCanonicalName()); private static final boolean DEBUG = Foursquare.PARSER_DEBUG; @Override public %(type_name)s parseInner(XmlPullParser parser) throws XmlPullParserException, IOException, FoursquareError, FoursquareParseException { parser.require(XmlPullParser.START_TAG, null, null); %(type_name)s %(top_node_name)s = new %(type_name)s(); while (parser.nextTag() == XmlPullParser.START_TAG) { String name = parser.getName(); %(stanzas)s } else { // Consume something we don't understand. if (DEBUG) LOG.log(Level.FINE, "Found tag that we don't recognize: " + name); skipSubTree(parser); } } return %(top_node_name)s; } }""" BOOLEAN_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(Boolean.valueOf(parser.nextText())); """ GROUP_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(new GroupParser(new %(sub_parser_camel_case)s()).parse(parser)); """ COMPLEX_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(new %(parser_name)s().parse(parser)); """ STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(parser.nextText()); """ def main(): type_name, top_node_name, attributes = common.WalkNodesForAttributes( sys.argv[1]) GenerateClass(type_name, top_node_name, attributes) def GenerateClass(type_name, top_node_name, attributes): """generate it. type_name: the type of object the parser returns top_node_name: the name of the object the parser returns. per common.WalkNodsForAttributes """ stanzas = [] for name in sorted(attributes): typ, children = attributes[name] replacements = Replacements(top_node_name, name, typ, children) if typ == common.BOOLEAN: stanzas.append(BOOLEAN_STANZA % replacements) elif typ == common.GROUP: stanzas.append(GROUP_STANZA % replacements) elif typ in common.COMPLEX: stanzas.append(COMPLEX_STANZA % replacements) else: stanzas.append(STANZA % replacements) if stanzas: # pop off the extranious } else for the first conditional stanza. stanzas[0] = stanzas[0].replace('} else ', '', 1) replacements = Replacements(top_node_name, name, typ, [None]) replacements['stanzas'] = '\n'.join(stanzas).strip() print PARSER % replacements def Replacements(top_node_name, name, typ, children): # CameCaseClassName type_name = ''.join([word.capitalize() for word in top_node_name.split('_')]) # CamelCaseClassName camel_name = ''.join([word.capitalize() for word in name.split('_')]) # camelCaseLocalName attribute_name = camel_name.lower().capitalize() # mFieldName field_name = 'm' + camel_name if children[0]: sub_parser_camel_case = children[0] + 'Parser' else: sub_parser_camel_case = (camel_name[:-1] + 'Parser') return { 'type_name': type_name, 'name': name, 'top_node_name': top_node_name, 'camel_name': camel_name, 'parser_name': typ + 'Parser', 'attribute_name': attribute_name, 'field_name': field_name, 'typ': typ, 'timestamp': datetime.datetime.now(), 'sub_parser_camel_case': sub_parser_camel_case, 'sub_type': children[0] } if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_338
42
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_338:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datetime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Import_L5_C0", "label": "textwrap import textwrap", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0336, 0.0067, 0, 0.66, 0.1538, 641, 0, 1, 0, 0, 641, 0, 0], "semantic": {"name": "textwrap", "arg_names": [], "import_names": ["textwrap"], "rhs_call_name": "", "annotation": ""}, "snippet": "import textwrap"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Import_L7_C0", "label": "common import common", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.047, 0.0067, 0, 0.66, 0.2308, 718, 0, 1, 0, 0, 718, 0, 0], "semantic": {"name": "common", "arg_names": [], "import_names": ["common"], "rhs_call_name": "", "annotation": ""}, "snippet": "import common"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:ImportFrom_L9_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0604, 0.0067, 0, 0.66, 0.3077, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L11_C0", "label": "PARSER =", "type": "assigned_variable", "loc": [11, 59], "level": 0, "parent": null, "vector": [14, 0, 0.2349, 0.3289, 0, 0.66, 0.3846, 92, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "PARSER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L61_C0", "label": "BOOLEAN_STANZA =", "type": "assigned_variable", "loc": [61, 64], "level": 0, "parent": null, "vector": [14, 0, 0.4195, 0.0268, 0, 0.66, 0.4615, 839, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BOOLEAN_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOOLEAN_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(Boolean.valueOf(parser.nextText()));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L66_C0", "label": "GROUP_STANZA =", "type": "assigned_variable", "loc": [66, 69], "level": 0, "parent": null, "vector": [14, 0, 0.453, 0.0268, 0, 0.66, 0.5385, 306, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "GROUP_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "GROUP_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(new GroupParser(new %(sub_parser_camel_case)s()).parse(parser));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L71_C0", "label": "COMPLEX_STANZA =", "type": "assigned_variable", "loc": [71, 74], "level": 0, "parent": null, "vector": [14, 0, 0.4866, 0.0268, 0, 0.66, 0.6154, 61, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "COMPLEX_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMPLEX_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(new %(parser_name)s().parse(parser));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L76_C0", "label": "STANZA =", "type": "assigned_variable", "loc": [76, 79], "level": 0, "parent": null, "vector": [14, 0, 0.5201, 0.0268, 0, 0.66, 0.6923, 276, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(parser.nextText());\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L82_C0", "label": "main", "type": "function", "loc": [82, 85], "level": 0, "parent": null, "vector": [2, 0, 0.5604, 0.0268, 0, 0.66, 0.7692, 624, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n type_name, top_node_name, attributes = common.WalkNodesForAttributes(\n sys.argv[1])\n GenerateClass(type_name, top_node_name, attributes)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L83_C2", "label": "type_name, top_node_name, attributes = WalkNodesForAttributes()", "type": "assigned_variable", "loc": [83, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L82_C0", "vector": [14, 1, 0.5604, 0.0134, 1, 0.63, 0.0, 244, 3, 1, 0, 0, 612, 10, 1], "semantic": {"name": "type_name, top_node_name, attributes", "arg_names": [], "import_names": [], "rhs_call_name": "WalkNodesForAttributes", "annotation": ""}, "snippet": " type_name, top_node_name, attributes = common.WalkNodesForAttributes(\n sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L85_C2", "label": "GenerateClass()", "type": "expression", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L82_C0", "vector": [8, 1, 0.5705, 0.0067, 1, 0.63, 1.0, 578, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "GenerateClass", "arg_names": [], "import_names": [], "rhs_call_name": "GenerateClass", "annotation": ""}, "snippet": " GenerateClass(type_name, top_node_name, attributes)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "label": "GenerateClass", "type": "function", "loc": [88, 115], "level": 0, "parent": null, "vector": [2, 0, 0.6812, 0.1879, 0, 0.66, 0.8462, 578, 0, 3, 0, 0, 0, 0, 11], "semantic": {"name": "GenerateClass", "arg_names": ["type_name", "top_node_name", "attributes"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GenerateClass(type_name, top_node_name, attributes):\n \"\"\"generate it.\n type_name: the type of object the parser returns\n top_node_name: the name of the object the parser returns.\n per common.WalkNodsForAttributes\n \"\"\"\n stanzas = []\n for name in sorted(attributes):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L89_C2", "label": "expression", "type": "expression", "loc": [89, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [8, 1, 0.6107, 0.0336, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"generate it.\n type_name: the type of object the parser returns\n top_node_name: the name of the object the parser returns.\n per common.WalkNodsForAttributes\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L94_C2", "label": "stanzas =", "type": "assigned_variable", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [14, 1, 0.6309, 0.0067, 1, 0.45, 0.1667, 232, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "stanzas", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stanzas = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "label": "for name", "type": "for", "loc": [95, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [6, 1, 0.6812, 0.094, 1, 0.45, 0.3333, 57, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in sorted(attributes):\n typ, children = attributes[name]\n replacements = Replacements(top_node_name, name, typ, children)\n if typ == common.BOOLEAN:\n stanzas.append(BOOLEAN_STANZA % replacements)\n\n elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L96_C4", "label": "typ, children =", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "vector": [14, 2, 0.6443, 0.0067, 2, 0.62, 0.0, 844, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "typ, children", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " typ, children = attributes[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L97_C4", "label": "replacements = Replacements()", "type": "assigned_variable", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "vector": [14, 2, 0.651, 0.0067, 2, 0.62, 0.5, 403, 3, 4, 0, 0, 695, 10, 1], "semantic": {"name": "replacements", "arg_names": [], "import_names": [], "rhs_call_name": "Replacements", "annotation": ""}, "snippet": " replacements = Replacements(top_node_name, name, typ, children)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4", "label": "if", "type": "if", "loc": [98, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "vector": [4, 2, 0.6913, 0.0738, 2, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if typ == common.BOOLEAN:\n stanzas.append(BOOLEAN_STANZA % replacements)\n\n elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)\n\n elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L99_C6", "label": "append()", "type": "expression", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4", "vector": [8, 3, 0.6644, 0.0067, 3, 0.79, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(BOOLEAN_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4", "label": "if", "type": "if", "loc": [101, 108], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4", "vector": [4, 3, 0.7013, 0.0537, 3, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)\n\n elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)\n\n else:\n stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L102_C6", "label": "append()", "type": "expression", "loc": [102, 102], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4", "vector": [8, 4, 0.6846, 0.0067, 4, 0.25, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(GROUP_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4", "label": "if", "type": "if", "loc": [104, 108], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4", "vector": [4, 4, 0.7114, 0.0336, 4, 0.25, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)\n\n else:\n stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L105_C6", "label": "append()", "type": "expression", "loc": [105, 105], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4", "vector": [8, 5, 0.7047, 0.0067, 5, 0.25, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(COMPLEX_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L108_C6", "label": "append()", "type": "expression", "loc": [108, 108], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4", "vector": [8, 5, 0.7248, 0.0067, 5, 0.25, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L109_C2", "label": "if", "type": "if", "loc": [109, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [4, 1, 0.7383, 0.0201, 1, 0.45, 0.5, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if stanzas:\n # pop off the extranious } else for the first conditional stanza.\n stanzas[0] = stanzas[0].replace('} else ', '', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L111_C4", "label": " = replace()", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L109_C2", "vector": [14, 2, 0.745, 0.0067, 2, 0.22, 0.0, 0, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " stanzas[0] = stanzas[0].replace('} else ', '', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L113_C2", "label": "replacements = Replacements()", "type": "assigned_variable", "loc": [113, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [14, 1, 0.7584, 0.0067, 1, 0.45, 0.6667, 403, 3, 4, 0, 0, 695, 10, 1], "semantic": {"name": "replacements", "arg_names": [], "import_names": [], "rhs_call_name": "Replacements", "annotation": ""}, "snippet": " replacements = Replacements(top_node_name, name, typ, [None])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L114_C2", "label": " = strip()", "type": "assigned_variable", "loc": [114, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [14, 1, 0.7651, 0.0067, 1, 0.45, 0.8333, 0, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " replacements['stanzas'] = '\\n'.join(stanzas).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L115_C2", "label": "print()", "type": "expression", "loc": [115, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "vector": [8, 1, 0.7718, 0.0067, 1, 0.45, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(PARSER % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "label": "Replacements", "type": "function", "loc": [118, 145], "level": 0, "parent": null, "vector": [2, 0, 0.8826, 0.1879, 0, 0.66, 0.9231, 695, 0, 4, 1, 0, 0, 0, 9], "semantic": {"name": "Replacements", "arg_names": ["top_node_name", "name", "typ", "children"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Replacements(top_node_name, name, typ, children):\n # CameCaseClassName\n type_name = ''.join([word.capitalize() for word in top_node_name.split('_')])\n # CamelCaseClassName\n camel_name = ''.join([word.capitalize() for word in name.split('_')])\n # camelCaseLocalName\n attribute_name = camel_name.lower().capitalize()\n # mFieldName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L120_C2", "label": "type_name = join()", "type": "assigned_variable", "loc": [120, 120], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [14, 1, 0.8054, 0.0067, 1, 0.77, 0.0, 81, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " type_name = ''.join([word.capitalize() for word in top_node_name.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L122_C2", "label": "camel_name = join()", "type": "assigned_variable", "loc": [122, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [14, 1, 0.8188, 0.0067, 1, 0.77, 0.2, 510, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "camel_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " camel_name = ''.join([word.capitalize() for word in name.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L124_C2", "label": "attribute_name = capitalize()", "type": "assigned_variable", "loc": [124, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [14, 1, 0.8322, 0.0067, 1, 0.77, 0.4, 592, 3, 0, 0, 0, 353, 10, 2], "semantic": {"name": "attribute_name", "arg_names": [], "import_names": [], "rhs_call_name": "capitalize", "annotation": ""}, "snippet": " attribute_name = camel_name.lower().capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L126_C2", "label": "field_name =", "type": "assigned_variable", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [14, 1, 0.8456, 0.0067, 1, 0.77, 0.6, 918, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " field_name = 'm' + camel_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2", "label": "if", "type": "if", "loc": [128, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [4, 1, 0.8691, 0.0268, 1, 0.77, 0.8, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if children[0]:\n sub_parser_camel_case = children[0] + 'Parser'\n else:\n sub_parser_camel_case = (camel_name[:-1] + 'Parser')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L129_C4", "label": "sub_parser_camel_case =", "type": "assigned_variable", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2", "vector": [14, 2, 0.8658, 0.0067, 2, 0.64, 0.0, 187, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sub_parser_camel_case", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sub_parser_camel_case = children[0] + 'Parser'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L131_C4", "label": "sub_parser_camel_case =", "type": "assigned_variable", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2", "vector": [14, 2, 0.8792, 0.0067, 2, 0.64, 1.0, 187, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sub_parser_camel_case", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sub_parser_camel_case = (camel_name[:-1] + 'Parser')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Return_L133_C2", "label": "return", "type": "return", "loc": [133, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "vector": [13, 1, 0.9329, 0.0872, 1, 0.77, 1.0, 0, 0, 0, 0, 0, 0, 6, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return {\n 'type_name': type_name,\n 'name': name,\n 'top_node_name': top_node_name,\n 'camel_name': camel_name,\n 'parser_name': typ + 'Parser',\n 'attribute_name': attribute_name,\n 'field_name': field_name,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:If_L148_C0", "label": "if", "type": "if", "loc": [148, 149], "level": 0, "parent": null, "vector": [4, 0, 0.9966, 0.0134, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L149_C2", "label": "main()", "type": "expression", "loc": [149, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_338:If_L148_C0", "vector": [8, 1, 1.0, 0.0067, 1, 0.41, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L89_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L94_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L99_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L102_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L108_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:If_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L109_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L114_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L115_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L120_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L122_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L124_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L126_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L128_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Assign_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Return_L133_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_338:If_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_338:Expr_L149_C2"}]
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLASS_IMPORTS = [ ] CLASS_IMPORTS = { # 'Checkin': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], # 'Venue': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], # 'Tip': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], } COMPLEX = [ 'Group', 'Badge', 'Beenhere', 'Checkin', 'CheckinResponse', 'City', 'Credentials', 'Data', 'Mayor', 'Rank', 'Score', 'Scoring', 'Settings', 'Stats', 'Tags', 'Tip', 'User', 'Venue', ] TYPES = COMPLEX + ['boolean'] def WalkNodesForAttributes(path): """Parse the xml file getting all attributes. <venue> <attribute>value</attribute> </venue> Returns: type_name - The java-style name the top node will have. "Venue" top_node_name - unadultured name of the xml stanza, probably the type of java class we're creating. "venue" attributes - {'attribute': 'value'} """ doc = pulldom.parse(path) type_name = None top_node_name = None attributes = {} level = 0 for event, node in doc: # For skipping parts of a tree. if level > 0: if event == pulldom.END_ELEMENT: level-=1 logging.warn('(%s) Skip end: %s' % (str(level), node)) continue elif event == pulldom.START_ELEMENT: logging.warn('(%s) Skipping: %s' % (str(level), node)) level+=1 continue if event == pulldom.START_ELEMENT: logging.warn('Parsing: ' + node.tagName) # Get the type name to use. if type_name is None: type_name = ''.join([word.capitalize() for word in node.tagName.split('_')]) top_node_name = node.tagName logging.warn('Found Top Node Name: ' + top_node_name) continue typ = node.getAttribute('type') child = node.getAttribute('child') # We don't want to walk complex types. if typ in COMPLEX: logging.warn('Found Complex: ' + node.tagName) level = 1 elif typ not in TYPES: logging.warn('Found String: ' + typ) typ = STRING else: logging.warn('Found Type: ' + typ) logging.warn('Adding: ' + str((node, typ))) attributes.setdefault(node.tagName, (typ, [child])) logging.warn('Attr: ' + str((type_name, top_node_name, attributes))) return type_name, top_node_name, attributes
ajibawa-2023/Python-Code-Large/train/row_339
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_339:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:ImportFrom_L5_C0", "label": "from xml.dom import minidom", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["minidom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import minidom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:ImportFrom_L6_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0088, 0, 0.66, 0.1667, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L8_C0", "label": "BOOLEAN =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0702, 0.0088, 0, 0.66, 0.25, 310, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BOOLEAN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOOLEAN = \"boolean\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L9_C0", "label": "STRING =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.0789, 0.0088, 0, 0.66, 0.3333, 560, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STRING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STRING = \"String\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L10_C0", "label": "GROUP =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0877, 0.0088, 0, 0.66, 0.4167, 39, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "GROUP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "GROUP = \"Group\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L14_C0", "label": "DEFAULT_INTERFACES =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.1228, 0.0088, 0, 0.66, 0.5, 228, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "DEFAULT_INTERFACES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_INTERFACES = ['FoursquareType']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L17_C0", "label": "INTERFACES =", "type": "assigned_variable", "loc": [17, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1535, 0.0175, 0, 0.66, 0.5833, 296, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "INTERFACES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "INTERFACES = {\n}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L20_C0", "label": "DEFAULT_CLASS_IMPORTS =", "type": "assigned_variable", "loc": [20, 21], "level": 0, "parent": null, "vector": [14, 0, 0.1798, 0.0175, 0, 0.66, 0.6667, 786, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "DEFAULT_CLASS_IMPORTS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_CLASS_IMPORTS = [\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L23_C0", "label": "CLASS_IMPORTS =", "type": "assigned_variable", "loc": [23, 33], "level": 0, "parent": null, "vector": [14, 0, 0.2456, 0.0965, 0, 0.66, 0.75, 103, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CLASS_IMPORTS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMPORTS + [\n# 'import com.joelapenna.foursquare.filters.VenueFilterable'\n# ],\n# 'Venue': DEFAULT_CLASS_IMPORTS + [\n# 'import com.joelapenna.foursquare.filters.VenueFilterable'\n# ],\n# 'Tip': DEFAULT_CLASS_IMPORTS + ["}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L36_C0", "label": "COMPLEX =", "type": "assigned_variable", "loc": [36, 55], "level": 0, "parent": null, "vector": [14, 0, 0.3991, 0.1754, 0, 0.66, 0.8333, 78, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "COMPLEX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMPLEX = [\n 'Group',\n 'Badge',\n 'Beenhere',\n 'Checkin',\n 'CheckinResponse',\n 'City',\n 'Credentials',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L56_C0", "label": "TYPES =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.4912, 0.0088, 0, 0.66, 0.9167, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TYPES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TYPES = COMPLEX + ['boolean']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "label": "WalkNodesForAttributes", "type": "function", "loc": [59, 114], "level": 0, "parent": null, "vector": [2, 0, 0.7588, 0.4912, 0, 0.66, 1.0, 612, 0, 1, 1, 0, 0, 0, 20], "semantic": {"name": "WalkNodesForAttributes", "arg_names": ["path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def WalkNodesForAttributes(path):\n \"\"\"Parse the xml file getting all attributes.\n <venue>\n <attribute>value</attribute>\n </venue>\n\n Returns:\n type_name - The java-style name the top node will have. \"Venue\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L60_C2", "label": "expression", "type": "expression", "loc": [60, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [8, 1, 0.5702, 0.0965, 1, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Parse the xml file getting all attributes.\n <venue>\n <attribute>value</attribute>\n </venue>\n\n Returns:\n type_name - The java-style name the top node will have. \"Venue\"\n top_node_name - unadultured name of the xml stanza, probably the type of"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L71_C2", "label": "doc = parse()", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [14, 1, 0.6228, 0.0088, 1, 0.45, 0.125, 555, 3, 1, 0, 0, 678, 10, 1], "semantic": {"name": "doc", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " doc = pulldom.parse(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L73_C2", "label": "type_name =", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [14, 1, 0.6404, 0.0088, 1, 0.45, 0.25, 81, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " type_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L74_C2", "label": "top_node_name =", "type": "assigned_variable", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [14, 1, 0.6491, 0.0088, 1, 0.45, 0.375, 238, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "top_node_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " top_node_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L75_C2", "label": "attributes =", "type": "assigned_variable", "loc": [75, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [14, 1, 0.6579, 0.0088, 1, 0.45, 0.5, 344, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "attributes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attributes = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L77_C2", "label": "level =", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [14, 1, 0.6754, 0.0088, 1, 0.45, 0.625, 479, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2", "label": "for event, node", "type": "for", "loc": [78, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [6, 1, 0.8333, 0.307, 1, 0.45, 0.75, 207, 2, 0, 0, 0, 0, 0, 17], "semantic": {"name": "event, node", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for event, node in doc:\n # For skipping parts of a tree.\n if level > 0:\n if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L80_C4", "label": "if", "type": "if", "loc": [80, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2", "vector": [4, 2, 0.7368, 0.0789, 2, 0.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if level > 0:\n if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6", "label": "if", "type": "if", "loc": [81, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L80_C4", "vector": [4, 3, 0.7412, 0.0702, 3, 0.83, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L83_C8", "label": "warn()", "type": "expression", "loc": [83, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6", "vector": [8, 4, 0.7281, 0.0088, 4, 0.73, 0.0, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('(%s) Skip end: %s' % (str(level), node))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L85_C6", "label": "if", "type": "if", "loc": [85, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6", "vector": [4, 4, 0.7588, 0.0351, 4, 0.73, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L86_C8", "label": "warn()", "type": "expression", "loc": [86, 86], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L85_C6", "vector": [8, 5, 0.7544, 0.0088, 5, 0.05, 0.0, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('(%s) Skipping: %s' % (str(level), node))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "label": "if", "type": "if", "loc": [90, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2", "vector": [4, 2, 0.886, 0.2018, 2, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event == pulldom.START_ELEMENT:\n logging.warn('Parsing: ' + node.tagName)\n # Get the type name to use.\n if type_name is None:\n type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])\n top_node_name = node.tagName\n logging.warn('Found Top Node Name: ' + top_node_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L91_C6", "label": "warn()", "type": "expression", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [8, 3, 0.7982, 0.0088, 3, 0.99, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Parsing: ' + node.tagName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "label": "if", "type": "if", "loc": [93, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [4, 3, 0.8377, 0.0526, 3, 0.99, 0.1667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if type_name is None:\n type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])\n top_node_name = node.tagName\n logging.warn('Found Top Node Name: ' + top_node_name)\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L94_C8", "label": "type_name = join()", "type": "assigned_variable", "loc": [94, 95], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "vector": [14, 4, 0.8289, 0.0175, 4, 0.67, 0.0, 81, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L96_C8", "label": "top_node_name =", "type": "assigned_variable", "loc": [96, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "vector": [14, 4, 0.8421, 0.0088, 4, 0.67, 0.5, 238, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "top_node_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " top_node_name = node.tagName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L97_C8", "label": "warn()", "type": "expression", "loc": [97, 97], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "vector": [8, 4, 0.8509, 0.0088, 4, 0.67, 1.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Top Node Name: ' + top_node_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L100_C6", "label": "typ = getAttribute()", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [14, 3, 0.8772, 0.0088, 3, 0.99, 0.3333, 722, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "typ", "arg_names": [], "import_names": [], "rhs_call_name": "getAttribute", "annotation": ""}, "snippet": " typ = node.getAttribute('type')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L101_C6", "label": "child = getAttribute()", "type": "assigned_variable", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [14, 3, 0.886, 0.0088, 3, 0.99, 0.5, 967, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "child", "arg_names": [], "import_names": [], "rhs_call_name": "getAttribute", "annotation": ""}, "snippet": " child = node.getAttribute('child')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "label": "if", "type": "if", "loc": [103, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [4, 3, 0.9342, 0.0702, 3, 0.99, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if typ in COMPLEX:\n logging.warn('Found Complex: ' + node.tagName)\n level = 1\n elif typ not in TYPES:\n logging.warn('Found String: ' + typ)\n typ = STRING\n else:\n logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L104_C8", "label": "warn()", "type": "expression", "loc": [104, 104], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "vector": [8, 4, 0.9123, 0.0088, 4, 0.44, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Complex: ' + node.tagName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L105_C8", "label": "level =", "type": "assigned_variable", "loc": [105, 105], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "vector": [14, 4, 0.9211, 0.0088, 4, 0.44, 0.5, 479, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " level = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "label": "if", "type": "if", "loc": [106, 110], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "vector": [4, 4, 0.9474, 0.0439, 4, 0.44, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ not in TYPES:\n logging.warn('Found String: ' + typ)\n typ = STRING\n else:\n logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L107_C8", "label": "warn()", "type": "expression", "loc": [107, 107], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "vector": [8, 5, 0.9386, 0.0088, 5, 0.92, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found String: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L108_C8", "label": "typ =", "type": "assigned_variable", "loc": [108, 108], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "vector": [14, 5, 0.9474, 0.0088, 5, 0.92, 0.5, 722, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "typ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " typ = STRING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L110_C8", "label": "warn()", "type": "expression", "loc": [110, 110], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "vector": [8, 5, 0.9649, 0.0088, 5, 0.92, 1.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L111_C6", "label": "warn()", "type": "expression", "loc": [111, 111], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [8, 3, 0.9737, 0.0088, 3, 0.99, 0.8333, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Adding: ' + str((node, typ)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L112_C6", "label": "setdefault()", "type": "expression", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "vector": [8, 3, 0.9825, 0.0088, 3, 0.99, 1.0, 262, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setdefault", "arg_names": [], "import_names": [], "rhs_call_name": "setdefault", "annotation": ""}, "snippet": " attributes.setdefault(node.tagName, (typ, [child]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L113_C2", "label": "warn()", "type": "expression", "loc": [113, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [8, 1, 0.9912, 0.0088, 1, 0.45, 0.875, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Attr: ' + str((type_name, top_node_name, attributes)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_339:Return_L114_C2", "label": "return", "type": "return", "loc": [114, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "vector": [13, 1, 1.0, 0.0088, 1, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return type_name, top_node_name, attributes"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L74_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L81_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L85_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L85_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:For_L78_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L91_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L100_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L101_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L111_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L112_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Expr_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_339:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_339:Return_L114_C2"}]
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self): logging.warn('do_GET: %s, %s', self.command, self.path) url = urlparse.urlparse(self.path) logging.warn('do_GET: %s', url) query = urlparse.parse_qs(url.query) query_keys = [pair[0] for pair in query] response = self.handle_url(url) if response != None: self.send_200() shutil.copyfileobj(response, self.wfile) self.wfile.close() do_POST = do_GET def handle_url(self, url): path = None if url.path == '/v1/venue': path = '../captures/api/v1/venue.xml' elif url.path == '/v1/addvenue': path = '../captures/api/v1/venue.xml' elif url.path == '/v1/venues': path = '../captures/api/v1/venues.xml' elif url.path == '/v1/user': path = '../captures/api/v1/user.xml' elif url.path == '/v1/checkcity': path = '../captures/api/v1/checkcity.xml' elif url.path == '/v1/checkins': path = '../captures/api/v1/checkins.xml' elif url.path == '/v1/cities': path = '../captures/api/v1/cities.xml' elif url.path == '/v1/switchcity': path = '../captures/api/v1/switchcity.xml' elif url.path == '/v1/tips': path = '../captures/api/v1/tips.xml' elif url.path == '/v1/checkin': path = '../captures/api/v1/checkin.xml' elif url.path == '/history/12345.rss': path = '../captures/api/v1/feed.xml' if path is None: self.send_error(404) else: logging.warn('Using: %s' % path) return open(path) def send_200(self): self.send_response(200) self.send_header('Content-type', 'text/xml') self.end_headers() def main(): if len(sys.argv) > 1: port = int(sys.argv[1]) else: port = 8080 server_address = ('0.0.0.0', port) httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler) sa = httpd.socket.getsockname() print "Serving HTTP on", sa[0], "port", sa[1], "..." httpd.serve_forever() if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_340
63
85
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L5_C0", "label": "logging import logging", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0588, 0.0118, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L6_C0", "label": "shutil import shutil", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import shutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L7_C0", "label": "sys import sys", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0824, 0.0118, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L8_C0", "label": "urlparse import urlparse", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0941, 0.0118, 0, 0.66, 0.375, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L10_C0", "label": "SimpleHTTPServer import SimpleHTTPServer", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1176, 0.0118, 0, 0.66, 0.5, 643, 0, 1, 0, 0, 643, 0, 0], "semantic": {"name": "SimpleHTTPServer", "arg_names": [], "import_names": ["SimpleHTTPServer"], "rhs_call_name": "", "annotation": ""}, "snippet": "import SimpleHTTPServer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Import_L11_C0", "label": "BaseHTTPServer import BaseHTTPServer", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.1294, 0.0118, 0, 0.66, 0.625, 801, 0, 1, 0, 0, 801, 0, 0], "semantic": {"name": "BaseHTTPServer", "arg_names": [], "import_names": ["BaseHTTPServer"], "rhs_call_name": "", "annotation": ""}, "snippet": "import BaseHTTPServer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "label": "RequestHandler", "type": "class", "loc": [14, 68], "level": 0, "parent": null, "vector": [3, 0, 0.4824, 0.6471, 0, 0.66, 0.75, 200, 0, 3, 0, 0, 814, 0, 14], "semantic": {"name": "RequestHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s', self.command, self.path)\n\n url = urlparse.urlparse(self.path)\n logging.warn('do_GET: %s', url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L15_C2", "label": "expression", "type": "expression", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "vector": [8, 1, 0.1765, 0.0118, 1, 0.96, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handle playfoursquare.com requests, for testing.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "label": "do_GET", "type": "function", "loc": [17, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "vector": [2, 1, 0.2706, 0.1529, 1, 0.96, 0.25, 269, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "do_GET", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def do_GET(self):\n logging.warn('do_GET: %s, %s', self.command, self.path)\n\n url = urlparse.urlparse(self.path)\n logging.warn('do_GET: %s', url)\n query = urlparse.parse_qs(url.query)\n query_keys = [pair[0] for pair in query]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L18_C4", "label": "warn()", "type": "expression", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [8, 2, 0.2118, 0.0118, 2, 0.93, 0.0, 960, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('do_GET: %s, %s', self.command, self.path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L20_C4", "label": "url = urlparse()", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [14, 2, 0.2353, 0.0118, 2, 0.93, 0.1429, 789, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " url = urlparse.urlparse(self.path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L21_C4", "label": "warn()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [8, 2, 0.2471, 0.0118, 2, 0.93, 0.2857, 960, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('do_GET: %s', url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L22_C4", "label": "query = parse_qs()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [14, 2, 0.2588, 0.0118, 2, 0.93, 0.4286, 546, 3, 1, 0, 0, 709, 10, 1], "semantic": {"name": "query", "arg_names": [], "import_names": [], "rhs_call_name": "parse_qs", "annotation": ""}, "snippet": " query = urlparse.parse_qs(url.query)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L23_C4", "label": "query_keys =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [14, 2, 0.2706, 0.0118, 2, 0.93, 0.5714, 890, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "query_keys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " query_keys = [pair[0] for pair in query]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L25_C4", "label": "response = handle_url()", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [14, 2, 0.2941, 0.0118, 2, 0.93, 0.7143, 511, 3, 1, 0, 0, 906, 10, 1], "semantic": {"name": "response", "arg_names": [], "import_names": [], "rhs_call_name": "handle_url", "annotation": ""}, "snippet": " response = self.handle_url(url)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4", "label": "if", "type": "if", "loc": [26, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [4, 2, 0.3176, 0.0353, 2, 0.93, 0.8571, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if response != None:\n self.send_200()\n shutil.copyfileobj(response, self.wfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L27_C6", "label": "send_200()", "type": "expression", "loc": [27, 27], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4", "vector": [8, 3, 0.3176, 0.0118, 3, 0.49, 0.0, 966, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "send_200", "arg_names": [], "import_names": [], "rhs_call_name": "send_200", "annotation": ""}, "snippet": " self.send_200()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L28_C6", "label": "copyfileobj()", "type": "expression", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4", "vector": [8, 3, 0.3294, 0.0118, 3, 0.49, 1.0, 462, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "copyfileobj", "arg_names": [], "import_names": [], "rhs_call_name": "copyfileobj", "annotation": ""}, "snippet": " shutil.copyfileobj(response, self.wfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L29_C4", "label": "close()", "type": "expression", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "vector": [8, 2, 0.3412, 0.0118, 2, 0.93, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " self.wfile.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L31_C2", "label": "do_POST =", "type": "assigned_variable", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "vector": [14, 1, 0.3647, 0.0118, 1, 0.96, 0.5, 67, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "do_POST", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " do_POST = do_GET"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "label": "handle_url", "type": "function", "loc": [33, 63], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "vector": [2, 1, 0.5647, 0.3647, 1, 0.96, 0.75, 906, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "handle_url", "arg_names": ["self", "url"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def handle_url(self, url):\n path = None\n\n if url.path == '/v1/venue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L34_C4", "label": "path =", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "vector": [14, 2, 0.4, 0.0118, 2, 0.87, 0.0, 358, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4", "label": "if", "type": "if", "loc": [36, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "vector": [4, 2, 0.5471, 0.2588, 2, 0.87, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if url.path == '/v1/venue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L37_C6", "label": "path =", "type": "assigned_variable", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4", "vector": [14, 3, 0.4353, 0.0118, 3, 0.34, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venue.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4", "label": "if", "type": "if", "loc": [38, 57], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4", "vector": [4, 3, 0.5588, 0.2353, 3, 0.34, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/addvenue':\n path = '../captures/api/v1/venue.xml'\n elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L39_C6", "label": "path =", "type": "assigned_variable", "loc": [39, 39], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4", "vector": [14, 4, 0.4588, 0.0118, 4, 0.7, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venue.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4", "label": "if", "type": "if", "loc": [40, 57], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4", "vector": [4, 4, 0.5706, 0.2118, 4, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/venues':\n path = '../captures/api/v1/venues.xml'\n elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L41_C6", "label": "path =", "type": "assigned_variable", "loc": [41, 41], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4", "vector": [14, 5, 0.4824, 0.0118, 5, 0.16, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/venues.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4", "label": "if", "type": "if", "loc": [42, 57], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4", "vector": [4, 5, 0.5824, 0.1882, 5, 0.16, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/user':\n path = '../captures/api/v1/user.xml'\n elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L43_C6", "label": "path =", "type": "assigned_variable", "loc": [43, 43], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4", "vector": [14, 6, 0.5059, 0.0118, 6, 0.06, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/user.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4", "label": "if", "type": "if", "loc": [44, 57], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4", "vector": [4, 6, 0.5941, 0.1647, 6, 0.06, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkcity':\n path = '../captures/api/v1/checkcity.xml'\n elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L45_C6", "label": "path =", "type": "assigned_variable", "loc": [45, 45], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4", "vector": [14, 7, 0.5294, 0.0118, 7, 0.94, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4", "label": "if", "type": "if", "loc": [46, 57], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4", "vector": [4, 7, 0.6059, 0.1412, 7, 0.94, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkins':\n path = '../captures/api/v1/checkins.xml'\n elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L47_C6", "label": "path =", "type": "assigned_variable", "loc": [47, 47], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4", "vector": [14, 8, 0.5529, 0.0118, 8, 0.32, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkins.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4", "label": "if", "type": "if", "loc": [48, 57], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4", "vector": [4, 8, 0.6176, 0.1176, 8, 0.32, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/cities':\n path = '../captures/api/v1/cities.xml'\n elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L49_C6", "label": "path =", "type": "assigned_variable", "loc": [49, 49], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4", "vector": [14, 9, 0.5765, 0.0118, 9, 0.8, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/cities.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4", "label": "if", "type": "if", "loc": [50, 57], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4", "vector": [4, 9, 0.6294, 0.0941, 9, 0.8, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/switchcity':\n path = '../captures/api/v1/switchcity.xml'\n elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L51_C6", "label": "path =", "type": "assigned_variable", "loc": [51, 51], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4", "vector": [14, 10, 0.6, 0.0118, 10, 0.7, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/switchcity.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4", "label": "if", "type": "if", "loc": [52, 57], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4", "vector": [4, 10, 0.6412, 0.0706, 10, 0.7, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/tips':\n path = '../captures/api/v1/tips.xml'\n elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L53_C6", "label": "path =", "type": "assigned_variable", "loc": [53, 53], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4", "vector": [14, 11, 0.6235, 0.0118, 11, 0.84, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/tips.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4", "label": "if", "type": "if", "loc": [54, 57], "level": 11, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4", "vector": [4, 11, 0.6529, 0.0471, 11, 0.84, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/v1/checkin':\n path = '../captures/api/v1/checkin.xml'\n elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L55_C6", "label": "path =", "type": "assigned_variable", "loc": [55, 55], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4", "vector": [14, 12, 0.6471, 0.0118, 12, 0.91, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/checkin.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L56_C4", "label": "if", "type": "if", "loc": [56, 57], "level": 12, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4", "vector": [4, 12, 0.6647, 0.0235, 12, 0.91, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif url.path == '/history/12345.rss':\n path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L57_C6", "label": "path =", "type": "assigned_variable", "loc": [57, 57], "level": 13, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L56_C4", "vector": [14, 13, 0.6706, 0.0118, 13, 0.35, 0.0, 358, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "path", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " path = '../captures/api/v1/feed.xml'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "label": "if", "type": "if", "loc": [59, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "vector": [4, 2, 0.7176, 0.0588, 2, 0.87, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if path is None:\n self.send_error(404)\n else:\n logging.warn('Using: %s' % path)\n return open(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L60_C6", "label": "send_error()", "type": "expression", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "vector": [8, 3, 0.7059, 0.0118, 3, 0.84, 0.0, 886, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "send_error", "arg_names": [], "import_names": [], "rhs_call_name": "send_error", "annotation": ""}, "snippet": " self.send_error(404)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L62_C6", "label": "warn()", "type": "expression", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "vector": [8, 3, 0.7294, 0.0118, 3, 0.84, 0.5, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Using: %s' % path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Return_L63_C6", "label": "return", "type": "return", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "vector": [13, 3, 0.7412, 0.0118, 3, 0.84, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return open(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "label": "send_200", "type": "function", "loc": [65, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "vector": [2, 1, 0.7824, 0.0471, 1, 0.96, 1.0, 966, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "send_200", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def send_200(self):\n self.send_response(200)\n self.send_header('Content-type', 'text/xml')\n self.end_headers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L66_C4", "label": "send_response()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "vector": [8, 2, 0.7765, 0.0118, 2, 0.24, 0.0, 844, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "send_response", "arg_names": [], "import_names": [], "rhs_call_name": "send_response", "annotation": ""}, "snippet": " self.send_response(200)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L67_C4", "label": "send_header()", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "vector": [8, 2, 0.7882, 0.0118, 2, 0.24, 0.5, 81, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "send_header", "arg_names": [], "import_names": [], "rhs_call_name": "send_header", "annotation": ""}, "snippet": " self.send_header('Content-type', 'text/xml')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L68_C4", "label": "end_headers()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "vector": [8, 2, 0.8, 0.0118, 2, 0.24, 1.0, 683, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "end_headers", "arg_names": [], "import_names": [], "rhs_call_name": "end_headers", "annotation": ""}, "snippet": " self.end_headers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "label": "main", "type": "function", "loc": [71, 81], "level": 0, "parent": null, "vector": [2, 0, 0.8941, 0.1294, 0, 0.66, 0.875, 624, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n if len(sys.argv) > 1:\n port = int(sys.argv[1])\n else:\n port = 8080\n server_address = ('0.0.0.0', port)\n httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2", "label": "if", "type": "if", "loc": [72, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [4, 1, 0.8647, 0.0471, 1, 0.37, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(sys.argv) > 1:\n port = int(sys.argv[1])\n else:\n port = 8080"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L73_C4", "label": "port = int()", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2", "vector": [14, 2, 0.8588, 0.0118, 2, 0.25, 0.0, 308, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " port = int(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L75_C4", "label": "port =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2", "vector": [14, 2, 0.8824, 0.0118, 2, 0.25, 1.0, 308, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "port", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " port = 8080"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L76_C2", "label": "server_address =", "type": "assigned_variable", "loc": [76, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [14, 1, 0.8941, 0.0118, 1, 0.37, 0.2, 816, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "server_address", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " server_address = ('0.0.0.0', port)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L77_C2", "label": "httpd = HTTPServer()", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [14, 1, 0.9059, 0.0118, 1, 0.37, 0.4, 471, 3, 2, 0, 0, 258, 10, 1], "semantic": {"name": "httpd", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPServer", "annotation": ""}, "snippet": " httpd = BaseHTTPServer.HTTPServer(server_address, RequestHandler)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L79_C2", "label": "sa = getsockname()", "type": "assigned_variable", "loc": [79, 79], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [14, 1, 0.9294, 0.0118, 1, 0.37, 0.6, 756, 3, 0, 0, 0, 994, 10, 1], "semantic": {"name": "sa", "arg_names": [], "import_names": [], "rhs_call_name": "getsockname", "annotation": ""}, "snippet": " sa = httpd.socket.getsockname()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L80_C2", "label": "print()", "type": "expression", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [8, 1, 0.9412, 0.0118, 1, 0.37, 0.8, 535, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Serving HTTP on\", sa[0], \"port\", sa[1], \"...\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L81_C2", "label": "serve_forever()", "type": "expression", "loc": [81, 81], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "vector": [8, 1, 0.9529, 0.0118, 1, 0.37, 1.0, 993, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "serve_forever", "arg_names": [], "import_names": [], "rhs_call_name": "serve_forever", "annotation": ""}, "snippet": " httpd.serve_forever()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:If_L84_C0", "label": "if", "type": "if", "loc": [84, 85], "level": 0, "parent": null, "vector": [4, 0, 0.9941, 0.0235, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L85_C2", "label": "main()", "type": "expression", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_340:If_L84_C0", "vector": [8, 1, 1.0, 0.0118, 1, 0.11, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L22_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L23_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L27_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L28_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L17_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L31_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L37_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L39_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L41_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L43_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L45_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L44_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L47_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L46_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L49_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L51_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L53_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L55_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L56_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L56_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L57_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L33_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L60_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L62_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Return_L63_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L65_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L73_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L72_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L76_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Assign_L79_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:FunctionDef_L71_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L81_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_340:If_L84_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_340:Expr_L85_C2"}]
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basename.split('_')]) fullpath = os.path.join(TYPESDIR, f) typepath = os.path.join(BASEDIR, 'types', javaname + '.java') parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java') cmd = 'python gen_class.py %s > %s' % (fullpath, typepath) print cmd subprocess.call(cmd, stdout=sys.stdout, shell=True) cmd = 'python gen_parser.py %s > %s' % (fullpath, parserpath) print cmd subprocess.call(cmd, stdout=sys.stdout, shell=True)
ajibawa-2023/Python-Code-Large/train/row_341
20
27
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_341:Import_L3_C0", "label": "os import os", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.1111, 0.037, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Import_L4_C0", "label": "subprocess import subprocess", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0], "semantic": {"name": "subprocess", "arg_names": [], "import_names": ["subprocess"], "rhs_call_name": "", "annotation": ""}, "snippet": "import subprocess"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Import_L5_C0", "label": "sys import sys", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.1852, 0.037, 0, 0.66, 0.2857, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L7_C0", "label": "BASEDIR =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.2593, 0.037, 0, 0.66, 0.4286, 914, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BASEDIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BASEDIR = '../main/src/com/joelapenna/foursquare'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L8_C0", "label": "TYPESDIR =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.2963, 0.037, 0, 0.66, 0.5714, 369, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TYPESDIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TYPESDIR = '../captures/types/v1'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L10_C0", "label": "captures =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.3704, 0.037, 0, 0.66, 0.7143, 890, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "captures", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "captures = sys.argv[1:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:If_L11_C0", "label": "if", "type": "if", "loc": [11, 12], "level": 0, "parent": null, "vector": [4, 0, 0.4259, 0.0741, 0, 0.66, 0.8571, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not captures:\n captures = os.listdir(TYPESDIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L12_C2", "label": "captures = listdir()", "type": "assigned_variable", "loc": [12, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:If_L11_C0", "vector": [14, 1, 0.4444, 0.037, 1, 0.12, 0.0, 890, 3, 1, 0, 0, 551, 10, 1], "semantic": {"name": "captures", "arg_names": [], "import_names": [], "rhs_call_name": "listdir", "annotation": ""}, "snippet": " captures = os.listdir(TYPESDIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "label": "for f", "type": "for", "loc": [14, 27], "level": 0, "parent": null, "vector": [6, 0, 0.7593, 0.5185, 0, 0.66, 1.0, 899, 2, 0, 0, 0, 0, 0, 11], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for f in captures:\n basename = f.split('.')[0]\n javaname = ''.join([c.capitalize() for c in basename.split('_')])\n fullpath = os.path.join(TYPESDIR, f)\n typepath = os.path.join(BASEDIR, 'types', javaname + '.java')\n parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java')\n\n cmd = 'python gen_class.py %s > %s' % (fullpath, typepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L15_C2", "label": "basename =", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.5556, 0.037, 1, 0.36, 0.0, 164, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "basename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " basename = f.split('.')[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L16_C2", "label": "javaname = join()", "type": "assigned_variable", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.5926, 0.037, 1, 0.36, 0.1, 554, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "javaname", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " javaname = ''.join([c.capitalize() for c in basename.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L17_C2", "label": "fullpath = join()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.6296, 0.037, 1, 0.36, 0.2, 858, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "fullpath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " fullpath = os.path.join(TYPESDIR, f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L18_C2", "label": "typepath = join()", "type": "assigned_variable", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.6667, 0.037, 1, 0.36, 0.3, 428, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "typepath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " typepath = os.path.join(BASEDIR, 'types', javaname + '.java')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L19_C2", "label": "parserpath = join()", "type": "assigned_variable", "loc": [19, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.7037, 0.037, 1, 0.36, 0.4, 114, 3, 3, 0, 0, 933, 10, 1], "semantic": {"name": "parserpath", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " parserpath = os.path.join(BASEDIR, 'parsers', javaname + 'Parser.java')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L21_C2", "label": "cmd =", "type": "assigned_variable", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.7778, 0.037, 1, 0.36, 0.5, 604, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = 'python gen_class.py %s > %s' % (fullpath, typepath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L22_C2", "label": "print()", "type": "expression", "loc": [22, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [8, 1, 0.8148, 0.037, 1, 0.36, 0.6, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L23_C2", "label": "call()", "type": "expression", "loc": [23, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [8, 1, 0.8519, 0.037, 1, 0.36, 0.7, 832, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "call", "arg_names": [], "import_names": [], "rhs_call_name": "call", "annotation": ""}, "snippet": " subprocess.call(cmd, stdout=sys.stdout, shell=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L25_C2", "label": "cmd =", "type": "assigned_variable", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [14, 1, 0.9259, 0.037, 1, 0.36, 0.8, 604, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cmd = 'python gen_parser.py %s > %s' % (fullpath, parserpath)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L26_C2", "label": "print()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [8, 1, 0.963, 0.037, 1, 0.36, 0.9, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L27_C2", "label": "call()", "type": "expression", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "vector": [8, 1, 1.0, 0.037, 1, 0.36, 1.0, 832, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "call", "arg_names": [], "import_names": [], "rhs_call_name": "call", "annotation": ""}, "snippet": " subprocess.call(cmd, stdout=sys.stdout, shell=True)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_341:If_L11_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L12_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L15_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L16_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L17_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L18_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L19_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L21_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L22_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Assign_L25_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L26_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_341:For_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_341:Expr_L27_C2"}]
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml.dom import pulldom from xml.dom import minidom import oauth """From: http://groups.google.com/group/foursquare-api/web/oauth @consumer = OAuth::Consumer.new("consumer_token","consumer_secret", { :site => "http://foursquare.com", :scheme => :header, :http_method => :post, :request_token_path => "/oauth/request_token", :access_token_path => "/oauth/access_token", :authorize_path => "/oauth/authorize" }) """ SERVER = 'api.foursquare.com:80' CONTENT_TYPE_HEADER = {'Content-Type' :'application/x-www-form-urlencoded'} SIGNATURE_METHOD = oauth.OAuthSignatureMethod_HMAC_SHA1() AUTHEXCHANGE_URL = 'http://api.foursquare.com/v1/authexchange' def parse_auth_response(auth_response): return ( re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0], re.search('<oauth_token_secret>(.*)</oauth_token_secret>', auth_response).groups()[0] ) def create_signed_oauth_request(username, password, consumer): oauth_request = oauth.OAuthRequest.from_consumer_and_token( consumer, http_method='POST', http_url=AUTHEXCHANGE_URL, parameters=dict(fs_username=username, fs_password=password)) oauth_request.sign_request(SIGNATURE_METHOD, consumer, None) return oauth_request def main(): url = urlparse.urlparse(sys.argv[1]) # Nevermind that the query can have repeated keys. parameters = dict(urlparse.parse_qsl(url.query)) password_file = open(os.path.join(user.home, '.oget')) lines = [line.strip() for line in password_file.readlines()] if len(lines) == 4: cons_key, cons_key_secret, username, password = lines access_token = None else: cons_key, cons_key_secret, username, password, token, secret = lines access_token = oauth.OAuthToken(token, secret) consumer = oauth.OAuthConsumer(cons_key, cons_key_secret) if not access_token: oauth_request = create_signed_oauth_request(username, password, consumer) connection = httplib.HTTPConnection(SERVER) headers = {'Content-Type' :'application/x-www-form-urlencoded'} connection.request(oauth_request.http_method, AUTHEXCHANGE_URL, body=oauth_request.to_postdata(), headers=headers) auth_response = connection.getresponse().read() token = parse_auth_response(auth_response) access_token = oauth.OAuthToken(*token) open(os.path.join(user.home, '.oget'), 'w').write('\n'.join(( cons_key, cons_key_secret, username, password, token[0], token[1]))) oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer, access_token, http_method='POST', http_url=url.geturl(), parameters=parameters) oauth_request.sign_request(SIGNATURE_METHOD, consumer, access_token) connection = httplib.HTTPConnection(SERVER) connection.request(oauth_request.http_method, oauth_request.to_url(), body=oauth_request.to_postdata(), headers=CONTENT_TYPE_HEADER) print connection.getresponse().read() #print minidom.parse(connection.getresponse()).toprettyxml(indent=' ') if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_342
50
111
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L2_C0", "label": "expression", "type": "expression", "loc": [2, 12], "level": 0, "parent": null, "vector": [8, 0, 0.0631, 0.0991, 0, 0.66, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L14_C0", "label": "httplib import httplib", "type": "import", "loc": [14, 14], "level": 0, "parent": null, "vector": [1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "httplib", "arg_names": [], "import_names": ["httplib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import httplib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L15_C0", "label": "os import os", "type": "import", "loc": [15, 15], "level": 0, "parent": null, "vector": [1, 0, 0.1351, 0.009, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L16_C0", "label": "re import re", "type": "import", "loc": [16, 16], "level": 0, "parent": null, "vector": [1, 0, 0.1441, 0.009, 0, 0.66, 0.15, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L17_C0", "label": "sys import sys", "type": "import", "loc": [17, 17], "level": 0, "parent": null, "vector": [1, 0, 0.1532, 0.009, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L18_C0", "label": "urllib import urllib", "type": "import", "loc": [18, 18], "level": 0, "parent": null, "vector": [1, 0, 0.1622, 0.009, 0, 0.66, 0.25, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L19_C0", "label": "urllib2 import urllib2", "type": "import", "loc": [19, 19], "level": 0, "parent": null, "vector": [1, 0, 0.1712, 0.009, 0, 0.66, 0.3, 345, 0, 1, 0, 0, 345, 0, 0], "semantic": {"name": "urllib2", "arg_names": [], "import_names": ["urllib2"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L20_C0", "label": "urlparse import urlparse", "type": "import", "loc": [20, 20], "level": 0, "parent": null, "vector": [1, 0, 0.1802, 0.009, 0, 0.66, 0.35, 857, 0, 1, 0, 0, 857, 0, 0], "semantic": {"name": "urlparse", "arg_names": [], "import_names": ["urlparse"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urlparse"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L21_C0", "label": "user import user", "type": "import", "loc": [21, 21], "level": 0, "parent": null, "vector": [1, 0, 0.1892, 0.009, 0, 0.66, 0.4, 503, 0, 1, 0, 0, 503, 0, 0], "semantic": {"name": "user", "arg_names": [], "import_names": ["user"], "rhs_call_name": "", "annotation": ""}, "snippet": "import user"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:ImportFrom_L22_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [22, 22], "level": 0, "parent": null, "vector": [1, 0, 0.1982, 0.009, 0, 0.66, 0.45, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:ImportFrom_L23_C0", "label": "from xml.dom import minidom", "type": "import", "loc": [23, 23], "level": 0, "parent": null, "vector": [1, 0, 0.2072, 0.009, 0, 0.66, 0.5, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["minidom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import minidom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Import_L25_C0", "label": "oauth import oauth", "type": "import", "loc": [25, 25], "level": 0, "parent": null, "vector": [1, 0, 0.2252, 0.009, 0, 0.66, 0.55, 234, 0, 1, 0, 0, 234, 0, 0], "semantic": {"name": "oauth", "arg_names": [], "import_names": ["oauth"], "rhs_call_name": "", "annotation": ""}, "snippet": "import oauth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L27_C0", "label": "expression", "type": "expression", "loc": [27, 37], "level": 0, "parent": null, "vector": [8, 0, 0.2883, 0.0991, 0, 0.66, 0.6, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\"\"\"From: http://groups.google.com/group/foursquare-api/web/oauth\n\n@consumer = OAuth::Consumer.new(\"consumer_token\",\"consumer_secret\", {\n :site => \"http://foursquare.com\",\n :scheme => :header,\n :http_method => :post,\n :request_token_path => \"/oauth/request_token\",\n :access_token_path => \"/oauth/access_token\","}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L39_C0", "label": "SERVER =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.3514, 0.009, 0, 0.66, 0.65, 784, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "SERVER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "SERVER = 'api.foursquare.com:80'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L41_C0", "label": "CONTENT_TYPE_HEADER =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.3694, 0.009, 0, 0.66, 0.7, 415, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CONTENT_TYPE_HEADER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CONTENT_TYPE_HEADER = {'Content-Type' :'application/x-www-form-urlencoded'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L43_C0", "label": "SIGNATURE_METHOD = OAuthSignatureMethod_HMAC_SHA1()", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.3874, 0.009, 0, 0.66, 0.75, 339, 3, 0, 0, 0, 605, 10, 1], "semantic": {"name": "SIGNATURE_METHOD", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthSignatureMethod_HMAC_SHA1", "annotation": ""}, "snippet": "SIGNATURE_METHOD = oauth.OAuthSignatureMethod_HMAC_SHA1()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L45_C0", "label": "AUTHEXCHANGE_URL =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.4054, 0.009, 0, 0.66, 0.8, 898, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "AUTHEXCHANGE_URL", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "AUTHEXCHANGE_URL = 'http://api.foursquare.com/v1/authexchange'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L48_C0", "label": "parse_auth_response", "type": "function", "loc": [48, 53], "level": 0, "parent": null, "vector": [2, 0, 0.455, 0.0541, 0, 0.66, 0.85, 168, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "parse_auth_response", "arg_names": ["auth_response"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def parse_auth_response(auth_response):\n return (\n re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0],\n re.search('<oauth_token_secret>(.*)</oauth_token_secret>',\n auth_response).groups()[0]\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Return_L49_C2", "label": "return", "type": "return", "loc": [49, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L48_C0", "vector": [13, 1, 0.4595, 0.045, 1, 0.74, 0.0, 0, 0, 0, 0, 0, 0, 8, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (\n re.search('<oauth_token>(.*)</oauth_token>', auth_response).groups()[0],\n re.search('<oauth_token_secret>(.*)</oauth_token_secret>',\n auth_response).groups()[0]\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "label": "create_signed_oauth_request", "type": "function", "loc": [56, 62], "level": 0, "parent": null, "vector": [2, 0, 0.5315, 0.0631, 0, 0.66, 0.9, 448, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "create_signed_oauth_request", "arg_names": ["username", "password", "consumer"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_signed_oauth_request(username, password, consumer):\n oauth_request = oauth.OAuthRequest.from_consumer_and_token(\n consumer, http_method='POST', http_url=AUTHEXCHANGE_URL,\n parameters=dict(fs_username=username, fs_password=password))\n\n oauth_request.sign_request(SIGNATURE_METHOD, consumer, None)\n return oauth_request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L57_C2", "label": "oauth_request = from_consumer_and_token()", "type": "assigned_variable", "loc": [57, 59], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "vector": [14, 1, 0.5225, 0.027, 1, 0.5, 0.0, 1, 3, 4, 0, 0, 319, 10, 2], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "from_consumer_and_token", "annotation": ""}, "snippet": " oauth_request = oauth.OAuthRequest.from_consumer_and_token(\n consumer, http_method='POST', http_url=AUTHEXCHANGE_URL,\n parameters=dict(fs_username=username, fs_password=password))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L61_C2", "label": "sign_request()", "type": "expression", "loc": [61, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "vector": [8, 1, 0.5495, 0.009, 1, 0.5, 0.5, 817, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "sign_request", "arg_names": [], "import_names": [], "rhs_call_name": "sign_request", "annotation": ""}, "snippet": " oauth_request.sign_request(SIGNATURE_METHOD, consumer, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Return_L62_C2", "label": "return", "type": "return", "loc": [62, 62], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "vector": [13, 1, 0.5586, 0.009, 1, 0.5, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return oauth_request"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "label": "main", "type": "function", "loc": [65, 106], "level": 0, "parent": null, "vector": [2, 0, 0.7703, 0.3784, 0, 0.66, 0.95, 624, 0, 0, 0, 0, 0, 0, 32], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n url = urlparse.urlparse(sys.argv[1])\n # Nevermind that the query can have repeated keys.\n parameters = dict(urlparse.parse_qsl(url.query))\n\n password_file = open(os.path.join(user.home, '.oget'))\n lines = [line.strip() for line in password_file.readlines()]\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L66_C2", "label": "url = urlparse()", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.5946, 0.009, 1, 0.7, 0.0, 789, 3, 1, 0, 0, 857, 10, 1], "semantic": {"name": "url", "arg_names": [], "import_names": [], "rhs_call_name": "urlparse", "annotation": ""}, "snippet": " url = urlparse.urlparse(sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L68_C2", "label": "parameters = dict()", "type": "assigned_variable", "loc": [68, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.6126, 0.009, 1, 0.7, 0.0909, 29, 3, 1, 0, 0, 827, 10, 2], "semantic": {"name": "parameters", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " parameters = dict(urlparse.parse_qsl(url.query))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L70_C2", "label": "password_file = open()", "type": "assigned_variable", "loc": [70, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.6306, 0.009, 1, 0.7, 0.1818, 18, 3, 1, 0, 0, 693, 10, 2], "semantic": {"name": "password_file", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " password_file = open(os.path.join(user.home, '.oget'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L71_C2", "label": "lines =", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.6396, 0.009, 1, 0.7, 0.2727, 73, 5, 0, 0, 0, 0, 0, 2], "semantic": {"name": "lines", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lines = [line.strip() for line in password_file.readlines()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "label": "if", "type": "if", "loc": [73, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [4, 1, 0.6802, 0.0541, 1, 0.7, 0.3636, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(lines) == 4:\n cons_key, cons_key_secret, username, password = lines\n access_token = None\n else:\n cons_key, cons_key_secret, username, password, token, secret = lines\n access_token = oauth.OAuthToken(token, secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L74_C4", "label": "cons_key, cons_key_secret, username, password =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "vector": [14, 2, 0.6667, 0.009, 2, 0.01, 0.0, 564, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cons_key, cons_key_secret, username, password", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cons_key, cons_key_secret, username, password = lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L75_C4", "label": "access_token =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "vector": [14, 2, 0.6757, 0.009, 2, 0.01, 0.3333, 797, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " access_token = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L77_C4", "label": "cons_key, cons_key_secret, username, password, token, secret =", "type": "assigned_variable", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "vector": [14, 2, 0.6937, 0.009, 2, 0.01, 0.6667, 616, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "cons_key, cons_key_secret, username, password, token, secret", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cons_key, cons_key_secret, username, password, token, secret = lines"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L78_C4", "label": "access_token = OAuthToken()", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "vector": [14, 2, 0.7027, 0.009, 2, 0.01, 1.0, 797, 3, 2, 0, 0, 512, 10, 1], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthToken", "annotation": ""}, "snippet": " access_token = oauth.OAuthToken(token, secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L80_C2", "label": "consumer = OAuthConsumer()", "type": "assigned_variable", "loc": [80, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.7207, 0.009, 1, 0.7, 0.4545, 352, 3, 2, 0, 0, 660, 10, 1], "semantic": {"name": "consumer", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthConsumer", "annotation": ""}, "snippet": " consumer = oauth.OAuthConsumer(cons_key, cons_key_secret)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "label": "if", "type": "if", "loc": [82, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [4, 1, 0.7973, 0.1261, 1, 0.7, 0.5455, 0, 0, 0, 0, 0, 0, 0, 12], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not access_token:\n oauth_request = create_signed_oauth_request(username, password, consumer)\n\n connection = httplib.HTTPConnection(SERVER)\n\n headers = {'Content-Type' :'application/x-www-form-urlencoded'}\n connection.request(oauth_request.http_method, AUTHEXCHANGE_URL,\n body=oauth_request.to_postdata(), headers=headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L83_C4", "label": "oauth_request = create_signed_oauth_request()", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.7477, 0.009, 2, 0.99, 0.0, 1, 3, 3, 0, 0, 448, 10, 1], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "create_signed_oauth_request", "annotation": ""}, "snippet": " oauth_request = create_signed_oauth_request(username, password, consumer)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L85_C4", "label": "connection = HTTPConnection()", "type": "assigned_variable", "loc": [85, 85], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.7658, 0.009, 2, 0.99, 0.1429, 351, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "connection", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": " connection = httplib.HTTPConnection(SERVER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L87_C4", "label": "headers =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.7838, 0.009, 2, 0.99, 0.2857, 950, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "headers", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " headers = {'Content-Type' :'application/x-www-form-urlencoded'}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L88_C4", "label": "request()", "type": "expression", "loc": [88, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [8, 2, 0.7973, 0.018, 2, 0.99, 0.4286, 50, 3, 4, 0, 0, 0, 0, 2], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " connection.request(oauth_request.http_method, AUTHEXCHANGE_URL,\n body=oauth_request.to_postdata(), headers=headers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L91_C4", "label": "auth_response = read()", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.8198, 0.009, 2, 0.99, 0.5714, 446, 3, 0, 0, 0, 453, 10, 2], "semantic": {"name": "auth_response", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " auth_response = connection.getresponse().read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L92_C4", "label": "token = parse_auth_response()", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.8288, 0.009, 2, 0.99, 0.7143, 129, 3, 1, 0, 0, 168, 10, 1], "semantic": {"name": "token", "arg_names": [], "import_names": [], "rhs_call_name": "parse_auth_response", "annotation": ""}, "snippet": " token = parse_auth_response(auth_response)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L93_C4", "label": "access_token = OAuthToken()", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [14, 2, 0.8378, 0.009, 2, 0.99, 0.8571, 797, 3, 1, 0, 0, 512, 10, 1], "semantic": {"name": "access_token", "arg_names": [], "import_names": [], "rhs_call_name": "OAuthToken", "annotation": ""}, "snippet": " access_token = oauth.OAuthToken(*token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L94_C4", "label": "write()", "type": "expression", "loc": [94, 95], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "vector": [8, 2, 0.8514, 0.018, 2, 0.99, 1.0, 837, 3, 1, 0, 0, 0, 0, 4], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " open(os.path.join(user.home, '.oget'), 'w').write('\\n'.join((\n cons_key, cons_key_secret, username, password, token[0], token[1])))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L97_C2", "label": "oauth_request = from_consumer_and_token()", "type": "assigned_variable", "loc": [97, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.8829, 0.027, 1, 0.7, 0.6364, 1, 3, 5, 0, 0, 319, 10, 2], "semantic": {"name": "oauth_request", "arg_names": [], "import_names": [], "rhs_call_name": "from_consumer_and_token", "annotation": ""}, "snippet": " oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer,\n access_token, http_method='POST', http_url=url.geturl(),\n parameters=parameters)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L100_C2", "label": "sign_request()", "type": "expression", "loc": [100, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [8, 1, 0.9009, 0.009, 1, 0.7, 0.7273, 817, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "sign_request", "arg_names": [], "import_names": [], "rhs_call_name": "sign_request", "annotation": ""}, "snippet": " oauth_request.sign_request(SIGNATURE_METHOD, consumer, access_token)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L102_C2", "label": "connection = HTTPConnection()", "type": "assigned_variable", "loc": [102, 102], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [14, 1, 0.9189, 0.009, 1, 0.7, 0.8182, 351, 3, 1, 0, 0, 29, 10, 1], "semantic": {"name": "connection", "arg_names": [], "import_names": [], "rhs_call_name": "HTTPConnection", "annotation": ""}, "snippet": " connection = httplib.HTTPConnection(SERVER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L103_C2", "label": "request()", "type": "expression", "loc": [103, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [8, 1, 0.9324, 0.018, 1, 0.7, 0.9091, 50, 3, 4, 0, 0, 0, 0, 3], "semantic": {"name": "request", "arg_names": [], "import_names": [], "rhs_call_name": "request", "annotation": ""}, "snippet": " connection.request(oauth_request.http_method, oauth_request.to_url(),\n body=oauth_request.to_postdata(), headers=CONTENT_TYPE_HEADER)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L106_C2", "label": "print()", "type": "expression", "loc": [106, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "vector": [8, 1, 0.955, 0.009, 1, 0.7, 1.0, 535, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(connection.getresponse().read())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:If_L110_C0", "label": "if", "type": "if", "loc": [110, 111], "level": 0, "parent": null, "vector": [4, 0, 0.9955, 0.018, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L111_C2", "label": "main()", "type": "expression", "loc": [111, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_342:If_L110_C0", "vector": [8, 1, 1.0, 0.009, 1, 0.87, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L48_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Return_L49_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L57_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L61_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L56_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Return_L62_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L66_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L68_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L70_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L74_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L73_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L80_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L91_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L92_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L82_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L97_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L100_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Assign_L102_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L103_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:FunctionDef_L65_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L106_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_342:If_L110_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_342:Expr_L111_C2"}]
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joelapenna.foursquare.error.FoursquareParseException; import com.joelapenna.foursquare.types.%(type_name)s; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * Auto-generated: %(timestamp)s * * @author Joe LaPenna (joe@joelapenna.com) * @param <T> */ public class %(type_name)sParser extends AbstractParser<%(type_name)s> { private static final Logger LOG = Logger.getLogger(%(type_name)sParser.class.getCanonicalName()); private static final boolean DEBUG = Foursquare.PARSER_DEBUG; @Override public %(type_name)s parseInner(XmlPullParser parser) throws XmlPullParserException, IOException, FoursquareError, FoursquareParseException { parser.require(XmlPullParser.START_TAG, null, null); %(type_name)s %(top_node_name)s = new %(type_name)s(); while (parser.nextTag() == XmlPullParser.START_TAG) { String name = parser.getName(); %(stanzas)s } else { // Consume something we don't understand. if (DEBUG) LOG.log(Level.FINE, "Found tag that we don't recognize: " + name); skipSubTree(parser); } } return %(top_node_name)s; } }""" BOOLEAN_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(Boolean.valueOf(parser.nextText())); """ GROUP_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(new GroupParser(new %(sub_parser_camel_case)s()).parse(parser)); """ COMPLEX_STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(new %(parser_name)s().parse(parser)); """ STANZA = """\ } else if ("%(name)s".equals(name)) { %(top_node_name)s.set%(camel_name)s(parser.nextText()); """ def main(): type_name, top_node_name, attributes = common.WalkNodesForAttributes( sys.argv[1]) GenerateClass(type_name, top_node_name, attributes) def GenerateClass(type_name, top_node_name, attributes): """generate it. type_name: the type of object the parser returns top_node_name: the name of the object the parser returns. per common.WalkNodsForAttributes """ stanzas = [] for name in sorted(attributes): typ, children = attributes[name] replacements = Replacements(top_node_name, name, typ, children) if typ == common.BOOLEAN: stanzas.append(BOOLEAN_STANZA % replacements) elif typ == common.GROUP: stanzas.append(GROUP_STANZA % replacements) elif typ in common.COMPLEX: stanzas.append(COMPLEX_STANZA % replacements) else: stanzas.append(STANZA % replacements) if stanzas: # pop off the extranious } else for the first conditional stanza. stanzas[0] = stanzas[0].replace('} else ', '', 1) replacements = Replacements(top_node_name, name, typ, [None]) replacements['stanzas'] = '\n'.join(stanzas).strip() print PARSER % replacements def Replacements(top_node_name, name, typ, children): # CameCaseClassName type_name = ''.join([word.capitalize() for word in top_node_name.split('_')]) # CamelCaseClassName camel_name = ''.join([word.capitalize() for word in name.split('_')]) # camelCaseLocalName attribute_name = camel_name.lower().capitalize() # mFieldName field_name = 'm' + camel_name if children[0]: sub_parser_camel_case = children[0] + 'Parser' else: sub_parser_camel_case = (camel_name[:-1] + 'Parser') return { 'type_name': type_name, 'name': name, 'top_node_name': top_node_name, 'camel_name': camel_name, 'parser_name': typ + 'Parser', 'attribute_name': attribute_name, 'field_name': field_name, 'typ': typ, 'timestamp': datetime.datetime.now(), 'sub_parser_camel_case': sub_parser_camel_case, 'sub_type': children[0] } if __name__ == '__main__': main()
ajibawa-2023/Python-Code-Large/train/row_343
42
149
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_343:Import_L3_C0", "label": "datetime import datetime", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0201, 0.0067, 0, 0.66, 0.0, 426, 0, 1, 0, 0, 426, 0, 0], "semantic": {"name": "datetime", "arg_names": [], "import_names": ["datetime"], "rhs_call_name": "", "annotation": ""}, "snippet": "import datetime"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Import_L4_C0", "label": "sys import sys", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Import_L5_C0", "label": "textwrap import textwrap", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0336, 0.0067, 0, 0.66, 0.1538, 641, 0, 1, 0, 0, 641, 0, 0], "semantic": {"name": "textwrap", "arg_names": [], "import_names": ["textwrap"], "rhs_call_name": "", "annotation": ""}, "snippet": "import textwrap"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Import_L7_C0", "label": "common import common", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.047, 0.0067, 0, 0.66, 0.2308, 718, 0, 1, 0, 0, 718, 0, 0], "semantic": {"name": "common", "arg_names": [], "import_names": ["common"], "rhs_call_name": "", "annotation": ""}, "snippet": "import common"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:ImportFrom_L9_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0604, 0.0067, 0, 0.66, 0.3077, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L11_C0", "label": "PARSER =", "type": "assigned_variable", "loc": [11, 59], "level": 0, "parent": null, "vector": [14, 0, 0.2349, 0.3289, 0, 0.66, 0.3846, 92, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "PARSER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L61_C0", "label": "BOOLEAN_STANZA =", "type": "assigned_variable", "loc": [61, 64], "level": 0, "parent": null, "vector": [14, 0, 0.4195, 0.0268, 0, 0.66, 0.4615, 839, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BOOLEAN_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOOLEAN_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(Boolean.valueOf(parser.nextText()));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L66_C0", "label": "GROUP_STANZA =", "type": "assigned_variable", "loc": [66, 69], "level": 0, "parent": null, "vector": [14, 0, 0.453, 0.0268, 0, 0.66, 0.5385, 306, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "GROUP_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "GROUP_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(new GroupParser(new %(sub_parser_camel_case)s()).parse(parser));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L71_C0", "label": "COMPLEX_STANZA =", "type": "assigned_variable", "loc": [71, 74], "level": 0, "parent": null, "vector": [14, 0, 0.4866, 0.0268, 0, 0.66, 0.6154, 61, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "COMPLEX_STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMPLEX_STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(new %(parser_name)s().parse(parser));\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L76_C0", "label": "STANZA =", "type": "assigned_variable", "loc": [76, 79], "level": 0, "parent": null, "vector": [14, 0, 0.5201, 0.0268, 0, 0.66, 0.6923, 276, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STANZA", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STANZA = \"\"\"\\\n } else if (\"%(name)s\".equals(name)) {\n %(top_node_name)s.set%(camel_name)s(parser.nextText());\n\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L82_C0", "label": "main", "type": "function", "loc": [82, 85], "level": 0, "parent": null, "vector": [2, 0, 0.5604, 0.0268, 0, 0.66, 0.7692, 624, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def main():\n type_name, top_node_name, attributes = common.WalkNodesForAttributes(\n sys.argv[1])\n GenerateClass(type_name, top_node_name, attributes)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L83_C2", "label": "type_name, top_node_name, attributes = WalkNodesForAttributes()", "type": "assigned_variable", "loc": [83, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L82_C0", "vector": [14, 1, 0.5604, 0.0134, 1, 0.11, 0.0, 244, 3, 1, 0, 0, 612, 10, 1], "semantic": {"name": "type_name, top_node_name, attributes", "arg_names": [], "import_names": [], "rhs_call_name": "WalkNodesForAttributes", "annotation": ""}, "snippet": " type_name, top_node_name, attributes = common.WalkNodesForAttributes(\n sys.argv[1])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L85_C2", "label": "GenerateClass()", "type": "expression", "loc": [85, 85], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L82_C0", "vector": [8, 1, 0.5705, 0.0067, 1, 0.11, 1.0, 578, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "GenerateClass", "arg_names": [], "import_names": [], "rhs_call_name": "GenerateClass", "annotation": ""}, "snippet": " GenerateClass(type_name, top_node_name, attributes)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "label": "GenerateClass", "type": "function", "loc": [88, 115], "level": 0, "parent": null, "vector": [2, 0, 0.6812, 0.1879, 0, 0.66, 0.8462, 578, 0, 3, 0, 0, 0, 0, 11], "semantic": {"name": "GenerateClass", "arg_names": ["type_name", "top_node_name", "attributes"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def GenerateClass(type_name, top_node_name, attributes):\n \"\"\"generate it.\n type_name: the type of object the parser returns\n top_node_name: the name of the object the parser returns.\n per common.WalkNodsForAttributes\n \"\"\"\n stanzas = []\n for name in sorted(attributes):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L89_C2", "label": "expression", "type": "expression", "loc": [89, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [8, 1, 0.6107, 0.0336, 1, 0.9, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"generate it.\n type_name: the type of object the parser returns\n top_node_name: the name of the object the parser returns.\n per common.WalkNodsForAttributes\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L94_C2", "label": "stanzas =", "type": "assigned_variable", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [14, 1, 0.6309, 0.0067, 1, 0.9, 0.1667, 232, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "stanzas", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " stanzas = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "label": "for name", "type": "for", "loc": [95, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [6, 1, 0.6812, 0.094, 1, 0.9, 0.3333, 57, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for name in sorted(attributes):\n typ, children = attributes[name]\n replacements = Replacements(top_node_name, name, typ, children)\n if typ == common.BOOLEAN:\n stanzas.append(BOOLEAN_STANZA % replacements)\n\n elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L96_C4", "label": "typ, children =", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "vector": [14, 2, 0.6443, 0.0067, 2, 0.62, 0.0, 844, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "typ, children", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " typ, children = attributes[name]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L97_C4", "label": "replacements = Replacements()", "type": "assigned_variable", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "vector": [14, 2, 0.651, 0.0067, 2, 0.62, 0.5, 403, 3, 4, 0, 0, 695, 10, 1], "semantic": {"name": "replacements", "arg_names": [], "import_names": [], "rhs_call_name": "Replacements", "annotation": ""}, "snippet": " replacements = Replacements(top_node_name, name, typ, children)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4", "label": "if", "type": "if", "loc": [98, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "vector": [4, 2, 0.6913, 0.0738, 2, 0.62, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if typ == common.BOOLEAN:\n stanzas.append(BOOLEAN_STANZA % replacements)\n\n elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)\n\n elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L99_C6", "label": "append()", "type": "expression", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4", "vector": [8, 3, 0.6644, 0.0067, 3, 0.45, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(BOOLEAN_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4", "label": "if", "type": "if", "loc": [101, 108], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4", "vector": [4, 3, 0.7013, 0.0537, 3, 0.45, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ == common.GROUP:\n stanzas.append(GROUP_STANZA % replacements)\n\n elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)\n\n else:\n stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L102_C6", "label": "append()", "type": "expression", "loc": [102, 102], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4", "vector": [8, 4, 0.6846, 0.0067, 4, 0.65, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(GROUP_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4", "label": "if", "type": "if", "loc": [104, 108], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4", "vector": [4, 4, 0.7114, 0.0336, 4, 0.65, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ in common.COMPLEX:\n stanzas.append(COMPLEX_STANZA % replacements)\n\n else:\n stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L105_C6", "label": "append()", "type": "expression", "loc": [105, 105], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4", "vector": [8, 5, 0.7047, 0.0067, 5, 0.52, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(COMPLEX_STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L108_C6", "label": "append()", "type": "expression", "loc": [108, 108], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4", "vector": [8, 5, 0.7248, 0.0067, 5, 0.52, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " stanzas.append(STANZA % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L109_C2", "label": "if", "type": "if", "loc": [109, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [4, 1, 0.7383, 0.0201, 1, 0.9, 0.5, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if stanzas:\n # pop off the extranious } else for the first conditional stanza.\n stanzas[0] = stanzas[0].replace('} else ', '', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L111_C4", "label": " = replace()", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L109_C2", "vector": [14, 2, 0.745, 0.0067, 2, 0.97, 0.0, 0, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " stanzas[0] = stanzas[0].replace('} else ', '', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L113_C2", "label": "replacements = Replacements()", "type": "assigned_variable", "loc": [113, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [14, 1, 0.7584, 0.0067, 1, 0.9, 0.6667, 403, 3, 4, 0, 0, 695, 10, 1], "semantic": {"name": "replacements", "arg_names": [], "import_names": [], "rhs_call_name": "Replacements", "annotation": ""}, "snippet": " replacements = Replacements(top_node_name, name, typ, [None])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L114_C2", "label": " = strip()", "type": "assigned_variable", "loc": [114, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [14, 1, 0.7651, 0.0067, 1, 0.9, 0.8333, 0, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " replacements['stanzas'] = '\\n'.join(stanzas).strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L115_C2", "label": "print()", "type": "expression", "loc": [115, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "vector": [8, 1, 0.7718, 0.0067, 1, 0.9, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(PARSER % replacements)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "label": "Replacements", "type": "function", "loc": [118, 145], "level": 0, "parent": null, "vector": [2, 0, 0.8826, 0.1879, 0, 0.66, 0.9231, 695, 0, 4, 1, 0, 0, 0, 9], "semantic": {"name": "Replacements", "arg_names": ["top_node_name", "name", "typ", "children"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def Replacements(top_node_name, name, typ, children):\n # CameCaseClassName\n type_name = ''.join([word.capitalize() for word in top_node_name.split('_')])\n # CamelCaseClassName\n camel_name = ''.join([word.capitalize() for word in name.split('_')])\n # camelCaseLocalName\n attribute_name = camel_name.lower().capitalize()\n # mFieldName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L120_C2", "label": "type_name = join()", "type": "assigned_variable", "loc": [120, 120], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [14, 1, 0.8054, 0.0067, 1, 0.41, 0.0, 81, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " type_name = ''.join([word.capitalize() for word in top_node_name.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L122_C2", "label": "camel_name = join()", "type": "assigned_variable", "loc": [122, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [14, 1, 0.8188, 0.0067, 1, 0.41, 0.2, 510, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "camel_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " camel_name = ''.join([word.capitalize() for word in name.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L124_C2", "label": "attribute_name = capitalize()", "type": "assigned_variable", "loc": [124, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [14, 1, 0.8322, 0.0067, 1, 0.41, 0.4, 592, 3, 0, 0, 0, 353, 10, 2], "semantic": {"name": "attribute_name", "arg_names": [], "import_names": [], "rhs_call_name": "capitalize", "annotation": ""}, "snippet": " attribute_name = camel_name.lower().capitalize()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L126_C2", "label": "field_name =", "type": "assigned_variable", "loc": [126, 126], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [14, 1, 0.8456, 0.0067, 1, 0.41, 0.6, 918, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "field_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " field_name = 'm' + camel_name"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2", "label": "if", "type": "if", "loc": [128, 131], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [4, 1, 0.8691, 0.0268, 1, 0.41, 0.8, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if children[0]:\n sub_parser_camel_case = children[0] + 'Parser'\n else:\n sub_parser_camel_case = (camel_name[:-1] + 'Parser')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L129_C4", "label": "sub_parser_camel_case =", "type": "assigned_variable", "loc": [129, 129], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2", "vector": [14, 2, 0.8658, 0.0067, 2, 0.83, 0.0, 187, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sub_parser_camel_case", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sub_parser_camel_case = children[0] + 'Parser'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L131_C4", "label": "sub_parser_camel_case =", "type": "assigned_variable", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2", "vector": [14, 2, 0.8792, 0.0067, 2, 0.83, 1.0, 187, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sub_parser_camel_case", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sub_parser_camel_case = (camel_name[:-1] + 'Parser')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Return_L133_C2", "label": "return", "type": "return", "loc": [133, 145], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "vector": [13, 1, 0.9329, 0.0872, 1, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 6, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return {\n 'type_name': type_name,\n 'name': name,\n 'top_node_name': top_node_name,\n 'camel_name': camel_name,\n 'parser_name': typ + 'Parser',\n 'attribute_name': attribute_name,\n 'field_name': field_name,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:If_L148_C0", "label": "if", "type": "if", "loc": [148, 149], "level": 0, "parent": null, "vector": [4, 0, 0.9966, 0.0134, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L149_C2", "label": "main()", "type": "expression", "loc": [149, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_343:If_L148_C0", "vector": [8, 1, 1.0, 0.0067, 1, 0.78, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L83_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L85_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L89_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L94_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:For_L95_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L99_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L98_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L102_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L101_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L105_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L104_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L108_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:If_L109_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L109_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L111_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L114_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L88_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L115_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L120_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L122_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L124_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L126_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L129_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L128_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Assign_L131_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:FunctionDef_L118_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Return_L133_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_343:If_L148_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_343:Expr_L149_C2"}]
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLASS_IMPORTS = [ ] CLASS_IMPORTS = { # 'Checkin': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], # 'Venue': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], # 'Tip': DEFAULT_CLASS_IMPORTS + [ # 'import com.joelapenna.foursquare.filters.VenueFilterable' # ], } COMPLEX = [ 'Group', 'Badge', 'Beenhere', 'Checkin', 'CheckinResponse', 'City', 'Credentials', 'Data', 'Mayor', 'Rank', 'Score', 'Scoring', 'Settings', 'Stats', 'Tags', 'Tip', 'User', 'Venue', ] TYPES = COMPLEX + ['boolean'] def WalkNodesForAttributes(path): """Parse the xml file getting all attributes. <venue> <attribute>value</attribute> </venue> Returns: type_name - The java-style name the top node will have. "Venue" top_node_name - unadultured name of the xml stanza, probably the type of java class we're creating. "venue" attributes - {'attribute': 'value'} """ doc = pulldom.parse(path) type_name = None top_node_name = None attributes = {} level = 0 for event, node in doc: # For skipping parts of a tree. if level > 0: if event == pulldom.END_ELEMENT: level-=1 logging.warn('(%s) Skip end: %s' % (str(level), node)) continue elif event == pulldom.START_ELEMENT: logging.warn('(%s) Skipping: %s' % (str(level), node)) level+=1 continue if event == pulldom.START_ELEMENT: logging.warn('Parsing: ' + node.tagName) # Get the type name to use. if type_name is None: type_name = ''.join([word.capitalize() for word in node.tagName.split('_')]) top_node_name = node.tagName logging.warn('Found Top Node Name: ' + top_node_name) continue typ = node.getAttribute('type') child = node.getAttribute('child') # We don't want to walk complex types. if typ in COMPLEX: logging.warn('Found Complex: ' + node.tagName) level = 1 elif typ not in TYPES: logging.warn('Found String: ' + typ) typ = STRING else: logging.warn('Found Type: ' + typ) logging.warn('Adding: ' + str((node, typ))) attributes.setdefault(node.tagName, (typ, [child])) logging.warn('Attr: ' + str((type_name, top_node_name, attributes))) return type_name, top_node_name, attributes
ajibawa-2023/Python-Code-Large/train/row_344
44
114
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_344:Import_L3_C0", "label": "logging import logging", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0088, 0, 0.66, 0.0, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "logging", "arg_names": [], "import_names": ["logging"], "rhs_call_name": "", "annotation": ""}, "snippet": "import logging"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:ImportFrom_L5_C0", "label": "from xml.dom import minidom", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["minidom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import minidom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:ImportFrom_L6_C0", "label": "from xml.dom import pulldom", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0088, 0, 0.66, 0.1667, 290, 0, 1, 0, 0, 290, 0, 0], "semantic": {"name": "xml.dom", "arg_names": [], "import_names": ["pulldom"], "rhs_call_name": "", "annotation": ""}, "snippet": "from xml.dom import pulldom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L8_C0", "label": "BOOLEAN =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.0702, 0.0088, 0, 0.66, 0.25, 310, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BOOLEAN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOOLEAN = \"boolean\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L9_C0", "label": "STRING =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.0789, 0.0088, 0, 0.66, 0.3333, 560, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "STRING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "STRING = \"String\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L10_C0", "label": "GROUP =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0877, 0.0088, 0, 0.66, 0.4167, 39, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "GROUP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "GROUP = \"Group\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L14_C0", "label": "DEFAULT_INTERFACES =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.1228, 0.0088, 0, 0.66, 0.5, 228, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "DEFAULT_INTERFACES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_INTERFACES = ['FoursquareType']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L17_C0", "label": "INTERFACES =", "type": "assigned_variable", "loc": [17, 18], "level": 0, "parent": null, "vector": [14, 0, 0.1535, 0.0175, 0, 0.66, 0.5833, 296, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "INTERFACES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "INTERFACES = {\n}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L20_C0", "label": "DEFAULT_CLASS_IMPORTS =", "type": "assigned_variable", "loc": [20, 21], "level": 0, "parent": null, "vector": [14, 0, 0.1798, 0.0175, 0, 0.66, 0.6667, 786, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "DEFAULT_CLASS_IMPORTS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_CLASS_IMPORTS = [\n]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L23_C0", "label": "CLASS_IMPORTS =", "type": "assigned_variable", "loc": [23, 33], "level": 0, "parent": null, "vector": [14, 0, 0.2456, 0.0965, 0, 0.66, 0.75, 103, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CLASS_IMPORTS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMPORTS + [\n# 'import com.joelapenna.foursquare.filters.VenueFilterable'\n# ],\n# 'Venue': DEFAULT_CLASS_IMPORTS + [\n# 'import com.joelapenna.foursquare.filters.VenueFilterable'\n# ],\n# 'Tip': DEFAULT_CLASS_IMPORTS + ["}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L36_C0", "label": "COMPLEX =", "type": "assigned_variable", "loc": [36, 55], "level": 0, "parent": null, "vector": [14, 0, 0.3991, 0.1754, 0, 0.66, 0.8333, 78, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "COMPLEX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMPLEX = [\n 'Group',\n 'Badge',\n 'Beenhere',\n 'Checkin',\n 'CheckinResponse',\n 'City',\n 'Credentials',"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L56_C0", "label": "TYPES =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.4912, 0.0088, 0, 0.66, 0.9167, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TYPES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TYPES = COMPLEX + ['boolean']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "label": "WalkNodesForAttributes", "type": "function", "loc": [59, 114], "level": 0, "parent": null, "vector": [2, 0, 0.7588, 0.4912, 0, 0.66, 1.0, 612, 0, 1, 1, 0, 0, 0, 20], "semantic": {"name": "WalkNodesForAttributes", "arg_names": ["path"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def WalkNodesForAttributes(path):\n \"\"\"Parse the xml file getting all attributes.\n <venue>\n <attribute>value</attribute>\n </venue>\n\n Returns:\n type_name - The java-style name the top node will have. \"Venue\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L60_C2", "label": "expression", "type": "expression", "loc": [60, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [8, 1, 0.5702, 0.0965, 1, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Parse the xml file getting all attributes.\n <venue>\n <attribute>value</attribute>\n </venue>\n\n Returns:\n type_name - The java-style name the top node will have. \"Venue\"\n top_node_name - unadultured name of the xml stanza, probably the type of"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L71_C2", "label": "doc = parse()", "type": "assigned_variable", "loc": [71, 71], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [14, 1, 0.6228, 0.0088, 1, 0.79, 0.125, 555, 3, 1, 0, 0, 678, 10, 1], "semantic": {"name": "doc", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " doc = pulldom.parse(path)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L73_C2", "label": "type_name =", "type": "assigned_variable", "loc": [73, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [14, 1, 0.6404, 0.0088, 1, 0.79, 0.25, 81, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " type_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L74_C2", "label": "top_node_name =", "type": "assigned_variable", "loc": [74, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [14, 1, 0.6491, 0.0088, 1, 0.79, 0.375, 238, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "top_node_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " top_node_name = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L75_C2", "label": "attributes =", "type": "assigned_variable", "loc": [75, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [14, 1, 0.6579, 0.0088, 1, 0.79, 0.5, 344, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "attributes", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " attributes = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L77_C2", "label": "level =", "type": "assigned_variable", "loc": [77, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [14, 1, 0.6754, 0.0088, 1, 0.79, 0.625, 479, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " level = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2", "label": "for event, node", "type": "for", "loc": [78, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [6, 1, 0.8333, 0.307, 1, 0.79, 0.75, 207, 2, 0, 0, 0, 0, 0, 17], "semantic": {"name": "event, node", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for event, node in doc:\n # For skipping parts of a tree.\n if level > 0:\n if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L80_C4", "label": "if", "type": "if", "loc": [80, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2", "vector": [4, 2, 0.7368, 0.0789, 2, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if level > 0:\n if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6", "label": "if", "type": "if", "loc": [81, 88], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L80_C4", "vector": [4, 3, 0.7412, 0.0702, 3, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event == pulldom.END_ELEMENT:\n level-=1\n logging.warn('(%s) Skip end: %s' % (str(level), node))\n continue\n elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L83_C8", "label": "warn()", "type": "expression", "loc": [83, 83], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6", "vector": [8, 4, 0.7281, 0.0088, 4, 0.18, 0.0, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('(%s) Skip end: %s' % (str(level), node))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L85_C6", "label": "if", "type": "if", "loc": [85, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6", "vector": [4, 4, 0.7588, 0.0351, 4, 0.18, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif event == pulldom.START_ELEMENT:\n logging.warn('(%s) Skipping: %s' % (str(level), node))\n level+=1\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L86_C8", "label": "warn()", "type": "expression", "loc": [86, 86], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L85_C6", "vector": [8, 5, 0.7544, 0.0088, 5, 0.38, 0.0, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('(%s) Skipping: %s' % (str(level), node))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "label": "if", "type": "if", "loc": [90, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2", "vector": [4, 2, 0.886, 0.2018, 2, 0.0, 1.0, 0, 0, 0, 0, 0, 0, 0, 13], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if event == pulldom.START_ELEMENT:\n logging.warn('Parsing: ' + node.tagName)\n # Get the type name to use.\n if type_name is None:\n type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])\n top_node_name = node.tagName\n logging.warn('Found Top Node Name: ' + top_node_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L91_C6", "label": "warn()", "type": "expression", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [8, 3, 0.7982, 0.0088, 3, 0.54, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Parsing: ' + node.tagName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "label": "if", "type": "if", "loc": [93, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [4, 3, 0.8377, 0.0526, 3, 0.54, 0.1667, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if type_name is None:\n type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])\n top_node_name = node.tagName\n logging.warn('Found Top Node Name: ' + top_node_name)\n continue"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L94_C8", "label": "type_name = join()", "type": "assigned_variable", "loc": [94, 95], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "vector": [14, 4, 0.8289, 0.0175, 4, 0.23, 0.0, 81, 3, 1, 0, 0, 933, 10, 3], "semantic": {"name": "type_name", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " type_name = ''.join([word.capitalize()\n for word in node.tagName.split('_')])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L96_C8", "label": "top_node_name =", "type": "assigned_variable", "loc": [96, 96], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "vector": [14, 4, 0.8421, 0.0088, 4, 0.23, 0.5, 238, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "top_node_name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " top_node_name = node.tagName"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L97_C8", "label": "warn()", "type": "expression", "loc": [97, 97], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "vector": [8, 4, 0.8509, 0.0088, 4, 0.23, 1.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Top Node Name: ' + top_node_name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L100_C6", "label": "typ = getAttribute()", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [14, 3, 0.8772, 0.0088, 3, 0.54, 0.3333, 722, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "typ", "arg_names": [], "import_names": [], "rhs_call_name": "getAttribute", "annotation": ""}, "snippet": " typ = node.getAttribute('type')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L101_C6", "label": "child = getAttribute()", "type": "assigned_variable", "loc": [101, 101], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [14, 3, 0.886, 0.0088, 3, 0.54, 0.5, 967, 3, 1, 0, 0, 607, 10, 1], "semantic": {"name": "child", "arg_names": [], "import_names": [], "rhs_call_name": "getAttribute", "annotation": ""}, "snippet": " child = node.getAttribute('child')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "label": "if", "type": "if", "loc": [103, 110], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [4, 3, 0.9342, 0.0702, 3, 0.54, 0.6667, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if typ in COMPLEX:\n logging.warn('Found Complex: ' + node.tagName)\n level = 1\n elif typ not in TYPES:\n logging.warn('Found String: ' + typ)\n typ = STRING\n else:\n logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L104_C8", "label": "warn()", "type": "expression", "loc": [104, 104], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "vector": [8, 4, 0.9123, 0.0088, 4, 0.08, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Complex: ' + node.tagName)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L105_C8", "label": "level =", "type": "assigned_variable", "loc": [105, 105], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "vector": [14, 4, 0.9211, 0.0088, 4, 0.08, 0.5, 479, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " level = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "label": "if", "type": "if", "loc": [106, 110], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "vector": [4, 4, 0.9474, 0.0439, 4, 0.08, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif typ not in TYPES:\n logging.warn('Found String: ' + typ)\n typ = STRING\n else:\n logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L107_C8", "label": "warn()", "type": "expression", "loc": [107, 107], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "vector": [8, 5, 0.9386, 0.0088, 5, 0.59, 0.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found String: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L108_C8", "label": "typ =", "type": "assigned_variable", "loc": [108, 108], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "vector": [14, 5, 0.9474, 0.0088, 5, 0.59, 0.5, 722, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "typ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " typ = STRING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L110_C8", "label": "warn()", "type": "expression", "loc": [110, 110], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "vector": [8, 5, 0.9649, 0.0088, 5, 0.59, 1.0, 960, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Found Type: ' + typ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L111_C6", "label": "warn()", "type": "expression", "loc": [111, 111], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [8, 3, 0.9737, 0.0088, 3, 0.54, 0.8333, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Adding: ' + str((node, typ)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L112_C6", "label": "setdefault()", "type": "expression", "loc": [112, 112], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "vector": [8, 3, 0.9825, 0.0088, 3, 0.54, 1.0, 262, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "setdefault", "arg_names": [], "import_names": [], "rhs_call_name": "setdefault", "annotation": ""}, "snippet": " attributes.setdefault(node.tagName, (typ, [child]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L113_C2", "label": "warn()", "type": "expression", "loc": [113, 113], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [8, 1, 0.9912, 0.0088, 1, 0.79, 0.875, 960, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "warn", "arg_names": [], "import_names": [], "rhs_call_name": "warn", "annotation": ""}, "snippet": " logging.warn('Attr: ' + str((type_name, top_node_name, attributes)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_344:Return_L114_C2", "label": "return", "type": "return", "loc": [114, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "vector": [13, 1, 1.0, 0.0088, 1, 0.79, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return type_name, top_node_name, attributes"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L60_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L71_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L73_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L74_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L75_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L77_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L81_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L85_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L85_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:For_L78_C2", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L91_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L94_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L93_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L100_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L101_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L103_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L106_C6", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L111_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:If_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L112_C6"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Expr_L113_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_344:FunctionDef_L59_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_344:Return_L114_C2"}]
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ==================================================================== # # This software consists of voluntary contributions made by many # individuals on behalf of the Apache Software Foundation. For more # information on the Apache Software Foundation, please see # <http://www.apache.org/>. # import os import re import tempfile import shutil ignore_pattern = re.compile('^(.svn|target|bin|classes)') java_pattern = re.compile('^.*\.java') annot_pattern = re.compile('import org\.apache\.http\.annotation\.') def process_dir(dir): files = os.listdir(dir) for file in files: f = os.path.join(dir, file) if os.path.isdir(f): if not ignore_pattern.match(file): process_dir(f) else: if java_pattern.match(file): process_source(f) def process_source(filename): tmp = tempfile.mkstemp() tmpfd = tmp[0] tmpfile = tmp[1] try: changed = False dst = os.fdopen(tmpfd, 'w') try: src = open(filename) try: for line in src: if annot_pattern.match(line): changed = True line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.') dst.write(line) finally: src.close() finally: dst.close(); if changed: shutil.move(tmpfile, filename) else: os.remove(tmpfile) except: os.remove(tmpfile) process_dir('.')
ajibawa-2023/Python-Code-Large/train/row_345
38
74
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_345:Import_L26_C0", "label": "os import os", "type": "import", "loc": [26, 26], "level": 0, "parent": null, "vector": [1, 0, 0.3514, 0.0135, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Import_L27_C0", "label": "re import re", "type": "import", "loc": [27, 27], "level": 0, "parent": null, "vector": [1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Import_L28_C0", "label": "tempfile import tempfile", "type": "import", "loc": [28, 28], "level": 0, "parent": null, "vector": [1, 0, 0.3784, 0.0135, 0, 0.66, 0.2222, 516, 0, 1, 0, 0, 516, 0, 0], "semantic": {"name": "tempfile", "arg_names": [], "import_names": ["tempfile"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tempfile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Import_L29_C0", "label": "shutil import shutil", "type": "import", "loc": [29, 29], "level": 0, "parent": null, "vector": [1, 0, 0.3919, 0.0135, 0, 0.66, 0.3333, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "shutil", "arg_names": [], "import_names": ["shutil"], "rhs_call_name": "", "annotation": ""}, "snippet": "import shutil"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L31_C0", "label": "ignore_pattern = compile()", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.4189, 0.0135, 0, 0.66, 0.4444, 989, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "ignore_pattern", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "ignore_pattern = re.compile('^(.svn|target|bin|classes)')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L32_C0", "label": "java_pattern = compile()", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.4324, 0.0135, 0, 0.66, 0.5556, 579, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "java_pattern", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "java_pattern = re.compile('^.*\\.java')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L33_C0", "label": "annot_pattern = compile()", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.4459, 0.0135, 0, 0.66, 0.6667, 164, 3, 1, 0, 0, 821, 10, 1], "semantic": {"name": "annot_pattern", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L35_C0", "label": "process_dir", "type": "function", "loc": [35, 44], "level": 0, "parent": null, "vector": [2, 0, 0.5338, 0.1351, 0, 0.66, 0.7778, 660, 0, 1, 0, 0, 0, 0, 7], "semantic": {"name": "process_dir", "arg_names": ["dir"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def process_dir(dir):\n files = os.listdir(dir)\n for file in files:\n f = os.path.join(dir, file)\n if os.path.isdir(f):\n if not ignore_pattern.match(file):\n process_dir(f)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L36_C4", "label": "files = listdir()", "type": "assigned_variable", "loc": [36, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L35_C0", "vector": [14, 1, 0.4865, 0.0135, 1, 0.14, 0.0, 598, 3, 1, 0, 0, 551, 10, 1], "semantic": {"name": "files", "arg_names": [], "import_names": [], "rhs_call_name": "listdir", "annotation": ""}, "snippet": " files = os.listdir(dir)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4", "label": "for file", "type": "for", "loc": [37, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L35_C0", "vector": [6, 1, 0.5473, 0.1081, 1, 0.14, 1.0, 107, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for file in files:\n f = os.path.join(dir, file)\n if os.path.isdir(f):\n if not ignore_pattern.match(file):\n process_dir(f)\n else:\n if java_pattern.match(file):\n process_source(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L38_C8", "label": "f = join()", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4", "vector": [14, 2, 0.5135, 0.0135, 2, 0.47, 0.0, 899, 3, 2, 0, 0, 933, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " f = os.path.join(dir, file)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8", "label": "if", "type": "if", "loc": [39, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4", "vector": [4, 2, 0.5608, 0.0811, 2, 0.47, 1.0, 0, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if os.path.isdir(f):\n if not ignore_pattern.match(file):\n process_dir(f)\n else:\n if java_pattern.match(file):\n process_source(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:If_L40_C12", "label": "if", "type": "if", "loc": [40, 41], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8", "vector": [4, 3, 0.5473, 0.027, 3, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not ignore_pattern.match(file):\n process_dir(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L41_C16", "label": "process_dir()", "type": "expression", "loc": [41, 41], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L40_C12", "vector": [8, 4, 0.5541, 0.0135, 4, 0.65, 0.0, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "process_dir", "arg_names": [], "import_names": [], "rhs_call_name": "process_dir", "annotation": ""}, "snippet": " process_dir(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:If_L43_C12", "label": "if", "type": "if", "loc": [43, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8", "vector": [4, 3, 0.5878, 0.027, 3, 0.78, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if java_pattern.match(file):\n process_source(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L44_C16", "label": "process_source()", "type": "expression", "loc": [44, 44], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L43_C12", "vector": [8, 4, 0.5946, 0.0135, 4, 0.6, 0.0, 173, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "process_source", "arg_names": [], "import_names": [], "rhs_call_name": "process_source", "annotation": ""}, "snippet": " process_source(f)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "label": "process_source", "type": "function", "loc": [46, 72], "level": 0, "parent": null, "vector": [2, 0, 0.7973, 0.3649, 0, 0.66, 0.8889, 173, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "process_source", "arg_names": ["filename"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def process_source(filename):\n tmp = tempfile.mkstemp()\n tmpfd = tmp[0]\n tmpfile = tmp[1]\n try:\n changed = False\n dst = os.fdopen(tmpfd, 'w')\n try:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L47_C4", "label": "tmp = mkstemp()", "type": "assigned_variable", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "vector": [14, 1, 0.6351, 0.0135, 1, 0.75, 0.0, 517, 3, 0, 0, 0, 708, 10, 1], "semantic": {"name": "tmp", "arg_names": [], "import_names": [], "rhs_call_name": "mkstemp", "annotation": ""}, "snippet": " tmp = tempfile.mkstemp()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L48_C4", "label": "tmpfd =", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "vector": [14, 1, 0.6486, 0.0135, 1, 0.75, 0.3333, 608, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "tmpfd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tmpfd = tmp[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L49_C4", "label": "tmpfile =", "type": "assigned_variable", "loc": [49, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "vector": [14, 1, 0.6622, 0.0135, 1, 0.75, 0.6667, 719, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "tmpfile", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tmpfile = tmp[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "label": "try", "type": "try", "loc": [50, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "vector": [7, 1, 0.8243, 0.3108, 1, 0.75, 1.0, 0, 0, 1, 0, 0, 0, 0, 10], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n changed = False\n dst = os.fdopen(tmpfd, 'w')\n try:\n src = open(filename)\n try:\n for line in src:\n if annot_pattern.match(line):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L51_C8", "label": "changed =", "type": "assigned_variable", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "vector": [14, 2, 0.6892, 0.0135, 2, 0.46, 0.0, 404, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "changed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " changed = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L52_C8", "label": "dst = fdopen()", "type": "assigned_variable", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "vector": [14, 2, 0.7027, 0.0135, 2, 0.46, 0.3333, 856, 3, 2, 0, 0, 783, 10, 1], "semantic": {"name": "dst", "arg_names": [], "import_names": [], "rhs_call_name": "fdopen", "annotation": ""}, "snippet": " dst = os.fdopen(tmpfd, 'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "label": "try", "type": "try", "loc": [53, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "vector": [7, 2, 0.7905, 0.1622, 2, 0.46, 0.6667, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n src = open(filename)\n try:\n for line in src:\n if annot_pattern.match(line):\n changed = True\n line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.')\n dst.write(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L54_C12", "label": "src = open()", "type": "assigned_variable", "loc": [54, 54], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "vector": [14, 3, 0.7297, 0.0135, 3, 0.15, 0.0, 345, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "src", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " src = open(filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12", "label": "try", "type": "try", "loc": [55, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "vector": [7, 3, 0.7905, 0.1081, 3, 0.15, 0.5, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n for line in src:\n if annot_pattern.match(line):\n changed = True\n line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.')\n dst.write(line)\n finally:\n src.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16", "label": "for line", "type": "for", "loc": [56, 60], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12", "vector": [6, 4, 0.7838, 0.0676, 4, 0.17, 0.0, 373, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in src:\n if annot_pattern.match(line):\n changed = True\n line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.')\n dst.write(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20", "label": "if", "type": "if", "loc": [57, 59], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16", "vector": [4, 5, 0.7838, 0.0405, 5, 0.27, 0.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if annot_pattern.match(line):\n changed = True\n line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L58_C24", "label": "changed =", "type": "assigned_variable", "loc": [58, 58], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20", "vector": [14, 6, 0.7838, 0.0135, 6, 0.99, 0.0, 404, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "changed", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " changed = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L59_C24", "label": "line = replace()", "type": "assigned_variable", "loc": [59, 59], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20", "vector": [14, 6, 0.7973, 0.0135, 6, 0.99, 1.0, 373, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " line = line.replace('import org.apache.http.annotation.', 'import net.jcip.annotations.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L60_C20", "label": "write()", "type": "expression", "loc": [60, 60], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16", "vector": [8, 5, 0.8108, 0.0135, 5, 0.27, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " dst.write(line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L62_C15", "label": "close()", "type": "expression", "loc": [62, 62], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12", "vector": [8, 4, 0.8378, 0.0135, 4, 0.17, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " src.close()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L64_C12", "label": "close()", "type": "expression", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "vector": [8, 3, 0.8649, 0.0135, 3, 0.15, 1.0, 77, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "close", "arg_names": [], "import_names": [], "rhs_call_name": "close", "annotation": ""}, "snippet": " dst.close();"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8", "label": "if", "type": "if", "loc": [66, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "vector": [4, 2, 0.9122, 0.0541, 2, 0.46, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if changed:\n shutil.move(tmpfile, filename)\n else:\n os.remove(tmpfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L67_C12", "label": "move()", "type": "expression", "loc": [67, 67], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8", "vector": [8, 3, 0.9054, 0.0135, 3, 0.45, 0.0, 856, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "move", "annotation": ""}, "snippet": " shutil.move(tmpfile, filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L69_C12", "label": "remove()", "type": "expression", "loc": [69, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8", "vector": [8, 3, 0.9324, 0.0135, 3, 0.45, 1.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(tmpfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L72_C8", "label": "remove()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "vector": [8, 2, 0.973, 0.0135, 2, 0.46, 0.0, 185, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove", "arg_names": [], "import_names": [], "rhs_call_name": "remove", "annotation": ""}, "snippet": " os.remove(tmpfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L74_C0", "label": "process_dir()", "type": "expression", "loc": [74, 74], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0135, 0, 0.66, 1.0, 660, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "process_dir", "arg_names": [], "import_names": [], "rhs_call_name": "process_dir", "annotation": ""}, "snippet": "process_dir('.')"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L35_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:For_L37_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:If_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L40_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L41_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:If_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L43_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L44_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L49_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:FunctionDef_L46_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L54_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L58_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L57_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Assign_L59_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:For_L56_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L60_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L55_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L62_C15"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L53_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:If_L66_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L69_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_345:Try_L50_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_345:Expr_L72_C8"}]
#!/usr/bin/python #for test webpy in visualhost import sys sys.path.insert(0, "/usr/local/bin/python") sys.path.insert(0, "/www/fancyhan.host/ifancc_com/htdocs/115") sys.path.insert(0, "/www/fancyhan.host/ifancc_com/modules") import web from web.contrib.template import render_mako from netcrack import netdisk render = render_mako( directories=['templates'], module_directory="templates", input_encoding='utf-8', output_encoding='utf-8', ) class main: def GET(self): web.header('Content-Type','text/html') return render.main() class api: def GET(self,code): web.header('Content-Type','text/javascript') return netdisk(code).json() urls = ( '/',main, '/api/(.*)',api, '/api/http://u\.115\.com/file/(.*)',api ) app = web.application(urls,globals()) #mapping = (r'wap\.ifancc\.com',app) #app2= web.subdomain_application(mapping) web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func,addr) if __name__ == '__main__': app.run() #print render.main()
ajibawa-2023/Python-Code-Large/train/row_346
21
50
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_346:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.06, 0.02, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L4_C0", "label": "insert()", "type": "expression", "loc": [4, 4], "level": 0, "parent": null, "vector": [8, 0, 0.08, 0.02, 0, 0.66, 0.0769, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": "sys.path.insert(0, \"/usr/local/bin/python\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L5_C0", "label": "insert()", "type": "expression", "loc": [5, 5], "level": 0, "parent": null, "vector": [8, 0, 0.1, 0.02, 0, 0.66, 0.1538, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": "sys.path.insert(0, \"/www/fancyhan.host/ifancc_com/htdocs/115\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L6_C0", "label": "insert()", "type": "expression", "loc": [6, 6], "level": 0, "parent": null, "vector": [8, 0, 0.12, 0.02, 0, 0.66, 0.2308, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": "sys.path.insert(0, \"/www/fancyhan.host/ifancc_com/modules\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Import_L7_C0", "label": "web import web", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.14, 0.02, 0, 0.66, 0.3077, 183, 0, 1, 0, 0, 183, 0, 0], "semantic": {"name": "web", "arg_names": [], "import_names": ["web"], "rhs_call_name": "", "annotation": ""}, "snippet": "import web"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:ImportFrom_L8_C0", "label": "from web.contrib.template import render_mako", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.16, 0.02, 0, 0.66, 0.3846, 7, 0, 1, 0, 0, 7, 0, 0], "semantic": {"name": "web.contrib.template", "arg_names": [], "import_names": ["render_mako"], "rhs_call_name": "", "annotation": ""}, "snippet": "from web.contrib.template import render_mako"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:ImportFrom_L9_C0", "label": "from netcrack import netdisk", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.18, 0.02, 0, 0.66, 0.4615, 326, 0, 1, 0, 0, 326, 0, 0], "semantic": {"name": "netcrack", "arg_names": [], "import_names": ["netdisk"], "rhs_call_name": "", "annotation": ""}, "snippet": "from netcrack import netdisk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Assign_L13_C0", "label": "render = render_mako()", "type": "assigned_variable", "loc": [13, 18], "level": 0, "parent": null, "vector": [14, 0, 0.31, 0.12, 0, 0.66, 0.5385, 24, 3, 4, 0, 0, 244, 10, 1], "semantic": {"name": "render", "arg_names": [], "import_names": [], "rhs_call_name": "render_mako", "annotation": ""}, "snippet": "render = render_mako(\n directories=['templates'],\n\tmodule_directory=\"templates\",\n input_encoding='utf-8',\n output_encoding='utf-8',\n )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L21_C0", "label": "main", "type": "class", "loc": [21, 24], "level": 0, "parent": null, "vector": [3, 0, 0.45, 0.08, 0, 0.66, 0.6154, 624, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class main:\n\tdef GET(self):\n\t\tweb.header('Content-Type','text/html')\n\t\treturn render.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1", "label": "GET", "type": "function", "loc": [22, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L21_C0", "vector": [2, 1, 0.46, 0.06, 1, 0.18, 0.0, 547, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "GET", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef GET(self):\n\t\tweb.header('Content-Type','text/html')\n\t\treturn render.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L23_C2", "label": "header()", "type": "expression", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1", "vector": [8, 2, 0.46, 0.02, 2, 0.07, 0.0, 481, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "header", "arg_names": [], "import_names": [], "rhs_call_name": "header", "annotation": ""}, "snippet": "\t\tweb.header('Content-Type','text/html')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Return_L24_C2", "label": "return", "type": "return", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1", "vector": [13, 2, 0.48, 0.02, 2, 0.07, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn render.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L25_C0", "label": "api", "type": "class", "loc": [25, 28], "level": 0, "parent": null, "vector": [3, 0, 0.53, 0.08, 0, 0.66, 0.6923, 976, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "api", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class api:\n\tdef GET(self,code):\n\t\tweb.header('Content-Type','text/javascript')\n\t\treturn netdisk(code).json()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1", "label": "GET", "type": "function", "loc": [26, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L25_C0", "vector": [2, 1, 0.54, 0.06, 1, 0.22, 0.0, 547, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "GET", "arg_names": ["self", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\tdef GET(self,code):\n\t\tweb.header('Content-Type','text/javascript')\n\t\treturn netdisk(code).json()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L27_C2", "label": "header()", "type": "expression", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1", "vector": [8, 2, 0.54, 0.02, 2, 0.6, 0.0, 481, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "header", "arg_names": [], "import_names": [], "rhs_call_name": "header", "annotation": ""}, "snippet": "\t\tweb.header('Content-Type','text/javascript')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Return_L28_C2", "label": "return", "type": "return", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1", "vector": [13, 2, 0.56, 0.02, 2, 0.6, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "\t\treturn netdisk(code).json()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Assign_L31_C0", "label": "urls =", "type": "assigned_variable", "loc": [31, 35], "level": 0, "parent": null, "vector": [14, 0, 0.66, 0.1, 0, 0.66, 0.7692, 260, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "urls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "urls = (\n\t'/',main,\n\t'/api/(.*)',api,\n\t'/api/http://u\\.115\\.com/file/(.*)',api\n)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Assign_L36_C0", "label": "app = application()", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.72, 0.02, 0, 0.66, 0.8462, 494, 3, 2, 0, 0, 244, 10, 2], "semantic": {"name": "app", "arg_names": [], "import_names": [], "rhs_call_name": "application", "annotation": ""}, "snippet": "app = web.application(urls,globals())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Assign_L41_C0", "label": "web.wsgi.runwsgi =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.82, 0.02, 0, 0.66, 0.9231, 286, 9, 0, 0, 0, 0, 0, 1], "semantic": {"name": "web.wsgi.runwsgi", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func,addr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:If_L43_C0", "label": "if", "type": "if", "loc": [43, 44], "level": 0, "parent": null, "vector": [4, 0, 0.87, 0.04, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n\tapp.run()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L44_C1", "label": "run()", "type": "expression", "loc": [44, 44], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_346:If_L43_C0", "vector": [8, 1, 0.88, 0.02, 1, 0.25, 0.0, 679, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "run", "arg_names": [], "import_names": [], "rhs_call_name": "run", "annotation": ""}, "snippet": "\tapp.run()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L21_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L23_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L22_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_346:Return_L24_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:ClassDef_L25_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L27_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:FunctionDef_L26_C1", "t": "ajibawa-2023/Python-Code-Large/train/row_346:Return_L28_C2"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_346:If_L43_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_346:Expr_L44_C1"}]
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 6 _modified_time = 1309516407.3164999 _template_filename='templates/main.html' _template_uri='main.html' _template_cache=cache.Cache(__name__, _modified_time) _source_encoding='utf-8' _exports = [] def render_body(context,**pageargs): context.caller_stack._push_frame() try: __M_locals = __M_dict_builtin(pageargs=pageargs) __M_writer = context.writer() # SOURCE LINE 1 __M_writer(u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n<title>115\u7f51\u76d8 \u67e5\u8be2\u5668</title>\n<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>\n<!--[if (gte IE 6)&(lte IE 8)]>\n <script type="text/javascript" src="/selectivizr-min.js"></script>\n<![endif]--> \n\n\n\n<script type="text/javascript">\n\n\t\t\n\nvar URIlabel = "\u8bf7\u8f93\u5165\u7f51\u5740\u6216\u63d0\u53d6\u7801";\n\n$(document).ready(function(){\n\t$("#115URI").blur(function(){\n\t\tif(this.value == \'\') this.value=URIlabel;\n\t\t});\n\t$("#115URI").focus(function(){\n\t\tif(this.value == URIlabel) this.value=\'\';\n\t\t});\n\t$("#115URIbotton").click(function(){\n\t\tvar pickcode = $("#115URI").attr("value");\n\t\tpickcode = pickcode.replace("http://u.115.com/file/","");\n\t\tpickcode = pickcode.replace("u.115.com/file/","");\n\t\t\n\t\t$.getJSON("/api/"+pickcode,function(data){\n\t\t\t\t\tif(data.state==false)\n\t\t\t\t\t{\n\t\t\t\t\t\talert(data.message);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$("#filename").html(data.filename);\n\t\t\t\t\t$("#sha").html(data.sha);\n\t\t\t\t\t$("#downURL1").html(data.urls[0]);\n\t\t\t\t\t$("#downURL2").html(data.urls[1]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t);\n\t\t});\n});\n</script>\n<link href="base.css" rel="stylesheet" type="text/css" />\n</head>\n<body>\n<div id="wapper">\n\t<div id="toplogo">115\u7f51\u76d8\u4fe1\u606f\u67e5\u8be2</div>\n <div class="box">\n \u8bf7\u5728\u4e0b\u65b9\u8f93\u5165115\u7f51\u76d8\u7684\u63d0\u53d6\u7801\u6216\u63d0\u53d6\u9875\u9762\u7f51\u5740\n \t<div class="lin"></div>\n <form>\n \t<fieldset>\n <input id="115URIbotton" class="submit" type="botton" value="\u7ed9\u6211\u5206\u6790" />\n <input id="115URI" class="url" value="" size="40" maxlength="200" name="url" />\n </fieldset>\n </form>\n </div>\n <div id="resultbox" class="box">\n \t\u7f51\u76d8\u4fe1\u606f\n <div class="lin"></div>\n <table class="file-form" >\n <thead>\n <tr>\n <th scope="col" width="20%" >\u540d\u79f0&nbsp;</th>\n <th scope="col" width="80%">\u503c&nbsp;</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\u6587\u4ef6\u540d&nbsp;</td>\n <td id="filename">&nbsp;</td>\n </tr>\n <tr>\n <td>sha1&nbsp;</td>\n <td id="sha">&nbsp;</td>\n </tr>\n <tr>\n <td>\u4e0b\u8f7d\u5730\u57401&nbsp;</td>\n <td id="downURL1">&nbsp;</td>\n </tr>\n <tr>\n <td>\u4e0b\u8f7d\u5730\u57402&nbsp;</td>\n <td id="downURL2">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n\t\t</div>\n <div id="footer" class="box">\n\t\t\t<span style="color:red">coding:<a href="blog.ifancc.com">fancycode</a>.</span>Contact fancycode at gmail.com for more detail <noscritp><a href="http://www.51.la/?5012927" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/5012927.asp" style="border:none" /></a></noscript>\n\t\t</div> \n\n \n</div>\n\n</body>\n</html>\n') return '' finally: context.caller_stack._pop_frame()
ajibawa-2023/Python-Code-Large/train/row_347
19
26
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_347:ImportFrom_L2_C0", "label": "from mako import runtime, filters, cache", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0385, 0, 0.66, 0.0, 682, 0, 3, 0, 0, 682, 0, 0], "semantic": {"name": "mako", "arg_names": [], "import_names": ["runtime", "filters", "cache"], "rhs_call_name": "", "annotation": ""}, "snippet": "from mako import runtime, filters, cache"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L3_C0", "label": "UNDEFINED =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.1154, 0.0385, 0, 0.66, 0.0909, 67, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "UNDEFINED", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "UNDEFINED = runtime.UNDEFINED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L4_C0", "label": "__M_dict_builtin =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.1538, 0.0385, 0, 0.66, 0.1818, 679, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__M_dict_builtin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__M_dict_builtin = dict"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L5_C0", "label": "__M_locals_builtin =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.1923, 0.0385, 0, 0.66, 0.2727, 378, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "__M_locals_builtin", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "__M_locals_builtin = locals"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L6_C0", "label": "_magic_number =", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.2308, 0.0385, 0, 0.66, 0.3636, 595, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "_magic_number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_magic_number = 6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L7_C0", "label": "_modified_time =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.2692, 0.0385, 0, 0.66, 0.4545, 22, 1, 0, 0, 0, 0, 2, 0], "semantic": {"name": "_modified_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_modified_time = 1309516407.3164999"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L8_C0", "label": "_template_filename =", "type": "assigned_variable", "loc": [8, 8], "level": 0, "parent": null, "vector": [14, 0, 0.3077, 0.0385, 0, 0.66, 0.5455, 607, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_template_filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_template_filename='templates/main.html'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L9_C0", "label": "_template_uri =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.3462, 0.0385, 0, 0.66, 0.6364, 477, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_template_uri", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_template_uri='main.html'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L10_C0", "label": "_template_cache = Cache()", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.3846, 0.0385, 0, 0.66, 0.7273, 920, 3, 2, 0, 0, 419, 10, 1], "semantic": {"name": "_template_cache", "arg_names": [], "import_names": [], "rhs_call_name": "Cache", "annotation": ""}, "snippet": "_template_cache=cache.Cache(__name__, _modified_time)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L11_C0", "label": "_source_encoding =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.4231, 0.0385, 0, 0.66, 0.8182, 167, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "_source_encoding", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_source_encoding='utf-8'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L12_C0", "label": "_exports =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.4615, 0.0385, 0, 0.66, 0.9091, 227, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "_exports", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_exports = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:FunctionDef_L15_C0", "label": "render_body", "type": "function", "loc": [15, 24], "level": 0, "parent": null, "vector": [2, 0, 0.75, 0.3846, 0, 0.66, 1.0, 328, 0, 2, 1, 0, 0, 0, 5], "semantic": {"name": "render_body", "arg_names": ["context", "pageargs"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def render_body(context,**pageargs):\n context.caller_stack._push_frame()\n try:\n __M_locals = __M_dict_builtin(pageargs=pageargs)\n __M_writer = context.writer()\n # SOURCE LINE 1\n __M_writer(u'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\\n<head>\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\\n<title>115\\u7f51\\u76d8 \\u67e5\\u8be2\\u5668</title>\\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js\"></script>\\n<!--[if (gte IE 6)&(lte IE 8)]>\\n <script type=\"text/javascript\" src=\"/selectivizr-min.js\"></script>\\n<![endif]--> \\n\\n\\n\\n<script type=\"text/javascript\">\\n\\n\\t\\t\\n\\nvar URIlabel = \"\\u8bf7\\u8f93\\u5165\\u7f51\\u5740\\u6216\\u63d0\\u53d6\\u7801\";\\n\\n$(document).ready(function(){\\n\\t$(\"#115URI\").blur(function(){\\n\\t\\tif(this.value == \\'\\') this.value=URIlabel;\\n\\t\\t});\\n\\t$(\"#115URI\").focus(function(){\\n\\t\\tif(this.value == URIlabel) this.value=\\'\\';\\n\\t\\t});\\n\\t$(\"#115URIbotton\").click(function(){\\n\\t\\tvar pickcode = $(\"#115URI\").attr(\"value\");\\n\\t\\tpickcode = pickcode.replace(\"http://u.115.com/file/\",\"\");\\n\\t\\tpickcode = pickcode.replace(\"u.115.com/file/\",\"\");\\n\\t\\t\\n\\t\\t$.getJSON(\"/api/\"+pickcode,function(data){\\n\\t\\t\\t\\t\\tif(data.state==false)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\talert(data.message);\\n\\t\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$(\"#filename\").html(data.filename);\\n\\t\\t\\t\\t\\t$(\"#sha\").html(data.sha);\\n\\t\\t\\t\\t\\t$(\"#downURL1\").html(data.urls[0]);\\n\\t\\t\\t\\t\\t$(\"#downURL2\").html(data.urls[1]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t});\\n});\\n</script>\\n<link href=\"base.css\" rel=\"stylesheet\" type=\"text/css\" />\\n</head>\\n<body>\\n<div id=\"wapper\">\\n\\t<div id=\"toplogo\">115\\u7f51\\u76d8\\u4fe1\\u606f\\u67e5\\u8be2</div>\\n <div class=\"box\">\\n \\u8bf7\\u5728\\u4e0b\\u65b9\\u8f93\\u5165115\\u7f51\\u76d8\\u7684\\u63d0\\u53d6\\u7801\\u6216\\u63d0\\u53d6\\u9875\\u9762\\u7f51\\u5740\\n \\t<div class=\"lin\"></div>\\n <form>\\n \\t<fieldset>\\n <input id=\"115URIbotton\" class=\"submit\" type=\"botton\" value=\"\\u7ed9\\u6211\\u5206\\u6790\" />\\n <input id=\"115URI\" class=\"url\" value=\"\" size=\"40\" maxlength=\"200\" name=\"url\" />\\n </fieldset>\\n </form>\\n </div>\\n <div id=\"resultbox\" class=\"box\">\\n \\t\\u7f51\\u76d8\\u4fe1\\u606f\\n <div class=\"lin\"></div>\\n <table class=\"file-form\" >\\n <thead>\\n <tr>\\n <th scope=\"col\" width=\"20%\" >\\u540d\\u79f0&nbsp;</th>\\n <th scope=\"col\" width=\"80%\">\\u503c&nbsp;</th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <td>\\u6587\\u4ef6\\u540d&nbsp;</td>\\n <td id=\"filename\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>sha1&nbsp;</td>\\n <td id=\"sha\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57401&nbsp;</td>\\n <td id=\"downURL1\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57402&nbsp;</td>\\n <td id=\"downURL2\">&nbsp;</td>\\n </tr>\\n </tbody>\\n </table>\\n\\t\\t</div>\\n <div id=\"footer\" class=\"box\">\\n\\t\\t\\t<span style=\"color:red\">coding:<a href=\"blog.ifancc.com\">fancycode</a>.</span>Contact fancycode at gmail.com for more detail <noscritp><a href=\"http://www.51.la/?5012927\" target=\"_blank\"><img alt=\"&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;\" src=\"http://img.users.51.la/5012927.asp\" style=\"border:none\" /></a></noscript>\\n\\t\\t</div> \\n\\n \\n</div>\\n\\n</body>\\n</html>\\n')\n return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L16_C4", "label": "_push_frame()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:FunctionDef_L15_C0", "vector": [8, 1, 0.6154, 0.0385, 1, 0.88, 0.0, 889, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_push_frame", "arg_names": [], "import_names": [], "rhs_call_name": "_push_frame", "annotation": ""}, "snippet": " context.caller_stack._push_frame()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "label": "try", "type": "try", "loc": [17, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:FunctionDef_L15_C0", "vector": [7, 1, 0.7885, 0.3077, 1, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n __M_locals = __M_dict_builtin(pageargs=pageargs)\n __M_writer = context.writer()\n # SOURCE LINE 1\n __M_writer(u'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\\n<head>\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\\n<title>115\\u7f51\\u76d8 \\u67e5\\u8be2\\u5668</title>\\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js\"></script>\\n<!--[if (gte IE 6)&(lte IE 8)]>\\n <script type=\"text/javascript\" src=\"/selectivizr-min.js\"></script>\\n<![endif]--> \\n\\n\\n\\n<script type=\"text/javascript\">\\n\\n\\t\\t\\n\\nvar URIlabel = \"\\u8bf7\\u8f93\\u5165\\u7f51\\u5740\\u6216\\u63d0\\u53d6\\u7801\";\\n\\n$(document).ready(function(){\\n\\t$(\"#115URI\").blur(function(){\\n\\t\\tif(this.value == \\'\\') this.value=URIlabel;\\n\\t\\t});\\n\\t$(\"#115URI\").focus(function(){\\n\\t\\tif(this.value == URIlabel) this.value=\\'\\';\\n\\t\\t});\\n\\t$(\"#115URIbotton\").click(function(){\\n\\t\\tvar pickcode = $(\"#115URI\").attr(\"value\");\\n\\t\\tpickcode = pickcode.replace(\"http://u.115.com/file/\",\"\");\\n\\t\\tpickcode = pickcode.replace(\"u.115.com/file/\",\"\");\\n\\t\\t\\n\\t\\t$.getJSON(\"/api/\"+pickcode,function(data){\\n\\t\\t\\t\\t\\tif(data.state==false)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\talert(data.message);\\n\\t\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$(\"#filename\").html(data.filename);\\n\\t\\t\\t\\t\\t$(\"#sha\").html(data.sha);\\n\\t\\t\\t\\t\\t$(\"#downURL1\").html(data.urls[0]);\\n\\t\\t\\t\\t\\t$(\"#downURL2\").html(data.urls[1]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t});\\n});\\n</script>\\n<link href=\"base.css\" rel=\"stylesheet\" type=\"text/css\" />\\n</head>\\n<body>\\n<div id=\"wapper\">\\n\\t<div id=\"toplogo\">115\\u7f51\\u76d8\\u4fe1\\u606f\\u67e5\\u8be2</div>\\n <div class=\"box\">\\n \\u8bf7\\u5728\\u4e0b\\u65b9\\u8f93\\u5165115\\u7f51\\u76d8\\u7684\\u63d0\\u53d6\\u7801\\u6216\\u63d0\\u53d6\\u9875\\u9762\\u7f51\\u5740\\n \\t<div class=\"lin\"></div>\\n <form>\\n \\t<fieldset>\\n <input id=\"115URIbotton\" class=\"submit\" type=\"botton\" value=\"\\u7ed9\\u6211\\u5206\\u6790\" />\\n <input id=\"115URI\" class=\"url\" value=\"\" size=\"40\" maxlength=\"200\" name=\"url\" />\\n </fieldset>\\n </form>\\n </div>\\n <div id=\"resultbox\" class=\"box\">\\n \\t\\u7f51\\u76d8\\u4fe1\\u606f\\n <div class=\"lin\"></div>\\n <table class=\"file-form\" >\\n <thead>\\n <tr>\\n <th scope=\"col\" width=\"20%\" >\\u540d\\u79f0&nbsp;</th>\\n <th scope=\"col\" width=\"80%\">\\u503c&nbsp;</th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <td>\\u6587\\u4ef6\\u540d&nbsp;</td>\\n <td id=\"filename\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>sha1&nbsp;</td>\\n <td id=\"sha\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57401&nbsp;</td>\\n <td id=\"downURL1\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57402&nbsp;</td>\\n <td id=\"downURL2\">&nbsp;</td>\\n </tr>\\n </tbody>\\n </table>\\n\\t\\t</div>\\n <div id=\"footer\" class=\"box\">\\n\\t\\t\\t<span style=\"color:red\">coding:<a href=\"blog.ifancc.com\">fancycode</a>.</span>Contact fancycode at gmail.com for more detail <noscritp><a href=\"http://www.51.la/?5012927\" target=\"_blank\"><img alt=\"&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;\" src=\"http://img.users.51.la/5012927.asp\" style=\"border:none\" /></a></noscript>\\n\\t\\t</div> \\n\\n \\n</div>\\n\\n</body>\\n</html>\\n')\n return ''\n finally:\n context.caller_stack._pop_frame()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L18_C8", "label": "__M_locals = __M_dict_builtin()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "vector": [14, 2, 0.6923, 0.0385, 2, 0.35, 0.0, 1, 3, 1, 0, 0, 679, 10, 1], "semantic": {"name": "__M_locals", "arg_names": [], "import_names": [], "rhs_call_name": "__M_dict_builtin", "annotation": ""}, "snippet": " __M_locals = __M_dict_builtin(pageargs=pageargs)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L19_C8", "label": "__M_writer = writer()", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "vector": [14, 2, 0.7308, 0.0385, 2, 0.35, 0.25, 190, 3, 0, 0, 0, 614, 10, 1], "semantic": {"name": "__M_writer", "arg_names": [], "import_names": [], "rhs_call_name": "writer", "annotation": ""}, "snippet": " __M_writer = context.writer()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L21_C8", "label": "__M_writer()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "vector": [8, 2, 0.8077, 0.0385, 2, 0.35, 0.5, 190, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__M_writer", "arg_names": [], "import_names": [], "rhs_call_name": "__M_writer", "annotation": ""}, "snippet": " __M_writer(u'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\\n<head>\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\\n<title>115\\u7f51\\u76d8 \\u67e5\\u8be2\\u5668</title>\\n<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js\"></script>\\n<!--[if (gte IE 6)&(lte IE 8)]>\\n <script type=\"text/javascript\" src=\"/selectivizr-min.js\"></script>\\n<![endif]--> \\n\\n\\n\\n<script type=\"text/javascript\">\\n\\n\\t\\t\\n\\nvar URIlabel = \"\\u8bf7\\u8f93\\u5165\\u7f51\\u5740\\u6216\\u63d0\\u53d6\\u7801\";\\n\\n$(document).ready(function(){\\n\\t$(\"#115URI\").blur(function(){\\n\\t\\tif(this.value == \\'\\') this.value=URIlabel;\\n\\t\\t});\\n\\t$(\"#115URI\").focus(function(){\\n\\t\\tif(this.value == URIlabel) this.value=\\'\\';\\n\\t\\t});\\n\\t$(\"#115URIbotton\").click(function(){\\n\\t\\tvar pickcode = $(\"#115URI\").attr(\"value\");\\n\\t\\tpickcode = pickcode.replace(\"http://u.115.com/file/\",\"\");\\n\\t\\tpickcode = pickcode.replace(\"u.115.com/file/\",\"\");\\n\\t\\t\\n\\t\\t$.getJSON(\"/api/\"+pickcode,function(data){\\n\\t\\t\\t\\t\\tif(data.state==false)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\talert(data.message);\\n\\t\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$(\"#filename\").html(data.filename);\\n\\t\\t\\t\\t\\t$(\"#sha\").html(data.sha);\\n\\t\\t\\t\\t\\t$(\"#downURL1\").html(data.urls[0]);\\n\\t\\t\\t\\t\\t$(\"#downURL2\").html(data.urls[1]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t});\\n});\\n</script>\\n<link href=\"base.css\" rel=\"stylesheet\" type=\"text/css\" />\\n</head>\\n<body>\\n<div id=\"wapper\">\\n\\t<div id=\"toplogo\">115\\u7f51\\u76d8\\u4fe1\\u606f\\u67e5\\u8be2</div>\\n <div class=\"box\">\\n \\u8bf7\\u5728\\u4e0b\\u65b9\\u8f93\\u5165115\\u7f51\\u76d8\\u7684\\u63d0\\u53d6\\u7801\\u6216\\u63d0\\u53d6\\u9875\\u9762\\u7f51\\u5740\\n \\t<div class=\"lin\"></div>\\n <form>\\n \\t<fieldset>\\n <input id=\"115URIbotton\" class=\"submit\" type=\"botton\" value=\"\\u7ed9\\u6211\\u5206\\u6790\" />\\n <input id=\"115URI\" class=\"url\" value=\"\" size=\"40\" maxlength=\"200\" name=\"url\" />\\n </fieldset>\\n </form>\\n </div>\\n <div id=\"resultbox\" class=\"box\">\\n \\t\\u7f51\\u76d8\\u4fe1\\u606f\\n <div class=\"lin\"></div>\\n <table class=\"file-form\" >\\n <thead>\\n <tr>\\n <th scope=\"col\" width=\"20%\" >\\u540d\\u79f0&nbsp;</th>\\n <th scope=\"col\" width=\"80%\">\\u503c&nbsp;</th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <td>\\u6587\\u4ef6\\u540d&nbsp;</td>\\n <td id=\"filename\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>sha1&nbsp;</td>\\n <td id=\"sha\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57401&nbsp;</td>\\n <td id=\"downURL1\">&nbsp;</td>\\n </tr>\\n <tr>\\n <td>\\u4e0b\\u8f7d\\u5730\\u57402&nbsp;</td>\\n <td id=\"downURL2\">&nbsp;</td>\\n </tr>\\n </tbody>\\n </table>\\n\\t\\t</div>\\n <div id=\"footer\" class=\"box\">\\n\\t\\t\\t<span style=\"color:red\">coding:<a href=\"blog.ifancc.com\">fancycode</a>.</span>Contact fancycode at gmail.com for more detail <noscritp><a href=\"http://www.51.la/?5012927\" target=\"_blank\"><img alt=\"&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;\" src=\"http://img.users.51.la/5012927.asp\" style=\"border:none\" /></a></noscript>\\n\\t\\t</div> \\n\\n \\n</div>\\n\\n</body>\\n</html>\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Return_L22_C8", "label": "return", "type": "return", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "vector": [13, 2, 0.8462, 0.0385, 2, 0.35, 0.75, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L24_C8", "label": "_pop_frame()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "vector": [8, 2, 0.9231, 0.0385, 2, 0.35, 1.0, 600, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_pop_frame", "arg_names": [], "import_names": [], "rhs_call_name": "_pop_frame", "annotation": ""}, "snippet": " context.caller_stack._pop_frame()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_347:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Return_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_347:Try_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_347:Expr_L24_C8"}]
#encoding:utf-8 import urllib import json class netdisk(): '''a class which can fetch 115 netdisk`s file though the given url or pickcode the request url examplehttp://uapi.115.com/?ct=upload_api&ac= get_pick_code_info&pickcode=aqbc8e20&version=1175"''' api = "http://uapi.115.com/?ct=upload_api&ac=get_pick_code_info\ &pickcode=%s&version=1175" def __init__(self,code): '''code is either URL of the file or pickcode''' self.__code = code f = urllib.urlopen(self.api %self.__code) data = f.read() self.__data = json.loads(data) self.state = self.__data['State'] self.message = urllib.unquote(self.__data['Message']) if self.state == True: self.Sha1 = self.__data['Sha1'] self.filename = urllib.unquote(self.__data['FileName']) self.urls = [url['Url'] for url in self.__data["DownloadUrl"]] def json(self): '''return a json str of the file`s info''' if self.state == True: return json.dumps({'filename':self.filename, 'sha':self.Sha1, 'urls':self.urls, 'state':True }) else: return json.dumps({'state':False, 'message':self.message}) #simple unit test if __name__=="__main__": a = netdisk("aqbc8e20") print a._netdisk__data print a.filename print a.json()
ajibawa-2023/Python-Code-Large/train/row_348
27
46
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_348:Import_L2_C0", "label": "urllib import urllib", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0435, 0.0217, 0, 0.66, 0.0, 614, 0, 1, 0, 0, 614, 0, 0], "semantic": {"name": "urllib", "arg_names": [], "import_names": ["urllib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import urllib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Import_L3_C0", "label": "json import json", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0652, 0.0217, 0, 0.66, 0.3333, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "json", "arg_names": [], "import_names": ["json"], "rhs_call_name": "", "annotation": ""}, "snippet": "import json"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "label": "netdisk", "type": "class", "loc": [5, 34], "level": 0, "parent": null, "vector": [3, 0, 0.4239, 0.6522, 0, 0.66, 0.6667, 63, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "netdisk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class netdisk():\n '''a class which can fetch 115 netdisk`s file though the given url or\n pickcode\n the request url examplehttp://uapi.115.com/?ct=upload_api&ac=\n get_pick_code_info&pickcode=aqbc8e20&version=1175\"'''\n api = \"http://uapi.115.com/?ct=upload_api&ac=get_pick_code_info\\\n&pickcode=%s&version=1175\"\n def __init__(self,code):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L6_C4", "label": "expression", "type": "expression", "loc": [6, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "vector": [8, 1, 0.163, 0.087, 1, 0.05, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''a class which can fetch 115 netdisk`s file though the given url or\n pickcode\n the request url examplehttp://uapi.115.com/?ct=upload_api&ac=\n get_pick_code_info&pickcode=aqbc8e20&version=1175\"'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L10_C4", "label": "api =", "type": "assigned_variable", "loc": [10, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "vector": [14, 1, 0.2283, 0.0435, 1, 0.05, 0.3333, 976, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "api", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " api = \"http://uapi.115.com/?ct=upload_api&ac=get_pick_code_info\\\n&pickcode=%s&version=1175\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "label": "__init__", "type": "function", "loc": [12, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "vector": [2, 1, 0.3804, 0.2609, 1, 0.05, 0.6667, 555, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "__init__", "arg_names": ["self", "code"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self,code):\n '''code is either URL of the file or pickcode'''\n self.__code = code\n f = urllib.urlopen(self.api %self.__code)\n data = f.read()\n self.__data = json.loads(data)\n self.state = self.__data['State']\n self.message = urllib.unquote(self.__data['Message'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L13_C8", "label": "expression", "type": "expression", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [8, 2, 0.2826, 0.0217, 2, 0.65, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''code is either URL of the file or pickcode'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L14_C8", "label": "self.__code =", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.3043, 0.0217, 2, 0.65, 0.1429, 370, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.__code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.__code = code"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L15_C8", "label": "f = urlopen()", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.3261, 0.0217, 2, 0.65, 0.2857, 899, 3, 1, 0, 0, 687, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "urlopen", "annotation": ""}, "snippet": " f = urllib.urlopen(self.api %self.__code)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L16_C8", "label": "data = read()", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.3478, 0.0217, 2, 0.65, 0.4286, 929, 3, 0, 0, 0, 453, 10, 1], "semantic": {"name": "data", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " data = f.read()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L17_C8", "label": "self.__data = loads()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.3696, 0.0217, 2, 0.65, 0.5714, 883, 3, 1, 0, 0, 88, 10, 1], "semantic": {"name": "self.__data", "arg_names": [], "import_names": [], "rhs_call_name": "loads", "annotation": ""}, "snippet": " self.__data = json.loads(data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L18_C8", "label": "self.state =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.3913, 0.0217, 2, 0.65, 0.7143, 765, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.state", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.state = self.__data['State']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L19_C8", "label": "self.message = unquote()", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [14, 2, 0.413, 0.0217, 2, 0.65, 0.8571, 709, 3, 1, 0, 0, 432, 10, 1], "semantic": {"name": "self.message", "arg_names": [], "import_names": [], "rhs_call_name": "unquote", "annotation": ""}, "snippet": " self.message = urllib.unquote(self.__data['Message'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "label": "if", "type": "if", "loc": [20, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "vector": [4, 2, 0.4674, 0.087, 2, 0.65, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.state == True:\n self.Sha1 = self.__data['Sha1']\n self.filename = urllib.unquote(self.__data['FileName'])\n self.urls = [url['Url'] for url in self.__data[\"DownloadUrl\"]]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L21_C12", "label": "self.Sha1 =", "type": "assigned_variable", "loc": [21, 21], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "vector": [14, 3, 0.4565, 0.0217, 3, 0.3, 0.0, 371, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.Sha1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.Sha1 = self.__data['Sha1']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L22_C12", "label": "self.filename = unquote()", "type": "assigned_variable", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "vector": [14, 3, 0.4783, 0.0217, 3, 0.3, 0.5, 942, 3, 1, 0, 0, 432, 10, 1], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "unquote", "annotation": ""}, "snippet": " self.filename = urllib.unquote(self.__data['FileName'])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L23_C12", "label": "self.urls =", "type": "assigned_variable", "loc": [23, 23], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "vector": [14, 3, 0.5, 0.0217, 3, 0.3, 1.0, 300, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.urls", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.urls = [url['Url'] for url in self.__data[\"DownloadUrl\"]]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4", "label": "json", "type": "function", "loc": [24, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "vector": [2, 1, 0.6304, 0.2391, 1, 0.05, 1.0, 463, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "json", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def json(self):\n '''return a json str of the file`s info'''\n if self.state == True:\n return json.dumps({'filename':self.filename,\n 'sha':self.Sha1,\n 'urls':self.urls,\n 'state':True\n })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L25_C8", "label": "expression", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4", "vector": [8, 2, 0.5435, 0.0217, 2, 0.98, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " '''return a json str of the file`s info'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8", "label": "if", "type": "if", "loc": [26, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4", "vector": [4, 2, 0.6522, 0.1957, 2, 0.98, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.state == True:\n return json.dumps({'filename':self.filename,\n 'sha':self.Sha1,\n 'urls':self.urls,\n 'state':True\n })\n else:\n return json.dumps({'state':False,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Return_L27_C12", "label": "return", "type": "return", "loc": [27, 31], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8", "vector": [13, 3, 0.6304, 0.1087, 3, 0.51, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return json.dumps({'filename':self.filename,\n 'sha':self.Sha1,\n 'urls':self.urls,\n 'state':True\n })"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Return_L33_C12", "label": "return", "type": "return", "loc": [33, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8", "vector": [13, 3, 0.7283, 0.0435, 3, 0.51, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return json.dumps({'state':False,\n 'message':self.message})"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "label": "if", "type": "if", "loc": [38, 42], "level": 0, "parent": null, "vector": [4, 0, 0.8696, 0.1087, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__==\"__main__\":\n a = netdisk(\"aqbc8e20\")\n print(a._netdisk__data)\n print(a.filename)\n print(a.json())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L39_C4", "label": "a = netdisk()", "type": "assigned_variable", "loc": [39, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "vector": [14, 1, 0.8478, 0.0217, 1, 0.54, 0.0, 475, 3, 1, 0, 0, 63, 10, 1], "semantic": {"name": "a", "arg_names": [], "import_names": [], "rhs_call_name": "netdisk", "annotation": ""}, "snippet": " a = netdisk(\"aqbc8e20\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L40_C4", "label": "print()", "type": "expression", "loc": [40, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "vector": [8, 1, 0.8696, 0.0217, 1, 0.54, 0.3333, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a._netdisk__data)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L41_C4", "label": "print()", "type": "expression", "loc": [41, 41], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "vector": [8, 1, 0.8913, 0.0217, 1, 0.54, 0.6667, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a.filename)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L42_C4", "label": "print()", "type": "expression", "loc": [42, 42], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "vector": [8, 1, 0.913, 0.0217, 1, 0.54, 1.0, 535, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(a.json())"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L12_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L21_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L22_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L20_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L23_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Return_L27_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L26_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Return_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Assign_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L41_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_348:If_L38_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_348:Expr_L42_C4"}]
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Zdenko Podobný # Author: Zdenko Podobný # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Simple python demo script of tesseract-ocr 3.02 c-api """ import os import sys import ctypes # Demo variables lang = "eng" filename = "../phototest.tif" libpath = "/usr/local/lib64/" libpath_w = "../vs2008/DLL_Release/" TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX') if not TESSDATA_PREFIX: TESSDATA_PREFIX = "../" if sys.platform == "win32": libname = libpath_w + "libtesseract302.dll" libname_alt = "libtesseract302.dll" os.environ["PATH"] += os.pathsep + libpath_w else: libname = libpath + "libtesseract.so.3.0.2" libname_alt = "libtesseract.so.3" try: tesseract = ctypes.cdll.LoadLibrary(libname) except: try: tesseract = ctypes.cdll.LoadLibrary(libname_alt) except WindowsError, err: print("Trying to load '%s'..." % libname) print("Trying to load '%s'..." % libname_alt) print(err) exit(1) tesseract.TessVersion.restype = ctypes.c_char_p tesseract_version = tesseract.TessVersion()[:4] # We need to check library version because libtesseract.so.3 is symlink # and can point to other version than 3.02 if float(tesseract_version) < 3.02: print("Found tesseract-ocr library version %s." % tesseract_version) print("C-API is present only in version 3.02!") exit(2) api = tesseract.TessBaseAPICreate() rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang); if (rc): tesseract.TessBaseAPIDelete(api) print("Could not initialize tesseract.\n") exit(3) text_out = tesseract.TessBaseAPIProcessPages(api, filename, None , 0); result_text = ctypes.string_at(text_out) print result_text
ajibawa-2023/Python-Code-Large/train/row_350
3
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_350:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.25, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_350:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.5, 0.25, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_350:Import_L3_C0", "label": "ctypes import ctypes", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.75, 0.25, 0, 0.66, 1.0, 182, 0, 1, 0, 0, 182, 0, 0], "semantic": {"name": "ctypes", "arg_names": [], "import_names": ["ctypes"], "rhs_call_name": "", "annotation": ""}, "snippet": "import ctypes"}]
[]
#!/usr/bin/python import sys import os import matplotlib import numpy import matplotlib matplotlib.use('AGG') import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from matplotlib.ticker import FormatStrFormatter def getArg(param, default=""): if (sys.argv.count(param) == 0): return default i = sys.argv.index(param) return sys.argv[i + 1] lastsecs = int(getArg("lastsecs", 240)) fname = sys.argv[1] try: tdata = numpy.loadtxt(fname, delimiter=" ") except: exit(0) if len(tdata.shape) < 2 or tdata.shape[0] < 2 or tdata.shape[1] < 2: print "Too small data - do not try to plot yet." exit(0) times = tdata[:, 0] values = tdata[:, 1] lastt = max(times) #majorFormatter = FormatStrFormatter('%.2f') fig = plt.figure(figsize=(3.5, 2.0)) plt.plot(times[times > lastt - lastsecs], values[times > lastt - lastsecs]) plt.gca().xaxis.set_major_locator( MaxNLocator(nbins = 7, prune = 'lower') ) plt.xlim([max(0, lastt - lastsecs), lastt]) #plt.ylim([lastt - lastsecs, lastt]) plt.gca().yaxis.set_major_locator( MaxNLocator(nbins = 7, prune = 'lower') ) #plt.gca().yaxis.set_major_formatter(majorFormatter) plt.savefig(fname.replace(".dat", ".png"), format="png", bbox_inches='tight')
ajibawa-2023/Python-Code-Large/train/row_351
31
52
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L3_C0", "label": "sys import sys", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0577, 0.0192, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L4_C0", "label": "os import os", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0769, 0.0192, 0, 0.66, 0.0455, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L5_C0", "label": "matplotlib import matplotlib", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0962, 0.0192, 0, 0.66, 0.0909, 75, 0, 1, 0, 0, 75, 0, 0], "semantic": {"name": "matplotlib", "arg_names": [], "import_names": ["matplotlib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import matplotlib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L7_C0", "label": "numpy import numpy", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.1346, 0.0192, 0, 0.66, 0.1364, 954, 0, 1, 0, 0, 954, 0, 0], "semantic": {"name": "numpy", "arg_names": [], "import_names": ["numpy"], "rhs_call_name": "", "annotation": ""}, "snippet": "import numpy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L8_C0", "label": "matplotlib import matplotlib", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.1538, 0.0192, 0, 0.66, 0.1818, 75, 0, 1, 0, 0, 75, 0, 0], "semantic": {"name": "matplotlib", "arg_names": [], "import_names": ["matplotlib"], "rhs_call_name": "", "annotation": ""}, "snippet": "import matplotlib"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L9_C0", "label": "use()", "type": "expression", "loc": [9, 9], "level": 0, "parent": null, "vector": [8, 0, 0.1731, 0.0192, 0, 0.66, 0.2273, 906, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "use", "arg_names": [], "import_names": [], "rhs_call_name": "use", "annotation": ""}, "snippet": "matplotlib.use('AGG')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Import_L10_C0", "label": "matplotlib.pyplot import plt", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.1923, 0.0192, 0, 0.66, 0.2727, 596, 0, 1, 0, 0, 596, 0, 0], "semantic": {"name": "matplotlib.pyplot", "arg_names": [], "import_names": ["plt"], "rhs_call_name": "", "annotation": ""}, "snippet": "import matplotlib.pyplot as plt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:ImportFrom_L11_C0", "label": "from matplotlib.ticker import MaxNLocator", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.2115, 0.0192, 0, 0.66, 0.3182, 855, 0, 1, 0, 0, 855, 0, 0], "semantic": {"name": "matplotlib.ticker", "arg_names": [], "import_names": ["MaxNLocator"], "rhs_call_name": "", "annotation": ""}, "snippet": "from matplotlib.ticker import MaxNLocator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:ImportFrom_L12_C0", "label": "from matplotlib.ticker import FormatStrFormatter", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.2308, 0.0192, 0, 0.66, 0.3636, 855, 0, 1, 0, 0, 855, 0, 0], "semantic": {"name": "matplotlib.ticker", "arg_names": [], "import_names": ["FormatStrFormatter"], "rhs_call_name": "", "annotation": ""}, "snippet": "from matplotlib.ticker import FormatStrFormatter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "label": "getArg", "type": "function", "loc": [15, 18], "level": 0, "parent": null, "vector": [2, 0, 0.3173, 0.0769, 0, 0.66, 0.4091, 891, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "getArg", "arg_names": ["param", "default"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def getArg(param, default=\"\"):\n if (sys.argv.count(param) == 0): return default\n i = sys.argv.index(param)\n return sys.argv[i + 1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:If_L16_C4", "label": "if", "type": "if", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "vector": [4, 1, 0.3077, 0.0192, 1, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (sys.argv.count(param) == 0): return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Return_L16_C37", "label": "return", "type": "return", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:If_L16_C4", "vector": [13, 2, 0.3077, 0.0192, 2, 0.72, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (sys.argv.count(param) == 0): return default"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L17_C4", "label": "i = index()", "type": "assigned_variable", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "vector": [14, 1, 0.3269, 0.0192, 1, 0.1, 0.5, 826, 3, 1, 0, 0, 780, 10, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "index", "annotation": ""}, "snippet": " i = sys.argv.index(param)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Return_L18_C4", "label": "return", "type": "return", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "vector": [13, 1, 0.3462, 0.0192, 1, 0.1, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return sys.argv[i + 1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L20_C0", "label": "lastsecs = int()", "type": "assigned_variable", "loc": [20, 20], "level": 0, "parent": null, "vector": [14, 0, 0.3846, 0.0192, 0, 0.66, 0.4545, 567, 3, 1, 0, 0, 901, 10, 2], "semantic": {"name": "lastsecs", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": "lastsecs = int(getArg(\"lastsecs\", 240))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L22_C0", "label": "fname =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.4231, 0.0192, 0, 0.66, 0.5, 190, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "fname", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "fname = sys.argv[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Try_L23_C0", "label": "try", "type": "try", "loc": [23, 26], "level": 0, "parent": null, "vector": [7, 0, 0.4712, 0.0769, 0, 0.66, 0.5455, 0, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "try:\n\ttdata = numpy.loadtxt(fname, delimiter=\" \")\nexcept:\n\texit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L24_C1", "label": "tdata = loadtxt()", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:Try_L23_C0", "vector": [14, 1, 0.4615, 0.0192, 1, 0.44, 0.0, 136, 3, 2, 0, 0, 670, 10, 1], "semantic": {"name": "tdata", "arg_names": [], "import_names": [], "rhs_call_name": "loadtxt", "annotation": ""}, "snippet": "\ttdata = numpy.loadtxt(fname, delimiter=\" \")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L26_C1", "label": "exit()", "type": "expression", "loc": [26, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:Try_L23_C0", "vector": [8, 1, 0.5, 0.0192, 1, 0.44, 0.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": "\texit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:If_L29_C0", "label": "if", "type": "if", "loc": [29, 31], "level": 0, "parent": null, "vector": [4, 0, 0.5769, 0.0577, 0, 0.66, 0.5909, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if len(tdata.shape) < 2 or tdata.shape[0] < 2 or tdata.shape[1] < 2:\n print(\"Too small data - do not try to plot yet.\")\n exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L30_C4", "label": "print()", "type": "expression", "loc": [30, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:If_L29_C0", "vector": [8, 1, 0.5769, 0.0192, 1, 0.55, 0.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Too small data - do not try to plot yet.\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L31_C4", "label": "exit()", "type": "expression", "loc": [31, 31], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_351:If_L29_C0", "vector": [8, 1, 0.5962, 0.0192, 1, 0.55, 1.0, 436, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "exit", "arg_names": [], "import_names": [], "rhs_call_name": "exit", "annotation": ""}, "snippet": " exit(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L33_C0", "label": "times =", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.6346, 0.0192, 0, 0.66, 0.6364, 342, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "times", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "times = tdata[:, 0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L34_C0", "label": "values =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.6538, 0.0192, 0, 0.66, 0.6818, 721, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "values", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "values = tdata[:, 1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L36_C0", "label": "lastt = max()", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.6923, 0.0192, 0, 0.66, 0.7273, 711, 3, 1, 0, 0, 442, 10, 1], "semantic": {"name": "lastt", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": "lastt = max(times)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L41_C0", "label": "fig = figure()", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.7885, 0.0192, 0, 0.66, 0.7727, 806, 3, 1, 0, 0, 789, 10, 1], "semantic": {"name": "fig", "arg_names": [], "import_names": [], "rhs_call_name": "figure", "annotation": ""}, "snippet": "fig = plt.figure(figsize=(3.5, 2.0))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L42_C0", "label": "plot()", "type": "expression", "loc": [42, 42], "level": 0, "parent": null, "vector": [8, 0, 0.8077, 0.0192, 0, 0.66, 0.8182, 929, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "plot", "arg_names": [], "import_names": [], "rhs_call_name": "plot", "annotation": ""}, "snippet": "plt.plot(times[times > lastt - lastsecs], values[times > lastt - lastsecs])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L43_C0", "label": "set_major_locator()", "type": "expression", "loc": [43, 43], "level": 0, "parent": null, "vector": [8, 0, 0.8269, 0.0192, 0, 0.66, 0.8636, 587, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "set_major_locator", "arg_names": [], "import_names": [], "rhs_call_name": "set_major_locator", "annotation": ""}, "snippet": "plt.gca().xaxis.set_major_locator( MaxNLocator(nbins = 7, prune = 'lower') )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L44_C0", "label": "xlim()", "type": "expression", "loc": [44, 44], "level": 0, "parent": null, "vector": [8, 0, 0.8462, 0.0192, 0, 0.66, 0.9091, 907, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "xlim", "arg_names": [], "import_names": [], "rhs_call_name": "xlim", "annotation": ""}, "snippet": "plt.xlim([max(0, lastt - lastsecs), lastt])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L47_C0", "label": "set_major_locator()", "type": "expression", "loc": [47, 47], "level": 0, "parent": null, "vector": [8, 0, 0.9038, 0.0192, 0, 0.66, 0.9545, 587, 3, 1, 0, 0, 0, 0, 3], "semantic": {"name": "set_major_locator", "arg_names": [], "import_names": [], "rhs_call_name": "set_major_locator", "annotation": ""}, "snippet": "plt.gca().yaxis.set_major_locator( MaxNLocator(nbins = 7, prune = 'lower') )"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L50_C0", "label": "savefig()", "type": "expression", "loc": [50, 50], "level": 0, "parent": null, "vector": [8, 0, 0.9615, 0.0192, 0, 0.66, 1.0, 677, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "savefig", "arg_names": [], "import_names": [], "rhs_call_name": "savefig", "annotation": ""}, "snippet": "plt.savefig(fname.replace(\".dat\", \".png\"), format=\"png\", bbox_inches='tight')"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:If_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:If_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Return_L16_C37"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:FunctionDef_L15_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Return_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Assign_L24_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:Try_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L26_C1"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_351:If_L29_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_351:Expr_L31_C4"}]
from optparse import OptionParser import random import heapq from operator import itemgetter from collections import defaultdict class Split: def __init__(self): self.train = {} self.test = {} self.counts = {} def add(self,user,trustees): if len(trustees) >= opts.min_trustees: self.counts[user] = len(trustees) random.shuffle(trustees) self.train[user] = trustees[:opts.given] self.test[user] = trustees[opts.given:] def map_ids(self): utrans = IndexTranslator() ttrans = IndexTranslator() train_idx = defaultdict(list) for user,trustees in self.train.iteritems(): uidx = utrans.idx(user) for t in trustees: train_idx[uidx].append(ttrans.idx(t)) test_idx = defaultdict(list) for user,trustees in self.test.iteritems(): uidx = utrans.idx(user,allow_update=False) assert(uidx is not None) # shouldn't have any unique users for t in trustees: tidx = ttrans.idx(t,allow_update=False) if tidx is not None: test_idx[uidx].append(tidx) self.train = train_idx self.test = test_idx class IndexTranslator: def __init__(self): self.index = {} def idx(self,key,allow_update=True): if allow_update and key not in self.index: self.index[key] = len(self.index)+1 return self.index.get(key,None) class MMWriter: def __init__(self,filepath): self.filepath = filepath def write(self,mat): f = open(self.filepath,'w') self.write_header(f,mat) self.write_data(f,mat) def write_header(self,f,mat): tot = 0 maxid = 0 for user,trustees in mat.iteritems(): tot += len(trustees) maxid = max(maxid,max(trustees)) print >>f,'%%MatrixMarket matrix coordinate integer general' print >>f,'{0} {1} {2}'.format(max(mat.keys()),maxid,tot) def write_data(self,f,mat): for user,trustees in mat.iteritems(): for t in trustees: print >>f,user,t,1 parser = OptionParser() parser.add_option('-i','--infile',dest='infile',help='input dataset') parser.add_option('-o','--outpath',dest='outpath',help='root path for output datasets [default=infile]') parser.add_option('-m','--min_trustees',dest='min_trustees',type='int',help='omit users with fewer trustees') parser.add_option('-g','--given',dest='given',type='int',help='retain this many trustees in training set') parser.add_option('-d','--discard_top',dest='discard_top',type='int',default=3,help='discard this many overall top popular users [default=%default]') (opts,args) = parser.parse_args() if not opts.min_trustees or not opts.given or not opts.infile: parser.print_help() raise SystemExit if not opts.outpath: opts.outpath = opts.infile overall = defaultdict(list) counts = defaultdict(int) f = open(opts.infile) for line in f: if not line.startswith('%'): break for line in f: user,trustee,score = map(int,line.strip().split()) if score > 0: counts[trustee] += 1 top = heapq.nlargest(opts.discard_top,counts.iteritems(),key=itemgetter(1)) for user,_ in top: counts[user] = 0 # so we don't include them f = open(opts.infile) for line in f: if not line.startswith('%'): break for line in f: user,trustee,score = map(int,line.strip().split()) if score > 0 and counts[trustee] >= opts.min_trustees: overall[user].append(trustee) split = Split() for user,trustees in overall.iteritems(): split.add(user,trustees) split.map_ids() w = MMWriter(opts.outpath+'_train') w.write(split.train) w = MMWriter(opts.outpath+'_test') w.write(split.test)
ajibawa-2023/Python-Code-Large/train/row_352
95
120
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_352:ImportFrom_L1_C0", "label": "from optparse import OptionParser", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0083, 0, 0.66, 0.0, 323, 0, 1, 0, 0, 323, 0, 0], "semantic": {"name": "optparse", "arg_names": [], "import_names": ["OptionParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from optparse import OptionParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Import_L2_C0", "label": "random import random", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0167, 0.0083, 0, 0.66, 0.0303, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs_call_name": "", "annotation": ""}, "snippet": "import random"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Import_L3_C0", "label": "heapq import heapq", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.025, 0.0083, 0, 0.66, 0.0606, 251, 0, 1, 0, 0, 251, 0, 0], "semantic": {"name": "heapq", "arg_names": [], "import_names": ["heapq"], "rhs_call_name": "", "annotation": ""}, "snippet": "import heapq"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:ImportFrom_L4_C0", "label": "from operator import itemgetter", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0333, 0.0083, 0, 0.66, 0.0909, 616, 0, 1, 0, 0, 616, 0, 0], "semantic": {"name": "operator", "arg_names": [], "import_names": ["itemgetter"], "rhs_call_name": "", "annotation": ""}, "snippet": "from operator import itemgetter"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:ImportFrom_L5_C0", "label": "from collections import defaultdict", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0417, 0.0083, 0, 0.66, 0.1212, 193, 0, 1, 0, 0, 193, 0, 0], "semantic": {"name": "collections", "arg_names": [], "import_names": ["defaultdict"], "rhs_call_name": "", "annotation": ""}, "snippet": "from collections import defaultdict"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "label": "Split", "type": "class", "loc": [7, 38], "level": 0, "parent": null, "vector": [3, 0, 0.1875, 0.2667, 0, 0.66, 0.1515, 551, 0, 3, 0, 0, 0, 0, 15], "semantic": {"name": "Split", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Split:\n\n def __init__(self):\n self.train = {}\n self.test = {}\n self.counts = {}\n\n def add(self,user,trustees):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "label": "__init__", "type": "function", "loc": [9, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "vector": [2, 1, 0.0875, 0.0333, 1, 0.0, 0.0, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.train = {}\n self.test = {}\n self.counts = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L10_C8", "label": "self.train =", "type": "assigned_variable", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "vector": [14, 2, 0.0833, 0.0083, 2, 0.59, 0.0, 493, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.train", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.train = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L11_C8", "label": "self.test =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "vector": [14, 2, 0.0917, 0.0083, 2, 0.59, 0.5, 272, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.test = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L12_C8", "label": "self.counts =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "vector": [14, 2, 0.1, 0.0083, 2, 0.59, 1.0, 247, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.counts", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.counts = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L14_C4", "label": "add", "type": "function", "loc": [14, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "vector": [2, 1, 0.1375, 0.05, 1, 0.0, 0.5, 241, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "add", "arg_names": ["self", "user", "trustees"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add(self,user,trustees):\n if len(trustees) >= opts.min_trustees:\n self.counts[user] = len(trustees)\n random.shuffle(trustees)\n self.train[user] = trustees[:opts.given]\n self.test[user] = trustees[opts.given:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "label": "if", "type": "if", "loc": [15, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L14_C4", "vector": [4, 2, 0.1417, 0.0417, 2, 0.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(trustees) >= opts.min_trustees:\n self.counts[user] = len(trustees)\n random.shuffle(trustees)\n self.train[user] = trustees[:opts.given]\n self.test[user] = trustees[opts.given:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L16_C12", "label": " = len()", "type": "assigned_variable", "loc": [16, 16], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "vector": [14, 3, 0.1333, 0.0083, 3, 0.94, 0.0, 0, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " self.counts[user] = len(trustees)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L17_C12", "label": "shuffle()", "type": "expression", "loc": [17, 17], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "vector": [8, 3, 0.1417, 0.0083, 3, 0.94, 0.3333, 903, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "shuffle", "arg_names": [], "import_names": [], "rhs_call_name": "shuffle", "annotation": ""}, "snippet": " random.shuffle(trustees)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L18_C12", "label": "assign", "type": "assigned_variable", "loc": [18, 18], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "vector": [14, 3, 0.15, 0.0083, 3, 0.94, 0.6667, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.train[user] = trustees[:opts.given]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L19_C12", "label": "assign", "type": "assigned_variable", "loc": [19, 19], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "vector": [14, 3, 0.1583, 0.0083, 3, 0.94, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.test[user] = trustees[opts.given:]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "label": "map_ids", "type": "function", "loc": [21, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "vector": [2, 1, 0.2458, 0.15, 1, 0.0, 1.0, 388, 0, 1, 0, 0, 0, 0, 12], "semantic": {"name": "map_ids", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def map_ids(self):\n utrans = IndexTranslator()\n ttrans = IndexTranslator()\n train_idx = defaultdict(list)\n for user,trustees in self.train.iteritems():\n uidx = utrans.idx(user)\n for t in trustees:\n train_idx[uidx].append(ttrans.idx(t))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L22_C8", "label": "utrans = IndexTranslator()", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.1833, 0.0083, 2, 0.76, 0.0, 272, 3, 0, 0, 0, 774, 10, 1], "semantic": {"name": "utrans", "arg_names": [], "import_names": [], "rhs_call_name": "IndexTranslator", "annotation": ""}, "snippet": " utrans = IndexTranslator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L23_C8", "label": "ttrans = IndexTranslator()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.1917, 0.0083, 2, 0.76, 0.1429, 492, 3, 0, 0, 0, 774, 10, 1], "semantic": {"name": "ttrans", "arg_names": [], "import_names": [], "rhs_call_name": "IndexTranslator", "annotation": ""}, "snippet": " ttrans = IndexTranslator()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L24_C8", "label": "train_idx = defaultdict()", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.2, 0.0083, 2, 0.76, 0.2857, 377, 3, 1, 0, 0, 626, 10, 1], "semantic": {"name": "train_idx", "arg_names": [], "import_names": [], "rhs_call_name": "defaultdict", "annotation": ""}, "snippet": " train_idx = defaultdict(list)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8", "label": "for user, trustees", "type": "for", "loc": [25, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [6, 2, 0.2208, 0.0333, 2, 0.76, 0.4286, 56, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "user, trustees", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for user,trustees in self.train.iteritems():\n uidx = utrans.idx(user)\n for t in trustees:\n train_idx[uidx].append(ttrans.idx(t))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L26_C12", "label": "uidx = idx()", "type": "assigned_variable", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8", "vector": [14, 3, 0.2167, 0.0083, 3, 0.79, 0.0, 787, 3, 1, 0, 0, 187, 10, 1], "semantic": {"name": "uidx", "arg_names": [], "import_names": [], "rhs_call_name": "idx", "annotation": ""}, "snippet": " uidx = utrans.idx(user)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L27_C12", "label": "for t", "type": "for", "loc": [27, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8", "vector": [6, 3, 0.2292, 0.0167, 3, 0.79, 1.0, 15, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for t in trustees:\n train_idx[uidx].append(ttrans.idx(t))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L28_C16", "label": "append()", "type": "expression", "loc": [28, 28], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L27_C12", "vector": [8, 4, 0.2333, 0.0083, 4, 0.66, 0.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " train_idx[uidx].append(ttrans.idx(t))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L29_C8", "label": "test_idx = defaultdict()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.2417, 0.0083, 2, 0.76, 0.5714, 958, 3, 1, 0, 0, 626, 10, 1], "semantic": {"name": "test_idx", "arg_names": [], "import_names": [], "rhs_call_name": "defaultdict", "annotation": ""}, "snippet": " test_idx = defaultdict(list)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8", "label": "for user, trustees", "type": "for", "loc": [30, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [6, 2, 0.275, 0.0583, 2, 0.76, 0.7143, 56, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "user, trustees", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for user,trustees in self.test.iteritems():\n uidx = utrans.idx(user,allow_update=False)\n assert(uidx is not None) # shouldn't have any unique users\n for t in trustees:\n tidx = ttrans.idx(t,allow_update=False)\n if tidx is not None:\n test_idx[uidx].append(tidx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L31_C12", "label": "uidx = idx()", "type": "assigned_variable", "loc": [31, 31], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8", "vector": [14, 3, 0.2583, 0.0083, 3, 0.68, 0.0, 787, 3, 2, 0, 0, 187, 10, 1], "semantic": {"name": "uidx", "arg_names": [], "import_names": [], "rhs_call_name": "idx", "annotation": ""}, "snippet": " uidx = utrans.idx(user,allow_update=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12", "label": "for t", "type": "for", "loc": [33, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8", "vector": [6, 3, 0.2875, 0.0333, 3, 0.68, 1.0, 15, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for t in trustees:\n tidx = ttrans.idx(t,allow_update=False)\n if tidx is not None:\n test_idx[uidx].append(tidx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L34_C16", "label": "tidx = idx()", "type": "assigned_variable", "loc": [34, 34], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12", "vector": [14, 4, 0.2833, 0.0083, 4, 0.66, 0.0, 985, 3, 2, 0, 0, 187, 10, 1], "semantic": {"name": "tidx", "arg_names": [], "import_names": [], "rhs_call_name": "idx", "annotation": ""}, "snippet": " tidx = ttrans.idx(t,allow_update=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L35_C16", "label": "if", "type": "if", "loc": [35, 36], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12", "vector": [4, 4, 0.2958, 0.0167, 4, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if tidx is not None:\n test_idx[uidx].append(tidx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L36_C20", "label": "append()", "type": "expression", "loc": [36, 36], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L35_C16", "vector": [8, 5, 0.3, 0.0083, 5, 0.22, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " test_idx[uidx].append(tidx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L37_C8", "label": "self.train =", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.3083, 0.0083, 2, 0.76, 0.8571, 493, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.train", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.train = train_idx"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L38_C8", "label": "self.test =", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "vector": [14, 2, 0.3167, 0.0083, 2, 0.76, 1.0, 272, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.test", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.test = test_idx"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L40_C0", "label": "IndexTranslator", "type": "class", "loc": [40, 48], "level": 0, "parent": null, "vector": [3, 0, 0.3667, 0.075, 0, 0.66, 0.1818, 774, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "IndexTranslator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class IndexTranslator:\n\n def __init__(self):\n self.index = {}\n\n def idx(self,key,allow_update=True):\n if allow_update and key not in self.index:\n self.index[key] = len(self.index)+1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L42_C4", "label": "__init__", "type": "function", "loc": [42, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L40_C0", "vector": [2, 1, 0.3542, 0.0167, 1, 0.77, 0.0, 555, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.index = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L43_C8", "label": "self.index =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L42_C4", "vector": [14, 2, 0.3583, 0.0083, 2, 0.55, 0.0, 777, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4", "label": "idx", "type": "function", "loc": [45, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L40_C0", "vector": [2, 1, 0.3875, 0.0333, 1, 0.77, 1.0, 187, 0, 3, 1, 0, 0, 0, 2], "semantic": {"name": "idx", "arg_names": ["self", "key", "allow_update"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def idx(self,key,allow_update=True):\n if allow_update and key not in self.index:\n self.index[key] = len(self.index)+1\n return self.index.get(key,None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L46_C8", "label": "if", "type": "if", "loc": [46, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4", "vector": [4, 2, 0.3875, 0.0167, 2, 0.26, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if allow_update and key not in self.index:\n self.index[key] = len(self.index)+1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L47_C12", "label": "assign", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L46_C8", "vector": [14, 3, 0.3917, 0.0083, 3, 0.3, 0.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index[key] = len(self.index)+1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Return_L48_C8", "label": "return", "type": "return", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4", "vector": [13, 2, 0.4, 0.0083, 2, 0.26, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.index.get(key,None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "label": "MMWriter", "type": "class", "loc": [50, 72], "level": 0, "parent": null, "vector": [3, 0, 0.5083, 0.1917, 0, 0.66, 0.2121, 371, 0, 4, 0, 0, 0, 0, 11], "semantic": {"name": "MMWriter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MMWriter:\n\n def __init__(self,filepath):\n self.filepath = filepath\n\n def write(self,mat):\n f = open(self.filepath,'w')\n self.write_header(f,mat)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L52_C4", "label": "__init__", "type": "function", "loc": [52, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "vector": [2, 1, 0.4375, 0.0167, 1, 0.66, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "filepath"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self,filepath):\n self.filepath = filepath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L53_C8", "label": "self.filepath =", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L52_C4", "vector": [14, 2, 0.4417, 0.0083, 2, 0.39, 0.0, 65, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filepath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filepath = filepath"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "label": "write", "type": "function", "loc": [55, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "vector": [2, 1, 0.4708, 0.0333, 1, 0.66, 0.3333, 837, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "write", "arg_names": ["self", "mat"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def write(self,mat):\n f = open(self.filepath,'w')\n self.write_header(f,mat)\n self.write_data(f,mat)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L56_C8", "label": "f = open()", "type": "assigned_variable", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "vector": [14, 2, 0.4667, 0.0083, 2, 0.58, 0.0, 899, 3, 2, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": " f = open(self.filepath,'w')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L57_C8", "label": "write_header()", "type": "expression", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "vector": [8, 2, 0.475, 0.0083, 2, 0.58, 0.5, 152, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "write_header", "arg_names": [], "import_names": [], "rhs_call_name": "write_header", "annotation": ""}, "snippet": " self.write_header(f,mat)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L58_C8", "label": "write_data()", "type": "expression", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "vector": [8, 2, 0.4833, 0.0083, 2, 0.58, 1.0, 921, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "write_data", "arg_names": [], "import_names": [], "rhs_call_name": "write_data", "annotation": ""}, "snippet": " self.write_data(f,mat)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "label": "write_header", "type": "function", "loc": [60, 67], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "vector": [2, 1, 0.5292, 0.0667, 1, 0.66, 0.6667, 152, 0, 3, 0, 0, 0, 0, 7], "semantic": {"name": "write_header", "arg_names": ["self", "f", "mat"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def write_header(self,f,mat):\n tot = 0\n maxid = 0\n for user,trustees in mat.iteritems():\n tot += len(trustees)\n maxid = max(maxid,max(trustees))\n print >>f,'%%MatrixMarket matrix coordinate integer general'\n print >>f,'{0} {1} {2}'.format(max(mat.keys()),maxid,tot)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L61_C8", "label": "tot =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "vector": [14, 2, 0.5083, 0.0083, 2, 0.66, 0.0, 900, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "tot", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tot = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L62_C8", "label": "maxid =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "vector": [14, 2, 0.5167, 0.0083, 2, 0.66, 0.25, 364, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "maxid", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " maxid = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L63_C8", "label": "for user, trustees", "type": "for", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "vector": [6, 2, 0.5333, 0.025, 2, 0.66, 0.5, 56, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "user, trustees", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for user,trustees in mat.iteritems():\n tot += len(trustees)\n maxid = max(maxid,max(trustees))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L65_C12", "label": "maxid = max()", "type": "assigned_variable", "loc": [65, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L63_C8", "vector": [14, 3, 0.5417, 0.0083, 3, 0.83, 0.0, 364, 3, 2, 0, 0, 442, 10, 2], "semantic": {"name": "maxid", "arg_names": [], "import_names": [], "rhs_call_name": "max", "annotation": ""}, "snippet": " maxid = max(maxid,max(trustees))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L66_C8", "label": "expression", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "vector": [8, 2, 0.55, 0.0083, 2, 0.66, 0.75, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " print >>f,'%%MatrixMarket matrix coordinate integer general'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L67_C8", "label": "expression", "type": "expression", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "vector": [8, 2, 0.5583, 0.0083, 2, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " print >>f,'{0} {1} {2}'.format(max(mat.keys()),maxid,tot)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L69_C4", "label": "write_data", "type": "function", "loc": [69, 72], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "vector": [2, 1, 0.5875, 0.0333, 1, 0.66, 1.0, 921, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "write_data", "arg_names": ["self", "f", "mat"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def write_data(self,f,mat):\n for user,trustees in mat.iteritems():\n for t in trustees:\n print >>f,user,t,1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L70_C8", "label": "for user, trustees", "type": "for", "loc": [70, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L69_C4", "vector": [6, 2, 0.5917, 0.025, 2, 0.74, 0.0, 56, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "user, trustees", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for user,trustees in mat.iteritems():\n for t in trustees:\n print >>f,user,t,1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L71_C12", "label": "for t", "type": "for", "loc": [71, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L70_C8", "vector": [6, 3, 0.5958, 0.0167, 3, 0.06, 0.0, 15, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for t in trustees:\n print >>f,user,t,1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L72_C16", "label": "expression", "type": "expression", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L71_C12", "vector": [8, 4, 0.6, 0.0083, 4, 0.14, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " print >>f,user,t,1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L74_C0", "label": "parser = OptionParser()", "type": "assigned_variable", "loc": [74, 74], "level": 0, "parent": null, "vector": [14, 0, 0.6167, 0.0083, 0, 0.66, 0.2424, 968, 3, 0, 0, 0, 894, 10, 1], "semantic": {"name": "parser", "arg_names": [], "import_names": [], "rhs_call_name": "OptionParser", "annotation": ""}, "snippet": "parser = OptionParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L75_C0", "label": "add_option()", "type": "expression", "loc": [75, 75], "level": 0, "parent": null, "vector": [8, 0, 0.625, 0.0083, 0, 0.66, 0.2727, 176, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option('-i','--infile',dest='infile',help='input dataset')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L76_C0", "label": "add_option()", "type": "expression", "loc": [76, 76], "level": 0, "parent": null, "vector": [8, 0, 0.6333, 0.0083, 0, 0.66, 0.303, 176, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option('-o','--outpath',dest='outpath',help='root path for output datasets [default=infile]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L77_C0", "label": "add_option()", "type": "expression", "loc": [77, 77], "level": 0, "parent": null, "vector": [8, 0, 0.6417, 0.0083, 0, 0.66, 0.3333, 176, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option('-m','--min_trustees',dest='min_trustees',type='int',help='omit users with fewer trustees')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L78_C0", "label": "add_option()", "type": "expression", "loc": [78, 78], "level": 0, "parent": null, "vector": [8, 0, 0.65, 0.0083, 0, 0.66, 0.3636, 176, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option('-g','--given',dest='given',type='int',help='retain this many trustees in training set')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L79_C0", "label": "add_option()", "type": "expression", "loc": [79, 79], "level": 0, "parent": null, "vector": [8, 0, 0.6583, 0.0083, 0, 0.66, 0.3939, 176, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "add_option", "arg_names": [], "import_names": [], "rhs_call_name": "add_option", "annotation": ""}, "snippet": "parser.add_option('-d','--discard_top',dest='discard_top',type='int',default=3,help='discard this many overall top popular users [default=%default]')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L81_C0", "label": "opts, args = parse_args()", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.675, 0.0083, 0, 0.66, 0.4242, 616, 3, 0, 0, 0, 187, 10, 1], "semantic": {"name": "opts, args", "arg_names": [], "import_names": [], "rhs_call_name": "parse_args", "annotation": ""}, "snippet": "(opts,args) = parser.parse_args()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L82_C0", "label": "if", "type": "if", "loc": [82, 84], "level": 0, "parent": null, "vector": [4, 0, 0.6917, 0.025, 0, 0.66, 0.4545, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not opts.min_trustees or not opts.given or not opts.infile:\n parser.print_help()\n raise SystemExit"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L83_C4", "label": "print_help()", "type": "expression", "loc": [83, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L82_C0", "vector": [8, 1, 0.6917, 0.0083, 1, 0.07, 0.0, 931, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "print_help", "arg_names": [], "import_names": [], "rhs_call_name": "print_help", "annotation": ""}, "snippet": " parser.print_help()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L86_C0", "label": "if", "type": "if", "loc": [86, 87], "level": 0, "parent": null, "vector": [4, 0, 0.7208, 0.0167, 0, 0.66, 0.4848, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if not opts.outpath:\n opts.outpath = opts.infile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L87_C4", "label": "opts.outpath =", "type": "assigned_variable", "loc": [87, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L86_C0", "vector": [14, 1, 0.725, 0.0083, 1, 0.77, 0.0, 253, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "opts.outpath", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " opts.outpath = opts.infile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L89_C0", "label": "overall = defaultdict()", "type": "assigned_variable", "loc": [89, 89], "level": 0, "parent": null, "vector": [14, 0, 0.7417, 0.0083, 0, 0.66, 0.5152, 531, 3, 1, 0, 0, 626, 10, 1], "semantic": {"name": "overall", "arg_names": [], "import_names": [], "rhs_call_name": "defaultdict", "annotation": ""}, "snippet": "overall = defaultdict(list)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L90_C0", "label": "counts = defaultdict()", "type": "assigned_variable", "loc": [90, 90], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.0083, 0, 0.66, 0.5455, 560, 3, 1, 0, 0, 626, 10, 1], "semantic": {"name": "counts", "arg_names": [], "import_names": [], "rhs_call_name": "defaultdict", "annotation": ""}, "snippet": "counts = defaultdict(int)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L91_C0", "label": "f = open()", "type": "assigned_variable", "loc": [91, 91], "level": 0, "parent": null, "vector": [14, 0, 0.7583, 0.0083, 0, 0.66, 0.5758, 899, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "f = open(opts.infile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L92_C0", "label": "for line", "type": "for", "loc": [92, 94], "level": 0, "parent": null, "vector": [6, 0, 0.775, 0.025, 0, 0.66, 0.6061, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in f:\n if not line.startswith('%'):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L93_C4", "label": "if", "type": "if", "loc": [93, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L92_C0", "vector": [4, 1, 0.7792, 0.0167, 1, 0.93, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not line.startswith('%'):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L95_C0", "label": "for line", "type": "for", "loc": [95, 98], "level": 0, "parent": null, "vector": [6, 0, 0.8042, 0.0333, 0, 0.66, 0.6364, 373, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in f:\n user,trustee,score = map(int,line.strip().split())\n if score > 0:\n counts[trustee] += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L96_C4", "label": "user, trustee, score = map()", "type": "assigned_variable", "loc": [96, 96], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L95_C0", "vector": [14, 1, 0.8, 0.0083, 1, 0.04, 0.0, 448, 3, 2, 0, 0, 53, 10, 3], "semantic": {"name": "user, trustee, score", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " user,trustee,score = map(int,line.strip().split())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L97_C4", "label": "if", "type": "if", "loc": [97, 98], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L95_C0", "vector": [4, 1, 0.8125, 0.0167, 1, 0.04, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if score > 0:\n counts[trustee] += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L99_C0", "label": "top = nlargest()", "type": "assigned_variable", "loc": [99, 99], "level": 0, "parent": null, "vector": [14, 0, 0.825, 0.0083, 0, 0.66, 0.6667, 208, 3, 3, 0, 0, 182, 10, 3], "semantic": {"name": "top", "arg_names": [], "import_names": [], "rhs_call_name": "nlargest", "annotation": ""}, "snippet": "top = heapq.nlargest(opts.discard_top,counts.iteritems(),key=itemgetter(1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L100_C0", "label": "for user, _", "type": "for", "loc": [100, 101], "level": 0, "parent": null, "vector": [6, 0, 0.8375, 0.0167, 0, 0.66, 0.697, 882, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "user, _", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for user,_ in top:\n counts[user] = 0 # so we don't include them"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L101_C4", "label": "assign", "type": "assigned_variable", "loc": [101, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L100_C0", "vector": [14, 1, 0.8417, 0.0083, 1, 0.25, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " counts[user] = 0 # so we don't include them"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L103_C0", "label": "f = open()", "type": "assigned_variable", "loc": [103, 103], "level": 0, "parent": null, "vector": [14, 0, 0.8583, 0.0083, 0, 0.66, 0.7273, 899, 3, 1, 0, 0, 693, 10, 1], "semantic": {"name": "f", "arg_names": [], "import_names": [], "rhs_call_name": "open", "annotation": ""}, "snippet": "f = open(opts.infile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L104_C0", "label": "for line", "type": "for", "loc": [104, 106], "level": 0, "parent": null, "vector": [6, 0, 0.875, 0.025, 0, 0.66, 0.7576, 373, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in f:\n if not line.startswith('%'):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L105_C4", "label": "if", "type": "if", "loc": [105, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L104_C0", "vector": [4, 1, 0.8792, 0.0167, 1, 0.88, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not line.startswith('%'):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L107_C0", "label": "for line", "type": "for", "loc": [107, 110], "level": 0, "parent": null, "vector": [6, 0, 0.9042, 0.0333, 0, 0.66, 0.7879, 373, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for line in f:\n user,trustee,score = map(int,line.strip().split())\n if score > 0 and counts[trustee] >= opts.min_trustees:\n overall[user].append(trustee)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L108_C4", "label": "user, trustee, score = map()", "type": "assigned_variable", "loc": [108, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L107_C0", "vector": [14, 1, 0.9, 0.0083, 1, 0.91, 0.0, 448, 3, 2, 0, 0, 53, 10, 3], "semantic": {"name": "user, trustee, score", "arg_names": [], "import_names": [], "rhs_call_name": "map", "annotation": ""}, "snippet": " user,trustee,score = map(int,line.strip().split())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:If_L109_C4", "label": "if", "type": "if", "loc": [109, 110], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L107_C0", "vector": [4, 1, 0.9125, 0.0167, 1, 0.91, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if score > 0 and counts[trustee] >= opts.min_trustees:\n overall[user].append(trustee)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L110_C8", "label": "append()", "type": "expression", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:If_L109_C4", "vector": [8, 2, 0.9167, 0.0083, 2, 0.82, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " overall[user].append(trustee)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L112_C0", "label": "split = Split()", "type": "assigned_variable", "loc": [112, 112], "level": 0, "parent": null, "vector": [14, 0, 0.9333, 0.0083, 0, 0.66, 0.8182, 908, 3, 0, 0, 0, 551, 10, 1], "semantic": {"name": "split", "arg_names": [], "import_names": [], "rhs_call_name": "Split", "annotation": ""}, "snippet": "split = Split()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:For_L113_C0", "label": "for user, trustees", "type": "for", "loc": [113, 114], "level": 0, "parent": null, "vector": [6, 0, 0.9458, 0.0167, 0, 0.66, 0.8485, 56, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "user, trustees", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "for user,trustees in overall.iteritems():\n split.add(user,trustees)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L114_C4", "label": "add()", "type": "expression", "loc": [114, 114], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_352:For_L113_C0", "vector": [8, 1, 0.95, 0.0083, 1, 0.99, 0.0, 241, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add", "arg_names": [], "import_names": [], "rhs_call_name": "add", "annotation": ""}, "snippet": " split.add(user,trustees)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L115_C0", "label": "map_ids()", "type": "expression", "loc": [115, 115], "level": 0, "parent": null, "vector": [8, 0, 0.9583, 0.0083, 0, 0.66, 0.8788, 388, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "map_ids", "arg_names": [], "import_names": [], "rhs_call_name": "map_ids", "annotation": ""}, "snippet": "split.map_ids()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L117_C0", "label": "w = MMWriter()", "type": "assigned_variable", "loc": [117, 117], "level": 0, "parent": null, "vector": [14, 0, 0.975, 0.0083, 0, 0.66, 0.9091, 549, 3, 1, 0, 0, 371, 10, 1], "semantic": {"name": "w", "arg_names": [], "import_names": [], "rhs_call_name": "MMWriter", "annotation": ""}, "snippet": "w = MMWriter(opts.outpath+'_train')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L118_C0", "label": "write()", "type": "expression", "loc": [118, 118], "level": 0, "parent": null, "vector": [8, 0, 0.9833, 0.0083, 0, 0.66, 0.9394, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "w.write(split.train)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L119_C0", "label": "w = MMWriter()", "type": "assigned_variable", "loc": [119, 119], "level": 0, "parent": null, "vector": [14, 0, 0.9917, 0.0083, 0, 0.66, 0.9697, 549, 3, 1, 0, 0, 371, 10, 1], "semantic": {"name": "w", "arg_names": [], "import_names": [], "rhs_call_name": "MMWriter", "annotation": ""}, "snippet": "w = MMWriter(opts.outpath+'_test')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L120_C0", "label": "write()", "type": "expression", "loc": [120, 120], "level": 0, "parent": null, "vector": [8, 0, 1.0, 0.0083, 0, 0.66, 1.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": "w.write(split.test)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L16_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L17_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L18_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L15_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L19_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L26_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L25_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L27_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L27_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L28_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L31_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L30_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L34_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L33_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L35_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L35_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L36_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L21_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L40_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L46_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L45_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Return_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L55_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L65_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:ClassDef_L50_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L69_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:FunctionDef_L69_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_352:For_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L72_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L82_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L83_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L92_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L93_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L95_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L100_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L104_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Assign_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L107_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:If_L109_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:If_L109_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_352:For_L113_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_352:Expr_L114_C4"}]
# -*- coding:utf-8 -*- import socket import functools import tornado.ioloop import busmanager import config _socket = None _ioloop = tornado.ioloop.IOLoop.instance() def start(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.setblocking(0) sock.bind(("127.0.0.1", config.UDP_PORT)) global _socket _socket = sock _ioloop.add_handler(_socket.fileno(), _read_callback, _ioloop.READ) def _read_callback(fd, events): b, _ = _socket.recvfrom(1024) busmanager.handle_bus_message(b) if __name__=="__main__": start() tornado.ioloop.IOLoop.instance().start()
ajibawa-2023/Python-Code-Large/train/row_354
20
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_354:Import_L3_C0", "label": "socket import socket", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0938, 0.0312, 0, 0.66, 0.0, 687, 0, 1, 0, 0, 687, 0, 0], "semantic": {"name": "socket", "arg_names": [], "import_names": ["socket"], "rhs_call_name": "", "annotation": ""}, "snippet": "import socket"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Import_L4_C0", "label": "functools import functools", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.125, 0.0312, 0, 0.66, 0.1111, 711, 0, 1, 0, 0, 711, 0, 0], "semantic": {"name": "functools", "arg_names": [], "import_names": ["functools"], "rhs_call_name": "", "annotation": ""}, "snippet": "import functools"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Import_L6_C0", "label": "tornado.ioloop import tornado.ioloop", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.1875, 0.0312, 0, 0.66, 0.2222, 730, 0, 1, 0, 0, 730, 0, 0], "semantic": {"name": "tornado.ioloop", "arg_names": [], "import_names": ["tornado.ioloop"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tornado.ioloop"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Import_L8_C0", "label": "busmanager import busmanager", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.25, 0.0312, 0, 0.66, 0.3333, 960, 0, 1, 0, 0, 960, 0, 0], "semantic": {"name": "busmanager", "arg_names": [], "import_names": ["busmanager"], "rhs_call_name": "", "annotation": ""}, "snippet": "import busmanager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Import_L9_C0", "label": "config import config", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.2812, 0.0312, 0, 0.66, 0.4444, 308, 0, 1, 0, 0, 308, 0, 0], "semantic": {"name": "config", "arg_names": [], "import_names": ["config"], "rhs_call_name": "", "annotation": ""}, "snippet": "import config"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L11_C0", "label": "_socket =", "type": "assigned_variable", "loc": [11, 11], "level": 0, "parent": null, "vector": [14, 0, 0.3438, 0.0312, 0, 0.66, 0.5556, 703, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "_socket", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "_socket = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L12_C0", "label": "_ioloop = instance()", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.375, 0.0312, 0, 0.66, 0.6667, 33, 3, 0, 0, 0, 255, 10, 1], "semantic": {"name": "_ioloop", "arg_names": [], "import_names": [], "rhs_call_name": "instance", "annotation": ""}, "snippet": "_ioloop = tornado.ioloop.IOLoop.instance()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "label": "start", "type": "function", "loc": [14, 21], "level": 0, "parent": null, "vector": [2, 0, 0.5469, 0.25, 0, 0.66, 0.7778, 511, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def start():\n sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\n sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n sock.setblocking(0)\n sock.bind((\"127.0.0.1\", config.UDP_PORT))\n global _socket\n _socket = sock\n _ioloop.add_handler(_socket.fileno(), _read_callback, _ioloop.READ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L15_C4", "label": "sock = socket()", "type": "assigned_variable", "loc": [15, 15], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [14, 1, 0.4688, 0.0312, 1, 0.33, 0.0, 263, 3, 2, 0, 0, 687, 10, 1], "semantic": {"name": "sock", "arg_names": [], "import_names": [], "rhs_call_name": "socket", "annotation": ""}, "snippet": " sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L16_C4", "label": "setsockopt()", "type": "expression", "loc": [16, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [8, 1, 0.5, 0.0312, 1, 0.33, 0.2, 461, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "setsockopt", "arg_names": [], "import_names": [], "rhs_call_name": "setsockopt", "annotation": ""}, "snippet": " sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L17_C4", "label": "setblocking()", "type": "expression", "loc": [17, 17], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [8, 1, 0.5312, 0.0312, 1, 0.33, 0.4, 473, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setblocking", "arg_names": [], "import_names": [], "rhs_call_name": "setblocking", "annotation": ""}, "snippet": " sock.setblocking(0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L18_C4", "label": "bind()", "type": "expression", "loc": [18, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [8, 1, 0.5625, 0.0312, 1, 0.33, 0.6, 640, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": " sock.bind((\"127.0.0.1\", config.UDP_PORT))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L20_C4", "label": "_socket =", "type": "assigned_variable", "loc": [20, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [14, 1, 0.625, 0.0312, 1, 0.33, 0.8, 703, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_socket", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _socket = sock"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L21_C4", "label": "add_handler()", "type": "expression", "loc": [21, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "vector": [8, 1, 0.6562, 0.0312, 1, 0.33, 1.0, 859, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "add_handler", "arg_names": [], "import_names": [], "rhs_call_name": "add_handler", "annotation": ""}, "snippet": " _ioloop.add_handler(_socket.fileno(), _read_callback, _ioloop.READ)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L23_C0", "label": "_read_callback", "type": "function", "loc": [23, 25], "level": 0, "parent": null, "vector": [2, 0, 0.75, 0.0938, 0, 0.66, 0.8889, 444, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_read_callback", "arg_names": ["fd", "events"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def _read_callback(fd, events):\n b, _ = _socket.recvfrom(1024)\n busmanager.handle_bus_message(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L24_C4", "label": "b, _ = recvfrom()", "type": "assigned_variable", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L23_C0", "vector": [14, 1, 0.75, 0.0312, 1, 0.56, 0.0, 534, 3, 1, 0, 0, 878, 10, 1], "semantic": {"name": "b, _", "arg_names": [], "import_names": [], "rhs_call_name": "recvfrom", "annotation": ""}, "snippet": " b, _ = _socket.recvfrom(1024)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L25_C4", "label": "handle_bus_message()", "type": "expression", "loc": [25, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L23_C0", "vector": [8, 1, 0.7812, 0.0312, 1, 0.56, 1.0, 31, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "handle_bus_message", "arg_names": [], "import_names": [], "rhs_call_name": "handle_bus_message", "annotation": ""}, "snippet": " busmanager.handle_bus_message(b)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:If_L27_C0", "label": "if", "type": "if", "loc": [27, 29], "level": 0, "parent": null, "vector": [4, 0, 0.875, 0.0938, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__==\"__main__\":\n start()\n tornado.ioloop.IOLoop.instance().start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L28_C4", "label": "start()", "type": "expression", "loc": [28, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:If_L27_C0", "vector": [8, 1, 0.875, 0.0312, 1, 0.85, 0.0, 511, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L29_C4", "label": "start()", "type": "expression", "loc": [29, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_354:If_L27_C0", "vector": [8, 1, 0.9062, 0.0312, 1, 0.85, 1.0, 511, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " tornado.ioloop.IOLoop.instance().start()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Assign_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:FunctionDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_354:If_L27_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_354:Expr_L29_C4"}]
import tornado.ioloop import tornado.web class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), ]) if __name__ == "__main__": application.listen(8888) tornado.ioloop.IOLoop.instance().start()
ajibawa-2023/Python-Code-Large/train/row_355
9
14
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_355:Import_L1_C0", "label": "tornado.ioloop import tornado.ioloop", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0714, 0.0714, 0, 0.66, 0.0, 730, 0, 1, 0, 0, 730, 0, 0], "semantic": {"name": "tornado.ioloop", "arg_names": [], "import_names": ["tornado.ioloop"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tornado.ioloop"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:Import_L2_C0", "label": "tornado.web import tornado.web", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.1429, 0.0714, 0, 0.66, 0.25, 248, 0, 1, 0, 0, 248, 0, 0], "semantic": {"name": "tornado.web", "arg_names": [], "import_names": ["tornado.web"], "rhs_call_name": "", "annotation": ""}, "snippet": "import tornado.web"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:ClassDef_L4_C0", "label": "MainHandler", "type": "class", "loc": [4, 6], "level": 0, "parent": null, "vector": [3, 0, 0.3571, 0.2143, 0, 0.66, 0.5, 83, 0, 1, 0, 0, 623, 0, 1], "semantic": {"name": "MainHandler", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class MainHandler(tornado.web.RequestHandler):\n def get(self):\n self.write(\"Hello, world\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:FunctionDef_L5_C4", "label": "get", "type": "function", "loc": [5, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_355:ClassDef_L4_C0", "vector": [2, 1, 0.3929, 0.1429, 1, 0.86, 0.0, 607, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "get", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get(self):\n self.write(\"Hello, world\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L6_C8", "label": "write()", "type": "expression", "loc": [6, 6], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_355:FunctionDef_L5_C4", "vector": [8, 2, 0.4286, 0.0714, 2, 0.94, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " self.write(\"Hello, world\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:Assign_L8_C0", "label": "application = Application()", "type": "assigned_variable", "loc": [8, 10], "level": 0, "parent": null, "vector": [14, 0, 0.6429, 0.2143, 0, 0.66, 0.75, 244, 3, 1, 0, 0, 979, 10, 1], "semantic": {"name": "application", "arg_names": [], "import_names": [], "rhs_call_name": "Application", "annotation": ""}, "snippet": "application = tornado.web.Application([\n (r\"/\", MainHandler),\n])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:If_L12_C0", "label": "if", "type": "if", "loc": [12, 14], "level": 0, "parent": null, "vector": [4, 0, 0.9286, 0.2143, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == \"__main__\":\n application.listen(8888)\n tornado.ioloop.IOLoop.instance().start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L13_C4", "label": "listen()", "type": "expression", "loc": [13, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_355:If_L12_C0", "vector": [8, 1, 0.9286, 0.0714, 1, 0.59, 0.0, 265, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "listen", "arg_names": [], "import_names": [], "rhs_call_name": "listen", "annotation": ""}, "snippet": " application.listen(8888)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L14_C4", "label": "start()", "type": "expression", "loc": [14, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_355:If_L12_C0", "vector": [8, 1, 1.0, 0.0714, 1, 0.59, 1.0, 511, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " tornado.ioloop.IOLoop.instance().start()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_355:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_355:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_355:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_355:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_355:If_L12_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_355:Expr_L14_C4"}]
# -*- coding:utf-8 -*- Coords = [ (23.152793, 113.342832, 0.33, 0), (23.152792, 113.342624, -0.33, 1), (23.152790, 113.342417, 0.00, 1), (23.153019, 113.342402, 0.17, 1), (23.153249, 113.342386, 0.33, 1), (23.153478, 113.342371, 0.50, 1), (23.153707, 113.342356, -0.33, 2), (23.153937, 113.342340, -0.17, 2), (23.154166, 113.342325, 0.00, 2), (23.154163, 113.342050, 0.15, 2), (23.154161, 113.341776, 0.31, 2), (23.154159, 113.341501, 0.46, 2), (23.154156, 113.341226, -0.38, 3), (23.154363, 113.341200, -0.25, 3), (23.154571, 113.341174, -0.13, 3), (23.154778, 113.341148, 0.00, 3), (23.155019, 113.341134, 0.11, 3), (23.155259, 113.341120, 0.22, 3), (23.155500, 113.341105, 0.33, 3), (23.155740, 113.341091, 0.44, 3), (23.155981, 113.341077, -0.44, 4), (23.156221, 113.341063, -0.33, 4), (23.156462, 113.341048, -0.22, 4), (23.156702, 113.341034, -0.11, 4), (23.156943, 113.341020, 0.00, 4), (23.156935, 113.340790, 0.15, 4), (23.156926, 113.340560, 0.30, 4), (23.156918, 113.340330, 0.44, 4), (23.157180, 113.340290, -0.37, 5), (23.157443, 113.340250, -0.19, 5), (23.157705, 113.340210, 0.00, 5), (23.157719, 113.339932, 0.07, 5), (23.157734, 113.339655, 0.15, 5), (23.157748, 113.339377, 0.22, 5), (23.157762, 113.339099, 0.29, 5), (23.157777, 113.338822, 0.37, 5), (23.157791, 113.338544, 0.44, 5), (23.157719, 113.338271, -0.49, 6), (23.157646, 113.337998, -0.41, 6), (23.157574, 113.337725, -0.34, 6), (23.157501, 113.337452, -0.26, 6), (23.157429, 113.337179, -0.19, 6), (23.157615, 113.337056, -0.12, 6), (23.157800, 113.336934, -0.06, 6), (23.157986, 113.336811, 0.00, 6), (23.158173, 113.336675, 0.33, 6), (23.158359, 113.336539, -0.33, 7), (23.158546, 113.336403, 0.00, 7), (23.158757, 113.336492, 0.04, 7), (23.158967, 113.336580, 0.08, 7), (23.159177, 113.336669, 0.13, 7), (23.159388, 113.336757, 0.17, 7), (23.159599, 113.336845, 0.21, 7), (23.159809, 113.336934, 0.25, 7), (23.160039, 113.337005, 0.30, 7), (23.160269, 113.337076, 0.34, 7), (23.160498, 113.337146, 0.38, 7), (23.160728, 113.337217, 0.43, 7), (23.160958, 113.337288, 0.47, 7), (23.161169, 113.337466, -0.48, 8), (23.161379, 113.337644, -0.43, 8), (23.161590, 113.337822, -0.38, 8), (23.161801, 113.337999, -0.33, 8), (23.162012, 113.338177, -0.28, 8), (23.162222, 113.338355, -0.23, 8), (23.162433, 113.338533, -0.18, 8), (23.162673, 113.338513, -0.13, 8), (23.162914, 113.338493, -0.09, 8), (23.163154, 113.338472, -0.04, 8), (23.163394, 113.338452, 0.00, 8), (23.163616, 113.338411, 0.12, 8), (23.163838, 113.338370, 0.24, 8), (23.164060, 113.338330, 0.36, 8), (23.164282, 113.338289, 0.48, 8), (23.164504, 113.338248, -0.40, 9), (23.164747, 113.338293, -0.26, 9), (23.164991, 113.338338, -0.13, 9), (23.165234, 113.338383, 0.00, 9), (23.165499, 113.338369, 0.11, 9), (23.165763, 113.338354, 0.23, 9), (23.166028, 113.338340, 0.34, 9), (23.165860, 113.338372, 0.42, 9), (23.166051, 113.338299, -0.50, 10), (23.166241, 113.338225, -0.41, 10), (23.166432, 113.338152, -0.32, 10), (23.166626, 113.337982, -0.21, 10), (23.166820, 113.337812, -0.11, 10), (23.167014, 113.337642, 0.00, 10), (23.167071, 113.337389, 0.17, 10), (23.167128, 113.337136, 0.33, 10), (23.167185, 113.336883, 0.50, 10), (23.167241, 113.336630, -0.33, 11), (23.167298, 113.336377, -0.17, 11), (23.167355, 113.336124, 0.00, 11), (23.167481, 113.335938, 0.09, 11), (23.167608, 113.335752, 0.19, 11), (23.167734, 113.335566, 0.28, 11), (23.167814, 113.335361, 0.37, 11), (23.167894, 113.335156, 0.46, 11), (23.167975, 113.334951, -0.45, 12), (23.168055, 113.334746, -0.37, 12), (23.168211, 113.334593, -0.27, 12), (23.168368, 113.334440, -0.18, 12), (23.168525, 113.334287, -0.09, 12), (23.168681, 113.334134, 0.00, 12), ] def coord_latitude(coord): return coord[0] def coord_longitude(coord): return coord[1] def coord_percent(coord): return coord[2] def coord_station_index(coord); return coord[3] IndexToStation = [ "车场", "南门总站", "中山像站", "百步梯站", "27号楼站", "人文馆站", "西五站", "西秀村站", "修理厂站", "北门站", "北湖站", "卫生所站", "北二总站", ]
ajibawa-2023/Python-Code-Large/train/row_356
9
136
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_356:Assign_L3_C0", "label": "Coords =", "type": "assigned_variable", "loc": [3, 109], "level": 0, "parent": null, "vector": [14, 0, 0.4118, 0.7868, 0, 0.66, 0.0, 620, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "Coords", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "Coords = [\n\t(23.152793, 113.342832, 0.33, 0),\n\t(23.152792, 113.342624, -0.33, 1),\n\t(23.152790, 113.342417, 0.00, 1),\n\t(23.153019, 113.342402, 0.17, 1),\n\t(23.153249, 113.342386, 0.33, 1),\n\t(23.153478, 113.342371, 0.50, 1),\n\t(23.153707, 113.342356, -0.33, 2),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L111_C0", "label": "coord_latitude", "type": "function", "loc": [111, 112], "level": 0, "parent": null, "vector": [2, 0, 0.8199, 0.0147, 0, 0.66, 0.25, 748, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "coord_latitude", "arg_names": ["coord"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def coord_latitude(coord):\n return coord[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L112_C4", "label": "return", "type": "return", "loc": [112, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L111_C0", "vector": [13, 1, 0.8235, 0.0074, 1, 0.41, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return coord[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L114_C0", "label": "coord_longitude", "type": "function", "loc": [114, 115], "level": 0, "parent": null, "vector": [2, 0, 0.8419, 0.0147, 0, 0.66, 0.5, 846, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "coord_longitude", "arg_names": ["coord"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def coord_longitude(coord):\n return coord[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L115_C4", "label": "return", "type": "return", "loc": [115, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L114_C0", "vector": [13, 1, 0.8456, 0.0074, 1, 0.47, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return coord[1]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L117_C0", "label": "coord_percent", "type": "function", "loc": [117, 120], "level": 0, "parent": null, "vector": [2, 0, 0.8713, 0.0294, 0, 0.66, 0.75, 553, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "coord_percent", "arg_names": ["coord"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def coord_percent(coord):\n return coord[2]\n\n return coord[3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L118_C4", "label": "return", "type": "return", "loc": [118, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L117_C0", "vector": [13, 1, 0.8676, 0.0074, 1, 0.98, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return coord[2]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L120_C4", "label": "return", "type": "return", "loc": [120, 120], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L117_C0", "vector": [13, 1, 0.8824, 0.0074, 1, 0.98, 1.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return coord[3]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_356:Assign_L122_C0", "label": "IndexToStation =", "type": "assigned_variable", "loc": [122, 136], "level": 0, "parent": null, "vector": [14, 0, 0.9485, 0.1103, 0, 0.66, 1.0, 641, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "IndexToStation", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "IndexToStation = [\n\t\"\u8f66\u573a\",\n\t\"\u5357\u95e8\u603b\u7ad9\",\n\t\"\u4e2d\u5c71\u50cf\u7ad9\",\n\t\"\u767e\u6b65\u68af\u7ad9\",\n\t\"27\u53f7\u697c\u7ad9\",\n\t\"\u4eba\u6587\u9986\u7ad9\",\n\t\"\u897f\u4e94\u7ad9\","}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L111_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L112_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L114_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L115_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L117_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L118_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_356:FunctionDef_L117_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_356:Return_L120_C4"}]
# -*- coding:utf-8 -*- UDP_PORT = 6000 # 校巴终端上传数据端口 HTTP_PORT = 8001 # HTTP接口端口
ajibawa-2023/Python-Code-Large/train/row_357
2
4
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_357:Assign_L3_C0", "label": "UDP_PORT =", "type": "assigned_variable", "loc": [3, 3], "level": 0, "parent": null, "vector": [14, 0, 0.75, 0.25, 0, 0.66, 0.0, 230, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "UDP_PORT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "UDP_PORT = 6000 # \u6821\u5df4\u7ec8\u7aef\u4e0a\u4f20\u6570\u636e\u7aef\u53e3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_357:Assign_L4_C0", "label": "HTTP_PORT =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.25, 0, 0.66, 1.0, 66, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "HTTP_PORT", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "HTTP_PORT = 8001 # HTTP\u63a5\u53e3\u7aef\u53e3"}]
[]
from composite import CompositeGoal from onek_onek import OneKingAttackOneKingEvaluator, OneKingFleeOneKingEvaluator class Goal_Think(CompositeGoal): def __init__(self, owner): CompositeGoal.__init__(self, owner) self.evaluators = [OneKingAttackOneKingEvaluator(1.0), OneKingFleeOneKingEvaluator(1.0)] def activate(self): self.arbitrate() self.status = self.ACTIVE def process(self): self.activateIfInactive() status = self.processSubgoals() if status == self.COMPLETED or status == self.FAILED: self.status = self.INACTIVE return status def terminate(self): pass def arbitrate(self): most_desirable = None best_score = 0 for e in self.evaluators: d = e.calculateDesirability() if d > best_score: most_desirable = e best_score = d if most_desirable: most_desirable.setGoal(self.owner) return best_score
ajibawa-2023/Python-Code-Large/train/row_358
27
38
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_358:ImportFrom_L1_C0", "label": "from composite import CompositeGoal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0263, 0.0263, 0, 0.66, 0.0, 334, 0, 1, 0, 0, 334, 0, 0], "semantic": {"name": "composite", "arg_names": [], "import_names": ["CompositeGoal"], "rhs_call_name": "", "annotation": ""}, "snippet": "from composite import CompositeGoal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:ImportFrom_L2_C0", "label": "from onek_onek import OneKingAttackOneKingEvaluator, OneKingFleeOneKingEvaluator", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0526, 0.0263, 0, 0.66, 0.5, 178, 0, 2, 0, 0, 178, 0, 0], "semantic": {"name": "onek_onek", "arg_names": [], "import_names": ["OneKingAttackOneKingEvaluator", "OneKingFleeOneKingEvaluator"], "rhs_call_name": "", "annotation": ""}, "snippet": "from onek_onek import OneKingAttackOneKingEvaluator, OneKingFleeOneKingEvaluator"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "label": "Goal_Think", "type": "class", "loc": [4, 34], "level": 0, "parent": null, "vector": [3, 0, 0.5, 0.8158, 0, 0.66, 1.0, 262, 0, 5, 0, 0, 409, 0, 8], "semantic": {"name": "Goal_Think", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Goal_Think(CompositeGoal):\n def __init__(self, owner):\n CompositeGoal.__init__(self, owner)\n self.evaluators = [OneKingAttackOneKingEvaluator(1.0),\n OneKingFleeOneKingEvaluator(1.0)]\n\n def activate(self):\n self.arbitrate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4", "label": "__init__", "type": "function", "loc": [5, 8], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "vector": [2, 1, 0.1711, 0.1053, 1, 0.07, 0.0, 555, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "__init__", "arg_names": ["self", "owner"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, owner):\n CompositeGoal.__init__(self, owner)\n self.evaluators = [OneKingAttackOneKingEvaluator(1.0),\n OneKingFleeOneKingEvaluator(1.0)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L6_C8", "label": "__init__()", "type": "expression", "loc": [6, 6], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4", "vector": [8, 2, 0.1579, 0.0263, 2, 0.54, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " CompositeGoal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L7_C8", "label": "self.evaluators =", "type": "assigned_variable", "loc": [7, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4", "vector": [14, 2, 0.1974, 0.0526, 2, 0.54, 1.0, 60, 0, 0, 0, 0, 0, 5, 2], "semantic": {"name": "self.evaluators", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.evaluators = [OneKingAttackOneKingEvaluator(1.0),\n OneKingFleeOneKingEvaluator(1.0)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4", "label": "activate", "type": "function", "loc": [10, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "vector": [2, 1, 0.2895, 0.0789, 1, 0.07, 0.25, 177, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "activate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def activate(self):\n self.arbitrate()\n self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L11_C8", "label": "arbitrate()", "type": "expression", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4", "vector": [8, 2, 0.2895, 0.0263, 2, 0.36, 0.0, 572, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "arbitrate", "arg_names": [], "import_names": [], "rhs_call_name": "arbitrate", "annotation": ""}, "snippet": " self.arbitrate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L12_C8", "label": "self.status =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4", "vector": [14, 2, 0.3158, 0.0263, 2, 0.36, 1.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "label": "process", "type": "function", "loc": [14, 19], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "vector": [2, 1, 0.4342, 0.1579, 1, 0.07, 0.5, 712, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "process", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process(self):\n self.activateIfInactive()\n status = self.processSubgoals()\n if status == self.COMPLETED or status == self.FAILED:\n self.status = self.INACTIVE\n return status"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L15_C8", "label": "activateIfInactive()", "type": "expression", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "vector": [8, 2, 0.3947, 0.0263, 2, 0.88, 0.0, 576, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "activateIfInactive", "arg_names": [], "import_names": [], "rhs_call_name": "activateIfInactive", "annotation": ""}, "snippet": " self.activateIfInactive()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L16_C8", "label": "status = processSubgoals()", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "vector": [14, 2, 0.4211, 0.0263, 2, 0.88, 0.3333, 699, 3, 0, 0, 0, 675, 10, 1], "semantic": {"name": "status", "arg_names": [], "import_names": [], "rhs_call_name": "processSubgoals", "annotation": ""}, "snippet": " status = self.processSubgoals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:If_L17_C8", "label": "if", "type": "if", "loc": [17, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "vector": [4, 2, 0.4605, 0.0526, 2, 0.88, 0.6667, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if status == self.COMPLETED or status == self.FAILED:\n self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L18_C12", "label": "self.status =", "type": "assigned_variable", "loc": [18, 18], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:If_L17_C8", "vector": [14, 3, 0.4737, 0.0263, 3, 0.5, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Return_L19_C8", "label": "return", "type": "return", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "vector": [13, 2, 0.5, 0.0263, 2, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return status"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L21_C4", "label": "terminate", "type": "function", "loc": [21, 22], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "vector": [2, 1, 0.5658, 0.0526, 1, 0.07, 0.75, 617, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "terminate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def terminate(self):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "label": "arbitrate", "type": "function", "loc": [24, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "vector": [2, 1, 0.7632, 0.2895, 1, 0.07, 1.0, 572, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "arbitrate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def arbitrate(self):\n most_desirable = None\n best_score = 0\n for e in self.evaluators:\n d = e.calculateDesirability()\n if d > best_score:\n most_desirable = e\n best_score = d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L25_C8", "label": "most_desirable =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "vector": [14, 2, 0.6579, 0.0263, 2, 0.07, 0.0, 711, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "most_desirable", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " most_desirable = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L26_C8", "label": "best_score =", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "vector": [14, 2, 0.6842, 0.0263, 2, 0.07, 0.25, 166, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "best_score", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " best_score = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8", "label": "for e", "type": "for", "loc": [27, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "vector": [6, 2, 0.7632, 0.1316, 2, 0.07, 0.5, 175, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "e", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for e in self.evaluators:\n d = e.calculateDesirability()\n if d > best_score:\n most_desirable = e\n best_score = d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L28_C12", "label": "d = calculateDesirability()", "type": "assigned_variable", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8", "vector": [14, 3, 0.7368, 0.0263, 3, 0.74, 0.0, 355, 3, 0, 0, 0, 943, 10, 1], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name": "calculateDesirability", "annotation": ""}, "snippet": " d = e.calculateDesirability()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12", "label": "if", "type": "if", "loc": [29, 31], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8", "vector": [4, 3, 0.7895, 0.0789, 3, 0.74, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if d > best_score:\n most_desirable = e\n best_score = d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L30_C16", "label": "most_desirable =", "type": "assigned_variable", "loc": [30, 30], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12", "vector": [14, 4, 0.7895, 0.0263, 4, 0.49, 0.0, 711, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "most_desirable", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " most_desirable = e"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L31_C16", "label": "best_score =", "type": "assigned_variable", "loc": [31, 31], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12", "vector": [14, 4, 0.8158, 0.0263, 4, 0.49, 1.0, 166, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "best_score", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " best_score = d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:If_L32_C8", "label": "if", "type": "if", "loc": [32, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "vector": [4, 2, 0.8553, 0.0526, 2, 0.07, 0.75, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if most_desirable:\n most_desirable.setGoal(self.owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L33_C12", "label": "setGoal()", "type": "expression", "loc": [33, 33], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:If_L32_C8", "vector": [8, 3, 0.8684, 0.0263, 3, 0.78, 0.0, 509, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setGoal", "arg_names": [], "import_names": [], "rhs_call_name": "setGoal", "annotation": ""}, "snippet": " most_desirable.setGoal(self.owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_358:Return_L34_C8", "label": "return", "type": "return", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "vector": [13, 2, 0.8947, 0.0263, 2, 0.07, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return best_score"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L10_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:If_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:If_L17_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L18_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Return_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L21_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L28_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:For_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L30_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:If_L29_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Assign_L31_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:If_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:If_L32_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Expr_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_358:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_358:Return_L34_C8"}]
from goal import Goal class CompositeGoal(Goal): def __init__(self, owner): Goal.__init__(self, owner) self.subgoals = [] def removeAllSubgoals(self): for s in self.subgoals: s.terminate() self.subgoals = [] def processSubgoals(self): # remove all completed and failed goals from the front of the # subgoal list while (self.subgoals and (self.subgoals[0].isComplete or self.subgoals[0].hasFailed)): subgoal = self.subgoals.pop() subgoal.terminate() if (self.subgoals): subgoal = self.subgoals.pop() status = subgoal.process() if status == COMPLETED and len(self.subgoals) > 1: return ACTIVE return status else: return COMPLETED def addSubgoal(self, goal): self.subgoals.append(goal)
ajibawa-2023/Python-Code-Large/train/row_359
22
32
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_359:ImportFrom_L1_C0", "label": "from goal import Goal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0312, 0.0312, 0, 0.66, 0.0, 914, 0, 1, 0, 0, 914, 0, 0], "semantic": {"name": "goal", "arg_names": [], "import_names": ["Goal"], "rhs_call_name": "", "annotation": ""}, "snippet": "from goal import Goal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "label": "CompositeGoal", "type": "class", "loc": [3, 32], "level": 0, "parent": null, "vector": [3, 0, 0.5469, 0.9375, 0, 0.66, 1.0, 409, 0, 4, 0, 0, 302, 0, 8], "semantic": {"name": "CompositeGoal", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class CompositeGoal(Goal):\n def __init__(self, owner):\n Goal.__init__(self, owner)\n self.subgoals = []\n\n def removeAllSubgoals(self):\n for s in self.subgoals:\n s.terminate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4", "label": "__init__", "type": "function", "loc": [4, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "vector": [2, 1, 0.1562, 0.0938, 1, 0.65, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "owner"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, owner):\n Goal.__init__(self, owner)\n self.subgoals = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L5_C8", "label": "__init__()", "type": "expression", "loc": [5, 5], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4", "vector": [8, 2, 0.1562, 0.0312, 2, 0.04, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Goal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L6_C8", "label": "self.subgoals =", "type": "assigned_variable", "loc": [6, 6], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4", "vector": [14, 2, 0.1875, 0.0312, 2, 0.04, 1.0, 474, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.subgoals", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.subgoals = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4", "label": "removeAllSubgoals", "type": "function", "loc": [8, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "vector": [2, 1, 0.2969, 0.125, 1, 0.65, 0.3333, 594, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "removeAllSubgoals", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def removeAllSubgoals(self):\n for s in self.subgoals:\n s.terminate()\n self.subgoals = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:For_L9_C8", "label": "for s", "type": "for", "loc": [9, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4", "vector": [6, 2, 0.2969, 0.0625, 2, 0.2, 0.0, 553, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "s", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for s in self.subgoals:\n s.terminate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L10_C12", "label": "terminate()", "type": "expression", "loc": [10, 10], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:For_L9_C8", "vector": [8, 3, 0.3125, 0.0312, 3, 0.19, 0.0, 617, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "terminate", "arg_names": [], "import_names": [], "rhs_call_name": "terminate", "annotation": ""}, "snippet": " s.terminate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L11_C8", "label": "self.subgoals =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4", "vector": [14, 2, 0.3438, 0.0312, 2, 0.2, 1.0, 474, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.subgoals", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.subgoals = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4", "label": "processSubgoals", "type": "function", "loc": [13, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "vector": [2, 1, 0.6406, 0.5, 1, 0.65, 0.6667, 675, 0, 1, 1, 0, 0, 0, 5], "semantic": {"name": "processSubgoals", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def processSubgoals(self):\n # remove all completed and failed goals from the front of the\n # subgoal list\n while (self.subgoals and (self.subgoals[0].isComplete or\n self.subgoals[0].hasFailed)):\n subgoal = self.subgoals.pop()\n subgoal.terminate()\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8", "label": "while", "type": "while", "loc": [16, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4", "vector": [5, 2, 0.5469, 0.125, 2, 0.24, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while (self.subgoals and (self.subgoals[0].isComplete or\n self.subgoals[0].hasFailed)):\n subgoal = self.subgoals.pop()\n subgoal.terminate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L18_C12", "label": "subgoal = pop()", "type": "assigned_variable", "loc": [18, 18], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8", "vector": [14, 3, 0.5625, 0.0312, 3, 0.34, 0.0, 721, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "subgoal", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " subgoal = self.subgoals.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L19_C12", "label": "terminate()", "type": "expression", "loc": [19, 19], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8", "vector": [8, 3, 0.5938, 0.0312, 3, 0.34, 1.0, 617, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "terminate", "arg_names": [], "import_names": [], "rhs_call_name": "terminate", "annotation": ""}, "snippet": " subgoal.terminate()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "label": "if", "type": "if", "loc": [21, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4", "vector": [4, 2, 0.7656, 0.25, 2, 0.24, 1.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (self.subgoals):\n subgoal = self.subgoals.pop()\n status = subgoal.process()\n if status == COMPLETED and len(self.subgoals) > 1:\n return ACTIVE\n return status\n else:\n return COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L22_C12", "label": "subgoal = pop()", "type": "assigned_variable", "loc": [22, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "vector": [14, 3, 0.6875, 0.0312, 3, 0.26, 0.0, 721, 3, 0, 0, 0, 969, 10, 1], "semantic": {"name": "subgoal", "arg_names": [], "import_names": [], "rhs_call_name": "pop", "annotation": ""}, "snippet": " subgoal = self.subgoals.pop()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L23_C12", "label": "status = process()", "type": "assigned_variable", "loc": [23, 23], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "vector": [14, 3, 0.7188, 0.0312, 3, 0.26, 0.25, 699, 3, 0, 0, 0, 712, 10, 1], "semantic": {"name": "status", "arg_names": [], "import_names": [], "rhs_call_name": "process", "annotation": ""}, "snippet": " status = subgoal.process()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:If_L24_C12", "label": "if", "type": "if", "loc": [24, 25], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "vector": [4, 3, 0.7656, 0.0625, 3, 0.26, 0.5, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if status == COMPLETED and len(self.subgoals) > 1:\n return ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L25_C16", "label": "return", "type": "return", "loc": [25, 25], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L24_C12", "vector": [13, 4, 0.7812, 0.0312, 4, 0.23, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L26_C12", "label": "return", "type": "return", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "vector": [13, 3, 0.8125, 0.0312, 3, 0.26, 0.75, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return status"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L28_C12", "label": "return", "type": "return", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "vector": [13, 3, 0.875, 0.0312, 3, 0.26, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L31_C4", "label": "addSubgoal", "type": "function", "loc": [31, 32], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "vector": [2, 1, 0.9844, 0.0625, 1, 0.65, 1.0, 314, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "addSubgoal", "arg_names": ["self", "goal"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def addSubgoal(self, goal):\n self.subgoals.append(goal)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L32_C8", "label": "append()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L31_C4", "vector": [8, 2, 1.0, 0.0312, 2, 0.07, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.subgoals.append(goal)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:For_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:For_L9_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L10_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L18_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:While_L16_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L19_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L13_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L22_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Assign_L23_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:If_L24_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L24_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L25_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L26_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:If_L21_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Return_L28_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L31_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_359:FunctionDef_L31_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_359:Expr_L32_C8"}]
import unittest import checkers import games from globalconst import * # (white) # 45 46 47 48 # 39 40 41 42 # 34 35 36 37 # 28 29 30 31 # 23 24 25 26 # 17 18 19 20 # 12 13 14 15 # 6 7 8 9 # (black) class TestBlackManSingleJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state squares = self.board.squares self.board.clear() squares[6] = BLACK | MAN squares[12] = WHITE | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[6, BLACK | MAN, FREE], [12, WHITE | MAN, FREE], [18, FREE, BLACK | MAN]]) class TestBlackManDoubleJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state squares = self.board.squares self.board.clear() squares[6] = BLACK | MAN squares[12] = WHITE | MAN squares[23] = WHITE | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[6, BLACK | MAN, FREE], [12, WHITE | MAN, FREE], [18, FREE, FREE], [23, WHITE | MAN, FREE], [28, FREE, BLACK | MAN]]) class TestBlackManCrownKingOnJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state squares = self.board.squares self.board.clear() # (white) # 45 46 47 48 # 39 40 41 42 # 34 35 36 37 # 28 29 30 31 # 23 24 25 26 # 17 18 19 20 # 12 13 14 15 # 6 7 8 9 # (black) squares[12] = BLACK | MAN squares[18] = WHITE | MAN squares[30] = WHITE | MAN squares[41] = WHITE | MAN # set another man on 40 to test that crowning # move ends the turn squares[40] = WHITE | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[12, BLACK | MAN, FREE], [18, WHITE | MAN, FREE], [24, FREE, FREE], [30, WHITE | MAN, FREE], [36, FREE, FREE], [41, WHITE | MAN, FREE], [46, FREE, BLACK | KING]]) class TestBlackManCrownKingOnMove(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state squares = self.board.squares self.board.clear() squares[39] = BLACK | MAN squares[18] = WHITE | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[39, BLACK | MAN, FREE], [45, FREE, BLACK | KING]]) class TestBlackKingOptionalJumpDiamond(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state squares = self.board.squares self.board.clear() squares[13] = BLACK | KING squares[19] = WHITE | MAN squares[30] = WHITE | MAN squares[29] = WHITE | MAN squares[18] = WHITE | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[13, BLACK | KING, FREE], [18, WHITE | MAN, FREE], [23, FREE, FREE], [29, WHITE | MAN, FREE], [35, FREE, FREE], [30, WHITE | MAN, FREE], [25, FREE, FREE], [19, WHITE | MAN, FREE], [13, FREE, BLACK | KING]]) self.assertEqual(moves[1].affected_squares, [[13, BLACK | KING, FREE], [19, WHITE | MAN, FREE], [25, FREE, FREE], [30, WHITE | MAN, FREE], [35, FREE, FREE], [29, WHITE | MAN, FREE], [23, FREE, FREE], [18, WHITE | MAN, FREE], [13, FREE, BLACK | KING]]) class TestWhiteManSingleJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE squares = self.board.squares self.board.clear() squares[41] = WHITE | MAN squares[36] = BLACK | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[41, WHITE | MAN, FREE], [36, BLACK | MAN, FREE], [31, FREE, WHITE | MAN]]) class TestWhiteManDoubleJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE squares = self.board.squares self.board.clear() squares[41] = WHITE | MAN squares[36] = BLACK | MAN squares[25] = BLACK | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[41, WHITE | MAN, FREE], [36, BLACK | MAN, FREE], [31, FREE, FREE], [25, BLACK | MAN, FREE], [19, FREE, WHITE | MAN]]) class TestWhiteManCrownKingOnMove(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE squares = self.board.squares self.board.clear() squares[15] = WHITE | MAN squares[36] = BLACK | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[15, WHITE | MAN, FREE], [9, FREE, WHITE | KING]]) class TestWhiteManCrownKingOnJump(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE squares = self.board.squares self.board.clear() squares[41] = WHITE | MAN squares[36] = BLACK | MAN squares[25] = BLACK | MAN squares[13] = BLACK | KING # set another man on 10 to test that crowning # move ends the turn squares[12] = BLACK | KING def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[41, WHITE | MAN, FREE], [36, BLACK | MAN, FREE], [31, FREE, FREE], [25, BLACK | MAN, FREE], [19, FREE, FREE], [13, BLACK | KING, FREE], [7, FREE, WHITE | KING]]) class TestWhiteKingOptionalJumpDiamond(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE squares = self.board.squares self.board.clear() squares[13] = WHITE | KING squares[19] = BLACK | MAN squares[30] = BLACK | MAN squares[29] = BLACK | MAN squares[18] = BLACK | MAN def testJump(self): moves = self.game.legal_moves(self.board) self.assertEqual(moves[0].affected_squares, [[13, WHITE | KING, FREE], [18, BLACK | MAN, FREE], [23, FREE, FREE], [29, BLACK | MAN, FREE], [35, FREE, FREE], [30, BLACK | MAN, FREE], [25, FREE, FREE], [19, BLACK | MAN, FREE], [13, FREE, WHITE | KING]]) self.assertEqual(moves[1].affected_squares, [[13, WHITE | KING, FREE], [19, BLACK | MAN, FREE], [25, FREE, FREE], [30, BLACK | MAN, FREE], [35, FREE, FREE], [29, BLACK | MAN, FREE], [23, FREE, FREE], [18, BLACK | MAN, FREE], [13, FREE, WHITE | KING]]) class TestUtilityFunc(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state self.board.to_move = WHITE self.squares = self.board.squares def testInitialUtility(self): code = sum(self.board.value[s] for s in self.squares) nwm = code % 16 nwk = (code >> 4) % 16 nbm = (code >> 8) % 16 nbk = (code >> 12) % 16 nm = nbm + nwm nk = nbk + nwk self.assertEqual(self.board._eval_cramp(self.squares), 0) self.assertEqual(self.board._eval_backrankguard(self.squares), 0) self.assertEqual(self.board._eval_doublecorner(self.squares), 0) self.assertEqual(self.board._eval_center(self.squares), 0) self.assertEqual(self.board._eval_edge(self.squares), 0) self.assertEqual(self.board._eval_tempo(self.squares, nm, nbk, nbm, nwk, nwm), 0) self.assertEqual(self.board._eval_playeropposition(self.squares, nwm, nwk, nbk, nbm, nm, nk), 0) self.assertEqual(self.board.utility(WHITE), -2) class TestSuccessorFuncForBlack(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state def testInitialBlackMoves(self): # Tests whether initial game moves are correct from # Black's perspective moves = [m for m, _ in self.game.successors(self.board)] self.assertEqual(moves[0].affected_squares, [[17, BLACK | MAN, FREE], [23, FREE, BLACK | MAN]]) self.assertEqual(moves[1].affected_squares, [[18, BLACK | MAN, FREE], [23, FREE, BLACK | MAN]]) self.assertEqual(moves[2].affected_squares, [[18, BLACK | MAN, FREE], [24, FREE, BLACK | MAN]]) self.assertEqual(moves[3].affected_squares, [[19, BLACK | MAN, FREE], [24, FREE, BLACK | MAN]]) self.assertEqual(moves[4].affected_squares, [[19, BLACK | MAN, FREE], [25, FREE, BLACK | MAN]]) self.assertEqual(moves[5].affected_squares, [[20, BLACK | MAN, FREE], [25, FREE, BLACK | MAN]]) self.assertEqual(moves[6].affected_squares, [[20, BLACK | MAN, FREE], [26, FREE, BLACK | MAN]]) class TestSuccessorFuncForWhite(unittest.TestCase): def setUp(self): self.game = checkers.Checkers() self.board = self.game.curr_state # I'm cheating here ... white never moves first in # a real game, but I want to see that the moves # would work anyway. self.board.to_move = WHITE def testInitialWhiteMoves(self): # Tests whether initial game moves are correct from # White's perspective moves = [m for m, _ in self.game.successors(self.board)] self.assertEqual(moves[0].affected_squares, [[34, WHITE | MAN, FREE], [29, FREE, WHITE | MAN]]) self.assertEqual(moves[1].affected_squares, [[34, WHITE | MAN, FREE], [28, FREE, WHITE | MAN]]) self.assertEqual(moves[2].affected_squares, [[35, WHITE | MAN, FREE], [30, FREE, WHITE | MAN]]) self.assertEqual(moves[3].affected_squares, [[35, WHITE | MAN, FREE], [29, FREE, WHITE | MAN]]) self.assertEqual(moves[4].affected_squares, [[36, WHITE | MAN, FREE], [31, FREE, WHITE | MAN]]) self.assertEqual(moves[5].affected_squares, [[36, WHITE | MAN, FREE], [30, FREE, WHITE | MAN]]) self.assertEqual(moves[6].affected_squares, [[37, WHITE | MAN, FREE], [31, FREE, WHITE | MAN]]) if __name__ == '__main__': unittest.main()
ajibawa-2023/Python-Code-Large/train/row_360
186
333
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_360:Import_L1_C0", "label": "unittest import unittest", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.003, 0.003, 0, 0.66, 0.0, 88, 0, 1, 0, 0, 88, 0, 0], "semantic": {"name": "unittest", "arg_names": [], "import_names": ["unittest"], "rhs_call_name": "", "annotation": ""}, "snippet": "import unittest"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Import_L2_C0", "label": "checkers import checkers", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.006, 0.003, 0, 0.66, 0.0588, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "checkers", "arg_names": [], "import_names": ["checkers"], "rhs_call_name": "", "annotation": ""}, "snippet": "import checkers"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Import_L3_C0", "label": "games import games", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.009, 0.003, 0, 0.66, 0.1176, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "games", "arg_names": [], "import_names": ["games"], "rhs_call_name": "", "annotation": ""}, "snippet": "import games"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ImportFrom_L4_C0", "label": "from globalconst import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.012, 0.003, 0, 0.66, 0.1765, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from globalconst import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L16_C0", "label": "TestBlackManSingleJump", "type": "class", "loc": [16, 30], "level": 0, "parent": null, "vector": [3, 0, 0.0691, 0.045, 0, 0.66, 0.2353, 396, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestBlackManSingleJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestBlackManSingleJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[6] = BLACK | MAN\n squares[12] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "label": "setUp", "type": "function", "loc": [17, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L16_C0", "vector": [2, 1, 0.0601, 0.021, 1, 0.54, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[6] = BLACK | MAN\n squares[12] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L18_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [14, 2, 0.0541, 0.003, 2, 0.35, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L19_C8", "label": "self.board =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [14, 2, 0.0571, 0.003, 2, 0.35, 0.2, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L20_C8", "label": "squares =", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [14, 2, 0.0601, 0.003, 2, 0.35, 0.4, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L21_C8", "label": "clear()", "type": "expression", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [8, 2, 0.0631, 0.003, 2, 0.35, 0.6, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L22_C8", "label": "assign", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [14, 2, 0.0661, 0.003, 2, 0.35, 0.8, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[6] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L23_C8", "label": "assign", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "vector": [14, 2, 0.0691, 0.003, 2, 0.35, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[12] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4", "label": "testJump", "type": "function", "loc": [25, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L16_C0", "vector": [2, 1, 0.0826, 0.018, 1, 0.54, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[6, BLACK | MAN, FREE],\n [12, WHITE | MAN, FREE],\n [18, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L26_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4", "vector": [14, 2, 0.0781, 0.003, 2, 0.21, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L27_C8", "label": "assertEqual()", "type": "expression", "loc": [27, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4", "vector": [8, 2, 0.0856, 0.012, 2, 0.21, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[6, BLACK | MAN, FREE],\n [12, WHITE | MAN, FREE],\n [18, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L32_C0", "label": "TestBlackManDoubleJump", "type": "class", "loc": [32, 49], "level": 0, "parent": null, "vector": [3, 0, 0.1216, 0.0541, 0, 0.66, 0.2941, 950, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestBlackManDoubleJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestBlackManDoubleJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[6] = BLACK | MAN\n squares[12] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "label": "setUp", "type": "function", "loc": [33, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L32_C0", "vector": [2, 1, 0.1096, 0.024, 1, 0.55, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[6] = BLACK | MAN\n squares[12] = WHITE | MAN\n squares[23] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L34_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1021, 0.003, 2, 0.05, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L35_C8", "label": "self.board =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1051, 0.003, 2, 0.05, 0.1667, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L36_C8", "label": "squares =", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1081, 0.003, 2, 0.05, 0.3333, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L37_C8", "label": "clear()", "type": "expression", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [8, 2, 0.1111, 0.003, 2, 0.05, 0.5, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L38_C8", "label": "assign", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1141, 0.003, 2, 0.05, 0.6667, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[6] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L39_C8", "label": "assign", "type": "assigned_variable", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1171, 0.003, 2, 0.05, 0.8333, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[12] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L40_C8", "label": "assign", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "vector": [14, 2, 0.1201, 0.003, 2, 0.05, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[23] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4", "label": "testJump", "type": "function", "loc": [42, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L32_C0", "vector": [2, 1, 0.1366, 0.024, 1, 0.55, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[6, BLACK | MAN, FREE],\n [12, WHITE | MAN, FREE],\n [18, FREE, FREE],\n [23, WHITE | MAN, FREE],\n [28, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L43_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4", "vector": [14, 2, 0.1291, 0.003, 2, 0.97, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L44_C8", "label": "assertEqual()", "type": "expression", "loc": [44, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4", "vector": [8, 2, 0.1396, 0.018, 2, 0.97, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[6, BLACK | MAN, FREE],\n [12, WHITE | MAN, FREE],\n [18, FREE, FREE],\n [23, WHITE | MAN, FREE],\n [28, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L51_C0", "label": "TestBlackManCrownKingOnJump", "type": "class", "loc": [51, 84], "level": 0, "parent": null, "vector": [3, 0, 0.2027, 0.1021, 0, 0.66, 0.3529, 402, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestBlackManCrownKingOnJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestBlackManCrownKingOnJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n # (white)\n # 45 46 47 48"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "label": "setUp", "type": "function", "loc": [52, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L51_C0", "vector": [2, 1, 0.1877, 0.0661, 1, 0.28, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n # (white)\n # 45 46 47 48\n # 39 40 41 42"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L53_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.1592, 0.003, 2, 0.31, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L54_C8", "label": "self.board =", "type": "assigned_variable", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.1622, 0.003, 2, 0.31, 0.125, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L55_C8", "label": "squares =", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.1652, 0.003, 2, 0.31, 0.25, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L56_C8", "label": "clear()", "type": "expression", "loc": [56, 56], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [8, 2, 0.1682, 0.003, 2, 0.31, 0.375, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L67_C8", "label": "assign", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.2012, 0.003, 2, 0.31, 0.5, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[12] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L68_C8", "label": "assign", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.2042, 0.003, 2, 0.31, 0.625, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[18] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L69_C8", "label": "assign", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.2072, 0.003, 2, 0.31, 0.75, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[30] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L70_C8", "label": "assign", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.2102, 0.003, 2, 0.31, 0.875, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L73_C8", "label": "assign", "type": "assigned_variable", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "vector": [14, 2, 0.2192, 0.003, 2, 0.31, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[40] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4", "label": "testJump", "type": "function", "loc": [75, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L51_C0", "vector": [2, 1, 0.2387, 0.03, 1, 0.28, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[12, BLACK | MAN, FREE],\n [18, WHITE | MAN, FREE],\n [24, FREE, FREE],\n [30, WHITE | MAN, FREE],\n [36, FREE, FREE],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L76_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4", "vector": [14, 2, 0.2282, 0.003, 2, 0.52, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L77_C8", "label": "assertEqual()", "type": "expression", "loc": [77, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4", "vector": [8, 2, 0.2417, 0.024, 2, 0.52, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[12, BLACK | MAN, FREE],\n [18, WHITE | MAN, FREE],\n [24, FREE, FREE],\n [30, WHITE | MAN, FREE],\n [36, FREE, FREE],\n [41, WHITE | MAN, FREE],\n [46, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L86_C0", "label": "TestBlackManCrownKingOnMove", "type": "class", "loc": [86, 99], "level": 0, "parent": null, "vector": [3, 0, 0.2778, 0.042, 0, 0.66, 0.4118, 599, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestBlackManCrownKingOnMove", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestBlackManCrownKingOnMove(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[39] = BLACK | MAN\n squares[18] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "label": "setUp", "type": "function", "loc": [87, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L86_C0", "vector": [2, 1, 0.2703, 0.021, 1, 0.27, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[39] = BLACK | MAN\n squares[18] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L88_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [14, 2, 0.2643, 0.003, 2, 0.38, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L89_C8", "label": "self.board =", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [14, 2, 0.2673, 0.003, 2, 0.38, 0.2, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L90_C8", "label": "squares =", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [14, 2, 0.2703, 0.003, 2, 0.38, 0.4, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L91_C8", "label": "clear()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [8, 2, 0.2733, 0.003, 2, 0.38, 0.6, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L92_C8", "label": "assign", "type": "assigned_variable", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [14, 2, 0.2763, 0.003, 2, 0.38, 0.8, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[39] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L93_C8", "label": "assign", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "vector": [14, 2, 0.2793, 0.003, 2, 0.38, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[18] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4", "label": "testJump", "type": "function", "loc": [95, 99], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L86_C0", "vector": [2, 1, 0.2913, 0.015, 1, 0.27, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[39, BLACK | MAN, FREE],\n [45, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L96_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4", "vector": [14, 2, 0.2883, 0.003, 2, 0.29, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L97_C8", "label": "assertEqual()", "type": "expression", "loc": [97, 99], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4", "vector": [8, 2, 0.2943, 0.009, 2, 0.29, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[39, BLACK | MAN, FREE],\n [45, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L102_C0", "label": "TestBlackKingOptionalJumpDiamond", "type": "class", "loc": [102, 127], "level": 0, "parent": null, "vector": [3, 0, 0.3438, 0.0781, 0, 0.66, 0.4706, 46, 0, 2, 0, 0, 878, 0, 5], "semantic": {"name": "TestBlackKingOptionalJumpDiamond", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestBlackKingOptionalJumpDiamond(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[13] = BLACK | KING\n squares[19] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "label": "setUp", "type": "function", "loc": [103, 112], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L102_C0", "vector": [2, 1, 0.3228, 0.03, 1, 0.35, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n squares = self.board.squares\n self.board.clear()\n squares[13] = BLACK | KING\n squares[19] = WHITE | MAN\n squares[30] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L104_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [104, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3123, 0.003, 2, 0.14, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L105_C8", "label": "self.board =", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3153, 0.003, 2, 0.14, 0.125, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L106_C8", "label": "squares =", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3183, 0.003, 2, 0.14, 0.25, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L107_C8", "label": "clear()", "type": "expression", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [8, 2, 0.3213, 0.003, 2, 0.14, 0.375, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L108_C8", "label": "assign", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3243, 0.003, 2, 0.14, 0.5, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[13] = BLACK | KING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L109_C8", "label": "assign", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3273, 0.003, 2, 0.14, 0.625, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[19] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L110_C8", "label": "assign", "type": "assigned_variable", "loc": [110, 110], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3303, 0.003, 2, 0.14, 0.75, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[30] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L111_C8", "label": "assign", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3333, 0.003, 2, 0.14, 0.875, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[29] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L112_C8", "label": "assign", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "vector": [14, 2, 0.3363, 0.003, 2, 0.14, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[18] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "label": "testJump", "type": "function", "loc": [114, 127], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L102_C0", "vector": [2, 1, 0.3619, 0.042, 1, 0.35, 1.0, 980, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[13, BLACK | KING, FREE], [18, WHITE | MAN, FREE],\n [23, FREE, FREE], [29, WHITE | MAN, FREE],\n [35, FREE, FREE], [30, WHITE | MAN, FREE],\n [25, FREE, FREE], [19, WHITE | MAN, FREE],\n [13, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L115_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "vector": [14, 2, 0.3453, 0.003, 2, 0.71, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L116_C8", "label": "assertEqual()", "type": "expression", "loc": [116, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "vector": [8, 2, 0.3559, 0.018, 2, 0.71, 0.5, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[13, BLACK | KING, FREE], [18, WHITE | MAN, FREE],\n [23, FREE, FREE], [29, WHITE | MAN, FREE],\n [35, FREE, FREE], [30, WHITE | MAN, FREE],\n [25, FREE, FREE], [19, WHITE | MAN, FREE],\n [13, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L122_C8", "label": "assertEqual()", "type": "expression", "loc": [122, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "vector": [8, 2, 0.3739, 0.018, 2, 0.71, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[1].affected_squares,\n [[13, BLACK | KING, FREE], [19, WHITE | MAN, FREE],\n [25, FREE, FREE], [30, WHITE | MAN, FREE],\n [35, FREE, FREE], [29, WHITE | MAN, FREE],\n [23, FREE, FREE], [18, WHITE | MAN, FREE],\n [13, FREE, BLACK | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L129_C0", "label": "TestWhiteManSingleJump", "type": "class", "loc": [129, 144], "level": 0, "parent": null, "vector": [3, 0, 0.4099, 0.048, 0, 0.66, 0.5294, 790, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestWhiteManSingleJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestWhiteManSingleJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "label": "setUp", "type": "function", "loc": [130, 137], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L129_C0", "vector": [2, 1, 0.4009, 0.024, 1, 0.92, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN\n squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L131_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.3934, 0.003, 2, 0.92, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L132_C8", "label": "self.board =", "type": "assigned_variable", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.3964, 0.003, 2, 0.92, 0.1667, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L133_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.3994, 0.003, 2, 0.92, 0.3333, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L134_C8", "label": "squares =", "type": "assigned_variable", "loc": [134, 134], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.4024, 0.003, 2, 0.92, 0.5, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L135_C8", "label": "clear()", "type": "expression", "loc": [135, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [8, 2, 0.4054, 0.003, 2, 0.92, 0.6667, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L136_C8", "label": "assign", "type": "assigned_variable", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.4084, 0.003, 2, 0.92, 0.8333, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L137_C8", "label": "assign", "type": "assigned_variable", "loc": [137, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "vector": [14, 2, 0.4114, 0.003, 2, 0.92, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4", "label": "testJump", "type": "function", "loc": [139, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L129_C0", "vector": [2, 1, 0.4249, 0.018, 1, 0.92, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L140_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4", "vector": [14, 2, 0.4204, 0.003, 2, 0.8, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L141_C8", "label": "assertEqual()", "type": "expression", "loc": [141, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4", "vector": [8, 2, 0.4279, 0.012, 2, 0.8, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L147_C0", "label": "TestWhiteManDoubleJump", "type": "class", "loc": [147, 165], "level": 0, "parent": null, "vector": [3, 0, 0.4685, 0.0571, 0, 0.66, 0.5882, 839, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestWhiteManDoubleJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestWhiteManDoubleJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "label": "setUp", "type": "function", "loc": [148, 156], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L147_C0", "vector": [2, 1, 0.4565, 0.027, 1, 0.51, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN\n squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L149_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4474, 0.003, 2, 0.57, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L150_C8", "label": "self.board =", "type": "assigned_variable", "loc": [150, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4505, 0.003, 2, 0.57, 0.1429, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L151_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4535, 0.003, 2, 0.57, 0.2857, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L152_C8", "label": "squares =", "type": "assigned_variable", "loc": [152, 152], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4565, 0.003, 2, 0.57, 0.4286, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L153_C8", "label": "clear()", "type": "expression", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [8, 2, 0.4595, 0.003, 2, 0.57, 0.5714, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L154_C8", "label": "assign", "type": "assigned_variable", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4625, 0.003, 2, 0.57, 0.7143, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L155_C8", "label": "assign", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4655, 0.003, 2, 0.57, 0.8571, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L156_C8", "label": "assign", "type": "assigned_variable", "loc": [156, 156], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "vector": [14, 2, 0.4685, 0.003, 2, 0.57, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[25] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4", "label": "testJump", "type": "function", "loc": [158, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L147_C0", "vector": [2, 1, 0.485, 0.024, 1, 0.51, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, FREE],\n [25, BLACK | MAN, FREE],\n [19, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L159_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4", "vector": [14, 2, 0.4775, 0.003, 2, 0.25, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L160_C8", "label": "assertEqual()", "type": "expression", "loc": [160, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4", "vector": [8, 2, 0.488, 0.018, 2, 0.25, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, FREE],\n [25, BLACK | MAN, FREE],\n [19, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L167_C0", "label": "TestWhiteManCrownKingOnMove", "type": "class", "loc": [167, 181], "level": 0, "parent": null, "vector": [3, 0, 0.5225, 0.045, 0, 0.66, 0.6471, 867, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestWhiteManCrownKingOnMove", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestWhiteManCrownKingOnMove(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[15] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "label": "setUp", "type": "function", "loc": [168, 175], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L167_C0", "vector": [2, 1, 0.515, 0.024, 1, 0.9, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[15] = WHITE | MAN\n squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L169_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5075, 0.003, 2, 0.33, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L170_C8", "label": "self.board =", "type": "assigned_variable", "loc": [170, 170], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5105, 0.003, 2, 0.33, 0.1667, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L171_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5135, 0.003, 2, 0.33, 0.3333, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L172_C8", "label": "squares =", "type": "assigned_variable", "loc": [172, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5165, 0.003, 2, 0.33, 0.5, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L173_C8", "label": "clear()", "type": "expression", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [8, 2, 0.5195, 0.003, 2, 0.33, 0.6667, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L174_C8", "label": "assign", "type": "assigned_variable", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5225, 0.003, 2, 0.33, 0.8333, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[15] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L175_C8", "label": "assign", "type": "assigned_variable", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "vector": [14, 2, 0.5255, 0.003, 2, 0.33, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4", "label": "testJump", "type": "function", "loc": [177, 181], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L167_C0", "vector": [2, 1, 0.5375, 0.015, 1, 0.9, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[15, WHITE | MAN, FREE],\n [9, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L178_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [178, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4", "vector": [14, 2, 0.5345, 0.003, 2, 0.23, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L179_C8", "label": "assertEqual()", "type": "expression", "loc": [179, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4", "vector": [8, 2, 0.5405, 0.009, 2, 0.23, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[15, WHITE | MAN, FREE],\n [9, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L184_C0", "label": "TestWhiteManCrownKingOnJump", "type": "class", "loc": [184, 208], "level": 0, "parent": null, "vector": [3, 0, 0.5886, 0.0751, 0, 0.66, 0.7059, 523, 0, 2, 0, 0, 878, 0, 4], "semantic": {"name": "TestWhiteManCrownKingOnJump", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestWhiteManCrownKingOnJump(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "label": "setUp", "type": "function", "loc": [185, 197], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L184_C0", "vector": [2, 1, 0.5736, 0.039, 1, 0.31, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[41] = WHITE | MAN\n squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L186_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5586, 0.003, 2, 0.8, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L187_C8", "label": "self.board =", "type": "assigned_variable", "loc": [187, 187], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5616, 0.003, 2, 0.8, 0.1111, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L188_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5646, 0.003, 2, 0.8, 0.2222, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L189_C8", "label": "squares =", "type": "assigned_variable", "loc": [189, 189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5676, 0.003, 2, 0.8, 0.3333, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L190_C8", "label": "clear()", "type": "expression", "loc": [190, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [8, 2, 0.5706, 0.003, 2, 0.8, 0.4444, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L191_C8", "label": "assign", "type": "assigned_variable", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5736, 0.003, 2, 0.8, 0.5556, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[41] = WHITE | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L192_C8", "label": "assign", "type": "assigned_variable", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5766, 0.003, 2, 0.8, 0.6667, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[36] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L193_C8", "label": "assign", "type": "assigned_variable", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5796, 0.003, 2, 0.8, 0.7778, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[25] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L194_C8", "label": "assign", "type": "assigned_variable", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5826, 0.003, 2, 0.8, 0.8889, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[13] = BLACK | KING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L197_C8", "label": "assign", "type": "assigned_variable", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "vector": [14, 2, 0.5916, 0.003, 2, 0.8, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[12] = BLACK | KING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4", "label": "testJump", "type": "function", "loc": [199, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L184_C0", "vector": [2, 1, 0.6111, 0.03, 1, 0.31, 1.0, 980, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, FREE],\n [25, BLACK | MAN, FREE],\n [19, FREE, FREE],"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L200_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [200, 200], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4", "vector": [14, 2, 0.6006, 0.003, 2, 0.76, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L201_C8", "label": "assertEqual()", "type": "expression", "loc": [201, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4", "vector": [8, 2, 0.6141, 0.024, 2, 0.76, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[41, WHITE | MAN, FREE],\n [36, BLACK | MAN, FREE],\n [31, FREE, FREE],\n [25, BLACK | MAN, FREE],\n [19, FREE, FREE],\n [13, BLACK | KING, FREE],\n [7, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L210_C0", "label": "TestWhiteKingOptionalJumpDiamond", "type": "class", "loc": [210, 236], "level": 0, "parent": null, "vector": [3, 0, 0.6697, 0.0811, 0, 0.66, 0.7647, 305, 0, 2, 0, 0, 878, 0, 5], "semantic": {"name": "TestWhiteKingOptionalJumpDiamond", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestWhiteKingOptionalJumpDiamond(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[13] = WHITE | KING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "label": "setUp", "type": "function", "loc": [211, 221], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L210_C0", "vector": [2, 1, 0.6486, 0.033, 1, 0.47, 0.0, 952, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n squares = self.board.squares\n self.board.clear()\n squares[13] = WHITE | KING\n squares[19] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L212_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [212, 212], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6366, 0.003, 2, 0.16, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L213_C8", "label": "self.board =", "type": "assigned_variable", "loc": [213, 213], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6396, 0.003, 2, 0.16, 0.1111, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L214_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [214, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6426, 0.003, 2, 0.16, 0.2222, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L215_C8", "label": "squares =", "type": "assigned_variable", "loc": [215, 215], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6456, 0.003, 2, 0.16, 0.3333, 378, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L216_C8", "label": "clear()", "type": "expression", "loc": [216, 216], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [8, 2, 0.6486, 0.003, 2, 0.16, 0.4444, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " self.board.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L217_C8", "label": "assign", "type": "assigned_variable", "loc": [217, 217], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6517, 0.003, 2, 0.16, 0.5556, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[13] = WHITE | KING"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L218_C8", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6547, 0.003, 2, 0.16, 0.6667, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[19] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L219_C8", "label": "assign", "type": "assigned_variable", "loc": [219, 219], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6577, 0.003, 2, 0.16, 0.7778, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[30] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L220_C8", "label": "assign", "type": "assigned_variable", "loc": [220, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6607, 0.003, 2, 0.16, 0.8889, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[29] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L221_C8", "label": "assign", "type": "assigned_variable", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "vector": [14, 2, 0.6637, 0.003, 2, 0.16, 1.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " squares[18] = BLACK | MAN"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "label": "testJump", "type": "function", "loc": [223, 236], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L210_C0", "vector": [2, 1, 0.6892, 0.042, 1, 0.47, 1.0, 980, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "testJump", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testJump(self):\n moves = self.game.legal_moves(self.board)\n self.assertEqual(moves[0].affected_squares,\n [[13, WHITE | KING, FREE], [18, BLACK | MAN, FREE],\n [23, FREE, FREE], [29, BLACK | MAN, FREE],\n [35, FREE, FREE], [30, BLACK | MAN, FREE],\n [25, FREE, FREE], [19, BLACK | MAN, FREE],\n [13, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L224_C8", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [224, 224], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "vector": [14, 2, 0.6727, 0.003, 2, 0.11, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = self.game.legal_moves(self.board)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L225_C8", "label": "assertEqual()", "type": "expression", "loc": [225, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "vector": [8, 2, 0.6832, 0.018, 2, 0.11, 0.5, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[13, WHITE | KING, FREE], [18, BLACK | MAN, FREE],\n [23, FREE, FREE], [29, BLACK | MAN, FREE],\n [35, FREE, FREE], [30, BLACK | MAN, FREE],\n [25, FREE, FREE], [19, BLACK | MAN, FREE],\n [13, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L231_C8", "label": "assertEqual()", "type": "expression", "loc": [231, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "vector": [8, 2, 0.7012, 0.018, 2, 0.11, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[1].affected_squares,\n [[13, WHITE | KING, FREE], [19, BLACK | MAN, FREE],\n [25, FREE, FREE], [30, BLACK | MAN, FREE],\n [35, FREE, FREE], [29, BLACK | MAN, FREE],\n [23, FREE, FREE], [18, BLACK | MAN, FREE],\n [13, FREE, WHITE | KING]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L238_C0", "label": "TestUtilityFunc", "type": "class", "loc": [238, 264], "level": 0, "parent": null, "vector": [3, 0, 0.7538, 0.0811, 0, 0.66, 0.8235, 540, 0, 2, 0, 0, 878, 0, 18], "semantic": {"name": "TestUtilityFunc", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestUtilityFunc(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n self.squares = self.board.squares\n\n def testInitialUtility(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "label": "setUp", "type": "function", "loc": [239, 243], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L238_C0", "vector": [2, 1, 0.7237, 0.015, 1, 0.02, 0.0, 952, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n self.board.to_move = WHITE\n self.squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L240_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "vector": [14, 2, 0.7207, 0.003, 2, 0.88, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L241_C8", "label": "self.board =", "type": "assigned_variable", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "vector": [14, 2, 0.7237, 0.003, 2, 0.88, 0.3333, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L242_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "vector": [14, 2, 0.7267, 0.003, 2, 0.88, 0.6667, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L243_C8", "label": "self.squares =", "type": "assigned_variable", "loc": [243, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "vector": [14, 2, 0.7297, 0.003, 2, 0.88, 1.0, 917, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.squares = self.board.squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "label": "testInitialUtility", "type": "function", "loc": [245, 264], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L238_C0", "vector": [2, 1, 0.7643, 0.0601, 1, 0.02, 1.0, 523, 0, 1, 0, 0, 0, 0, 17], "semantic": {"name": "testInitialUtility", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testInitialUtility(self):\n code = sum(self.board.value[s] for s in self.squares)\n nwm = code % 16\n nwk = (code >> 4) % 16\n nbm = (code >> 8) % 16\n nbk = (code >> 12) % 16\n nm = nbm + nwm\n nk = nbk + nwk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L246_C8", "label": "code = sum()", "type": "assigned_variable", "loc": [246, 246], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7387, 0.003, 2, 0.84, 0.0, 44, 3, 1, 0, 0, 824, 10, 1], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "sum", "annotation": ""}, "snippet": " code = sum(self.board.value[s] for s in self.squares)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L247_C8", "label": "nwm =", "type": "assigned_variable", "loc": [247, 247], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7417, 0.003, 2, 0.84, 0.0714, 38, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nwm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nwm = code % 16"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L248_C8", "label": "nwk =", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7447, 0.003, 2, 0.84, 0.1429, 932, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nwk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nwk = (code >> 4) % 16"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L249_C8", "label": "nbm =", "type": "assigned_variable", "loc": [249, 249], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7477, 0.003, 2, 0.84, 0.2143, 519, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nbm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nbm = (code >> 8) % 16"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L250_C8", "label": "nbk =", "type": "assigned_variable", "loc": [250, 250], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7508, 0.003, 2, 0.84, 0.2857, 84, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nbk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nbk = (code >> 12) % 16"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L251_C8", "label": "nm =", "type": "assigned_variable", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7538, 0.003, 2, 0.84, 0.3571, 931, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nm", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nm = nbm + nwm"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L252_C8", "label": "nk =", "type": "assigned_variable", "loc": [252, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [14, 2, 0.7568, 0.003, 2, 0.84, 0.4286, 233, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "nk", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " nk = nbk + nwk"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L254_C8", "label": "assertEqual()", "type": "expression", "loc": [254, 254], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7628, 0.003, 2, 0.84, 0.5, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_cramp(self.squares), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L255_C8", "label": "assertEqual()", "type": "expression", "loc": [255, 255], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7658, 0.003, 2, 0.84, 0.5714, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_backrankguard(self.squares), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L256_C8", "label": "assertEqual()", "type": "expression", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7688, 0.003, 2, 0.84, 0.6429, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_doublecorner(self.squares), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L257_C8", "label": "assertEqual()", "type": "expression", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7718, 0.003, 2, 0.84, 0.7143, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_center(self.squares), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L258_C8", "label": "assertEqual()", "type": "expression", "loc": [258, 258], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7748, 0.003, 2, 0.84, 0.7857, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_edge(self.squares), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L259_C8", "label": "assertEqual()", "type": "expression", "loc": [259, 260], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7793, 0.006, 2, 0.84, 0.8571, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_tempo(self.squares, nm, nbk,\n nbm, nwk, nwm), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L261_C8", "label": "assertEqual()", "type": "expression", "loc": [261, 263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7868, 0.009, 2, 0.84, 0.9286, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board._eval_playeropposition(self.squares, nwm,\n nwk, nbk, nbm, nm,\n nk), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L264_C8", "label": "assertEqual()", "type": "expression", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "vector": [8, 2, 0.7928, 0.003, 2, 0.84, 1.0, 299, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(self.board.utility(WHITE), -2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L266_C0", "label": "TestSuccessorFuncForBlack", "type": "class", "loc": [266, 295], "level": 0, "parent": null, "vector": [3, 0, 0.8423, 0.0901, 0, 0.66, 0.8824, 271, 0, 2, 0, 0, 878, 0, 9], "semantic": {"name": "TestSuccessorFuncForBlack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestSuccessorFuncForBlack(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n\n def testInitialBlackMoves(self):\n # Tests whether initial game moves are correct from\n # Black's perspective"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4", "label": "setUp", "type": "function", "loc": [267, 269], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L266_C0", "vector": [2, 1, 0.8048, 0.009, 1, 0.09, 0.0, 952, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L268_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [268, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4", "vector": [14, 2, 0.8048, 0.003, 2, 0.28, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L269_C8", "label": "self.board =", "type": "assigned_variable", "loc": [269, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4", "vector": [14, 2, 0.8078, 0.003, 2, 0.28, 1.0, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "label": "testInitialBlackMoves", "type": "function", "loc": [271, 295], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L266_C0", "vector": [2, 1, 0.8498, 0.0751, 1, 0.09, 1.0, 499, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "testInitialBlackMoves", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testInitialBlackMoves(self):\n # Tests whether initial game moves are correct from\n # Black's perspective\n moves = [m for m, _ in self.game.successors(self.board)]\n self.assertEqual(moves[0].affected_squares,\n [[17, BLACK | MAN, FREE],\n [23, FREE, BLACK | MAN]])\n self.assertEqual(moves[1].affected_squares,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L274_C8", "label": "moves =", "type": "assigned_variable", "loc": [274, 274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [14, 2, 0.8228, 0.003, 2, 0.49, 0.0, 130, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " moves = [m for m, _ in self.game.successors(self.board)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L275_C8", "label": "assertEqual()", "type": "expression", "loc": [275, 277], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8288, 0.009, 2, 0.49, 0.1429, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[17, BLACK | MAN, FREE],\n [23, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L278_C8", "label": "assertEqual()", "type": "expression", "loc": [278, 280], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8378, 0.009, 2, 0.49, 0.2857, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[1].affected_squares,\n [[18, BLACK | MAN, FREE],\n [23, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L281_C8", "label": "assertEqual()", "type": "expression", "loc": [281, 283], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8468, 0.009, 2, 0.49, 0.4286, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[2].affected_squares,\n [[18, BLACK | MAN, FREE],\n [24, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L284_C8", "label": "assertEqual()", "type": "expression", "loc": [284, 286], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8559, 0.009, 2, 0.49, 0.5714, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[3].affected_squares,\n [[19, BLACK | MAN, FREE],\n [24, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L287_C8", "label": "assertEqual()", "type": "expression", "loc": [287, 289], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8649, 0.009, 2, 0.49, 0.7143, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[4].affected_squares,\n [[19, BLACK | MAN, FREE],\n [25, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L290_C8", "label": "assertEqual()", "type": "expression", "loc": [290, 292], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8739, 0.009, 2, 0.49, 0.8571, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[5].affected_squares,\n [[20, BLACK | MAN, FREE],\n [25, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L293_C8", "label": "assertEqual()", "type": "expression", "loc": [293, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "vector": [8, 2, 0.8829, 0.009, 2, 0.49, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[6].affected_squares,\n [[20, BLACK | MAN, FREE],\n [26, FREE, BLACK | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L297_C0", "label": "TestSuccessorFuncForWhite", "type": "class", "loc": [297, 330], "level": 0, "parent": null, "vector": [3, 0, 0.9414, 0.1021, 0, 0.66, 0.9412, 606, 0, 2, 0, 0, 878, 0, 9], "semantic": {"name": "TestSuccessorFuncForWhite", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TestSuccessorFuncForWhite(unittest.TestCase):\n def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n # I'm cheating here ... white never moves first in\n # a real game, but I want to see that the moves\n # would work anyway.\n self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "label": "setUp", "type": "function", "loc": [298, 304], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L297_C0", "vector": [2, 1, 0.9039, 0.021, 1, 0.53, 0.0, 952, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "setUp", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def setUp(self):\n self.game = checkers.Checkers()\n self.board = self.game.curr_state\n # I'm cheating here ... white never moves first in\n # a real game, but I want to see that the moves\n # would work anyway.\n self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L299_C8", "label": "self.game = Checkers()", "type": "assigned_variable", "loc": [299, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "vector": [14, 2, 0.8979, 0.003, 2, 0.82, 0.0, 836, 3, 0, 0, 0, 264, 10, 1], "semantic": {"name": "self.game", "arg_names": [], "import_names": [], "rhs_call_name": "Checkers", "annotation": ""}, "snippet": " self.game = checkers.Checkers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L300_C8", "label": "self.board =", "type": "assigned_variable", "loc": [300, 300], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "vector": [14, 2, 0.9009, 0.003, 2, 0.82, 0.5, 39, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board = self.game.curr_state"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L304_C8", "label": "self.board.to_move =", "type": "assigned_variable", "loc": [304, 304], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "vector": [14, 2, 0.9129, 0.003, 2, 0.82, 1.0, 444, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.board.to_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.board.to_move = WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "label": "testInitialWhiteMoves", "type": "function", "loc": [306, 330], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L297_C0", "vector": [2, 1, 0.955, 0.0751, 1, 0.53, 1.0, 135, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "testInitialWhiteMoves", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def testInitialWhiteMoves(self):\n # Tests whether initial game moves are correct from\n # White's perspective\n moves = [m for m, _ in self.game.successors(self.board)]\n self.assertEqual(moves[0].affected_squares,\n [[34, WHITE | MAN, FREE],\n [29, FREE, WHITE | MAN]])\n self.assertEqual(moves[1].affected_squares,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L309_C8", "label": "moves =", "type": "assigned_variable", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [14, 2, 0.9279, 0.003, 2, 0.05, 0.0, 130, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " moves = [m for m, _ in self.game.successors(self.board)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L310_C8", "label": "assertEqual()", "type": "expression", "loc": [310, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.9339, 0.009, 2, 0.05, 0.1429, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[0].affected_squares,\n [[34, WHITE | MAN, FREE],\n [29, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L313_C8", "label": "assertEqual()", "type": "expression", "loc": [313, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.9429, 0.009, 2, 0.05, 0.2857, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[1].affected_squares,\n [[34, WHITE | MAN, FREE],\n [28, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L316_C8", "label": "assertEqual()", "type": "expression", "loc": [316, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.952, 0.009, 2, 0.05, 0.4286, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[2].affected_squares,\n [[35, WHITE | MAN, FREE],\n [30, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L319_C8", "label": "assertEqual()", "type": "expression", "loc": [319, 321], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.961, 0.009, 2, 0.05, 0.5714, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[3].affected_squares,\n [[35, WHITE | MAN, FREE],\n [29, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L322_C8", "label": "assertEqual()", "type": "expression", "loc": [322, 324], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.97, 0.009, 2, 0.05, 0.7143, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[4].affected_squares,\n [[36, WHITE | MAN, FREE],\n [31, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L325_C8", "label": "assertEqual()", "type": "expression", "loc": [325, 327], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.979, 0.009, 2, 0.05, 0.8571, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[5].affected_squares,\n [[36, WHITE | MAN, FREE],\n [30, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L328_C8", "label": "assertEqual()", "type": "expression", "loc": [328, 330], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "vector": [8, 2, 0.988, 0.009, 2, 0.05, 1.0, 299, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "assertEqual", "arg_names": [], "import_names": [], "rhs_call_name": "assertEqual", "annotation": ""}, "snippet": " self.assertEqual(moves[6].affected_squares,\n [[37, WHITE | MAN, FREE],\n [31, FREE, WHITE | MAN]])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:If_L332_C0", "label": "if", "type": "if", "loc": [332, 333], "level": 0, "parent": null, "vector": [4, 0, 0.9985, 0.006, 0, 0.66, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "if __name__ == '__main__':\n unittest.main()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L333_C4", "label": "main()", "type": "expression", "loc": [333, 333], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_360:If_L332_C0", "vector": [8, 1, 1.0, 0.003, 1, 0.88, 0.0, 624, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "main", "arg_names": [], "import_names": [], "rhs_call_name": "main", "annotation": ""}, "snippet": " unittest.main()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L17_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L16_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L33_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L32_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L52_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L51_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L87_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L86_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L110_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L102_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L114_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L129_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L135_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L129_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L139_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L150_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L152_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L148_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L147_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L158_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L170_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L168_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L167_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L177_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L184_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L187_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L185_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L184_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L200_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L199_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L210_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L212_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L213_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L214_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L215_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L216_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L219_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L220_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L211_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L210_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L224_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L223_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L231_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L238_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L243_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L238_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L247_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L249_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L250_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L254_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L255_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L259_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L261_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L245_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L266_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L268_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L267_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L266_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L275_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L278_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L281_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L284_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L287_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L290_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L271_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L293_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L297_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L299_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L298_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L304_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:ClassDef_L297_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Assign_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L319_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L325_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:FunctionDef_L306_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_360:If_L332_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_360:Expr_L333_C4"}]
import utils class Observer(object): def update(self, change): utils.abstract()
ajibawa-2023/Python-Code-Large/train/row_361
4
6
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_361:Import_L1_C0", "label": "utils import utils", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.1667, 0.1667, 0, 0.66, 0.0, 970, 0, 1, 0, 0, 970, 0, 0], "semantic": {"name": "utils", "arg_names": [], "import_names": ["utils"], "rhs_call_name": "", "annotation": ""}, "snippet": "import utils"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_361:ClassDef_L3_C0", "label": "Observer", "type": "class", "loc": [3, 5], "level": 0, "parent": null, "vector": [3, 0, 0.6667, 0.5, 0, 0.66, 1.0, 771, 0, 1, 0, 0, 186, 0, 1], "semantic": {"name": "Observer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Observer(object):\n def update(self, change):\n utils.abstract()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_361:FunctionDef_L4_C4", "label": "update", "type": "function", "loc": [4, 5], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_361:ClassDef_L3_C0", "vector": [2, 1, 0.75, 0.3333, 1, 0.91, 0.0, 637, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": ["self", "change"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def update(self, change):\n utils.abstract()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_361:Expr_L5_C8", "label": "abstract()", "type": "expression", "loc": [5, 5], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_361:FunctionDef_L4_C4", "vector": [8, 2, 0.8333, 0.1667, 2, 0.98, 0.0, 301, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "abstract", "arg_names": [], "import_names": [], "rhs_call_name": "abstract", "annotation": ""}, "snippet": " utils.abstract()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_361:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_361:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_361:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_361:Expr_L5_C8"}]
import re import sys class LinkRules(object): """Rules for recognizing external links.""" # For the link targets: proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc' extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto interwiki = r''' (?P<inter_wiki> [A-Z][a-zA-Z]+ ) : (?P<inter_page> .* ) ''' def __init__(self): self.addr_re = re.compile('|'.join([ self.extern, self.interwiki, ]), re.X | re.U) # for addresses class Rules(object): """Hold all the rules for generating regular expressions.""" # For the inline elements: proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc' link = r'''(?P<link> \[\[ (?P<link_target>.+?) \s* ([|] \s* (?P<link_text>.+?) \s*)? ]] )''' image = r'''(?P<image> {{ (?P<image_target>.+?) \s* ([|] \s* (?P<image_text>.+?) \s*)? }} )''' macro = r'''(?P<macro> << (?P<macro_name> \w+) (\( (?P<macro_args> .*?) \))? \s* ([|] \s* (?P<macro_text> .+?) \s* )? >> )''' code = r'(?P<code> {{{ (?P<code_text>.*?) }}} )' emph = r'(?P<emph> (?<!:)// )' # there must be no : in front of the // # avoids italic rendering in urls with # unknown protocols strong = r'(?P<strong> \*\* )' linebreak = r'(?P<break> \\\\ )' escape = r'(?P<escape> ~ (?P<escaped_char>\S) )' char = r'(?P<char> . )' # For the block elements: separator = r'(?P<separator> ^ \s* ---- \s* $ )' # horizontal line line = r'(?P<line> ^ \s* $ )' # empty line that separates paragraphs head = r'''(?P<head> ^ \s* (?P<head_head>=+) \s* (?P<head_text> .*? ) \s* (?P<head_tail>=*) \s* $ )''' text = r'(?P<text> .+ )' list = r'''(?P<list> ^ [ \t]* ([*][^*\#]|[\#][^\#*]).* $ ( \n[ \t]* [*\#]+.* $ )* )''' # Matches the whole list, separate items are parsed later. The # list *must* start with a single bullet. item = r'''(?P<item> ^ \s* (?P<item_head> [\#*]+) \s* (?P<item_text> .*?) $ )''' # Matches single list items pre = r'''(?P<pre> ^{{{ \s* $ (\n)? (?P<pre_text> ([\#]!(?P<pre_kind>\w*?)(\s+.*)?$)? (.|\n)+? ) (\n)? ^}}} \s*$ )''' pre_escape = r' ^(?P<indent>\s*) ~ (?P<rest> \}\}\} \s*) $' table = r'''(?P<table> ^ \s* [|].*? \s* [|]? \s* $ )''' # For splitting table cells: cell = r''' \| \s* ( (?P<head> [=][^|]+ ) | (?P<cell> ( %s | [^|])+ ) ) \s* ''' % '|'.join([link, macro, image, code]) def __init__(self, bloglike_lines=False, url_protocols=None, wiki_words=False): c = re.compile # For pre escaping, in creole 1.0 done with ~: self.pre_escape_re = c(self.pre_escape, re.M | re.X) # for link descriptions self.link_re = c('|'.join([self.image, self.linebreak, self.char]), re.X | re.U) # for list items self.item_re = c(self.item, re.X | re.U | re.M) # for table cells self.cell_re = c(self.cell, re.X | re.U) # For block elements: if bloglike_lines: self.text = r'(?P<text> .+ ) (?P<break> (?<!\\)$\n(?!\s*$) )?' self.block_re = c('|'.join([self.line, self.head, self.separator, self.pre, self.list, self.table, self.text]), re.X | re.U | re.M) # For inline elements: if url_protocols is not None: self.proto = '|'.join(re.escape(p) for p in url_protocols) self.url = r'''(?P<url> (^ | (?<=\s | [.,:;!?()/=])) (?P<escaped_url>~)? (?P<url_target> (?P<url_proto> %s ):\S+? ) ($ | (?=\s | [,.:;!?()] (\s | $))))''' % self.proto inline_elements = [self.link, self.url, self.macro, self.code, self.image, self.strong, self.emph, self.linebreak, self.escape, self.char] if wiki_words: import unicodedata up_case = u''.join(unichr(i) for i in xrange(sys.maxunicode) if unicodedata.category(unichr(i))=='Lu') self.wiki = ur'''(?P<wiki>[%s]\w+[%s]\w+)''' % (up_case, up_case) inline_elements.insert(3, self.wiki) self.inline_re = c('|'.join(inline_elements), re.X | re.U)
ajibawa-2023/Python-Code-Large/train/row_362
49
142
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_362:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.007, 0.007, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0141, 0.007, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "label": "LinkRules", "type": "class", "loc": [5, 20], "level": 0, "parent": null, "vector": [3, 0, 0.088, 0.1127, 0, 0.66, 0.6667, 15, 0, 1, 0, 0, 186, 0, 2], "semantic": {"name": "LinkRules", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class LinkRules(object):\n \"\"\"Rules for recognizing external links.\"\"\"\n\n # For the link targets:\n proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc'\n extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto\n interwiki = r'''\n (?P<inter_wiki> [A-Z][a-zA-Z]+ ) :"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L6_C4", "label": "expression", "type": "expression", "loc": [6, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "vector": [8, 1, 0.0423, 0.007, 1, 0.31, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Rules for recognizing external links.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L9_C4", "label": "proto =", "type": "assigned_variable", "loc": [9, 9], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "vector": [14, 1, 0.0634, 0.007, 1, 0.31, 0.25, 453, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "proto", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L10_C4", "label": "extern =", "type": "assigned_variable", "loc": [10, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "vector": [14, 1, 0.0704, 0.007, 1, 0.31, 0.5, 138, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "extern", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " extern = r'(?P<extern_addr>(?P<extern_proto>%s):.*)' % proto"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L11_C4", "label": "interwiki =", "type": "assigned_variable", "loc": [11, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "vector": [14, 1, 0.088, 0.0282, 1, 0.31, 0.75, 21, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "interwiki", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " interwiki = r'''\n (?P<inter_wiki> [A-Z][a-zA-Z]+ ) :\n (?P<inter_page> .* )\n '''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L16_C4", "label": "__init__", "type": "function", "loc": [16, 20], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "vector": [2, 1, 0.1268, 0.0352, 1, 0.31, 1.0, 555, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self):\n self.addr_re = re.compile('|'.join([\n self.extern,\n self.interwiki,\n ]), re.X | re.U) # for addresses"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L17_C8", "label": "self.addr_re = compile()", "type": "assigned_variable", "loc": [17, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L16_C4", "vector": [14, 2, 0.1303, 0.0282, 2, 0.37, 0.0, 185, 3, 2, 0, 0, 821, 10, 2], "semantic": {"name": "self.addr_re", "arg_names": [], "import_names": [], "rhs_call_name": "compile", "annotation": ""}, "snippet": " self.addr_re = re.compile('|'.join([\n self.extern,\n self.interwiki,\n ]), re.X | re.U) # for addresses"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "label": "Rules", "type": "class", "loc": [23, 142], "level": 0, "parent": null, "vector": [3, 0, 0.581, 0.8451, 0, 0.66, 1.0, 994, 0, 1, 0, 0, 186, 0, 18], "semantic": {"name": "Rules", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Rules(object):\n \"\"\"Hold all the rules for generating regular expressions.\"\"\"\n\n # For the inline elements:\n proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc'\n link = r'''(?P<link>\n \\[\\[\n (?P<link_target>.+?) \\s*"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L24_C4", "label": "expression", "type": "expression", "loc": [24, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [8, 1, 0.169, 0.007, 1, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Hold all the rules for generating regular expressions.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L27_C4", "label": "proto =", "type": "assigned_variable", "loc": [27, 27], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.1901, 0.007, 1, 0.35, 0.0476, 453, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "proto", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " proto = r'http|https|ftp|nntp|news|mailto|telnet|file|irc'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L28_C4", "label": "link =", "type": "assigned_variable", "loc": [28, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.2148, 0.0423, 1, 0.35, 0.0952, 880, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " link = r'''(?P<link>\n \\[\\[\n (?P<link_target>.+?) \\s*\n ([|] \\s* (?P<link_text>.+?) \\s*)?\n ]]\n )'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L34_C4", "label": "image =", "type": "assigned_variable", "loc": [34, 39], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.257, 0.0423, 1, 0.35, 0.1429, 505, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "image", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " image = r'''(?P<image>\n {{\n (?P<image_target>.+?) \\s*\n ([|] \\s* (?P<image_text>.+?) \\s*)?\n }}\n )'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L40_C4", "label": "macro =", "type": "assigned_variable", "loc": [40, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.3028, 0.0493, 1, 0.35, 0.1905, 518, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "macro", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " macro = r'''(?P<macro>\n <<\n (?P<macro_name> \\w+)\n (\\( (?P<macro_args> .*?) \\))? \\s*\n ([|] \\s* (?P<macro_text> .+?) \\s* )?\n >>\n )'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L47_C4", "label": "code =", "type": "assigned_variable", "loc": [47, 47], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.331, 0.007, 1, 0.35, 0.2381, 44, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "code", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " code = r'(?P<code> {{{ (?P<code_text>.*?) }}} )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L48_C4", "label": "emph =", "type": "assigned_variable", "loc": [48, 48], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.338, 0.007, 1, 0.35, 0.2857, 651, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "emph", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " emph = r'(?P<emph> (?<!:)// )' # there must be no : in front of the //"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L51_C4", "label": "strong =", "type": "assigned_variable", "loc": [51, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.3592, 0.007, 1, 0.35, 0.3333, 909, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "strong", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " strong = r'(?P<strong> \\*\\* )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L52_C4", "label": "linebreak =", "type": "assigned_variable", "loc": [52, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.3662, 0.007, 1, 0.35, 0.381, 50, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "linebreak", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " linebreak = r'(?P<break> \\\\\\\\ )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L53_C4", "label": "escape =", "type": "assigned_variable", "loc": [53, 53], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.3732, 0.007, 1, 0.35, 0.4286, 494, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "escape", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " escape = r'(?P<escape> ~ (?P<escaped_char>\\S) )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L54_C4", "label": "char =", "type": "assigned_variable", "loc": [54, 54], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.3803, 0.007, 1, 0.35, 0.4762, 272, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "char", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " char = r'(?P<char> . )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L57_C4", "label": "separator =", "type": "assigned_variable", "loc": [57, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.4014, 0.007, 1, 0.35, 0.5238, 539, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "separator", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " separator = r'(?P<separator> ^ \\s* ---- \\s* $ )' # horizontal line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L58_C4", "label": "line =", "type": "assigned_variable", "loc": [58, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.4085, 0.007, 1, 0.35, 0.5714, 373, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " line = r'(?P<line> ^ \\s* $ )' # empty line that separates paragraphs"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L59_C4", "label": "head =", "type": "assigned_variable", "loc": [59, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.4366, 0.0493, 1, 0.35, 0.619, 217, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "head", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " head = r'''(?P<head>\n ^ \\s*\n (?P<head_head>=+) \\s*\n (?P<head_text> .*? ) \\s*\n (?P<head_tail>=*) \\s*\n $\n )'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L66_C4", "label": "text =", "type": "assigned_variable", "loc": [66, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.4648, 0.007, 1, 0.35, 0.6667, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = r'(?P<text> .+ )'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L67_C4", "label": "list =", "type": "assigned_variable", "loc": [67, 70], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.4824, 0.0282, 1, 0.35, 0.7143, 430, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "list", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " list = r'''(?P<list>\n ^ [ \\t]* ([*][^*\\#]|[\\#][^\\#*]).* $\n ( \\n[ \\t]* [*\\#]+.* $ )*\n )''' # Matches the whole list, separate items are parsed later. The"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L72_C4", "label": "item =", "type": "assigned_variable", "loc": [72, 77], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.5246, 0.0423, 1, 0.35, 0.7619, 434, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " item = r'''(?P<item>\n ^ \\s*\n (?P<item_head> [\\#*]+) \\s*\n (?P<item_text> .*?)\n $\n )''' # Matches single list items"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L78_C4", "label": "pre =", "type": "assigned_variable", "loc": [78, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.581, 0.0704, 1, 0.35, 0.8095, 793, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "pre", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pre = r'''(?P<pre>\n ^{{{ \\s* $\n (\\n)?\n (?P<pre_text>\n ([\\#]!(?P<pre_kind>\\w*?)(\\s+.*)?$)?\n (.|\\n)+?\n )\n (\\n)?"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L88_C4", "label": "pre_escape =", "type": "assigned_variable", "loc": [88, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.6197, 0.007, 1, 0.35, 0.8571, 37, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "pre_escape", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pre_escape = r' ^(?P<indent>\\s*) ~ (?P<rest> \\}\\}\\} \\s*) $'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L89_C4", "label": "table =", "type": "assigned_variable", "loc": [89, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.6444, 0.0423, 1, 0.35, 0.9048, 338, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "table", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " table = r'''(?P<table>\n ^ \\s*\n [|].*? \\s*\n [|]? \\s*\n $\n )'''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L97_C4", "label": "cell =", "type": "assigned_variable", "loc": [97, 103], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [14, 1, 0.7042, 0.0493, 1, 0.35, 0.9524, 787, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "cell", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " cell = r'''\n \\| \\s*\n (\n (?P<head> [=][^|]+ ) |\n (?P<cell> ( %s | [^|])+ )\n ) \\s*\n ''' % '|'.join([link, macro, image, code])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "label": "__init__", "type": "function", "loc": [105, 142], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "vector": [2, 1, 0.8697, 0.2676, 1, 0.35, 1.0, 555, 0, 4, 0, 0, 0, 0, 17], "semantic": {"name": "__init__", "arg_names": ["self", "bloglike_lines", "url_protocols", "wiki_words"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, bloglike_lines=False, url_protocols=None,\n wiki_words=False):\n c = re.compile\n # For pre escaping, in creole 1.0 done with ~:\n self.pre_escape_re = c(self.pre_escape, re.M | re.X)\n # for link descriptions\n self.link_re = c('|'.join([self.image, self.linebreak,\n self.char]), re.X | re.U)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L107_C8", "label": "c =", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.7535, 0.007, 2, 0.22, 0.0, 411, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " c = re.compile"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L109_C8", "label": "self.pre_escape_re = c()", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.7676, 0.007, 2, 0.22, 0.0909, 147, 3, 2, 0, 0, 411, 10, 1], "semantic": {"name": "self.pre_escape_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.pre_escape_re = c(self.pre_escape, re.M | re.X)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L111_C8", "label": "self.link_re = c()", "type": "assigned_variable", "loc": [111, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.7852, 0.0141, 2, 0.22, 0.1818, 268, 3, 2, 0, 0, 411, 10, 2], "semantic": {"name": "self.link_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.link_re = c('|'.join([self.image, self.linebreak,\n self.char]), re.X | re.U)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L114_C8", "label": "self.item_re = c()", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.8028, 0.007, 2, 0.22, 0.2727, 959, 3, 2, 0, 0, 411, 10, 1], "semantic": {"name": "self.item_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.item_re = c(self.item, re.X | re.U | re.M)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L116_C8", "label": "self.cell_re = c()", "type": "assigned_variable", "loc": [116, 116], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.8169, 0.007, 2, 0.22, 0.3636, 410, 3, 2, 0, 0, 411, 10, 1], "semantic": {"name": "self.cell_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.cell_re = c(self.cell, re.X | re.U)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:If_L119_C8", "label": "if", "type": "if", "loc": [119, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [4, 2, 0.8415, 0.0141, 2, 0.22, 0.4545, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if bloglike_lines:\n self.text = r'(?P<text> .+ ) (?P<break> (?<!\\\\)$\\n(?!\\s*$) )?'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L120_C12", "label": "self.text =", "type": "assigned_variable", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:If_L119_C8", "vector": [14, 3, 0.8451, 0.007, 3, 0.58, 0.0, 320, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = r'(?P<text> .+ ) (?P<break> (?<!\\\\)$\\n(?!\\s*$) )?'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L121_C8", "label": "self.block_re = c()", "type": "assigned_variable", "loc": [121, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.8592, 0.0211, 2, 0.22, 0.5455, 966, 3, 2, 0, 0, 411, 10, 2], "semantic": {"name": "self.block_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.block_re = c('|'.join([self.line, self.head, self.separator,\n self.pre, self.list, self.table,\n self.text]), re.X | re.U | re.M)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:If_L126_C8", "label": "if", "type": "if", "loc": [126, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [4, 2, 0.8908, 0.0141, 2, 0.22, 0.6364, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if url_protocols is not None:\n self.proto = '|'.join(re.escape(p) for p in url_protocols)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L127_C12", "label": "self.proto = join()", "type": "assigned_variable", "loc": [127, 127], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:If_L126_C8", "vector": [14, 3, 0.8944, 0.007, 3, 0.43, 0.0, 761, 3, 1, 0, 0, 933, 10, 2], "semantic": {"name": "self.proto", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " self.proto = '|'.join(re.escape(p) for p in url_protocols)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L128_C8", "label": "self.url =", "type": "assigned_variable", "loc": [128, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.9155, 0.0352, 2, 0.22, 0.7273, 720, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.url", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.url = r'''(?P<url>\n (^ | (?<=\\s | [.,:;!?()/=]))\n (?P<escaped_url>~)?\n (?P<url_target> (?P<url_proto> %s ):\\S+? )\n ($ | (?=\\s | [,.:;!?()] (\\s | $))))''' % self.proto"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L133_C8", "label": "inline_elements =", "type": "assigned_variable", "loc": [133, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 0.9472, 0.0282, 2, 0.22, 0.8182, 751, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "inline_elements", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " inline_elements = [self.link, self.url, self.macro,\n self.code, self.image, self.strong,\n self.emph, self.linebreak,\n self.escape, self.char]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "label": "if", "type": "if", "loc": [137, 141], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [4, 2, 0.9789, 0.0352, 2, 0.22, 0.9091, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if wiki_words:\n import unicodedata\n up_case = u''.join(unichr(i) for i in xrange(sys.maxunicode)\n if unicodedata.category(unichr(i))=='Lu')\n inline_elements.insert(3, self.wiki)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Import_L138_C12", "label": "unicodedata import unicodedata", "type": "import", "loc": [138, 138], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "vector": [1, 3, 0.9718, 0.007, 3, 0.14, 0.0, 759, 0, 1, 0, 0, 759, 0, 0], "semantic": {"name": "unicodedata", "arg_names": [], "import_names": ["unicodedata"], "rhs_call_name": "", "annotation": ""}, "snippet": " import unicodedata"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L139_C12", "label": "up_case = join()", "type": "assigned_variable", "loc": [139, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "vector": [14, 3, 0.9824, 0.0141, 3, 0.14, 0.5, 19, 3, 1, 0, 0, 933, 10, 5], "semantic": {"name": "up_case", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " up_case = u''.join(unichr(i) for i in xrange(sys.maxunicode)\n if unicodedata.category(unichr(i))=='Lu')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L141_C12", "label": "insert()", "type": "expression", "loc": [141, 141], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "vector": [8, 3, 0.993, 0.007, 3, 0.14, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " inline_elements.insert(3, self.wiki)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L142_C8", "label": "self.inline_re = c()", "type": "assigned_variable", "loc": [142, 142], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "vector": [14, 2, 1.0, 0.007, 2, 0.22, 1.0, 1, 3, 2, 0, 0, 411, 10, 2], "semantic": {"name": "self.inline_re", "arg_names": [], "import_names": [], "rhs_call_name": "c", "annotation": ""}, "snippet": " self.inline_re = c('|'.join(inline_elements), re.X | re.U)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L10_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L34_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L52_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L58_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L66_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L72_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L78_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L88_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L97_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:If_L119_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:If_L119_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:If_L126_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:If_L126_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L127_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Import_L138_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:If_L137_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Expr_L141_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_362:FunctionDef_L105_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_362:Assign_L142_C8"}]
import games import copy import multiprocessing import time import random from controller import Controller from transpositiontable import TranspositionTable from globalconst import * class AlphaBetaController(Controller): def __init__(self, **props): self._model = props['model'] self._view = props['view'] self._end_turn_event = props['end_turn_event'] self._highlights = [] self._search_time = props['searchtime'] # in seconds self._before_turn_event = None self._parent_conn, self._child_conn = multiprocessing.Pipe() self._term_event = multiprocessing.Event() self.process = multiprocessing.Process() self._start_time = None self._call_id = 0 self._trans_table = TranspositionTable(50000) def set_before_turn_event(self, evt): self._before_turn_event = evt def add_highlights(self): for h in self._highlights: self._view.highlight_square(h, OUTLINE_COLOR) def remove_highlights(self): for h in self._highlights: self._view.highlight_square(h, DARK_SQUARES) def start_turn(self): if self._model.terminal_test(): self._before_turn_event() self._model.curr_state.attach(self._view) return self._view.update_statusbar('Thinking ...') self.process = multiprocessing.Process(target=calc_move, args=(self._model, self._trans_table, self._search_time, self._term_event, self._child_conn)) self._start_time = time.time() self.process.daemon = True self.process.start() self._view.canvas.after(100, self.get_move) def get_move(self): #if self._term_event.is_set() and self._model.curr_state.ok_to_move: # self._end_turn_event() # return self._highlights = [] moved = self._parent_conn.poll() while (not moved and (time.time() - self._start_time) < self._search_time * 2): self._call_id = self._view.canvas.after(500, self.get_move) return self._view.canvas.after_cancel(self._call_id) move = self._parent_conn.recv() #if self._model.curr_state.ok_to_move: self._before_turn_event() # highlight remaining board squares used in move step = 2 if len(move.affected_squares) > 2 else 1 for m in move.affected_squares[0::step]: idx = m[0] self._view.highlight_square(idx, OUTLINE_COLOR) self._highlights.append(idx) self._model.curr_state.attach(self._view) self._model.make_move(move, None, True, True, self._view.get_annotation()) # a new move obliterates any more redo's along a branch of the game tree self._model.curr_state.delete_redo_list() self._end_turn_event() def set_search_time(self, time): self._search_time = time # in seconds def stop_process(self): self._term_event.set() self._view.canvas.after_cancel(self._call_id) def end_turn(self): self._view.update_statusbar() self._model.curr_state.detach(self._view) def longest_of(moves): length = -1 selected = None for move in moves: l = len(move.affected_squares) if l > length: length = l selected = move return selected def calc_move(model, table, search_time, term_event, child_conn): move = None term_event.clear() captures = model.captures_available() if captures: time.sleep(0.7) move = longest_of(captures) else: depth = 0 start_time = time.time() curr_time = start_time checkpoint = start_time model_copy = copy.deepcopy(model) while 1: depth += 1 table.set_hash_move(depth, -1) move = games.alphabeta_search(model_copy.curr_state, model_copy, depth) checkpoint = curr_time curr_time = time.time() rem_time = search_time - (curr_time - checkpoint) if term_event.is_set(): # a signal means terminate term_event.clear() move = None break if (curr_time - start_time > search_time or ((curr_time - checkpoint) * 2) > rem_time or depth > MAXDEPTH): break child_conn.send(move) #model.curr_state.ok_to_move = True
ajibawa-2023/Python-Code-Large/train/row_364
99
134
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_364:Import_L1_C0", "label": "games import games", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0075, 0.0075, 0, 0.66, 0.0, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "games", "arg_names": [], "import_names": ["games"], "rhs_call_name": "", "annotation": ""}, "snippet": "import games"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Import_L2_C0", "label": "copy import copy", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0149, 0.0075, 0, 0.66, 0.1, 739, 0, 1, 0, 0, 739, 0, 0], "semantic": {"name": "copy", "arg_names": [], "import_names": ["copy"], "rhs_call_name": "", "annotation": ""}, "snippet": "import copy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Import_L3_C0", "label": "multiprocessing import multiprocessing", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0224, 0.0075, 0, 0.66, 0.2, 901, 0, 1, 0, 0, 901, 0, 0], "semantic": {"name": "multiprocessing", "arg_names": [], "import_names": ["multiprocessing"], "rhs_call_name": "", "annotation": ""}, "snippet": "import multiprocessing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Import_L4_C0", "label": "time import time", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0299, 0.0075, 0, 0.66, 0.3, 654, 0, 1, 0, 0, 654, 0, 0], "semantic": {"name": "time", "arg_names": [], "import_names": ["time"], "rhs_call_name": "", "annotation": ""}, "snippet": "import time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Import_L5_C0", "label": "random import random", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0373, 0.0075, 0, 0.66, 0.4, 715, 0, 1, 0, 0, 715, 0, 0], "semantic": {"name": "random", "arg_names": [], "import_names": ["random"], "rhs_call_name": "", "annotation": ""}, "snippet": "import random"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:ImportFrom_L6_C0", "label": "from controller import Controller", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0448, 0.0075, 0, 0.66, 0.5, 360, 0, 1, 0, 0, 360, 0, 0], "semantic": {"name": "controller", "arg_names": [], "import_names": ["Controller"], "rhs_call_name": "", "annotation": ""}, "snippet": "from controller import Controller"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:ImportFrom_L7_C0", "label": "from transpositiontable import TranspositionTable", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0522, 0.0075, 0, 0.66, 0.6, 601, 0, 1, 0, 0, 601, 0, 0], "semantic": {"name": "transpositiontable", "arg_names": [], "import_names": ["TranspositionTable"], "rhs_call_name": "", "annotation": ""}, "snippet": "from transpositiontable import TranspositionTable"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:ImportFrom_L8_C0", "label": "from globalconst import *", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0597, 0.0075, 0, 0.66, 0.7, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from globalconst import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "label": "AlphaBetaController", "type": "class", "loc": [10, 91], "level": 0, "parent": null, "vector": [3, 0, 0.3769, 0.6119, 0, 0.66, 0.8, 201, 0, 9, 0, 0, 93, 0, 32], "semantic": {"name": "AlphaBetaController", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AlphaBetaController(Controller):\n def __init__(self, **props):\n self._model = props['model']\n self._view = props['view']\n self._end_turn_event = props['end_turn_event']\n self._highlights = []\n self._search_time = props['searchtime'] # in seconds\n self._before_turn_event = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "label": "__init__", "type": "function", "loc": [11, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.1269, 0.097, 1, 0.71, 0.0, 555, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "__init__", "arg_names": ["self", "props"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, **props):\n self._model = props['model']\n self._view = props['view']\n self._end_turn_event = props['end_turn_event']\n self._highlights = []\n self._search_time = props['searchtime'] # in seconds\n self._before_turn_event = None\n self._parent_conn, self._child_conn = multiprocessing.Pipe()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L12_C8", "label": "self._model =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.0896, 0.0075, 2, 0.89, 0.0, 580, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._model = props['model']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L13_C8", "label": "self._view =", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.097, 0.0075, 2, 0.89, 0.0909, 625, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._view", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._view = props['view']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L14_C8", "label": "self._end_turn_event =", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1045, 0.0075, 2, 0.89, 0.1818, 694, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._end_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._end_turn_event = props['end_turn_event']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L15_C8", "label": "self._highlights =", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1119, 0.0075, 2, 0.89, 0.2727, 150, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._highlights", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._highlights = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L16_C8", "label": "self._search_time =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1194, 0.0075, 2, 0.89, 0.3636, 339, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._search_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._search_time = props['searchtime'] # in seconds"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L17_C8", "label": "self._before_turn_event =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1269, 0.0075, 2, 0.89, 0.4545, 569, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._before_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._before_turn_event = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L18_C8", "label": " = Pipe()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1343, 0.0075, 2, 0.89, 0.5455, 0, 3, 0, 0, 0, 188, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "Pipe", "annotation": ""}, "snippet": " self._parent_conn, self._child_conn = multiprocessing.Pipe()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L19_C8", "label": "self._term_event = Event()", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1418, 0.0075, 2, 0.89, 0.6364, 951, 3, 0, 0, 0, 9, 10, 1], "semantic": {"name": "self._term_event", "arg_names": [], "import_names": [], "rhs_call_name": "Event", "annotation": ""}, "snippet": " self._term_event = multiprocessing.Event()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L20_C8", "label": "self.process = Process()", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1493, 0.0075, 2, 0.89, 0.7273, 789, 3, 0, 0, 0, 303, 10, 1], "semantic": {"name": "self.process", "arg_names": [], "import_names": [], "rhs_call_name": "Process", "annotation": ""}, "snippet": " self.process = multiprocessing.Process()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L21_C8", "label": "self._start_time =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1567, 0.0075, 2, 0.89, 0.8182, 910, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self._start_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._start_time = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L22_C8", "label": "self._call_id =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1642, 0.0075, 2, 0.89, 0.9091, 502, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self._call_id", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._call_id = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L23_C8", "label": "self._trans_table = TranspositionTable()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "vector": [14, 2, 0.1716, 0.0075, 2, 0.89, 1.0, 942, 3, 1, 0, 0, 391, 10, 1], "semantic": {"name": "self._trans_table", "arg_names": [], "import_names": [], "rhs_call_name": "TranspositionTable", "annotation": ""}, "snippet": " self._trans_table = TranspositionTable(50000)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L25_C4", "label": "set_before_turn_event", "type": "function", "loc": [25, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.1903, 0.0149, 1, 0.71, 0.125, 582, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "set_before_turn_event", "arg_names": ["self", "evt"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set_before_turn_event(self, evt):\n self._before_turn_event = evt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L26_C8", "label": "self._before_turn_event =", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L25_C4", "vector": [14, 2, 0.194, 0.0075, 2, 0.44, 0.0, 569, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._before_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._before_turn_event = evt"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L28_C4", "label": "add_highlights", "type": "function", "loc": [28, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.2164, 0.0224, 1, 0.71, 0.25, 23, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_highlights", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_highlights(self):\n for h in self._highlights:\n self._view.highlight_square(h, OUTLINE_COLOR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:For_L29_C8", "label": "for h", "type": "for", "loc": [29, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L28_C4", "vector": [6, 2, 0.2201, 0.0149, 2, 0.76, 0.0, 686, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for h in self._highlights:\n self._view.highlight_square(h, OUTLINE_COLOR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L30_C12", "label": "highlight_square()", "type": "expression", "loc": [30, 30], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L29_C8", "vector": [8, 3, 0.2239, 0.0075, 3, 0.41, 0.0, 240, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "highlight_square", "arg_names": [], "import_names": [], "rhs_call_name": "highlight_square", "annotation": ""}, "snippet": " self._view.highlight_square(h, OUTLINE_COLOR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L32_C4", "label": "remove_highlights", "type": "function", "loc": [32, 34], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.2463, 0.0224, 1, 0.71, 0.375, 879, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "remove_highlights", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def remove_highlights(self):\n for h in self._highlights:\n self._view.highlight_square(h, DARK_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:For_L33_C8", "label": "for h", "type": "for", "loc": [33, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L32_C4", "vector": [6, 2, 0.25, 0.0149, 2, 0.9, 0.0, 686, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "h", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for h in self._highlights:\n self._view.highlight_square(h, DARK_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L34_C12", "label": "highlight_square()", "type": "expression", "loc": [34, 34], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L33_C8", "vector": [8, 3, 0.2537, 0.0075, 3, 0.74, 0.0, 240, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "highlight_square", "arg_names": [], "import_names": [], "rhs_call_name": "highlight_square", "annotation": ""}, "snippet": " self._view.highlight_square(h, DARK_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "label": "start_turn", "type": "function", "loc": [36, 51], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.3246, 0.1194, 1, 0.71, 0.5, 498, 0, 1, 0, 0, 0, 0, 8], "semantic": {"name": "start_turn", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def start_turn(self):\n if self._model.terminal_test():\n self._before_turn_event()\n self._model.curr_state.attach(self._view)\n return\n self._view.update_statusbar('Thinking ...')\n self.process = multiprocessing.Process(target=calc_move,\n args=(self._model,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "label": "if", "type": "if", "loc": [37, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [4, 2, 0.2873, 0.0299, 2, 0.42, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._model.terminal_test():\n self._before_turn_event()\n self._model.curr_state.attach(self._view)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L38_C12", "label": "_before_turn_event()", "type": "expression", "loc": [38, 38], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "vector": [8, 3, 0.2836, 0.0075, 3, 0.17, 0.0, 695, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_before_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "_before_turn_event", "annotation": ""}, "snippet": " self._before_turn_event()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L39_C12", "label": "attach()", "type": "expression", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "vector": [8, 3, 0.291, 0.0075, 3, 0.17, 0.5, 522, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "attach", "arg_names": [], "import_names": [], "rhs_call_name": "attach", "annotation": ""}, "snippet": " self._model.curr_state.attach(self._view)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L40_C12", "label": "return", "type": "return", "loc": [40, 40], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "vector": [13, 3, 0.2985, 0.0075, 3, 0.17, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L41_C8", "label": "update_statusbar()", "type": "expression", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [8, 2, 0.306, 0.0075, 2, 0.42, 0.1667, 743, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "update_statusbar", "arg_names": [], "import_names": [], "rhs_call_name": "update_statusbar", "annotation": ""}, "snippet": " self._view.update_statusbar('Thinking ...')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L42_C8", "label": "self.process = Process()", "type": "assigned_variable", "loc": [42, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [14, 2, 0.3321, 0.0448, 2, 0.42, 0.3333, 789, 3, 2, 0, 0, 303, 10, 1], "semantic": {"name": "self.process", "arg_names": [], "import_names": [], "rhs_call_name": "Process", "annotation": ""}, "snippet": " self.process = multiprocessing.Process(target=calc_move,\n args=(self._model,\n self._trans_table,\n self._search_time,\n self._term_event,\n self._child_conn))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L48_C8", "label": "self._start_time = time()", "type": "assigned_variable", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [14, 2, 0.3582, 0.0075, 2, 0.42, 0.5, 910, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "self._start_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " self._start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L49_C8", "label": "self.process.daemon =", "type": "assigned_variable", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [14, 2, 0.3657, 0.0075, 2, 0.42, 0.6667, 230, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.process.daemon", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.process.daemon = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L50_C8", "label": "start()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [8, 2, 0.3731, 0.0075, 2, 0.42, 0.8333, 511, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "start", "annotation": ""}, "snippet": " self.process.start()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L51_C8", "label": "after()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "vector": [8, 2, 0.3806, 0.0075, 2, 0.42, 1.0, 937, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "after", "arg_names": [], "import_names": [], "rhs_call_name": "after", "annotation": ""}, "snippet": " self._view.canvas.after(100, self.get_move)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "label": "get_move", "type": "function", "loc": [53, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.4963, 0.209, 1, 0.71, 0.625, 23, 0, 1, 0, 0, 0, 0, 14], "semantic": {"name": "get_move", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_move(self):\n #if self._term_event.is_set() and self._model.curr_state.ok_to_move:\n # self._end_turn_event()\n # return\n self._highlights = []\n moved = self._parent_conn.poll()\n while (not moved and (time.time() - self._start_time)\n < self._search_time * 2):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L57_C8", "label": "self._highlights =", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [14, 2, 0.4254, 0.0075, 2, 0.11, 0.0, 150, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self._highlights", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._highlights = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L58_C8", "label": "moved = poll()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [14, 2, 0.4328, 0.0075, 2, 0.11, 0.0909, 666, 3, 0, 0, 0, 182, 10, 1], "semantic": {"name": "moved", "arg_names": [], "import_names": [], "rhs_call_name": "poll", "annotation": ""}, "snippet": " moved = self._parent_conn.poll()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8", "label": "while", "type": "while", "loc": [59, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [5, 2, 0.4515, 0.0299, 2, 0.11, 0.1818, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while (not moved and (time.time() - self._start_time)\n < self._search_time * 2):\n self._call_id = self._view.canvas.after(500, self.get_move)\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L61_C12", "label": "self._call_id = after()", "type": "assigned_variable", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8", "vector": [14, 3, 0.4552, 0.0075, 3, 0.32, 0.0, 502, 3, 2, 0, 0, 937, 10, 1], "semantic": {"name": "self._call_id", "arg_names": [], "import_names": [], "rhs_call_name": "after", "annotation": ""}, "snippet": " self._call_id = self._view.canvas.after(500, self.get_move)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L62_C12", "label": "return", "type": "return", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8", "vector": [13, 3, 0.4627, 0.0075, 3, 0.32, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L63_C8", "label": "after_cancel()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.4701, 0.0075, 2, 0.11, 0.2727, 953, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "after_cancel", "arg_names": [], "import_names": [], "rhs_call_name": "after_cancel", "annotation": ""}, "snippet": " self._view.canvas.after_cancel(self._call_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L64_C8", "label": "move = recv()", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [14, 2, 0.4776, 0.0075, 2, 0.11, 0.3636, 856, 3, 0, 0, 0, 178, 10, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "recv", "annotation": ""}, "snippet": " move = self._parent_conn.recv()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L66_C8", "label": "_before_turn_event()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.4925, 0.0075, 2, 0.11, 0.4545, 695, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_before_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "_before_turn_event", "annotation": ""}, "snippet": " self._before_turn_event()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L69_C8", "label": "step =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [14, 2, 0.5149, 0.0075, 2, 0.11, 0.5455, 880, 8, 0, 0, 0, 0, 0, 1], "semantic": {"name": "step", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " step = 2 if len(move.affected_squares) > 2 else 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "label": "for m", "type": "for", "loc": [70, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [6, 2, 0.5336, 0.0299, 2, 0.11, 0.6364, 711, 6, 0, 0, 0, 0, 0, 2], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for m in move.affected_squares[0::step]:\n idx = m[0]\n self._view.highlight_square(idx, OUTLINE_COLOR)\n self._highlights.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L71_C12", "label": "idx =", "type": "assigned_variable", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "vector": [14, 3, 0.5299, 0.0075, 3, 0.51, 0.0, 187, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "idx", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idx = m[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L72_C12", "label": "highlight_square()", "type": "expression", "loc": [72, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "vector": [8, 3, 0.5373, 0.0075, 3, 0.51, 0.5, 240, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "highlight_square", "arg_names": [], "import_names": [], "rhs_call_name": "highlight_square", "annotation": ""}, "snippet": " self._view.highlight_square(idx, OUTLINE_COLOR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L73_C12", "label": "append()", "type": "expression", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "vector": [8, 3, 0.5448, 0.0075, 3, 0.51, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self._highlights.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L75_C8", "label": "attach()", "type": "expression", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.5597, 0.0075, 2, 0.11, 0.7273, 522, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "attach", "arg_names": [], "import_names": [], "rhs_call_name": "attach", "annotation": ""}, "snippet": " self._model.curr_state.attach(self._view)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L76_C8", "label": "make_move()", "type": "expression", "loc": [76, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.5709, 0.0149, 2, 0.11, 0.8182, 580, 3, 5, 0, 0, 0, 0, 2], "semantic": {"name": "make_move", "arg_names": [], "import_names": [], "rhs_call_name": "make_move", "annotation": ""}, "snippet": " self._model.make_move(move, None, True, True,\n self._view.get_annotation())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L79_C8", "label": "delete_redo_list()", "type": "expression", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.5896, 0.0075, 2, 0.11, 0.9091, 878, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "delete_redo_list", "arg_names": [], "import_names": [], "rhs_call_name": "delete_redo_list", "annotation": ""}, "snippet": " self._model.curr_state.delete_redo_list()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L80_C8", "label": "_end_turn_event()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "vector": [8, 2, 0.597, 0.0075, 2, 0.11, 1.0, 724, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_end_turn_event", "arg_names": [], "import_names": [], "rhs_call_name": "_end_turn_event", "annotation": ""}, "snippet": " self._end_turn_event()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L82_C4", "label": "set_search_time", "type": "function", "loc": [82, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.6157, 0.0149, 1, 0.71, 0.75, 29, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "set_search_time", "arg_names": ["self", "time"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set_search_time(self, time):\n self._search_time = time # in seconds"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L83_C8", "label": "self._search_time =", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L82_C4", "vector": [14, 2, 0.6194, 0.0075, 2, 0.67, 0.0, 339, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._search_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._search_time = time # in seconds"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4", "label": "stop_process", "type": "function", "loc": [85, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.6418, 0.0224, 1, 0.71, 0.875, 116, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "stop_process", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def stop_process(self):\n self._term_event.set()\n self._view.canvas.after_cancel(self._call_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L86_C8", "label": "set()", "type": "expression", "loc": [86, 86], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4", "vector": [8, 2, 0.6418, 0.0075, 2, 0.06, 0.0, 21, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._term_event.set()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L87_C8", "label": "after_cancel()", "type": "expression", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4", "vector": [8, 2, 0.6493, 0.0075, 2, 0.06, 1.0, 953, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "after_cancel", "arg_names": [], "import_names": [], "rhs_call_name": "after_cancel", "annotation": ""}, "snippet": " self._view.canvas.after_cancel(self._call_id)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4", "label": "end_turn", "type": "function", "loc": [89, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "vector": [2, 1, 0.6716, 0.0224, 1, 0.71, 1.0, 672, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "end_turn", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def end_turn(self):\n self._view.update_statusbar()\n self._model.curr_state.detach(self._view)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L90_C8", "label": "update_statusbar()", "type": "expression", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4", "vector": [8, 2, 0.6716, 0.0075, 2, 0.82, 0.0, 743, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update_statusbar", "arg_names": [], "import_names": [], "rhs_call_name": "update_statusbar", "annotation": ""}, "snippet": " self._view.update_statusbar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L91_C8", "label": "detach()", "type": "expression", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4", "vector": [8, 2, 0.6791, 0.0075, 2, 0.82, 1.0, 717, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "detach", "arg_names": [], "import_names": [], "rhs_call_name": "detach", "annotation": ""}, "snippet": " self._model.curr_state.detach(self._view)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "label": "longest_of", "type": "function", "loc": [93, 101], "level": 0, "parent": null, "vector": [2, 0, 0.7239, 0.0672, 0, 0.66, 0.9, 346, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "longest_of", "arg_names": ["moves"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def longest_of(moves):\n length = -1\n selected = None\n for move in moves:\n l = len(move.affected_squares)\n if l > length:\n length = l\n selected = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L94_C4", "label": "length =", "type": "assigned_variable", "loc": [94, 94], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "vector": [14, 1, 0.7015, 0.0075, 1, 0.42, 0.0, 221, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " length = -1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L95_C4", "label": "selected =", "type": "assigned_variable", "loc": [95, 95], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "vector": [14, 1, 0.709, 0.0075, 1, 0.42, 0.3333, 73, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "selected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " selected = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4", "label": "for move", "type": "for", "loc": [96, 100], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "vector": [6, 1, 0.7313, 0.0373, 1, 0.42, 0.6667, 856, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for move in moves:\n l = len(move.affected_squares)\n if l > length:\n length = l\n selected = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L97_C8", "label": "l = len()", "type": "assigned_variable", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4", "vector": [14, 2, 0.7239, 0.0075, 2, 0.37, 0.0, 810, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "l", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " l = len(move.affected_squares)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8", "label": "if", "type": "if", "loc": [98, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4", "vector": [4, 2, 0.7388, 0.0224, 2, 0.37, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if l > length:\n length = l\n selected = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L99_C12", "label": "length =", "type": "assigned_variable", "loc": [99, 99], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8", "vector": [14, 3, 0.7388, 0.0075, 3, 0.52, 0.0, 221, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "length", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " length = l"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L100_C12", "label": "selected =", "type": "assigned_variable", "loc": [100, 100], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8", "vector": [14, 3, 0.7463, 0.0075, 3, 0.52, 1.0, 73, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "selected", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " selected = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L101_C4", "label": "return", "type": "return", "loc": [101, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "vector": [13, 1, 0.7537, 0.0075, 1, 0.42, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return selected"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "label": "calc_move", "type": "function", "loc": [103, 133], "level": 0, "parent": null, "vector": [2, 0, 0.8806, 0.2313, 0, 0.66, 1.0, 241, 0, 5, 0, 0, 0, 0, 12], "semantic": {"name": "calc_move", "arg_names": ["model", "table", "search_time", "term_event", "child_conn"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def calc_move(model, table, search_time, term_event, child_conn):\n move = None\n term_event.clear()\n captures = model.captures_available()\n if captures:\n time.sleep(0.7)\n move = longest_of(captures)\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L104_C4", "label": "move =", "type": "assigned_variable", "loc": [104, 104], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "vector": [14, 1, 0.7761, 0.0075, 1, 0.39, 0.0, 856, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " move = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L105_C4", "label": "clear()", "type": "expression", "loc": [105, 105], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "vector": [8, 1, 0.7836, 0.0075, 1, 0.39, 0.25, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " term_event.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L106_C4", "label": "captures = captures_available()", "type": "assigned_variable", "loc": [106, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "vector": [14, 1, 0.791, 0.0075, 1, 0.39, 0.5, 890, 3, 0, 0, 0, 389, 10, 1], "semantic": {"name": "captures", "arg_names": [], "import_names": [], "rhs_call_name": "captures_available", "annotation": ""}, "snippet": " captures = model.captures_available()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "label": "if", "type": "if", "loc": [107, 132], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "vector": [4, 1, 0.8918, 0.194, 1, 0.39, 0.75, 0, 2, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if captures:\n time.sleep(0.7)\n move = longest_of(captures)\n else:\n depth = 0\n start_time = time.time()\n curr_time = start_time\n checkpoint = start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L108_C8", "label": "sleep()", "type": "expression", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [8, 2, 0.806, 0.0075, 2, 0.58, 0.0, 476, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "sleep", "arg_names": [], "import_names": [], "rhs_call_name": "sleep", "annotation": ""}, "snippet": " time.sleep(0.7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L109_C8", "label": "move = longest_of()", "type": "assigned_variable", "loc": [109, 109], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8134, 0.0075, 2, 0.58, 0.1429, 856, 3, 1, 0, 0, 346, 10, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "longest_of", "annotation": ""}, "snippet": " move = longest_of(captures)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L111_C8", "label": "depth =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8284, 0.0075, 2, 0.58, 0.2857, 341, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "depth", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " depth = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L112_C8", "label": "start_time = time()", "type": "assigned_variable", "loc": [112, 112], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8358, 0.0075, 2, 0.58, 0.4286, 511, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "start_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " start_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L113_C8", "label": "curr_time =", "type": "assigned_variable", "loc": [113, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8433, 0.0075, 2, 0.58, 0.5714, 397, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "curr_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " curr_time = start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L114_C8", "label": "checkpoint =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8507, 0.0075, 2, 0.58, 0.7143, 187, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "checkpoint", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " checkpoint = start_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L115_C8", "label": "model_copy = deepcopy()", "type": "assigned_variable", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [14, 2, 0.8582, 0.0075, 2, 0.58, 0.8571, 665, 3, 1, 0, 0, 44, 10, 1], "semantic": {"name": "model_copy", "arg_names": [], "import_names": [], "rhs_call_name": "deepcopy", "annotation": ""}, "snippet": " model_copy = copy.deepcopy(model)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "label": "while", "type": "while", "loc": [116, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "vector": [5, 2, 0.9254, 0.1269, 2, 0.58, 1.0, 0, 1, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while 1:\n depth += 1\n table.set_hash_move(depth, -1)\n move = games.alphabeta_search(model_copy.curr_state,\n model_copy,\n depth)\n checkpoint = curr_time\n curr_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L118_C12", "label": "set_hash_move()", "type": "expression", "loc": [118, 118], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [8, 3, 0.8806, 0.0075, 3, 0.77, 0.0, 928, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "set_hash_move", "arg_names": [], "import_names": [], "rhs_call_name": "set_hash_move", "annotation": ""}, "snippet": " table.set_hash_move(depth, -1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L119_C12", "label": "move = alphabeta_search()", "type": "assigned_variable", "loc": [119, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [14, 3, 0.8955, 0.0224, 3, 0.77, 0.1667, 856, 3, 3, 0, 0, 502, 10, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "alphabeta_search", "annotation": ""}, "snippet": " move = games.alphabeta_search(model_copy.curr_state,\n model_copy,\n depth)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L122_C12", "label": "checkpoint =", "type": "assigned_variable", "loc": [122, 122], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [14, 3, 0.9104, 0.0075, 3, 0.77, 0.3333, 187, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "checkpoint", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " checkpoint = curr_time"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L123_C12", "label": "curr_time = time()", "type": "assigned_variable", "loc": [123, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [14, 3, 0.9179, 0.0075, 3, 0.77, 0.5, 397, 3, 0, 0, 0, 654, 10, 1], "semantic": {"name": "curr_time", "arg_names": [], "import_names": [], "rhs_call_name": "time", "annotation": ""}, "snippet": " curr_time = time.time()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L124_C12", "label": "rem_time =", "type": "assigned_variable", "loc": [124, 124], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [14, 3, 0.9254, 0.0075, 3, 0.77, 0.6667, 345, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "rem_time", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rem_time = search_time - (curr_time - checkpoint)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12", "label": "if", "type": "if", "loc": [125, 128], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [4, 3, 0.944, 0.0299, 3, 0.77, 0.8333, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if term_event.is_set(): # a signal means terminate\n term_event.clear()\n move = None\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L126_C16", "label": "clear()", "type": "expression", "loc": [126, 126], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12", "vector": [8, 4, 0.9403, 0.0075, 4, 0.7, 0.0, 712, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "clear", "arg_names": [], "import_names": [], "rhs_call_name": "clear", "annotation": ""}, "snippet": " term_event.clear()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L127_C16", "label": "move =", "type": "assigned_variable", "loc": [127, 127], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12", "vector": [14, 4, 0.9478, 0.0075, 4, 0.7, 1.0, 856, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " move = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:If_L129_C12", "label": "if", "type": "if", "loc": [129, 132], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "vector": [4, 3, 0.9739, 0.0299, 3, 0.77, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if (curr_time - start_time > search_time or\n ((curr_time - checkpoint) * 2) > rem_time or\n depth > MAXDEPTH):\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L133_C4", "label": "send()", "type": "expression", "loc": [133, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "vector": [8, 1, 0.9925, 0.0075, 1, 0.39, 1.0, 826, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "send", "arg_names": [], "import_names": [], "rhs_call_name": "send", "annotation": ""}, "snippet": " child_conn.send(move)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L28_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L28_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:For_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L29_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L30_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:For_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L33_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L34_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L39_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L37_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L36_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L59_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L62_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L72_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L53_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L86_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:ClassDef_L10_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L94_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:For_L96_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L99_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L98_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L93_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Return_L101_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L104_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L105_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L106_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L112_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L113_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L107_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L119_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L122_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L124_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L126_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:If_L125_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Assign_L127_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:While_L116_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_364:If_L129_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_364:FunctionDef_L103_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_364:Expr_L133_C4"}]
from goal import Goal from composite import CompositeGoal class Goal_OneKingAttack(CompositeGoal): def __init__(self, owner): CompositeGoal.__init__(self, owner) def activate(self): self.status = self.ACTIVE self.removeAllSubgoals() # because goals are *pushed* onto the front of the subgoal list they must # be added in reverse order. self.addSubgoal(Goal_MoveTowardEnemy(self.owner)) self.addSubgoal(Goal_PinEnemy(self.owner)) def process(self): self.activateIfInactive() return self.processSubgoals() def terminate(self): self.status = self.INACTIVE class Goal_MoveTowardEnemy(Goal): def __init__(self, owner): Goal.__init__(self, owner) def activate(self): self.status = self.ACTIVE def process(self): # if status is inactive, activate self.activateIfInactive() # only moves (not captures) are a valid goal if self.owner.captures: self.status = self.FAILED return # identify player king and enemy king plr_color = self.owner.to_move enemy_color = self.owner.enemy player = self.owner.get_pieces(plr_color)[0] p_idx, _ = player p_row, p_col = self.owner.row_col_for_index(p_idx) enemy = self.owner.get_pieces(enemy_color)[0] e_idx, _ = enemy e_row, e_col = self.owner.row_col_for_index(e_idx) # if distance between player and enemy is already down # to 2 rows or cols, then goal is complete. if abs(p_row - e_row) == 2 or abs(p_col - e_col) == 2: self.status = self.COMPLETED # select the available move that decreases the distance # between the player and the enemy. If no such move exists, # the goal has failed. good_move = None for m in self.owner.moves: # try a move and gather the new row & col for the player self.owner.make_move(m, False, False) plr_update = self.owner.get_pieces(plr_color)[0] pu_idx, _ = plr_update pu_row, pu_col = self.owner.row_col_for_index(pu_idx) self.owner.undo_move(m, False, False) new_diff = abs(pu_row - e_row) + abs(pu_col - e_col) old_diff = abs(p_row - e_row) + abs(p_col - e_col) if new_diff < old_diff: good_move = m break if good_move: self.owner.make_move(good_move, True, True) else: self.status = self.FAILED def terminate(self): self.status = self.INACTIVE class Goal_PinEnemy(Goal): def __init__(self, owner): Goal.__init__(self, owner) def activate(self): self.status = self.ACTIVE def process(self): # for now, I'm not even sure I need this goal, but I'm saving it # as a placeholder. self.status = self.COMPLETED def terminate(self): self.status = self.INACTIVE
ajibawa-2023/Python-Code-Large/train/row_365
60
91
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_365:ImportFrom_L1_C0", "label": "from goal import Goal", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.011, 0.011, 0, 0.66, 0.0, 914, 0, 1, 0, 0, 914, 0, 0], "semantic": {"name": "goal", "arg_names": [], "import_names": ["Goal"], "rhs_call_name": "", "annotation": ""}, "snippet": "from goal import Goal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:ImportFrom_L2_C0", "label": "from composite import CompositeGoal", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.022, 0.011, 0, 0.66, 0.25, 334, 0, 1, 0, 0, 334, 0, 0], "semantic": {"name": "composite", "arg_names": [], "import_names": ["CompositeGoal"], "rhs_call_name": "", "annotation": ""}, "snippet": "from composite import CompositeGoal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "label": "Goal_OneKingAttack", "type": "class", "loc": [4, 21], "level": 0, "parent": null, "vector": [3, 0, 0.1374, 0.1978, 0, 0.66, 0.5, 871, 0, 4, 0, 0, 409, 0, 8], "semantic": {"name": "Goal_OneKingAttack", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Goal_OneKingAttack(CompositeGoal):\n def __init__(self, owner):\n CompositeGoal.__init__(self, owner)\n\n def activate(self):\n self.status = self.ACTIVE\n self.removeAllSubgoals()\n # because goals are *pushed* onto the front of the subgoal list they must"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L5_C4", "label": "__init__", "type": "function", "loc": [5, 6], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "vector": [2, 1, 0.0604, 0.022, 1, 0.92, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "owner"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, owner):\n CompositeGoal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L6_C8", "label": "__init__()", "type": "expression", "loc": [6, 6], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L5_C4", "vector": [8, 2, 0.0659, 0.011, 2, 0.88, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " CompositeGoal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "label": "activate", "type": "function", "loc": [8, 14], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "vector": [2, 1, 0.1209, 0.0769, 1, 0.92, 0.3333, 177, 0, 1, 0, 0, 0, 0, 5], "semantic": {"name": "activate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def activate(self):\n self.status = self.ACTIVE\n self.removeAllSubgoals()\n # because goals are *pushed* onto the front of the subgoal list they must\n # be added in reverse order.\n self.addSubgoal(Goal_MoveTowardEnemy(self.owner))\n self.addSubgoal(Goal_PinEnemy(self.owner))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L9_C8", "label": "self.status =", "type": "assigned_variable", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "vector": [14, 2, 0.0989, 0.011, 2, 0.75, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L10_C8", "label": "removeAllSubgoals()", "type": "expression", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "vector": [8, 2, 0.1099, 0.011, 2, 0.75, 0.3333, 594, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "removeAllSubgoals", "arg_names": [], "import_names": [], "rhs_call_name": "removeAllSubgoals", "annotation": ""}, "snippet": " self.removeAllSubgoals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L13_C8", "label": "addSubgoal()", "type": "expression", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "vector": [8, 2, 0.1429, 0.011, 2, 0.75, 0.6667, 314, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addSubgoal", "arg_names": [], "import_names": [], "rhs_call_name": "addSubgoal", "annotation": ""}, "snippet": " self.addSubgoal(Goal_MoveTowardEnemy(self.owner))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L14_C8", "label": "addSubgoal()", "type": "expression", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "vector": [8, 2, 0.1538, 0.011, 2, 0.75, 1.0, 314, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "addSubgoal", "arg_names": [], "import_names": [], "rhs_call_name": "addSubgoal", "annotation": ""}, "snippet": " self.addSubgoal(Goal_PinEnemy(self.owner))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4", "label": "process", "type": "function", "loc": [16, 18], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "vector": [2, 1, 0.1868, 0.033, 1, 0.92, 0.6667, 712, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "process", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process(self):\n self.activateIfInactive()\n return self.processSubgoals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L17_C8", "label": "activateIfInactive()", "type": "expression", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4", "vector": [8, 2, 0.1868, 0.011, 2, 0.33, 0.0, 576, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "activateIfInactive", "arg_names": [], "import_names": [], "rhs_call_name": "activateIfInactive", "annotation": ""}, "snippet": " self.activateIfInactive()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Return_L18_C8", "label": "return", "type": "return", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4", "vector": [13, 2, 0.1978, 0.011, 2, 0.33, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.processSubgoals()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L20_C4", "label": "terminate", "type": "function", "loc": [20, 21], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "vector": [2, 1, 0.2253, 0.022, 1, 0.92, 1.0, 617, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "terminate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def terminate(self):\n self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L21_C8", "label": "self.status =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L20_C4", "vector": [14, 2, 0.2308, 0.011, 2, 0.85, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "label": "Goal_MoveTowardEnemy", "type": "class", "loc": [23, 76], "level": 0, "parent": null, "vector": [3, 0, 0.544, 0.5934, 0, 0.66, 0.75, 464, 0, 4, 0, 0, 302, 0, 17], "semantic": {"name": "Goal_MoveTowardEnemy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Goal_MoveTowardEnemy(Goal):\n def __init__(self, owner):\n Goal.__init__(self, owner)\n\n def activate(self):\n self.status = self.ACTIVE\n\n def process(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L24_C4", "label": "__init__", "type": "function", "loc": [24, 25], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "vector": [2, 1, 0.2692, 0.022, 1, 0.21, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "owner"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, owner):\n Goal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L25_C8", "label": "__init__()", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L24_C4", "vector": [8, 2, 0.2747, 0.011, 2, 0.19, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Goal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L27_C4", "label": "activate", "type": "function", "loc": [27, 28], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "vector": [2, 1, 0.3022, 0.022, 1, 0.21, 0.3333, 177, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "activate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def activate(self):\n self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L28_C8", "label": "self.status =", "type": "assigned_variable", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L27_C4", "vector": [14, 2, 0.3077, 0.011, 2, 0.63, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "label": "process", "type": "function", "loc": [30, 73], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "vector": [2, 1, 0.5659, 0.4835, 1, 0.21, 0.6667, 712, 0, 1, 0, 0, 0, 0, 16], "semantic": {"name": "process", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process(self):\n # if status is inactive, activate\n self.activateIfInactive()\n \n # only moves (not captures) are a valid goal\n if self.owner.captures:\n self.status = self.FAILED\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L32_C8", "label": "activateIfInactive()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [8, 2, 0.3516, 0.011, 2, 0.57, 0.0, 576, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "activateIfInactive", "arg_names": [], "import_names": [], "rhs_call_name": "activateIfInactive", "annotation": ""}, "snippet": " self.activateIfInactive()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8", "label": "if", "type": "if", "loc": [35, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [4, 2, 0.3956, 0.033, 2, 0.57, 0.0769, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.owner.captures:\n self.status = self.FAILED\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L36_C12", "label": "self.status =", "type": "assigned_variable", "loc": [36, 36], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8", "vector": [14, 3, 0.3956, 0.011, 3, 0.38, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.FAILED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Return_L37_C12", "label": "return", "type": "return", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8", "vector": [13, 3, 0.4066, 0.011, 3, 0.38, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L40_C8", "label": "plr_color =", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4396, 0.011, 2, 0.57, 0.1538, 95, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "plr_color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " plr_color = self.owner.to_move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L41_C8", "label": "enemy_color =", "type": "assigned_variable", "loc": [41, 41], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4505, 0.011, 2, 0.57, 0.2308, 644, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "enemy_color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enemy_color = self.owner.enemy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L42_C8", "label": "player =", "type": "assigned_variable", "loc": [42, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4615, 0.011, 2, 0.57, 0.3077, 895, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "player", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " player = self.owner.get_pieces(plr_color)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L43_C8", "label": "p_idx, _ =", "type": "assigned_variable", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4725, 0.011, 2, 0.57, 0.3846, 338, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "p_idx, _", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " p_idx, _ = player"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L44_C8", "label": "p_row, p_col = row_col_for_index()", "type": "assigned_variable", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4835, 0.011, 2, 0.57, 0.4615, 948, 3, 1, 0, 0, 844, 10, 1], "semantic": {"name": "p_row, p_col", "arg_names": [], "import_names": [], "rhs_call_name": "row_col_for_index", "annotation": ""}, "snippet": " p_row, p_col = self.owner.row_col_for_index(p_idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L45_C8", "label": "enemy =", "type": "assigned_variable", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.4945, 0.011, 2, 0.57, 0.5385, 655, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "enemy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " enemy = self.owner.get_pieces(enemy_color)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L46_C8", "label": "e_idx, _ =", "type": "assigned_variable", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.5055, 0.011, 2, 0.57, 0.6154, 131, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "e_idx, _", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " e_idx, _ = enemy"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L47_C8", "label": "e_row, e_col = row_col_for_index()", "type": "assigned_variable", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.5165, 0.011, 2, 0.57, 0.6923, 694, 3, 1, 0, 0, 844, 10, 1], "semantic": {"name": "e_row, e_col", "arg_names": [], "import_names": [], "rhs_call_name": "row_col_for_index", "annotation": ""}, "snippet": " e_row, e_col = self.owner.row_col_for_index(e_idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:If_L51_C8", "label": "if", "type": "if", "loc": [51, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [4, 2, 0.5659, 0.022, 2, 0.57, 0.7692, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if abs(p_row - e_row) == 2 or abs(p_col - e_col) == 2:\n self.status = self.COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L52_C12", "label": "self.status =", "type": "assigned_variable", "loc": [52, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L51_C8", "vector": [14, 3, 0.5714, 0.011, 3, 0.82, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L57_C8", "label": "good_move =", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [14, 2, 0.6264, 0.011, 2, 0.57, 0.8462, 287, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "good_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " good_move = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "label": "for m", "type": "for", "loc": [58, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [6, 2, 0.6978, 0.1319, 2, 0.57, 0.9231, 711, 7, 0, 0, 0, 0, 0, 8], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for m in self.owner.moves:\n # try a move and gather the new row & col for the player\n self.owner.make_move(m, False, False)\n plr_update = self.owner.get_pieces(plr_color)[0]\n pu_idx, _ = plr_update\n pu_row, pu_col = self.owner.row_col_for_index(pu_idx)\n self.owner.undo_move(m, False, False)\n new_diff = abs(pu_row - e_row) + abs(pu_col - e_col)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L60_C12", "label": "make_move()", "type": "expression", "loc": [60, 60], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [8, 3, 0.6593, 0.011, 3, 0.1, 0.0, 580, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "make_move", "arg_names": [], "import_names": [], "rhs_call_name": "make_move", "annotation": ""}, "snippet": " self.owner.make_move(m, False, False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L61_C12", "label": "plr_update =", "type": "assigned_variable", "loc": [61, 61], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [14, 3, 0.6703, 0.011, 3, 0.1, 0.1429, 425, 6, 0, 0, 0, 0, 0, 1], "semantic": {"name": "plr_update", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " plr_update = self.owner.get_pieces(plr_color)[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L62_C12", "label": "pu_idx, _ =", "type": "assigned_variable", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [14, 3, 0.6813, 0.011, 3, 0.1, 0.2857, 371, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "pu_idx, _", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pu_idx, _ = plr_update"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L63_C12", "label": "pu_row, pu_col = row_col_for_index()", "type": "assigned_variable", "loc": [63, 63], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [14, 3, 0.6923, 0.011, 3, 0.1, 0.4286, 823, 3, 1, 0, 0, 844, 10, 1], "semantic": {"name": "pu_row, pu_col", "arg_names": [], "import_names": [], "rhs_call_name": "row_col_for_index", "annotation": ""}, "snippet": " pu_row, pu_col = self.owner.row_col_for_index(pu_idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L64_C12", "label": "undo_move()", "type": "expression", "loc": [64, 64], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [8, 3, 0.7033, 0.011, 3, 0.1, 0.5714, 752, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "undo_move", "arg_names": [], "import_names": [], "rhs_call_name": "undo_move", "annotation": ""}, "snippet": " self.owner.undo_move(m, False, False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L65_C12", "label": "new_diff =", "type": "assigned_variable", "loc": [65, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [14, 3, 0.7143, 0.011, 3, 0.1, 0.7143, 774, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "new_diff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " new_diff = abs(pu_row - e_row) + abs(pu_col - e_col)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L66_C12", "label": "old_diff =", "type": "assigned_variable", "loc": [66, 66], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [14, 3, 0.7253, 0.011, 3, 0.1, 0.8571, 688, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "old_diff", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " old_diff = abs(p_row - e_row) + abs(p_col - e_col)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:If_L67_C12", "label": "if", "type": "if", "loc": [67, 69], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "vector": [4, 3, 0.7473, 0.033, 3, 0.1, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if new_diff < old_diff:\n good_move = m\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L68_C16", "label": "good_move =", "type": "assigned_variable", "loc": [68, 68], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L67_C12", "vector": [14, 4, 0.7473, 0.011, 4, 0.06, 0.0, 287, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "good_move", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " good_move = m"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8", "label": "if", "type": "if", "loc": [70, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "vector": [4, 2, 0.7857, 0.044, 2, 0.57, 1.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if good_move:\n self.owner.make_move(good_move, True, True)\n else:\n self.status = self.FAILED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L71_C12", "label": "make_move()", "type": "expression", "loc": [71, 71], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8", "vector": [8, 3, 0.7802, 0.011, 3, 0.68, 0.0, 580, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "make_move", "arg_names": [], "import_names": [], "rhs_call_name": "make_move", "annotation": ""}, "snippet": " self.owner.make_move(good_move, True, True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L73_C12", "label": "self.status =", "type": "assigned_variable", "loc": [73, 73], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8", "vector": [14, 3, 0.8022, 0.011, 3, 0.68, 1.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.FAILED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L75_C4", "label": "terminate", "type": "function", "loc": [75, 76], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "vector": [2, 1, 0.8297, 0.022, 1, 0.21, 1.0, 617, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "terminate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def terminate(self):\n self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L76_C8", "label": "self.status =", "type": "assigned_variable", "loc": [76, 76], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L75_C4", "vector": [14, 2, 0.8352, 0.011, 2, 0.65, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "label": "Goal_PinEnemy", "type": "class", "loc": [78, 91], "level": 0, "parent": null, "vector": [3, 0, 0.9286, 0.1538, 0, 0.66, 1.0, 160, 0, 4, 0, 0, 302, 0, 1], "semantic": {"name": "Goal_PinEnemy", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Goal_PinEnemy(Goal):\n def __init__(self, owner):\n Goal.__init__(self, owner)\n\n def activate(self):\n self.status = self.ACTIVE\n\n def process(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L79_C4", "label": "__init__", "type": "function", "loc": [79, 80], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "vector": [2, 1, 0.8736, 0.022, 1, 0.09, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "owner"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, owner):\n Goal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L80_C8", "label": "__init__()", "type": "expression", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L79_C4", "vector": [8, 2, 0.8791, 0.011, 2, 0.2, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Goal.__init__(self, owner)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L82_C4", "label": "activate", "type": "function", "loc": [82, 83], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "vector": [2, 1, 0.9066, 0.022, 1, 0.09, 0.3333, 177, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "activate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def activate(self):\n self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L83_C8", "label": "self.status =", "type": "assigned_variable", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L82_C4", "vector": [14, 2, 0.9121, 0.011, 2, 0.88, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.ACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L85_C4", "label": "process", "type": "function", "loc": [85, 88], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "vector": [2, 1, 0.9505, 0.044, 1, 0.09, 0.6667, 712, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "process", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def process(self):\n # for now, I'm not even sure I need this goal, but I'm saving it\n # as a placeholder.\n self.status = self.COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L88_C8", "label": "self.status =", "type": "assigned_variable", "loc": [88, 88], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L85_C4", "vector": [14, 2, 0.967, 0.011, 2, 0.49, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.COMPLETED"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L90_C4", "label": "terminate", "type": "function", "loc": [90, 91], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "vector": [2, 1, 0.9945, 0.022, 1, 0.09, 1.0, 617, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "terminate", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def terminate(self):\n self.status = self.INACTIVE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L91_C8", "label": "self.status =", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L90_C4", "vector": [14, 2, 1.0, 0.011, 2, 0.53, 0.0, 651, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.status", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.status = self.INACTIVE"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L5_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L5_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L6_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L8_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L16_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Return_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L4_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L20_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L20_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L24_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L24_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L27_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L27_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L36_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L35_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Return_L37_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L42_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:If_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L51_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L60_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L61_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L62_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L63_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L65_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L66_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:For_L58_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:If_L67_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L67_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L68_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L30_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:If_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L73_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L23_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L75_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L75_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L79_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L79_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Expr_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L82_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L82_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L85_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L85_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L88_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:ClassDef_L78_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L90_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_365:FunctionDef_L90_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_365:Assign_L91_C8"}]
import math, os, sys from ConfigParser import RawConfigParser DEFAULT_SIZE = 400 BOARD_SIZE = 8 CHECKER_SIZE = 30 MAX_VALID_SQ = 32 MOVE = 0 JUMP = 1 OCCUPIED = 0 BLACK = 1 WHITE = 2 MAN = 4 KING = 8 FREE = 16 COLORS = BLACK | WHITE TYPES = OCCUPIED | BLACK | WHITE | MAN | KING | FREE HUMAN = 0 COMPUTER = 1 MIN = 0 MAX = 1 IMAGE_DIR = 'images' + os.sep RAVEN_ICON = IMAGE_DIR + '_raven.ico' BULLET_IMAGE = IMAGE_DIR + 'bullet_green.gif' CROWN_IMAGE = IMAGE_DIR + 'crown.gif' BOLD_IMAGE = IMAGE_DIR + 'text_bold.gif' ITALIC_IMAGE = IMAGE_DIR + 'text_italic.gif' BULLETS_IMAGE = IMAGE_DIR + 'text_list_bullets.gif' NUMBERS_IMAGE = IMAGE_DIR + 'text_list_numbers.gif' ADDLINK_IMAGE = IMAGE_DIR + 'link.gif' REMLINK_IMAGE = IMAGE_DIR + 'link_break.gif' UNDO_IMAGE = IMAGE_DIR + 'resultset_previous.gif' UNDOALL_IMAGE = IMAGE_DIR + 'resultset_first.gif' REDO_IMAGE = IMAGE_DIR + 'resultset_next.gif' REDOALL_IMAGE = IMAGE_DIR + 'resultset_last.gif' LIGHT_SQUARES = 'tan' DARK_SQUARES = 'dark green' OUTLINE_COLOR = 'white' LIGHT_CHECKERS = 'white' DARK_CHECKERS = 'red' WHITE_CHAR = 'w' WHITE_KING = 'W' BLACK_CHAR = 'b' BLACK_KING = 'B' FREE_CHAR = '.' OCCUPIED_CHAR = '-' INFINITY = 9999999 MAXDEPTH = 10 VERSION = '0.4' TITLE = 'Raven ' + VERSION PROGRAM_TITLE = 'Raven Checkers' CUR_DIR = sys.path[0] TRAINING_DIR = 'training' # search values for transposition table hashfALPHA, hashfBETA, hashfEXACT = range(3) # constants for evaluation function TURN = 2 # color to move gets + turn BRV = 3 # multiplier for back rank KCV = 5 # multiplier for kings in center MCV = 1 # multiplier for men in center MEV = 1 # multiplier for men on edge KEV = 5 # multiplier for kings on edge CRAMP = 5 # multiplier for cramp OPENING = 2 # multipliers for tempo MIDGAME = -1 ENDGAME = 2 INTACTDOUBLECORNER = 3 BLACK_IDX = [5,6] WHITE_IDX = [-5,-6] KING_IDX = [-6,-5,5,6] FIRST = 0 MID = 1 LAST = -1 # (white) # 45 46 47 48 # 39 40 41 42 # 34 35 36 37 # 28 29 30 31 # 23 24 25 26 # 17 18 19 20 # 12 13 14 15 # 6 7 8 9 # (black) # other squares reachable from a particular square with a white man WHITEMAP = {45: set([39,40,34,35,28,29,30,23,24,25,17,18,19,20,12,13,14,15,6,7,8,9]), 46: set([40,41,34,35,36,28,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]), 47: set([41,42,35,36,37,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]), 48: set([42,36,37,30,31,24,25,26,18,19,20,12,13,14,15,6,7,8,9]), 39: set([34,28,29,23,24,17,18,19,12,13,14,6,7,8,9]), 40: set([34,35,28,29,30,23,24,25,17,18,19,20,12,13,14,15,6,7,8,9]), 41: set([35,36,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]), 42: set([36,37,30,31,24,25,26,18,19,20,12,13,14,15,6,7,8,9]), 34: set([28,29,23,24,17,18,19,12,13,14,6,7,8,9]), 35: set([29,30,23,24,25,17,18,19,20,12,13,14,15,6,7,8,9]), 36: set([30,31,24,25,26,18,19,20,12,13,14,15,6,7,8,9]), 37: set([31,25,26,19,20,13,14,15,7,8,9]), 28: set([23,17,18,12,13,6,7,8]), 29: set([23,24,17,18,19,12,13,14,6,7,8,9]), 30: set([24,25,18,19,20,12,13,14,15,6,7,8,9]), 31: set([25,26,19,20,13,14,15,7,8,9]), 23: set([17,18,12,13,6,7,8]), 24: set([18,19,12,13,14,6,7,8,9]), 25: set([19,20,13,14,15,7,8,9]), 26: set([20,14,15,8,9]), 17: set([12,6,7]), 18: set([12,13,6,7,8]), 19: set([13,14,7,8,9]), 20: set([14,15,8,9]), 12: set([6,7]), 13: set([7,8]), 14: set([8,9]), 15: set([9]), 6: set(), 7: set(), 8: set(), 9: set()} # (white) # 45 46 47 48 # 39 40 41 42 # 34 35 36 37 # 28 29 30 31 # 23 24 25 26 # 17 18 19 20 # 12 13 14 15 # 6 7 8 9 # (black) # other squares reachable from a particular square with a black man BLACKMAP = {6: set([12,17,18,23,24,28,29,30,34,35,36,39,40,41,42,45,46,47,48]), 7: set([12,13,17,18,19,23,24,25,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 8: set([13,14,18,19,20,23,24,25,26,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 9: set([14,15,19,20,24,25,26,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 12: set([17,18,23,24,28,29,30,34,35,36,39,40,41,42,45,46,47,48]), 13: set([18,19,23,24,25,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 14: set([19,20,24,25,26,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 15: set([20,25,26,30,31,35,36,37,40,41,42,45,46,47,48]), 17: set([23,28,29,34,35,39,40,41,45,46,47]), 18: set([23,24,28,29,30,34,35,36,39,40,41,42,45,46,47,48]), 19: set([24,25,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]), 20: set([25,26,30,31,35,36,37,40,41,42,45,46,47,48]), 23: set([28,29,34,35,39,40,41,45,46,47]), 24: set([29,30,34,35,36,39,40,41,42,45,46,47,48]), 25: set([30,31,35,36,37,40,41,42,45,46,47,48]), 26: set([31,36,37,41,42,46,47,48]), 28: set([34,39,40,45,46]), 29: set([34,35,39,40,41,45,46,47]), 30: set([35,36,40,41,42,45,46,47,48]), 31: set([36,37,41,42,46,47,48]), 34: set([39,40,45,46]), 35: set([40,41,45,46,47]), 36: set([41,42,46,47,48]), 37: set([42,47,48]), 39: set([45]), 40: set([45,46]), 41: set([46,47]), 42: set([47,48]), 45: set(), 46: set(), 47: set(), 48: set()} # translate from simple input notation to real checkerboard notation IMAP = {'a1': 5, 'c1': 6, 'e1': 7, 'g1': 8, 'b2': 10, 'd2': 11, 'f2': 12, 'h2': 13, 'a3': 14, 'c3': 15, 'e3': 16, 'g3': 17, 'b4': 19, 'd4': 20, 'f4': 21, 'h4': 22, 'a5': 23, 'c5': 24, 'e5': 25, 'g5': 26, 'b6': 28, 'd6': 29, 'f6': 30, 'h6': 31, 'a7': 32, 'c7': 33, 'e7': 34, 'g7': 35, 'b8': 37, 'd8': 38, 'f8': 39, 'h8': 40} CBMAP = {5:4, 6:3, 7:2, 8:1, 10:8, 11:7, 12:6, 13:5, 14:12, 15:11, 16:10, 17:9, 19:16, 20:15, 21:14, 22:13, 23:20, 24:19, 25:18, 26:17, 28:24, 29:23, 30:22, 31:21, 32:28, 33:27, 34:26, 35:25, 37:32, 38:31, 39:30, 40:29} def create_position_map(): """ Maps compressed grid indices xi + yi * 8 to internal board indices """ pos = {} pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48 pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42 pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37 pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31 pos[33] = 23; pos[35] = 24; pos[37] = 25; pos[39] = 26 pos[40] = 17; pos[42] = 18; pos[44] = 19; pos[46] = 20 pos[49] = 12; pos[51] = 13; pos[53] = 14; pos[55] = 15 pos[56] = 6; pos[58] = 7; pos[60] = 8; pos[62] = 9 return pos def create_key_map(): """ Maps internal board indices to checkerboard label numbers """ key = {} key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1 key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5 key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9 key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13 key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17 key[34] = 24; key[35] = 23; key[36] = 22; key[37] = 21 key[39] = 28; key[40] = 27; key[41] = 26; key[42] = 25 key[45] = 32; key[46] = 31; key[47] = 30; key[48] = 29 return key def create_grid_map(): """ Maps internal board indices to grid (row, col) coordinates """ grd = {} grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6) grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7) grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6) grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7) grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6) grd[34] = (2,1); grd[35] = (2,3); grd[36] = (2,5); grd[37] = (2,7) grd[39] = (1,0); grd[40] = (1,2); grd[41] = (1,4); grd[42] = (1,6) grd[45] = (0,1); grd[46] = (0,3); grd[47] = (0,5); grd[48] = (0,7) return grd def flip_dict(m): d = {} keys = [k for k, _ in m.iteritems()] vals = [v for _, v in m.iteritems()] for k, v in zip(vals, keys): d[k] = v return d def reverse_dict(m): d = {} keys = [k for k, _ in m.iteritems()] vals = [v for _, v in m.iteritems()] for k, v in zip(keys, reversed(vals)): d[k] = v return d def similarity(pattern, pieces): global grid p1 = [grid[i] for i in pattern] p2 = [grid[j] for j in pieces] return sum(min(math.hypot(x1-x2, y1-y2) for x1, y1 in p1) for x2, y2 in p2) def get_preferences_from_file(): config = RawConfigParser() if not os.access('raven.ini',os.F_OK): # no .ini file yet, so make one config.add_section('AnnotationWindow') config.set('AnnotationWindow', 'font', 'Arial') config.set('AnnotationWindow', 'size', '12') # Writing our configuration file to 'raven.ini' with open('raven.ini', 'wb') as configfile: config.write(configfile) config.read('raven.ini') font = config.get('AnnotationWindow', 'font') size = config.get('AnnotationWindow', 'size') return font, size def write_preferences_to_file(font, size): config = RawConfigParser() config.add_section('AnnotationWindow') config.set('AnnotationWindow', 'font', font) config.set('AnnotationWindow', 'size', size) # Writing our configuration file to 'raven.ini' with open('raven.ini', 'wb') as configfile: config.write(configfile) def parse_index(idx): line, _, char = idx.partition('.') return int(line), int(char) def to_string(line, char): return "%d.%d" % (line, char) grid = create_grid_map() keymap = create_key_map() squaremap = flip_dict(keymap)
ajibawa-2023/Python-Code-Large/train/row_366
225
291
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_366:Import_L1_C0", "label": "math import math, os, sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0034, 0.0034, 0, 0.66, 0.0, 526, 0, 3, 0, 0, 526, 0, 0], "semantic": {"name": "math", "arg_names": [], "import_names": ["math", "os", "sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import math, os, sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:ImportFrom_L2_C0", "label": "from ConfigParser import RawConfigParser", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0069, 0.0034, 0, 0.66, 0.0116, 272, 0, 1, 0, 0, 272, 0, 0], "semantic": {"name": "ConfigParser", "arg_names": [], "import_names": ["RawConfigParser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ConfigParser import RawConfigParser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L4_C0", "label": "DEFAULT_SIZE =", "type": "assigned_variable", "loc": [4, 4], "level": 0, "parent": null, "vector": [14, 0, 0.0137, 0.0034, 0, 0.66, 0.0233, 239, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "DEFAULT_SIZE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DEFAULT_SIZE = 400"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L5_C0", "label": "BOARD_SIZE =", "type": "assigned_variable", "loc": [5, 5], "level": 0, "parent": null, "vector": [14, 0, 0.0172, 0.0034, 0, 0.66, 0.0349, 707, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "BOARD_SIZE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOARD_SIZE = 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L6_C0", "label": "CHECKER_SIZE =", "type": "assigned_variable", "loc": [6, 6], "level": 0, "parent": null, "vector": [14, 0, 0.0206, 0.0034, 0, 0.66, 0.0465, 994, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CHECKER_SIZE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CHECKER_SIZE = 30"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L7_C0", "label": "MAX_VALID_SQ =", "type": "assigned_variable", "loc": [7, 7], "level": 0, "parent": null, "vector": [14, 0, 0.0241, 0.0034, 0, 0.66, 0.0581, 415, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MAX_VALID_SQ", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MAX_VALID_SQ = 32"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L9_C0", "label": "MOVE =", "type": "assigned_variable", "loc": [9, 9], "level": 0, "parent": null, "vector": [14, 0, 0.0309, 0.0034, 0, 0.66, 0.0698, 515, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MOVE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MOVE = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L10_C0", "label": "JUMP =", "type": "assigned_variable", "loc": [10, 10], "level": 0, "parent": null, "vector": [14, 0, 0.0344, 0.0034, 0, 0.66, 0.0814, 450, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "JUMP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "JUMP = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L12_C0", "label": "OCCUPIED =", "type": "assigned_variable", "loc": [12, 12], "level": 0, "parent": null, "vector": [14, 0, 0.0412, 0.0034, 0, 0.66, 0.093, 508, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "OCCUPIED", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "OCCUPIED = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L13_C0", "label": "BLACK =", "type": "assigned_variable", "loc": [13, 13], "level": 0, "parent": null, "vector": [14, 0, 0.0447, 0.0034, 0, 0.66, 0.1047, 187, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "BLACK", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BLACK = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L14_C0", "label": "WHITE =", "type": "assigned_variable", "loc": [14, 14], "level": 0, "parent": null, "vector": [14, 0, 0.0481, 0.0034, 0, 0.66, 0.1163, 37, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "WHITE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WHITE = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L15_C0", "label": "MAN =", "type": "assigned_variable", "loc": [15, 15], "level": 0, "parent": null, "vector": [14, 0, 0.0515, 0.0034, 0, 0.66, 0.1279, 556, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MAN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MAN = 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L16_C0", "label": "KING =", "type": "assigned_variable", "loc": [16, 16], "level": 0, "parent": null, "vector": [14, 0, 0.055, 0.0034, 0, 0.66, 0.1395, 388, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "KING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KING = 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L17_C0", "label": "FREE =", "type": "assigned_variable", "loc": [17, 17], "level": 0, "parent": null, "vector": [14, 0, 0.0584, 0.0034, 0, 0.66, 0.1512, 888, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "FREE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FREE = 16"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L18_C0", "label": "COLORS =", "type": "assigned_variable", "loc": [18, 18], "level": 0, "parent": null, "vector": [14, 0, 0.0619, 0.0034, 0, 0.66, 0.1628, 459, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "COLORS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COLORS = BLACK | WHITE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L19_C0", "label": "TYPES =", "type": "assigned_variable", "loc": [19, 19], "level": 0, "parent": null, "vector": [14, 0, 0.0653, 0.0034, 0, 0.66, 0.1744, 493, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TYPES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TYPES = OCCUPIED | BLACK | WHITE | MAN | KING | FREE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L21_C0", "label": "HUMAN =", "type": "assigned_variable", "loc": [21, 21], "level": 0, "parent": null, "vector": [14, 0, 0.0722, 0.0034, 0, 0.66, 0.186, 978, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "HUMAN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "HUMAN = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L22_C0", "label": "COMPUTER =", "type": "assigned_variable", "loc": [22, 22], "level": 0, "parent": null, "vector": [14, 0, 0.0756, 0.0034, 0, 0.66, 0.1977, 692, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "COMPUTER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "COMPUTER = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L24_C0", "label": "MIN =", "type": "assigned_variable", "loc": [24, 24], "level": 0, "parent": null, "vector": [14, 0, 0.0825, 0.0034, 0, 0.66, 0.2093, 115, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MIN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MIN = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L25_C0", "label": "MAX =", "type": "assigned_variable", "loc": [25, 25], "level": 0, "parent": null, "vector": [14, 0, 0.0859, 0.0034, 0, 0.66, 0.2209, 90, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MAX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MAX = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L27_C0", "label": "IMAGE_DIR =", "type": "assigned_variable", "loc": [27, 27], "level": 0, "parent": null, "vector": [14, 0, 0.0928, 0.0034, 0, 0.66, 0.2326, 876, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "IMAGE_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "IMAGE_DIR = 'images' + os.sep"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L28_C0", "label": "RAVEN_ICON =", "type": "assigned_variable", "loc": [28, 28], "level": 0, "parent": null, "vector": [14, 0, 0.0962, 0.0034, 0, 0.66, 0.2442, 192, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "RAVEN_ICON", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "RAVEN_ICON = IMAGE_DIR + '_raven.ico'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L29_C0", "label": "BULLET_IMAGE =", "type": "assigned_variable", "loc": [29, 29], "level": 0, "parent": null, "vector": [14, 0, 0.0997, 0.0034, 0, 0.66, 0.2558, 716, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "BULLET_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BULLET_IMAGE = IMAGE_DIR + 'bullet_green.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L30_C0", "label": "CROWN_IMAGE =", "type": "assigned_variable", "loc": [30, 30], "level": 0, "parent": null, "vector": [14, 0, 0.1031, 0.0034, 0, 0.66, 0.2674, 62, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CROWN_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CROWN_IMAGE = IMAGE_DIR + 'crown.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L31_C0", "label": "BOLD_IMAGE =", "type": "assigned_variable", "loc": [31, 31], "level": 0, "parent": null, "vector": [14, 0, 0.1065, 0.0034, 0, 0.66, 0.2791, 240, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "BOLD_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BOLD_IMAGE = IMAGE_DIR + 'text_bold.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L32_C0", "label": "ITALIC_IMAGE =", "type": "assigned_variable", "loc": [32, 32], "level": 0, "parent": null, "vector": [14, 0, 0.11, 0.0034, 0, 0.66, 0.2907, 109, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ITALIC_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ITALIC_IMAGE = IMAGE_DIR + 'text_italic.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L33_C0", "label": "BULLETS_IMAGE =", "type": "assigned_variable", "loc": [33, 33], "level": 0, "parent": null, "vector": [14, 0, 0.1134, 0.0034, 0, 0.66, 0.3023, 316, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "BULLETS_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BULLETS_IMAGE = IMAGE_DIR + 'text_list_bullets.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L34_C0", "label": "NUMBERS_IMAGE =", "type": "assigned_variable", "loc": [34, 34], "level": 0, "parent": null, "vector": [14, 0, 0.1168, 0.0034, 0, 0.66, 0.314, 34, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "NUMBERS_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "NUMBERS_IMAGE = IMAGE_DIR + 'text_list_numbers.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L35_C0", "label": "ADDLINK_IMAGE =", "type": "assigned_variable", "loc": [35, 35], "level": 0, "parent": null, "vector": [14, 0, 0.1203, 0.0034, 0, 0.66, 0.3256, 931, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "ADDLINK_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ADDLINK_IMAGE = IMAGE_DIR + 'link.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L36_C0", "label": "REMLINK_IMAGE =", "type": "assigned_variable", "loc": [36, 36], "level": 0, "parent": null, "vector": [14, 0, 0.1237, 0.0034, 0, 0.66, 0.3372, 156, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "REMLINK_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "REMLINK_IMAGE = IMAGE_DIR + 'link_break.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L37_C0", "label": "UNDO_IMAGE =", "type": "assigned_variable", "loc": [37, 37], "level": 0, "parent": null, "vector": [14, 0, 0.1271, 0.0034, 0, 0.66, 0.3488, 49, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "UNDO_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "UNDO_IMAGE = IMAGE_DIR + 'resultset_previous.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L38_C0", "label": "UNDOALL_IMAGE =", "type": "assigned_variable", "loc": [38, 38], "level": 0, "parent": null, "vector": [14, 0, 0.1306, 0.0034, 0, 0.66, 0.3605, 313, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "UNDOALL_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "UNDOALL_IMAGE = IMAGE_DIR + 'resultset_first.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L39_C0", "label": "REDO_IMAGE =", "type": "assigned_variable", "loc": [39, 39], "level": 0, "parent": null, "vector": [14, 0, 0.134, 0.0034, 0, 0.66, 0.3721, 640, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "REDO_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "REDO_IMAGE = IMAGE_DIR + 'resultset_next.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L40_C0", "label": "REDOALL_IMAGE =", "type": "assigned_variable", "loc": [40, 40], "level": 0, "parent": null, "vector": [14, 0, 0.1375, 0.0034, 0, 0.66, 0.3837, 226, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "REDOALL_IMAGE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "REDOALL_IMAGE = IMAGE_DIR + 'resultset_last.gif'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L41_C0", "label": "LIGHT_SQUARES =", "type": "assigned_variable", "loc": [41, 41], "level": 0, "parent": null, "vector": [14, 0, 0.1409, 0.0034, 0, 0.66, 0.3953, 290, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "LIGHT_SQUARES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LIGHT_SQUARES = 'tan'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L42_C0", "label": "DARK_SQUARES =", "type": "assigned_variable", "loc": [42, 42], "level": 0, "parent": null, "vector": [14, 0, 0.1443, 0.0034, 0, 0.66, 0.407, 322, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DARK_SQUARES", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DARK_SQUARES = 'dark green'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L43_C0", "label": "OUTLINE_COLOR =", "type": "assigned_variable", "loc": [43, 43], "level": 0, "parent": null, "vector": [14, 0, 0.1478, 0.0034, 0, 0.66, 0.4186, 342, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "OUTLINE_COLOR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "OUTLINE_COLOR = 'white'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L44_C0", "label": "LIGHT_CHECKERS =", "type": "assigned_variable", "loc": [44, 44], "level": 0, "parent": null, "vector": [14, 0, 0.1512, 0.0034, 0, 0.66, 0.4302, 72, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "LIGHT_CHECKERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LIGHT_CHECKERS = 'white'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L45_C0", "label": "DARK_CHECKERS =", "type": "assigned_variable", "loc": [45, 45], "level": 0, "parent": null, "vector": [14, 0, 0.1546, 0.0034, 0, 0.66, 0.4419, 321, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "DARK_CHECKERS", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "DARK_CHECKERS = 'red'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L46_C0", "label": "WHITE_CHAR =", "type": "assigned_variable", "loc": [46, 46], "level": 0, "parent": null, "vector": [14, 0, 0.1581, 0.0034, 0, 0.66, 0.4535, 731, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "WHITE_CHAR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WHITE_CHAR = 'w'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L47_C0", "label": "WHITE_KING =", "type": "assigned_variable", "loc": [47, 47], "level": 0, "parent": null, "vector": [14, 0, 0.1615, 0.0034, 0, 0.66, 0.4651, 406, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "WHITE_KING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WHITE_KING = 'W'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L48_C0", "label": "BLACK_CHAR =", "type": "assigned_variable", "loc": [48, 48], "level": 0, "parent": null, "vector": [14, 0, 0.1649, 0.0034, 0, 0.66, 0.4767, 562, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BLACK_CHAR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BLACK_CHAR = 'b'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L49_C0", "label": "BLACK_KING =", "type": "assigned_variable", "loc": [49, 49], "level": 0, "parent": null, "vector": [14, 0, 0.1684, 0.0034, 0, 0.66, 0.4884, 408, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "BLACK_KING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BLACK_KING = 'B'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L50_C0", "label": "FREE_CHAR =", "type": "assigned_variable", "loc": [50, 50], "level": 0, "parent": null, "vector": [14, 0, 0.1718, 0.0034, 0, 0.66, 0.5, 121, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "FREE_CHAR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FREE_CHAR = '.'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L51_C0", "label": "OCCUPIED_CHAR =", "type": "assigned_variable", "loc": [51, 51], "level": 0, "parent": null, "vector": [14, 0, 0.1753, 0.0034, 0, 0.66, 0.5116, 711, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "OCCUPIED_CHAR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "OCCUPIED_CHAR = '-'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L53_C0", "label": "INFINITY =", "type": "assigned_variable", "loc": [53, 53], "level": 0, "parent": null, "vector": [14, 0, 0.1821, 0.0034, 0, 0.66, 0.5233, 681, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "INFINITY", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "INFINITY = 9999999"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L54_C0", "label": "MAXDEPTH =", "type": "assigned_variable", "loc": [54, 54], "level": 0, "parent": null, "vector": [14, 0, 0.1856, 0.0034, 0, 0.66, 0.5349, 379, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MAXDEPTH", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MAXDEPTH = 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L55_C0", "label": "VERSION =", "type": "assigned_variable", "loc": [55, 55], "level": 0, "parent": null, "vector": [14, 0, 0.189, 0.0034, 0, 0.66, 0.5465, 557, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "VERSION", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "VERSION = '0.4'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L56_C0", "label": "TITLE =", "type": "assigned_variable", "loc": [56, 56], "level": 0, "parent": null, "vector": [14, 0, 0.1924, 0.0034, 0, 0.66, 0.5581, 924, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "TITLE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TITLE = 'Raven ' + VERSION"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L57_C0", "label": "PROGRAM_TITLE =", "type": "assigned_variable", "loc": [57, 57], "level": 0, "parent": null, "vector": [14, 0, 0.1959, 0.0034, 0, 0.66, 0.5698, 926, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "PROGRAM_TITLE", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "PROGRAM_TITLE = 'Raven Checkers'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L58_C0", "label": "CUR_DIR =", "type": "assigned_variable", "loc": [58, 58], "level": 0, "parent": null, "vector": [14, 0, 0.1993, 0.0034, 0, 0.66, 0.5814, 450, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "CUR_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CUR_DIR = sys.path[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L59_C0", "label": "TRAINING_DIR =", "type": "assigned_variable", "loc": [59, 59], "level": 0, "parent": null, "vector": [14, 0, 0.2027, 0.0034, 0, 0.66, 0.593, 446, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "TRAINING_DIR", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TRAINING_DIR = 'training'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L62_C0", "label": "hashfALPHA, hashfBETA, hashfEXACT = range()", "type": "assigned_variable", "loc": [62, 62], "level": 0, "parent": null, "vector": [14, 0, 0.2131, 0.0034, 0, 0.66, 0.6047, 239, 3, 1, 0, 0, 816, 10, 1], "semantic": {"name": "hashfALPHA, hashfBETA, hashfEXACT", "arg_names": [], "import_names": [], "rhs_call_name": "range", "annotation": ""}, "snippet": "hashfALPHA, hashfBETA, hashfEXACT = range(3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L65_C0", "label": "TURN =", "type": "assigned_variable", "loc": [65, 65], "level": 0, "parent": null, "vector": [14, 0, 0.2234, 0.0034, 0, 0.66, 0.6163, 520, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "TURN", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "TURN = 2 # color to move gets + turn"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L66_C0", "label": "BRV =", "type": "assigned_variable", "loc": [66, 66], "level": 0, "parent": null, "vector": [14, 0, 0.2268, 0.0034, 0, 0.66, 0.6279, 896, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "BRV", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BRV = 3 # multiplier for back rank"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L67_C0", "label": "KCV =", "type": "assigned_variable", "loc": [67, 67], "level": 0, "parent": null, "vector": [14, 0, 0.2302, 0.0034, 0, 0.66, 0.6395, 214, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "KCV", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KCV = 5 # multiplier for kings in center"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L68_C0", "label": "MCV =", "type": "assigned_variable", "loc": [68, 68], "level": 0, "parent": null, "vector": [14, 0, 0.2337, 0.0034, 0, 0.66, 0.6512, 7, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MCV", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MCV = 1 # multiplier for men in center"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L70_C0", "label": "MEV =", "type": "assigned_variable", "loc": [70, 70], "level": 0, "parent": null, "vector": [14, 0, 0.2405, 0.0034, 0, 0.66, 0.6628, 138, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MEV", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MEV = 1 # multiplier for men on edge"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L71_C0", "label": "KEV =", "type": "assigned_variable", "loc": [71, 71], "level": 0, "parent": null, "vector": [14, 0, 0.244, 0.0034, 0, 0.66, 0.6744, 365, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "KEV", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KEV = 5 # multiplier for kings on edge"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L72_C0", "label": "CRAMP =", "type": "assigned_variable", "loc": [72, 72], "level": 0, "parent": null, "vector": [14, 0, 0.2474, 0.0034, 0, 0.66, 0.686, 102, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "CRAMP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CRAMP = 5 # multiplier for cramp"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L74_C0", "label": "OPENING =", "type": "assigned_variable", "loc": [74, 74], "level": 0, "parent": null, "vector": [14, 0, 0.2543, 0.0034, 0, 0.66, 0.6977, 626, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "OPENING", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "OPENING = 2 # multipliers for tempo"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L75_C0", "label": "MIDGAME =", "type": "assigned_variable", "loc": [75, 75], "level": 0, "parent": null, "vector": [14, 0, 0.2577, 0.0034, 0, 0.66, 0.7093, 936, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "MIDGAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MIDGAME = -1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L76_C0", "label": "ENDGAME =", "type": "assigned_variable", "loc": [76, 76], "level": 0, "parent": null, "vector": [14, 0, 0.2612, 0.0034, 0, 0.66, 0.7209, 745, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "ENDGAME", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "ENDGAME = 2"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L77_C0", "label": "INTACTDOUBLECORNER =", "type": "assigned_variable", "loc": [77, 77], "level": 0, "parent": null, "vector": [14, 0, 0.2646, 0.0034, 0, 0.66, 0.7326, 133, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "INTACTDOUBLECORNER", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "INTACTDOUBLECORNER = 3"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L79_C0", "label": "BLACK_IDX =", "type": "assigned_variable", "loc": [79, 79], "level": 0, "parent": null, "vector": [14, 0, 0.2715, 0.0034, 0, 0.66, 0.7442, 94, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "BLACK_IDX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BLACK_IDX = [5,6]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L80_C0", "label": "WHITE_IDX =", "type": "assigned_variable", "loc": [80, 80], "level": 0, "parent": null, "vector": [14, 0, 0.2749, 0.0034, 0, 0.66, 0.7558, 977, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "WHITE_IDX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WHITE_IDX = [-5,-6]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L81_C0", "label": "KING_IDX =", "type": "assigned_variable", "loc": [81, 81], "level": 0, "parent": null, "vector": [14, 0, 0.2784, 0.0034, 0, 0.66, 0.7674, 937, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "KING_IDX", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "KING_IDX = [-6,-5,5,6]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L83_C0", "label": "FIRST =", "type": "assigned_variable", "loc": [83, 83], "level": 0, "parent": null, "vector": [14, 0, 0.2852, 0.0034, 0, 0.66, 0.7791, 566, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "FIRST", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "FIRST = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L84_C0", "label": "MID =", "type": "assigned_variable", "loc": [84, 84], "level": 0, "parent": null, "vector": [14, 0, 0.2887, 0.0034, 0, 0.66, 0.7907, 526, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "MID", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "MID = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L85_C0", "label": "LAST =", "type": "assigned_variable", "loc": [85, 85], "level": 0, "parent": null, "vector": [14, 0, 0.2921, 0.0034, 0, 0.66, 0.8023, 170, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "LAST", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "LAST = -1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L99_C0", "label": "WHITEMAP =", "type": "assigned_variable", "loc": [99, 130], "level": 0, "parent": null, "vector": [14, 0, 0.3935, 0.11, 0, 0.66, 0.814, 61, 0, 0, 0, 0, 0, 6, 32], "semantic": {"name": "WHITEMAP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "WHITEMAP = {45: set([39,40,34,35,28,29,30,23,24,25,17,18,19,20,12,13,14,15,6,7,8,9]),\n 46: set([40,41,34,35,36,28,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]),\n 47: set([41,42,35,36,37,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]),\n 48: set([42,36,37,30,31,24,25,26,18,19,20,12,13,14,15,6,7,8,9]),\n 39: set([34,28,29,23,24,17,18,19,12,13,14,6,7,8,9]),\n 40: set([34,35,28,29,30,23,24,25,17,18,19,20,12,13,14,15,6,7,8,9]),\n 41: set([35,36,29,30,31,23,24,25,26,17,18,19,20,12,13,14,15,6,7,8,9]),\n 42: set([36,37,30,31,24,25,26,18,19,20,12,13,14,15,6,7,8,9]),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L143_C0", "label": "BLACKMAP =", "type": "assigned_variable", "loc": [143, 174], "level": 0, "parent": null, "vector": [14, 0, 0.5447, 0.11, 0, 0.66, 0.8256, 362, 0, 0, 0, 0, 0, 6, 32], "semantic": {"name": "BLACKMAP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "BLACKMAP = {6: set([12,17,18,23,24,28,29,30,34,35,36,39,40,41,42,45,46,47,48]),\n 7: set([12,13,17,18,19,23,24,25,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]),\n 8: set([13,14,18,19,20,23,24,25,26,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]),\n 9: set([14,15,19,20,24,25,26,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]),\n 12: set([17,18,23,24,28,29,30,34,35,36,39,40,41,42,45,46,47,48]),\n 13: set([18,19,23,24,25,28,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]),\n 14: set([19,20,24,25,26,29,30,31,34,35,36,37,39,40,41,42,45,46,47,48]),\n 15: set([20,25,26,30,31,35,36,37,40,41,42,45,46,47,48]),"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L177_C0", "label": "IMAP =", "type": "assigned_variable", "loc": [177, 184], "level": 0, "parent": null, "vector": [14, 0, 0.6203, 0.0275, 0, 0.66, 0.8372, 946, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "IMAP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "IMAP = {'a1': 5, 'c1': 6, 'e1': 7, 'g1': 8,\n 'b2': 10, 'd2': 11, 'f2': 12, 'h2': 13,\n 'a3': 14, 'c3': 15, 'e3': 16, 'g3': 17,\n 'b4': 19, 'd4': 20, 'f4': 21, 'h4': 22,\n 'a5': 23, 'c5': 24, 'e5': 25, 'g5': 26,\n 'b6': 28, 'd6': 29, 'f6': 30, 'h6': 31,\n 'a7': 32, 'c7': 33, 'e7': 34, 'g7': 35,\n 'b8': 37, 'd8': 38, 'f8': 39, 'h8': 40}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L186_C0", "label": "CBMAP =", "type": "assigned_variable", "loc": [186, 193], "level": 0, "parent": null, "vector": [14, 0, 0.6512, 0.0275, 0, 0.66, 0.8488, 509, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "CBMAP", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "CBMAP = {5:4, 6:3, 7:2, 8:1,\n 10:8, 11:7, 12:6, 13:5,\n 14:12, 15:11, 16:10, 17:9,\n 19:16, 20:15, 21:14, 22:13,\n 23:20, 24:19, 25:18, 26:17,\n 28:24, 29:23, 30:22, 31:21,\n 32:28, 33:27, 34:26, 35:25,\n 37:32, 38:31, 39:30, 40:29}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "label": "create_position_map", "type": "function", "loc": [195, 207], "level": 0, "parent": null, "vector": [2, 0, 0.6907, 0.0447, 0, 0.66, 0.8605, 15, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "create_position_map", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_position_map():\n \"\"\" Maps compressed grid indices xi + yi * 8 to internal\n board indices \"\"\"\n pos = {}\n pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48\n pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42\n pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37\n pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L196_C4", "label": "expression", "type": "expression", "loc": [196, 197], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [8, 1, 0.6753, 0.0069, 1, 0.78, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Maps compressed grid indices xi + yi * 8 to internal\n board indices \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L198_C4", "label": "pos =", "type": "assigned_variable", "loc": [198, 198], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6804, 0.0034, 1, 0.78, 0.0294, 627, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C4", "label": "assign", "type": "assigned_variable", "loc": [199, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6838, 0.0034, 1, 0.78, 0.0588, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C19", "label": "assign", "type": "assigned_variable", "loc": [199, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6838, 0.0034, 1, 0.78, 0.0882, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C33", "label": "assign", "type": "assigned_variable", "loc": [199, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6838, 0.0034, 1, 0.78, 0.1176, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C47", "label": "assign", "type": "assigned_variable", "loc": [199, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6838, 0.0034, 1, 0.78, 0.1471, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[1] = 45; pos[3] = 46; pos[5] = 47; pos[7] = 48"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C4", "label": "assign", "type": "assigned_variable", "loc": [200, 200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6873, 0.0034, 1, 0.78, 0.1765, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C19", "label": "assign", "type": "assigned_variable", "loc": [200, 200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6873, 0.0034, 1, 0.78, 0.2059, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C33", "label": "assign", "type": "assigned_variable", "loc": [200, 200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6873, 0.0034, 1, 0.78, 0.2353, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C47", "label": "assign", "type": "assigned_variable", "loc": [200, 200], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6873, 0.0034, 1, 0.78, 0.2647, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[8] = 39; pos[10] = 40; pos[12] = 41; pos[14] = 42"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C4", "label": "assign", "type": "assigned_variable", "loc": [201, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6907, 0.0034, 1, 0.78, 0.2941, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C19", "label": "assign", "type": "assigned_variable", "loc": [201, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6907, 0.0034, 1, 0.78, 0.3235, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C33", "label": "assign", "type": "assigned_variable", "loc": [201, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6907, 0.0034, 1, 0.78, 0.3529, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C47", "label": "assign", "type": "assigned_variable", "loc": [201, 201], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6907, 0.0034, 1, 0.78, 0.3824, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[17] = 34; pos[19] = 35; pos[21] = 36; pos[23] = 37"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C4", "label": "assign", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6942, 0.0034, 1, 0.78, 0.4118, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C19", "label": "assign", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6942, 0.0034, 1, 0.78, 0.4412, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C33", "label": "assign", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6942, 0.0034, 1, 0.78, 0.4706, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C47", "label": "assign", "type": "assigned_variable", "loc": [202, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6942, 0.0034, 1, 0.78, 0.5, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[24] = 28; pos[26] = 29; pos[28] = 30; pos[30] = 31"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C4", "label": "assign", "type": "assigned_variable", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6976, 0.0034, 1, 0.78, 0.5294, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[33] = 23; pos[35] = 24; pos[37] = 25; pos[39] = 26"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C19", "label": "assign", "type": "assigned_variable", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6976, 0.0034, 1, 0.78, 0.5588, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[33] = 23; pos[35] = 24; pos[37] = 25; pos[39] = 26"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C33", "label": "assign", "type": "assigned_variable", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6976, 0.0034, 1, 0.78, 0.5882, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[33] = 23; pos[35] = 24; pos[37] = 25; pos[39] = 26"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C47", "label": "assign", "type": "assigned_variable", "loc": [203, 203], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.6976, 0.0034, 1, 0.78, 0.6176, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[33] = 23; pos[35] = 24; pos[37] = 25; pos[39] = 26"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C4", "label": "assign", "type": "assigned_variable", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.701, 0.0034, 1, 0.78, 0.6471, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[40] = 17; pos[42] = 18; pos[44] = 19; pos[46] = 20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C19", "label": "assign", "type": "assigned_variable", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.701, 0.0034, 1, 0.78, 0.6765, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[40] = 17; pos[42] = 18; pos[44] = 19; pos[46] = 20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C33", "label": "assign", "type": "assigned_variable", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.701, 0.0034, 1, 0.78, 0.7059, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[40] = 17; pos[42] = 18; pos[44] = 19; pos[46] = 20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C47", "label": "assign", "type": "assigned_variable", "loc": [204, 204], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.701, 0.0034, 1, 0.78, 0.7353, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[40] = 17; pos[42] = 18; pos[44] = 19; pos[46] = 20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C4", "label": "assign", "type": "assigned_variable", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7045, 0.0034, 1, 0.78, 0.7647, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[49] = 12; pos[51] = 13; pos[53] = 14; pos[55] = 15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C19", "label": "assign", "type": "assigned_variable", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7045, 0.0034, 1, 0.78, 0.7941, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[49] = 12; pos[51] = 13; pos[53] = 14; pos[55] = 15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C33", "label": "assign", "type": "assigned_variable", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7045, 0.0034, 1, 0.78, 0.8235, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[49] = 12; pos[51] = 13; pos[53] = 14; pos[55] = 15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C47", "label": "assign", "type": "assigned_variable", "loc": [205, 205], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7045, 0.0034, 1, 0.78, 0.8529, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[49] = 12; pos[51] = 13; pos[53] = 14; pos[55] = 15"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C4", "label": "assign", "type": "assigned_variable", "loc": [206, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7079, 0.0034, 1, 0.78, 0.8824, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[56] = 6; pos[58] = 7; pos[60] = 8; pos[62] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C19", "label": "assign", "type": "assigned_variable", "loc": [206, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7079, 0.0034, 1, 0.78, 0.9118, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[56] = 6; pos[58] = 7; pos[60] = 8; pos[62] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C33", "label": "assign", "type": "assigned_variable", "loc": [206, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7079, 0.0034, 1, 0.78, 0.9412, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[56] = 6; pos[58] = 7; pos[60] = 8; pos[62] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C47", "label": "assign", "type": "assigned_variable", "loc": [206, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [14, 1, 0.7079, 0.0034, 1, 0.78, 0.9706, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " pos[56] = 6; pos[58] = 7; pos[60] = 8; pos[62] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L207_C4", "label": "return", "type": "return", "loc": [207, 207], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "vector": [13, 1, 0.7113, 0.0034, 1, 0.78, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "label": "create_key_map", "type": "function", "loc": [209, 220], "level": 0, "parent": null, "vector": [2, 0, 0.7371, 0.0412, 0, 0.66, 0.8721, 770, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "create_key_map", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_key_map():\n \"\"\" Maps internal board indices to checkerboard label numbers \"\"\"\n key = {}\n key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1\n key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5\n key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9\n key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13\n key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L210_C4", "label": "expression", "type": "expression", "loc": [210, 210], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [8, 1, 0.7216, 0.0034, 1, 0.35, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Maps internal board indices to checkerboard label numbers \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L211_C4", "label": "key =", "type": "assigned_variable", "loc": [211, 211], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7251, 0.0034, 1, 0.35, 0.0294, 230, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "key", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C4", "label": "assign", "type": "assigned_variable", "loc": [212, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7285, 0.0034, 1, 0.35, 0.0588, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C18", "label": "assign", "type": "assigned_variable", "loc": [212, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7285, 0.0034, 1, 0.35, 0.0882, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C32", "label": "assign", "type": "assigned_variable", "loc": [212, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7285, 0.0034, 1, 0.35, 0.1176, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C46", "label": "assign", "type": "assigned_variable", "loc": [212, 212], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7285, 0.0034, 1, 0.35, 0.1471, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[6] = 4; key[7] = 3; key[8] = 2; key[9] = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C4", "label": "assign", "type": "assigned_variable", "loc": [213, 213], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.732, 0.0034, 1, 0.35, 0.1765, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C18", "label": "assign", "type": "assigned_variable", "loc": [213, 213], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.732, 0.0034, 1, 0.35, 0.2059, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C32", "label": "assign", "type": "assigned_variable", "loc": [213, 213], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.732, 0.0034, 1, 0.35, 0.2353, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C46", "label": "assign", "type": "assigned_variable", "loc": [213, 213], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.732, 0.0034, 1, 0.35, 0.2647, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[12] = 8; key[13] = 7; key[14] = 6; key[15] = 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C4", "label": "assign", "type": "assigned_variable", "loc": [214, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7354, 0.0034, 1, 0.35, 0.2941, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C18", "label": "assign", "type": "assigned_variable", "loc": [214, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7354, 0.0034, 1, 0.35, 0.3235, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C32", "label": "assign", "type": "assigned_variable", "loc": [214, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7354, 0.0034, 1, 0.35, 0.3529, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C46", "label": "assign", "type": "assigned_variable", "loc": [214, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7354, 0.0034, 1, 0.35, 0.3824, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[17] = 12; key[18] = 11; key[19] = 10; key[20] = 9"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C4", "label": "assign", "type": "assigned_variable", "loc": [215, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7388, 0.0034, 1, 0.35, 0.4118, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C18", "label": "assign", "type": "assigned_variable", "loc": [215, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7388, 0.0034, 1, 0.35, 0.4412, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C32", "label": "assign", "type": "assigned_variable", "loc": [215, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7388, 0.0034, 1, 0.35, 0.4706, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C46", "label": "assign", "type": "assigned_variable", "loc": [215, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7388, 0.0034, 1, 0.35, 0.5, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[23] = 16; key[24] = 15; key[25] = 14; key[26] = 13"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C4", "label": "assign", "type": "assigned_variable", "loc": [216, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7423, 0.0034, 1, 0.35, 0.5294, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C18", "label": "assign", "type": "assigned_variable", "loc": [216, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7423, 0.0034, 1, 0.35, 0.5588, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C32", "label": "assign", "type": "assigned_variable", "loc": [216, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7423, 0.0034, 1, 0.35, 0.5882, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C46", "label": "assign", "type": "assigned_variable", "loc": [216, 216], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7423, 0.0034, 1, 0.35, 0.6176, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[28] = 20; key[29] = 19; key[30] = 18; key[31] = 17"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C4", "label": "assign", "type": "assigned_variable", "loc": [217, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7457, 0.0034, 1, 0.35, 0.6471, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[34] = 24; key[35] = 23; key[36] = 22; key[37] = 21"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C18", "label": "assign", "type": "assigned_variable", "loc": [217, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7457, 0.0034, 1, 0.35, 0.6765, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[34] = 24; key[35] = 23; key[36] = 22; key[37] = 21"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C32", "label": "assign", "type": "assigned_variable", "loc": [217, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7457, 0.0034, 1, 0.35, 0.7059, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[34] = 24; key[35] = 23; key[36] = 22; key[37] = 21"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C46", "label": "assign", "type": "assigned_variable", "loc": [217, 217], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7457, 0.0034, 1, 0.35, 0.7353, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[34] = 24; key[35] = 23; key[36] = 22; key[37] = 21"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C4", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7491, 0.0034, 1, 0.35, 0.7647, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[39] = 28; key[40] = 27; key[41] = 26; key[42] = 25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C18", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7491, 0.0034, 1, 0.35, 0.7941, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[39] = 28; key[40] = 27; key[41] = 26; key[42] = 25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C32", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7491, 0.0034, 1, 0.35, 0.8235, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[39] = 28; key[40] = 27; key[41] = 26; key[42] = 25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C46", "label": "assign", "type": "assigned_variable", "loc": [218, 218], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7491, 0.0034, 1, 0.35, 0.8529, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[39] = 28; key[40] = 27; key[41] = 26; key[42] = 25"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C4", "label": "assign", "type": "assigned_variable", "loc": [219, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7526, 0.0034, 1, 0.35, 0.8824, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[45] = 32; key[46] = 31; key[47] = 30; key[48] = 29"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C18", "label": "assign", "type": "assigned_variable", "loc": [219, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7526, 0.0034, 1, 0.35, 0.9118, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[45] = 32; key[46] = 31; key[47] = 30; key[48] = 29"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C32", "label": "assign", "type": "assigned_variable", "loc": [219, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7526, 0.0034, 1, 0.35, 0.9412, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[45] = 32; key[46] = 31; key[47] = 30; key[48] = 29"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C46", "label": "assign", "type": "assigned_variable", "loc": [219, 219], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [14, 1, 0.7526, 0.0034, 1, 0.35, 0.9706, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " key[45] = 32; key[46] = 31; key[47] = 30; key[48] = 29"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L220_C4", "label": "return", "type": "return", "loc": [220, 220], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "vector": [13, 1, 0.756, 0.0034, 1, 0.35, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return key"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "label": "create_grid_map", "type": "function", "loc": [222, 233], "level": 0, "parent": null, "vector": [2, 0, 0.7818, 0.0412, 0, 0.66, 0.8837, 432, 0, 0, 1, 0, 0, 0, 0], "semantic": {"name": "create_grid_map", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def create_grid_map():\n \"\"\" Maps internal board indices to grid (row, col) coordinates \"\"\"\n grd = {}\n grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6)\n grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7)\n grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6)\n grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7)\n grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L223_C4", "label": "expression", "type": "expression", "loc": [223, 223], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [8, 1, 0.7663, 0.0034, 1, 0.01, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\" Maps internal board indices to grid (row, col) coordinates \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L224_C4", "label": "grd =", "type": "assigned_variable", "loc": [224, 224], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7698, 0.0034, 1, 0.01, 0.0294, 111, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "grd", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C4", "label": "assign", "type": "assigned_variable", "loc": [225, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7732, 0.0034, 1, 0.01, 0.0588, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C21", "label": "assign", "type": "assigned_variable", "loc": [225, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7732, 0.0034, 1, 0.01, 0.0882, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C38", "label": "assign", "type": "assigned_variable", "loc": [225, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7732, 0.0034, 1, 0.01, 0.1176, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C55", "label": "assign", "type": "assigned_variable", "loc": [225, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7732, 0.0034, 1, 0.01, 0.1471, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[6] = (7,0); grd[7] = (7,2); grd[8] = (7,4); grd[9] = (7,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C4", "label": "assign", "type": "assigned_variable", "loc": [226, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7766, 0.0034, 1, 0.01, 0.1765, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C21", "label": "assign", "type": "assigned_variable", "loc": [226, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7766, 0.0034, 1, 0.01, 0.2059, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C38", "label": "assign", "type": "assigned_variable", "loc": [226, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7766, 0.0034, 1, 0.01, 0.2353, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C55", "label": "assign", "type": "assigned_variable", "loc": [226, 226], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7766, 0.0034, 1, 0.01, 0.2647, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[12] = (6,1); grd[13] = (6,3); grd[14] = (6,5); grd[15] = (6,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C4", "label": "assign", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7801, 0.0034, 1, 0.01, 0.2941, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C21", "label": "assign", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7801, 0.0034, 1, 0.01, 0.3235, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C38", "label": "assign", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7801, 0.0034, 1, 0.01, 0.3529, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C55", "label": "assign", "type": "assigned_variable", "loc": [227, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7801, 0.0034, 1, 0.01, 0.3824, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[17] = (5,0); grd[18] = (5,2); grd[19] = (5,4); grd[20] = (5,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C4", "label": "assign", "type": "assigned_variable", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7835, 0.0034, 1, 0.01, 0.4118, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C21", "label": "assign", "type": "assigned_variable", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7835, 0.0034, 1, 0.01, 0.4412, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C38", "label": "assign", "type": "assigned_variable", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7835, 0.0034, 1, 0.01, 0.4706, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C55", "label": "assign", "type": "assigned_variable", "loc": [228, 228], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7835, 0.0034, 1, 0.01, 0.5, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[23] = (4,1); grd[24] = (4,3); grd[25] = (4,5); grd[26] = (4,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C4", "label": "assign", "type": "assigned_variable", "loc": [229, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7869, 0.0034, 1, 0.01, 0.5294, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C21", "label": "assign", "type": "assigned_variable", "loc": [229, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7869, 0.0034, 1, 0.01, 0.5588, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C38", "label": "assign", "type": "assigned_variable", "loc": [229, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7869, 0.0034, 1, 0.01, 0.5882, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C55", "label": "assign", "type": "assigned_variable", "loc": [229, 229], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7869, 0.0034, 1, 0.01, 0.6176, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[28] = (3,0); grd[29] = (3,2); grd[30] = (3,4); grd[31] = (3,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C4", "label": "assign", "type": "assigned_variable", "loc": [230, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7904, 0.0034, 1, 0.01, 0.6471, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[34] = (2,1); grd[35] = (2,3); grd[36] = (2,5); grd[37] = (2,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C21", "label": "assign", "type": "assigned_variable", "loc": [230, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7904, 0.0034, 1, 0.01, 0.6765, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[34] = (2,1); grd[35] = (2,3); grd[36] = (2,5); grd[37] = (2,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C38", "label": "assign", "type": "assigned_variable", "loc": [230, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7904, 0.0034, 1, 0.01, 0.7059, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[34] = (2,1); grd[35] = (2,3); grd[36] = (2,5); grd[37] = (2,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C55", "label": "assign", "type": "assigned_variable", "loc": [230, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7904, 0.0034, 1, 0.01, 0.7353, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[34] = (2,1); grd[35] = (2,3); grd[36] = (2,5); grd[37] = (2,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C4", "label": "assign", "type": "assigned_variable", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7938, 0.0034, 1, 0.01, 0.7647, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[39] = (1,0); grd[40] = (1,2); grd[41] = (1,4); grd[42] = (1,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C21", "label": "assign", "type": "assigned_variable", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7938, 0.0034, 1, 0.01, 0.7941, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[39] = (1,0); grd[40] = (1,2); grd[41] = (1,4); grd[42] = (1,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C38", "label": "assign", "type": "assigned_variable", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7938, 0.0034, 1, 0.01, 0.8235, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[39] = (1,0); grd[40] = (1,2); grd[41] = (1,4); grd[42] = (1,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C55", "label": "assign", "type": "assigned_variable", "loc": [231, 231], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7938, 0.0034, 1, 0.01, 0.8529, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[39] = (1,0); grd[40] = (1,2); grd[41] = (1,4); grd[42] = (1,6)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C4", "label": "assign", "type": "assigned_variable", "loc": [232, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7973, 0.0034, 1, 0.01, 0.8824, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[45] = (0,1); grd[46] = (0,3); grd[47] = (0,5); grd[48] = (0,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C21", "label": "assign", "type": "assigned_variable", "loc": [232, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7973, 0.0034, 1, 0.01, 0.9118, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[45] = (0,1); grd[46] = (0,3); grd[47] = (0,5); grd[48] = (0,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C38", "label": "assign", "type": "assigned_variable", "loc": [232, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7973, 0.0034, 1, 0.01, 0.9412, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[45] = (0,1); grd[46] = (0,3); grd[47] = (0,5); grd[48] = (0,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C55", "label": "assign", "type": "assigned_variable", "loc": [232, 232], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [14, 1, 0.7973, 0.0034, 1, 0.01, 0.9706, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " grd[45] = (0,1); grd[46] = (0,3); grd[47] = (0,5); grd[48] = (0,7)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L233_C4", "label": "return", "type": "return", "loc": [233, 233], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "vector": [13, 1, 0.8007, 0.0034, 1, 0.01, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return grd"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "label": "flip_dict", "type": "function", "loc": [235, 241], "level": 0, "parent": null, "vector": [2, 0, 0.8179, 0.0241, 0, 0.66, 0.8953, 845, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "flip_dict", "arg_names": ["m"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def flip_dict(m):\n d = {}\n keys = [k for k, _ in m.iteritems()]\n vals = [v for _, v in m.iteritems()]\n for k, v in zip(vals, keys):\n d[k] = v\n return d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L236_C4", "label": "d =", "type": "assigned_variable", "loc": [236, 236], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "vector": [14, 1, 0.811, 0.0034, 1, 0.11, 0.0, 355, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " d = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L237_C4", "label": "keys =", "type": "assigned_variable", "loc": [237, 237], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "vector": [14, 1, 0.8144, 0.0034, 1, 0.11, 0.25, 204, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " keys = [k for k, _ in m.iteritems()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L238_C4", "label": "vals =", "type": "assigned_variable", "loc": [238, 238], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "vector": [14, 1, 0.8179, 0.0034, 1, 0.11, 0.5, 17, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "vals", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " vals = [v for _, v in m.iteritems()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:For_L239_C4", "label": "for k, v", "type": "for", "loc": [239, 240], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "vector": [6, 1, 0.823, 0.0069, 1, 0.11, 0.75, 867, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k, v in zip(vals, keys):\n d[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L240_C8", "label": "assign", "type": "assigned_variable", "loc": [240, 240], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:For_L239_C4", "vector": [14, 2, 0.8247, 0.0034, 2, 0.05, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " d[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L241_C4", "label": "return", "type": "return", "loc": [241, 241], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "vector": [13, 1, 0.8282, 0.0034, 1, 0.11, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "label": "reverse_dict", "type": "function", "loc": [243, 249], "level": 0, "parent": null, "vector": [2, 0, 0.8454, 0.0241, 0, 0.66, 0.907, 695, 0, 1, 1, 0, 0, 0, 4], "semantic": {"name": "reverse_dict", "arg_names": ["m"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def reverse_dict(m):\n d = {}\n keys = [k for k, _ in m.iteritems()]\n vals = [v for _, v in m.iteritems()]\n for k, v in zip(keys, reversed(vals)):\n d[k] = v\n return d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L244_C4", "label": "d =", "type": "assigned_variable", "loc": [244, 244], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "vector": [14, 1, 0.8385, 0.0034, 1, 0.45, 0.0, 355, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "d", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " d = {}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L245_C4", "label": "keys =", "type": "assigned_variable", "loc": [245, 245], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "vector": [14, 1, 0.8419, 0.0034, 1, 0.45, 0.25, 204, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "keys", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " keys = [k for k, _ in m.iteritems()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L246_C4", "label": "vals =", "type": "assigned_variable", "loc": [246, 246], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "vector": [14, 1, 0.8454, 0.0034, 1, 0.45, 0.5, 17, 5, 0, 0, 0, 0, 0, 1], "semantic": {"name": "vals", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " vals = [v for _, v in m.iteritems()]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:For_L247_C4", "label": "for k, v", "type": "for", "loc": [247, 248], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "vector": [6, 1, 0.8505, 0.0069, 1, 0.45, 0.75, 867, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "k, v", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for k, v in zip(keys, reversed(vals)):\n d[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L248_C8", "label": "assign", "type": "assigned_variable", "loc": [248, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:For_L247_C4", "vector": [14, 2, 0.8522, 0.0034, 2, 0.08, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " d[k] = v"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L249_C4", "label": "return", "type": "return", "loc": [249, 249], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "vector": [13, 1, 0.8557, 0.0034, 1, 0.45, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return d"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "label": "similarity", "type": "function", "loc": [252, 256], "level": 0, "parent": null, "vector": [2, 0, 0.8729, 0.0172, 0, 0.66, 0.9186, 507, 0, 2, 1, 0, 0, 0, 3], "semantic": {"name": "similarity", "arg_names": ["pattern", "pieces"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def similarity(pattern, pieces):\n global grid\n p1 = [grid[i] for i in pattern]\n p2 = [grid[j] for j in pieces]\n return sum(min(math.hypot(x1-x2, y1-y2) for x1, y1 in p1) for x2, y2 in p2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L254_C4", "label": "p1 =", "type": "assigned_variable", "loc": [254, 254], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "vector": [14, 1, 0.8729, 0.0034, 1, 0.67, 0.0, 87, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "p1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " p1 = [grid[i] for i in pattern]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L255_C4", "label": "p2 =", "type": "assigned_variable", "loc": [255, 255], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "vector": [14, 1, 0.8763, 0.0034, 1, 0.67, 0.5, 843, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "p2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " p2 = [grid[j] for j in pieces]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L256_C4", "label": "return", "type": "return", "loc": [256, 256], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "vector": [13, 1, 0.8797, 0.0034, 1, 0.67, 1.0, 0, 3, 0, 0, 0, 0, 10, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return sum(min(math.hypot(x1-x2, y1-y2) for x1, y1 in p1) for x2, y2 in p2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "label": "get_preferences_from_file", "type": "function", "loc": [258, 271], "level": 0, "parent": null, "vector": [2, 0, 0.9089, 0.0481, 0, 0.66, 0.9302, 801, 0, 0, 1, 0, 0, 0, 10], "semantic": {"name": "get_preferences_from_file", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def get_preferences_from_file():\n config = RawConfigParser()\n if not os.access('raven.ini',os.F_OK):\n # no .ini file yet, so make one\n config.add_section('AnnotationWindow')\n config.set('AnnotationWindow', 'font', 'Arial')\n config.set('AnnotationWindow', 'size', '12')\n # Writing our configuration file to 'raven.ini'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L259_C4", "label": "config = RawConfigParser()", "type": "assigned_variable", "loc": [259, 259], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [14, 1, 0.89, 0.0034, 1, 0.63, 0.0, 308, 3, 0, 0, 0, 780, 10, 1], "semantic": {"name": "config", "arg_names": [], "import_names": [], "rhs_call_name": "RawConfigParser", "annotation": ""}, "snippet": " config = RawConfigParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "label": "if", "type": "if", "loc": [260, 267], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [4, 1, 0.9055, 0.0275, 1, 0.63, 0.2, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not os.access('raven.ini',os.F_OK):\n # no .ini file yet, so make one\n config.add_section('AnnotationWindow')\n config.set('AnnotationWindow', 'font', 'Arial')\n config.set('AnnotationWindow', 'size', '12')\n # Writing our configuration file to 'raven.ini'\n with open('raven.ini', 'wb') as configfile:\n config.write(configfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L262_C8", "label": "add_section()", "type": "expression", "loc": [262, 262], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "vector": [8, 2, 0.9003, 0.0034, 2, 0.71, 0.0, 130, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_section", "arg_names": [], "import_names": [], "rhs_call_name": "add_section", "annotation": ""}, "snippet": " config.add_section('AnnotationWindow')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L263_C8", "label": "set()", "type": "expression", "loc": [263, 263], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "vector": [8, 2, 0.9038, 0.0034, 2, 0.71, 0.5, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " config.set('AnnotationWindow', 'font', 'Arial')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L264_C8", "label": "set()", "type": "expression", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "vector": [8, 2, 0.9072, 0.0034, 2, 0.71, 1.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " config.set('AnnotationWindow', 'size', '12')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L267_C12", "label": "write()", "type": "expression", "loc": [267, 267], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "vector": [8, 2, 0.9175, 0.0034, 2, 0.71, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " config.write(configfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L268_C4", "label": "read()", "type": "expression", "loc": [268, 268], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [8, 1, 0.921, 0.0034, 1, 0.63, 0.4, 453, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "read", "arg_names": [], "import_names": [], "rhs_call_name": "read", "annotation": ""}, "snippet": " config.read('raven.ini')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L269_C4", "label": "font = get()", "type": "assigned_variable", "loc": [269, 269], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [14, 1, 0.9244, 0.0034, 1, 0.63, 0.6, 768, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "font", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " font = config.get('AnnotationWindow', 'font')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L270_C4", "label": "size = get()", "type": "assigned_variable", "loc": [270, 270], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [14, 1, 0.9278, 0.0034, 1, 0.63, 0.8, 714, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "size", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " size = config.get('AnnotationWindow', 'size')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L271_C4", "label": "return", "type": "return", "loc": [271, 271], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "vector": [13, 1, 0.9313, 0.0034, 1, 0.63, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return font, size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "label": "write_preferences_to_file", "type": "function", "loc": [273, 280], "level": 0, "parent": null, "vector": [2, 0, 0.9502, 0.0275, 0, 0.66, 0.9419, 15, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "write_preferences_to_file", "arg_names": ["font", "size"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def write_preferences_to_file(font, size):\n config = RawConfigParser()\n config.add_section('AnnotationWindow')\n config.set('AnnotationWindow', 'font', font)\n config.set('AnnotationWindow', 'size', size)\n # Writing our configuration file to 'raven.ini'\n with open('raven.ini', 'wb') as configfile:\n config.write(configfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L274_C4", "label": "config = RawConfigParser()", "type": "assigned_variable", "loc": [274, 274], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "vector": [14, 1, 0.9416, 0.0034, 1, 0.34, 0.0, 308, 3, 0, 0, 0, 780, 10, 1], "semantic": {"name": "config", "arg_names": [], "import_names": [], "rhs_call_name": "RawConfigParser", "annotation": ""}, "snippet": " config = RawConfigParser()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L275_C4", "label": "add_section()", "type": "expression", "loc": [275, 275], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "vector": [8, 1, 0.945, 0.0034, 1, 0.34, 0.3333, 130, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "add_section", "arg_names": [], "import_names": [], "rhs_call_name": "add_section", "annotation": ""}, "snippet": " config.add_section('AnnotationWindow')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L276_C4", "label": "set()", "type": "expression", "loc": [276, 276], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "vector": [8, 1, 0.9485, 0.0034, 1, 0.34, 0.6667, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " config.set('AnnotationWindow', 'font', font)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L277_C4", "label": "set()", "type": "expression", "loc": [277, 277], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "vector": [8, 1, 0.9519, 0.0034, 1, 0.34, 1.0, 21, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " config.set('AnnotationWindow', 'size', size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L280_C8", "label": "write()", "type": "expression", "loc": [280, 280], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "vector": [8, 1, 0.9622, 0.0034, 1, 0.34, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " config.write(configfile)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L282_C0", "label": "parse_index", "type": "function", "loc": [282, 284], "level": 0, "parent": null, "vector": [2, 0, 0.9725, 0.0103, 0, 0.66, 0.9535, 576, 0, 1, 1, 0, 0, 0, 3], "semantic": {"name": "parse_index", "arg_names": ["idx"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def parse_index(idx):\n line, _, char = idx.partition('.')\n return int(line), int(char)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L283_C4", "label": "line, _, char = partition()", "type": "assigned_variable", "loc": [283, 283], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L282_C0", "vector": [14, 1, 0.9725, 0.0034, 1, 0.28, 0.0, 578, 3, 1, 0, 0, 320, 10, 1], "semantic": {"name": "line, _, char", "arg_names": [], "import_names": [], "rhs_call_name": "partition", "annotation": ""}, "snippet": " line, _, char = idx.partition('.')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L284_C4", "label": "return", "type": "return", "loc": [284, 284], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L282_C0", "vector": [13, 1, 0.9759, 0.0034, 1, 0.28, 1.0, 0, 0, 0, 0, 0, 0, 8, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return int(line), int(char)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L286_C0", "label": "to_string", "type": "function", "loc": [286, 287], "level": 0, "parent": null, "vector": [2, 0, 0.9845, 0.0069, 0, 0.66, 0.9651, 549, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "to_string", "arg_names": ["line", "char"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "def to_string(line, char):\n return \"%d.%d\" % (line, char)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L287_C4", "label": "return", "type": "return", "loc": [287, 287], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L286_C0", "vector": [13, 1, 0.9863, 0.0034, 1, 0.0, 0.0, 0, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return \"%d.%d\" % (line, char)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L289_C0", "label": "grid = create_grid_map()", "type": "assigned_variable", "loc": [289, 289], "level": 0, "parent": null, "vector": [14, 0, 0.9931, 0.0034, 0, 0.66, 0.9767, 690, 3, 0, 0, 0, 432, 10, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "create_grid_map", "annotation": ""}, "snippet": "grid = create_grid_map()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L290_C0", "label": "keymap = create_key_map()", "type": "assigned_variable", "loc": [290, 290], "level": 0, "parent": null, "vector": [14, 0, 0.9966, 0.0034, 0, 0.66, 0.9884, 782, 3, 0, 0, 0, 770, 10, 1], "semantic": {"name": "keymap", "arg_names": [], "import_names": [], "rhs_call_name": "create_key_map", "annotation": ""}, "snippet": "keymap = create_key_map()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L291_C0", "label": "squaremap = flip_dict()", "type": "assigned_variable", "loc": [291, 291], "level": 0, "parent": null, "vector": [14, 0, 1.0, 0.0034, 0, 0.66, 1.0, 486, 3, 1, 0, 0, 845, 10, 1], "semantic": {"name": "squaremap", "arg_names": [], "import_names": [], "rhs_call_name": "flip_dict", "annotation": ""}, "snippet": "squaremap = flip_dict(keymap)"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L196_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L198_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L199_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L200_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L201_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L202_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L203_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L204_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L205_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C19"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C33"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L206_C47"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L195_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L207_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L210_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L211_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L212_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L213_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L214_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L215_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L216_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L217_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L218_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C18"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C32"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L219_C46"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L209_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L220_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L223_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L224_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L225_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L226_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L227_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L228_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L229_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L230_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L231_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C21"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C38"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L232_C55"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L222_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L233_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L236_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L237_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L238_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:For_L239_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:For_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L235_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L241_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L244_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L245_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L246_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:For_L247_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:For_L247_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L248_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L243_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L249_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L254_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L255_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L252_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L256_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L259_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L262_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L263_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:If_L260_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L267_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L268_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L269_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L270_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L258_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L271_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L274_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L275_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L276_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L277_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L273_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Expr_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L282_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Assign_L283_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L282_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L284_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_366:FunctionDef_L286_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_366:Return_L287_C4"}]
import os from Tkinter import * from Tkconstants import END, N, S, E, W from command import * from observer import * from globalconst import * from autoscrollbar import AutoScrollbar from textserialize import Serializer from hyperlinkmgr import HyperlinkManager from tkFileDialog import askopenfilename from tkFont import Font from tooltip import ToolTip class BoardView(Observer): def __init__(self, root, **props): self._statusbar = props['statusbar'] self.root = root self._model = props['model'] self._model.curr_state.attach(self) self._gameMgr = props['parent'] self._board_side = props.get('side') or DEFAULT_SIZE self.light_squares = props.get('lightsquares') or LIGHT_SQUARES self.dark_squares = props.get('darksquares') or DARK_SQUARES self.light_color = props.get('lightcheckers') or LIGHT_CHECKERS self.dark_color = props.get('darkcheckers') or DARK_CHECKERS self._square_size = self._board_side / 8 self._piece_offset = self._square_size / 5 self._crownpic = PhotoImage(file=CROWN_IMAGE) self._boardpos = create_position_map() self._gridpos = create_grid_map() self.canvas = Canvas(root, width=self._board_side, height=self._board_side, borderwidth=0, highlightthickness=0) right_panel = Frame(root, borderwidth=1, relief='sunken') self.toolbar = Frame(root) font, size = get_preferences_from_file() self.scrollbar = AutoScrollbar(root, container=right_panel, row=1, column=1, sticky='ns') self.txt = Text(root, width=40, height=1, borderwidth=0, font=(font,size), wrap='word', yscrollcommand=self.scrollbar.set) self.scrollbar.config(command=self.txt.yview) self.canvas.pack(side='left', fill='both', expand=False) self.toolbar.grid(in_=right_panel, row=0, column=0, sticky='ew') right_panel.pack(side='right', fill='both', expand=True) self.txt.grid(in_=right_panel, row=1, column=0, sticky='nsew') right_panel.grid_rowconfigure(1, weight=1) right_panel.grid_columnconfigure(0, weight=1) self.init_images() self.init_toolbar_buttons() self.init_font_sizes(font, size) self.init_tags() self._register_event_handlers() self.btnset = set([self.bold, self.italic, self.addLink, self.remLink]) self.btnmap = {'bold': self.bold, 'italic': self.italic, 'bullet': self.bullets, 'number': self.numbers, 'hyper': self.addLink} self.hypermgr = HyperlinkManager(self.txt, self._gameMgr.load_game) self.serializer = Serializer(self.txt, self.hypermgr) self.curr_annotation = '' self._setup_board(root) starting_squares = [i for i in self._model.curr_state.valid_squares if self._model.curr_state.squares[i] & (BLACK | WHITE)] self._draw_checkers(Command(add=starting_squares)) self.flip_view = False # black on bottom self._label_board() self.update_statusbar() def _toggle_state(self, tags, btn): # toggle the text state based on the first character in the # selected range. if self.txt.tag_ranges('sel'): current_tags = self.txt.tag_names('sel.first') elif self.txt.tag_ranges('insert'): current_tags = self.txt.tag_names('insert') else: return for tag in tags: already_tagged = any((x for x in current_tags if x.startswith(tag))) for t in current_tags: if t != 'sel': self.txt.tag_remove(t, 'sel.first', 'sel.last') if not already_tagged: self.txt.tag_add(tag, 'sel.first', 'sel.last') btn.configure(relief='sunken') other_btns = self.btnset.difference([btn]) for b in other_btns: b.configure(relief='raised') else: btn.configure(relief='raised') def _on_bold(self): self.bold_tooltip.hide() self._toggle_state(['bold'], self.bold) def _on_italic(self): self.italic_tooltip.hide() self._toggle_state(['italic'], self.italic) def _on_bullets(self): self._process_button_click('bullet', self.bullets_tooltip, self._add_bullets_if_needed, self._remove_bullets_if_needed) def _on_numbers(self): self._process_button_click('number', self.numbers_tooltip, self._add_numbers_if_needed, self._remove_numbers_if_needed) def _process_button_click(self, tag, tooltip, add_func, remove_func): tooltip.hide() if self.txt.tag_ranges('sel'): startline, _ = parse_index(self.txt.index('sel.first')) endline, _ = parse_index(self.txt.index('sel.last')) else: startline, _ = parse_index(self.txt.index(INSERT)) endline = startline current_tags = self.txt.tag_names('%d.0' % startline) if tag not in current_tags: add_func(startline, endline) else: remove_func(startline, endline) def _add_bullets_if_needed(self, startline, endline): self._remove_numbers_if_needed(startline, endline) for line in range(startline, endline+1): current_tags = self.txt.tag_names('%d.0' % line) if 'bullet' not in current_tags: start = '%d.0' % line end = '%d.end' % line self.txt.insert(start, '\t') self.txt.image_create(start, image=self.bullet_image) self.txt.insert(start, '\t') self.txt.tag_add('bullet', start, end) self.bullets.configure(relief='sunken') self.numbers.configure(relief='raised') def _remove_bullets_if_needed(self, startline, endline): for line in range(startline, endline+1): current_tags = self.txt.tag_names('%d.0' % line) if 'bullet' in current_tags: start = '%d.0' % line end = '%d.end' % line self.txt.tag_remove('bullet', start, end) start = '%d.0' % line end = '%d.3' % line self.txt.delete(start, end) self.bullets.configure(relief='raised') def _add_numbers_if_needed(self, startline, endline): self._remove_bullets_if_needed(startline, endline) num = 1 for line in range(startline, endline+1): current_tags = self.txt.tag_names('%d.0' % line) if 'number' not in current_tags: start = '%d.0' % line end = '%d.end' % line self.txt.insert(start, '\t') numstr = '%d.' % num self.txt.insert(start, numstr) self.txt.insert(start, '\t') self.txt.tag_add('number', start, end) num += 1 self.numbers.configure(relief='sunken') self.bullets.configure(relief='raised') def _remove_numbers_if_needed(self, startline, endline): cnt = IntVar() for line in range(startline, endline+1): current_tags = self.txt.tag_names('%d.0' % line) if 'number' in current_tags: start = '%d.0' % line end = '%d.end' % line self.txt.tag_remove('number', start, end) # Regex to match a tab, followed by any number of digits, # followed by a period, all at the start of a line. # The cnt variable stores the number of characters matched. pos = self.txt.search('^\t\d+\.\t', start, end, None, None, None, True, None, cnt) if pos: end = '%d.%d' % (line, cnt.get()) self.txt.delete(start, end) self.numbers.configure(relief='raised') def _on_undo(self): self.undo_tooltip.hide() self._gameMgr.parent.undo_single_move() def _on_undo_all(self): self.undoall_tooltip.hide() self._gameMgr.parent.undo_all_moves() def _on_redo(self): self.redo_tooltip.hide() self._gameMgr.parent.redo_single_move() def _on_redo_all(self): self.redoall_tooltip.hide() self._gameMgr.parent.redo_all_moves() def _on_add_link(self): filename = askopenfilename(initialdir='training') if filename: filename = os.path.relpath(filename, CUR_DIR) self._toggle_state(self.hypermgr.add(filename), self.addLink) def _on_remove_link(self): if self.txt.tag_ranges('sel'): current_tags = self.txt.tag_names('sel.first') if 'hyper' in current_tags: self._toggle_state(['hyper'], self.addLink) def _register_event_handlers(self): self.txt.event_add('<<KeyRel>>', '<KeyRelease-Home>', '<KeyRelease-End>', '<KeyRelease-Left>', '<KeyRelease-Right>', '<KeyRelease-Up>', '<KeyRelease-Down>', '<KeyRelease-Delete>', '<KeyRelease-BackSpace>') Widget.bind(self.txt, '<<Selection>>', self._sel_changed) Widget.bind(self.txt, '<ButtonRelease-1>', self._sel_changed) Widget.bind(self.txt, '<<KeyRel>>', self._key_release) def _key_release(self, event): line, char = parse_index(self.txt.index(INSERT)) self.update_button_state(to_string(line, char)) def _sel_changed(self, event): self.update_button_state(self.txt.index(INSERT)) def is_dirty(self): return self.curr_annotation != self.get_annotation() def reset_toolbar_buttons(self): for btn in self.btnset: btn.configure(relief='raised') def update_button_state(self, index): if self.txt.tag_ranges('sel'): current_tags = self.txt.tag_names('sel.first') else: current_tags = self.txt.tag_names(index) for btn in self.btnmap.itervalues(): btn.configure(relief='raised') for tag in current_tags: if tag in self.btnmap.keys(): self.btnmap[tag].configure(relief='sunken') def init_font_sizes(self, font, size): self.txt.config(font=[font, size]) self._b_font = Font(self.root, (font, size, 'bold')) self._i_font = Font(self.root, (font, size, 'italic')) def init_tags(self): self.txt.tag_config('bold', font=self._b_font, wrap='word') self.txt.tag_config('italic', font=self._i_font, wrap='word') self.txt.tag_config('number', tabs='.5c center 1c left', lmargin1='0', lmargin2='1c') self.txt.tag_config('bullet', tabs='.5c center 1c left', lmargin1='0', lmargin2='1c') def init_images(self): self.bold_image = PhotoImage(file=BOLD_IMAGE) self.italic_image = PhotoImage(file=ITALIC_IMAGE) self.addlink_image = PhotoImage(file=ADDLINK_IMAGE) self.remlink_image = PhotoImage(file=REMLINK_IMAGE) self.bullets_image = PhotoImage(file=BULLETS_IMAGE) self.bullet_image = PhotoImage(file=BULLET_IMAGE) self.numbers_image = PhotoImage(file=NUMBERS_IMAGE) self.undo_image = PhotoImage(file=UNDO_IMAGE) self.undoall_image= PhotoImage(file=UNDOALL_IMAGE) self.redo_image = PhotoImage(file=REDO_IMAGE) self.redoall_image = PhotoImage(file=REDOALL_IMAGE) def init_toolbar_buttons(self): self.bold = Button(name='bold', image=self.bold_image, borderwidth=1, command=self._on_bold) self.bold.grid(in_=self.toolbar, row=0, column=0, sticky=W) self.italic = Button(name='italic', image=self.italic_image, borderwidth=1, command=self._on_italic) self.italic.grid(in_=self.toolbar, row=0, column=1, sticky=W) self.bullets = Button(name='bullets', image=self.bullets_image, borderwidth=1, command=self._on_bullets) self.bullets.grid(in_=self.toolbar, row=0, column=2, sticky=W) self.numbers = Button(name='numbers', image=self.numbers_image, borderwidth=1, command=self._on_numbers) self.numbers.grid(in_=self.toolbar, row=0, column=3, sticky=W) self.addLink = Button(name='addlink', image=self.addlink_image, borderwidth=1, command=self._on_add_link) self.addLink.grid(in_=self.toolbar, row=0, column=4, sticky=W) self.remLink = Button(name='remlink', image=self.remlink_image, borderwidth=1, command=self._on_remove_link) self.remLink.grid(in_=self.toolbar, row=0, column=5, sticky=W) self.frame = Frame(width=0) self.frame.grid(in_=self.toolbar, padx=5, row=0, column=6, sticky=W) self.undoall = Button(name='undoall', image=self.undoall_image, borderwidth=1, command=self._on_undo_all) self.undoall.grid(in_=self.toolbar, row=0, column=7, sticky=W) self.undo = Button(name='undo', image=self.undo_image, borderwidth=1, command=self._on_undo) self.undo.grid(in_=self.toolbar, row=0, column=8, sticky=W) self.redo = Button(name='redo', image=self.redo_image, borderwidth=1, command=self._on_redo) self.redo.grid(in_=self.toolbar, row=0, column=9, sticky=W) self.redoall = Button(name='redoall', image=self.redoall_image, borderwidth=1, command=self._on_redo_all) self.redoall.grid(in_=self.toolbar, row=0, column=10, sticky=W) self.bold_tooltip = ToolTip(self.bold, 'Bold') self.italic_tooltip = ToolTip(self.italic, 'Italic') self.bullets_tooltip = ToolTip(self.bullets, 'Bullet list') self.numbers_tooltip = ToolTip(self.numbers, 'Numbered list') self.addlink_tooltip = ToolTip(self.addLink, 'Add hyperlink') self.remlink_tooltip = ToolTip(self.remLink, 'Remove hyperlink') self.undoall_tooltip = ToolTip(self.undoall, 'First move') self.undo_tooltip = ToolTip(self.undo, 'Back one move') self.redo_tooltip = ToolTip(self.redo, 'Forward one move') self.redoall_tooltip = ToolTip(self.redoall, 'Last move') def reset_view(self, model): self._model = model self.txt.delete('1.0', END) sq = self._model.curr_state.valid_squares self.canvas.delete(self.dark_color) self.canvas.delete(self.light_color) starting_squares = [i for i in sq if (self._model.curr_state.squares[i] & (BLACK | WHITE))] self._draw_checkers(Command(add=starting_squares)) for i in sq: self.highlight_square(i, DARK_SQUARES) def calc_board_loc(self, x, y): vx, vy = self.calc_valid_xy(x, y) xi = int(vx / self._square_size) yi = int(vy / self._square_size) return xi, yi def calc_board_pos(self, xi, yi): return self._boardpos.get(xi + yi * 8, 0) def calc_grid_pos(self, pos): return self._gridpos[pos] def highlight_square(self, idx, color): row, col = self._gridpos[idx] hpos = col + row * 8 self.canvas.itemconfigure('o'+str(hpos), outline=color) def calc_valid_xy(self, x, y): return (min(max(0, self.canvas.canvasx(x)), self._board_side-1), min(max(0, self.canvas.canvasy(y)), self._board_side-1)) def notify(self, move): add_lst = [] rem_lst = [] for idx, _, newval in move.affected_squares: if newval & FREE: rem_lst.append(idx) else: add_lst.append(idx) cmd = Command(add=add_lst, remove=rem_lst) self._draw_checkers(cmd) self.txt.delete('1.0', END) self.serializer.restore(move.annotation) self.curr_annotation = move.annotation if self.txt.get('1.0','end').strip() == '': start = keymap[move.affected_squares[FIRST][0]] dest = keymap[move.affected_squares[LAST][0]] movestr = '%d-%d' % (start, dest) self.txt.insert('1.0', movestr) def get_annotation(self): return self.serializer.dump() def erase_checker(self, index): self.canvas.delete('c'+str(index)) def flip_board(self, flip): self._delete_labels() self.canvas.delete(self.dark_color) self.canvas.delete(self.light_color) if self.flip_view != flip: self.flip_view = flip self._gridpos = reverse_dict(self._gridpos) self._boardpos = reverse_dict(self._boardpos) self._label_board() starting_squares = [i for i in self._model.curr_state.valid_squares if self._model.curr_state.squares[i] & (BLACK | WHITE)] all_checkers = Command(add=starting_squares) self._draw_checkers(all_checkers) def update_statusbar(self, output=None): if output: self._statusbar['text'] = output self.root.update() return if self._model.terminal_test(): text = "Game over. " if self._model.curr_state.to_move == WHITE: text += "Black won." else: text += "White won." self._statusbar['text'] = text return if self._model.curr_state.to_move == WHITE: self._statusbar['text'] = "White to move" else: self._statusbar['text'] = "Black to move" def get_positions(self, type): return map(str, sorted((keymap[i] for i in self._model.curr_state.valid_squares if self._model.curr_state.squares[i] == type))) # private functions def _setup_board(self, root): for r in range(0, 8, 2): row = r * self._square_size for c in range(0, 8, 2): col = c * self._square_size self.canvas.create_rectangle(col, row, col+self._square_size-1, row+self._square_size-1, fill=LIGHT_SQUARES, outline=LIGHT_SQUARES) for c in range(1, 8, 2): col = c * self._square_size self.canvas.create_rectangle(col, row+self._square_size, col+self._square_size-1, row+self._square_size*2-1, fill=LIGHT_SQUARES, outline=LIGHT_SQUARES) for r in range(0, 8, 2): row = r * self._square_size for c in range(1, 8, 2): col = c * self._square_size self.canvas.create_rectangle(col, row, col+self._square_size-1, row+self._square_size-1, fill=DARK_SQUARES, outline=DARK_SQUARES, tags='o'+str(r*8+c)) for c in range(0, 8, 2): col = c * self._square_size self.canvas.create_rectangle(col, row+self._square_size, col+self._square_size-1, row+self._square_size*2-1, fill=DARK_SQUARES, outline=DARK_SQUARES, tags='o'+str(((r+1)*8)+c)) def _label_board(self): for key, pair in self._gridpos.iteritems(): row, col = pair xpos, ypos = col * self._square_size, row * self._square_size self.canvas.create_text(xpos+self._square_size-7, ypos+self._square_size-7, text=str(keymap[key]), fill=LIGHT_SQUARES, tag='label') def _delete_labels(self): self.canvas.delete('label') def _draw_checkers(self, change): if change == None: return for i in change.remove: self.canvas.delete('c'+str(i)) for i in change.add: checker = self._model.curr_state.squares[i] color = self.dark_color if checker & COLORS == BLACK else self.light_color row, col = self._gridpos[i] x = col * self._square_size + self._piece_offset y = row * self._square_size + self._piece_offset tag = 'c'+str(i) self.canvas.create_oval(x+2, y+2, x+2+CHECKER_SIZE, y+2+CHECKER_SIZE, outline='black', fill='black', tags=(color, tag)) self.canvas.create_oval(x, y, x+CHECKER_SIZE, y+CHECKER_SIZE, outline='black', fill=color, tags=(color, tag)) if checker & KING: self.canvas.create_image(x+15, y+15, image=self._crownpic, anchor=CENTER, tags=(color, tag))
ajibawa-2023/Python-Code-Large/train/row_367
362
485
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_367:Import_L1_C0", "label": "os import os", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0021, 0.0021, 0, 0.66, 0.0, 688, 0, 1, 0, 0, 688, 0, 0], "semantic": {"name": "os", "arg_names": [], "import_names": ["os"], "rhs_call_name": "", "annotation": ""}, "snippet": "import os"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L2_C0", "label": "from Tkinter import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0021, 0, 0.66, 0.0833, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Tkinter import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L3_C0", "label": "from Tkconstants import END, N, S\u2026", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0062, 0.0021, 0, 0.66, 0.1667, 2, 0, 5, 0, 0, 2, 0, 0], "semantic": {"name": "Tkconstants", "arg_names": [], "import_names": ["END", "N", "S", "E", "W"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Tkconstants import END, N, S, E, W"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L4_C0", "label": "from command import *", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0082, 0.0021, 0, 0.66, 0.25, 842, 0, 1, 0, 0, 842, 0, 0], "semantic": {"name": "command", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from command import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L5_C0", "label": "from observer import *", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0103, 0.0021, 0, 0.66, 0.3333, 1, 0, 1, 0, 0, 1, 0, 0], "semantic": {"name": "observer", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from observer import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L6_C0", "label": "from globalconst import *", "type": "import", "loc": [6, 6], "level": 0, "parent": null, "vector": [1, 0, 0.0124, 0.0021, 0, 0.66, 0.4167, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from globalconst import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L7_C0", "label": "from autoscrollbar import AutoScrollbar", "type": "import", "loc": [7, 7], "level": 0, "parent": null, "vector": [1, 0, 0.0144, 0.0021, 0, 0.66, 0.5, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "autoscrollbar", "arg_names": [], "import_names": ["AutoScrollbar"], "rhs_call_name": "", "annotation": ""}, "snippet": "from autoscrollbar import AutoScrollbar"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L8_C0", "label": "from textserialize import Serializer", "type": "import", "loc": [8, 8], "level": 0, "parent": null, "vector": [1, 0, 0.0165, 0.0021, 0, 0.66, 0.5833, 625, 0, 1, 0, 0, 625, 0, 0], "semantic": {"name": "textserialize", "arg_names": [], "import_names": ["Serializer"], "rhs_call_name": "", "annotation": ""}, "snippet": "from textserialize import Serializer"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L9_C0", "label": "from hyperlinkmgr import HyperlinkManager", "type": "import", "loc": [9, 9], "level": 0, "parent": null, "vector": [1, 0, 0.0186, 0.0021, 0, 0.66, 0.6667, 463, 0, 1, 0, 0, 463, 0, 0], "semantic": {"name": "hyperlinkmgr", "arg_names": [], "import_names": ["HyperlinkManager"], "rhs_call_name": "", "annotation": ""}, "snippet": "from hyperlinkmgr import HyperlinkManager"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L10_C0", "label": "from tkFileDialog import askopenfilename", "type": "import", "loc": [10, 10], "level": 0, "parent": null, "vector": [1, 0, 0.0206, 0.0021, 0, 0.66, 0.75, 377, 0, 1, 0, 0, 377, 0, 0], "semantic": {"name": "tkFileDialog", "arg_names": [], "import_names": ["askopenfilename"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tkFileDialog import askopenfilename"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L11_C0", "label": "from tkFont import Font", "type": "import", "loc": [11, 11], "level": 0, "parent": null, "vector": [1, 0, 0.0227, 0.0021, 0, 0.66, 0.8333, 24, 0, 1, 0, 0, 24, 0, 0], "semantic": {"name": "tkFont", "arg_names": [], "import_names": ["Font"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tkFont import Font"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ImportFrom_L12_C0", "label": "from tooltip import ToolTip", "type": "import", "loc": [12, 12], "level": 0, "parent": null, "vector": [1, 0, 0.0247, 0.0021, 0, 0.66, 0.9167, 568, 0, 1, 0, 0, 568, 0, 0], "semantic": {"name": "tooltip", "arg_names": [], "import_names": ["ToolTip"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tooltip import ToolTip"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "label": "BoardView", "type": "class", "loc": [14, 485], "level": 0, "parent": null, "vector": [3, 0, 0.5144, 0.9732, 0, 0.66, 1.0, 87, 0, 43, 0, 0, 771, 0, 99], "semantic": {"name": "BoardView", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class BoardView(Observer):\n def __init__(self, root, **props):\n self._statusbar = props['statusbar']\n self.root = root\n self._model = props['model']\n self._model.curr_state.attach(self)\n self._gameMgr = props['parent']\n self._board_side = props.get('side') or DEFAULT_SIZE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "label": "__init__", "type": "function", "loc": [15, 69], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.0866, 0.1134, 1, 0.63, 0.0, 555, 0, 3, 0, 0, 0, 0, 35], "semantic": {"name": "__init__", "arg_names": ["self", "root", "props"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, root, **props):\n self._statusbar = props['statusbar']\n self.root = root\n self._model = props['model']\n self._model.curr_state.attach(self)\n self._gameMgr = props['parent']\n self._board_side = props.get('side') or DEFAULT_SIZE\n self.light_squares = props.get('lightsquares') or LIGHT_SQUARES"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L16_C8", "label": "self._statusbar =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.033, 0.0021, 2, 0.66, 0.0, 570, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._statusbar", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._statusbar = props['statusbar']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L17_C8", "label": "self.root =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0351, 0.0021, 2, 0.66, 0.0233, 81, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.root", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.root = root"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L18_C8", "label": "self._model =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0371, 0.0021, 2, 0.66, 0.0465, 580, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._model = props['model']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L19_C8", "label": "attach()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0392, 0.0021, 2, 0.66, 0.0698, 522, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "attach", "arg_names": [], "import_names": [], "rhs_call_name": "attach", "annotation": ""}, "snippet": " self._model.curr_state.attach(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L20_C8", "label": "self._gameMgr =", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0412, 0.0021, 2, 0.66, 0.093, 905, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._gameMgr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._gameMgr = props['parent']"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L21_C8", "label": "self._board_side =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0433, 0.0021, 2, 0.66, 0.1163, 459, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self._board_side", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._board_side = props.get('side') or DEFAULT_SIZE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L22_C8", "label": "self.light_squares =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0454, 0.0021, 2, 0.66, 0.1395, 508, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.light_squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.light_squares = props.get('lightsquares') or LIGHT_SQUARES"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L23_C8", "label": "self.dark_squares =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0474, 0.0021, 2, 0.66, 0.1628, 681, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.dark_squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.dark_squares = props.get('darksquares') or DARK_SQUARES"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L24_C8", "label": "self.light_color =", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0495, 0.0021, 2, 0.66, 0.186, 633, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.light_color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.light_color = props.get('lightcheckers') or LIGHT_CHECKERS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L25_C8", "label": "self.dark_color =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0515, 0.0021, 2, 0.66, 0.2093, 406, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.dark_color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.dark_color = props.get('darkcheckers') or DARK_CHECKERS"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L26_C8", "label": "self._square_size =", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0536, 0.0021, 2, 0.66, 0.2326, 182, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._square_size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._square_size = self._board_side / 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L27_C8", "label": "self._piece_offset =", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0557, 0.0021, 2, 0.66, 0.2558, 531, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._piece_offset", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._piece_offset = self._square_size / 5"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L28_C8", "label": "self._crownpic = PhotoImage()", "type": "assigned_variable", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0577, 0.0021, 2, 0.66, 0.2791, 253, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self._crownpic", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self._crownpic = PhotoImage(file=CROWN_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L29_C8", "label": "self._boardpos = create_position_map()", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0598, 0.0021, 2, 0.66, 0.3023, 380, 3, 0, 0, 0, 15, 10, 1], "semantic": {"name": "self._boardpos", "arg_names": [], "import_names": [], "rhs_call_name": "create_position_map", "annotation": ""}, "snippet": " self._boardpos = create_position_map()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L30_C8", "label": "self._gridpos = create_grid_map()", "type": "assigned_variable", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0619, 0.0021, 2, 0.66, 0.3256, 853, 3, 0, 0, 0, 432, 10, 1], "semantic": {"name": "self._gridpos", "arg_names": [], "import_names": [], "rhs_call_name": "create_grid_map", "annotation": ""}, "snippet": " self._gridpos = create_grid_map()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L31_C8", "label": "self.canvas = Canvas()", "type": "assigned_variable", "loc": [31, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.066, 0.0062, 2, 0.66, 0.3488, 371, 3, 5, 0, 0, 604, 10, 1], "semantic": {"name": "self.canvas", "arg_names": [], "import_names": [], "rhs_call_name": "Canvas", "annotation": ""}, "snippet": " self.canvas = Canvas(root, width=self._board_side,\n height=self._board_side, borderwidth=0,\n highlightthickness=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L34_C8", "label": "right_panel = Frame()", "type": "assigned_variable", "loc": [34, 34], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0701, 0.0021, 2, 0.66, 0.3721, 72, 3, 3, 0, 0, 342, 10, 1], "semantic": {"name": "right_panel", "arg_names": [], "import_names": [], "rhs_call_name": "Frame", "annotation": ""}, "snippet": " right_panel = Frame(root, borderwidth=1, relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L36_C8", "label": "self.toolbar = Frame()", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0742, 0.0021, 2, 0.66, 0.3953, 193, 3, 1, 0, 0, 342, 10, 1], "semantic": {"name": "self.toolbar", "arg_names": [], "import_names": [], "rhs_call_name": "Frame", "annotation": ""}, "snippet": " self.toolbar = Frame(root)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L37_C8", "label": "font, size = get_preferences_from_file()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0763, 0.0021, 2, 0.66, 0.4186, 677, 3, 0, 0, 0, 801, 10, 1], "semantic": {"name": "font, size", "arg_names": [], "import_names": [], "rhs_call_name": "get_preferences_from_file", "annotation": ""}, "snippet": " font, size = get_preferences_from_file()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L38_C8", "label": "self.scrollbar = AutoScrollbar()", "type": "assigned_variable", "loc": [38, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0794, 0.0041, 2, 0.66, 0.4419, 752, 3, 5, 0, 0, 968, 10, 1], "semantic": {"name": "self.scrollbar", "arg_names": [], "import_names": [], "rhs_call_name": "AutoScrollbar", "annotation": ""}, "snippet": " self.scrollbar = AutoScrollbar(root, container=right_panel,\n row=1, column=1, sticky='ns')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L40_C8", "label": "self.txt = Text()", "type": "assigned_variable", "loc": [40, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.0845, 0.0062, 2, 0.66, 0.4651, 120, 3, 7, 0, 0, 833, 10, 1], "semantic": {"name": "self.txt", "arg_names": [], "import_names": [], "rhs_call_name": "Text", "annotation": ""}, "snippet": " self.txt = Text(root, width=40, height=1, borderwidth=0,\n font=(font,size), wrap='word',\n yscrollcommand=self.scrollbar.set)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L43_C8", "label": "config()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0887, 0.0021, 2, 0.66, 0.4884, 308, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "config", "arg_names": [], "import_names": [], "rhs_call_name": "config", "annotation": ""}, "snippet": " self.scrollbar.config(command=self.txt.yview)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L44_C8", "label": "pack()", "type": "expression", "loc": [44, 44], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0907, 0.0021, 2, 0.66, 0.5116, 742, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self.canvas.pack(side='left', fill='both', expand=False)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L45_C8", "label": "grid()", "type": "expression", "loc": [45, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0928, 0.0021, 2, 0.66, 0.5349, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.toolbar.grid(in_=right_panel, row=0, column=0, sticky='ew')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L46_C8", "label": "pack()", "type": "expression", "loc": [46, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0948, 0.0021, 2, 0.66, 0.5581, 742, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " right_panel.pack(side='right', fill='both', expand=True)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L47_C8", "label": "grid()", "type": "expression", "loc": [47, 47], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.0969, 0.0021, 2, 0.66, 0.5814, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.txt.grid(in_=right_panel, row=1, column=0, sticky='nsew')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L48_C8", "label": "grid_rowconfigure()", "type": "expression", "loc": [48, 48], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.099, 0.0021, 2, 0.66, 0.6047, 623, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "grid_rowconfigure", "arg_names": [], "import_names": [], "rhs_call_name": "grid_rowconfigure", "annotation": ""}, "snippet": " right_panel.grid_rowconfigure(1, weight=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L49_C8", "label": "grid_columnconfigure()", "type": "expression", "loc": [49, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.101, 0.0021, 2, 0.66, 0.6279, 934, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "grid_columnconfigure", "arg_names": [], "import_names": [], "rhs_call_name": "grid_columnconfigure", "annotation": ""}, "snippet": " right_panel.grid_columnconfigure(0, weight=1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L50_C8", "label": "init_images()", "type": "expression", "loc": [50, 50], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1031, 0.0021, 2, 0.66, 0.6512, 725, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "init_images", "arg_names": [], "import_names": [], "rhs_call_name": "init_images", "annotation": ""}, "snippet": " self.init_images()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L51_C8", "label": "init_toolbar_buttons()", "type": "expression", "loc": [51, 51], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1052, 0.0021, 2, 0.66, 0.6744, 409, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "init_toolbar_buttons", "arg_names": [], "import_names": [], "rhs_call_name": "init_toolbar_buttons", "annotation": ""}, "snippet": " self.init_toolbar_buttons()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L52_C8", "label": "init_font_sizes()", "type": "expression", "loc": [52, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1072, 0.0021, 2, 0.66, 0.6977, 974, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "init_font_sizes", "arg_names": [], "import_names": [], "rhs_call_name": "init_font_sizes", "annotation": ""}, "snippet": " self.init_font_sizes(font, size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L53_C8", "label": "init_tags()", "type": "expression", "loc": [53, 53], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1093, 0.0021, 2, 0.66, 0.7209, 369, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "init_tags", "arg_names": [], "import_names": [], "rhs_call_name": "init_tags", "annotation": ""}, "snippet": " self.init_tags()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L54_C8", "label": "_register_event_handlers()", "type": "expression", "loc": [54, 54], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1113, 0.0021, 2, 0.66, 0.7442, 21, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_register_event_handlers", "arg_names": [], "import_names": [], "rhs_call_name": "_register_event_handlers", "annotation": ""}, "snippet": " self._register_event_handlers()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L55_C8", "label": "self.btnset = set()", "type": "assigned_variable", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1134, 0.0021, 2, 0.66, 0.7674, 845, 3, 1, 0, 0, 21, 10, 1], "semantic": {"name": "self.btnset", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self.btnset = set([self.bold, self.italic, self.addLink, self.remLink])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L56_C8", "label": "self.btnmap =", "type": "assigned_variable", "loc": [56, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1175, 0.0062, 2, 0.66, 0.7907, 842, 0, 0, 0, 0, 0, 6, 0], "semantic": {"name": "self.btnmap", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.btnmap = {'bold': self.bold, 'italic': self.italic,\n 'bullet': self.bullets, 'number': self.numbers,\n 'hyper': self.addLink}"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L59_C8", "label": "self.hypermgr = HyperlinkManager()", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1216, 0.0021, 2, 0.66, 0.814, 612, 3, 2, 0, 0, 220, 10, 1], "semantic": {"name": "self.hypermgr", "arg_names": [], "import_names": [], "rhs_call_name": "HyperlinkManager", "annotation": ""}, "snippet": " self.hypermgr = HyperlinkManager(self.txt, self._gameMgr.load_game)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L60_C8", "label": "self.serializer = Serializer()", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1237, 0.0021, 2, 0.66, 0.8372, 527, 3, 2, 0, 0, 577, 10, 1], "semantic": {"name": "self.serializer", "arg_names": [], "import_names": [], "rhs_call_name": "Serializer", "annotation": ""}, "snippet": " self.serializer = Serializer(self.txt, self.hypermgr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L61_C8", "label": "self.curr_annotation =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1258, 0.0021, 2, 0.66, 0.8605, 410, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.curr_annotation", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.curr_annotation = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L62_C8", "label": "_setup_board()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1278, 0.0021, 2, 0.66, 0.8837, 886, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_setup_board", "arg_names": [], "import_names": [], "rhs_call_name": "_setup_board", "annotation": ""}, "snippet": " self._setup_board(root)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L63_C8", "label": "starting_squares =", "type": "assigned_variable", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.132, 0.0062, 2, 0.66, 0.907, 184, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "starting_squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " starting_squares = [i for i in self._model.curr_state.valid_squares\n if self._model.curr_state.squares[i] &\n (BLACK | WHITE)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L66_C8", "label": "_draw_checkers()", "type": "expression", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1361, 0.0021, 2, 0.66, 0.9302, 752, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_draw_checkers", "arg_names": [], "import_names": [], "rhs_call_name": "_draw_checkers", "annotation": ""}, "snippet": " self._draw_checkers(Command(add=starting_squares))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L67_C8", "label": "self.flip_view =", "type": "assigned_variable", "loc": [67, 67], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [14, 2, 0.1381, 0.0021, 2, 0.66, 0.9535, 131, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.flip_view", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.flip_view = False # black on bottom"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L68_C8", "label": "_label_board()", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1402, 0.0021, 2, 0.66, 0.9767, 913, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_label_board", "arg_names": [], "import_names": [], "rhs_call_name": "_label_board", "annotation": ""}, "snippet": " self._label_board()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L69_C8", "label": "update_statusbar()", "type": "expression", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "vector": [8, 2, 0.1423, 0.0021, 2, 0.66, 1.0, 743, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update_statusbar", "arg_names": [], "import_names": [], "rhs_call_name": "update_statusbar", "annotation": ""}, "snippet": " self.update_statusbar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4", "label": "_toggle_state", "type": "function", "loc": [71, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.1691, 0.0474, 1, 0.63, 0.0238, 18, 0, 3, 0, 0, 0, 0, 12], "semantic": {"name": "_toggle_state", "arg_names": ["self", "tags", "btn"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _toggle_state(self, tags, btn):\n # toggle the text state based on the first character in the\n # selected range.\n if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n elif self.txt.tag_ranges('insert'):\n current_tags = self.txt.tag_names('insert')\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8", "label": "if", "type": "if", "loc": [74, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4", "vector": [4, 2, 0.1577, 0.0124, 2, 0.0, 0.0, 0, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n elif self.txt.tag_ranges('insert'):\n current_tags = self.txt.tag_names('insert')\n else:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L75_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [75, 75], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8", "vector": [14, 3, 0.1546, 0.0021, 3, 0.59, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('sel.first')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8", "label": "if", "type": "if", "loc": [76, 79], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8", "vector": [4, 3, 0.1598, 0.0082, 3, 0.59, 1.0, 0, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.txt.tag_ranges('insert'):\n current_tags = self.txt.tag_names('insert')\n else:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L77_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [77, 77], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8", "vector": [14, 4, 0.1588, 0.0021, 4, 0.85, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('insert')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L79_C12", "label": "return", "type": "return", "loc": [79, 79], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8", "vector": [13, 4, 0.1629, 0.0021, 4, 0.85, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "label": "for tag", "type": "for", "loc": [80, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4", "vector": [6, 2, 0.1784, 0.0289, 2, 0.0, 1.0, 732, 2, 0, 0, 0, 0, 0, 8], "semantic": {"name": "tag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for tag in tags:\n already_tagged = any((x for x in current_tags if\n x.startswith(tag)))\n for t in current_tags:\n if t != 'sel':\n self.txt.tag_remove(t, 'sel.first', 'sel.last')\n if not already_tagged:\n self.txt.tag_add(tag, 'sel.first', 'sel.last')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L81_C12", "label": "already_tagged = any()", "type": "assigned_variable", "loc": [81, 82], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "vector": [14, 3, 0.168, 0.0041, 3, 0.35, 0.0, 312, 3, 1, 0, 0, 277, 10, 2], "semantic": {"name": "already_tagged", "arg_names": [], "import_names": [], "rhs_call_name": "any", "annotation": ""}, "snippet": " already_tagged = any((x for x in current_tags if\n x.startswith(tag)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L83_C12", "label": "for t", "type": "for", "loc": [83, 85], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "vector": [6, 3, 0.1732, 0.0062, 3, 0.35, 0.5, 15, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "t", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for t in current_tags:\n if t != 'sel':\n self.txt.tag_remove(t, 'sel.first', 'sel.last')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L84_C16", "label": "if", "type": "if", "loc": [84, 85], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L83_C12", "vector": [4, 4, 0.1742, 0.0041, 4, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if t != 'sel':\n self.txt.tag_remove(t, 'sel.first', 'sel.last')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L85_C20", "label": "tag_remove()", "type": "expression", "loc": [85, 85], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L84_C16", "vector": [8, 5, 0.1753, 0.0021, 5, 0.34, 0.0, 472, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_remove", "arg_names": [], "import_names": [], "rhs_call_name": "tag_remove", "annotation": ""}, "snippet": " self.txt.tag_remove(t, 'sel.first', 'sel.last')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "label": "if", "type": "if", "loc": [86, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "vector": [4, 3, 0.1845, 0.0165, 3, 0.35, 1.0, 0, 0, 0, 0, 0, 0, 0, 5], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not already_tagged:\n self.txt.tag_add(tag, 'sel.first', 'sel.last')\n btn.configure(relief='sunken')\n other_btns = self.btnset.difference([btn])\n for b in other_btns:\n b.configure(relief='raised')\n else:\n btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L87_C16", "label": "tag_add()", "type": "expression", "loc": [87, 87], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "vector": [8, 4, 0.1794, 0.0021, 4, 0.35, 0.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txt.tag_add(tag, 'sel.first', 'sel.last')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L88_C16", "label": "configure()", "type": "expression", "loc": [88, 88], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "vector": [8, 4, 0.1814, 0.0021, 4, 0.35, 0.25, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " btn.configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L89_C16", "label": "other_btns = difference()", "type": "assigned_variable", "loc": [89, 89], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "vector": [14, 4, 0.1835, 0.0021, 4, 0.35, 0.5, 23, 3, 1, 0, 0, 498, 10, 1], "semantic": {"name": "other_btns", "arg_names": [], "import_names": [], "rhs_call_name": "difference", "annotation": ""}, "snippet": " other_btns = self.btnset.difference([btn])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L90_C16", "label": "for b", "type": "for", "loc": [90, 91], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "vector": [6, 4, 0.1866, 0.0041, 4, 0.35, 0.75, 756, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "b", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for b in other_btns:\n b.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L91_C20", "label": "configure()", "type": "expression", "loc": [91, 91], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L90_C16", "vector": [8, 5, 0.1876, 0.0021, 5, 0.01, 0.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " b.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L93_C16", "label": "configure()", "type": "expression", "loc": [93, 93], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "vector": [8, 4, 0.1918, 0.0021, 4, 0.35, 1.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4", "label": "_on_bold", "type": "function", "loc": [95, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.1979, 0.0062, 1, 0.63, 0.0476, 339, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_bold", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_bold(self):\n self.bold_tooltip.hide()\n self._toggle_state(['bold'], self.bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L96_C8", "label": "hide()", "type": "expression", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4", "vector": [8, 2, 0.1979, 0.0021, 2, 0.88, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.bold_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L97_C8", "label": "_toggle_state()", "type": "expression", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4", "vector": [8, 2, 0.2, 0.0021, 2, 0.88, 1.0, 18, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_toggle_state", "arg_names": [], "import_names": [], "rhs_call_name": "_toggle_state", "annotation": ""}, "snippet": " self._toggle_state(['bold'], self.bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4", "label": "_on_italic", "type": "function", "loc": [99, 101], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.2062, 0.0062, 1, 0.63, 0.0714, 623, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_italic", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_italic(self):\n self.italic_tooltip.hide()\n self._toggle_state(['italic'], self.italic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L100_C8", "label": "hide()", "type": "expression", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4", "vector": [8, 2, 0.2062, 0.0021, 2, 0.87, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.italic_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L101_C8", "label": "_toggle_state()", "type": "expression", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4", "vector": [8, 2, 0.2082, 0.0021, 2, 0.87, 1.0, 18, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_toggle_state", "arg_names": [], "import_names": [], "rhs_call_name": "_toggle_state", "annotation": ""}, "snippet": " self._toggle_state(['italic'], self.italic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L103_C4", "label": "_on_bullets", "type": "function", "loc": [103, 106], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.2155, 0.0082, 1, 0.63, 0.0952, 265, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_on_bullets", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_bullets(self):\n self._process_button_click('bullet', self.bullets_tooltip,\n self._add_bullets_if_needed,\n self._remove_bullets_if_needed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L104_C8", "label": "_process_button_click()", "type": "expression", "loc": [104, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L103_C4", "vector": [8, 2, 0.2165, 0.0062, 2, 0.45, 0.0, 568, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_process_button_click", "arg_names": [], "import_names": [], "rhs_call_name": "_process_button_click", "annotation": ""}, "snippet": " self._process_button_click('bullet', self.bullets_tooltip,\n self._add_bullets_if_needed,\n self._remove_bullets_if_needed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L108_C4", "label": "_on_numbers", "type": "function", "loc": [108, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.2258, 0.0082, 1, 0.63, 0.119, 528, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_on_numbers", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_numbers(self):\n self._process_button_click('number', self.numbers_tooltip,\n self._add_numbers_if_needed,\n self._remove_numbers_if_needed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L109_C8", "label": "_process_button_click()", "type": "expression", "loc": [109, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L108_C4", "vector": [8, 2, 0.2268, 0.0062, 2, 0.17, 0.0, 568, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "_process_button_click", "arg_names": [], "import_names": [], "rhs_call_name": "_process_button_click", "annotation": ""}, "snippet": " self._process_button_click('number', self.numbers_tooltip,\n self._add_numbers_if_needed,\n self._remove_numbers_if_needed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "label": "_process_button_click", "type": "function", "loc": [113, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.2454, 0.0268, 1, 0.63, 0.1429, 568, 0, 5, 0, 0, 0, 0, 11], "semantic": {"name": "_process_button_click", "arg_names": ["self", "tag", "tooltip", "add_func", "remove_func"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _process_button_click(self, tag, tooltip, add_func, remove_func):\n tooltip.hide()\n if self.txt.tag_ranges('sel'):\n startline, _ = parse_index(self.txt.index('sel.first'))\n endline, _ = parse_index(self.txt.index('sel.last'))\n else:\n startline, _ = parse_index(self.txt.index(INSERT))\n endline = startline"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L114_C8", "label": "hide()", "type": "expression", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "vector": [8, 2, 0.2351, 0.0021, 2, 0.9, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "label": "if", "type": "if", "loc": [115, 120], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "vector": [4, 2, 0.2423, 0.0124, 2, 0.9, 0.3333, 0, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txt.tag_ranges('sel'):\n startline, _ = parse_index(self.txt.index('sel.first'))\n endline, _ = parse_index(self.txt.index('sel.last'))\n else:\n startline, _ = parse_index(self.txt.index(INSERT))\n endline = startline"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L116_C12", "label": "startline, _ = parse_index()", "type": "assigned_variable", "loc": [116, 116], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "vector": [14, 3, 0.2392, 0.0021, 3, 0.63, 0.0, 6, 3, 1, 0, 0, 576, 10, 2], "semantic": {"name": "startline, _", "arg_names": [], "import_names": [], "rhs_call_name": "parse_index", "annotation": ""}, "snippet": " startline, _ = parse_index(self.txt.index('sel.first'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L117_C12", "label": "endline, _ = parse_index()", "type": "assigned_variable", "loc": [117, 117], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "vector": [14, 3, 0.2412, 0.0021, 3, 0.63, 0.3333, 310, 3, 1, 0, 0, 576, 10, 2], "semantic": {"name": "endline, _", "arg_names": [], "import_names": [], "rhs_call_name": "parse_index", "annotation": ""}, "snippet": " endline, _ = parse_index(self.txt.index('sel.last'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L119_C12", "label": "startline, _ = parse_index()", "type": "assigned_variable", "loc": [119, 119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "vector": [14, 3, 0.2454, 0.0021, 3, 0.63, 0.6667, 6, 3, 1, 0, 0, 576, 10, 2], "semantic": {"name": "startline, _", "arg_names": [], "import_names": [], "rhs_call_name": "parse_index", "annotation": ""}, "snippet": " startline, _ = parse_index(self.txt.index(INSERT))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L120_C12", "label": "endline =", "type": "assigned_variable", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "vector": [14, 3, 0.2474, 0.0021, 3, 0.63, 1.0, 264, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "endline", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " endline = startline"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L121_C8", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "vector": [14, 2, 0.2495, 0.0021, 2, 0.9, 0.6667, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('%d.0' % startline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8", "label": "if", "type": "if", "loc": [122, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "vector": [4, 2, 0.2546, 0.0082, 2, 0.9, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if tag not in current_tags:\n add_func(startline, endline)\n else:\n remove_func(startline, endline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L123_C12", "label": "add_func()", "type": "expression", "loc": [123, 123], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8", "vector": [8, 3, 0.2536, 0.0021, 3, 0.49, 0.0, 644, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "add_func", "arg_names": [], "import_names": [], "rhs_call_name": "add_func", "annotation": ""}, "snippet": " add_func(startline, endline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L125_C12", "label": "remove_func()", "type": "expression", "loc": [125, 125], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8", "vector": [8, 3, 0.2577, 0.0021, 3, 0.49, 1.0, 78, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "remove_func", "arg_names": [], "import_names": [], "rhs_call_name": "remove_func", "annotation": ""}, "snippet": " remove_func(startline, endline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "label": "_add_bullets_if_needed", "type": "function", "loc": [127, 139], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.2742, 0.0268, 1, 0.63, 0.1667, 776, 0, 3, 0, 0, 0, 0, 9], "semantic": {"name": "_add_bullets_if_needed", "arg_names": ["self", "startline", "endline"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _add_bullets_if_needed(self, startline, endline):\n self._remove_numbers_if_needed(startline, endline)\n for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'bullet' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L128_C8", "label": "_remove_numbers_if_needed()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "vector": [8, 2, 0.2639, 0.0021, 2, 0.4, 0.0, 220, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_remove_numbers_if_needed", "arg_names": [], "import_names": [], "rhs_call_name": "_remove_numbers_if_needed", "annotation": ""}, "snippet": " self._remove_numbers_if_needed(startline, endline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8", "label": "for line", "type": "for", "loc": [129, 137], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "vector": [6, 2, 0.2742, 0.0186, 2, 0.4, 0.3333, 373, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'bullet' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.insert(start, '\\t')\n self.txt.image_create(start, image=self.bullet_image)\n self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L130_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [130, 130], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8", "vector": [14, 3, 0.268, 0.0021, 3, 0.39, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('%d.0' % line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "label": "if", "type": "if", "loc": [131, 137], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8", "vector": [4, 3, 0.2763, 0.0144, 3, 0.39, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'bullet' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.insert(start, '\\t')\n self.txt.image_create(start, image=self.bullet_image)\n self.txt.insert(start, '\\t')\n self.txt.tag_add('bullet', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L132_C16", "label": "start =", "type": "assigned_variable", "loc": [132, 132], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [14, 4, 0.2722, 0.0021, 4, 0.33, 0.0, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L133_C16", "label": "end =", "type": "assigned_variable", "loc": [133, 133], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [14, 4, 0.2742, 0.0021, 4, 0.33, 0.2, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.end' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L134_C16", "label": "insert()", "type": "expression", "loc": [134, 134], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [8, 4, 0.2763, 0.0021, 4, 0.33, 0.4, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L135_C16", "label": "image_create()", "type": "expression", "loc": [135, 135], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [8, 4, 0.2784, 0.0021, 4, 0.33, 0.6, 947, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "image_create", "arg_names": [], "import_names": [], "rhs_call_name": "image_create", "annotation": ""}, "snippet": " self.txt.image_create(start, image=self.bullet_image)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L136_C16", "label": "insert()", "type": "expression", "loc": [136, 136], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [8, 4, 0.2804, 0.0021, 4, 0.33, 0.8, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L137_C16", "label": "tag_add()", "type": "expression", "loc": [137, 137], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "vector": [8, 4, 0.2825, 0.0021, 4, 0.33, 1.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txt.tag_add('bullet', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L138_C8", "label": "configure()", "type": "expression", "loc": [138, 138], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "vector": [8, 2, 0.2845, 0.0021, 2, 0.4, 0.6667, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.bullets.configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L139_C8", "label": "configure()", "type": "expression", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "vector": [8, 2, 0.2866, 0.0021, 2, 0.4, 1.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.numbers.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4", "label": "_remove_bullets_if_needed", "type": "function", "loc": [141, 151], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.301, 0.0227, 1, 0.63, 0.1905, 608, 0, 3, 0, 0, 0, 0, 5], "semantic": {"name": "_remove_bullets_if_needed", "arg_names": ["self", "startline", "endline"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _remove_bullets_if_needed(self, startline, endline):\n for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'bullet' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('bullet', start, end)\n start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8", "label": "for line", "type": "for", "loc": [142, 150], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4", "vector": [6, 2, 0.301, 0.0186, 2, 0.89, 0.0, 373, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'bullet' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('bullet', start, end)\n start = '%d.0' % line\n end = '%d.3' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L143_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [143, 143], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8", "vector": [14, 3, 0.2948, 0.0021, 3, 0.05, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('%d.0' % line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "label": "if", "type": "if", "loc": [144, 150], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8", "vector": [4, 3, 0.3031, 0.0144, 3, 0.05, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'bullet' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('bullet', start, end)\n start = '%d.0' % line\n end = '%d.3' % line\n self.txt.delete(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L145_C16", "label": "start =", "type": "assigned_variable", "loc": [145, 145], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [14, 4, 0.299, 0.0021, 4, 0.79, 0.0, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L146_C16", "label": "end =", "type": "assigned_variable", "loc": [146, 146], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [14, 4, 0.301, 0.0021, 4, 0.79, 0.2, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.end' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L147_C16", "label": "tag_remove()", "type": "expression", "loc": [147, 147], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [8, 4, 0.3031, 0.0021, 4, 0.79, 0.4, 472, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_remove", "arg_names": [], "import_names": [], "rhs_call_name": "tag_remove", "annotation": ""}, "snippet": " self.txt.tag_remove('bullet', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L148_C16", "label": "start =", "type": "assigned_variable", "loc": [148, 148], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [14, 4, 0.3052, 0.0021, 4, 0.79, 0.6, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L149_C16", "label": "end =", "type": "assigned_variable", "loc": [149, 149], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [14, 4, 0.3072, 0.0021, 4, 0.79, 0.8, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.3' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L150_C16", "label": "delete()", "type": "expression", "loc": [150, 150], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "vector": [8, 4, 0.3093, 0.0021, 4, 0.79, 1.0, 266, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.txt.delete(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L151_C8", "label": "configure()", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4", "vector": [8, 2, 0.3113, 0.0021, 2, 0.89, 1.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.bullets.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "label": "_add_numbers_if_needed", "type": "function", "loc": [153, 168], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.3309, 0.033, 1, 0.63, 0.2143, 896, 0, 3, 0, 0, 0, 0, 9], "semantic": {"name": "_add_numbers_if_needed", "arg_names": ["self", "startline", "endline"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _add_numbers_if_needed(self, startline, endline):\n self._remove_bullets_if_needed(startline, endline)\n num = 1\n for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'number' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L154_C8", "label": "_remove_bullets_if_needed()", "type": "expression", "loc": [154, 154], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "vector": [8, 2, 0.3175, 0.0021, 2, 0.08, 0.0, 608, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_remove_bullets_if_needed", "arg_names": [], "import_names": [], "rhs_call_name": "_remove_bullets_if_needed", "annotation": ""}, "snippet": " self._remove_bullets_if_needed(startline, endline)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L155_C8", "label": "num =", "type": "assigned_variable", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "vector": [14, 2, 0.3196, 0.0021, 2, 0.08, 0.25, 328, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "num", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " num = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8", "label": "for line", "type": "for", "loc": [156, 166], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "vector": [6, 2, 0.332, 0.0227, 2, 0.08, 0.5, 373, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'number' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.insert(start, '\\t')\n numstr = '%d.' % num\n self.txt.insert(start, numstr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L157_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8", "vector": [14, 3, 0.3237, 0.0021, 3, 0.12, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('%d.0' % line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "label": "if", "type": "if", "loc": [158, 166], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8", "vector": [4, 3, 0.334, 0.0186, 3, 0.12, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'number' not in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.insert(start, '\\t')\n numstr = '%d.' % num\n self.txt.insert(start, numstr)\n self.txt.insert(start, '\\t')\n self.txt.tag_add('number', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L159_C16", "label": "start =", "type": "assigned_variable", "loc": [159, 159], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [14, 4, 0.3278, 0.0021, 4, 0.51, 0.0, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L160_C16", "label": "end =", "type": "assigned_variable", "loc": [160, 160], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [14, 4, 0.3299, 0.0021, 4, 0.51, 0.1667, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.end' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L161_C16", "label": "insert()", "type": "expression", "loc": [161, 161], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [8, 4, 0.332, 0.0021, 4, 0.51, 0.3333, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L162_C16", "label": "numstr =", "type": "assigned_variable", "loc": [162, 162], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [14, 4, 0.334, 0.0021, 4, 0.51, 0.5, 988, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "numstr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " numstr = '%d.' % num"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L163_C16", "label": "insert()", "type": "expression", "loc": [163, 163], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [8, 4, 0.3361, 0.0021, 4, 0.51, 0.6667, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert(start, numstr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L164_C16", "label": "insert()", "type": "expression", "loc": [164, 164], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [8, 4, 0.3381, 0.0021, 4, 0.51, 0.8333, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert(start, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L165_C16", "label": "tag_add()", "type": "expression", "loc": [165, 165], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "vector": [8, 4, 0.3402, 0.0021, 4, 0.51, 1.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txt.tag_add('number', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L167_C8", "label": "configure()", "type": "expression", "loc": [167, 167], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "vector": [8, 2, 0.3443, 0.0021, 2, 0.08, 0.75, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.numbers.configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L168_C8", "label": "configure()", "type": "expression", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "vector": [8, 2, 0.3464, 0.0021, 2, 0.08, 1.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.bullets.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "label": "_remove_numbers_if_needed", "type": "function", "loc": [170, 186], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.367, 0.0351, 1, 0.63, 0.2381, 220, 0, 3, 0, 0, 0, 0, 8], "semantic": {"name": "_remove_numbers_if_needed", "arg_names": ["self", "startline", "endline"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _remove_numbers_if_needed(self, startline, endline):\n cnt = IntVar()\n for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'number' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('number', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L171_C8", "label": "cnt = IntVar()", "type": "assigned_variable", "loc": [171, 171], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "vector": [14, 2, 0.3526, 0.0021, 2, 0.84, 0.0, 307, 3, 0, 0, 0, 198, 10, 1], "semantic": {"name": "cnt", "arg_names": [], "import_names": [], "rhs_call_name": "IntVar", "annotation": ""}, "snippet": " cnt = IntVar()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8", "label": "for line", "type": "for", "loc": [172, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "vector": [6, 2, 0.368, 0.0289, 2, 0.84, 0.5, 373, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for line in range(startline, endline+1):\n current_tags = self.txt.tag_names('%d.0' % line)\n if 'number' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('number', start, end)\n # Regex to match a tab, followed by any number of digits,\n # followed by a period, all at the start of a line."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L173_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [173, 173], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8", "vector": [14, 3, 0.3567, 0.0021, 3, 0.98, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('%d.0' % line)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "label": "if", "type": "if", "loc": [174, 185], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8", "vector": [4, 3, 0.3701, 0.0247, 3, 0.98, 1.0, 0, 0, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'number' in current_tags:\n start = '%d.0' % line\n end = '%d.end' % line\n self.txt.tag_remove('number', start, end)\n # Regex to match a tab, followed by any number of digits,\n # followed by a period, all at the start of a line.\n # The cnt variable stores the number of characters matched.\n pos = self.txt.search('^\\t\\d+\\.\\t', start, end, None, None,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L175_C16", "label": "start =", "type": "assigned_variable", "loc": [175, 175], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "vector": [14, 4, 0.3608, 0.0021, 4, 0.5, 0.0, 511, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = '%d.0' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L176_C16", "label": "end =", "type": "assigned_variable", "loc": [176, 176], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "vector": [14, 4, 0.3629, 0.0021, 4, 0.5, 0.25, 128, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.end' % line"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L177_C16", "label": "tag_remove()", "type": "expression", "loc": [177, 177], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "vector": [8, 4, 0.3649, 0.0021, 4, 0.5, 0.5, 472, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_remove", "arg_names": [], "import_names": [], "rhs_call_name": "tag_remove", "annotation": ""}, "snippet": " self.txt.tag_remove('number', start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L181_C16", "label": "pos = search()", "type": "assigned_variable", "loc": [181, 182], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "vector": [14, 4, 0.3742, 0.0041, 4, 0.5, 0.75, 627, 3, 9, 0, 0, 163, 10, 1], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "search", "annotation": ""}, "snippet": " pos = self.txt.search('^\\t\\d+\\.\\t', start, end, None, None,\n None, True, None, cnt)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16", "label": "if", "type": "if", "loc": [183, 185], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "vector": [4, 4, 0.3794, 0.0062, 4, 0.5, 1.0, 0, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos:\n end = '%d.%d' % (line, cnt.get())\n self.txt.delete(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L184_C20", "label": "end =", "type": "assigned_variable", "loc": [184, 184], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16", "vector": [14, 5, 0.3794, 0.0021, 5, 0.53, 0.0, 128, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end = '%d.%d' % (line, cnt.get())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L185_C20", "label": "delete()", "type": "expression", "loc": [185, 185], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16", "vector": [8, 5, 0.3814, 0.0021, 5, 0.53, 1.0, 266, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.txt.delete(start, end)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L186_C8", "label": "configure()", "type": "expression", "loc": [186, 186], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "vector": [8, 2, 0.3835, 0.0021, 2, 0.84, 1.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.numbers.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4", "label": "_on_undo", "type": "function", "loc": [188, 190], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.3897, 0.0062, 1, 0.63, 0.2619, 279, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_undo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_undo(self):\n self.undo_tooltip.hide()\n self._gameMgr.parent.undo_single_move()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L189_C8", "label": "hide()", "type": "expression", "loc": [189, 189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4", "vector": [8, 2, 0.3897, 0.0021, 2, 0.15, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.undo_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L190_C8", "label": "undo_single_move()", "type": "expression", "loc": [190, 190], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4", "vector": [8, 2, 0.3918, 0.0021, 2, 0.15, 1.0, 412, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "undo_single_move", "arg_names": [], "import_names": [], "rhs_call_name": "undo_single_move", "annotation": ""}, "snippet": " self._gameMgr.parent.undo_single_move()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4", "label": "_on_undo_all", "type": "function", "loc": [192, 194], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.3979, 0.0062, 1, 0.63, 0.2857, 725, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_undo_all", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_undo_all(self):\n self.undoall_tooltip.hide()\n self._gameMgr.parent.undo_all_moves()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L193_C8", "label": "hide()", "type": "expression", "loc": [193, 193], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4", "vector": [8, 2, 0.3979, 0.0021, 2, 0.28, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.undoall_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L194_C8", "label": "undo_all_moves()", "type": "expression", "loc": [194, 194], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4", "vector": [8, 2, 0.4, 0.0021, 2, 0.28, 1.0, 987, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "undo_all_moves", "arg_names": [], "import_names": [], "rhs_call_name": "undo_all_moves", "annotation": ""}, "snippet": " self._gameMgr.parent.undo_all_moves()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4", "label": "_on_redo", "type": "function", "loc": [196, 198], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4062, 0.0062, 1, 0.63, 0.3095, 724, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_redo", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_redo(self):\n self.redo_tooltip.hide()\n self._gameMgr.parent.redo_single_move()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L197_C8", "label": "hide()", "type": "expression", "loc": [197, 197], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4", "vector": [8, 2, 0.4062, 0.0021, 2, 0.96, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.redo_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L198_C8", "label": "redo_single_move()", "type": "expression", "loc": [198, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4", "vector": [8, 2, 0.4082, 0.0021, 2, 0.96, 1.0, 788, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "redo_single_move", "arg_names": [], "import_names": [], "rhs_call_name": "redo_single_move", "annotation": ""}, "snippet": " self._gameMgr.parent.redo_single_move()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4", "label": "_on_redo_all", "type": "function", "loc": [200, 202], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4144, 0.0062, 1, 0.63, 0.3333, 210, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_on_redo_all", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_redo_all(self):\n self.redoall_tooltip.hide()\n self._gameMgr.parent.redo_all_moves()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L201_C8", "label": "hide()", "type": "expression", "loc": [201, 201], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4", "vector": [8, 2, 0.4144, 0.0021, 2, 0.44, 0.0, 434, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "hide", "arg_names": [], "import_names": [], "rhs_call_name": "hide", "annotation": ""}, "snippet": " self.redoall_tooltip.hide()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L202_C8", "label": "redo_all_moves()", "type": "expression", "loc": [202, 202], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4", "vector": [8, 2, 0.4165, 0.0021, 2, 0.44, 1.0, 524, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "redo_all_moves", "arg_names": [], "import_names": [], "rhs_call_name": "redo_all_moves", "annotation": ""}, "snippet": " self._gameMgr.parent.redo_all_moves()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4", "label": "_on_add_link", "type": "function", "loc": [204, 208], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4247, 0.0103, 1, 0.63, 0.3571, 19, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "_on_add_link", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_add_link(self):\n filename = askopenfilename(initialdir='training')\n if filename:\n filename = os.path.relpath(filename, CUR_DIR)\n self._toggle_state(self.hypermgr.add(filename), self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L205_C8", "label": "filename = askopenfilename()", "type": "assigned_variable", "loc": [205, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4", "vector": [14, 2, 0.4227, 0.0021, 2, 0.68, 0.0, 275, 3, 1, 0, 0, 327, 10, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "askopenfilename", "annotation": ""}, "snippet": " filename = askopenfilename(initialdir='training')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8", "label": "if", "type": "if", "loc": [206, 208], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4", "vector": [4, 2, 0.4268, 0.0062, 2, 0.68, 1.0, 0, 2, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if filename:\n filename = os.path.relpath(filename, CUR_DIR)\n self._toggle_state(self.hypermgr.add(filename), self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L207_C12", "label": "filename = relpath()", "type": "assigned_variable", "loc": [207, 207], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8", "vector": [14, 3, 0.4268, 0.0021, 3, 0.98, 0.0, 275, 3, 2, 0, 0, 104, 10, 1], "semantic": {"name": "filename", "arg_names": [], "import_names": [], "rhs_call_name": "relpath", "annotation": ""}, "snippet": " filename = os.path.relpath(filename, CUR_DIR)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L208_C12", "label": "_toggle_state()", "type": "expression", "loc": [208, 208], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8", "vector": [8, 3, 0.4289, 0.0021, 3, 0.98, 1.0, 18, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_toggle_state", "arg_names": [], "import_names": [], "rhs_call_name": "_toggle_state", "annotation": ""}, "snippet": " self._toggle_state(self.hypermgr.add(filename), self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L210_C4", "label": "_on_remove_link", "type": "function", "loc": [210, 214], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4371, 0.0103, 1, 0.63, 0.381, 528, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "_on_remove_link", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _on_remove_link(self):\n if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n if 'hyper' in current_tags:\n self._toggle_state(['hyper'], self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8", "label": "if", "type": "if", "loc": [211, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L210_C4", "vector": [4, 2, 0.4381, 0.0082, 2, 0.25, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n if 'hyper' in current_tags:\n self._toggle_state(['hyper'], self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L212_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [212, 212], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8", "vector": [14, 3, 0.4371, 0.0021, 3, 0.41, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('sel.first')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L213_C12", "label": "if", "type": "if", "loc": [213, 214], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8", "vector": [4, 3, 0.4402, 0.0041, 3, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if 'hyper' in current_tags:\n self._toggle_state(['hyper'], self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L214_C16", "label": "_toggle_state()", "type": "expression", "loc": [214, 214], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L213_C12", "vector": [8, 4, 0.4412, 0.0021, 4, 0.74, 0.0, 18, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_toggle_state", "arg_names": [], "import_names": [], "rhs_call_name": "_toggle_state", "annotation": ""}, "snippet": " self._toggle_state(['hyper'], self.addLink)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "label": "_register_event_handlers", "type": "function", "loc": [216, 223], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4526, 0.0165, 1, 0.63, 0.4048, 21, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "_register_event_handlers", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _register_event_handlers(self):\n self.txt.event_add('<<KeyRel>>', '<KeyRelease-Home>', '<KeyRelease-End>',\n '<KeyRelease-Left>', '<KeyRelease-Right>',\n '<KeyRelease-Up>', '<KeyRelease-Down>',\n '<KeyRelease-Delete>', '<KeyRelease-BackSpace>')\n Widget.bind(self.txt, '<<Selection>>', self._sel_changed)\n Widget.bind(self.txt, '<ButtonRelease-1>', self._sel_changed)\n Widget.bind(self.txt, '<<KeyRel>>', self._key_release)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L217_C8", "label": "event_add()", "type": "expression", "loc": [217, 220], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "vector": [8, 2, 0.4505, 0.0082, 2, 0.46, 0.0, 390, 3, 9, 0, 0, 0, 0, 1], "semantic": {"name": "event_add", "arg_names": [], "import_names": [], "rhs_call_name": "event_add", "annotation": ""}, "snippet": " self.txt.event_add('<<KeyRel>>', '<KeyRelease-Home>', '<KeyRelease-End>',\n '<KeyRelease-Left>', '<KeyRelease-Right>',\n '<KeyRelease-Up>', '<KeyRelease-Down>',\n '<KeyRelease-Delete>', '<KeyRelease-BackSpace>')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L221_C8", "label": "bind()", "type": "expression", "loc": [221, 221], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "vector": [8, 2, 0.4557, 0.0021, 2, 0.46, 0.3333, 640, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": " Widget.bind(self.txt, '<<Selection>>', self._sel_changed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L222_C8", "label": "bind()", "type": "expression", "loc": [222, 222], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "vector": [8, 2, 0.4577, 0.0021, 2, 0.46, 0.6667, 640, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": " Widget.bind(self.txt, '<ButtonRelease-1>', self._sel_changed)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L223_C8", "label": "bind()", "type": "expression", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "vector": [8, 2, 0.4598, 0.0021, 2, 0.46, 1.0, 640, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "bind", "arg_names": [], "import_names": [], "rhs_call_name": "bind", "annotation": ""}, "snippet": " Widget.bind(self.txt, '<<KeyRel>>', self._key_release)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4", "label": "_key_release", "type": "function", "loc": [225, 227], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.466, 0.0062, 1, 0.63, 0.4286, 864, 0, 2, 0, 0, 0, 0, 4], "semantic": {"name": "_key_release", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _key_release(self, event):\n line, char = parse_index(self.txt.index(INSERT))\n self.update_button_state(to_string(line, char))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L226_C8", "label": "line, char = parse_index()", "type": "assigned_variable", "loc": [226, 226], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4", "vector": [14, 2, 0.466, 0.0021, 2, 0.79, 0.0, 846, 3, 1, 0, 0, 576, 10, 2], "semantic": {"name": "line, char", "arg_names": [], "import_names": [], "rhs_call_name": "parse_index", "annotation": ""}, "snippet": " line, char = parse_index(self.txt.index(INSERT))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L227_C8", "label": "update_button_state()", "type": "expression", "loc": [227, 227], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4", "vector": [8, 2, 0.468, 0.0021, 2, 0.79, 1.0, 88, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "update_button_state", "arg_names": [], "import_names": [], "rhs_call_name": "update_button_state", "annotation": ""}, "snippet": " self.update_button_state(to_string(line, char))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L229_C4", "label": "_sel_changed", "type": "function", "loc": [229, 230], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4732, 0.0041, 1, 0.63, 0.4524, 20, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_sel_changed", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _sel_changed(self, event):\n self.update_button_state(self.txt.index(INSERT))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L230_C8", "label": "update_button_state()", "type": "expression", "loc": [230, 230], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L229_C4", "vector": [8, 2, 0.4742, 0.0021, 2, 0.45, 0.0, 88, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "update_button_state", "arg_names": [], "import_names": [], "rhs_call_name": "update_button_state", "annotation": ""}, "snippet": " self.update_button_state(self.txt.index(INSERT))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L232_C4", "label": "is_dirty", "type": "function", "loc": [232, 233], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4794, 0.0041, 1, 0.63, 0.4762, 447, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "is_dirty", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def is_dirty(self):\n return self.curr_annotation != self.get_annotation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L233_C8", "label": "return", "type": "return", "loc": [233, 233], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L232_C4", "vector": [13, 2, 0.4804, 0.0021, 2, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.curr_annotation != self.get_annotation()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L235_C4", "label": "reset_toolbar_buttons", "type": "function", "loc": [235, 237], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.4866, 0.0062, 1, 0.63, 0.5, 217, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "reset_toolbar_buttons", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def reset_toolbar_buttons(self):\n for btn in self.btnset:\n btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L236_C8", "label": "for btn", "type": "for", "loc": [236, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L235_C4", "vector": [6, 2, 0.4876, 0.0041, 2, 0.93, 0.0, 826, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "btn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for btn in self.btnset:\n btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L237_C12", "label": "configure()", "type": "expression", "loc": [237, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L236_C8", "vector": [8, 3, 0.4887, 0.0021, 3, 0.09, 0.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "label": "update_button_state", "type": "function", "loc": [239, 248], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.5021, 0.0206, 1, 0.63, 0.5238, 88, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "update_button_state", "arg_names": ["self", "index"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def update_button_state(self, index):\n if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n else:\n current_tags = self.txt.tag_names(index)\n for btn in self.btnmap.itervalues():\n btn.configure(relief='raised')\n for tag in current_tags:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8", "label": "if", "type": "if", "loc": [240, 243], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "vector": [4, 2, 0.4979, 0.0082, 2, 0.06, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txt.tag_ranges('sel'):\n current_tags = self.txt.tag_names('sel.first')\n else:\n current_tags = self.txt.tag_names(index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L241_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [241, 241], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8", "vector": [14, 3, 0.4969, 0.0021, 3, 0.9, 0.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names('sel.first')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L243_C12", "label": "current_tags = tag_names()", "type": "assigned_variable", "loc": [243, 243], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8", "vector": [14, 3, 0.501, 0.0021, 3, 0.9, 1.0, 220, 3, 1, 0, 0, 546, 10, 1], "semantic": {"name": "current_tags", "arg_names": [], "import_names": [], "rhs_call_name": "tag_names", "annotation": ""}, "snippet": " current_tags = self.txt.tag_names(index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L244_C8", "label": "for btn", "type": "for", "loc": [244, 245], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "vector": [6, 2, 0.5041, 0.0041, 2, 0.06, 0.5, 826, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "btn", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for btn in self.btnmap.itervalues():\n btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L245_C12", "label": "configure()", "type": "expression", "loc": [245, 245], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L244_C8", "vector": [8, 3, 0.5052, 0.0021, 3, 0.17, 0.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " btn.configure(relief='raised')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L246_C8", "label": "for tag", "type": "for", "loc": [246, 248], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "vector": [6, 2, 0.5093, 0.0062, 2, 0.06, 1.0, 732, 2, 0, 0, 0, 0, 0, 2], "semantic": {"name": "tag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for tag in current_tags:\n if tag in self.btnmap.keys():\n self.btnmap[tag].configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L247_C12", "label": "if", "type": "if", "loc": [247, 248], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L246_C8", "vector": [4, 3, 0.5103, 0.0041, 3, 0.35, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if tag in self.btnmap.keys():\n self.btnmap[tag].configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L248_C16", "label": "configure()", "type": "expression", "loc": [248, 248], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L247_C12", "vector": [8, 4, 0.5113, 0.0021, 4, 0.65, 0.0, 765, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "configure", "arg_names": [], "import_names": [], "rhs_call_name": "configure", "annotation": ""}, "snippet": " self.btnmap[tag].configure(relief='sunken')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "label": "init_font_sizes", "type": "function", "loc": [250, 253], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.5186, 0.0082, 1, 0.63, 0.5476, 974, 0, 3, 0, 0, 0, 0, 3], "semantic": {"name": "init_font_sizes", "arg_names": ["self", "font", "size"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def init_font_sizes(self, font, size):\n self.txt.config(font=[font, size])\n self._b_font = Font(self.root, (font, size, 'bold'))\n self._i_font = Font(self.root, (font, size, 'italic'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L251_C8", "label": "config()", "type": "expression", "loc": [251, 251], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "vector": [8, 2, 0.5175, 0.0021, 2, 0.96, 0.0, 308, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "config", "arg_names": [], "import_names": [], "rhs_call_name": "config", "annotation": ""}, "snippet": " self.txt.config(font=[font, size])"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L252_C8", "label": "self._b_font = Font()", "type": "assigned_variable", "loc": [252, 252], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "vector": [14, 2, 0.5196, 0.0021, 2, 0.96, 0.5, 899, 3, 2, 0, 0, 69, 10, 1], "semantic": {"name": "self._b_font", "arg_names": [], "import_names": [], "rhs_call_name": "Font", "annotation": ""}, "snippet": " self._b_font = Font(self.root, (font, size, 'bold'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L253_C8", "label": "self._i_font = Font()", "type": "assigned_variable", "loc": [253, 253], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "vector": [14, 2, 0.5216, 0.0021, 2, 0.96, 1.0, 121, 3, 2, 0, 0, 69, 10, 1], "semantic": {"name": "self._i_font", "arg_names": [], "import_names": [], "rhs_call_name": "Font", "annotation": ""}, "snippet": " self._i_font = Font(self.root, (font, size, 'italic'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "label": "init_tags", "type": "function", "loc": [255, 261], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.532, 0.0144, 1, 0.63, 0.5714, 369, 0, 1, 0, 0, 0, 0, 4], "semantic": {"name": "init_tags", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def init_tags(self):\n self.txt.tag_config('bold', font=self._b_font, wrap='word')\n self.txt.tag_config('italic', font=self._i_font, wrap='word')\n self.txt.tag_config('number', tabs='.5c center 1c left',\n lmargin1='0', lmargin2='1c')\n self.txt.tag_config('bullet', tabs='.5c center 1c left',\n lmargin1='0', lmargin2='1c')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L256_C8", "label": "tag_config()", "type": "expression", "loc": [256, 256], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "vector": [8, 2, 0.5278, 0.0021, 2, 0.37, 0.0, 201, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_config", "arg_names": [], "import_names": [], "rhs_call_name": "tag_config", "annotation": ""}, "snippet": " self.txt.tag_config('bold', font=self._b_font, wrap='word')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L257_C8", "label": "tag_config()", "type": "expression", "loc": [257, 257], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "vector": [8, 2, 0.5299, 0.0021, 2, 0.37, 0.3333, 201, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_config", "arg_names": [], "import_names": [], "rhs_call_name": "tag_config", "annotation": ""}, "snippet": " self.txt.tag_config('italic', font=self._i_font, wrap='word')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L258_C8", "label": "tag_config()", "type": "expression", "loc": [258, 259], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "vector": [8, 2, 0.533, 0.0041, 2, 0.37, 0.6667, 201, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "tag_config", "arg_names": [], "import_names": [], "rhs_call_name": "tag_config", "annotation": ""}, "snippet": " self.txt.tag_config('number', tabs='.5c center 1c left',\n lmargin1='0', lmargin2='1c')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L260_C8", "label": "tag_config()", "type": "expression", "loc": [260, 261], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "vector": [8, 2, 0.5371, 0.0041, 2, 0.37, 1.0, 201, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "tag_config", "arg_names": [], "import_names": [], "rhs_call_name": "tag_config", "annotation": ""}, "snippet": " self.txt.tag_config('bullet', tabs='.5c center 1c left',\n lmargin1='0', lmargin2='1c')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "label": "init_images", "type": "function", "loc": [263, 274], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.5536, 0.0247, 1, 0.63, 0.5952, 725, 0, 1, 0, 0, 0, 0, 11], "semantic": {"name": "init_images", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def init_images(self):\n self.bold_image = PhotoImage(file=BOLD_IMAGE)\n self.italic_image = PhotoImage(file=ITALIC_IMAGE)\n self.addlink_image = PhotoImage(file=ADDLINK_IMAGE)\n self.remlink_image = PhotoImage(file=REMLINK_IMAGE)\n self.bullets_image = PhotoImage(file=BULLETS_IMAGE)\n self.bullet_image = PhotoImage(file=BULLET_IMAGE)\n self.numbers_image = PhotoImage(file=NUMBERS_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L264_C8", "label": "self.bold_image = PhotoImage()", "type": "assigned_variable", "loc": [264, 264], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5443, 0.0021, 2, 0.55, 0.0, 681, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.bold_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.bold_image = PhotoImage(file=BOLD_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L265_C8", "label": "self.italic_image = PhotoImage()", "type": "assigned_variable", "loc": [265, 265], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5464, 0.0021, 2, 0.55, 0.1, 451, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.italic_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.italic_image = PhotoImage(file=ITALIC_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L266_C8", "label": "self.addlink_image = PhotoImage()", "type": "assigned_variable", "loc": [266, 266], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5485, 0.0021, 2, 0.55, 0.2, 455, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.addlink_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.addlink_image = PhotoImage(file=ADDLINK_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L267_C8", "label": "self.remlink_image = PhotoImage()", "type": "assigned_variable", "loc": [267, 267], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5505, 0.0021, 2, 0.55, 0.3, 790, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.remlink_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.remlink_image = PhotoImage(file=REMLINK_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L268_C8", "label": "self.bullets_image = PhotoImage()", "type": "assigned_variable", "loc": [268, 268], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5526, 0.0021, 2, 0.55, 0.4, 295, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.bullets_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.bullets_image = PhotoImage(file=BULLETS_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L269_C8", "label": "self.bullet_image = PhotoImage()", "type": "assigned_variable", "loc": [269, 269], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5546, 0.0021, 2, 0.55, 0.5, 887, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.bullet_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.bullet_image = PhotoImage(file=BULLET_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L270_C8", "label": "self.numbers_image = PhotoImage()", "type": "assigned_variable", "loc": [270, 270], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5567, 0.0021, 2, 0.55, 0.6, 97, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.numbers_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.numbers_image = PhotoImage(file=NUMBERS_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L271_C8", "label": "self.undo_image = PhotoImage()", "type": "assigned_variable", "loc": [271, 271], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5588, 0.0021, 2, 0.55, 0.7, 137, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.undo_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.undo_image = PhotoImage(file=UNDO_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L272_C8", "label": "self.undoall_image = PhotoImage()", "type": "assigned_variable", "loc": [272, 272], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5608, 0.0021, 2, 0.55, 0.8, 653, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.undoall_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.undoall_image= PhotoImage(file=UNDOALL_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L273_C8", "label": "self.redo_image = PhotoImage()", "type": "assigned_variable", "loc": [273, 273], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5629, 0.0021, 2, 0.55, 0.9, 405, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.redo_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.redo_image = PhotoImage(file=REDO_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L274_C8", "label": "self.redoall_image = PhotoImage()", "type": "assigned_variable", "loc": [274, 274], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "vector": [14, 2, 0.5649, 0.0021, 2, 0.55, 1.0, 706, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.redoall_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.redoall_image = PhotoImage(file=REDOALL_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "label": "init_toolbar_buttons", "type": "function", "loc": [276, 318], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.6124, 0.0887, 1, 0.63, 0.619, 409, 0, 1, 0, 0, 0, 0, 32], "semantic": {"name": "init_toolbar_buttons", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def init_toolbar_buttons(self):\n self.bold = Button(name='bold', image=self.bold_image,\n borderwidth=1, command=self._on_bold)\n self.bold.grid(in_=self.toolbar, row=0, column=0, sticky=W)\n self.italic = Button(name='italic', image=self.italic_image,\n borderwidth=1, command=self._on_italic)\n self.italic.grid(in_=self.toolbar, row=0, column=1, sticky=W)\n self.bullets = Button(name='bullets', image=self.bullets_image,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L277_C8", "label": "self.bold = Button()", "type": "assigned_variable", "loc": [277, 278], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.5722, 0.0041, 2, 0.3, 0.0, 415, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.bold", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.bold = Button(name='bold', image=self.bold_image,\n borderwidth=1, command=self._on_bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L279_C8", "label": "grid()", "type": "expression", "loc": [279, 279], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.5753, 0.0021, 2, 0.3, 0.0323, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.bold.grid(in_=self.toolbar, row=0, column=0, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L280_C8", "label": "self.italic = Button()", "type": "assigned_variable", "loc": [280, 281], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.5784, 0.0041, 2, 0.3, 0.0645, 604, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.italic", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.italic = Button(name='italic', image=self.italic_image,\n borderwidth=1, command=self._on_italic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L282_C8", "label": "grid()", "type": "expression", "loc": [282, 282], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.5814, 0.0021, 2, 0.3, 0.0968, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.italic.grid(in_=self.toolbar, row=0, column=1, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L283_C8", "label": "self.bullets = Button()", "type": "assigned_variable", "loc": [283, 284], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.5845, 0.0041, 2, 0.3, 0.129, 862, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.bullets", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.bullets = Button(name='bullets', image=self.bullets_image,\n borderwidth=1, command=self._on_bullets)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L285_C8", "label": "grid()", "type": "expression", "loc": [285, 285], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.5876, 0.0021, 2, 0.3, 0.1613, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.bullets.grid(in_=self.toolbar, row=0, column=2, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L286_C8", "label": "self.numbers = Button()", "type": "assigned_variable", "loc": [286, 287], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.5907, 0.0041, 2, 0.3, 0.1935, 884, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.numbers", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.numbers = Button(name='numbers', image=self.numbers_image,\n borderwidth=1, command=self._on_numbers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L288_C8", "label": "grid()", "type": "expression", "loc": [288, 288], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.5938, 0.0021, 2, 0.3, 0.2258, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.numbers.grid(in_=self.toolbar, row=0, column=3, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L289_C8", "label": "self.addLink = Button()", "type": "assigned_variable", "loc": [289, 290], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.5969, 0.0041, 2, 0.3, 0.2581, 414, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.addLink", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.addLink = Button(name='addlink', image=self.addlink_image,\n borderwidth=1, command=self._on_add_link)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L291_C8", "label": "grid()", "type": "expression", "loc": [291, 291], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6, 0.0021, 2, 0.3, 0.2903, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.addLink.grid(in_=self.toolbar, row=0, column=4, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L292_C8", "label": "self.remLink = Button()", "type": "assigned_variable", "loc": [292, 293], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6031, 0.0041, 2, 0.3, 0.3226, 656, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.remLink", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.remLink = Button(name='remlink', image=self.remlink_image,\n borderwidth=1, command=self._on_remove_link)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L294_C8", "label": "grid()", "type": "expression", "loc": [294, 294], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6062, 0.0021, 2, 0.3, 0.3548, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.remLink.grid(in_=self.toolbar, row=0, column=5, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L295_C8", "label": "self.frame = Frame()", "type": "assigned_variable", "loc": [295, 295], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6082, 0.0021, 2, 0.3, 0.3871, 409, 3, 1, 0, 0, 342, 10, 1], "semantic": {"name": "self.frame", "arg_names": [], "import_names": [], "rhs_call_name": "Frame", "annotation": ""}, "snippet": " self.frame = Frame(width=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L296_C8", "label": "grid()", "type": "expression", "loc": [296, 296], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6103, 0.0021, 2, 0.3, 0.4194, 690, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.frame.grid(in_=self.toolbar, padx=5, row=0, column=6, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L297_C8", "label": "self.undoall = Button()", "type": "assigned_variable", "loc": [297, 298], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6134, 0.0041, 2, 0.3, 0.4516, 414, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.undoall", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.undoall = Button(name='undoall', image=self.undoall_image,\n borderwidth=1, command=self._on_undo_all)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L299_C8", "label": "grid()", "type": "expression", "loc": [299, 299], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6165, 0.0021, 2, 0.3, 0.4839, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.undoall.grid(in_=self.toolbar, row=0, column=7, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L300_C8", "label": "self.undo = Button()", "type": "assigned_variable", "loc": [300, 301], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6196, 0.0041, 2, 0.3, 0.5161, 461, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.undo", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.undo = Button(name='undo', image=self.undo_image,\n borderwidth=1, command=self._on_undo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L302_C8", "label": "grid()", "type": "expression", "loc": [302, 302], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6227, 0.0021, 2, 0.3, 0.5484, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.undo.grid(in_=self.toolbar, row=0, column=8, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L303_C8", "label": "self.redo = Button()", "type": "assigned_variable", "loc": [303, 304], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6258, 0.0041, 2, 0.3, 0.5806, 659, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.redo", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.redo = Button(name='redo', image=self.redo_image,\n borderwidth=1, command=self._on_redo)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L305_C8", "label": "grid()", "type": "expression", "loc": [305, 305], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6289, 0.0021, 2, 0.3, 0.6129, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.redo.grid(in_=self.toolbar, row=0, column=9, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L306_C8", "label": "self.redoall = Button()", "type": "assigned_variable", "loc": [306, 307], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.632, 0.0041, 2, 0.3, 0.6452, 34, 3, 4, 0, 0, 608, 10, 1], "semantic": {"name": "self.redoall", "arg_names": [], "import_names": [], "rhs_call_name": "Button", "annotation": ""}, "snippet": " self.redoall = Button(name='redoall', image=self.redoall_image,\n borderwidth=1, command=self._on_redo_all)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L308_C8", "label": "grid()", "type": "expression", "loc": [308, 308], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [8, 2, 0.6351, 0.0021, 2, 0.3, 0.6774, 690, 3, 4, 0, 0, 0, 0, 1], "semantic": {"name": "grid", "arg_names": [], "import_names": [], "rhs_call_name": "grid", "annotation": ""}, "snippet": " self.redoall.grid(in_=self.toolbar, row=0, column=10, sticky=W)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L309_C8", "label": "self.bold_tooltip = ToolTip()", "type": "assigned_variable", "loc": [309, 309], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6371, 0.0021, 2, 0.3, 0.7097, 106, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.bold_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.bold_tooltip = ToolTip(self.bold, 'Bold')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L310_C8", "label": "self.italic_tooltip = ToolTip()", "type": "assigned_variable", "loc": [310, 310], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6392, 0.0021, 2, 0.3, 0.7419, 107, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.italic_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.italic_tooltip = ToolTip(self.italic, 'Italic')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L311_C8", "label": "self.bullets_tooltip = ToolTip()", "type": "assigned_variable", "loc": [311, 311], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6412, 0.0021, 2, 0.3, 0.7742, 614, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.bullets_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.bullets_tooltip = ToolTip(self.bullets, 'Bullet list')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L312_C8", "label": "self.numbers_tooltip = ToolTip()", "type": "assigned_variable", "loc": [312, 312], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6433, 0.0021, 2, 0.3, 0.8065, 405, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.numbers_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.numbers_tooltip = ToolTip(self.numbers, 'Numbered list')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L313_C8", "label": "self.addlink_tooltip = ToolTip()", "type": "assigned_variable", "loc": [313, 313], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6454, 0.0021, 2, 0.3, 0.8387, 943, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.addlink_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.addlink_tooltip = ToolTip(self.addLink, 'Add hyperlink')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L314_C8", "label": "self.remlink_tooltip = ToolTip()", "type": "assigned_variable", "loc": [314, 314], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6474, 0.0021, 2, 0.3, 0.871, 653, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.remlink_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.remlink_tooltip = ToolTip(self.remLink, 'Remove hyperlink')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L315_C8", "label": "self.undoall_tooltip = ToolTip()", "type": "assigned_variable", "loc": [315, 315], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6495, 0.0021, 2, 0.3, 0.9032, 276, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.undoall_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.undoall_tooltip = ToolTip(self.undoall, 'First move')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L316_C8", "label": "self.undo_tooltip = ToolTip()", "type": "assigned_variable", "loc": [316, 316], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6515, 0.0021, 2, 0.3, 0.9355, 481, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.undo_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.undo_tooltip = ToolTip(self.undo, 'Back one move')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L317_C8", "label": "self.redo_tooltip = ToolTip()", "type": "assigned_variable", "loc": [317, 317], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6536, 0.0021, 2, 0.3, 0.9677, 419, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.redo_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.redo_tooltip = ToolTip(self.redo, 'Forward one move')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L318_C8", "label": "self.redoall_tooltip = ToolTip()", "type": "assigned_variable", "loc": [318, 318], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "vector": [14, 2, 0.6557, 0.0021, 2, 0.3, 1.0, 945, 3, 2, 0, 0, 700, 10, 1], "semantic": {"name": "self.redoall_tooltip", "arg_names": [], "import_names": [], "rhs_call_name": "ToolTip", "annotation": ""}, "snippet": " self.redoall_tooltip = ToolTip(self.redoall, 'Last move')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "label": "reset_view", "type": "function", "loc": [320, 330], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.6701, 0.0227, 1, 0.63, 0.6429, 70, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "reset_view", "arg_names": ["self", "model"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def reset_view(self, model):\n self._model = model\n self.txt.delete('1.0', END)\n sq = self._model.curr_state.valid_squares\n self.canvas.delete(self.dark_color)\n self.canvas.delete(self.light_color)\n starting_squares = [i for i in sq if (self._model.curr_state.squares[i]\n & (BLACK | WHITE))]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L321_C8", "label": "self._model =", "type": "assigned_variable", "loc": [321, 321], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [14, 2, 0.6619, 0.0021, 2, 0.63, 0.0, 580, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._model", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._model = model"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L322_C8", "label": "delete()", "type": "expression", "loc": [322, 322], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [8, 2, 0.6639, 0.0021, 2, 0.63, 0.1429, 266, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.txt.delete('1.0', END)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L323_C8", "label": "sq =", "type": "assigned_variable", "loc": [323, 323], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [14, 2, 0.666, 0.0021, 2, 0.63, 0.2857, 271, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "sq", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " sq = self._model.curr_state.valid_squares"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L324_C8", "label": "delete()", "type": "expression", "loc": [324, 324], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [8, 2, 0.668, 0.0021, 2, 0.63, 0.4286, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete(self.dark_color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L325_C8", "label": "delete()", "type": "expression", "loc": [325, 325], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [8, 2, 0.6701, 0.0021, 2, 0.63, 0.5714, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete(self.light_color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L326_C8", "label": "starting_squares =", "type": "assigned_variable", "loc": [326, 327], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [14, 2, 0.6732, 0.0041, 2, 0.63, 0.7143, 184, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "starting_squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " starting_squares = [i for i in sq if (self._model.curr_state.squares[i]\n & (BLACK | WHITE))]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L328_C8", "label": "_draw_checkers()", "type": "expression", "loc": [328, 328], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [8, 2, 0.6763, 0.0021, 2, 0.63, 0.8571, 752, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "_draw_checkers", "arg_names": [], "import_names": [], "rhs_call_name": "_draw_checkers", "annotation": ""}, "snippet": " self._draw_checkers(Command(add=starting_squares))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L329_C8", "label": "for i", "type": "for", "loc": [329, 330], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "vector": [6, 2, 0.6794, 0.0041, 2, 0.63, 1.0, 826, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in sq:\n self.highlight_square(i, DARK_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L330_C12", "label": "highlight_square()", "type": "expression", "loc": [330, 330], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L329_C8", "vector": [8, 3, 0.6804, 0.0021, 3, 0.9, 0.0, 240, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "highlight_square", "arg_names": [], "import_names": [], "rhs_call_name": "highlight_square", "annotation": ""}, "snippet": " self.highlight_square(i, DARK_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "label": "calc_board_loc", "type": "function", "loc": [332, 336], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.6887, 0.0103, 1, 0.63, 0.6667, 24, 0, 3, 1, 0, 0, 0, 3], "semantic": {"name": "calc_board_loc", "arg_names": ["self", "x", "y"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def calc_board_loc(self, x, y):\n vx, vy = self.calc_valid_xy(x, y)\n xi = int(vx / self._square_size)\n yi = int(vy / self._square_size)\n return xi, yi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L333_C8", "label": "vx, vy = calc_valid_xy()", "type": "assigned_variable", "loc": [333, 333], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "vector": [14, 2, 0.6866, 0.0021, 2, 0.41, 0.0, 875, 3, 2, 0, 0, 98, 10, 1], "semantic": {"name": "vx, vy", "arg_names": [], "import_names": [], "rhs_call_name": "calc_valid_xy", "annotation": ""}, "snippet": " vx, vy = self.calc_valid_xy(x, y)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L334_C8", "label": "xi = int()", "type": "assigned_variable", "loc": [334, 334], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "vector": [14, 2, 0.6887, 0.0021, 2, 0.41, 0.3333, 290, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "xi", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " xi = int(vx / self._square_size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L335_C8", "label": "yi = int()", "type": "assigned_variable", "loc": [335, 335], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "vector": [14, 2, 0.6907, 0.0021, 2, 0.41, 0.6667, 563, 3, 1, 0, 0, 901, 10, 1], "semantic": {"name": "yi", "arg_names": [], "import_names": [], "rhs_call_name": "int", "annotation": ""}, "snippet": " yi = int(vy / self._square_size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L336_C8", "label": "return", "type": "return", "loc": [336, 336], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "vector": [13, 2, 0.6928, 0.0021, 2, 0.41, 1.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return xi, yi"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L338_C4", "label": "calc_board_pos", "type": "function", "loc": [338, 339], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.6979, 0.0041, 1, 0.63, 0.6905, 227, 0, 3, 1, 0, 0, 0, 1], "semantic": {"name": "calc_board_pos", "arg_names": ["self", "xi", "yi"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def calc_board_pos(self, xi, yi):\n return self._boardpos.get(xi + yi * 8, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L339_C8", "label": "return", "type": "return", "loc": [339, 339], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L338_C4", "vector": [13, 2, 0.699, 0.0021, 2, 0.05, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._boardpos.get(xi + yi * 8, 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L341_C4", "label": "calc_grid_pos", "type": "function", "loc": [341, 342], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7041, 0.0041, 1, 0.63, 0.7143, 550, 0, 2, 1, 0, 0, 0, 0], "semantic": {"name": "calc_grid_pos", "arg_names": ["self", "pos"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def calc_grid_pos(self, pos):\n return self._gridpos[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L342_C8", "label": "return", "type": "return", "loc": [342, 342], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L341_C4", "vector": [13, 2, 0.7052, 0.0021, 2, 0.32, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self._gridpos[pos]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "label": "highlight_square", "type": "function", "loc": [344, 347], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7124, 0.0082, 1, 0.63, 0.7381, 240, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "highlight_square", "arg_names": ["self", "idx", "color"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def highlight_square(self, idx, color):\n row, col = self._gridpos[idx]\n hpos = col + row * 8\n self.canvas.itemconfigure('o'+str(hpos), outline=color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L345_C8", "label": "row, col =", "type": "assigned_variable", "loc": [345, 345], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "vector": [14, 2, 0.7113, 0.0021, 2, 0.87, 0.0, 777, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row, col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row, col = self._gridpos[idx]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L346_C8", "label": "hpos =", "type": "assigned_variable", "loc": [346, 346], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "vector": [14, 2, 0.7134, 0.0021, 2, 0.87, 0.5, 932, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "hpos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " hpos = col + row * 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L347_C8", "label": "itemconfigure()", "type": "expression", "loc": [347, 347], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "vector": [8, 2, 0.7155, 0.0021, 2, 0.87, 1.0, 752, 3, 2, 0, 0, 0, 0, 2], "semantic": {"name": "itemconfigure", "arg_names": [], "import_names": [], "rhs_call_name": "itemconfigure", "annotation": ""}, "snippet": " self.canvas.itemconfigure('o'+str(hpos), outline=color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L349_C4", "label": "calc_valid_xy", "type": "function", "loc": [349, 351], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7216, 0.0062, 1, 0.63, 0.7619, 98, 0, 3, 1, 0, 0, 0, 6], "semantic": {"name": "calc_valid_xy", "arg_names": ["self", "x", "y"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def calc_valid_xy(self, x, y):\n return (min(max(0, self.canvas.canvasx(x)), self._board_side-1),\n min(max(0, self.canvas.canvasy(y)), self._board_side-1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L350_C8", "label": "return", "type": "return", "loc": [350, 351], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L349_C4", "vector": [13, 2, 0.7227, 0.0041, 2, 0.21, 0.0, 0, 0, 0, 0, 0, 0, 8, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return (min(max(0, self.canvas.canvasx(x)), self._board_side-1),\n min(max(0, self.canvas.canvasy(y)), self._board_side-1))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "label": "notify", "type": "function", "loc": [353, 370], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7454, 0.0371, 1, 0.63, 0.7857, 133, 0, 2, 0, 0, 0, 0, 9], "semantic": {"name": "notify", "arg_names": ["self", "move"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def notify(self, move):\n add_lst = []\n rem_lst = []\n for idx, _, newval in move.affected_squares:\n if newval & FREE:\n rem_lst.append(idx)\n else:\n add_lst.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L354_C8", "label": "add_lst =", "type": "assigned_variable", "loc": [354, 354], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [14, 2, 0.7299, 0.0021, 2, 0.02, 0.0, 99, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "add_lst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " add_lst = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L355_C8", "label": "rem_lst =", "type": "assigned_variable", "loc": [355, 355], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [14, 2, 0.732, 0.0021, 2, 0.02, 0.125, 635, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "rem_lst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " rem_lst = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L356_C8", "label": "for idx, _, newval", "type": "for", "loc": [356, 360], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [6, 2, 0.7381, 0.0103, 2, 0.02, 0.25, 158, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "idx, _, newval", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for idx, _, newval in move.affected_squares:\n if newval & FREE:\n rem_lst.append(idx)\n else:\n add_lst.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12", "label": "if", "type": "if", "loc": [357, 360], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L356_C8", "vector": [4, 3, 0.7392, 0.0082, 3, 0.52, 0.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if newval & FREE:\n rem_lst.append(idx)\n else:\n add_lst.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L358_C16", "label": "append()", "type": "expression", "loc": [358, 358], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12", "vector": [8, 4, 0.7381, 0.0021, 4, 0.87, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " rem_lst.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L360_C16", "label": "append()", "type": "expression", "loc": [360, 360], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12", "vector": [8, 4, 0.7423, 0.0021, 4, 0.87, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " add_lst.append(idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L361_C8", "label": "cmd = Command()", "type": "assigned_variable", "loc": [361, 361], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [14, 2, 0.7443, 0.0021, 2, 0.02, 0.375, 604, 3, 2, 0, 0, 73, 10, 1], "semantic": {"name": "cmd", "arg_names": [], "import_names": [], "rhs_call_name": "Command", "annotation": ""}, "snippet": " cmd = Command(add=add_lst, remove=rem_lst)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L362_C8", "label": "_draw_checkers()", "type": "expression", "loc": [362, 362], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [8, 2, 0.7464, 0.0021, 2, 0.02, 0.5, 752, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_draw_checkers", "arg_names": [], "import_names": [], "rhs_call_name": "_draw_checkers", "annotation": ""}, "snippet": " self._draw_checkers(cmd)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L363_C8", "label": "delete()", "type": "expression", "loc": [363, 363], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [8, 2, 0.7485, 0.0021, 2, 0.02, 0.625, 266, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.txt.delete('1.0', END)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L364_C8", "label": "restore()", "type": "expression", "loc": [364, 364], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [8, 2, 0.7505, 0.0021, 2, 0.02, 0.75, 821, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "restore", "arg_names": [], "import_names": [], "rhs_call_name": "restore", "annotation": ""}, "snippet": " self.serializer.restore(move.annotation)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L365_C8", "label": "self.curr_annotation =", "type": "assigned_variable", "loc": [365, 365], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [14, 2, 0.7526, 0.0021, 2, 0.02, 0.875, 410, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.curr_annotation", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.curr_annotation = move.annotation"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "label": "if", "type": "if", "loc": [366, 370], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "vector": [4, 2, 0.7588, 0.0103, 2, 0.02, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.txt.get('1.0','end').strip() == '':\n start = keymap[move.affected_squares[FIRST][0]]\n dest = keymap[move.affected_squares[LAST][0]]\n movestr = '%d-%d' % (start, dest)\n self.txt.insert('1.0', movestr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L367_C12", "label": "start =", "type": "assigned_variable", "loc": [367, 367], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "vector": [14, 3, 0.7567, 0.0021, 3, 0.92, 0.0, 511, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " start = keymap[move.affected_squares[FIRST][0]]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L368_C12", "label": "dest =", "type": "assigned_variable", "loc": [368, 368], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "vector": [14, 3, 0.7588, 0.0021, 3, 0.92, 0.3333, 907, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "dest", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " dest = keymap[move.affected_squares[LAST][0]]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L369_C12", "label": "movestr =", "type": "assigned_variable", "loc": [369, 369], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "vector": [14, 3, 0.7608, 0.0021, 3, 0.92, 0.6667, 290, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "movestr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " movestr = '%d-%d' % (start, dest)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L370_C12", "label": "insert()", "type": "expression", "loc": [370, 370], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "vector": [8, 3, 0.7629, 0.0021, 3, 0.92, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txt.insert('1.0', movestr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L372_C4", "label": "get_annotation", "type": "function", "loc": [372, 373], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.768, 0.0041, 1, 0.63, 0.8095, 904, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "get_annotation", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_annotation(self):\n return self.serializer.dump()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L373_C8", "label": "return", "type": "return", "loc": [373, 373], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L372_C4", "vector": [13, 2, 0.7691, 0.0021, 2, 0.66, 0.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.serializer.dump()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L375_C4", "label": "erase_checker", "type": "function", "loc": [375, 376], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7742, 0.0041, 1, 0.63, 0.8333, 660, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "erase_checker", "arg_names": ["self", "index"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def erase_checker(self, index):\n self.canvas.delete('c'+str(index))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L376_C8", "label": "delete()", "type": "expression", "loc": [376, 376], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L375_C4", "vector": [8, 2, 0.7753, 0.0021, 2, 0.5, 0.0, 266, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete('c'+str(index))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "label": "flip_board", "type": "function", "loc": [378, 391], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.7928, 0.0289, 1, 0.63, 0.8571, 555, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "flip_board", "arg_names": ["self", "flip"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def flip_board(self, flip):\n self._delete_labels()\n self.canvas.delete(self.dark_color)\n self.canvas.delete(self.light_color)\n if self.flip_view != flip:\n self.flip_view = flip\n self._gridpos = reverse_dict(self._gridpos)\n self._boardpos = reverse_dict(self._boardpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L379_C8", "label": "_delete_labels()", "type": "expression", "loc": [379, 379], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [8, 2, 0.7814, 0.0021, 2, 0.17, 0.0, 464, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_delete_labels", "arg_names": [], "import_names": [], "rhs_call_name": "_delete_labels", "annotation": ""}, "snippet": " self._delete_labels()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L380_C8", "label": "delete()", "type": "expression", "loc": [380, 380], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [8, 2, 0.7835, 0.0021, 2, 0.17, 0.1429, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete(self.dark_color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L381_C8", "label": "delete()", "type": "expression", "loc": [381, 381], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [8, 2, 0.7856, 0.0021, 2, 0.17, 0.2857, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete(self.light_color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "label": "if", "type": "if", "loc": [382, 385], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [4, 2, 0.7907, 0.0082, 2, 0.17, 0.4286, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.flip_view != flip:\n self.flip_view = flip\n self._gridpos = reverse_dict(self._gridpos)\n self._boardpos = reverse_dict(self._boardpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L383_C12", "label": "self.flip_view =", "type": "assigned_variable", "loc": [383, 383], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "vector": [14, 3, 0.7897, 0.0021, 3, 0.32, 0.0, 131, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.flip_view", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.flip_view = flip"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L384_C12", "label": "self._gridpos = reverse_dict()", "type": "assigned_variable", "loc": [384, 384], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "vector": [14, 3, 0.7918, 0.0021, 3, 0.32, 0.5, 853, 3, 1, 0, 0, 695, 10, 1], "semantic": {"name": "self._gridpos", "arg_names": [], "import_names": [], "rhs_call_name": "reverse_dict", "annotation": ""}, "snippet": " self._gridpos = reverse_dict(self._gridpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L385_C12", "label": "self._boardpos = reverse_dict()", "type": "assigned_variable", "loc": [385, 385], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "vector": [14, 3, 0.7938, 0.0021, 3, 0.32, 1.0, 380, 3, 1, 0, 0, 695, 10, 1], "semantic": {"name": "self._boardpos", "arg_names": [], "import_names": [], "rhs_call_name": "reverse_dict", "annotation": ""}, "snippet": " self._boardpos = reverse_dict(self._boardpos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L386_C8", "label": "_label_board()", "type": "expression", "loc": [386, 386], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [8, 2, 0.7959, 0.0021, 2, 0.17, 0.5714, 913, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_label_board", "arg_names": [], "import_names": [], "rhs_call_name": "_label_board", "annotation": ""}, "snippet": " self._label_board()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L387_C8", "label": "starting_squares =", "type": "assigned_variable", "loc": [387, 389], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [14, 2, 0.8, 0.0062, 2, 0.17, 0.7143, 184, 5, 0, 0, 0, 0, 0, 0], "semantic": {"name": "starting_squares", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " starting_squares = [i for i in self._model.curr_state.valid_squares\n if self._model.curr_state.squares[i] &\n (BLACK | WHITE)]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L390_C8", "label": "all_checkers = Command()", "type": "assigned_variable", "loc": [390, 390], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [14, 2, 0.8041, 0.0021, 2, 0.17, 0.8571, 643, 3, 1, 0, 0, 73, 10, 1], "semantic": {"name": "all_checkers", "arg_names": [], "import_names": [], "rhs_call_name": "Command", "annotation": ""}, "snippet": " all_checkers = Command(add=starting_squares)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L391_C8", "label": "_draw_checkers()", "type": "expression", "loc": [391, 391], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "vector": [8, 2, 0.8062, 0.0021, 2, 0.17, 1.0, 752, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_draw_checkers", "arg_names": [], "import_names": [], "rhs_call_name": "_draw_checkers", "annotation": ""}, "snippet": " self._draw_checkers(all_checkers)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "label": "update_statusbar", "type": "function", "loc": [393, 411], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.8289, 0.0392, 1, 0.63, 0.881, 743, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "update_statusbar", "arg_names": ["self", "output"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def update_statusbar(self, output=None):\n if output:\n self._statusbar['text'] = output\n self.root.update()\n return\n\n if self._model.terminal_test():\n text = \"Game over. \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "label": "if", "type": "if", "loc": [394, 397], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "vector": [4, 2, 0.8155, 0.0082, 2, 0.46, 0.0, 0, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if output:\n self._statusbar['text'] = output\n self.root.update()\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L395_C12", "label": "assign", "type": "assigned_variable", "loc": [395, 395], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "vector": [14, 3, 0.8144, 0.0021, 3, 0.74, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._statusbar['text'] = output"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L396_C12", "label": "update()", "type": "expression", "loc": [396, 396], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "vector": [8, 3, 0.8165, 0.0021, 3, 0.74, 0.5, 637, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "update", "arg_names": [], "import_names": [], "rhs_call_name": "update", "annotation": ""}, "snippet": " self.root.update()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L397_C12", "label": "return", "type": "return", "loc": [397, 397], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "vector": [13, 3, 0.8186, 0.0021, 3, 0.74, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "label": "if", "type": "if", "loc": [399, 406], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "vector": [4, 2, 0.8299, 0.0165, 2, 0.46, 0.5, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._model.terminal_test():\n text = \"Game over. \"\n if self._model.curr_state.to_move == WHITE:\n text += \"Black won.\"\n else:\n text += \"White won.\"\n self._statusbar['text'] = text\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L400_C12", "label": "text =", "type": "assigned_variable", "loc": [400, 400], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "vector": [14, 3, 0.8247, 0.0021, 3, 0.72, 0.0, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = \"Game over. \""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L401_C12", "label": "if", "type": "if", "loc": [401, 404], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "vector": [4, 3, 0.8299, 0.0082, 3, 0.72, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._model.curr_state.to_move == WHITE:\n text += \"Black won.\"\n else:\n text += \"White won.\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L405_C12", "label": "assign", "type": "assigned_variable", "loc": [405, 405], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "vector": [14, 3, 0.8351, 0.0021, 3, 0.72, 0.6667, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._statusbar['text'] = text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L406_C12", "label": "return", "type": "return", "loc": [406, 406], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "vector": [13, 3, 0.8371, 0.0021, 3, 0.72, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8", "label": "if", "type": "if", "loc": [408, 411], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "vector": [4, 2, 0.8443, 0.0082, 2, 0.46, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self._model.curr_state.to_move == WHITE:\n self._statusbar['text'] = \"White to move\"\n else:\n self._statusbar['text'] = \"Black to move\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L409_C12", "label": "assign", "type": "assigned_variable", "loc": [409, 409], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8", "vector": [14, 3, 0.8433, 0.0021, 3, 0.76, 0.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._statusbar['text'] = \"White to move\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L411_C12", "label": "assign", "type": "assigned_variable", "loc": [411, 411], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8", "vector": [14, 3, 0.8474, 0.0021, 3, 0.76, 1.0, 0, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._statusbar['text'] = \"Black to move\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L413_C4", "label": "get_positions", "type": "function", "loc": [413, 416], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.8546, 0.0082, 1, 0.63, 0.9048, 578, 0, 2, 1, 0, 0, 0, 2], "semantic": {"name": "get_positions", "arg_names": ["self", "type"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def get_positions(self, type):\n return map(str, sorted((keymap[i]\n for i in self._model.curr_state.valid_squares\n if self._model.curr_state.squares[i] == type)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L414_C8", "label": "return", "type": "return", "loc": [414, 416], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L413_C4", "vector": [13, 2, 0.8557, 0.0062, 2, 0.11, 0.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return map(str, sorted((keymap[i]\n for i in self._model.curr_state.valid_squares\n if self._model.curr_state.squares[i] == type)))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4", "label": "_setup_board", "type": "function", "loc": [419, 451], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.8969, 0.068, 1, 0.63, 0.9286, 886, 0, 2, 0, 0, 0, 0, 12], "semantic": {"name": "_setup_board", "arg_names": ["self", "root"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _setup_board(self, root):\n for r in range(0, 8, 2):\n row = r * self._square_size\n for c in range(0, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=LIGHT_SQUARES,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "label": "for r", "type": "for", "loc": [420, 434], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4", "vector": [6, 2, 0.8804, 0.0309, 2, 0.17, 0.0, 436, 3, 0, 0, 0, 0, 0, 5], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for r in range(0, 8, 2):\n row = r * self._square_size\n for c in range(0, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=LIGHT_SQUARES,\n outline=LIGHT_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L421_C12", "label": "row =", "type": "assigned_variable", "loc": [421, 421], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "vector": [14, 3, 0.868, 0.0021, 3, 0.22, 0.0, 767, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row = r * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12", "label": "for c", "type": "for", "loc": [422, 427], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "vector": [6, 3, 0.8753, 0.0124, 3, 0.22, 0.5, 411, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in range(0, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=LIGHT_SQUARES,\n outline=LIGHT_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L423_C16", "label": "col =", "type": "assigned_variable", "loc": [423, 423], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12", "vector": [14, 4, 0.8722, 0.0021, 4, 0.13, 0.0, 157, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " col = c * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L424_C16", "label": "create_rectangle()", "type": "expression", "loc": [424, 427], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12", "vector": [8, 4, 0.8773, 0.0082, 4, 0.13, 1.0, 818, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "create_rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "create_rectangle", "annotation": ""}, "snippet": " self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=LIGHT_SQUARES,\n outline=LIGHT_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12", "label": "for c", "type": "for", "loc": [428, 434], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "vector": [6, 3, 0.8887, 0.0144, 3, 0.22, 1.0, 411, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in range(1, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row+self._square_size,\n col+self._square_size-1,\n row+self._square_size*2-1,\n fill=LIGHT_SQUARES,\n outline=LIGHT_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L429_C16", "label": "col =", "type": "assigned_variable", "loc": [429, 429], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12", "vector": [14, 4, 0.8845, 0.0021, 4, 0.56, 0.0, 157, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " col = c * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L430_C16", "label": "create_rectangle()", "type": "expression", "loc": [430, 434], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12", "vector": [8, 4, 0.8907, 0.0103, 4, 0.56, 1.0, 818, 3, 6, 0, 0, 0, 0, 1], "semantic": {"name": "create_rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "create_rectangle", "annotation": ""}, "snippet": " self.canvas.create_rectangle(col, row+self._square_size,\n col+self._square_size-1,\n row+self._square_size*2-1,\n fill=LIGHT_SQUARES,\n outline=LIGHT_SQUARES)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "label": "for r", "type": "for", "loc": [435, 451], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4", "vector": [6, 2, 0.9134, 0.0351, 2, 0.17, 1.0, 436, 3, 0, 0, 0, 0, 0, 7], "semantic": {"name": "r", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for r in range(0, 8, 2):\n row = r * self._square_size\n for c in range(1, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=DARK_SQUARES,\n outline=DARK_SQUARES,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L436_C12", "label": "row =", "type": "assigned_variable", "loc": [436, 436], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "vector": [14, 3, 0.899, 0.0021, 3, 0.55, 0.0, 767, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row = r * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12", "label": "for c", "type": "for", "loc": [437, 443], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "vector": [6, 3, 0.9072, 0.0144, 3, 0.55, 0.5, 411, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in range(1, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=DARK_SQUARES,\n outline=DARK_SQUARES,\n tags='o'+str(r*8+c))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L438_C16", "label": "col =", "type": "assigned_variable", "loc": [438, 438], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12", "vector": [14, 4, 0.9031, 0.0021, 4, 0.03, 0.0, 157, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " col = c * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L439_C16", "label": "create_rectangle()", "type": "expression", "loc": [439, 443], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12", "vector": [8, 4, 0.9093, 0.0103, 4, 0.03, 1.0, 818, 3, 7, 0, 0, 0, 0, 2], "semantic": {"name": "create_rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "create_rectangle", "annotation": ""}, "snippet": " self.canvas.create_rectangle(col, row, col+self._square_size-1,\n row+self._square_size-1,\n fill=DARK_SQUARES,\n outline=DARK_SQUARES,\n tags='o'+str(r*8+c))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12", "label": "for c", "type": "for", "loc": [444, 451], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "vector": [6, 3, 0.9227, 0.0165, 3, 0.55, 1.0, 411, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "c", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for c in range(0, 8, 2):\n col = c * self._square_size\n self.canvas.create_rectangle(col, row+self._square_size,\n col+self._square_size-1,\n row+self._square_size*2-1,\n fill=DARK_SQUARES,\n outline=DARK_SQUARES,\n tags='o'+str(((r+1)*8)+c))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L445_C16", "label": "col =", "type": "assigned_variable", "loc": [445, 445], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12", "vector": [14, 4, 0.9175, 0.0021, 4, 0.93, 0.0, 157, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " col = c * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L446_C16", "label": "create_rectangle()", "type": "expression", "loc": [446, 451], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12", "vector": [8, 4, 0.9247, 0.0124, 4, 0.93, 1.0, 818, 3, 7, 0, 0, 0, 0, 2], "semantic": {"name": "create_rectangle", "arg_names": [], "import_names": [], "rhs_call_name": "create_rectangle", "annotation": ""}, "snippet": " self.canvas.create_rectangle(col, row+self._square_size,\n col+self._square_size-1,\n row+self._square_size*2-1,\n fill=DARK_SQUARES,\n outline=DARK_SQUARES,\n tags='o'+str(((r+1)*8)+c))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L453_C4", "label": "_label_board", "type": "function", "loc": [453, 460], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.9412, 0.0165, 1, 0.63, 0.9524, 913, 0, 1, 0, 0, 0, 0, 3], "semantic": {"name": "_label_board", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _label_board(self):\n for key, pair in self._gridpos.iteritems():\n row, col = pair\n xpos, ypos = col * self._square_size, row * self._square_size\n self.canvas.create_text(xpos+self._square_size-7,\n ypos+self._square_size-7,\n text=str(keymap[key]),\n fill=LIGHT_SQUARES, tag='label')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "label": "for key, pair", "type": "for", "loc": [454, 460], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L453_C4", "vector": [6, 2, 0.9423, 0.0144, 2, 0.09, 0.0, 462, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "key, pair", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, pair in self._gridpos.iteritems():\n row, col = pair\n xpos, ypos = col * self._square_size, row * self._square_size\n self.canvas.create_text(xpos+self._square_size-7,\n ypos+self._square_size-7,\n text=str(keymap[key]),\n fill=LIGHT_SQUARES, tag='label')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L455_C12", "label": "row, col =", "type": "assigned_variable", "loc": [455, 455], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "vector": [14, 3, 0.9381, 0.0021, 3, 0.85, 0.0, 777, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row, col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row, col = pair"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L456_C12", "label": "xpos, ypos =", "type": "assigned_variable", "loc": [456, 456], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "vector": [14, 3, 0.9402, 0.0021, 3, 0.85, 0.5, 503, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "xpos, ypos", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " xpos, ypos = col * self._square_size, row * self._square_size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L457_C12", "label": "create_text()", "type": "expression", "loc": [457, 460], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "vector": [8, 3, 0.9454, 0.0082, 3, 0.85, 1.0, 328, 3, 5, 0, 0, 0, 0, 2], "semantic": {"name": "create_text", "arg_names": [], "import_names": [], "rhs_call_name": "create_text", "annotation": ""}, "snippet": " self.canvas.create_text(xpos+self._square_size-7,\n ypos+self._square_size-7,\n text=str(keymap[key]),\n fill=LIGHT_SQUARES, tag='label')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L462_C4", "label": "_delete_labels", "type": "function", "loc": [462, 463], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.9536, 0.0041, 1, 0.63, 0.9762, 464, 0, 1, 0, 0, 0, 0, 1], "semantic": {"name": "_delete_labels", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _delete_labels(self):\n self.canvas.delete('label')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L463_C8", "label": "delete()", "type": "expression", "loc": [463, 463], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L462_C4", "vector": [8, 2, 0.9546, 0.0021, 2, 0.28, 0.0, 266, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete('label')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "label": "_draw_checkers", "type": "function", "loc": [465, 485], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "vector": [2, 1, 0.9794, 0.0433, 1, 0.63, 1.0, 752, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_draw_checkers", "arg_names": ["self", "change"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _draw_checkers(self, change):\n if change == None:\n return\n for i in change.remove:\n self.canvas.delete('c'+str(i))\n for i in change.add:\n checker = self._model.curr_state.squares[i]\n color = self.dark_color if checker & COLORS == BLACK else self.light_color"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L466_C8", "label": "if", "type": "if", "loc": [466, 467], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "vector": [4, 2, 0.9619, 0.0041, 2, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if change == None:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L467_C12", "label": "return", "type": "return", "loc": [467, 467], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L466_C8", "vector": [13, 3, 0.9629, 0.0021, 3, 0.21, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L468_C8", "label": "for i", "type": "for", "loc": [468, 469], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "vector": [6, 2, 0.966, 0.0041, 2, 0.43, 0.5, 826, 7, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in change.remove:\n self.canvas.delete('c'+str(i))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L469_C12", "label": "delete()", "type": "expression", "loc": [469, 469], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L468_C8", "vector": [8, 3, 0.967, 0.0021, 3, 0.89, 0.0, 266, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.canvas.delete('c'+str(i))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "label": "for i", "type": "for", "loc": [470, 485], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "vector": [6, 2, 0.9845, 0.033, 2, 0.43, 1.0, 826, 7, 0, 0, 0, 0, 0, 4], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in change.add:\n checker = self._model.curr_state.squares[i]\n color = self.dark_color if checker & COLORS == BLACK else self.light_color\n row, col = self._gridpos[i]\n x = col * self._square_size + self._piece_offset\n y = row * self._square_size + self._piece_offset\n tag = 'c'+str(i)\n self.canvas.create_oval(x+2, y+2, x+2+CHECKER_SIZE,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L471_C12", "label": "checker =", "type": "assigned_variable", "loc": [471, 471], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9711, 0.0021, 3, 0.77, 0.0, 279, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "checker", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " checker = self._model.curr_state.squares[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L472_C12", "label": "color =", "type": "assigned_variable", "loc": [472, 472], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9732, 0.0021, 3, 0.77, 0.125, 776, 8, 0, 0, 0, 0, 0, 0], "semantic": {"name": "color", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " color = self.dark_color if checker & COLORS == BLACK else self.light_color"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L473_C12", "label": "row, col =", "type": "assigned_variable", "loc": [473, 473], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9753, 0.0021, 3, 0.77, 0.25, 777, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "row, col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " row, col = self._gridpos[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L474_C12", "label": "x =", "type": "assigned_variable", "loc": [474, 474], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9773, 0.0021, 3, 0.77, 0.375, 190, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "x", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " x = col * self._square_size + self._piece_offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L475_C12", "label": "y =", "type": "assigned_variable", "loc": [475, 475], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9794, 0.0021, 3, 0.77, 0.5, 304, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "y", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " y = row * self._square_size + self._piece_offset"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L476_C12", "label": "tag =", "type": "assigned_variable", "loc": [476, 476], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [14, 3, 0.9814, 0.0021, 3, 0.77, 0.625, 732, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "tag", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tag = 'c'+str(i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L477_C12", "label": "create_oval()", "type": "expression", "loc": [477, 479], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [8, 3, 0.9856, 0.0062, 3, 0.77, 0.75, 631, 3, 7, 0, 0, 0, 0, 1], "semantic": {"name": "create_oval", "arg_names": [], "import_names": [], "rhs_call_name": "create_oval", "annotation": ""}, "snippet": " self.canvas.create_oval(x+2, y+2, x+2+CHECKER_SIZE,\n y+2+CHECKER_SIZE, outline='black',\n fill='black', tags=(color, tag))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L480_C12", "label": "create_oval()", "type": "expression", "loc": [480, 482], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [8, 3, 0.9918, 0.0062, 3, 0.77, 0.875, 631, 3, 7, 0, 0, 0, 0, 1], "semantic": {"name": "create_oval", "arg_names": [], "import_names": [], "rhs_call_name": "create_oval", "annotation": ""}, "snippet": " self.canvas.create_oval(x, y, x+CHECKER_SIZE, y+CHECKER_SIZE,\n outline='black', fill=color,\n tags=(color, tag))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:If_L483_C12", "label": "if", "type": "if", "loc": [483, 485], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "vector": [4, 3, 0.9979, 0.0062, 3, 0.77, 1.0, 0, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if checker & KING:\n self.canvas.create_image(x+15, y+15, image=self._crownpic,\n anchor=CENTER, tags=(color, tag))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L484_C16", "label": "create_image()", "type": "expression", "loc": [484, 485], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_367:If_L483_C12", "vector": [8, 4, 0.999, 0.0041, 4, 0.88, 0.0, 203, 3, 5, 0, 0, 0, 0, 1], "semantic": {"name": "create_image", "arg_names": [], "import_names": [], "rhs_call_name": "create_image", "annotation": ""}, "snippet": " self.canvas.create_image(x+15, y+15, image=self._crownpic,\n anchor=CENTER, tags=(color, tag))"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L44_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L46_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L47_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L50_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L52_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L54_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L56_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L67_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L75_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L74_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L77_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L76_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L79_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L71_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L81_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L83_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L83_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L84_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L84_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L85_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L80_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L87_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L88_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L89_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L90_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L90_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L91_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L86_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L93_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L103_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L103_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L104_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L108_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L108_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L116_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L117_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L119_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L115_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L123_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L122_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L125_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L130_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L129_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L132_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L133_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L134_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L135_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L136_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L131_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L137_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L138_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L143_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L142_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L145_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L146_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L147_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L148_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L149_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L144_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L150_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L141_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L159_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L160_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L161_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L162_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L163_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L164_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L158_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L165_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L167_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L153_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L171_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L173_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L172_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L175_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L176_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L177_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L181_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L174_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L184_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L183_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L185_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L170_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L186_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L188_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L193_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L192_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L194_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L197_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L196_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L198_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L201_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L200_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L205_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L204_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L207_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L206_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L208_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L210_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L210_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L212_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L211_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L213_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L213_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L214_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L217_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L221_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L222_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L216_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L226_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L225_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L227_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L229_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L229_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L230_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L232_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L232_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L233_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L235_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L235_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L236_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L236_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L237_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L241_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L240_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L243_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L244_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L244_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L245_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L239_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L246_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L246_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L247_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L247_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L248_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L251_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L252_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L250_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L253_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L256_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L257_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L258_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L255_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L260_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L264_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L265_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L266_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L267_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L268_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L269_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L270_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L271_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L272_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L273_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L263_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L274_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L277_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L279_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L280_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L282_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L283_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L285_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L286_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L288_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L289_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L291_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L292_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L294_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L295_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L296_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L297_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L299_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L300_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L302_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L303_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L305_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L306_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L308_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L309_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L310_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L311_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L312_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L313_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L314_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L315_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L316_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L317_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L276_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L318_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L321_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L322_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L323_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L324_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L325_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L326_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L328_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L320_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L329_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L329_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L330_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L333_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L334_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L335_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L332_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L336_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L338_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L338_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L339_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L341_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L341_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L342_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L345_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L346_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L344_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L347_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L349_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L349_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L350_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L354_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L355_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L356_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L356_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L358_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L357_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L360_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L361_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L362_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L363_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L364_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L365_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L353_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L367_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L368_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L369_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L366_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L370_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L372_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L372_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L373_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L375_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L375_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L376_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L379_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L380_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L381_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L383_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L384_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L382_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L385_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L386_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L387_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L390_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L378_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L391_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L395_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L396_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L394_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L397_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L400_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L401_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L405_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L399_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L406_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L393_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L409_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L408_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L411_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L413_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L413_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L414_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L421_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L423_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L422_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L424_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L420_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L429_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L428_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L430_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L419_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L436_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L438_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L437_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L439_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L435_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L445_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L444_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L446_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L453_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L453_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L455_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L456_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L454_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L457_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L462_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L462_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L463_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:ClassDef_L14_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L466_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L466_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Return_L467_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L468_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L468_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L469_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:FunctionDef_L465_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L471_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L472_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L473_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L474_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L475_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Assign_L476_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L477_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L480_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:For_L470_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_367:If_L483_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_367:If_L483_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_367:Expr_L484_C16"}]
import sys import games from globalconst import * class Player(object): def __init__(self, color): self.col = color def _get_color(self): return self.col color = property(_get_color, doc="Player color") class AlphabetaPlayer(Player): def __init__(self, color, depth=4): Player.__init__(self, color) self.searchDepth = depth def select_move(self, game, state): sys.stdout.write('\nThinking ... ') movelist = games.alphabeta_search(state, game, False, self.searchDepth) positions = [] step = 2 if game.captures_available(state) else 1 for i in range(0, len(movelist), step): idx, old, new = movelist[i] positions.append(str(CBMAP[idx])) move = '-'.join(positions) print 'I move %s' % move return movelist class HumanPlayer(Player): def __init__(self, color): Player.__init__(self, color) def select_move(self, game, state): while 1: moves = game.legal_moves(state) positions = [] idx = 0 while 1: reqstr = 'Move to? ' if positions else 'Move from? ' # do any positions match the input pos = self._valid_pos(raw_input(reqstr), moves, idx) if pos: positions.append(pos) # reduce moves to number matching the positions entered moves = self._filter_moves(pos, moves, idx) if game.captures_available(state): idx += 2 else: idx += 1 if len(moves) <= 1: break if len(moves) == 1: return moves[0] else: print "Illegal move!" def _valid_pos(self, pos, moves, idx): t_pos = IMAP.get(pos.lower(), 0) if t_pos == 0: return None # move is illegal for m in moves: if idx < len(m) and m[idx][0] == t_pos: return t_pos return None def _filter_moves(self, pos, moves, idx): del_list = [] for i, m in enumerate(moves): if pos != m[idx][0]: del_list.append(i) for i in reversed(del_list): del moves[i] return moves
ajibawa-2023/Python-Code-Large/train/row_368
58
75
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_368:Import_L1_C0", "label": "sys import sys", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0133, 0.0133, 0, 0.66, 0.0, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Import_L2_C0", "label": "games import games", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0267, 0.0133, 0, 0.66, 0.2, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "games", "arg_names": [], "import_names": ["games"], "rhs_call_name": "", "annotation": ""}, "snippet": "import games"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:ImportFrom_L3_C0", "label": "from globalconst import *", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.04, 0.0133, 0, 0.66, 0.4, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from globalconst import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "label": "Player", "type": "class", "loc": [5, 11], "level": 0, "parent": null, "vector": [3, 0, 0.1067, 0.0933, 0, 0.66, 0.6, 724, 0, 2, 0, 0, 186, 0, 1], "semantic": {"name": "Player", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Player(object):\n def __init__(self, color):\n self.col = color\n\n def _get_color(self):\n return self.col\n color = property(_get_color, doc=\"Player color\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L6_C4", "label": "__init__", "type": "function", "loc": [6, 7], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "vector": [2, 1, 0.0867, 0.0267, 1, 0.41, 0.0, 555, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "__init__", "arg_names": ["self", "color"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, color):\n self.col = color"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L7_C8", "label": "self.col =", "type": "assigned_variable", "loc": [7, 7], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L6_C4", "vector": [14, 2, 0.0933, 0.0133, 2, 0.61, 0.0, 11, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.col", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.col = color"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L9_C4", "label": "_get_color", "type": "function", "loc": [9, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "vector": [2, 1, 0.1267, 0.0267, 1, 0.41, 0.5, 130, 0, 1, 1, 0, 0, 0, 0], "semantic": {"name": "_get_color", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _get_color(self):\n return self.col"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L10_C8", "label": "return", "type": "return", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L9_C4", "vector": [13, 2, 0.1333, 0.0133, 2, 0.86, 0.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.col"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L11_C4", "label": "color = property()", "type": "assigned_variable", "loc": [11, 11], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "vector": [14, 1, 0.1467, 0.0133, 1, 0.41, 1.0, 776, 3, 2, 0, 0, 244, 10, 1], "semantic": {"name": "color", "arg_names": [], "import_names": [], "rhs_call_name": "property", "annotation": ""}, "snippet": " color = property(_get_color, doc=\"Player color\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L13_C0", "label": "AlphabetaPlayer", "type": "class", "loc": [13, 29], "level": 0, "parent": null, "vector": [3, 0, 0.28, 0.2267, 0, 0.66, 0.8, 851, 0, 2, 0, 0, 724, 0, 10], "semantic": {"name": "AlphabetaPlayer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class AlphabetaPlayer(Player):\n def __init__(self, color, depth=4):\n Player.__init__(self, color)\n self.searchDepth = depth\n\n def select_move(self, game, state):\n sys.stdout.write('\\nThinking ... ')\n movelist = games.alphabeta_search(state, game, False,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4", "label": "__init__", "type": "function", "loc": [14, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L13_C0", "vector": [2, 1, 0.2, 0.04, 1, 0.52, 0.0, 555, 0, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "color", "depth"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, color, depth=4):\n Player.__init__(self, color)\n self.searchDepth = depth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L15_C8", "label": "__init__()", "type": "expression", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4", "vector": [8, 2, 0.2, 0.0133, 2, 0.03, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Player.__init__(self, color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L16_C8", "label": "self.searchDepth =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4", "vector": [14, 2, 0.2133, 0.0133, 2, 0.03, 1.0, 34, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.searchDepth", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.searchDepth = depth"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "label": "select_move", "type": "function", "loc": [18, 29], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L13_C0", "vector": [2, 1, 0.3133, 0.16, 1, 0.52, 1.0, 150, 0, 3, 1, 0, 0, 0, 9], "semantic": {"name": "select_move", "arg_names": ["self", "game", "state"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def select_move(self, game, state):\n sys.stdout.write('\\nThinking ... ')\n movelist = games.alphabeta_search(state, game, False,\n self.searchDepth)\n positions = []\n step = 2 if game.captures_available(state) else 1\n for i in range(0, len(movelist), step):\n idx, old, new = movelist[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L19_C8", "label": "write()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [8, 2, 0.2533, 0.0133, 2, 0.51, 0.0, 837, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "write", "arg_names": [], "import_names": [], "rhs_call_name": "write", "annotation": ""}, "snippet": " sys.stdout.write('\\nThinking ... ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L20_C8", "label": "movelist = alphabeta_search()", "type": "assigned_variable", "loc": [20, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [14, 2, 0.2733, 0.0267, 2, 0.51, 0.1429, 101, 3, 4, 0, 0, 502, 10, 1], "semantic": {"name": "movelist", "arg_names": [], "import_names": [], "rhs_call_name": "alphabeta_search", "annotation": ""}, "snippet": " movelist = games.alphabeta_search(state, game, False,\n self.searchDepth)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L22_C8", "label": "positions =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [14, 2, 0.2933, 0.0133, 2, 0.51, 0.2857, 320, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "positions", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " positions = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L23_C8", "label": "step =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [14, 2, 0.3067, 0.0133, 2, 0.51, 0.4286, 880, 8, 0, 0, 0, 0, 0, 1], "semantic": {"name": "step", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " step = 2 if game.captures_available(state) else 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8", "label": "for i", "type": "for", "loc": [24, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [6, 2, 0.3333, 0.04, 2, 0.51, 0.5714, 826, 3, 0, 0, 0, 0, 0, 4], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in range(0, len(movelist), step):\n idx, old, new = movelist[i]\n positions.append(str(CBMAP[idx]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L25_C12", "label": "idx, old, new =", "type": "assigned_variable", "loc": [25, 25], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8", "vector": [14, 3, 0.3333, 0.0133, 3, 0.78, 0.0, 238, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "idx, old, new", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idx, old, new = movelist[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L26_C12", "label": "append()", "type": "expression", "loc": [26, 26], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8", "vector": [8, 3, 0.3467, 0.0133, 3, 0.78, 1.0, 243, 3, 1, 0, 0, 0, 0, 2], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " positions.append(str(CBMAP[idx]))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L27_C8", "label": "move = join()", "type": "assigned_variable", "loc": [27, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [14, 2, 0.36, 0.0133, 2, 0.51, 0.7143, 856, 3, 1, 0, 0, 933, 10, 1], "semantic": {"name": "move", "arg_names": [], "import_names": [], "rhs_call_name": "join", "annotation": ""}, "snippet": " move = '-'.join(positions)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L28_C8", "label": "print()", "type": "expression", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [8, 2, 0.3733, 0.0133, 2, 0.51, 0.8571, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print('I move %s' % move)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L29_C8", "label": "return", "type": "return", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "vector": [13, 2, 0.3867, 0.0133, 2, 0.51, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return movelist"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "label": "HumanPlayer", "type": "class", "loc": [31, 75], "level": 0, "parent": null, "vector": [3, 0, 0.7067, 0.6, 0, 0.66, 1.0, 891, 0, 4, 0, 0, 724, 0, 16], "semantic": {"name": "HumanPlayer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class HumanPlayer(Player):\n def __init__(self, color):\n Player.__init__(self, color)\n\n def select_move(self, game, state):\n while 1:\n moves = game.legal_moves(state)\n positions = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L32_C4", "label": "__init__", "type": "function", "loc": [32, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "vector": [2, 1, 0.4333, 0.0267, 1, 0.38, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "color"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, color):\n Player.__init__(self, color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L33_C8", "label": "__init__()", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L32_C4", "vector": [8, 2, 0.44, 0.0133, 2, 0.9, 0.0, 555, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Player.__init__(self, color)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L35_C4", "label": "select_move", "type": "function", "loc": [35, 57], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "vector": [2, 1, 0.6133, 0.3067, 1, 0.38, 0.3333, 150, 0, 3, 1, 0, 0, 0, 9], "semantic": {"name": "select_move", "arg_names": ["self", "game", "state"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def select_move(self, game, state):\n while 1:\n moves = game.legal_moves(state)\n positions = []\n idx = 0\n while 1:\n reqstr = 'Move to? ' if positions else 'Move from? '\n # do any positions match the input"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "label": "while", "type": "while", "loc": [36, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L35_C4", "vector": [5, 2, 0.62, 0.2933, 2, 0.93, 0.0, 0, 1, 0, 0, 0, 0, 0, 9], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while 1:\n moves = game.legal_moves(state)\n positions = []\n idx = 0\n while 1:\n reqstr = 'Move to? ' if positions else 'Move from? '\n # do any positions match the input\n pos = self._valid_pos(raw_input(reqstr), moves, idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L37_C12", "label": "moves = legal_moves()", "type": "assigned_variable", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "vector": [14, 3, 0.4933, 0.0133, 3, 0.1, 0.0, 130, 3, 1, 0, 0, 295, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "legal_moves", "annotation": ""}, "snippet": " moves = game.legal_moves(state)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L38_C12", "label": "positions =", "type": "assigned_variable", "loc": [38, 38], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "vector": [14, 3, 0.5067, 0.0133, 3, 0.1, 0.25, 320, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "positions", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " positions = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L39_C12", "label": "idx =", "type": "assigned_variable", "loc": [39, 39], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "vector": [14, 3, 0.52, 0.0133, 3, 0.1, 0.5, 187, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "idx", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " idx = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "label": "while", "type": "while", "loc": [40, 53], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "vector": [5, 3, 0.62, 0.1867, 3, 0.1, 0.75, 0, 1, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while 1:\n reqstr = 'Move to? ' if positions else 'Move from? '\n # do any positions match the input\n pos = self._valid_pos(raw_input(reqstr), moves, idx)\n if pos:\n positions.append(pos)\n # reduce moves to number matching the positions entered\n moves = self._filter_moves(pos, moves, idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L41_C16", "label": "reqstr =", "type": "assigned_variable", "loc": [41, 41], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "vector": [14, 4, 0.5467, 0.0133, 4, 0.37, 0.0, 47, 8, 0, 0, 0, 0, 0, 0], "semantic": {"name": "reqstr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " reqstr = 'Move to? ' if positions else 'Move from? '"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L43_C16", "label": "pos = _valid_pos()", "type": "assigned_variable", "loc": [43, 43], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "vector": [14, 4, 0.5733, 0.0133, 4, 0.37, 0.5, 627, 3, 3, 0, 0, 617, 10, 2], "semantic": {"name": "pos", "arg_names": [], "import_names": [], "rhs_call_name": "_valid_pos", "annotation": ""}, "snippet": " pos = self._valid_pos(raw_input(reqstr), moves, idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "label": "if", "type": "if", "loc": [44, 53], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "vector": [4, 4, 0.6467, 0.1333, 4, 0.37, 1.0, 0, 2, 0, 0, 0, 0, 0, 4], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos:\n positions.append(pos)\n # reduce moves to number matching the positions entered\n moves = self._filter_moves(pos, moves, idx)\n if game.captures_available(state):\n idx += 2\n else:\n idx += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L45_C20", "label": "append()", "type": "expression", "loc": [45, 45], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "vector": [8, 5, 0.6, 0.0133, 5, 0.64, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " positions.append(pos)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L47_C20", "label": "moves = _filter_moves()", "type": "assigned_variable", "loc": [47, 47], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "vector": [14, 5, 0.6267, 0.0133, 5, 0.64, 0.3333, 130, 3, 3, 0, 0, 124, 10, 1], "semantic": {"name": "moves", "arg_names": [], "import_names": [], "rhs_call_name": "_filter_moves", "annotation": ""}, "snippet": " moves = self._filter_moves(pos, moves, idx)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L48_C20", "label": "if", "type": "if", "loc": [48, 51], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "vector": [4, 5, 0.66, 0.0533, 5, 0.64, 0.6667, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if game.captures_available(state):\n idx += 2\n else:\n idx += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L52_C20", "label": "if", "type": "if", "loc": [52, 53], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "vector": [4, 5, 0.7, 0.0267, 5, 0.64, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(moves) <= 1:\n break"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12", "label": "if", "type": "if", "loc": [54, 57], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "vector": [4, 3, 0.74, 0.0533, 3, 0.1, 1.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(moves) == 1:\n return moves[0]\n else:\n print(\"Illegal move!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L55_C16", "label": "return", "type": "return", "loc": [55, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12", "vector": [13, 4, 0.7333, 0.0133, 4, 0.72, 0.0, 0, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return moves[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L57_C16", "label": "print()", "type": "expression", "loc": [57, 57], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12", "vector": [8, 4, 0.76, 0.0133, 4, 0.72, 1.0, 535, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "print", "arg_names": [], "import_names": [], "rhs_call_name": "print", "annotation": ""}, "snippet": " print(\"Illegal move!\")"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "label": "_valid_pos", "type": "function", "loc": [59, 66], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "vector": [2, 1, 0.8333, 0.1067, 1, 0.38, 0.6667, 617, 0, 4, 1, 0, 0, 0, 3], "semantic": {"name": "_valid_pos", "arg_names": ["self", "pos", "moves", "idx"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _valid_pos(self, pos, moves, idx):\n t_pos = IMAP.get(pos.lower(), 0)\n if t_pos == 0:\n return None # move is illegal\n for m in moves:\n if idx < len(m) and m[idx][0] == t_pos:\n return t_pos\n return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L60_C8", "label": "t_pos = get()", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "vector": [14, 2, 0.8, 0.0133, 2, 0.81, 0.0, 627, 3, 2, 0, 0, 607, 10, 2], "semantic": {"name": "t_pos", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " t_pos = IMAP.get(pos.lower(), 0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L61_C8", "label": "if", "type": "if", "loc": [61, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "vector": [4, 2, 0.82, 0.0267, 2, 0.81, 0.3333, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if t_pos == 0:\n return None # move is illegal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L62_C12", "label": "return", "type": "return", "loc": [62, 62], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L61_C8", "vector": [13, 3, 0.8267, 0.0133, 3, 0.54, 0.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None # move is illegal"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:For_L63_C8", "label": "for m", "type": "for", "loc": [63, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "vector": [6, 2, 0.8533, 0.04, 2, 0.81, 0.6667, 711, 2, 0, 0, 0, 0, 0, 1], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for m in moves:\n if idx < len(m) and m[idx][0] == t_pos:\n return t_pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L64_C12", "label": "if", "type": "if", "loc": [64, 65], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:For_L63_C8", "vector": [4, 3, 0.86, 0.0267, 3, 0.63, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if idx < len(m) and m[idx][0] == t_pos:\n return t_pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L65_C16", "label": "return", "type": "return", "loc": [65, 65], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L64_C12", "vector": [13, 4, 0.8667, 0.0133, 4, 0.2, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return t_pos"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L66_C8", "label": "return", "type": "return", "loc": [66, 66], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "vector": [13, 2, 0.88, 0.0133, 2, 0.81, 1.0, 0, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "label": "_filter_moves", "type": "function", "loc": [68, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "vector": [2, 1, 0.9533, 0.1067, 1, 0.38, 1.0, 124, 0, 4, 1, 0, 0, 0, 3], "semantic": {"name": "_filter_moves", "arg_names": ["self", "pos", "moves", "idx"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _filter_moves(self, pos, moves, idx):\n del_list = []\n for i, m in enumerate(moves):\n if pos != m[idx][0]:\n del_list.append(i)\n for i in reversed(del_list):\n del moves[i]\n return moves"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L69_C8", "label": "del_list =", "type": "assigned_variable", "loc": [69, 69], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "vector": [14, 2, 0.92, 0.0133, 2, 0.03, 0.0, 503, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "del_list", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " del_list = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:For_L70_C8", "label": "for i, m", "type": "for", "loc": [70, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "vector": [6, 2, 0.9467, 0.04, 2, 0.03, 0.3333, 489, 3, 0, 0, 0, 0, 0, 2], "semantic": {"name": "i, m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i, m in enumerate(moves):\n if pos != m[idx][0]:\n del_list.append(i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:If_L71_C12", "label": "if", "type": "if", "loc": [71, 72], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:For_L70_C8", "vector": [4, 3, 0.9533, 0.0267, 3, 0.94, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if pos != m[idx][0]:\n del_list.append(i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L72_C16", "label": "append()", "type": "expression", "loc": [72, 72], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:If_L71_C12", "vector": [8, 4, 0.96, 0.0133, 4, 0.41, 0.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " del_list.append(i)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:For_L73_C8", "label": "for i", "type": "for", "loc": [73, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "vector": [6, 2, 0.98, 0.0267, 2, 0.03, 0.6667, 826, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "i", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for i in reversed(del_list):\n del moves[i]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L75_C8", "label": "return", "type": "return", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "vector": [13, 2, 1.0, 0.0133, 2, 0.03, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return moves"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L6_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L6_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L9_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L9_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L5_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L13_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L25_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:For_L24_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L26_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L37_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L38_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L39_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L41_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L43_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L40_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L45_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L47_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L48_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L44_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L52_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:While_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L55_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L57_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L61_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L62_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:For_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:For_L63_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L64_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L64_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L65_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L59_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L66_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:ClassDef_L31_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Assign_L69_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:For_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:For_L70_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_368:If_L71_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:If_L71_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Expr_L72_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:For_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_368:FunctionDef_L68_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_368:Return_L75_C8"}]
from UserDict import UserDict class TranspositionTable (UserDict): def __init__ (self, maxSize): UserDict.__init__(self) assert maxSize > 0 self.maxSize = maxSize self.krono = [] self.maxdepth = 0 self.killer1 = [-1]*20 self.killer2 = [-1]*20 self.hashmove = [-1]*20 def __setitem__ (self, key, item): if not key in self: if len(self) >= self.maxSize: try: del self[self.krono[0]] except KeyError: pass # Overwritten del self.krono[0] self.data[key] = item self.krono.append(key) def probe (self, hash, depth, alpha, beta): if not hash in self: return move, score, hashf, ply = self[hash] if ply < depth: return if hashf == hashfEXACT: return move, score, hashf if hashf == hashfALPHA and score <= alpha: return move, alpha, hashf if hashf == hashfBETA and score >= beta: return move, beta, hashf def record (self, hash, move, score, hashf, ply): self[hash] = (move, score, hashf, ply) def add_killer (self, ply, move): if self.killer1[ply] == -1: self.killer1[ply] = move elif move != self.killer1[ply]: self.killer2[ply] = move def is_killer (self, ply, move): if self.killer1[ply] == move: return 10 elif self.killer2[ply] == move: return 8 if ply >= 2: if self.killer1[ply-2] == move: return 6 elif self.killer2[ply-2] == move: return 4 return 0 def set_hash_move (self, ply, move): self.hashmove[ply] = move def is_hash_move (self, ply, move): return self.hashmove[ply] == move
ajibawa-2023/Python-Code-Large/train/row_369
50
64
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_369:ImportFrom_L1_C0", "label": "from UserDict import UserDict", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0156, 0.0156, 0, 0.66, 0.0, 351, 0, 1, 0, 0, 351, 0, 0], "semantic": {"name": "UserDict", "arg_names": [], "import_names": ["UserDict"], "rhs_call_name": "", "annotation": ""}, "snippet": "from UserDict import UserDict"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "label": "TranspositionTable", "type": "class", "loc": [3, 64], "level": 0, "parent": null, "vector": [3, 0, 0.5234, 0.9688, 0, 0.66, 1.0, 391, 0, 8, 0, 0, 351, 0, 3], "semantic": {"name": "TranspositionTable", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TranspositionTable (UserDict):\n def __init__ (self, maxSize):\n UserDict.__init__(self)\n assert maxSize > 0\n self.maxSize = maxSize\n self.krono = []\n self.maxdepth = 0\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "label": "__init__", "type": "function", "loc": [4, 13], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.1328, 0.1562, 1, 0.05, 0.0, 555, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "maxSize"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__ (self, maxSize):\n UserDict.__init__(self)\n assert maxSize > 0\n self.maxSize = maxSize\n self.krono = []\n self.maxdepth = 0\n\n self.killer1 = [-1]*20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Expr_L5_C8", "label": "__init__()", "type": "expression", "loc": [5, 5], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [8, 2, 0.0781, 0.0156, 2, 0.16, 0.0, 555, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " UserDict.__init__(self)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L7_C8", "label": "self.maxSize =", "type": "assigned_variable", "loc": [7, 7], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.1094, 0.0156, 2, 0.16, 0.1667, 342, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.maxSize", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.maxSize = maxSize"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L8_C8", "label": "self.krono =", "type": "assigned_variable", "loc": [8, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.125, 0.0156, 2, 0.16, 0.3333, 529, 0, 0, 0, 0, 0, 5, 0], "semantic": {"name": "self.krono", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.krono = []"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L9_C8", "label": "self.maxdepth =", "type": "assigned_variable", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.1406, 0.0156, 2, 0.16, 0.5, 542, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.maxdepth", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.maxdepth = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L11_C8", "label": "self.killer1 =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.1719, 0.0156, 2, 0.16, 0.6667, 175, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.killer1", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.killer1 = [-1]*20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L12_C8", "label": "self.killer2 =", "type": "assigned_variable", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.1875, 0.0156, 2, 0.16, 0.8333, 215, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.killer2", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.killer2 = [-1]*20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L13_C8", "label": "self.hashmove =", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "vector": [14, 2, 0.2031, 0.0156, 2, 0.16, 1.0, 59, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.hashmove", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.hashmove = [-1]*20"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "label": "__setitem__", "type": "function", "loc": [15, 24], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.3047, 0.1562, 1, 0.05, 0.1429, 343, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__setitem__", "arg_names": ["self", "key", "item"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __setitem__ (self, key, item):\n if not key in self:\n if len(self) >= self.maxSize:\n try:\n del self[self.krono[0]]\n except KeyError:\n pass # Overwritten\n del self.krono[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L16_C8", "label": "if", "type": "if", "loc": [16, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "vector": [4, 2, 0.2969, 0.1094, 2, 0.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not key in self:\n if len(self) >= self.maxSize:\n try:\n del self[self.krono[0]]\n except KeyError:\n pass # Overwritten\n del self.krono[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L17_C12", "label": "if", "type": "if", "loc": [17, 22], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L16_C8", "vector": [4, 3, 0.3047, 0.0938, 3, 0.11, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if len(self) >= self.maxSize:\n try:\n del self[self.krono[0]]\n except KeyError:\n pass # Overwritten\n del self.krono[0]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Try_L18_C16", "label": "try", "type": "try", "loc": [18, 21], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L17_C12", "vector": [7, 4, 0.3047, 0.0625, 4, 0.63, 0.0, 0, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " try:\n del self[self.krono[0]]\n except KeyError:\n pass # Overwritten"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L23_C8", "label": "assign", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "vector": [14, 2, 0.3594, 0.0156, 2, 0.7, 0.5, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.data[key] = item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Expr_L24_C8", "label": "append()", "type": "expression", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "vector": [8, 2, 0.375, 0.0156, 2, 0.7, 1.0, 243, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "append", "arg_names": [], "import_names": [], "rhs_call_name": "append", "annotation": ""}, "snippet": " self.krono.append(key)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "label": "probe", "type": "function", "loc": [26, 37], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.4922, 0.1875, 1, 0.05, 0.2857, 656, 0, 5, 1, 0, 0, 0, 0], "semantic": {"name": "probe", "arg_names": ["self", "hash", "depth", "alpha", "beta"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def probe (self, hash, depth, alpha, beta):\n if not hash in self:\n return\n move, score, hashf, ply = self[hash]\n if ply < depth:\n return\n if hashf == hashfEXACT:\n return move, score, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L27_C8", "label": "if", "type": "if", "loc": [27, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [4, 2, 0.4297, 0.0312, 2, 0.78, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not hash in self:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L28_C12", "label": "return", "type": "return", "loc": [28, 28], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L27_C8", "vector": [13, 3, 0.4375, 0.0156, 3, 0.77, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L29_C8", "label": "move, score, hashf, ply =", "type": "assigned_variable", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [14, 2, 0.4531, 0.0156, 2, 0.78, 0.2, 588, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "move, score, hashf, ply", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " move, score, hashf, ply = self[hash]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L30_C8", "label": "if", "type": "if", "loc": [30, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [4, 2, 0.4766, 0.0312, 2, 0.78, 0.4, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ply < depth:\n return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L31_C12", "label": "return", "type": "return", "loc": [31, 31], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L30_C8", "vector": [13, 3, 0.4844, 0.0156, 3, 0.27, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L32_C8", "label": "if", "type": "if", "loc": [32, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [4, 2, 0.5078, 0.0312, 2, 0.78, 0.6, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hashf == hashfEXACT:\n return move, score, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L33_C12", "label": "return", "type": "return", "loc": [33, 33], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L32_C8", "vector": [13, 3, 0.5156, 0.0156, 3, 0.54, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return move, score, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L34_C8", "label": "if", "type": "if", "loc": [34, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [4, 2, 0.5391, 0.0312, 2, 0.78, 0.8, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hashf == hashfALPHA and score <= alpha:\n return move, alpha, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L35_C12", "label": "return", "type": "return", "loc": [35, 35], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L34_C8", "vector": [13, 3, 0.5469, 0.0156, 3, 0.85, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return move, alpha, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L36_C8", "label": "if", "type": "if", "loc": [36, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "vector": [4, 2, 0.5703, 0.0312, 2, 0.78, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if hashf == hashfBETA and score >= beta:\n return move, beta, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L37_C12", "label": "return", "type": "return", "loc": [37, 37], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L36_C8", "vector": [13, 3, 0.5781, 0.0156, 3, 0.83, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return move, beta, hashf"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L39_C4", "label": "record", "type": "function", "loc": [39, 40], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.6172, 0.0312, 1, 0.05, 0.4286, 667, 0, 6, 0, 0, 0, 0, 0], "semantic": {"name": "record", "arg_names": ["self", "hash", "move", "score", "hashf", "ply"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def record (self, hash, move, score, hashf, ply):\n self[hash] = (move, score, hashf, ply)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L40_C8", "label": "assign", "type": "assigned_variable", "loc": [40, 40], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L39_C4", "vector": [14, 2, 0.625, 0.0156, 2, 0.93, 0.0, 0, 0, 0, 0, 0, 0, 8, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self[hash] = (move, score, hashf, ply)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L42_C4", "label": "add_killer", "type": "function", "loc": [42, 46], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.6875, 0.0781, 1, 0.05, 0.5714, 231, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "add_killer", "arg_names": ["self", "ply", "move"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def add_killer (self, ply, move):\n if self.killer1[ply] == -1:\n self.killer1[ply] = move\n elif move != self.killer1[ply]:\n self.killer2[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8", "label": "if", "type": "if", "loc": [43, 46], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L42_C4", "vector": [4, 2, 0.6953, 0.0625, 2, 0.48, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.killer1[ply] == -1:\n self.killer1[ply] = move\n elif move != self.killer1[ply]:\n self.killer2[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L44_C12", "label": "assign", "type": "assigned_variable", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8", "vector": [14, 3, 0.6875, 0.0156, 3, 0.92, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.killer1[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L45_C8", "label": "if", "type": "if", "loc": [45, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8", "vector": [4, 3, 0.7109, 0.0312, 3, 0.92, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif move != self.killer1[ply]:\n self.killer2[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L46_C12", "label": "assign", "type": "assigned_variable", "loc": [46, 46], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L45_C8", "vector": [14, 4, 0.7188, 0.0156, 4, 0.07, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.killer2[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "label": "is_killer", "type": "function", "loc": [48, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.8281, 0.1719, 1, 0.05, 0.7143, 393, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "is_killer", "arg_names": ["self", "ply", "move"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def is_killer (self, ply, move):\n if self.killer1[ply] == move:\n return 10\n elif self.killer2[ply] == move:\n return 8\n if ply >= 2:\n if self.killer1[ply-2] == move:\n return 6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8", "label": "if", "type": "if", "loc": [49, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "vector": [4, 2, 0.7891, 0.0625, 2, 0.18, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.killer1[ply] == move:\n return 10\n elif self.killer2[ply] == move:\n return 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L50_C12", "label": "return", "type": "return", "loc": [50, 50], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8", "vector": [13, 3, 0.7812, 0.0156, 3, 0.88, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 10"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L51_C8", "label": "if", "type": "if", "loc": [51, 52], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8", "vector": [4, 3, 0.8047, 0.0312, 3, 0.88, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.killer2[ply] == move:\n return 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L52_C12", "label": "return", "type": "return", "loc": [52, 52], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L51_C8", "vector": [13, 4, 0.8125, 0.0156, 4, 0.49, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 8"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L53_C8", "label": "if", "type": "if", "loc": [53, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "vector": [4, 2, 0.8594, 0.0781, 2, 0.18, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if ply >= 2:\n if self.killer1[ply-2] == move:\n return 6\n elif self.killer2[ply-2] == move:\n return 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12", "label": "if", "type": "if", "loc": [54, 57], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L53_C8", "vector": [4, 3, 0.8672, 0.0625, 3, 0.79, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.killer1[ply-2] == move:\n return 6\n elif self.killer2[ply-2] == move:\n return 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L55_C16", "label": "return", "type": "return", "loc": [55, 55], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12", "vector": [13, 4, 0.8594, 0.0156, 4, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 6"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:If_L56_C12", "label": "if", "type": "if", "loc": [56, 57], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12", "vector": [4, 4, 0.8828, 0.0312, 4, 0.21, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.killer2[ply-2] == move:\n return 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L57_C16", "label": "return", "type": "return", "loc": [57, 57], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:If_L56_C12", "vector": [13, 5, 0.8906, 0.0156, 5, 0.55, 0.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 4"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L58_C8", "label": "return", "type": "return", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "vector": [13, 2, 0.9062, 0.0156, 2, 0.18, 1.0, 0, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L60_C4", "label": "set_hash_move", "type": "function", "loc": [60, 61], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.9453, 0.0312, 1, 0.05, 0.8571, 928, 0, 3, 0, 0, 0, 0, 0], "semantic": {"name": "set_hash_move", "arg_names": ["self", "ply", "move"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def set_hash_move (self, ply, move):\n self.hashmove[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L61_C8", "label": "assign", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L60_C4", "vector": [14, 2, 0.9531, 0.0156, 2, 0.78, 0.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.hashmove[ply] = move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L63_C4", "label": "is_hash_move", "type": "function", "loc": [63, 64], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "vector": [2, 1, 0.9922, 0.0312, 1, 0.05, 1.0, 797, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "is_hash_move", "arg_names": ["self", "ply", "move"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def is_hash_move (self, ply, move):\n return self.hashmove[ply] == move"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L64_C8", "label": "return", "type": "return", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L63_C4", "vector": [13, 2, 1.0, 0.0156, 2, 0.46, 0.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.hashmove[ply] == move"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Expr_L5_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L7_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L4_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L16_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L17_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L17_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Try_L18_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L15_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Expr_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L27_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L27_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L28_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L30_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L31_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L32_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L33_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L34_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L34_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L35_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L26_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L36_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L37_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L39_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L39_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L40_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L42_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L42_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L43_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L45_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L45_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L46_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L50_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L49_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L51_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L51_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L52_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L53_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L53_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L55_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L54_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_369:If_L56_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:If_L56_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L57_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L48_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:ClassDef_L3_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L63_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_369:FunctionDef_L63_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_369:Return_L64_C8"}]
import re import sys from rules import Rules from document import DocNode class Parser(object): """ Parse the raw text and create a document object that can be converted into output using Emitter. A separate instance should be created for parsing a new document. The first parameter is the raw text to be parsed. An optional second argument is the Rules object to use. You can customize the parsing rules to enable optional features or extend the parser. """ def __init__(self, raw, rules=None): self.rules = rules or Rules() self.raw = raw self.root = DocNode('document', None) self.cur = self.root # The most recent document node self.text = None # The node to add inline characters to def _upto(self, node, kinds): """ Look up the tree to the first occurence of one of the listed kinds of nodes or root. Start at the node node. """ while node.parent is not None and not node.kind in kinds: node = node.parent return node # The _*_repl methods called for matches in regexps. Sometimes the # same method needs several names, because of group names in regexps. def _url_repl(self, groups): """Handle raw urls in text.""" if not groups.get('escaped_url'): # this url is NOT escaped target = groups.get('url_target', '') node = DocNode('link', self.cur) node.content = target DocNode('text', node, node.content) self.text = None else: # this url is escaped, we render it as text if self.text is None: self.text = DocNode('text', self.cur, u'') self.text.content += groups.get('url_target') def _link_repl(self, groups): """Handle all kinds of links.""" target = groups.get('link_target', '') text = (groups.get('link_text', '') or '').strip() parent = self.cur self.cur = DocNode('link', self.cur) self.cur.content = target self.text = None self.parse_re(text, self.rules.link_re) self.cur = parent self.text = None def _wiki_repl(self, groups): """Handle WikiWord links, if enabled.""" text = groups.get('wiki', '') node = DocNode('link', self.cur) node.content = text DocNode('text', node, node.content) self.text = None def _macro_repl(self, groups): """Handles macros using the placeholder syntax.""" name = groups.get('macro_name', '') text = (groups.get('macro_text', '') or '').strip() node = DocNode('macro', self.cur, name) node.args = groups.get('macro_args', '') or '' DocNode('text', node, text or name) self.text = None def _image_repl(self, groups): """Handles images and attachemnts included in the page.""" target = groups.get('image_target', '').strip() text = (groups.get('image_text', '') or '').strip() node = DocNode("image", self.cur, target) DocNode('text', node, text or node.content) self.text = None def _separator_repl(self, groups): self.cur = self._upto(self.cur, ('document', 'section', 'blockquote')) DocNode('separator', self.cur) def _item_repl(self, groups): bullet = groups.get('item_head', u'') text = groups.get('item_text', u'') if bullet[-1] == '#': kind = 'number_list' else: kind = 'bullet_list' level = len(bullet) lst = self.cur # Find a list of the same kind and level up the tree while (lst and not (lst.kind in ('number_list', 'bullet_list') and lst.level == level) and not lst.kind in ('document', 'section', 'blockquote')): lst = lst.parent if lst and lst.kind == kind: self.cur = lst else: # Create a new level of list self.cur = self._upto(self.cur, ('list_item', 'document', 'section', 'blockquote')) self.cur = DocNode(kind, self.cur) self.cur.level = level self.cur = DocNode('list_item', self.cur) self.parse_inline(text) self.text = None def _list_repl(self, groups): text = groups.get('list', u'') self.parse_re(text, self.rules.item_re) def _head_repl(self, groups): self.cur = self._upto(self.cur, ('document', 'section', 'blockquote')) node = DocNode('header', self.cur, groups.get('head_text', '').strip()) node.level = len(groups.get('head_head', ' ')) def _text_repl(self, groups): text = groups.get('text', '') if self.cur.kind in ('table', 'table_row', 'bullet_list', 'number_list'): self.cur = self._upto(self.cur, ('document', 'section', 'blockquote')) if self.cur.kind in ('document', 'section', 'blockquote'): self.cur = DocNode('paragraph', self.cur) else: text = u' ' + text self.parse_inline(text) if groups.get('break') and self.cur.kind in ('paragraph', 'emphasis', 'strong', 'code'): DocNode('break', self.cur, '') self.text = None _break_repl = _text_repl def _table_repl(self, groups): row = groups.get('table', '|').strip() self.cur = self._upto(self.cur, ( 'table', 'document', 'section', 'blockquote')) if self.cur.kind != 'table': self.cur = DocNode('table', self.cur) tb = self.cur tr = DocNode('table_row', tb) text = '' for m in self.rules.cell_re.finditer(row): cell = m.group('cell') if cell: self.cur = DocNode('table_cell', tr) self.text = None self.parse_inline(cell) else: cell = m.group('head') self.cur = DocNode('table_head', tr) self.text = DocNode('text', self.cur, u'') self.text.content = cell.strip('=') self.cur = tb self.text = None def _pre_repl(self, groups): self.cur = self._upto(self.cur, ('document', 'section', 'blockquote')) kind = groups.get('pre_kind', None) text = groups.get('pre_text', u'') def remove_tilde(m): return m.group('indent') + m.group('rest') text = self.rules.pre_escape_re.sub(remove_tilde, text) node = DocNode('preformatted', self.cur, text) node.sect = kind or '' self.text = None def _line_repl(self, groups): self.cur = self._upto(self.cur, ('document', 'section', 'blockquote')) def _code_repl(self, groups): DocNode('code', self.cur, groups.get('code_text', u'').strip()) self.text = None def _emph_repl(self, groups): if self.cur.kind != 'emphasis': self.cur = DocNode('emphasis', self.cur) else: self.cur = self._upto(self.cur, ('emphasis', )).parent self.text = None def _strong_repl(self, groups): if self.cur.kind != 'strong': self.cur = DocNode('strong', self.cur) else: self.cur = self._upto(self.cur, ('strong', )).parent self.text = None def _break_repl(self, groups): DocNode('break', self.cur, None) self.text = None def _escape_repl(self, groups): if self.text is None: self.text = DocNode('text', self.cur, u'') self.text.content += groups.get('escaped_char', u'') def _char_repl(self, groups): if self.text is None: self.text = DocNode('text', self.cur, u'') self.text.content += groups.get('char', u'') def parse_inline(self, raw): """Recognize inline elements inside blocks.""" self.parse_re(raw, self.rules.inline_re) def parse_re(self, raw, rules_re): """Parse a fragment according to the compiled rules.""" for match in rules_re.finditer(raw): groups = dict((k, v) for (k, v) in match.groupdict().iteritems() if v is not None) name = match.lastgroup function = getattr(self, '_%s_repl' % name) function(groups) def parse(self): """Parse the text given as self.raw and return DOM tree.""" self.parse_re(self.raw, self.rules.block_re) return self.root
ajibawa-2023/Python-Code-Large/train/row_370
168
242
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_370:Import_L1_C0", "label": "re import re", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 0, 0.66, 0.0, 540, 0, 1, 0, 0, 540, 0, 0], "semantic": {"name": "re", "arg_names": [], "import_names": ["re"], "rhs_call_name": "", "annotation": ""}, "snippet": "import re"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Import_L2_C0", "label": "sys import sys", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0083, 0.0041, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0], "semantic": {"name": "sys", "arg_names": [], "import_names": ["sys"], "rhs_call_name": "", "annotation": ""}, "snippet": "import sys"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:ImportFrom_L4_C0", "label": "from rules import Rules", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0165, 0.0041, 0, 0.66, 0.5, 85, 0, 1, 0, 0, 85, 0, 0], "semantic": {"name": "rules", "arg_names": [], "import_names": ["Rules"], "rhs_call_name": "", "annotation": ""}, "snippet": "from rules import Rules"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:ImportFrom_L5_C0", "label": "from document import DocNode", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0207, 0.0041, 0, 0.66, 0.75, 977, 0, 1, 0, 0, 977, 0, 0], "semantic": {"name": "document", "arg_names": [], "import_names": ["DocNode"], "rhs_call_name": "", "annotation": ""}, "snippet": "from document import DocNode"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "label": "Parser", "type": "class", "loc": [7, 242], "level": 0, "parent": null, "vector": [3, 0, 0.5145, 0.9752, 0, 0.66, 1.0, 717, 0, 25, 0, 0, 186, 0, 92], "semantic": {"name": "Parser", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Parser(object):\n \"\"\"\n Parse the raw text and create a document object\n that can be converted into output using Emitter.\n\n A separate instance should be created for parsing a new document.\n The first parameter is the raw text to be parsed. An optional second\n argument is the Rules object to use. You can customize the parsing"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L8_C4", "label": "expression", "type": "expression", "loc": [8, 16], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [8, 1, 0.0496, 0.0372, 1, 0.36, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Parse the raw text and create a document object\n that can be converted into output using Emitter.\n\n A separate instance should be created for parsing a new document.\n The first parameter is the raw text to be parsed. An optional second\n argument is the Rules object to use. You can customize the parsing\n rules to enable optional features or extend the parser."}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "label": "__init__", "type": "function", "loc": [18, 23], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.0847, 0.0248, 1, 0.36, 0.04, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "raw", "rules"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, raw, rules=None):\n self.rules = rules or Rules()\n self.raw = raw\n self.root = DocNode('document', None)\n self.cur = self.root # The most recent document node\n self.text = None # The node to add inline characters to"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L19_C8", "label": "self.rules =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "vector": [14, 2, 0.0785, 0.0041, 2, 0.52, 0.0, 910, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.rules", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.rules = rules or Rules()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L20_C8", "label": "self.raw =", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "vector": [14, 2, 0.0826, 0.0041, 2, 0.52, 0.25, 22, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.raw", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.raw = raw"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L21_C8", "label": "self.root = DocNode()", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "vector": [14, 2, 0.0868, 0.0041, 2, 0.52, 0.5, 81, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.root", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.root = DocNode('document', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L22_C8", "label": "self.cur =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "vector": [14, 2, 0.0909, 0.0041, 2, 0.52, 0.75, 984, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = self.root # The most recent document node"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L23_C8", "label": "self.text =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "vector": [14, 2, 0.095, 0.0041, 2, 0.52, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None # The node to add inline characters to"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "label": "_upto", "type": "function", "loc": [25, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.1198, 0.0372, 1, 0.36, 0.08, 207, 0, 3, 1, 0, 0, 0, 0], "semantic": {"name": "_upto", "arg_names": ["self", "node", "kinds"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _upto(self, node, kinds):\n \"\"\"\n Look up the tree to the first occurence\n of one of the listed kinds of nodes or root.\n Start at the node node.\n \"\"\"\n while node.parent is not None and not node.kind in kinds:\n node = node.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L26_C8", "label": "expression", "type": "expression", "loc": [26, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "vector": [8, 2, 0.1157, 0.0207, 2, 0.78, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Look up the tree to the first occurence\n of one of the listed kinds of nodes or root.\n Start at the node node.\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:While_L31_C8", "label": "while", "type": "while", "loc": [31, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "vector": [5, 2, 0.1302, 0.0083, 2, 0.78, 0.5, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while node.parent is not None and not node.kind in kinds:\n node = node.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L32_C12", "label": "node =", "type": "assigned_variable", "loc": [32, 32], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:While_L31_C8", "vector": [14, 3, 0.1322, 0.0041, 3, 0.31, 0.0, 772, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " node = node.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L33_C8", "label": "return", "type": "return", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "vector": [13, 2, 0.1364, 0.0041, 2, 0.78, 1.0, 0, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return node"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4", "label": "_url_repl", "type": "function", "loc": [38, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.186, 0.062, 1, 0.36, 0.12, 872, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_url_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _url_repl(self, groups):\n \"\"\"Handle raw urls in text.\"\"\"\n\n if not groups.get('escaped_url'):\n # this url is NOT escaped\n target = groups.get('url_target', '')\n node = DocNode('link', self.cur)\n node.content = target"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L39_C8", "label": "expression", "type": "expression", "loc": [39, 39], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4", "vector": [8, 2, 0.1612, 0.0041, 2, 0.18, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handle raw urls in text.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "label": "if", "type": "if", "loc": [41, 52], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4", "vector": [4, 2, 0.1921, 0.0496, 2, 0.18, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not groups.get('escaped_url'):\n # this url is NOT escaped\n target = groups.get('url_target', '')\n node = DocNode('link', self.cur)\n node.content = target\n DocNode('text', node, node.content)\n self.text = None\n else:"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L43_C12", "label": "target = get()", "type": "assigned_variable", "loc": [43, 43], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [14, 3, 0.1777, 0.0041, 3, 0.5, 0.0, 766, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " target = groups.get('url_target', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L44_C12", "label": "node = DocNode()", "type": "assigned_variable", "loc": [44, 44], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [14, 3, 0.1818, 0.0041, 3, 0.5, 0.2, 772, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode('link', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L45_C12", "label": "node.content =", "type": "assigned_variable", "loc": [45, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [14, 3, 0.186, 0.0041, 3, 0.5, 0.4, 112, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "node.content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " node.content = target"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L46_C12", "label": "DocNode()", "type": "expression", "loc": [46, 46], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [8, 3, 0.1901, 0.0041, 3, 0.5, 0.6, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('text', node, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L47_C12", "label": "self.text =", "type": "assigned_variable", "loc": [47, 47], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [14, 3, 0.1942, 0.0041, 3, 0.5, 0.8, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L50_C12", "label": "if", "type": "if", "loc": [50, 51], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "vector": [4, 3, 0.2087, 0.0083, 3, 0.5, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.text is None:\n self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L51_C16", "label": "self.text = DocNode()", "type": "assigned_variable", "loc": [51, 51], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L50_C12", "vector": [14, 4, 0.2107, 0.0041, 4, 0.05, 0.0, 320, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "label": "_link_repl", "type": "function", "loc": [54, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.2459, 0.0496, 1, 0.36, 0.16, 245, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "_link_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _link_repl(self, groups):\n \"\"\"Handle all kinds of links.\"\"\"\n\n target = groups.get('link_target', '')\n text = (groups.get('link_text', '') or '').strip()\n parent = self.cur\n self.cur = DocNode('link', self.cur)\n self.cur.content = target"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L55_C8", "label": "expression", "type": "expression", "loc": [55, 55], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [8, 2, 0.2273, 0.0041, 2, 0.41, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handle all kinds of links.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L57_C8", "label": "target = get()", "type": "assigned_variable", "loc": [57, 57], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2355, 0.0041, 2, 0.41, 0.1111, 766, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " target = groups.get('link_target', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L58_C8", "label": "text = strip()", "type": "assigned_variable", "loc": [58, 58], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2397, 0.0041, 2, 0.41, 0.2222, 439, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " text = (groups.get('link_text', '') or '').strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L59_C8", "label": "parent =", "type": "assigned_variable", "loc": [59, 59], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2438, 0.0041, 2, 0.41, 0.3333, 80, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "parent", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " parent = self.cur"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L60_C8", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [60, 60], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2479, 0.0041, 2, 0.41, 0.4444, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('link', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L61_C8", "label": "self.cur.content =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2521, 0.0041, 2, 0.41, 0.5556, 575, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur.content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur.content = target"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L62_C8", "label": "self.text =", "type": "assigned_variable", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2562, 0.0041, 2, 0.41, 0.6667, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L63_C8", "label": "parse_re()", "type": "expression", "loc": [63, 63], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [8, 2, 0.2603, 0.0041, 2, 0.41, 0.7778, 33, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "parse_re", "arg_names": [], "import_names": [], "rhs_call_name": "parse_re", "annotation": ""}, "snippet": " self.parse_re(text, self.rules.link_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L64_C8", "label": "self.cur =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2645, 0.0041, 2, 0.41, 0.8889, 984, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L65_C8", "label": "self.text =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "vector": [14, 2, 0.2686, 0.0041, 2, 0.41, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "label": "_wiki_repl", "type": "function", "loc": [67, 74], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.2913, 0.0331, 1, 0.36, 0.2, 802, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "_wiki_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _wiki_repl(self, groups):\n \"\"\"Handle WikiWord links, if enabled.\"\"\"\n\n text = groups.get('wiki', '')\n node = DocNode('link', self.cur)\n node.content = text\n DocNode('text', node, node.content)\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L68_C8", "label": "expression", "type": "expression", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [8, 2, 0.281, 0.0041, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handle WikiWord links, if enabled.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L70_C8", "label": "text = get()", "type": "assigned_variable", "loc": [70, 70], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [14, 2, 0.2893, 0.0041, 2, 0.79, 0.2, 439, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " text = groups.get('wiki', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L71_C8", "label": "node = DocNode()", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [14, 2, 0.2934, 0.0041, 2, 0.79, 0.4, 772, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode('link', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L72_C8", "label": "node.content =", "type": "assigned_variable", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [14, 2, 0.2975, 0.0041, 2, 0.79, 0.6, 112, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "node.content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " node.content = text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L73_C8", "label": "DocNode()", "type": "expression", "loc": [73, 73], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [8, 2, 0.3017, 0.0041, 2, 0.79, 0.8, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('text', node, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L74_C8", "label": "self.text =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "vector": [14, 2, 0.3058, 0.0041, 2, 0.79, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "label": "_macro_repl", "type": "function", "loc": [76, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.3306, 0.0372, 1, 0.36, 0.24, 344, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_macro_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _macro_repl(self, groups):\n \"\"\"Handles macros using the placeholder syntax.\"\"\"\n\n name = groups.get('macro_name', '')\n text = (groups.get('macro_text', '') or '').strip()\n node = DocNode('macro', self.cur, name)\n node.args = groups.get('macro_args', '') or ''\n DocNode('text', node, text or name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L77_C8", "label": "expression", "type": "expression", "loc": [77, 77], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [8, 2, 0.3182, 0.0041, 2, 0.44, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handles macros using the placeholder syntax.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L79_C8", "label": "name = get()", "type": "assigned_variable", "loc": [79, 79], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [14, 2, 0.3264, 0.0041, 2, 0.44, 0.1667, 57, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " name = groups.get('macro_name', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L80_C8", "label": "text = strip()", "type": "assigned_variable", "loc": [80, 80], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [14, 2, 0.3306, 0.0041, 2, 0.44, 0.3333, 439, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " text = (groups.get('macro_text', '') or '').strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L81_C8", "label": "node = DocNode()", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [14, 2, 0.3347, 0.0041, 2, 0.44, 0.5, 772, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode('macro', self.cur, name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L82_C8", "label": "node.args =", "type": "assigned_variable", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [14, 2, 0.3388, 0.0041, 2, 0.44, 0.6667, 224, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "node.args", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " node.args = groups.get('macro_args', '') or ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L83_C8", "label": "DocNode()", "type": "expression", "loc": [83, 83], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [8, 2, 0.343, 0.0041, 2, 0.44, 0.8333, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('text', node, text or name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L84_C8", "label": "self.text =", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "vector": [14, 2, 0.3471, 0.0041, 2, 0.44, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "label": "_image_repl", "type": "function", "loc": [86, 93], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.3698, 0.0331, 1, 0.36, 0.28, 387, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_image_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _image_repl(self, groups):\n \"\"\"Handles images and attachemnts included in the page.\"\"\"\n\n target = groups.get('image_target', '').strip()\n text = (groups.get('image_text', '') or '').strip()\n node = DocNode(\"image\", self.cur, target)\n DocNode('text', node, text or node.content)\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L87_C8", "label": "expression", "type": "expression", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [8, 2, 0.3595, 0.0041, 2, 0.38, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Handles images and attachemnts included in the page.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L89_C8", "label": "target = strip()", "type": "assigned_variable", "loc": [89, 89], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [14, 2, 0.3678, 0.0041, 2, 0.38, 0.2, 766, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "target", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " target = groups.get('image_target', '').strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L90_C8", "label": "text = strip()", "type": "assigned_variable", "loc": [90, 90], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [14, 2, 0.3719, 0.0041, 2, 0.38, 0.4, 439, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " text = (groups.get('image_text', '') or '').strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L91_C8", "label": "node = DocNode()", "type": "assigned_variable", "loc": [91, 91], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [14, 2, 0.376, 0.0041, 2, 0.38, 0.6, 772, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode(\"image\", self.cur, target)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L92_C8", "label": "DocNode()", "type": "expression", "loc": [92, 92], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [8, 2, 0.3802, 0.0041, 2, 0.38, 0.8, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('text', node, text or node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L93_C8", "label": "self.text =", "type": "assigned_variable", "loc": [93, 93], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "vector": [14, 2, 0.3843, 0.0041, 2, 0.38, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4", "label": "_separator_repl", "type": "function", "loc": [95, 97], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.3967, 0.0124, 1, 0.36, 0.32, 253, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_separator_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _separator_repl(self, groups):\n self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))\n DocNode('separator', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L96_C8", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [96, 96], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4", "vector": [14, 2, 0.3967, 0.0041, 2, 0.51, 0.0, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L97_C8", "label": "DocNode()", "type": "expression", "loc": [97, 97], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4", "vector": [8, 2, 0.4008, 0.0041, 2, 0.51, 1.0, 61, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('separator', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "label": "_item_repl", "type": "function", "loc": [99, 124], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.4607, 0.1074, 1, 0.36, 0.36, 648, 0, 2, 0, 0, 0, 0, 7], "semantic": {"name": "_item_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _item_repl(self, groups):\n bullet = groups.get('item_head', u'')\n text = groups.get('item_text', u'')\n if bullet[-1] == '#':\n kind = 'number_list'\n else:\n kind = 'bullet_list'\n level = len(bullet)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L100_C8", "label": "bullet = get()", "type": "assigned_variable", "loc": [100, 100], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.4132, 0.0041, 2, 0.67, 0.0, 948, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "bullet", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " bullet = groups.get('item_head', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L101_C8", "label": "text = get()", "type": "assigned_variable", "loc": [101, 101], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.4174, 0.0041, 2, 0.67, 0.1111, 439, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " text = groups.get('item_text', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8", "label": "if", "type": "if", "loc": [102, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [4, 2, 0.4277, 0.0165, 2, 0.67, 0.2222, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if bullet[-1] == '#':\n kind = 'number_list'\n else:\n kind = 'bullet_list'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L103_C12", "label": "kind =", "type": "assigned_variable", "loc": [103, 103], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8", "vector": [14, 3, 0.4256, 0.0041, 3, 0.44, 0.0, 752, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "kind", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kind = 'number_list'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L105_C12", "label": "kind =", "type": "assigned_variable", "loc": [105, 105], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8", "vector": [14, 3, 0.4339, 0.0041, 3, 0.44, 1.0, 752, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "kind", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " kind = 'bullet_list'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L106_C8", "label": "level = len()", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.438, 0.0041, 2, 0.67, 0.3333, 479, 3, 1, 0, 0, 890, 10, 1], "semantic": {"name": "level", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " level = len(bullet)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L107_C8", "label": "lst =", "type": "assigned_variable", "loc": [107, 107], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.4421, 0.0041, 2, 0.67, 0.4444, 564, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lst = self.cur"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:While_L109_C8", "label": "while", "type": "while", "loc": [109, 113], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [5, 2, 0.4587, 0.0207, 2, 0.67, 0.5556, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " while (lst and\n not (lst.kind in ('number_list', 'bullet_list') and\n lst.level == level) and\n not lst.kind in ('document', 'section', 'blockquote')):\n lst = lst.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L113_C12", "label": "lst =", "type": "assigned_variable", "loc": [113, 113], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:While_L109_C8", "vector": [14, 3, 0.4669, 0.0041, 3, 0.67, 0.0, 564, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "lst", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " lst = lst.parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "label": "if", "type": "if", "loc": [114, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [4, 2, 0.4855, 0.0331, 2, 0.67, 0.6667, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if lst and lst.kind == kind:\n self.cur = lst\n else:\n # Create a new level of list\n self.cur = self._upto(self.cur,\n ('list_item', 'document', 'section', 'blockquote'))\n self.cur = DocNode(kind, self.cur)\n self.cur.level = level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L115_C12", "label": "self.cur =", "type": "assigned_variable", "loc": [115, 115], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "vector": [14, 3, 0.4752, 0.0041, 3, 0.24, 0.0, 984, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = lst"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L118_C12", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [118, 119], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "vector": [14, 3, 0.4897, 0.0083, 3, 0.24, 0.3333, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur,\n ('list_item', 'document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L120_C12", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [120, 120], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "vector": [14, 3, 0.4959, 0.0041, 3, 0.24, 0.6667, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode(kind, self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L121_C12", "label": "self.cur.level =", "type": "assigned_variable", "loc": [121, 121], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "vector": [14, 3, 0.5, 0.0041, 3, 0.24, 1.0, 816, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur.level", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur.level = level"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L122_C8", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.5041, 0.0041, 2, 0.67, 0.7778, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('list_item', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L123_C8", "label": "parse_inline()", "type": "expression", "loc": [123, 123], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [8, 2, 0.5083, 0.0041, 2, 0.67, 0.8889, 580, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parse_inline", "arg_names": [], "import_names": [], "rhs_call_name": "parse_inline", "annotation": ""}, "snippet": " self.parse_inline(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L124_C8", "label": "self.text =", "type": "assigned_variable", "loc": [124, 124], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "vector": [14, 2, 0.5124, 0.0041, 2, 0.67, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4", "label": "_list_repl", "type": "function", "loc": [126, 128], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.5248, 0.0124, 1, 0.36, 0.4, 581, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_list_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _list_repl(self, groups):\n text = groups.get('list', u'')\n self.parse_re(text, self.rules.item_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L127_C8", "label": "text = get()", "type": "assigned_variable", "loc": [127, 127], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4", "vector": [14, 2, 0.5248, 0.0041, 2, 0.86, 0.0, 439, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " text = groups.get('list', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L128_C8", "label": "parse_re()", "type": "expression", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4", "vector": [8, 2, 0.5289, 0.0041, 2, 0.86, 1.0, 33, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "parse_re", "arg_names": [], "import_names": [], "rhs_call_name": "parse_re", "annotation": ""}, "snippet": " self.parse_re(text, self.rules.item_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "label": "_head_repl", "type": "function", "loc": [130, 133], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.5434, 0.0165, 1, 0.36, 0.44, 222, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_head_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _head_repl(self, groups):\n self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))\n node = DocNode('header', self.cur, groups.get('head_text', '').strip())\n node.level = len(groups.get('head_head', ' '))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L131_C8", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [131, 131], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "vector": [14, 2, 0.5413, 0.0041, 2, 0.68, 0.0, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L132_C8", "label": "node = DocNode()", "type": "assigned_variable", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "vector": [14, 2, 0.5455, 0.0041, 2, 0.68, 0.5, 772, 3, 3, 0, 0, 61, 10, 3], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode('header', self.cur, groups.get('head_text', '').strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L133_C8", "label": "node.level = len()", "type": "assigned_variable", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "vector": [14, 2, 0.5496, 0.0041, 2, 0.68, 1.0, 492, 3, 1, 0, 0, 890, 10, 2], "semantic": {"name": "node.level", "arg_names": [], "import_names": [], "rhs_call_name": "len", "annotation": ""}, "snippet": " node.level = len(groups.get('head_head', ' '))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "label": "_text_repl", "type": "function", "loc": [135, 149], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.5868, 0.062, 1, 0.36, 0.48, 517, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "_text_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _text_repl(self, groups):\n text = groups.get('text', '')\n if self.cur.kind in ('table', 'table_row', 'bullet_list',\n 'number_list'):\n self.cur = self._upto(self.cur,\n ('document', 'section', 'blockquote'))\n if self.cur.kind in ('document', 'section', 'blockquote'):\n self.cur = DocNode('paragraph', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L136_C8", "label": "text = get()", "type": "assigned_variable", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [14, 2, 0.562, 0.0041, 2, 0.89, 0.0, 439, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " text = groups.get('text', '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L137_C8", "label": "if", "type": "if", "loc": [137, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [4, 2, 0.5723, 0.0165, 2, 0.89, 0.2, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.cur.kind in ('table', 'table_row', 'bullet_list',\n 'number_list'):\n self.cur = self._upto(self.cur,\n ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L139_C12", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [139, 140], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L137_C8", "vector": [14, 3, 0.5764, 0.0083, 3, 0.82, 0.0, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur,\n ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8", "label": "if", "type": "if", "loc": [141, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [4, 2, 0.5888, 0.0165, 2, 0.89, 0.4, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.cur.kind in ('document', 'section', 'blockquote'):\n self.cur = DocNode('paragraph', self.cur)\n else:\n text = u' ' + text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L142_C12", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [142, 142], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8", "vector": [14, 3, 0.5868, 0.0041, 3, 0.77, 0.0, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('paragraph', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L144_C12", "label": "text =", "type": "assigned_variable", "loc": [144, 144], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8", "vector": [14, 3, 0.595, 0.0041, 3, 0.77, 1.0, 439, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = u' ' + text"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L145_C8", "label": "parse_inline()", "type": "expression", "loc": [145, 145], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [8, 2, 0.5992, 0.0041, 2, 0.89, 0.6, 580, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parse_inline", "arg_names": [], "import_names": [], "rhs_call_name": "parse_inline", "annotation": ""}, "snippet": " self.parse_inline(text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L146_C8", "label": "if", "type": "if", "loc": [146, 148], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [4, 2, 0.6074, 0.0124, 2, 0.89, 0.8, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if groups.get('break') and self.cur.kind in ('paragraph',\n 'emphasis', 'strong', 'code'):\n DocNode('break', self.cur, '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L148_C12", "label": "DocNode()", "type": "expression", "loc": [148, 148], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L146_C8", "vector": [8, 3, 0.6116, 0.0041, 3, 0.79, 0.0, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('break', self.cur, '')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L149_C8", "label": "self.text =", "type": "assigned_variable", "loc": [149, 149], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "vector": [14, 2, 0.6157, 0.0041, 2, 0.89, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L150_C4", "label": "_break_repl =", "type": "assigned_variable", "loc": [150, 150], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [14, 1, 0.6198, 0.0041, 1, 0.36, 0.52, 793, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "_break_repl", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " _break_repl = _text_repl"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "label": "_table_repl", "type": "function", "loc": [152, 174], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.6736, 0.095, 1, 0.36, 0.56, 304, 0, 2, 0, 0, 0, 0, 13], "semantic": {"name": "_table_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _table_repl(self, groups):\n row = groups.get('table', '|').strip()\n self.cur = self._upto(self.cur, (\n 'table', 'document', 'section', 'blockquote'))\n if self.cur.kind != 'table':\n self.cur = DocNode('table', self.cur)\n tb = self.cur\n tr = DocNode('table_row', tb)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L153_C8", "label": "row = strip()", "type": "assigned_variable", "loc": [153, 153], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.6322, 0.0041, 2, 0.7, 0.0, 767, 3, 0, 0, 0, 973, 10, 2], "semantic": {"name": "row", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " row = groups.get('table', '|').strip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L154_C8", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [154, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.6384, 0.0083, 2, 0.7, 0.125, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, (\n 'table', 'document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L156_C8", "label": "if", "type": "if", "loc": [156, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [4, 2, 0.6467, 0.0083, 2, 0.7, 0.25, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.cur.kind != 'table':\n self.cur = DocNode('table', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L157_C12", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L156_C8", "vector": [14, 3, 0.6488, 0.0041, 3, 0.83, 0.0, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('table', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L158_C8", "label": "tb =", "type": "assigned_variable", "loc": [158, 158], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.6529, 0.0041, 2, 0.7, 0.375, 469, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "tb", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " tb = self.cur"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L159_C8", "label": "tr = DocNode()", "type": "assigned_variable", "loc": [159, 159], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.657, 0.0041, 2, 0.7, 0.5, 319, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "tr", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " tr = DocNode('table_row', tb)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L161_C8", "label": "text =", "type": "assigned_variable", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.6653, 0.0041, 2, 0.7, 0.625, 439, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " text = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8", "label": "for m", "type": "for", "loc": [162, 172], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [6, 2, 0.6901, 0.0455, 2, 0.7, 0.75, 711, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "m", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for m in self.rules.cell_re.finditer(row):\n cell = m.group('cell')\n if cell:\n self.cur = DocNode('table_cell', tr)\n self.text = None\n self.parse_inline(cell)\n else:\n cell = m.group('head')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L163_C12", "label": "cell = group()", "type": "assigned_variable", "loc": [163, 163], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8", "vector": [14, 3, 0.6736, 0.0041, 3, 0.88, 0.0, 787, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "cell", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " cell = m.group('cell')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "label": "if", "type": "if", "loc": [164, 172], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8", "vector": [4, 3, 0.6942, 0.0372, 3, 0.88, 1.0, 0, 2, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if cell:\n self.cur = DocNode('table_cell', tr)\n self.text = None\n self.parse_inline(cell)\n else:\n cell = m.group('head')\n self.cur = DocNode('table_head', tr)\n self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L165_C16", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [165, 165], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.6818, 0.0041, 4, 0.27, 0.0, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('table_cell', tr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L166_C16", "label": "self.text =", "type": "assigned_variable", "loc": [166, 166], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.686, 0.0041, 4, 0.27, 0.1667, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L167_C16", "label": "parse_inline()", "type": "expression", "loc": [167, 167], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [8, 4, 0.6901, 0.0041, 4, 0.27, 0.3333, 580, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "parse_inline", "arg_names": [], "import_names": [], "rhs_call_name": "parse_inline", "annotation": ""}, "snippet": " self.parse_inline(cell)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L169_C16", "label": "cell = group()", "type": "assigned_variable", "loc": [169, 169], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.6983, 0.0041, 4, 0.27, 0.5, 787, 3, 1, 0, 0, 43, 10, 1], "semantic": {"name": "cell", "arg_names": [], "import_names": [], "rhs_call_name": "group", "annotation": ""}, "snippet": " cell = m.group('head')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L170_C16", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [170, 170], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.7025, 0.0041, 4, 0.27, 0.6667, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('table_head', tr)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L171_C16", "label": "self.text = DocNode()", "type": "assigned_variable", "loc": [171, 171], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.7066, 0.0041, 4, 0.27, 0.8333, 320, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L172_C16", "label": "self.text.content = strip()", "type": "assigned_variable", "loc": [172, 172], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "vector": [14, 4, 0.7107, 0.0041, 4, 0.27, 1.0, 710, 3, 1, 0, 0, 973, 10, 1], "semantic": {"name": "self.text.content", "arg_names": [], "import_names": [], "rhs_call_name": "strip", "annotation": ""}, "snippet": " self.text.content = cell.strip('=')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L173_C8", "label": "self.cur =", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.7149, 0.0041, 2, 0.7, 0.875, 984, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = tb"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L174_C8", "label": "self.text =", "type": "assigned_variable", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "vector": [14, 2, 0.719, 0.0041, 2, 0.7, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "label": "_pre_repl", "type": "function", "loc": [176, 185], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.7459, 0.0413, 1, 0.36, 0.6, 21, 0, 2, 1, 0, 0, 0, 7], "semantic": {"name": "_pre_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _pre_repl(self, groups):\n self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))\n kind = groups.get('pre_kind', None)\n text = groups.get('pre_text', u'')\n def remove_tilde(m):\n return m.group('indent') + m.group('rest')\n text = self.rules.pre_escape_re.sub(remove_tilde, text)\n node = DocNode('preformatted', self.cur, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L177_C8", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [177, 177], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7314, 0.0041, 2, 0.53, 0.0, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L178_C8", "label": "kind = get()", "type": "assigned_variable", "loc": [178, 178], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7355, 0.0041, 2, 0.53, 0.1429, 752, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "kind", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " kind = groups.get('pre_kind', None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L179_C8", "label": "text = get()", "type": "assigned_variable", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7397, 0.0041, 2, 0.53, 0.2857, 439, 3, 2, 0, 0, 607, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " text = groups.get('pre_text', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L180_C8", "label": "remove_tilde", "type": "function", "loc": [180, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [2, 2, 0.7459, 0.0083, 2, 0.53, 0.4286, 270, 0, 1, 1, 0, 0, 0, 2], "semantic": {"name": "remove_tilde", "arg_names": ["m"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def remove_tilde(m):\n return m.group('indent') + m.group('rest')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L181_C12", "label": "return", "type": "return", "loc": [181, 181], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L180_C8", "vector": [13, 3, 0.7479, 0.0041, 3, 0.99, 0.0, 0, 4, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return m.group('indent') + m.group('rest')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L182_C8", "label": "text = sub()", "type": "assigned_variable", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7521, 0.0041, 2, 0.53, 0.5714, 439, 3, 2, 0, 0, 819, 10, 1], "semantic": {"name": "text", "arg_names": [], "import_names": [], "rhs_call_name": "sub", "annotation": ""}, "snippet": " text = self.rules.pre_escape_re.sub(remove_tilde, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L183_C8", "label": "node = DocNode()", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7562, 0.0041, 2, 0.53, 0.7143, 772, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "node", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " node = DocNode('preformatted', self.cur, text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L184_C8", "label": "node.sect =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7603, 0.0041, 2, 0.53, 0.8571, 657, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "node.sect", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " node.sect = kind or ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L185_C8", "label": "self.text =", "type": "assigned_variable", "loc": [185, 185], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "vector": [14, 2, 0.7645, 0.0041, 2, 0.53, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L187_C4", "label": "_line_repl", "type": "function", "loc": [187, 188], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.7748, 0.0083, 1, 0.36, 0.64, 187, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_line_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _line_repl(self, groups):\n self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L188_C8", "label": "self.cur = _upto()", "type": "assigned_variable", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L187_C4", "vector": [14, 2, 0.7769, 0.0041, 2, 0.28, 0.0, 984, 3, 2, 0, 0, 207, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "_upto", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('document', 'section', 'blockquote'))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4", "label": "_code_repl", "type": "function", "loc": [190, 192], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.7893, 0.0124, 1, 0.36, 0.68, 753, 0, 2, 0, 0, 0, 0, 3], "semantic": {"name": "_code_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _code_repl(self, groups):\n DocNode('code', self.cur, groups.get('code_text', u'').strip())\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L191_C8", "label": "DocNode()", "type": "expression", "loc": [191, 191], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4", "vector": [8, 2, 0.7893, 0.0041, 2, 0.99, 0.0, 61, 3, 3, 0, 0, 0, 0, 3], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('code', self.cur, groups.get('code_text', u'').strip())"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L192_C8", "label": "self.text =", "type": "assigned_variable", "loc": [192, 192], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4", "vector": [14, 2, 0.7934, 0.0041, 2, 0.99, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4", "label": "_emph_repl", "type": "function", "loc": [194, 199], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.812, 0.0248, 1, 0.36, 0.72, 135, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_emph_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _emph_repl(self, groups):\n if self.cur.kind != 'emphasis':\n self.cur = DocNode('emphasis', self.cur)\n else:\n self.cur = self._upto(self.cur, ('emphasis', )).parent\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8", "label": "if", "type": "if", "loc": [195, 198], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4", "vector": [4, 2, 0.812, 0.0165, 2, 0.95, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.cur.kind != 'emphasis':\n self.cur = DocNode('emphasis', self.cur)\n else:\n self.cur = self._upto(self.cur, ('emphasis', )).parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L196_C12", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [196, 196], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8", "vector": [14, 3, 0.8099, 0.0041, 3, 0.17, 0.0, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('emphasis', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L198_C12", "label": "self.cur =", "type": "assigned_variable", "loc": [198, 198], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8", "vector": [14, 3, 0.8182, 0.0041, 3, 0.17, 1.0, 984, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('emphasis', )).parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L199_C8", "label": "self.text =", "type": "assigned_variable", "loc": [199, 199], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4", "vector": [14, 2, 0.8223, 0.0041, 2, 0.95, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4", "label": "_strong_repl", "type": "function", "loc": [201, 206], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.8409, 0.0248, 1, 0.36, 0.76, 326, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_strong_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _strong_repl(self, groups):\n if self.cur.kind != 'strong':\n self.cur = DocNode('strong', self.cur)\n else:\n self.cur = self._upto(self.cur, ('strong', )).parent\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8", "label": "if", "type": "if", "loc": [202, 205], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4", "vector": [4, 2, 0.8409, 0.0165, 2, 0.94, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.cur.kind != 'strong':\n self.cur = DocNode('strong', self.cur)\n else:\n self.cur = self._upto(self.cur, ('strong', )).parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L203_C12", "label": "self.cur = DocNode()", "type": "assigned_variable", "loc": [203, 203], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8", "vector": [14, 3, 0.8388, 0.0041, 3, 0.31, 0.0, 984, 3, 2, 0, 0, 61, 10, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.cur = DocNode('strong', self.cur)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L205_C12", "label": "self.cur =", "type": "assigned_variable", "loc": [205, 205], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8", "vector": [14, 3, 0.8471, 0.0041, 3, 0.31, 1.0, 984, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.cur", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.cur = self._upto(self.cur, ('strong', )).parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L206_C8", "label": "self.text =", "type": "assigned_variable", "loc": [206, 206], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4", "vector": [14, 2, 0.8512, 0.0041, 2, 0.94, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4", "label": "_break_repl", "type": "function", "loc": [208, 210], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.8636, 0.0124, 1, 0.36, 0.8, 793, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "_break_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _break_repl(self, groups):\n DocNode('break', self.cur, None)\n self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L209_C8", "label": "DocNode()", "type": "expression", "loc": [209, 209], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4", "vector": [8, 2, 0.8636, 0.0041, 2, 0.33, 0.0, 61, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "DocNode", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " DocNode('break', self.cur, None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L210_C8", "label": "self.text =", "type": "assigned_variable", "loc": [210, 210], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4", "vector": [14, 2, 0.8678, 0.0041, 2, 0.33, 1.0, 320, 1, 0, 0, 0, 0, 9, 0], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.text = None"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L212_C4", "label": "_escape_repl", "type": "function", "loc": [212, 215], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.8822, 0.0165, 1, 0.36, 0.84, 590, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_escape_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _escape_repl(self, groups):\n if self.text is None:\n self.text = DocNode('text', self.cur, u'')\n self.text.content += groups.get('escaped_char', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L213_C8", "label": "if", "type": "if", "loc": [213, 214], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L212_C4", "vector": [4, 2, 0.8822, 0.0083, 2, 0.06, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.text is None:\n self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L214_C12", "label": "self.text = DocNode()", "type": "assigned_variable", "loc": [214, 214], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L213_C8", "vector": [14, 3, 0.8843, 0.0041, 3, 0.78, 0.0, 320, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L217_C4", "label": "_char_repl", "type": "function", "loc": [217, 220], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.9029, 0.0165, 1, 0.36, 0.88, 799, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "_char_repl", "arg_names": ["self", "groups"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _char_repl(self, groups):\n if self.text is None:\n self.text = DocNode('text', self.cur, u'')\n self.text.content += groups.get('char', u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:If_L218_C8", "label": "if", "type": "if", "loc": [218, 219], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L217_C4", "vector": [4, 2, 0.9029, 0.0083, 2, 0.13, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.text is None:\n self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L219_C12", "label": "self.text = DocNode()", "type": "assigned_variable", "loc": [219, 219], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:If_L218_C8", "vector": [14, 3, 0.905, 0.0041, 3, 0.86, 0.0, 320, 3, 3, 0, 0, 61, 10, 1], "semantic": {"name": "self.text", "arg_names": [], "import_names": [], "rhs_call_name": "DocNode", "annotation": ""}, "snippet": " self.text = DocNode('text', self.cur, u'')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4", "label": "parse_inline", "type": "function", "loc": [222, 225], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.9236, 0.0165, 1, 0.36, 0.92, 580, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "parse_inline", "arg_names": ["self", "raw"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parse_inline(self, raw):\n \"\"\"Recognize inline elements inside blocks.\"\"\"\n\n self.parse_re(raw, self.rules.inline_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L223_C8", "label": "expression", "type": "expression", "loc": [223, 223], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4", "vector": [8, 2, 0.9215, 0.0041, 2, 0.53, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Recognize inline elements inside blocks.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L225_C8", "label": "parse_re()", "type": "expression", "loc": [225, 225], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4", "vector": [8, 2, 0.9298, 0.0041, 2, 0.53, 1.0, 33, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "parse_re", "arg_names": [], "import_names": [], "rhs_call_name": "parse_re", "annotation": ""}, "snippet": " self.parse_re(raw, self.rules.inline_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4", "label": "parse_re", "type": "function", "loc": [227, 236], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.9566, 0.0413, 1, 0.36, 0.96, 33, 0, 3, 0, 0, 0, 0, 6], "semantic": {"name": "parse_re", "arg_names": ["self", "raw", "rules_re"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parse_re(self, raw, rules_re):\n \"\"\"Parse a fragment according to the compiled rules.\"\"\"\n\n for match in rules_re.finditer(raw):\n groups = dict((k, v) for (k, v)\n in match.groupdict().iteritems()\n if v is not None)\n name = match.lastgroup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L228_C8", "label": "expression", "type": "expression", "loc": [228, 228], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4", "vector": [8, 2, 0.9421, 0.0041, 2, 0.45, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Parse a fragment according to the compiled rules.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "label": "for match", "type": "for", "loc": [230, 236], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4", "vector": [6, 2, 0.9628, 0.0289, 2, 0.45, 1.0, 36, 3, 0, 0, 0, 0, 0, 6], "semantic": {"name": "match", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for match in rules_re.finditer(raw):\n groups = dict((k, v) for (k, v)\n in match.groupdict().iteritems()\n if v is not None)\n name = match.lastgroup\n function = getattr(self, '_%s_repl' % name)\n function(groups)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L231_C12", "label": "groups = dict()", "type": "assigned_variable", "loc": [231, 233], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "vector": [14, 3, 0.9587, 0.0124, 3, 0.04, 0.0, 161, 3, 1, 0, 0, 827, 10, 3], "semantic": {"name": "groups", "arg_names": [], "import_names": [], "rhs_call_name": "dict", "annotation": ""}, "snippet": " groups = dict((k, v) for (k, v)\n in match.groupdict().iteritems()\n if v is not None)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L234_C12", "label": "name =", "type": "assigned_variable", "loc": [234, 234], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "vector": [14, 3, 0.9669, 0.0041, 3, 0.04, 0.3333, 57, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "name", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " name = match.lastgroup"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L235_C12", "label": "function = getattr()", "type": "assigned_variable", "loc": [235, 235], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "vector": [14, 3, 0.9711, 0.0041, 3, 0.04, 0.6667, 275, 3, 2, 0, 0, 121, 10, 1], "semantic": {"name": "function", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " function = getattr(self, '_%s_repl' % name)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L236_C12", "label": "function()", "type": "expression", "loc": [236, 236], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "vector": [8, 3, 0.9752, 0.0041, 3, 0.04, 1.0, 275, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "function", "arg_names": [], "import_names": [], "rhs_call_name": "function", "annotation": ""}, "snippet": " function(groups)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "label": "parse", "type": "function", "loc": [238, 242], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "vector": [2, 1, 0.9917, 0.0207, 1, 0.36, 1.0, 678, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "parse", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def parse(self):\n \"\"\"Parse the text given as self.raw and return DOM tree.\"\"\"\n\n self.parse_re(self.raw, self.rules.block_re)\n return self.root"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L239_C8", "label": "expression", "type": "expression", "loc": [239, 239], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "vector": [8, 2, 0.9876, 0.0041, 2, 0.37, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Parse the text given as self.raw and return DOM tree.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L241_C8", "label": "parse_re()", "type": "expression", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "vector": [8, 2, 0.9959, 0.0041, 2, 0.37, 0.5, 33, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "parse_re", "arg_names": [], "import_names": [], "rhs_call_name": "parse_re", "annotation": ""}, "snippet": " self.parse_re(self.raw, self.rules.block_re)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L242_C8", "label": "return", "type": "return", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "vector": [13, 2, 1.0, 0.0041, 2, 0.37, 1.0, 0, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.root"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L18_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:While_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:While_L31_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L32_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L25_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L43_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L46_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L47_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L50_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L50_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L51_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L55_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L57_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L58_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L59_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L60_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L63_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L54_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L70_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L73_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L77_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L79_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L80_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L83_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L76_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L89_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L91_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L92_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L93_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L96_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L95_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L97_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L100_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L101_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L102_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L105_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L107_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:While_L109_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:While_L109_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L113_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L115_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L118_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L120_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L114_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L121_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L123_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L99_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L124_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L127_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L126_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L131_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L130_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L137_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L137_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L139_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L142_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L141_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L144_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L145_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L146_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L146_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L148_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L135_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L149_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L153_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L154_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L158_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L159_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L163_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L162_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L165_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L166_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L167_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L169_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L170_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L171_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L164_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L172_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L152_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L177_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L178_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L180_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L181_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L176_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L185_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L187_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L187_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L191_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L190_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L192_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L196_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L195_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L198_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L194_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L199_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L203_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L202_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L205_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L201_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L206_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L209_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L208_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L210_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L212_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L212_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L213_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L213_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L214_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L217_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L217_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:If_L218_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:If_L218_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L219_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L223_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L222_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L225_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L228_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L227_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L231_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L234_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Assign_L235_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:For_L230_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L236_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L239_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Expr_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_370:FunctionDef_L238_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_370:Return_L242_C8"}]
from Tkinter import * from ttk import Combobox, Label from tkFont import families from tkSimpleDialog import Dialog class PreferencesDialog(Dialog): def __init__(self, parent, title, font, size): self._master = parent self.result = False self.font = font self.size = size Dialog.__init__(self, parent, title) def body(self, master): self._npFrame = LabelFrame(master, text='Annotation window text') self._npFrame.pack(fill=X) self._fontFrame = Frame(self._npFrame, borderwidth=0) self._fontLabel = Label(self._fontFrame, text='Font:', width=5) self._fontLabel.pack(side=LEFT, padx=3) self._fontCombo = Combobox(self._fontFrame, values=sorted(families()), state='readonly') self._fontCombo.pack(side=RIGHT, fill=X) self._sizeFrame = Frame(self._npFrame, borderwidth=0) self._sizeLabel = Label(self._sizeFrame, text='Size:', width=5) self._sizeLabel.pack(side=LEFT, padx=3) self._sizeCombo = Combobox(self._sizeFrame, values=range(8,15), state='readonly') self._sizeCombo.pack(side=RIGHT, fill=X) self._fontFrame.pack() self._sizeFrame.pack() self._npFrame.pack(fill=X) self._fontCombo.set(self.font) self._sizeCombo.set(self.size) def apply(self): self.font = self._fontCombo.get() self.size = self._sizeCombo.get() self.result = True def cancel(self, event=None): if self.parent is not None: self.parent.focus_set() self.destroy()
ajibawa-2023/Python-Code-Large/train/row_371
37
43
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_371:ImportFrom_L1_C0", "label": "from Tkinter import *", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0233, 0.0233, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Tkinter import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:ImportFrom_L2_C0", "label": "from ttk import Combobox, Label", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0465, 0.0233, 0, 0.66, 0.25, 718, 0, 2, 0, 0, 718, 0, 0], "semantic": {"name": "ttk", "arg_names": [], "import_names": ["Combobox", "Label"], "rhs_call_name": "", "annotation": ""}, "snippet": "from ttk import Combobox, Label"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:ImportFrom_L3_C0", "label": "from tkFont import families", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0698, 0.0233, 0, 0.66, 0.5, 24, 0, 1, 0, 0, 24, 0, 0], "semantic": {"name": "tkFont", "arg_names": [], "import_names": ["families"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tkFont import families"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:ImportFrom_L4_C0", "label": "from tkSimpleDialog import Dialog", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.093, 0.0233, 0, 0.66, 0.75, 774, 0, 1, 0, 0, 774, 0, 0], "semantic": {"name": "tkSimpleDialog", "arg_names": [], "import_names": ["Dialog"], "rhs_call_name": "", "annotation": ""}, "snippet": "from tkSimpleDialog import Dialog"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "label": "PreferencesDialog", "type": "class", "loc": [6, 43], "level": 0, "parent": null, "vector": [3, 0, 0.5698, 0.8837, 0, 0.66, 1.0, 302, 0, 4, 0, 0, 814, 0, 25], "semantic": {"name": "PreferencesDialog", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class PreferencesDialog(Dialog):\n def __init__(self, parent, title, font, size):\n self._master = parent\n self.result = False\n self.font = font\n self.size = size\n Dialog.__init__(self, parent, title)\n"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "label": "__init__", "type": "function", "loc": [7, 12], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "vector": [2, 1, 0.2209, 0.1395, 1, 0.64, 0.0, 555, 0, 5, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "parent", "title", "font", "size"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, parent, title, font, size):\n self._master = parent\n self.result = False\n self.font = font\n self.size = size\n Dialog.__init__(self, parent, title)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L8_C8", "label": "self._master =", "type": "assigned_variable", "loc": [8, 8], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "vector": [14, 2, 0.186, 0.0233, 2, 0.2, 0.0, 265, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self._master", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self._master = parent"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L9_C8", "label": "self.result =", "type": "assigned_variable", "loc": [9, 9], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "vector": [14, 2, 0.2093, 0.0233, 2, 0.2, 0.25, 341, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L10_C8", "label": "self.font =", "type": "assigned_variable", "loc": [10, 10], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "vector": [14, 2, 0.2326, 0.0233, 2, 0.2, 0.5, 545, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.font", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.font = font"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L11_C8", "label": "self.size =", "type": "assigned_variable", "loc": [11, 11], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "vector": [14, 2, 0.2558, 0.0233, 2, 0.2, 0.75, 183, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.size", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.size = size"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L12_C8", "label": "__init__()", "type": "expression", "loc": [12, 12], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "vector": [8, 2, 0.2791, 0.0233, 2, 0.2, 1.0, 555, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": [], "import_names": [], "rhs_call_name": "__init__", "annotation": ""}, "snippet": " Dialog.__init__(self, parent, title)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "label": "body", "type": "function", "loc": [14, 33], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "vector": [2, 1, 0.5465, 0.4651, 1, 0.64, 0.3333, 477, 0, 2, 0, 0, 0, 0, 20], "semantic": {"name": "body", "arg_names": ["self", "master"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def body(self, master):\n self._npFrame = LabelFrame(master, text='Annotation window text')\n self._npFrame.pack(fill=X)\n self._fontFrame = Frame(self._npFrame, borderwidth=0)\n self._fontLabel = Label(self._fontFrame, text='Font:', width=5)\n self._fontLabel.pack(side=LEFT, padx=3)\n self._fontCombo = Combobox(self._fontFrame, values=sorted(families()),\n state='readonly')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L15_C8", "label": "self._npFrame = LabelFrame()", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.3488, 0.0233, 2, 0.38, 0.0, 244, 3, 2, 0, 0, 260, 10, 1], "semantic": {"name": "self._npFrame", "arg_names": [], "import_names": [], "rhs_call_name": "LabelFrame", "annotation": ""}, "snippet": " self._npFrame = LabelFrame(master, text='Annotation window text')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L16_C8", "label": "pack()", "type": "expression", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.3721, 0.0233, 2, 0.38, 0.0625, 742, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._npFrame.pack(fill=X)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L17_C8", "label": "self._fontFrame = Frame()", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.3953, 0.0233, 2, 0.38, 0.125, 934, 3, 2, 0, 0, 342, 10, 1], "semantic": {"name": "self._fontFrame", "arg_names": [], "import_names": [], "rhs_call_name": "Frame", "annotation": ""}, "snippet": " self._fontFrame = Frame(self._npFrame, borderwidth=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L18_C8", "label": "self._fontLabel = Label()", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.4186, 0.0233, 2, 0.38, 0.1875, 403, 3, 3, 0, 0, 413, 10, 1], "semantic": {"name": "self._fontLabel", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self._fontLabel = Label(self._fontFrame, text='Font:', width=5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L19_C8", "label": "pack()", "type": "expression", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.4419, 0.0233, 2, 0.38, 0.25, 742, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._fontLabel.pack(side=LEFT, padx=3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L20_C8", "label": "self._fontCombo = Combobox()", "type": "assigned_variable", "loc": [20, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.4767, 0.0465, 2, 0.38, 0.3125, 618, 3, 3, 0, 0, 542, 10, 3], "semantic": {"name": "self._fontCombo", "arg_names": [], "import_names": [], "rhs_call_name": "Combobox", "annotation": ""}, "snippet": " self._fontCombo = Combobox(self._fontFrame, values=sorted(families()),\n state='readonly')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L22_C8", "label": "pack()", "type": "expression", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.5116, 0.0233, 2, 0.38, 0.375, 742, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._fontCombo.pack(side=RIGHT, fill=X)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L23_C8", "label": "self._sizeFrame = Frame()", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.5349, 0.0233, 2, 0.38, 0.4375, 705, 3, 2, 0, 0, 342, 10, 1], "semantic": {"name": "self._sizeFrame", "arg_names": [], "import_names": [], "rhs_call_name": "Frame", "annotation": ""}, "snippet": " self._sizeFrame = Frame(self._npFrame, borderwidth=0)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L24_C8", "label": "self._sizeLabel = Label()", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.5581, 0.0233, 2, 0.38, 0.5, 90, 3, 3, 0, 0, 413, 10, 1], "semantic": {"name": "self._sizeLabel", "arg_names": [], "import_names": [], "rhs_call_name": "Label", "annotation": ""}, "snippet": " self._sizeLabel = Label(self._sizeFrame, text='Size:', width=5)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L25_C8", "label": "pack()", "type": "expression", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.5814, 0.0233, 2, 0.38, 0.5625, 742, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._sizeLabel.pack(side=LEFT, padx=3)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L26_C8", "label": "self._sizeCombo = Combobox()", "type": "assigned_variable", "loc": [26, 27], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [14, 2, 0.6163, 0.0465, 2, 0.38, 0.625, 37, 3, 3, 0, 0, 542, 10, 2], "semantic": {"name": "self._sizeCombo", "arg_names": [], "import_names": [], "rhs_call_name": "Combobox", "annotation": ""}, "snippet": " self._sizeCombo = Combobox(self._sizeFrame, values=range(8,15),\n state='readonly')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L28_C8", "label": "pack()", "type": "expression", "loc": [28, 28], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.6512, 0.0233, 2, 0.38, 0.6875, 742, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._sizeCombo.pack(side=RIGHT, fill=X)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L29_C8", "label": "pack()", "type": "expression", "loc": [29, 29], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.6744, 0.0233, 2, 0.38, 0.75, 742, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._fontFrame.pack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L30_C8", "label": "pack()", "type": "expression", "loc": [30, 30], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.6977, 0.0233, 2, 0.38, 0.8125, 742, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._sizeFrame.pack()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L31_C8", "label": "pack()", "type": "expression", "loc": [31, 31], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.7209, 0.0233, 2, 0.38, 0.875, 742, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "pack", "arg_names": [], "import_names": [], "rhs_call_name": "pack", "annotation": ""}, "snippet": " self._npFrame.pack(fill=X)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L32_C8", "label": "set()", "type": "expression", "loc": [32, 32], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.7442, 0.0233, 2, 0.38, 0.9375, 21, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._fontCombo.set(self.font)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L33_C8", "label": "set()", "type": "expression", "loc": [33, 33], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "vector": [8, 2, 0.7674, 0.0233, 2, 0.38, 1.0, 21, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "set", "arg_names": [], "import_names": [], "rhs_call_name": "set", "annotation": ""}, "snippet": " self._sizeCombo.set(self.size)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "label": "apply", "type": "function", "loc": [35, 38], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "vector": [2, 1, 0.8488, 0.093, 1, 0.64, 0.6667, 524, 0, 1, 0, 0, 0, 0, 2], "semantic": {"name": "apply", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def apply(self):\n self.font = self._fontCombo.get()\n self.size = self._sizeCombo.get()\n self.result = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L36_C8", "label": "self.font = get()", "type": "assigned_variable", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "vector": [14, 2, 0.8372, 0.0233, 2, 0.18, 0.0, 545, 3, 0, 0, 0, 607, 10, 1], "semantic": {"name": "self.font", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.font = self._fontCombo.get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L37_C8", "label": "self.size = get()", "type": "assigned_variable", "loc": [37, 37], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "vector": [14, 2, 0.8605, 0.0233, 2, 0.18, 0.5, 183, 3, 0, 0, 0, 607, 10, 1], "semantic": {"name": "self.size", "arg_names": [], "import_names": [], "rhs_call_name": "get", "annotation": ""}, "snippet": " self.size = self._sizeCombo.get()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L38_C8", "label": "self.result =", "type": "assigned_variable", "loc": [38, 38], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "vector": [14, 2, 0.8837, 0.0233, 2, 0.18, 1.0, 341, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.result", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.result = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4", "label": "cancel", "type": "function", "loc": [40, 43], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "vector": [2, 1, 0.9651, 0.093, 1, 0.64, 1.0, 732, 0, 2, 0, 0, 0, 0, 2], "semantic": {"name": "cancel", "arg_names": ["self", "event"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def cancel(self, event=None):\n if self.parent is not None:\n self.parent.focus_set()\n self.destroy()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:If_L41_C8", "label": "if", "type": "if", "loc": [41, 42], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4", "vector": [4, 2, 0.9651, 0.0465, 2, 0.15, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.parent is not None:\n self.parent.focus_set()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L42_C11", "label": "focus_set()", "type": "expression", "loc": [42, 42], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:If_L41_C8", "vector": [8, 3, 0.9767, 0.0233, 3, 0.08, 0.0, 278, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "focus_set", "arg_names": [], "import_names": [], "rhs_call_name": "focus_set", "annotation": ""}, "snippet": " self.parent.focus_set()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L43_C8", "label": "destroy()", "type": "expression", "loc": [43, 43], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4", "vector": [8, 2, 1.0, 0.0233, 2, 0.15, 1.0, 388, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "destroy", "arg_names": [], "import_names": [], "rhs_call_name": "destroy", "annotation": ""}, "snippet": " self.destroy()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L8_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L9_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L10_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L11_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L7_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L12_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L28_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L29_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L30_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L31_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L32_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L14_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L33_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L37_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L35_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Assign_L38_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:ClassDef_L6_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:If_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L42_C11"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_371:FunctionDef_L40_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_371:Expr_L43_C8"}]
from Tkinter import PhotoImage from Tkconstants import * from globalconst import BULLET_IMAGE from creoleparser import Parser from rules import LinkRules class TextTagEmitter(object): """ Generate tagged output compatible with the Tkinter Text widget """ def __init__(self, root, txtWidget, hyperMgr, bulletImage, link_rules=None): self.root = root self.link_rules = link_rules or LinkRules() self.txtWidget = txtWidget self.hyperMgr = hyperMgr self.line = 1 self.index = 0 self.number = 1 self.bullet = False self.bullet_image = bulletImage self.begin_italic = '' self.begin_bold = '' self.begin_list_item = '' self.list_item = '' self.begin_link = '' # visit/leave methods for emitting nodes of the document: def visit_document(self, node): pass def leave_document(self, node): # leave_paragraph always leaves two extra carriage returns at the # end of the text. This deletes them. txtindex = '%d.%d' % (self.line-1, self.index) self.txtWidget.delete(txtindex, END) def visit_text(self, node): if self.begin_list_item: self.list_item = node.content elif self.begin_link: pass else: txtindex = '%d.%d' % (self.line, self.index) self.txtWidget.insert(txtindex, node.content) def leave_text(self, node): if not self.begin_list_item: self.index += len(node.content) def visit_separator(self, node): raise NotImplementedError def leave_separator(self, node): raise NotImplementedError def visit_paragraph(self, node): pass def leave_paragraph(self, node): txtindex = '%d.%d' % (self.line, self.index) self.txtWidget.insert(txtindex, '\n\n') self.line += 2 self.index = 0 self.number = 1 def visit_bullet_list(self, node): self.bullet = True def leave_bullet_list(self, node): txtindex = '%d.%d' % (self.line, self.index) self.txtWidget.insert(txtindex, '\n') self.line += 1 self.index = 0 self.bullet = False def visit_number_list(self, node): self.number = 1 def leave_number_list(self, node): txtindex = '%d.%d' % (self.line, self.index) self.txtWidget.insert(txtindex, '\n') self.line += 1 self.index = 0 def visit_list_item(self, node): self.begin_list_item = '%d.%d' % (self.line, self.index) def leave_list_item(self, node): if self.bullet: self.txtWidget.insert(self.begin_list_item, '\t') next = '%d.%d' % (self.line, self.index+1) self.txtWidget.image_create(next, image=self.bullet_image) next = '%d.%d' % (self.line, self.index+2) content = '\t%s\t\n' % self.list_item self.txtWidget.insert(next, content) end_list_item = '%d.%d' % (self.line, self.index + len(content)+2) self.txtWidget.tag_add('bullet', self.begin_list_item, end_list_item) elif self.number: content = '\t%d.\t%s\n' % (self.number, self.list_item) end_list_item = '%d.%d' % (self.line, self.index + len(content)) self.txtWidget.insert(self.begin_list_item, content) self.txtWidget.tag_add('number', self.begin_list_item, end_list_item) self.number += 1 self.begin_list_item = '' self.list_item = '' self.line += 1 self.index = 0 def visit_emphasis(self, node): self.begin_italic = '%d.%d' % (self.line, self.index) def leave_emphasis(self, node): end_italic = '%d.%d' % (self.line, self.index) self.txtWidget.tag_add('italic', self.begin_italic, end_italic) def visit_strong(self, node): self.begin_bold = '%d.%d' % (self.line, self.index) def leave_strong(self, node): end_bold = '%d.%d' % (self.line, self.index) self.txtWidget.tag_add('bold', self.begin_bold, end_bold) def visit_link(self, node): self.begin_link = '%d.%d' % (self.line, self.index) def leave_link(self, node): end_link = '%d.%d' % (self.line, self.index) # TODO: Revisit unicode encode/decode issues later. # 1. Decode early. 2. Unicode everywhere 3. Encode late # However, decoding filename and link_text here works for now. fname = str(node.content).replace('%20', ' ') link_text = str(node.children[0].content).replace('%20', ' ') self.txtWidget.insert(self.begin_link, link_text, self.hyperMgr.add(fname)) self.begin_link = '' def visit_break(self, node): txtindex = '%d.%d' % (self.line, self.index) self.txtWidget.insert(txtindex, '\n') def leave_break(self, node): self.line += 1 self.index = 0 def visit_default(self, node): """Fallback function for visiting unknown nodes.""" raise TypeError def leave_default(self, node): """Fallback function for leaving unknown nodes.""" raise TypeError def emit_children(self, node): """Emit all the children of a node.""" for child in node.children: self.emit_node(child) def emit_node(self, node): """Visit/depart a single node and its children.""" visit = getattr(self, 'visit_%s' % node.kind, self.visit_default) visit(node) self.emit_children(node) leave = getattr(self, 'leave_%s' % node.kind, self.leave_default) leave(node) def emit(self): """Emit the document represented by self.root DOM tree.""" return self.emit_node(self.root) class Serializer(object): def __init__(self, txtWidget, hyperMgr): self.txt = txtWidget self.hyperMgr = hyperMgr self.bullet_image = PhotoImage(file=BULLET_IMAGE) self._reset() def _reset(self): self.number = 0 self.bullet = False self.filename = '' self.link_start = False self.first_tab = True self.list_end = False def dump(self, index1='1.0', index2=END): # outputs contents from Text widget in Creole format. creole = '' self._reset() for key, value, index in self.txt.dump(index1, index2): if key == 'tagon': if value == 'bold': creole += '**' elif value == 'italic': creole += '//' elif value == 'bullet': creole += '*' self.bullet = True self.list_end = False elif value.startswith('hyper-'): self.filename = self.hyperMgr.filenames[value] self.link_start = True elif value == 'number': creole += '#' self.number += 1 elif key == 'tagoff': if value == 'bold': creole += '**' elif value == 'italic': creole += '//' elif value.startswith('hyper-'): creole += ']]' elif value == 'number': numstr = '#\t%d.\t' % self.number if numstr in creole: creole = creole.replace(numstr, '# ', 1) self.list_end = True elif value == 'bullet': creole = creole.replace('\n*\t\t', '\n* ', 1) self.bullet = False self.list_end = True elif key == 'text': if self.link_start: # TODO: Revisit unicode encode/decode issues later. # 1. Decode early. 2. Unicode everywhere 3. Encode late # However, encoding filename and link_text here works for # now. fname = self.filename.replace(' ', '%20').encode('utf-8') link_text = value.replace(' ', '%20') value = '[[%s|%s' % (fname, link_text) self.link_start = False numstr = '%d.\t' % self.number if self.list_end and value != '\n' and numstr not in value: creole += '\n' self.number = 0 self.list_end = False creole += value return creole.rstrip() def restore(self, creole): self.hyperMgr.reset() document = Parser(unicode(creole, 'utf-8', 'ignore')).parse() return TextTagEmitter(document, self.txt, self.hyperMgr, self.bullet_image).emit()
ajibawa-2023/Python-Code-Large/train/row_372
171
244
15
["cat_id", "level", "center", "span", "parent_depth", "parent_weight", "sibling_index", "name_hash", "rhs_type", "arg_count", "return_type", "is_async", "module_hash", "value_type", "calls_count"]
[{"id": "ajibawa-2023/Python-Code-Large/train/row_372:ImportFrom_L1_C0", "label": "from Tkinter import PhotoImage", "type": "import", "loc": [1, 1], "level": 0, "parent": null, "vector": [1, 0, 0.0041, 0.0041, 0, 0.66, 0.0, 368, 0, 1, 0, 0, 368, 0, 0], "semantic": {"name": "Tkinter", "arg_names": [], "import_names": ["PhotoImage"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Tkinter import PhotoImage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ImportFrom_L2_C0", "label": "from Tkconstants import *", "type": "import", "loc": [2, 2], "level": 0, "parent": null, "vector": [1, 0, 0.0082, 0.0041, 0, 0.66, 0.1667, 2, 0, 1, 0, 0, 2, 0, 0], "semantic": {"name": "Tkconstants", "arg_names": [], "import_names": ["*"], "rhs_call_name": "", "annotation": ""}, "snippet": "from Tkconstants import *"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ImportFrom_L3_C0", "label": "from globalconst import BULLET_IMAGE", "type": "import", "loc": [3, 3], "level": 0, "parent": null, "vector": [1, 0, 0.0123, 0.0041, 0, 0.66, 0.3333, 871, 0, 1, 0, 0, 871, 0, 0], "semantic": {"name": "globalconst", "arg_names": [], "import_names": ["BULLET_IMAGE"], "rhs_call_name": "", "annotation": ""}, "snippet": "from globalconst import BULLET_IMAGE"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ImportFrom_L4_C0", "label": "from creoleparser import Parser", "type": "import", "loc": [4, 4], "level": 0, "parent": null, "vector": [1, 0, 0.0164, 0.0041, 0, 0.66, 0.5, 128, 0, 1, 0, 0, 128, 0, 0], "semantic": {"name": "creoleparser", "arg_names": [], "import_names": ["Parser"], "rhs_call_name": "", "annotation": ""}, "snippet": "from creoleparser import Parser"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ImportFrom_L5_C0", "label": "from rules import LinkRules", "type": "import", "loc": [5, 5], "level": 0, "parent": null, "vector": [1, 0, 0.0205, 0.0041, 0, 0.66, 0.6667, 85, 0, 1, 0, 0, 85, 0, 0], "semantic": {"name": "rules", "arg_names": [], "import_names": ["LinkRules"], "rhs_call_name": "", "annotation": ""}, "snippet": "from rules import LinkRules"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "label": "TextTagEmitter", "type": "class", "loc": [7, 169], "level": 0, "parent": null, "vector": [3, 0, 0.3607, 0.668, 0, 0.66, 0.8333, 440, 0, 28, 0, 0, 186, 0, 31], "semantic": {"name": "TextTagEmitter", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class TextTagEmitter(object):\n \"\"\"\n Generate tagged output compatible with the Tkinter Text widget\n \"\"\"\n def __init__(self, root, txtWidget, hyperMgr, bulletImage,\n link_rules=None):\n self.root = root\n self.link_rules = link_rules or LinkRules()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L8_C4", "label": "expression", "type": "expression", "loc": [8, 10], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [8, 1, 0.0369, 0.0123, 1, 0.77, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"\n Generate tagged output compatible with the Tkinter Text widget\n \"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "label": "__init__", "type": "function", "loc": [11, 26], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.0758, 0.0656, 1, 0.77, 0.0357, 555, 0, 6, 0, 0, 0, 0, 1], "semantic": {"name": "__init__", "arg_names": ["self", "root", "txtWidget", "hyperMgr", "bulletImage", "link_rules"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, root, txtWidget, hyperMgr, bulletImage,\n link_rules=None):\n self.root = root\n self.link_rules = link_rules or LinkRules()\n self.txtWidget = txtWidget\n self.hyperMgr = hyperMgr\n self.line = 1\n self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L13_C8", "label": "self.root =", "type": "assigned_variable", "loc": [13, 13], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0533, 0.0041, 2, 0.48, 0.0, 81, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.root", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.root = root"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L14_C8", "label": "self.link_rules =", "type": "assigned_variable", "loc": [14, 14], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0574, 0.0041, 2, 0.48, 0.0769, 126, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "self.link_rules", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.link_rules = link_rules or LinkRules()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L15_C8", "label": "self.txtWidget =", "type": "assigned_variable", "loc": [15, 15], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0615, 0.0041, 2, 0.48, 0.1538, 533, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.txtWidget", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.txtWidget = txtWidget"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L16_C8", "label": "self.hyperMgr =", "type": "assigned_variable", "loc": [16, 16], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0656, 0.0041, 2, 0.48, 0.2308, 611, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.hyperMgr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.hyperMgr = hyperMgr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L17_C8", "label": "self.line =", "type": "assigned_variable", "loc": [17, 17], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0697, 0.0041, 2, 0.48, 0.3077, 427, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.line", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.line = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L18_C8", "label": "self.index =", "type": "assigned_variable", "loc": [18, 18], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0738, 0.0041, 2, 0.48, 0.3846, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L19_C8", "label": "self.number =", "type": "assigned_variable", "loc": [19, 19], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0779, 0.0041, 2, 0.48, 0.4615, 343, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.number = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L20_C8", "label": "self.bullet =", "type": "assigned_variable", "loc": [20, 20], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.082, 0.0041, 2, 0.48, 0.5385, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L21_C8", "label": "self.bullet_image =", "type": "assigned_variable", "loc": [21, 21], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0861, 0.0041, 2, 0.48, 0.6154, 887, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.bullet_image", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet_image = bulletImage"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L22_C8", "label": "self.begin_italic =", "type": "assigned_variable", "loc": [22, 22], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0902, 0.0041, 2, 0.48, 0.6923, 866, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_italic", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_italic = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L23_C8", "label": "self.begin_bold =", "type": "assigned_variable", "loc": [23, 23], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0943, 0.0041, 2, 0.48, 0.7692, 122, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_bold", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_bold = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L24_C8", "label": "self.begin_list_item =", "type": "assigned_variable", "loc": [24, 24], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.0984, 0.0041, 2, 0.48, 0.8462, 54, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_list_item = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L25_C8", "label": "self.list_item =", "type": "assigned_variable", "loc": [25, 25], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.1025, 0.0041, 2, 0.48, 0.9231, 479, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_item = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L26_C8", "label": "self.begin_link =", "type": "assigned_variable", "loc": [26, 26], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "vector": [14, 2, 0.1066, 0.0041, 2, 0.48, 1.0, 936, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_link = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L29_C4", "label": "visit_document", "type": "function", "loc": [29, 30], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.1209, 0.0082, 1, 0.77, 0.0714, 440, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_document", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_document(self, node):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4", "label": "leave_document", "type": "function", "loc": [32, 36], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.1393, 0.0205, 1, 0.77, 0.1071, 643, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_document", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_document(self, node):\n # leave_paragraph always leaves two extra carriage returns at the\n # end of the text. This deletes them.\n txtindex = '%d.%d' % (self.line-1, self.index)\n self.txtWidget.delete(txtindex, END)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L35_C8", "label": "txtindex =", "type": "assigned_variable", "loc": [35, 35], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4", "vector": [14, 2, 0.1434, 0.0041, 2, 0.43, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line-1, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L36_C8", "label": "delete()", "type": "expression", "loc": [36, 36], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4", "vector": [8, 2, 0.1475, 0.0041, 2, 0.43, 1.0, 266, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "delete", "arg_names": [], "import_names": [], "rhs_call_name": "delete", "annotation": ""}, "snippet": " self.txtWidget.delete(txtindex, END)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L38_C4", "label": "visit_text", "type": "function", "loc": [38, 45], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.1701, 0.0328, 1, 0.77, 0.1429, 138, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "visit_text", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_text(self, node):\n if self.begin_list_item:\n self.list_item = node.content\n elif self.begin_link:\n pass\n else:\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8", "label": "if", "type": "if", "loc": [39, 45], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L38_C4", "vector": [4, 2, 0.1721, 0.0287, 2, 0.07, 0.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.begin_list_item:\n self.list_item = node.content\n elif self.begin_link:\n pass\n else:\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L40_C12", "label": "self.list_item =", "type": "assigned_variable", "loc": [40, 40], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8", "vector": [14, 3, 0.1639, 0.0041, 3, 0.0, 0.0, 479, 7, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_item = node.content"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8", "label": "if", "type": "if", "loc": [41, 45], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8", "vector": [4, 3, 0.1762, 0.0205, 3, 0.0, 1.0, 0, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.begin_link:\n pass\n else:\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L44_C12", "label": "txtindex =", "type": "assigned_variable", "loc": [44, 44], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8", "vector": [14, 4, 0.1803, 0.0041, 4, 0.78, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L45_C12", "label": "insert()", "type": "expression", "loc": [45, 45], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8", "vector": [8, 4, 0.1844, 0.0041, 4, 0.78, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(txtindex, node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L47_C4", "label": "leave_text", "type": "function", "loc": [47, 49], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.1967, 0.0123, 1, 0.77, 0.1786, 406, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_text", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_text(self, node):\n if not self.begin_list_item:\n self.index += len(node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L48_C8", "label": "if", "type": "if", "loc": [48, 49], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L47_C4", "vector": [4, 2, 0.1988, 0.0082, 2, 0.56, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if not self.begin_list_item:\n self.index += len(node.content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L51_C4", "label": "visit_separator", "type": "function", "loc": [51, 52], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2111, 0.0082, 1, 0.77, 0.2143, 586, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_separator", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_separator(self, node):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L54_C4", "label": "leave_separator", "type": "function", "loc": [54, 55], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2234, 0.0082, 1, 0.77, 0.25, 141, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "leave_separator", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_separator(self, node):\n raise NotImplementedError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L57_C4", "label": "visit_paragraph", "type": "function", "loc": [57, 58], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2357, 0.0082, 1, 0.77, 0.2857, 452, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_paragraph", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_paragraph(self, node):\n pass"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "label": "leave_paragraph", "type": "function", "loc": [60, 65], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2561, 0.0246, 1, 0.77, 0.3214, 927, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_paragraph", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_paragraph(self, node):\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, '\\n\\n')\n self.line += 2\n self.index = 0\n self.number = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L61_C8", "label": "txtindex =", "type": "assigned_variable", "loc": [61, 61], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "vector": [14, 2, 0.25, 0.0041, 2, 0.45, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L62_C8", "label": "insert()", "type": "expression", "loc": [62, 62], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "vector": [8, 2, 0.2541, 0.0041, 2, 0.45, 0.3333, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(txtindex, '\\n\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L64_C8", "label": "self.index =", "type": "assigned_variable", "loc": [64, 64], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "vector": [14, 2, 0.2623, 0.0041, 2, 0.45, 0.6667, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L65_C8", "label": "self.number =", "type": "assigned_variable", "loc": [65, 65], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "vector": [14, 2, 0.2664, 0.0041, 2, 0.45, 1.0, 343, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.number = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L67_C4", "label": "visit_bullet_list", "type": "function", "loc": [67, 68], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2766, 0.0082, 1, 0.77, 0.3571, 181, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_bullet_list", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_bullet_list(self, node):\n self.bullet = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L68_C8", "label": "self.bullet =", "type": "assigned_variable", "loc": [68, 68], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L67_C4", "vector": [14, 2, 0.2787, 0.0041, 2, 0.05, 0.0, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "label": "leave_bullet_list", "type": "function", "loc": [70, 75], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.2971, 0.0246, 1, 0.77, 0.3929, 649, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_bullet_list", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_bullet_list(self, node):\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, '\\n')\n self.line += 1\n self.index = 0\n self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L71_C8", "label": "txtindex =", "type": "assigned_variable", "loc": [71, 71], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "vector": [14, 2, 0.291, 0.0041, 2, 0.37, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L72_C8", "label": "insert()", "type": "expression", "loc": [72, 72], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "vector": [8, 2, 0.2951, 0.0041, 2, 0.37, 0.3333, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(txtindex, '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L74_C8", "label": "self.index =", "type": "assigned_variable", "loc": [74, 74], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "vector": [14, 2, 0.3033, 0.0041, 2, 0.37, 0.6667, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L75_C8", "label": "self.bullet =", "type": "assigned_variable", "loc": [75, 75], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "vector": [14, 2, 0.3074, 0.0041, 2, 0.37, 1.0, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L77_C4", "label": "visit_number_list", "type": "function", "loc": [77, 78], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.3176, 0.0082, 1, 0.77, 0.4286, 825, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_number_list", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_number_list(self, node):\n self.number = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L78_C8", "label": "self.number =", "type": "assigned_variable", "loc": [78, 78], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L77_C4", "vector": [14, 2, 0.3197, 0.0041, 2, 0.17, 0.0, 343, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.number = 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "label": "leave_number_list", "type": "function", "loc": [80, 84], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.3361, 0.0205, 1, 0.77, 0.4643, 524, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_number_list", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_number_list(self, node):\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, '\\n')\n self.line += 1\n self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L81_C8", "label": "txtindex =", "type": "assigned_variable", "loc": [81, 81], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "vector": [14, 2, 0.332, 0.0041, 2, 0.31, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L82_C8", "label": "insert()", "type": "expression", "loc": [82, 82], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "vector": [8, 2, 0.3361, 0.0041, 2, 0.31, 0.5, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(txtindex, '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L84_C8", "label": "self.index =", "type": "assigned_variable", "loc": [84, 84], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "vector": [14, 2, 0.3443, 0.0041, 2, 0.31, 1.0, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L86_C4", "label": "visit_list_item", "type": "function", "loc": [86, 87], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.3545, 0.0082, 1, 0.77, 0.5, 155, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_list_item", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_list_item(self, node):\n self.begin_list_item = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L87_C8", "label": "self.begin_list_item =", "type": "assigned_variable", "loc": [87, 87], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L86_C4", "vector": [14, 2, 0.3566, 0.0041, 2, 0.43, 0.0, 54, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.begin_list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_list_item = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "label": "leave_list_item", "type": "function", "loc": [89, 108], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.4037, 0.082, 1, 0.77, 0.5357, 75, 0, 2, 0, 0, 0, 0, 8], "semantic": {"name": "leave_list_item", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_list_item(self, node):\n if self.bullet:\n self.txtWidget.insert(self.begin_list_item, '\\t')\n next = '%d.%d' % (self.line, self.index+1)\n self.txtWidget.image_create(next, image=self.bullet_image)\n next = '%d.%d' % (self.line, self.index+2)\n content = '\\t%s\\t\\n' % self.list_item\n self.txtWidget.insert(next, content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "label": "if", "type": "if", "loc": [90, 104], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "vector": [4, 2, 0.3975, 0.0615, 2, 0.55, 0.0, 0, 7, 0, 0, 0, 0, 0, 8], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.bullet:\n self.txtWidget.insert(self.begin_list_item, '\\t')\n next = '%d.%d' % (self.line, self.index+1)\n self.txtWidget.image_create(next, image=self.bullet_image)\n next = '%d.%d' % (self.line, self.index+2)\n content = '\\t%s\\t\\n' % self.list_item\n self.txtWidget.insert(next, content)\n end_list_item = '%d.%d' % (self.line, self.index + len(content)+2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L91_C12", "label": "insert()", "type": "expression", "loc": [91, 91], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [8, 3, 0.373, 0.0041, 3, 0.37, 0.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(self.begin_list_item, '\\t')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L92_C12", "label": "next =", "type": "assigned_variable", "loc": [92, 92], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [14, 3, 0.377, 0.0041, 3, 0.37, 0.125, 11, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " next = '%d.%d' % (self.line, self.index+1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L93_C12", "label": "image_create()", "type": "expression", "loc": [93, 93], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [8, 3, 0.3811, 0.0041, 3, 0.37, 0.25, 947, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "image_create", "arg_names": [], "import_names": [], "rhs_call_name": "image_create", "annotation": ""}, "snippet": " self.txtWidget.image_create(next, image=self.bullet_image)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L94_C12", "label": "next =", "type": "assigned_variable", "loc": [94, 94], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [14, 3, 0.3852, 0.0041, 3, 0.37, 0.375, 11, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "next", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " next = '%d.%d' % (self.line, self.index+2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L95_C12", "label": "content =", "type": "assigned_variable", "loc": [95, 95], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [14, 3, 0.3893, 0.0041, 3, 0.37, 0.5, 273, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " content = '\\t%s\\t\\n' % self.list_item"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L96_C12", "label": "insert()", "type": "expression", "loc": [96, 96], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [8, 3, 0.3934, 0.0041, 3, 0.37, 0.625, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(next, content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L97_C12", "label": "end_list_item =", "type": "assigned_variable", "loc": [97, 97], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [14, 3, 0.3975, 0.0041, 3, 0.37, 0.75, 982, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "end_list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_list_item = '%d.%d' % (self.line, self.index + len(content)+2)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L98_C12", "label": "tag_add()", "type": "expression", "loc": [98, 98], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [8, 3, 0.4016, 0.0041, 3, 0.37, 0.875, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txtWidget.tag_add('bullet', self.begin_list_item, end_list_item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "label": "if", "type": "if", "loc": [99, 104], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "vector": [4, 3, 0.416, 0.0246, 3, 0.37, 1.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif self.number:\n content = '\\t%d.\\t%s\\n' % (self.number, self.list_item)\n end_list_item = '%d.%d' % (self.line, self.index + len(content))\n self.txtWidget.insert(self.begin_list_item, content)\n self.txtWidget.tag_add('number', self.begin_list_item, end_list_item)\n self.number += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L100_C12", "label": "content =", "type": "assigned_variable", "loc": [100, 100], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "vector": [14, 4, 0.4098, 0.0041, 4, 0.96, 0.0, 273, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "content", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " content = '\\t%d.\\t%s\\n' % (self.number, self.list_item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L101_C12", "label": "end_list_item =", "type": "assigned_variable", "loc": [101, 101], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "vector": [14, 4, 0.4139, 0.0041, 4, 0.96, 0.3333, 982, 4, 0, 0, 0, 0, 0, 1], "semantic": {"name": "end_list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_list_item = '%d.%d' % (self.line, self.index + len(content))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L102_C12", "label": "insert()", "type": "expression", "loc": [102, 102], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "vector": [8, 4, 0.418, 0.0041, 4, 0.96, 0.6667, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(self.begin_list_item, content)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L103_C12", "label": "tag_add()", "type": "expression", "loc": [103, 103], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "vector": [8, 4, 0.4221, 0.0041, 4, 0.96, 1.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txtWidget.tag_add('number', self.begin_list_item, end_list_item)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L105_C8", "label": "self.begin_list_item =", "type": "assigned_variable", "loc": [105, 105], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "vector": [14, 2, 0.4303, 0.0041, 2, 0.55, 0.3333, 54, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_list_item = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L106_C8", "label": "self.list_item =", "type": "assigned_variable", "loc": [106, 106], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "vector": [14, 2, 0.4344, 0.0041, 2, 0.55, 0.6667, 479, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.list_item", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_item = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L108_C8", "label": "self.index =", "type": "assigned_variable", "loc": [108, 108], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "vector": [14, 2, 0.4426, 0.0041, 2, 0.55, 1.0, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L110_C4", "label": "visit_emphasis", "type": "function", "loc": [110, 111], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.4529, 0.0082, 1, 0.77, 0.5714, 314, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_emphasis", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_emphasis(self, node):\n self.begin_italic = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L111_C8", "label": "self.begin_italic =", "type": "assigned_variable", "loc": [111, 111], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L110_C4", "vector": [14, 2, 0.4549, 0.0041, 2, 0.54, 0.0, 866, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.begin_italic", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_italic = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4", "label": "leave_emphasis", "type": "function", "loc": [113, 115], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.4672, 0.0123, 1, 0.77, 0.6071, 164, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_emphasis", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_emphasis(self, node):\n end_italic = '%d.%d' % (self.line, self.index)\n self.txtWidget.tag_add('italic', self.begin_italic, end_italic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L114_C8", "label": "end_italic =", "type": "assigned_variable", "loc": [114, 114], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4", "vector": [14, 2, 0.4672, 0.0041, 2, 0.53, 0.0, 66, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_italic", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_italic = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L115_C8", "label": "tag_add()", "type": "expression", "loc": [115, 115], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4", "vector": [8, 2, 0.4713, 0.0041, 2, 0.53, 1.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txtWidget.tag_add('italic', self.begin_italic, end_italic)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L117_C4", "label": "visit_strong", "type": "function", "loc": [117, 118], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.4816, 0.0082, 1, 0.77, 0.6429, 956, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_strong", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_strong(self, node):\n self.begin_bold = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L118_C8", "label": "self.begin_bold =", "type": "assigned_variable", "loc": [118, 118], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L117_C4", "vector": [14, 2, 0.4836, 0.0041, 2, 0.2, 0.0, 122, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.begin_bold", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_bold = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4", "label": "leave_strong", "type": "function", "loc": [120, 122], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.4959, 0.0123, 1, 0.77, 0.6786, 521, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "leave_strong", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_strong(self, node):\n end_bold = '%d.%d' % (self.line, self.index)\n self.txtWidget.tag_add('bold', self.begin_bold, end_bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L121_C8", "label": "end_bold =", "type": "assigned_variable", "loc": [121, 121], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4", "vector": [14, 2, 0.4959, 0.0041, 2, 0.45, 0.0, 876, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_bold", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_bold = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L122_C8", "label": "tag_add()", "type": "expression", "loc": [122, 122], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4", "vector": [8, 2, 0.5, 0.0041, 2, 0.45, 1.0, 285, 3, 3, 0, 0, 0, 0, 1], "semantic": {"name": "tag_add", "arg_names": [], "import_names": [], "rhs_call_name": "tag_add", "annotation": ""}, "snippet": " self.txtWidget.tag_add('bold', self.begin_bold, end_bold)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L124_C4", "label": "visit_link", "type": "function", "loc": [124, 125], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.5102, 0.0082, 1, 0.77, 0.7143, 44, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_link", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_link(self, node):\n self.begin_link = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L125_C8", "label": "self.begin_link =", "type": "assigned_variable", "loc": [125, 125], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L124_C4", "vector": [14, 2, 0.5123, 0.0041, 2, 0.02, 0.0, 936, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.begin_link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_link = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "label": "leave_link", "type": "function", "loc": [127, 136], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.5389, 0.041, 1, 0.77, 0.75, 691, 0, 2, 0, 0, 0, 0, 6], "semantic": {"name": "leave_link", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_link(self, node):\n end_link = '%d.%d' % (self.line, self.index)\n # TODO: Revisit unicode encode/decode issues later.\n # 1. Decode early. 2. Unicode everywhere 3. Encode late\n # However, decoding filename and link_text here works for now.\n fname = str(node.content).replace('%20', ' ')\n link_text = str(node.children[0].content).replace('%20', ' ')\n self.txtWidget.insert(self.begin_link, link_text,"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L128_C8", "label": "end_link =", "type": "assigned_variable", "loc": [128, 128], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "vector": [14, 2, 0.5246, 0.0041, 2, 0.66, 0.0, 599, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "end_link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " end_link = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L132_C8", "label": "fname = replace()", "type": "assigned_variable", "loc": [132, 132], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "vector": [14, 2, 0.541, 0.0041, 2, 0.66, 0.25, 190, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "fname", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " fname = str(node.content).replace('%20', ' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L133_C8", "label": "link_text = replace()", "type": "assigned_variable", "loc": [133, 133], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "vector": [14, 2, 0.5451, 0.0041, 2, 0.66, 0.5, 407, 3, 2, 0, 0, 293, 10, 2], "semantic": {"name": "link_text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " link_text = str(node.children[0].content).replace('%20', ' ')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L134_C8", "label": "insert()", "type": "expression", "loc": [134, 135], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "vector": [8, 2, 0.5512, 0.0082, 2, 0.66, 0.75, 368, 3, 3, 0, 0, 0, 0, 2], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(self.begin_link, link_text,\n self.hyperMgr.add(fname))"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L136_C8", "label": "self.begin_link =", "type": "assigned_variable", "loc": [136, 136], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "vector": [14, 2, 0.5574, 0.0041, 2, 0.66, 1.0, 936, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.begin_link", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.begin_link = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4", "label": "visit_break", "type": "function", "loc": [138, 140], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.5697, 0.0123, 1, 0.77, 0.7857, 162, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "visit_break", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_break(self, node):\n txtindex = '%d.%d' % (self.line, self.index)\n self.txtWidget.insert(txtindex, '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L139_C8", "label": "txtindex =", "type": "assigned_variable", "loc": [139, 139], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4", "vector": [14, 2, 0.5697, 0.0041, 2, 0.66, 0.0, 982, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "txtindex", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " txtindex = '%d.%d' % (self.line, self.index)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L140_C8", "label": "insert()", "type": "expression", "loc": [140, 140], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4", "vector": [8, 2, 0.5738, 0.0041, 2, 0.66, 1.0, 368, 3, 2, 0, 0, 0, 0, 1], "semantic": {"name": "insert", "arg_names": [], "import_names": [], "rhs_call_name": "insert", "annotation": ""}, "snippet": " self.txtWidget.insert(txtindex, '\\n')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L142_C4", "label": "leave_break", "type": "function", "loc": [142, 144], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.5861, 0.0123, 1, 0.77, 0.8214, 165, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "leave_break", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_break(self, node):\n self.line += 1\n self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L144_C8", "label": "self.index =", "type": "assigned_variable", "loc": [144, 144], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L142_C4", "vector": [14, 2, 0.5902, 0.0041, 2, 0.32, 0.0, 777, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.index = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L146_C4", "label": "visit_default", "type": "function", "loc": [146, 148], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.6025, 0.0123, 1, 0.77, 0.8571, 431, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "visit_default", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def visit_default(self, node):\n \"\"\"Fallback function for visiting unknown nodes.\"\"\"\n raise TypeError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L147_C8", "label": "expression", "type": "expression", "loc": [147, 147], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L146_C4", "vector": [8, 2, 0.6025, 0.0041, 2, 0.21, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Fallback function for visiting unknown nodes.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L150_C4", "label": "leave_default", "type": "function", "loc": [150, 152], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.6189, 0.0123, 1, 0.77, 0.8929, 827, 0, 2, 0, 0, 0, 0, 0], "semantic": {"name": "leave_default", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def leave_default(self, node):\n \"\"\"Fallback function for leaving unknown nodes.\"\"\"\n raise TypeError"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L151_C8", "label": "expression", "type": "expression", "loc": [151, 151], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L150_C4", "vector": [8, 2, 0.6189, 0.0041, 2, 0.58, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Fallback function for leaving unknown nodes.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4", "label": "emit_children", "type": "function", "loc": [154, 157], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.6373, 0.0164, 1, 0.77, 0.9286, 194, 0, 2, 0, 0, 0, 0, 1], "semantic": {"name": "emit_children", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def emit_children(self, node):\n \"\"\"Emit all the children of a node.\"\"\"\n for child in node.children:\n self.emit_node(child)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L155_C8", "label": "expression", "type": "expression", "loc": [155, 155], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4", "vector": [8, 2, 0.6352, 0.0041, 2, 0.24, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Emit all the children of a node.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:For_L156_C8", "label": "for child", "type": "for", "loc": [156, 157], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4", "vector": [6, 2, 0.6414, 0.0082, 2, 0.24, 1.0, 967, 7, 0, 0, 0, 0, 0, 1], "semantic": {"name": "child", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for child in node.children:\n self.emit_node(child)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L157_C12", "label": "emit_node()", "type": "expression", "loc": [157, 157], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:For_L156_C8", "vector": [8, 3, 0.6434, 0.0041, 3, 0.01, 0.0, 699, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "emit_node", "arg_names": [], "import_names": [], "rhs_call_name": "emit_node", "annotation": ""}, "snippet": " self.emit_node(child)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "label": "emit_node", "type": "function", "loc": [159, 165], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.6639, 0.0287, 1, 0.77, 0.9643, 699, 0, 2, 0, 0, 0, 0, 5], "semantic": {"name": "emit_node", "arg_names": ["self", "node"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def emit_node(self, node):\n \"\"\"Visit/depart a single node and its children.\"\"\"\n visit = getattr(self, 'visit_%s' % node.kind, self.visit_default)\n visit(node)\n self.emit_children(node)\n leave = getattr(self, 'leave_%s' % node.kind, self.leave_default)\n leave(node)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L160_C8", "label": "expression", "type": "expression", "loc": [160, 160], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [8, 2, 0.6557, 0.0041, 2, 0.27, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Visit/depart a single node and its children.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L161_C8", "label": "visit = getattr()", "type": "assigned_variable", "loc": [161, 161], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [14, 2, 0.6598, 0.0041, 2, 0.27, 0.2, 694, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "visit", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " visit = getattr(self, 'visit_%s' % node.kind, self.visit_default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L162_C8", "label": "visit()", "type": "expression", "loc": [162, 162], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [8, 2, 0.6639, 0.0041, 2, 0.27, 0.4, 694, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "visit", "arg_names": [], "import_names": [], "rhs_call_name": "visit", "annotation": ""}, "snippet": " visit(node)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L163_C8", "label": "emit_children()", "type": "expression", "loc": [163, 163], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [8, 2, 0.668, 0.0041, 2, 0.27, 0.6, 194, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "emit_children", "arg_names": [], "import_names": [], "rhs_call_name": "emit_children", "annotation": ""}, "snippet": " self.emit_children(node)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L164_C8", "label": "leave = getattr()", "type": "assigned_variable", "loc": [164, 164], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [14, 2, 0.6721, 0.0041, 2, 0.27, 0.8, 248, 3, 3, 0, 0, 121, 10, 1], "semantic": {"name": "leave", "arg_names": [], "import_names": [], "rhs_call_name": "getattr", "annotation": ""}, "snippet": " leave = getattr(self, 'leave_%s' % node.kind, self.leave_default)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L165_C8", "label": "leave()", "type": "expression", "loc": [165, 165], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "vector": [8, 2, 0.6762, 0.0041, 2, 0.27, 1.0, 248, 3, 1, 0, 0, 0, 0, 1], "semantic": {"name": "leave", "arg_names": [], "import_names": [], "rhs_call_name": "leave", "annotation": ""}, "snippet": " leave(node)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4", "label": "emit", "type": "function", "loc": [167, 169], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "vector": [2, 1, 0.6885, 0.0123, 1, 0.77, 1.0, 627, 0, 1, 1, 0, 0, 0, 1], "semantic": {"name": "emit", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def emit(self):\n \"\"\"Emit the document represented by self.root DOM tree.\"\"\"\n return self.emit_node(self.root)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L168_C8", "label": "expression", "type": "expression", "loc": [168, 168], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4", "vector": [8, 2, 0.6885, 0.0041, 2, 0.79, 0.0, 0, 1, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " \"\"\"Emit the document represented by self.root DOM tree.\"\"\""}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L169_C8", "label": "return", "type": "return", "loc": [169, 169], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4", "vector": [13, 2, 0.6926, 0.0041, 2, 0.79, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return self.emit_node(self.root)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "label": "Serializer", "type": "class", "loc": [171, 244], "level": 0, "parent": null, "vector": [3, 0, 0.8504, 0.3033, 0, 0.66, 1.0, 577, 0, 4, 0, 0, 186, 0, 18], "semantic": {"name": "Serializer", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": "class Serializer(object):\n def __init__(self, txtWidget, hyperMgr):\n self.txt = txtWidget\n self.hyperMgr = hyperMgr\n self.bullet_image = PhotoImage(file=BULLET_IMAGE)\n self._reset()\n\n def _reset(self):"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "label": "__init__", "type": "function", "loc": [172, 176], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "vector": [2, 1, 0.7131, 0.0205, 1, 0.3, 0.0, 555, 0, 3, 0, 0, 0, 0, 2], "semantic": {"name": "__init__", "arg_names": ["self", "txtWidget", "hyperMgr"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def __init__(self, txtWidget, hyperMgr):\n self.txt = txtWidget\n self.hyperMgr = hyperMgr\n self.bullet_image = PhotoImage(file=BULLET_IMAGE)\n self._reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L173_C8", "label": "self.txt =", "type": "assigned_variable", "loc": [173, 173], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "vector": [14, 2, 0.709, 0.0041, 2, 0.52, 0.0, 120, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.txt", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.txt = txtWidget"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L174_C8", "label": "self.hyperMgr =", "type": "assigned_variable", "loc": [174, 174], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "vector": [14, 2, 0.7131, 0.0041, 2, 0.52, 0.3333, 611, 2, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.hyperMgr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.hyperMgr = hyperMgr"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L175_C8", "label": "self.bullet_image = PhotoImage()", "type": "assigned_variable", "loc": [175, 175], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "vector": [14, 2, 0.7172, 0.0041, 2, 0.52, 0.6667, 887, 3, 1, 0, 0, 677, 10, 1], "semantic": {"name": "self.bullet_image", "arg_names": [], "import_names": [], "rhs_call_name": "PhotoImage", "annotation": ""}, "snippet": " self.bullet_image = PhotoImage(file=BULLET_IMAGE)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L176_C8", "label": "_reset()", "type": "expression", "loc": [176, 176], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "vector": [8, 2, 0.7213, 0.0041, 2, 0.52, 1.0, 382, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_reset", "arg_names": [], "import_names": [], "rhs_call_name": "_reset", "annotation": ""}, "snippet": " self._reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "label": "_reset", "type": "function", "loc": [178, 184], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "vector": [2, 1, 0.7418, 0.0287, 1, 0.3, 0.3333, 382, 0, 1, 0, 0, 0, 0, 0], "semantic": {"name": "_reset", "arg_names": ["self"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def _reset(self):\n self.number = 0\n self.bullet = False\n self.filename = ''\n self.link_start = False\n self.first_tab = True\n self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L179_C8", "label": "self.number =", "type": "assigned_variable", "loc": [179, 179], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.7336, 0.0041, 2, 0.08, 0.0, 343, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.number = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L180_C8", "label": "self.bullet =", "type": "assigned_variable", "loc": [180, 180], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.7377, 0.0041, 2, 0.08, 0.2, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L181_C8", "label": "self.filename =", "type": "assigned_variable", "loc": [181, 181], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.7418, 0.0041, 2, 0.08, 0.4, 942, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L182_C8", "label": "self.link_start =", "type": "assigned_variable", "loc": [182, 182], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.7459, 0.0041, 2, 0.08, 0.6, 888, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.link_start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.link_start = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L183_C8", "label": "self.first_tab =", "type": "assigned_variable", "loc": [183, 183], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.75, 0.0041, 2, 0.08, 0.8, 771, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.first_tab", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.first_tab = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L184_C8", "label": "self.list_end =", "type": "assigned_variable", "loc": [184, 184], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "vector": [14, 2, 0.7541, 0.0041, 2, 0.08, 1.0, 973, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.list_end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "label": "dump", "type": "function", "loc": [186, 238], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "vector": [2, 1, 0.8689, 0.2172, 1, 0.3, 0.6667, 952, 0, 3, 1, 0, 0, 0, 10], "semantic": {"name": "dump", "arg_names": ["self", "index1", "index2"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def dump(self, index1='1.0', index2=END):\n # outputs contents from Text widget in Creole format.\n creole = ''\n self._reset()\n for key, value, index in self.txt.dump(index1, index2):\n if key == 'tagon':\n if value == 'bold':\n creole += '**'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L188_C8", "label": "creole =", "type": "assigned_variable", "loc": [188, 188], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "vector": [14, 2, 0.7705, 0.0041, 2, 0.15, 0.0, 863, 1, 0, 0, 0, 0, 3, 0], "semantic": {"name": "creole", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " creole = ''"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L189_C8", "label": "_reset()", "type": "expression", "loc": [189, 189], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "vector": [8, 2, 0.7746, 0.0041, 2, 0.15, 0.3333, 382, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "_reset", "arg_names": [], "import_names": [], "rhs_call_name": "_reset", "annotation": ""}, "snippet": " self._reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:For_L190_C8", "label": "for key, value, index", "type": "for", "loc": [190, 237], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "vector": [6, 2, 0.875, 0.1967, 2, 0.15, 0.6667, 408, 3, 0, 0, 0, 0, 0, 8], "semantic": {"name": "key, value, index", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " for key, value, index in self.txt.dump(index1, index2):\n if key == 'tagon':\n if value == 'bold':\n creole += '**'\n elif value == 'italic':\n creole += '//'\n elif value == 'bullet':\n creole += '*'"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12", "label": "if", "type": "if", "loc": [191, 237], "level": 3, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:For_L190_C8", "vector": [4, 3, 0.877, 0.1926, 3, 0.18, 0.0, 0, 0, 0, 0, 0, 0, 0, 7], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if key == 'tagon':\n if value == 'bold':\n creole += '**'\n elif value == 'italic':\n creole += '//'\n elif value == 'bullet':\n creole += '*'\n self.bullet = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L192_C16", "label": "if", "type": "if", "loc": [192, 205], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12", "vector": [4, 4, 0.8135, 0.0574, 4, 0.96, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value == 'bold':\n creole += '**'\n elif value == 'italic':\n creole += '//'\n elif value == 'bullet':\n creole += '*'\n self.bullet = True\n self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L194_C16", "label": "if", "type": "if", "loc": [194, 205], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L192_C16", "vector": [4, 5, 0.8176, 0.0492, 5, 0.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'italic':\n creole += '//'\n elif value == 'bullet':\n creole += '*'\n self.bullet = True\n self.list_end = False\n elif value.startswith('hyper-'):\n self.filename = self.hyperMgr.filenames[value]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "label": "if", "type": "if", "loc": [196, 205], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L194_C16", "vector": [4, 6, 0.8217, 0.041, 6, 0.28, 0.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'bullet':\n creole += '*'\n self.bullet = True\n self.list_end = False\n elif value.startswith('hyper-'):\n self.filename = self.hyperMgr.filenames[value]\n self.link_start = True\n elif value == 'number':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L198_C20", "label": "self.bullet =", "type": "assigned_variable", "loc": [198, 198], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "vector": [14, 7, 0.8115, 0.0041, 7, 0.6, 0.0, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L199_C20", "label": "self.list_end =", "type": "assigned_variable", "loc": [199, 199], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "vector": [14, 7, 0.8156, 0.0041, 7, 0.6, 0.5, 973, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.list_end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "label": "if", "type": "if", "loc": [200, 205], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "vector": [4, 7, 0.8299, 0.0246, 7, 0.6, 1.0, 0, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value.startswith('hyper-'):\n self.filename = self.hyperMgr.filenames[value]\n self.link_start = True\n elif value == 'number':\n creole += '#'\n self.number += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L201_C20", "label": "self.filename =", "type": "assigned_variable", "loc": [201, 201], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "vector": [14, 8, 0.8238, 0.0041, 8, 0.56, 0.0, 942, 6, 0, 0, 0, 0, 0, 0], "semantic": {"name": "self.filename", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.filename = self.hyperMgr.filenames[value]"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L202_C20", "label": "self.link_start =", "type": "assigned_variable", "loc": [202, 202], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "vector": [14, 8, 0.8279, 0.0041, 8, 0.56, 0.5, 888, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.link_start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.link_start = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L203_C16", "label": "if", "type": "if", "loc": [203, 205], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "vector": [4, 8, 0.8361, 0.0123, 8, 0.56, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'number':\n creole += '#'\n self.number += 1"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12", "label": "if", "type": "if", "loc": [206, 237], "level": 4, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12", "vector": [4, 4, 0.9078, 0.1311, 4, 0.96, 1.0, 0, 0, 0, 0, 0, 0, 0, 6], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'tagoff':\n if value == 'bold':\n creole += '**'\n elif value == 'italic':\n creole += '//'\n elif value.startswith('hyper-'):\n creole += ']]'\n elif value == 'number':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L207_C16", "label": "if", "type": "if", "loc": [207, 221], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12", "vector": [4, 5, 0.877, 0.0615, 5, 0.14, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if value == 'bold':\n creole += '**'\n elif value == 'italic':\n creole += '//'\n elif value.startswith('hyper-'):\n creole += ']]'\n elif value == 'number':\n numstr = '#\\t%d.\\t' % self.number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L209_C16", "label": "if", "type": "if", "loc": [209, 221], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L207_C16", "vector": [4, 6, 0.8811, 0.0533, 6, 0.86, 0.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'italic':\n creole += '//'\n elif value.startswith('hyper-'):\n creole += ']]'\n elif value == 'number':\n numstr = '#\\t%d.\\t' % self.number\n if numstr in creole:\n creole = creole.replace(numstr, '# ', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L211_C16", "label": "if", "type": "if", "loc": [211, 221], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L209_C16", "vector": [4, 7, 0.8852, 0.0451, 7, 0.48, 0.0, 0, 3, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value.startswith('hyper-'):\n creole += ']]'\n elif value == 'number':\n numstr = '#\\t%d.\\t' % self.number\n if numstr in creole:\n creole = creole.replace(numstr, '# ', 1)\n self.list_end = True\n elif value == 'bullet':"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "label": "if", "type": "if", "loc": [213, 221], "level": 8, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L211_C16", "vector": [4, 8, 0.8893, 0.0369, 8, 0.43, 0.0, 0, 0, 0, 0, 0, 0, 0, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'number':\n numstr = '#\\t%d.\\t' % self.number\n if numstr in creole:\n creole = creole.replace(numstr, '# ', 1)\n self.list_end = True\n elif value == 'bullet':\n creole = creole.replace('\\n*\\t\\t', '\\n* ', 1)\n self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L214_C20", "label": "numstr =", "type": "assigned_variable", "loc": [214, 214], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "vector": [14, 9, 0.877, 0.0041, 9, 0.69, 0.0, 988, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "numstr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " numstr = '#\\t%d.\\t' % self.number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L215_C20", "label": "if", "type": "if", "loc": [215, 216], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "vector": [4, 9, 0.8832, 0.0082, 9, 0.69, 0.3333, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if numstr in creole:\n creole = creole.replace(numstr, '# ', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L216_C24", "label": "creole = replace()", "type": "assigned_variable", "loc": [216, 216], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L215_C20", "vector": [14, 10, 0.8852, 0.0041, 10, 0.96, 0.0, 863, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "creole", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " creole = creole.replace(numstr, '# ', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L217_C20", "label": "self.list_end =", "type": "assigned_variable", "loc": [217, 217], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "vector": [14, 9, 0.8893, 0.0041, 9, 0.69, 0.6667, 973, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.list_end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_end = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "label": "if", "type": "if", "loc": [218, 221], "level": 9, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "vector": [4, 9, 0.8996, 0.0164, 9, 0.69, 1.0, 0, 0, 0, 0, 0, 0, 0, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif value == 'bullet':\n creole = creole.replace('\\n*\\t\\t', '\\n* ', 1)\n self.bullet = False\n self.list_end = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L219_C20", "label": "creole = replace()", "type": "assigned_variable", "loc": [219, 219], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "vector": [14, 10, 0.8975, 0.0041, 10, 0.82, 0.0, 863, 3, 3, 0, 0, 293, 10, 1], "semantic": {"name": "creole", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " creole = creole.replace('\\n*\\t\\t', '\\n* ', 1)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L220_C20", "label": "self.bullet =", "type": "assigned_variable", "loc": [220, 220], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "vector": [14, 10, 0.9016, 0.0041, 10, 0.82, 0.5, 597, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.bullet", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.bullet = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L221_C20", "label": "self.list_end =", "type": "assigned_variable", "loc": [221, 221], "level": 10, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "vector": [14, 10, 0.9057, 0.0041, 10, 0.82, 1.0, 973, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.list_end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_end = True"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "label": "if", "type": "if", "loc": [222, 237], "level": 5, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12", "vector": [4, 5, 0.9406, 0.0656, 5, 0.14, 1.0, 0, 0, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " elif key == 'text':\n if self.link_start:\n # TODO: Revisit unicode encode/decode issues later.\n # 1. Decode early. 2. Unicode everywhere 3. Encode late\n # However, encoding filename and link_text here works for\n # now.\n fname = self.filename.replace(' ', '%20').encode('utf-8')\n link_text = value.replace(' ', '%20')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "label": "if", "type": "if", "loc": [223, 231], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "vector": [4, 6, 0.9303, 0.0369, 6, 0.85, 0.0, 0, 7, 0, 0, 0, 0, 0, 3], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.link_start:\n # TODO: Revisit unicode encode/decode issues later.\n # 1. Decode early. 2. Unicode everywhere 3. Encode late\n # However, encoding filename and link_text here works for\n # now.\n fname = self.filename.replace(' ', '%20').encode('utf-8')\n link_text = value.replace(' ', '%20')\n value = '[[%s|%s' % (fname, link_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L228_C20", "label": "fname = encode()", "type": "assigned_variable", "loc": [228, 228], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "vector": [14, 7, 0.9344, 0.0041, 7, 0.46, 0.0, 190, 3, 1, 0, 0, 623, 10, 2], "semantic": {"name": "fname", "arg_names": [], "import_names": [], "rhs_call_name": "encode", "annotation": ""}, "snippet": " fname = self.filename.replace(' ', '%20').encode('utf-8')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L229_C20", "label": "link_text = replace()", "type": "assigned_variable", "loc": [229, 229], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "vector": [14, 7, 0.9385, 0.0041, 7, 0.46, 0.3333, 407, 3, 2, 0, 0, 293, 10, 1], "semantic": {"name": "link_text", "arg_names": [], "import_names": [], "rhs_call_name": "replace", "annotation": ""}, "snippet": " link_text = value.replace(' ', '%20')"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L230_C20", "label": "value =", "type": "assigned_variable", "loc": [230, 230], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "vector": [14, 7, 0.9426, 0.0041, 7, 0.46, 0.6667, 441, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "value", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " value = '[[%s|%s' % (fname, link_text)"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L231_C20", "label": "self.link_start =", "type": "assigned_variable", "loc": [231, 231], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "vector": [14, 7, 0.9467, 0.0041, 7, 0.46, 1.0, 888, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.link_start", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.link_start = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L232_C16", "label": "numstr =", "type": "assigned_variable", "loc": [232, 232], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "vector": [14, 6, 0.9508, 0.0041, 6, 0.85, 0.5, 988, 4, 0, 0, 0, 0, 0, 0], "semantic": {"name": "numstr", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " numstr = '%d.\\t' % self.number"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16", "label": "if", "type": "if", "loc": [233, 236], "level": 6, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "vector": [4, 6, 0.9611, 0.0164, 6, 0.85, 1.0, 0, 0, 0, 0, 0, 0, 0, 0], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " if self.list_end and value != '\\n' and numstr not in value:\n creole += '\\n'\n self.number = 0\n self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L235_C20", "label": "self.number =", "type": "assigned_variable", "loc": [235, 235], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16", "vector": [14, 7, 0.9631, 0.0041, 7, 0.16, 0.0, 343, 1, 0, 0, 0, 0, 1, 0], "semantic": {"name": "self.number", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.number = 0"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L236_C20", "label": "self.list_end =", "type": "assigned_variable", "loc": [236, 236], "level": 7, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16", "vector": [14, 7, 0.9672, 0.0041, 7, 0.16, 1.0, 973, 1, 0, 0, 0, 0, 4, 0], "semantic": {"name": "self.list_end", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " self.list_end = False"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L238_C8", "label": "return", "type": "return", "loc": [238, 238], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "vector": [13, 2, 0.9754, 0.0041, 2, 0.15, 1.0, 0, 3, 0, 0, 0, 0, 10, 1], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return creole.rstrip()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "label": "restore", "type": "function", "loc": [240, 244], "level": 1, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "vector": [2, 1, 0.9918, 0.0205, 1, 0.3, 1.0, 821, 0, 2, 1, 0, 0, 0, 6], "semantic": {"name": "restore", "arg_names": ["self", "creole"], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " def restore(self, creole):\n self.hyperMgr.reset()\n document = Parser(unicode(creole, 'utf-8', 'ignore')).parse()\n return TextTagEmitter(document, self.txt, self.hyperMgr,\n self.bullet_image).emit()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L241_C8", "label": "reset()", "type": "expression", "loc": [241, 241], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "vector": [8, 2, 0.9877, 0.0041, 2, 0.75, 0.0, 944, 3, 0, 0, 0, 0, 0, 1], "semantic": {"name": "reset", "arg_names": [], "import_names": [], "rhs_call_name": "reset", "annotation": ""}, "snippet": " self.hyperMgr.reset()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L242_C8", "label": "document = parse()", "type": "assigned_variable", "loc": [242, 242], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "vector": [14, 2, 0.9918, 0.0041, 2, 0.75, 0.5, 977, 3, 0, 0, 0, 678, 10, 3], "semantic": {"name": "document", "arg_names": [], "import_names": [], "rhs_call_name": "parse", "annotation": ""}, "snippet": " document = Parser(unicode(creole, 'utf-8', 'ignore')).parse()"}, {"id": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L243_C8", "label": "return", "type": "return", "loc": [243, 244], "level": 2, "parent": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "vector": [13, 2, 0.998, 0.0082, 2, 0.75, 1.0, 0, 3, 0, 0, 0, 0, 10, 2], "semantic": {"name": "", "arg_names": [], "import_names": [], "rhs_call_name": "", "annotation": ""}, "snippet": " return TextTagEmitter(document, self.txt, self.hyperMgr,\n self.bullet_image).emit()"}]
[{"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L8_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L13_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L14_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L15_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L16_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L17_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L18_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L19_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L20_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L21_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L22_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L23_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L24_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L25_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L11_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L26_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L29_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L35_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L32_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L36_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L38_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L38_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L40_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L39_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L44_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L41_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L45_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L47_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L47_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L48_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L51_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L54_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L57_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L61_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L62_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L64_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L60_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L65_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L67_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L67_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L68_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L71_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L72_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L74_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L70_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L75_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L77_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L77_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L78_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L81_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L82_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L80_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L84_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L86_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L86_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L87_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L91_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L92_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L93_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L94_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L95_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L96_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L97_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L98_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L90_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L100_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L101_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L102_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L99_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L103_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L105_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L106_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L89_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L108_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L110_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L110_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L111_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L114_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L113_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L115_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L117_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L117_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L118_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L121_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L120_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L122_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L124_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L124_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L125_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L128_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L132_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L133_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L134_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L127_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L136_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L139_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L138_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L140_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L142_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L142_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L144_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L146_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L146_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L147_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L150_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L150_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L151_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L155_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L154_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:For_L156_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:For_L156_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L157_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L160_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L161_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L162_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L163_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L164_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L159_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L165_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L7_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L168_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L167_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L169_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L173_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L174_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L175_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L172_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L176_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L179_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L180_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L181_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L182_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L183_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L178_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L184_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L188_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L189_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:For_L190_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:For_L190_C8", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L192_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L192_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L194_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L194_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L198_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L199_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L196_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L201_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L202_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L200_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L203_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L191_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L207_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L207_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L209_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L209_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L211_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L211_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L214_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L215_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L215_C20", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L216_C24"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L217_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L213_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L219_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L220_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L218_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L221_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L206_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L228_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L229_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L230_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L223_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L231_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L232_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L222_C12", "t": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L235_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:If_L233_C16", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L236_C20"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L186_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L238_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:ClassDef_L171_C0", "t": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Expr_L241_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Assign_L242_C8"}, {"f": "ajibawa-2023/Python-Code-Large/train/row_372:FunctionDef_L240_C4", "t": "ajibawa-2023/Python-Code-Large/train/row_372:Return_L243_C8"}]