lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"@route('GET', '/-test/veil.js', VAR_1=website)...\n",
"get_current_http_response().set_header('Content-Type',\n 'text/javascript; charset=utf-8')\n",
"return (as_path(__file__).dirname() / 'veil.js').text()\n"
] | [
"@route('GET', '/-test/veil.js', website=website)...\n",
"get_current_http_response().set_header('Content-Type',\n 'text/javascript; charset=utf-8')\n",
"return (as_path(__file__).dirname() / 'veil.js').text()\n"
] | [
0,
0,
0
] | [
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_7(self, VAR_4, VAR_5, VAR_3, VAR_6, VAR_7):...\n",
""
] | [
"def _parse_rep(self, iden, msg, reqid, seqnum, status):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"import mysql.connector\n",
"from werkzeug.security import generate_password_hash, check_password_hash\n",
"def __init__(self, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"self.connection = mysql.connector.connect(host=connection_address, user=\n user_name, VAR_4=password, db=database)\n",
"self.cursor = ... | [
"import mysql.connector\n",
"from werkzeug.security import generate_password_hash, check_password_hash\n",
"def __init__(self, connection_address, connection_port, user_name, password,...\n",
"self.connection = mysql.connector.connect(host=connection_address, user=\n user_name, password=password, db=databa... | [
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
] | [
"Import'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"return db.engine.execute('string' + VAR_1 + \"';\")\n"
] | [
"def query_signed_upperclassman(member):...\n",
"\"\"\"docstring\"\"\"\n",
"return db.engine.execute(\n \"\"\"\n SELECT DISTINCT packet.freshman_username AS username, signature_upper.signed AS signed FROM packet \n INNER JOIN signature_upper ON packet.id = signature_upper.packet_id \n ... | [
0,
0,
4
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@classmethod...\n",
"return super(CLASS_0.Factory, VAR_12).subsystem_dependencies() + (\n DependencyContext, Java, ScalaPlatform)\n"
] | [
"@classmethod...\n",
"return super(Zinc.Factory, cls).subsystem_dependencies() + (DependencyContext,\n Java, ScalaPlatform)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_3(VAR_0, VAR_7=None):...\n",
"VAR_31 = pd.cut(VAR_0.groupby('matched_id').days.sum(), [0, 1, 2, 10, 90, \n 1000], right=False).value_counts(sort=False)\n",
"VAR_31 = pd.DataFrame({'days': VAR_31.as_matrix()}, VAR_29=\n days_interval_to_text(dist.index))\n",
"return VAR_31, []\n"
] | [
"def get_days_distribution(data, groups=None):...\n",
"dist = pd.cut(data.groupby('matched_id').days.sum(), [0, 1, 2, 10, 90, 1000\n ], right=False).value_counts(sort=False)\n",
"dist = pd.DataFrame({'days': dist.as_matrix()}, index=days_interval_to_text\n (dist.index))\n",
"return dist, []\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def __init__(self, *VAR_3, **VAR_4):...\n",
"super(CLASS_0, self).__init__(*VAR_3, **kwargs)\n",
"self.common = None\n",
"self.configuration.append_config_values(hpcommon.hp3par_opts)\n",
"self.configuration.append_config_values(san.san_opts)\n"
] | [
"def __init__(self, *args, **kwargs):...\n",
"super(HP3PARISCSIDriver, self).__init__(*args, **kwargs)\n",
"self.common = None\n",
"self.configuration.append_config_values(hpcommon.hp3par_opts)\n",
"self.configuration.append_config_values(san.san_opts)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"from DateTime.DateTime import DateTime\n",
"from Products.PageTemplates.PageTemplateFile import PageTemplateFile\n",
"from Persistence import Persistent\n",
"from Acquisition import Implicit\n",
"import OFS.SimpleItem, OFS.ObjectManager\n",
"import zope.interface\n",
"import IZMSDaemon\n",
"__doc__ =... | [
"from DateTime.DateTime import DateTime\n",
"from Products.PageTemplates.PageTemplateFile import PageTemplateFile\n",
"from Persistence import Persistent\n",
"from Acquisition import Implicit\n",
"import OFS.SimpleItem, OFS.ObjectManager\n",
"import zope.interface\n",
"import IZMSDaemon\n",
"__doc__ =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_7, *VAR_15, **VAR_16):...\n",
"CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n"
] | [
"def __init__(self, param, *a, **kw):...\n",
"Validator.__init__(self, param, *a, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __enter__(self):...\n",
"if CLASS_2._current_context is None:\n",
"CLASS_2._current_context = self\n",
"return self\n",
"self.reset()\n"
] | [
"def __enter__(self):...\n",
"if Device._current_context is None:\n",
"Device._current_context = self\n",
"return self\n",
"self.reset()\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Return'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n",
"self.socket.bind(self.server_address)\n"
] | [
"def server_bind(self):...\n",
"self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n",
"self.socket.bind(self.server_address)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"def FUNC_11(VAR_16, VAR_17, VAR_18=True):...\n",
"if isinstance(VAR_16, CLASS_1):\n",
"VAR_16.flags[VAR_17] = VAR_18\n",
"if FUNC_10(VAR_16):\n",
"return VAR_16\n",
"VAR_16 = CLASS_1(VAR_16)\n",
"return [VAR_19(v, VAR_17, VAR_18=flag_value) for v in VAR_16]\n",
"VAR_16.flags[VAR_17] = VAR_18\n",
"r... | [
"def flag(value, flag_type, flag_value=True):...\n",
"if isinstance(value, AnnotatedString):\n",
"value.flags[flag_type] = flag_value\n",
"if not_iterable(value):\n",
"return value\n",
"value = AnnotatedString(value)\n",
"return [flag(v, flag_type, flag_value=flag_value) for v in value]\n",
"value.fla... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Return'",
"Assign'",
"Return'"
] |
[
"def FUNC_2(VAR_0):...\n",
"VAR_2 = []\n",
"VAR_3 = FUNC_4(VAR_0)\n",
"VAR_4 = FUNC_3(VAR_0)\n",
"for item in VAR_3:\n",
"if VAR_4.get(item.name):\n",
"return VAR_2\n",
"VAR_9 = VAR_4[item.name]\n",
"VAR_10 = {'item_group': item.item_group, 'item': item.name, 'item_name':\n item.item_name}\n",
... | [
"def get_data(filters):...\n",
"data = []\n",
"items = get_items(filters)\n",
"sales_invoice_data = get_sales_details(filters)\n",
"for item in items:\n",
"if sales_invoice_data.get(item.name):\n",
"return data\n",
"item_obj = sales_invoice_data[item.name]\n",
"row = {'item_group': item.item_group, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_14(self, VAR_12):...\n",
"if not self._system_properties:\n",
"fp.write(pkgutil.get_data(__name__, 'SystemProperties.class'))\n",
"return self._system_properties\n",
"VAR_45 = [VAR_12, '-cp', classpath, 'SystemProperties']\n",
"VAR_46 = subprocess.Popen(VAR_45, VAR_47=subprocess.PIPE, VAR_48=sub... | [
"def _get_system_properties(self, java):...\n",
"if not self._system_properties:\n",
"fp.write(pkgutil.get_data(__name__, 'SystemProperties.class'))\n",
"return self._system_properties\n",
"cmd = [java, '-cp', classpath, 'SystemProperties']\n",
"process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stde... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(self):...\n",
"if self.closed:\n",
"if self._adapter is None:\n",
"if self._session is not None:\n",
"self._detach()\n",
"self._adapter.close()\n",
"self._adapter = None\n"
] | [
"def stop_debugging(self):...\n",
"if self.closed:\n",
"if self._adapter is None:\n",
"if self._session is not None:\n",
"self._detach()\n",
"self._adapter.close()\n",
"self._adapter = None\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Condition",
"Condition",
"Expr'",
"Expr'",
"Assign'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return {'id': self.id, 'name': self.name, 'description': self.description,\n 'processed': self.processed, 'takeaway': self.takeaway}\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return {'id': self.id, 'name': self.name, 'description': self.description,\n 'processed': self.processed, 'takeaway': self.takeaway}\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"\"\"\" Views for a student's account information. \"\"\"\n",
"import json\n",
"import logging\n",
"import urlparse\n",
"from datetime import datetime\n",
"from django.conf import settings\n",
"from django.contrib import messages\n",
"from django.contrib.auth import get_user_model\n",
"from django.c... | [
"\"\"\" Views for a student's account information. \"\"\"\n",
"import json\n",
"import logging\n",
"import urlparse\n",
"from datetime import datetime\n",
"from django.conf import settings\n",
"from django.contrib import messages\n",
"from django.contrib.auth import get_user_model\n",
"from django.c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"Expr'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
... |
[
"def FUNC_8(VAR_10):...\n",
"VAR_0 = []\n",
"VAR_28 = 0\n",
"VAR_11 = set()\n",
"for VAR_29 in VAR_5.finditer(VAR_10):\n",
"VAR_0.append(re.escape(VAR_10[VAR_28:VAR_29.start()]))\n",
"VAR_0.append(re.escape(VAR_10[VAR_28:]))\n",
"VAR_51 = VAR_29.group('name')\n",
"VAR_0.append('$')\n",
"if VAR_51 ... | [
"def regex(filepattern):...\n",
"f = []\n",
"last = 0\n",
"wildcards = set()\n",
"for match in _wildcard_regex.finditer(filepattern):\n",
"f.append(re.escape(filepattern[last:match.start()]))\n",
"f.append(re.escape(filepattern[last:]))\n",
"wildcard = match.group('name')\n",
"f.append('$')\n",
"i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Return'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def __init__(self, VAR_19, VAR_18):...\n",
"self.contexts = VAR_18\n",
"self.context = VAR_19\n"
] | [
"def __init__(self, context, contexts):...\n",
"self.contexts = contexts\n",
"self.context = context\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"def FUNC_7(self, VAR_7, VAR_3=None):...\n",
"return self.get(VAR_7, VAR_3=filters, VAR_4=1)[0]\n"
] | [
"def getone(self, key, filters=None):...\n",
"return self.get(key, filters=filters, limit=1)[0]\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"self.handled_resp = 1\n",
"self.handled_remote = 1\n",
"self.handled_args = 1\n",
"self.handled_kwargs = 1\n"
] | [
"def handler_invalid(self):...\n",
"self.handled_resp = 1\n",
"self.handled_remote = 1\n",
"self.handled_args = 1\n",
"self.handled_kwargs = 1\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(VAR_10, VAR_12, VAR_11):...\n",
"VAR_17 = list()\n",
"VAR_18 = VAR_10.cursor()\n",
"VAR_18.execute(VAR_11)\n",
"VAR_19 = VAR_18.fetchall()\n",
"for row in VAR_19:\n",
"for classname in VAR_12.objects:\n",
"return VAR_17\n",
"for obj in VAR_12.objects[classname]:\n",
"if obj.id == row[0... | [
"def GetSQLObjects(database, documentcollection, query):...\n",
"ret = list()\n",
"cur = database.cursor()\n",
"cur.execute(query)\n",
"rows = cur.fetchall()\n",
"for row in rows:\n",
"for classname in documentcollection.objects:\n",
"return ret\n",
"for obj in documentcollection.objects[classname]:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"For",
"For",
"Return'",
"For",
"Condition",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = threading.Thread(target=self._run, name='ray_import_thread')\n",
"VAR_3.daemon = True\n",
"VAR_3.start()\n"
] | [
"def start(self):...\n",
"\"\"\"docstring\"\"\"\n",
"t = threading.Thread(target=self._run, name='ray_import_thread')\n",
"t.daemon = True\n",
"t.start()\n"
] | [
0,
0,
6,
6,
6
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def __repr__(self):...\n",
"return self.__str__()\n"
] | [
"def __repr__(self):...\n",
"return self.__str__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"VAR_23 = 'katotest-server-group'\n",
"VAR_21 = self.agent.type_to_payload('upsertGoogleServerGroupTagsDescription',\n {'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.bindings\n ['TEST_GCE_ZONE'], 'serverGroupName': 'katotest-server-group', 'tags':\n ['test-tag-... | [
"def upsert_google_server_group_tags(self):...\n",
"server_group_name = 'katotest-server-group'\n",
"payload = self.agent.type_to_payload('upsertGoogleServerGroupTagsDescription',\n {'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.bindings\n ['TEST_GCE_ZONE'], 'serverGroupName': 'katotest-se... | [
0,
0,
0,
0,
1,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __init__(self, VAR_5, VAR_4):...\n",
"self.el = VAR_5\n",
"self.txt = VAR_4\n"
] | [
"def __init__(self, el, txt):...\n",
"self.el = el\n",
"self.txt = txt\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"def FUNC_2(VAR_2, VAR_3='main'):...\n",
"VAR_8, VAR_6 = FUNC_1(VAR_2)\n",
"if VAR_8 not in VAR_9.path:\n",
"VAR_9.path.insert(0, VAR_8)\n",
"VAR_9.modules['__tng_runfile__'] = VAR_10 = imp.load_source(VAR_6, VAR_2)\n",
"if hasattr(VAR_10, VAR_3):\n",
"return getattr(VAR_10, VAR_3)\n",
"logging.getLog... | [
"def run_file(runfile, func_to_get='main'):...\n",
"import_path, name = _guess_import_path_and_name(runfile)\n",
"if import_path not in sys.path:\n",
"sys.path.insert(0, import_path)\n",
"sys.modules['__tng_runfile__'] = module = imp.load_source(name, runfile)\n",
"if hasattr(module, func_to_get):\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Return'",
"Expr'"
] |
[
"def FUNC_33(self, VAR_24):...\n",
"return self.regex().match(VAR_24) or None\n"
] | [
"def match(self, target):...\n",
"return self.regex().match(target) or None\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.version = VAR_78\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.version = version\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_7, VAR_14=errors.USER_DOESNT_EXIST, *VAR_15, **VAR_16):...\n",
"CLASS_3.__init__(self, VAR_7, VAR_14, *VAR_15, **kw)\n"
] | [
"def __init__(self, param, error=errors.USER_DOESNT_EXIST, *a, **kw):...\n",
"VRequired.__init__(self, param, error, *a, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, VAR_16):...\n",
"FUNC_1('LOADING APP')\n",
"self.path = VAR_16\n",
"VAR_21 = ['install', 'remove', 'upgrade', 'backup', 'restore']\n",
"self.scripts = {f: CLASS_2(self.path, f) for f in VAR_21}\n"
] | [
"def __init__(self, path):...\n",
"print_header('LOADING APP')\n",
"self.path = path\n",
"scripts = ['install', 'remove', 'upgrade', 'backup', 'restore']\n",
"self.scripts = {f: Script(self.path, f) for f in scripts}\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_13 = self.get_secure_cookie('session_key')\n",
"if not VAR_13:\n",
"return None\n",
"VAR_14 = Login_Session.get_by_key(VAR_13, self.sql_session)\n",
"if not VAR_14:\n",
"return None\n",
"return User.by_key(VAR_14.userkey, self.sql_session).sc... | [
"def get_current_user(self):...\n",
"\"\"\"docstring\"\"\"\n",
"session_key = self.get_secure_cookie('session_key')\n",
"if not session_key:\n",
"return None\n",
"login_session = Login_Session.get_by_key(session_key, self.sql_session)\n",
"if not login_session:\n",
"return None\n",
"return User.by_k... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_0(VAR_2, VAR_3='utf-8'):...\n",
"return f.read().decode(VAR_3)\n"
] | [
"def get_resource_as_string(name, charset='utf-8'):...\n",
"return f.read().decode(charset)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5=None, VAR_6=...\n",
"self.logger = logging.getLogger('fuxploider')\n",
"self.postData = VAR_4\n",
"self.formUrl = VAR_6\n",
"VAR_18 = urlparse(self.formUrl)\n",
"self.schema = VAR_18.scheme\n",
"self.host = VAR_18.netloc\n",
"self.uploadUrl ... | [
"def __init__(self, notRegex, trueRegex, session, size, postData,...\n",
"self.logger = logging.getLogger('fuxploider')\n",
"self.postData = postData\n",
"self.formUrl = formUrl\n",
"url = urlparse(self.formUrl)\n",
"self.schema = url.scheme\n",
"self.host = url.netloc\n",
"self.uploadUrl = urljoin(fo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_13(VAR_20, VAR_21):...\n",
"VAR_16 = {}\n",
"VAR_17 = [('manager', VAR_21)]\n",
"VAR_47 = FUNC_14(VAR_20)\n",
"FUNC_8('dataset/%d/managers/add' % VAR_47, VAR_17=files, VAR_16=args)\n"
] | [
"def add_manager(task_id, manager):...\n",
"args = {}\n",
"files = [('manager', manager)]\n",
"dataset_id = get_task_active_dataset_id(task_id)\n",
"admin_req('dataset/%d/managers/add' % dataset_id, files=files, args=args)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_64):...\n",
"if not VAR_64:\n",
"return None\n",
"VAR_88 = [int(i, 36) for i in VAR_64.split(',')]\n",
"VAR_89 = Comment._byID(VAR_88, data=True, return_dict=False)\n",
"return VAR_89\n"
] | [
"def run(self, id_str):...\n",
"if not id_str:\n",
"return None\n",
"cids = [int(i, 36) for i in id_str.split(',')]\n",
"comments = Comment._byID(cids, data=True, return_dict=False)\n",
"return comments\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"self.assertFalse(DatabaseQuery('DocType').execute(filters={'name': ['in',\n None]}))\n",
"self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters={'name': ['not in', None]}))\n",
"for result in [{'name': 'DocType'}, {'name': 'DocField'}]:\n",
"self... | [
"def test_in_not_in_filters(self):...\n",
"self.assertFalse(DatabaseQuery('DocType').execute(filters={'name': ['in',\n None]}))\n",
"self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters={'name': ['not in', None]}))\n",
"for result in [{'name': 'DocType'}, {'name': 'DocField... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"For",
"Expr'",
"For",
"Expr'"
] |
[
"def FUNC_12(self):...\n",
"VAR_14 = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/ports')\n",
"VAR_14.url_get('connections/1')\n",
"FUNC_1('get', VAR_14, 'https://1.2.3.4/api/v1/ports/connections/1')\n"
] | [
"def test_client_url_get(self):...\n",
"api = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/ports')\n",
"api.url_get('connections/1')\n",
"assert_call('get', api, 'https://1.2.3.4/api/v1/ports/connections/1')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(VAR_7):...\n",
""
] | [
"def get_pp_stats(osuId):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"from flask import Flask, g, jsonify, request\n",
"from jsonschema import validate, ValidationError\n",
"import argparse\n",
"import functools\n",
"import sqlite3\n",
"\"\"\"string\"\"\"\n",
"VAR_0 = Flask(__name__)\n",
"VAR_1 = './tissue.db'\n",
"VAR_2 = './schema.sql'\n",
"def FUNC_0(VAR_3=False... | [
"from flask import Flask, g, jsonify, request\n",
"from jsonschema import validate, ValidationError\n",
"import argparse\n",
"import functools\n",
"import sqlite3\n",
"\"\"\"\n[todo] Replace query string concatenations with DB-API’s parameter\nsubstitution to avoid SQL injection attacks.\n\"\"\"\n",
"ap... | [
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_13(self):...\n",
"VAR_34 = self.builder.get_object('unlock_failed_box')\n",
"VAR_35 = VAR_34.get_style_context()\n",
"VAR_35.add_class('NotifyRevealer')\n",
"VAR_36 = self.builder.get_object('unlock_failed_revealer')\n",
"VAR_36.set_reveal_child(not VAR_36.get_reveal_child())\n",
"VAR_37 = thr... | [
"def show_unlock_failed_revealer(self):...\n",
"unlock_failed_box = self.builder.get_object('unlock_failed_box')\n",
"context = unlock_failed_box.get_style_context()\n",
"context.add_class('NotifyRevealer')\n",
"unlock_failed_revealer = self.builder.get_object('unlock_failed_revealer')\n",
"unlock_failed_... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_13(self):...\n",
"self.run_test_case(self.scenario.delete_server_group(), max_retries=5)\n"
] | [
"def test_x_delete_server_group(self):...\n",
"self.run_test_case(self.scenario.delete_server_group(), max_retries=5)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_16(self, VAR_11):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"SendEventNotificationAsync('BufferUnload', {'unloaded_buffer': VAR_11})\n"
] | [
"def OnBufferUnload(self, deleted_buffer_file):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"SendEventNotificationAsync('BufferUnload', {'unloaded_buffer':\n deleted_buffer_file})\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Expr'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"if isinstance(VAR_6, (str, unicode)):\n",
"return bool(re.match(VAR_8, VAR_6))\n",
"return False\n"
] | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"if isinstance(value, (str, unicode)):\n",
"return bool(re.match(gl_type, value))\n",
"return False\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = len(self.build_graph)\n",
"self.run_tracker.pantsd_stats.set_affected_targets_size(VAR_35)\n",
"return VAR_35\n"
] | [
"def _set_affected_target_count_in_runtracker(self):...\n",
"\"\"\"docstring\"\"\"\n",
"target_count = len(self.build_graph)\n",
"self.run_tracker.pantsd_stats.set_affected_targets_size(target_count)\n",
"return target_count\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_7(VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = FUNC_2()\n",
"VAR_6 = FUNC_3(VAR_2)['size']\n",
"VAR_7 = FUNC_3(VAR_2)['age']\n",
"VAR_10 = FUNC_3(VAR_2)['passes']\n",
"print(VAR_11, '>', VAR_2, ' Current size: ', VAR_6, ' Last updated: ',\n VAR_7, ' Number of passes: ', VAR_10)\n",
... | [
"def log_event(path):...\n",
"\"\"\"docstring\"\"\"\n",
"time_now = get_time_now()\n",
"file_size = db_get_file_details(path)['size']\n",
"file_age = db_get_file_details(path)['age']\n",
"file_passes = db_get_file_details(path)['passes']\n",
"print(time_now, '>', path, ' Current size: ', file_size, ' La... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_7(self, VAR_9):...\n",
"VAR_6 = self.view.window().extract_variables()['file_name']\n",
"self.view.show_popup('`' + VAR_6 + '` copied to the clipboard')\n",
"sublime.set_clipboard(VAR_6)\n"
] | [
"def run(self, edit):...\n",
"filename = self.view.window().extract_variables()['file_name']\n",
"self.view.show_popup('`' + filename + '` copied to the clipboard')\n",
"sublime.set_clipboard(filename)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(VAR_1, VAR_2, VAR_3, VAR_5, VAR_4=False):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_21 = str(VAR_3).replace(\"'\", '`')\n",
"VAR_16 = f'INSERT INTO {VAR_2} {VAR_21} VALUES {VAR_5};'\n",
"if VAR_4:\n",
"print(VAR_16)\n",
"VAR_17 = VAR_1.cursor()\n",
"VAR_17.execute(VAR_16)\n",
"VAR_1.commit(... | [
"def db_insert(conn, table, columns, values, debug=False):...\n",
"\"\"\"docstring\"\"\"\n",
"col_str = str(columns).replace(\"'\", '`')\n",
"sql = f'INSERT INTO {table} {col_str} VALUES {values};'\n",
"if debug:\n",
"print(sql)\n",
"cursor = conn.cursor()\n",
"cursor.execute(sql)\n",
"conn.commit()... | [
0,
0,
4,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return False\n"
] | [
"def is_expired(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return False\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_27(VAR_21):...\n",
"VAR_33['msg'] = VAR_21\n",
"return VAR_21.type == 'event' and VAR_21.event == VAR_19 and VAR_20(VAR_21)\n"
] | [
"def match(msg):...\n",
"result['msg'] = msg\n",
"return msg.type == 'event' and msg.event == event and condition(msg)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"VAR_6 = find_paths(VAR_2, 'Chaos', 'Chaos')\n",
"self.assertListEqual(FUNC_0(), VAR_6)\n",
"VAR_7 = find_paths(VAR_2.copy(), 'Chaos', 'Chromatic')\n",
"self.assertListEqual(VAR_3, VAR_7)\n"
] | [
"def test_find_paths(self):...\n",
"paths_small_same_currency = find_paths(expected_graph_small, 'Chaos', 'Chaos')\n",
"self.assertListEqual(expected_paths_small_same_currency(),\n paths_small_same_currency)\n",
"paths_small_different_currency = find_paths(expected_graph_small.copy(),\n 'Chaos', 'Chroma... | [
0,
0,
1,
0,
1
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_13(self, VAR_22):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.warning(\"\"\"Authorization error.\n%s\nPeer: %s\nIP: %s\"\"\", VAR_22, api.\n get_peer_identity().to_bytes(), self.request.remote_addr)\n",
"self.abort(403, detail=str(error))\n"
] | [
"def authorization_error(self, error):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.warning(\"\"\"Authorization error.\n%s\nPeer: %s\nIP: %s\"\"\", error, api.\n get_peer_identity().to_bytes(), self.request.remote_addr)\n",
"self.abort(403, detail=str(error))\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"@staticmethod...\n",
"VAR_11 = VAR_1.split(':')[1].split(',')\n",
"VAR_12 = int(VAR_11[0])\n",
"VAR_13 = int(VAR_11[1])\n",
"VAR_14 = int(VAR_11[2])\n",
"return VAR_12, VAR_13, VAR_14\n"
] | [
"@staticmethod...\n",
"board_split = board_str.split(':')[1].split(',')\n",
"ghost_count = int(board_split[0])\n",
"vampire_count = int(board_split[1])\n",
"zombie_count = int(board_split[2])\n",
"return ghost_count, vampire_count, zombie_count\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_20(self, VAR_17, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def create_export(self, context, volume):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_13(self, VAR_9, VAR_10=None, VAR_11=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_28 = self.get_and_check_task(VAR_9, VAR_10, VAR_11, VAR_16={\n 'orthophoto_area': Envelope(Cast('orthophoto', GeometryField()))})\n",
"VAR_30 = get_tile_json(VAR_28.name, [\n '/api/projects/{}/tasks/{}/tiles/{{z}... | [
"def get(self, request, pk=None, project_pk=None):...\n",
"\"\"\"docstring\"\"\"\n",
"task = self.get_and_check_task(request, pk, project_pk, annotate={\n 'orthophoto_area': Envelope(Cast('orthophoto', GeometryField()))})\n",
"json = get_tile_json(task.name, [\n '/api/projects/{}/tasks/{}/tiles/{{z}}/{{... | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(self):...\n",
"VAR_1 = VAR_0.copy()\n",
"VAR_1['SHIB_eppn'] = self.user.username\n",
"VAR_2 = self._get(VAR_1)\n",
"self.assertEqual(VAR_2.status_code, 302)\n",
"self.assertEqual(User.objects.count(), 1)\n",
"VAR_3 = User.objects.first()\n",
"self.assertEqual(VAR_3.email, 'teemu.teekkari@a... | [
"def test_valid_old(self):...\n",
"meta = DEF_SHIBD_META.copy()\n",
"meta['SHIB_eppn'] = self.user.username\n",
"response = self._get(meta)\n",
"self.assertEqual(response.status_code, 302)\n",
"self.assertEqual(User.objects.count(), 1)\n",
"user = User.objects.first()\n",
"self.assertEqual(user.email,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_40(self):...\n",
"self.cursor.execute('create table t1(a int, b varchar(10))')\n",
"VAR_28 = [(i, str(i)) for i in range(1, 6)]\n",
"self.cursor.executemany('insert into t1(a, b) values (?,?)', VAR_28)\n",
"VAR_26 = self.cursor.execute('select count(*) from t1').fetchone()[0]\n",
"self.assertEqu... | [
"def test_executemany(self):...\n",
"self.cursor.execute('create table t1(a int, b varchar(10))')\n",
"params = [(i, str(i)) for i in range(1, 6)]\n",
"self.cursor.executemany('insert into t1(a, b) values (?,?)', params)\n",
"count = self.cursor.execute('select count(*) from t1').fetchone()[0]\n",
"self.a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"For",
"Expr'",
"Expr'"
] |
[
"@VAR_0.route('/initDB')...\n",
"db.create_all()\n",
"return 'This is naughty and MUST not be in production!'\n"
] | [
"@app.route('/initDB')...\n",
"db.create_all()\n",
"return 'This is naughty and MUST not be in production!'\n"
] | [
0,
0,
0
] | [
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_33(VAR_57, VAR_22):...\n",
"if not len(VAR_57):\n",
"VAR_56.append('/%s' % ('/'.join(VAR_22),))\n",
"if VAR_57[0] == '.':\n",
"FUNC_33(VAR_57[1:], VAR_22)\n",
"if VAR_57[0] == '..':\n",
"FUNC_33(VAR_57[1:], VAR_22[:-1])\n",
"VAR_65 = [x[VAR_1] for x in self.get_path('/'.join(VAR_22))]\n",
... | [
"def foo(p, cwd):...\n",
"if not len(p):\n",
"found.append('/%s' % ('/'.join(cwd),))\n",
"if p[0] == '.':\n",
"foo(p[1:], cwd)\n",
"if p[0] == '..':\n",
"foo(p[1:], cwd[:-1])\n",
"names = [x[A_NAME] for x in self.get_path('/'.join(cwd))]\n",
"matches = [x for x in names if fnmatch.fnmatchcase(x, p[0... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"For",
"Expr'"
] |
[
"def FUNC_6(self, VAR_4):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_4.id is None:\n",
"VAR_12 = self.__id_map[VAR_4.id]\n",
"self.remove(VAR_12)\n",
"self.add(VAR_4)\n"
] | [
"def replace(self, entity):...\n",
"\"\"\"docstring\"\"\"\n",
"if entity.id is None:\n",
"old_entity = self.__id_map[entity.id]\n",
"self.remove(old_entity)\n",
"self.add(entity)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_4(self, VAR_9=10000):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_27 = [self.primary_subscribe_client]\n",
"for subscribe_client in VAR_27:\n",
"for _ in range(VAR_9):\n",
"VAR_16 = subscribe_client.get_message()\n",
"if VAR_16 is None:\n",
"VAR_5 = VAR_16['channel']\n",
"VAR_7 = VAR_16['data']... | [
"def process_messages(self, max_messages=10000):...\n",
"\"\"\"docstring\"\"\"\n",
"subscribe_clients = [self.primary_subscribe_client]\n",
"for subscribe_client in subscribe_clients:\n",
"for _ in range(max_messages):\n",
"message = subscribe_client.get_message()\n",
"if message is None:\n",
"channel... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"For",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Assign'"
] |
[
"def FUNC_3(self):...\n",
"VAR_3 = self.app.get('/manage/add/element/org/repo')\n",
"self.assertEqual(VAR_3.status_int, 200)\n",
"self.assertEqual(VAR_3.normal_body, 'OK')\n",
"VAR_1 = self.tasks.get_filtered_tasks()\n",
"self.assertEqual(len(VAR_1), 1)\n",
"self.assertEqual(VAR_1[0].url, util.ingest_li... | [
"def test_add_element(self):...\n",
"response = self.app.get('/manage/add/element/org/repo')\n",
"self.assertEqual(response.status_int, 200)\n",
"self.assertEqual(response.normal_body, 'OK')\n",
"tasks = self.tasks.get_filtered_tasks()\n",
"self.assertEqual(len(tasks), 1)\n",
"self.assertEqual(tasks[0].... | [
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_25 = []\n",
"VAR_26 = []\n",
"VAR_27 = CommerceConfiguration.current()\n",
"VAR_28 = {'username': VAR_10.username}\n",
"VAR_29 = VAR_27.is_cache_enabled\n",
"VAR_30 = VAR_27.CACHE_KEY + '.' + str(VAR_10.id) if VAR_29 else None\n",
"VAR_31 =... | [
"def get_user_orders(user):...\n",
"\"\"\"docstring\"\"\"\n",
"no_data = []\n",
"user_orders = []\n",
"commerce_configuration = CommerceConfiguration.current()\n",
"user_query = {'username': user.username}\n",
"use_cache = commerce_configuration.is_cache_enabled\n",
"cache_key = commerce_configuration... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_3(self, VAR_10):...\n",
"self.serial.write(bytes(VAR_10, encoding='utf-8'))\n"
] | [
"def write(self, string):...\n",
"self.serial.write(bytes(string, encoding='utf-8'))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"\"\"\"\nfile descriptor\n\n\"\"\"\n",
"__author__ = \"Tadhg O'Rourke\"\n",
"__date__ = '29/08/2019'\n",
"import sqlite3\n",
"VAR_0 = sqlite3.connect('contacts.sqlite')\n",
"VAR_1 = (\n \"UPDATE contacts SET email = 'test@myemail.ie' WHERE email LIKE 'test@email.com'\"\n )\n",
"VAR_2 = VAR_0.curso... | [
"\"\"\"\nfile descriptor\n\n\"\"\"\n",
"__author__ = \"Tadhg O'Rourke\"\n",
"__date__ = '29/08/2019'\n",
"import sqlite3\n",
"db = sqlite3.connect('contacts.sqlite')\n",
"update_sql = (\n \"UPDATE contacts SET email = 'test@myemail.ie' WHERE email LIKE 'test@email.com'\"\n )\n",
"update_cursor = d... | [
0,
0,
0,
0,
0,
4,
0,
4,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Assign'",
"Assign'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"For",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_37(self, VAR_40):...\n",
"\"\"\"docstring\"\"\"\n",
"self.set_name(VAR_40, len(self) - 1)\n"
] | [
"def add_name(self, name):...\n",
"\"\"\"docstring\"\"\"\n",
"self.set_name(name, len(self) - 1)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.norun = True\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.norun = True\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_2():...\n",
"super(CLASS_7, self).__init__(slideParser.parse(VAR_10, slideLexer) if\n VAR_10 else [])\n"
] | [
"def innerFunc():...\n",
"super(Stretch, self).__init__(slideParser.parse(txt, slideLexer) if txt else []\n )\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_17 = [VAR_28.mtime for VAR_28 in self.input if VAR_28.exists]\n",
"if VAR_17:\n",
"return max(VAR_17)\n",
"return None\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"existing = [f.mtime for f in self.input if f.exists]\n",
"if existing:\n",
"return max(existing)\n",
"return None\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_1(self, VAR_5, VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_5 not in ('strings', 'files'):\n",
"VAR_0.error(\"Bad parameter '%s' for submit_type\", VAR_5)\n",
"VAR_13 = Folders.create_temp()\n",
"return False\n",
"VAR_14 = {'data': [], 'errors': []}\n",
"if VAR_5 == 'strings':\n",
"fo... | [
"def pre(self, submit_type, data):...\n",
"\"\"\"docstring\"\"\"\n",
"if submit_type not in ('strings', 'files'):\n",
"log.error(\"Bad parameter '%s' for submit_type\", submit_type)\n",
"path_tmp = Folders.create_temp()\n",
"return False\n",
"submit_data = {'data': [], 'errors': []}\n",
"if submit_typ... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Assign'",
"Condition",
"For",
"Condition",
"Expr'",
"For",
"Return'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"@VAR_0.route('/register', methods=['GET', 'POST'])...\n",
"VAR_46 = CLASS_0(request.form)\n",
"if request.method == 'POST' and VAR_46.validate():\n",
"VAR_41 = VAR_46.name.data\n",
"return render_template('register.html', VAR_46=form)\n",
"VAR_43 = VAR_46.email.data\n",
"VAR_42 = VAR_46.username.data\n... | [
"@app.route('/register', methods=['GET', 'POST'])...\n",
"form = RegisterForm(request.form)\n",
"if request.method == 'POST' and form.validate():\n",
"name = form.name.data\n",
"return render_template('register.html', form=form)\n",
"email = form.email.data\n",
"username = form.username.data\n",
"pass... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_6():...\n",
"VAR_10 = kube_utils.get_pods(VAR_0, VAR_4, VAR_2='kube-system',\n status_phase='Running')\n",
"assert len(VAR_10) >= VAR_5\n"
] | [
"def _check_pods_count():...\n",
"pods = kube_utils.get_pods(host, label, namespace='kube-system',\n status_phase='Running')\n",
"assert len(pods) >= min_pods_count\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assert'"
] |
[
"@require_http_methods(['GET'])...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = get_next_url_for_login_page(VAR_3)\n",
"if VAR_3.user.is_authenticated():\n",
"return redirect(VAR_7)\n",
"VAR_11 = FUNC_6(VAR_3)\n",
"VAR_12 = None\n",
"if '?' in VAR_7:\n",
"if is_request_in_themed_site() and not configurat... | [
"@require_http_methods(['GET'])...\n",
"\"\"\"docstring\"\"\"\n",
"redirect_to = get_next_url_for_login_page(request)\n",
"if request.user.is_authenticated():\n",
"return redirect(redirect_to)\n",
"form_descriptions = _get_form_descriptions(request)\n",
"third_party_auth_hint = None\n",
"if '?' in red... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
6,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Condition",
"Condition",
"Assign'",
"Return'",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Condition",... |
[
"@property...\n",
"VAR_65 = '.' if self._workdir is None else self._workdir\n",
"if not os.path.isabs(VAR_65):\n",
"return os.path.abspath(os.path.join(self.workflow.basedir, VAR_65))\n",
"return VAR_65\n"
] | [
"@property...\n",
"workdir = '.' if self._workdir is None else self._workdir\n",
"if not os.path.isabs(workdir):\n",
"return os.path.abspath(os.path.join(self.workflow.basedir, workdir))\n",
"return workdir\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_6(self, VAR_10, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def create_volume_from_snapshot(self, volume, snapshot):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_7(self):...\n",
"return self.content\n"
] | [
"def read(self):...\n",
"return self.content\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_14(self, VAR_17, VAR_6):...\n",
"if self.container == NotImplemented:\n",
"self.create_container()\n",
"VAR_40 = ContainerPage(VAR_6)\n",
"VAR_41 = Gtk.HBox(False, 0)\n",
"VAR_42 = Gtk.Label(VAR_17)\n",
"VAR_41.pack_start(VAR_42, False, False, False)\n",
"VAR_43 = Gio.ThemedIcon(name='window... | [
"def create_tab(self, title, headerbar):...\n",
"if self.container == NotImplemented:\n",
"self.create_container()\n",
"page_instance = ContainerPage(headerbar)\n",
"tab_hbox = Gtk.HBox(False, 0)\n",
"tab_label = Gtk.Label(title)\n",
"tab_hbox.pack_start(tab_label, False, False, False)\n",
"icon = Gio... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7, VAR_12 = self.make_xsrf_handling_app(VAR_3='X-Some')\n",
"VAR_17 = VAR_7.get('/request').body\n",
"VAR_7.post('/request', VAR_20={'X-Some': token})\n",
"self.assertEqual([('POST', True)], VAR_12)\n"
] | [
"def test_xsrf_token_uses_xsrf_token_header(self):...\n",
"\"\"\"docstring\"\"\"\n",
"app, calls = self.make_xsrf_handling_app(xsrf_token_header='X-Some')\n",
"token = app.get('/request').body\n",
"app.post('/request', headers={'X-Some': token})\n",
"self.assertEqual([('POST', True)], calls)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_29(self, VAR_5):...\n",
"def FUNC_31():...\n",
"VAR_24 = vim.eval('tagfiles()')\n",
"VAR_25 = VAR_0.getcwd()\n",
"return [VAR_0.path.join(VAR_25, x) for x in VAR_24]\n"
] | [
"def _AddTagsFilesIfNeeded(self, extra_data):...\n",
"def GetTagFiles():...\n",
"tag_files = vim.eval('tagfiles()')\n",
"current_working_directory = os.getcwd()\n",
"return [os.path.join(current_working_directory, x) for x in tag_files]\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"if 'network' in VAR_5 and 'domains' in VAR_5['network']:\n",
"VAR_20 = dict((i['domain'], i['ip']) for i in VAR_5['network']['domains'])\n",
"VAR_20 = dict()\n",
"VAR_21 = dict((i['ip'], i['domain']) for i in VAR_5['network']['domains'])\n",
"VAR_21 = di... | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"if 'network' in report and 'domains' in report['network']:\n",
"domainlookups = dict((i['domain'], i['ip']) for i in report['network'][\n 'domains'])\n",
"domainlookups = dict()\n",
"iplookups = dict((i['ip'], i['domain']) for i in report['network']['do... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Return'",
"For",
"Assign'"
] |
[
"def FUNC_11(VAR_4):...\n",
"VAR_0, VAR_10 = FUNC_0()\n",
"VAR_18 = \"SELECT * from {} where token='{}'\".format(CFG('tokens_table_name'\n ), VAR_4)\n",
"VAR_20 = bool(FUNC_3(VAR_10, VAR_18))\n",
"FUNC_1(VAR_0)\n",
"return VAR_20\n"
] | [
"def isValidToken(token):...\n",
"conn, c = connectDB()\n",
"req = \"SELECT * from {} where token='{}'\".format(CFG('tokens_table_name'),\n token)\n",
"answer = bool(queryOne(c, req))\n",
"closeDB(conn)\n",
"return answer\n"
] | [
0,
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_16(VAR_19=['Christmas Mike', 'christmasmike'], VAR_20=VAR_0):...\n",
"VAR_18 = []\n",
"for VAR_125 in VAR_20:\n",
"VAR_4, VAR_36 = FUNC_2(VAR_125)\n",
"return VAR_18\n",
"for VAR_94 in range(VAR_4, VAR_36 + 1):\n",
"VAR_15 = VAR_125.replace('###', str(VAR_94))\n",
"VAR_14 = FUNC_10(VAR_15)\n... | [
"def get_urls_with_players(players=['Christmas Mike', 'christmasmike'],...\n",
"urls = []\n",
"for base in base_urls:\n",
"start, end = get_valid_url_range(base)\n",
"return urls\n",
"for i in range(start, end + 1):\n",
"bracket_url = base.replace('###', str(i))\n",
"bracket = get_sanitized_bracket(br... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'",
"For",
"Assign'",
"Assign'",
"For",
"Condition",
"Expr'"
] |
[
"def __init__(self, VAR_18, *VAR_15, **VAR_16):...\n",
"CLASS_3.__init__(self, VAR_18, errors.NO_URL, *VAR_15, **kw)\n"
] | [
"def __init__(self, item, *a, **kw):...\n",
"VRequired.__init__(self, item, errors.NO_URL, *a, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"VAR_5 = [{'cloudProvider': 'gce', 'loadBalancerName': self.__lb_name,\n 'ipProtocol': 'TCP', 'portRange': '8080', 'provider': 'gce', 'stack':\n self.TEST_STACK, 'detail': 'frontend', 'credentials': self.bindings[\n 'GCE_CREDENTIALS'], 'region': self.TEST_REGION, 'listeners': [{... | [
"def create_load_balancer(self):...\n",
"job = [{'cloudProvider': 'gce', 'loadBalancerName': self.__lb_name,\n 'ipProtocol': 'TCP', 'portRange': '8080', 'provider': 'gce', 'stack':\n self.TEST_STACK, 'detail': 'frontend', 'credentials': self.bindings[\n 'GCE_CREDENTIALS'], 'region': self.TEST_REGION, 'li... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(VAR_5):...\n",
"VAR_13 = 'user:%s' % VAR_5\n",
"if VAR_2.hlen(VAR_13) == 0:\n",
"return None\n",
"VAR_14 = VAR_2.hgetall(VAR_13)\n",
"VAR_6 = CLASS_0()\n",
"VAR_6.user_id = VAR_14['user_id']\n",
"VAR_6.email = VAR_14['email']\n",
"VAR_6.password_hash = generate_password_hash(VAR_14['pass... | [
"def auth_get_user_by_id(user_id):...\n",
"key = 'user:%s' % user_id\n",
"if db.hlen(key) == 0:\n",
"return None\n",
"user_data = db.hgetall(key)\n",
"user = User()\n",
"user.user_id = user_data['user_id']\n",
"user.email = user_data['email']\n",
"user.password_hash = generate_password_hash(user_dat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_11(self, VAR_13):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_26 = self.add_argument_group('ParlAI Image Preprocessing Arguments')\n",
"VAR_26.add_argument('--image-size', type=int, default=256, help=\n 'resizing dimension for images')\n",
"VAR_26.add_argument('--image-cropsize', type=int, default=2... | [
"def add_image_args(self, image_mode):...\n",
"\"\"\"docstring\"\"\"\n",
"parlai = self.add_argument_group('ParlAI Image Preprocessing Arguments')\n",
"parlai.add_argument('--image-size', type=int, default=256, help=\n 'resizing dimension for images')\n",
"parlai.add_argument('--image-cropsize', type=int... | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def __lt__(self, VAR_16):...\n",
"VAR_39 = self.workflow._ruleorder.compare(self, VAR_16)\n",
"return VAR_39 < 0\n"
] | [
"def __lt__(self, rule):...\n",
"comp = self.workflow._ruleorder.compare(self, rule)\n",
"return comp < 0\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_17(self, VAR_54, VAR_39):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_39 == self.INTEGER:\n",
"if VAR_39 == self.DATE:\n",
"int(VAR_54)\n",
"if VAR_39 == self.DATE_TIME:\n",
"datetime.datetime.strptime(VAR_54, '%Y-%m-%d')\n",
"datetime.datetime.strptime(VAR_54, '%Y-%m-%dT%H:%M:%S')\n"
] | [
"def _sanitize_value(self, value, data_type):...\n",
"\"\"\"docstring\"\"\"\n",
"if data_type == self.INTEGER:\n",
"if data_type == self.DATE:\n",
"int(value)\n",
"if data_type == self.DATE_TIME:\n",
"datetime.datetime.strptime(value, '%Y-%m-%d')\n",
"datetime.datetime.strptime(value, '%Y-%m-%dT%H:%M:... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(self, VAR_6, VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"if isinstance(VAR_7, unicode):\n",
"if isinstance(VAR_7, str):\n",
"return u'<input name=\"%s\" value=\"%s\" size=%d>' % (html_escape(VAR_6),\n html_escape(VAR_7), self.input_size)\n",
"VAR_7 = VAR_7.decode('utf-8')\n",
"if VAR_7 is ... | [
"def text_input(self, name, value):...\n",
"\"\"\"docstring\"\"\"\n",
"if isinstance(value, unicode):\n",
"if isinstance(value, str):\n",
"return u'<input name=\"%s\" value=\"%s\" size=%d>' % (html_escape(name),\n html_escape(value), self.input_size)\n",
"value = value.decode('utf-8')\n",
"if value i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_18, VAR_35=10000, **VAR_16):...\n",
"CLASS_17.__init__(self, VAR_18, VAR_35=length, VAR_36=errors.NO_MSG_BODY, **kw)\n"
] | [
"def __init__(self, item, length=10000, **kw):...\n",
"VLength.__init__(self, item, length=length, empty_error=errors.NO_MSG_BODY,\n **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, VAR_7=True, VAR_8=False):...\n",
"\"\"\"docstring\"\"\"\n",
"super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n",
"self.register('type', 'bool', FUNC_0)\n",
"self.register('type', 'class', FUNC_1)\n",
"self.parlai_home = VAR_20.path.di... | [
"def __init__(self, add_parlai_args=True, add_model_args=False):...\n",
"\"\"\"docstring\"\"\"\n",
"super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n",
"self.register('type', 'bool', str2bool)\n",
"self.register('type', 'class', str2class)\n",
"self.parl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_6(self, VAR_59, VAR_60):...\n",
"if self.remember:\n",
"VAR_96 = '%s_%s' % (VAR_60, self.nav.get_param)\n",
"if VAR_59 not in self.nav.options:\n",
"VAR_97 = copy(VAR_101.user.sort_options) if VAR_101.user else {}\n",
"VAR_59 = self.nav.default\n",
"if self.remember and VAR_101.user_is_loggedi... | [
"def run(self, sort, where):...\n",
"if self.remember:\n",
"pref = '%s_%s' % (where, self.nav.get_param)\n",
"if sort not in self.nav.options:\n",
"user_prefs = copy(c.user.sort_options) if c.user else {}\n",
"sort = self.nav.default\n",
"if self.remember and c.user_is_loggedin and sort != user_pref:\n"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_11(self):...\n",
"self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name', 'issingle, version()'], limit_start=0, limit_page_length=1)\n",
"self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name',\n 'issingle, IF(issingle=1, (selec... | [
"def test_query_fields_sanitizer(self):...\n",
"self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name', 'issingle, version()'], limit_start=0, limit_page_length=1)\n",
"self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name',\n 'issingle, I... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_10(self) ->str:...\n",
"\"\"\"docstring\"\"\"\n",
"return self.stderr_interceptor.flush_all()\n",
"return ''\n"
] | [
"def flush_stderr(self) ->str:...\n",
"\"\"\"docstring\"\"\"\n",
"return self.stderr_interceptor.flush_all()\n",
"return ''\n"
] | [
0,
0,
6,
0
] | [
"FunctionDef'",
"Docstring",
"Return'",
"Return'"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.norun = True\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.norun = True\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_10(self, VAR_11, VAR_3):...\n",
"return set()\n"
] | [
"def get_parameters(self, levelfields, doc):...\n",
"return set()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __exit__(self, VAR_15, VAR_16, VAR_17):...\n",
"self.connection.commit()\n",
"self.connection.close()\n",
"self.lock.release()\n",
"if VAR_15 is not None or VAR_16 is not None or VAR_17 is not None:\n",
"return False\n"
] | [
"def __exit__(self, type_, value, traceback):...\n",
"self.connection.commit()\n",
"self.connection.close()\n",
"self.lock.release()\n",
"if type_ is not None or value is not None or traceback is not None:\n",
"return False\n"
] | [
0,
2,
2,
2,
2,
2
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Return'"
] |
[
"def FUNC_45(self):...\n",
"return [i.name for i in self.obj.__mapper__.columns if isinstance(i.type,\n ImageColumn)]\n"
] | [
"def get_image_column_list(self):...\n",
"return [i.name for i in self.obj.__mapper__.columns if isinstance(i.type,\n ImageColumn)]\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_12(VAR_1, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = db.connection.cursor(db.pymysql.cursors.DictCursor)\n",
"VAR_11.execute('string', (VAR_1, VAR_2))\n",
"VAR_14 = VAR_11.fetchone()\n",
"VAR_15 = VAR_14['state'] if VAR_14 else 'REVEALED'\n",
"VAR_11.execute('string', {'player_id': VA... | [
"def reveal_achievement(achievement_id, player_id):...\n",
"\"\"\"docstring\"\"\"\n",
"cursor = db.connection.cursor(db.pymysql.cursors.DictCursor)\n",
"cursor.execute(\n \"\"\"SELECT\n state\n FROM player_achievements\n WHERE achieve... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.