lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_9(VAR_7, VAR_8, VAR_9):...\n",
"VAR_11 = f\"\"\"\n INSERT INTO {VAR_2} (user_id, product_id, title, comment, rating)\n VALUES({VAR_8}, {VAR_7}, '{VAR_9['title']}',\n '{VAR_9['comment']}', {VAR_9['rating']})\n \"\"\"\n",
"VAR_12 = create_connection()\n",
"V... | [
"def add_product_review(productId, userId, review):...\n",
"sql_query = f\"\"\"\n INSERT INTO {REVIEWS_TABLE} (user_id, product_id, title, comment, rating)\n VALUES({userId}, {productId}, '{review['title']}',\n '{review['comment']}', {review['rating']})\n \"\"\"\n",
"... | [
0,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(self, VAR_12, VAR_13):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = self.oldest_quant(VAR_12).in_date\n",
"if not VAR_22:\n",
"VAR_22 = VAR_13\n",
"VAR_23 = 'string' % (VAR_12.id, VAR_22)\n",
"self._cr.execute(VAR_23)\n",
"VAR_24 = self._cr.fetchall()\n",
"if VAR_24:\n",
"VAR_30 = self.... | [
"def closest_invoice_line(self, prod, date_invoice):...\n",
"\"\"\"docstring\"\"\"\n",
"in_date = self.oldest_quant(prod).in_date\n",
"if not in_date:\n",
"in_date = date_invoice\n",
"query = (\n \"\"\"\n SELECT ail.id, ai.date_invoice\n FROM account_invoice_line ail\n ... | [
0,
0,
0,
0,
0,
4,
4,
4,
4,
0,
0,
4,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"For",
"Return'"
] |
[
"def FUNC_4(**VAR_2):...\n",
"VAR_20 = VAR_2.get('transaction_code', None)\n",
"VAR_4 = get_object_or_404(Transaction, code=transaction_code)\n",
"return VAR_4\n"
] | [
"def get_transaction_from_kwargs(**kwargs):...\n",
"transaction_code = kwargs.get('transaction_code', None)\n",
"transaction = get_object_or_404(Transaction, code=transaction_code)\n",
"return transaction\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.require_user_role('user', self.params.cc)\n",
"self.version = utils.get_latest_version(self.params.cc)\n",
"self.facility = model.Facility.get_by_key_name(self.params.facility_name,\n self.version)\n",
"if not self.facility:\n",
"self.facilit... | [
"def init(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.require_user_role('user', self.params.cc)\n",
"self.version = utils.get_latest_version(self.params.cc)\n",
"self.facility = model.Facility.get_by_key_name(self.params.facility_name,\n self.version)\n",
"if not self.facility:\n",
"self.facility_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_0(self, VAR_1):...\n",
"VAR_8 = VAR_9(self.container, self)\n",
"self.frames[VAR_9] = VAR_8\n",
"VAR_8.grid(row=0, column=0, sticky='nsew')\n",
"self.show_frame(VAR_8)\n"
] | [
"def create_frame(self, F):...\n",
"new_frame = SearchPage(self.container, self)\n",
"self.frames[SearchPage] = new_frame\n",
"new_frame.grid(row=0, column=0, sticky='nsew')\n",
"self.show_frame(new_frame)\n"
] | [
0,
4,
4,
4,
4
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"import binascii\n",
"import copy\n",
"import datetime\n",
"import hashlib\n",
"import psycopg2\n",
"import pytz\n",
"import time\n",
"import uuid\n",
"from bzs import const\n",
"def FUNC_0():...\n",
"\"\"\"docstring\"\"\"\n",
"return float(time.time())\n"
] | [
"import binascii\n",
"import copy\n",
"import datetime\n",
"import hashlib\n",
"import psycopg2\n",
"import pytz\n",
"import time\n",
"import uuid\n",
"from bzs import const\n",
"def get_current_time():...\n",
"\"\"\"docstring\"\"\"\n",
"return float(time.time())\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_18(self, VAR_14, VAR_28):...\n",
"VAR_12 = \"ssh %s 'hyperion --config %s/%s.yaml slave --kill'\" % (VAR_28,\n VAR_1, VAR_14)\n",
"self.logger.debug('Run cmd:\\n%s' % VAR_12)\n",
"FUNC_7(self.session, VAR_12)\n"
] | [
"def stop_remote_component(self, comp_name, host):...\n",
"cmd = \"ssh %s 'hyperion --config %s/%s.yaml slave --kill'\" % (host,\n TMP_SLAVE_DIR, comp_name)\n",
"self.logger.debug('Run cmd:\\n%s' % cmd)\n",
"send_main_session_command(self.session, cmd)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_21(self, VAR_5):...\n",
"for p in rt.runtime().system.partitions:\n",
"p._max_jobs = VAR_5\n"
] | [
"def set_max_jobs(self, value):...\n",
"for p in rt.runtime().system.partitions:\n",
"p._max_jobs = value\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"For",
"Assign'"
] |
[
"def FUNC_17(self):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"VAR_5 = {}\n",
"FUNC_1(VAR_5)\n",
"SendEventNotificationAsync('BufferVisit', VAR_5)\n"
] | [
"def OnBufferVisit(self):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"extra_data = {}\n",
"_AddUltiSnipsDataIfNeeded(extra_data)\n",
"SendEventNotificationAsync('BufferVisit', extra_data)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(VAR_1, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = set()\n",
"for translated_resource in VAR_1:\n",
"VAR_7.add(translated_resource.resource.project)\n",
"bulk_update(VAR_1, update_fields=['total_strings', 'approved_strings',\n 'fuzzy_strings', 'strings_with_errors', 'strings_with_war... | [
"def update_stats(translated_resources, locale):...\n",
"\"\"\"docstring\"\"\"\n",
"projects = set()\n",
"for translated_resource in translated_resources:\n",
"projects.add(translated_resource.resource.project)\n",
"bulk_update(translated_resources, update_fields=['total_strings',\n 'approved_strings',... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"For",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(self):...\n",
"return self.current_user()['last_name']\n"
] | [
"def current_last_name(self):...\n",
"return self.current_user()['last_name']\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@mock.patch('requests.post', FUNC_0)...\n",
"VAR_4 = '/api/apps'\n",
"VAR_5 = self.client.post(VAR_4)\n",
"self.assertEqual(VAR_5.status_code, 201)\n",
"VAR_6 = VAR_5.data['id']\n",
"VAR_4 = '/api/apps/{app_id}/containers'.format(**locals())\n",
"VAR_5 = self.client.get(VAR_4)\n",
"self.assertEqual(V... | [
"@mock.patch('requests.post', mock_import_repository_task)...\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"url = '/api/apps/{app_id}/containers'.format(**locals())\n",
"response = self.client.get(url)... | [
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
] | [
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assi... |
[
"def FUNC_3(self, VAR_1):...\n",
"self.__checkCompilation(VAR_1, False)\n"
] | [
"def compilation_ko(self, script):...\n",
"self.__checkCompilation(script, False)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"\"\"\"Worker script.\"\"\"\n",
"import os\n",
"import time\n",
"import uuid\n",
"import random\n",
"import socket\n",
"import subprocess\n",
"from urlparse import urlsplit, urlunsplit\n",
"from tempfile import NamedTemporaryFile\n",
"from contextlib import contextmanager\n",
"from requests.exce... | [
"\"\"\"Worker script.\"\"\"\n",
"import os\n",
"import time\n",
"import uuid\n",
"import random\n",
"import socket\n",
"import subprocess\n",
"from urlparse import urlsplit, urlunsplit\n",
"from tempfile import NamedTemporaryFile\n",
"from contextlib import contextmanager\n",
"from requests.exce... | [
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,
2,
2,
0,
2,
2,
2,
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0... | [
"Expr'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Condition",
"Docstring",
"Assign'",
"Expr'",
"Ex... |
[
"def FUNC_13(VAR_1, VAR_3):...\n",
"VAR_18 = \"SELECT has_tokens FROM {} WHERE name = '{}'\".format(CFG(\n 'poll_table_name'), VAR_3)\n",
"return FUNC_3(VAR_1, VAR_18) == 1\n"
] | [
"def checkTokenNeeded(cursor, poll_name):...\n",
"req = \"SELECT has_tokens FROM {} WHERE name = '{}'\".format(CFG(\n 'poll_table_name'), poll_name)\n",
"return queryOne(cursor, req) == 1\n"
] | [
0,
4,
4
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(VAR_5, VAR_6, VAR_3, VAR_2, VAR_4):...\n",
"VAR_22 = VAR_3[VAR_5]\n",
"VAR_7 = SymbolicInput(VAR_4[0], 'IsZero', VAR_22, VAR_6)\n",
"VAR_3[VAR_4[0]] = VAR_7\n",
"VAR_4[0] -= 1\n",
"return (VAR_7.getId(), FUNC_3(VAR_6, VAR_2)), -1\n"
] | [
"def symbAdrJump(condition, address, symbols, items, symId):...\n",
"sym = symbols[condition]\n",
"x = SymbolicInput(symId[0], 'IsZero', sym, address)\n",
"symbols[symId[0]] = x\n",
"symId[0] -= 1\n",
"return (x.getId(), jumpToLoc(address, items)), -1\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_66, VAR_23):...\n",
"if VAR_66:\n",
"VAR_103 = cache.get(VAR_100(self.cache_prefix + '_' + VAR_66))\n",
"VAR_101.errors.add(errors.EXPIRED)\n",
"VAR_15 = Account._byID(VAR_103, data=True)\n",
"return None\n",
"if VAR_23 and VAR_15.name.lower() != VAR_23.lower():\n",
"VAR_101.erro... | [
"def run(self, key, name):...\n",
"if key:\n",
"uid = cache.get(str(self.cache_prefix + '_' + key))\n",
"c.errors.add(errors.EXPIRED)\n",
"a = Account._byID(uid, data=True)\n",
"return None\n",
"if name and a.name.lower() != name.lower():\n",
"c.errors.add(errors.BAD_USERNAME)\n",
"if a:\n",
"retu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Condition",
"Return'"
] |
[
"\"\"\"string\"\"\"\n",
"import logging as log\n",
"import numpy as np\n",
"from numpy.random import randn\n",
"from openqml import Device, DeviceError\n",
"from openqml import Variable\n",
"import projectq as pq\n",
"import projectq.setups.ibm\n",
"from projectq.ops import HGate, XGate, YGate, ZGat... | [
"\"\"\"\nProjectQ plugin\n========================\n\n**Module name:** :mod:`openqml.plugins.projectq`\n\n.. currentmodule:: openqml.plugins.projectq\n\nThis plugin provides the interface between OpenQML and ProjecQ.\nIt enables OpenQML to optimize quantum circuits simulable with ProjectQ.\n\nProjecQ supports sever... | [
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'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Expr'",
"Expr'",
"For",
... |
[
"def FUNC_1(self, VAR_5):...\n",
"for p in self.ALLOWED_PATHS:\n",
"if VAR_5.startswith(p):\n",
"return False\n",
"return True\n"
] | [
"def _path_allowed(self, path):...\n",
"for p in self.ALLOWED_PATHS:\n",
"if path.startswith(p):\n",
"return False\n",
"return True\n"
] | [
0,
5,
5,
5,
5
] | [
"FunctionDef'",
"For",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return 'Running check for local component %s with pid %s' % (self.comp_name,\n self.pid)\n"
] | [
"def info(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return 'Running check for local component %s with pid %s' % (self.comp_name,\n self.pid)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_0(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], VAR_0)\n"
] | [
"def token_session_key(remote_app):...\n",
"\"\"\"docstring\"\"\"\n",
"return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], remote_app)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"return shellutil.run('/sbin/service waagent stop', VAR_8=False)\n"
] | [
"def stop_agent_service(self):...\n",
"return shellutil.run('/sbin/service waagent stop', chk_err=False)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"async def FUNC_8(VAR_6):...\n",
"VAR_10 = {'Authorization': f'Bearer {VAR_1}'}\n",
"VAR_8 = await VAR_6.get('/results', VAR_10=headers)\n",
"VAR_9 = await VAR_8.json()\n",
"assert VAR_8.status == 200\n"
] | [
"async def test_positive_get_all_results(test_cli):...\n",
"headers = {'Authorization': f'Bearer {access_token}'}\n",
"resp = await test_cli.get('/results', headers=headers)\n",
"resp_json = await resp.json()\n",
"assert resp.status == 200\n"
] | [
0,
0,
0,
0,
0
] | [
"AsyncFunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assert'"
] |
[
"@property...\n",
"return self._adapter\n"
] | [
"@property...\n",
"return self._adapter\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_11(VAR_12):...\n",
"return {'id': VAR_12.id, 'size': VAR_12.members.count(), 'collaborators':\n VAR_12.collaborator_names(VAR_7)}\n"
] | [
"def group_entry(group):...\n",
"return {'id': group.id, 'size': group.members.count(), 'collaborators':\n group.collaborator_names(profile)}\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@classmethod...\n",
"super(CLASS_3, VAR_0).setUpTestData()\n",
"VAR_0.permission = 'testplans.change_testplan'\n",
"VAR_0.update_url = reverse('ajax-update')\n"
] | [
"@classmethod...\n",
"super(TestUpdateObject, cls).setUpTestData()\n",
"cls.permission = 'testplans.change_testplan'\n",
"cls.update_url = reverse('ajax-update')\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Assign'"
] |
[
"@script('up')...\n",
"VAR_8 = argparse.ArgumentParser('Website')\n",
"VAR_8.add_argument('purpose', help='which website to bring up')\n",
"VAR_8.add_argument('--dependency', type=str, help=\n 'where @periodic_job is defined', nargs='+', dest='dependencies')\n",
"VAR_9 = VAR_8.parse_args(VAR_4)\n",
"fo... | [
"@script('up')...\n",
"argument_parser = argparse.ArgumentParser('Website')\n",
"argument_parser.add_argument('purpose', help='which website to bring up')\n",
"argument_parser.add_argument('--dependency', type=str, help=\n 'where @periodic_job is defined', nargs='+', dest='dependencies')\n",
"args = argu... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"For",
"Expr'",
"Expr'"
] |
[
"def FUNC_30(self):...\n",
"if VAR_54.flags.in_import or self.is_new(\n",
"return\n",
"VAR_42 = [VAR_6.fieldname for VAR_6 in self.meta.get('fields', {\n 'set_only_once': ('=', 1)})]\n",
"if VAR_42:\n",
"VAR_57 = VAR_54.db.get_value(self.doctype, self.name, VAR_42, as_dict=True)\n",
"for VAR_16 in VA... | [
"def _validate_constants(self):...\n",
"if frappe.flags.in_import or self.is_new(\n",
"return\n",
"constants = [d.fieldname for d in self.meta.get('fields', {'set_only_once':\n ('=', 1)})]\n",
"if constants:\n",
"values = frappe.db.get_value(self.doctype, self.name, constants, as_dict=True)\n",
"for ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_15(self, VAR_52):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.field_mapping[VAR_52][self.TABLE_NAME]\n"
] | [
"def _get_table_name(self, field):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.field_mapping[field][self.TABLE_NAME]\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"VAR_2 = self.connects()\n",
"VAR_4 = 'DELETE FROM crimes;'\n",
"VAR_2.close()\n",
"cursor.execute(VAR_4)\n",
"VAR_2.commit()\n"
] | [
"def clear_all(self):...\n",
"connection = self.connects()\n",
"query = 'DELETE FROM crimes;'\n",
"connection.close()\n",
"cursor.execute(query)\n",
"connection.commit()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_52 = {}\n",
"VAR_52['bugs'] = VAR_0.GET.get('bug_id', '').split(',')\n",
"return None, 'string' % VAR_94(e)\n",
"VAR_52['bug_system_id'] = int(VAR_0.GET.get('bug_system_id', 1))\n",
"VAR_52['runs'] = map(int, VAR_0.GET.get('case_runs', '').spli... | [
"def clean_bug_form(request):...\n",
"\"\"\"docstring\"\"\"\n",
"data = {}\n",
"data['bugs'] = request.GET.get('bug_id', '').split(',')\n",
"return None, 'Please specify only integers for bugs, caseruns(using comma to seperate IDs), and bug_system. (DEBUG INFO: %s)' % str(\n e)\n",
"data['bug_system_id... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@mock.patch('requests.post', FUNC_0)...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_4 = '/api/apps'\n",
"VAR_5 = self.client.post(VAR_4)\n",
"self.assertEqual(VAR_5.status_code, 201)\n",
"VAR_6 = VAR_5.data['id']\n",
"VAR_14 = {'username': 'autotest', 'app': VAR_6}\n",
"VAR_4 = '/api/hooks/builds'.format(**l... | [
"@mock.patch('requests.post', mock_import_repository_task)...\n",
"\"\"\"docstring\"\"\"\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"build = {'username': 'autotest', 'app': app_id}\n",
"url = '/api... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"import numpy as np\n",
"print('Importing Tensorflow libraries')\n",
"from tensorflow.contrib.lite.python import interpreter as interpreter_wrapper\n",
"import tensorflow as tf\n",
"VAR_0 = '/home/pi/ballance/Ballance/Tensorflow/ballancenet_conv_3_quant.tflite'\n",
"VAR_1 = (\n '/home/pi/ballance/Balla... | [
"import numpy as np\n",
"print('Importing Tensorflow libraries')\n",
"from tensorflow.contrib.lite.python import interpreter as interpreter_wrapper\n",
"import tensorflow as tf\n",
"ball_detector_model_path = (\n '/home/pi/ballance/Ballance/Tensorflow/ballancenet_conv_3_quant.tflite')\n",
"corner_detec... | [
0,
0,
0,
0,
0,
1,
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
] | [
"Import'",
"Expr'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'... |
[
"def __call__(self, VAR_20):...\n",
"VAR_32 = set()\n",
"for VAR_53 in VAR_20:\n",
"if VAR_53.depth <= self.maxdepth:\n",
"return VAR_32\n",
"VAR_32.add(VAR_53)\n"
] | [
"def __call__(self, urls):...\n",
"newurls = set()\n",
"for u in urls:\n",
"if u.depth <= self.maxdepth:\n",
"return newurls\n",
"newurls.add(u)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Condition",
"Return'",
"Expr'"
] |
[
"def FUNC_12(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_0(self, VAR_0, VAR_1):...\n",
"VAR_2 = None\n",
"VAR_3 = []\n",
"VAR_4 = []\n",
"VAR_5 = []\n",
"if len(VAR_1) == 0:\n",
"VAR_2 = 'global'\n",
"if len(VAR_1) == 1:\n",
"if not VAR_2:\n",
"VAR_3 = self.getOSNames(VAR_1)\n",
"VAR_3 = []\n",
"VAR_4 = self.getApplianceNames()\n",
"VAR_... | [
"def run(self, params, args):...\n",
"scope = None\n",
"oses = []\n",
"appliances = []\n",
"hosts = []\n",
"if len(args) == 0:\n",
"scope = 'global'\n",
"if len(args) == 1:\n",
"if not scope:\n",
"oses = self.getOSNames(args)\n",
"oses = []\n",
"appliances = self.getApplianceNames()\n",
"app... | [
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,
2,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Condition"... |
[
"def FUNC_11(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1.value = beamr.interpreters.TableEnv(VAR_1.value)\n",
"return VAR_1\n"
] | [
"def t_TABENV(t):...\n",
"\"\"\"docstring\"\"\"\n",
"t.value = beamr.interpreters.TableEnv(t.value)\n",
"return t\n"
] | [
0,
0,
2,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_31):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.info('TaskDetails(%s)', VAR_31)\n",
"if not isinstance(VAR_31, dict):\n",
"self.bot_id = VAR_31['bot_id']\n",
"self.command = VAR_31['command'] or []\n",
"self.inputs_ref = VAR_31['inputs_ref']\n",
"self.extra_args = VAR_31['extra... | [
"def __init__(self, data):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.info('TaskDetails(%s)', data)\n",
"if not isinstance(data, dict):\n",
"self.bot_id = data['bot_id']\n",
"self.command = data['command'] or []\n",
"self.inputs_ref = data['inputs_ref']\n",
"self.extra_args = data['extra_args']\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_6(self, VAR_21, VAR_22, VAR_23=None):...\n",
"if VAR_23 is None:\n",
"VAR_23 = len(VAR_22)\n",
"if self._connection is None:\n",
"self._connection = self._engine.connect()\n",
"VAR_22.to_sql(VAR_21, self._connection, if_exists='append', index=False,\n chunksize=batch_size)\n"
] | [
"def insert(self, table, dataframe, batch_size=None):...\n",
"if batch_size is None:\n",
"batch_size = len(dataframe)\n",
"if self._connection is None:\n",
"self._connection = self._engine.connect()\n",
"dataframe.to_sql(table, self._connection, if_exists='append', index=False,\n chunksize=batch_size)\... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Expr'"
] |
[
"@auth.route('/unconfirmed')...\n",
"if current_user.is_anonymous or current_user.confirmed:\n",
"return redirect(url_for('main.index'))\n",
"return render_template('auth/unconfirmed.html')\n"
] | [
"@auth.route('/unconfirmed')...\n",
"if current_user.is_anonymous or current_user.confirmed:\n",
"return redirect(url_for('main.index'))\n",
"return render_template('auth/unconfirmed.html')\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_5(self):...\n",
"self.runall(self.checks)\n",
"VAR_15 = self.runner.stats\n",
"self.assertEqual(7, VAR_15.num_cases())\n",
"self.assertEqual(4, len(VAR_15.failures()))\n",
"self.assertEqual(2, self._num_failures_stage('setup'))\n",
"self.assertEqual(1, self._num_failures_stage('sanity'))\n",
... | [
"def test_runall(self):...\n",
"self.runall(self.checks)\n",
"stats = self.runner.stats\n",
"self.assertEqual(7, stats.num_cases())\n",
"self.assertEqual(4, len(stats.failures()))\n",
"self.assertEqual(2, self._num_failures_stage('setup'))\n",
"self.assertEqual(1, self._num_failures_stage('sanity'))\n",... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(VAR_12):...\n",
""
] | [
"def get_infos(row_datas):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"import mysql.connector\n",
"from serverSetup import DBUSER, DBPASS\n",
"def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3, VAR_4=[]):...\n",
"self.host = VAR_0\n",
"self.user = VAR_1\n",
"self.passwd = VAR_2\n",
"self.database = VAR_3\n",
"self.filterList = VAR_4\n",
"def FUNC_0(self):...\n",
"self.m... | [
"import mysql.connector\n",
"from serverSetup import DBUSER, DBPASS\n",
"def __init__(self, host, user, passwd, database, filterList=[]):...\n",
"self.host = host\n",
"self.user = user\n",
"self.passwd = passwd\n",
"self.database = database\n",
"self.filterList = filterList\n",
"def connect(self):..... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"FunctionDef'",
"Expr'",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"Return'"... |
[
"def FUNC_31(self):...\n",
""
] | [
"def touch_or_create(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_16(self, VAR_9):...\n",
"if not self.logged_in():\n",
"print('shrub: unauthenticated; use \"login [username] to log in first')\n",
"VAR_20 = self.send_cmd('edit_issue{} {}'.format(self.insecure_mode, VAR_9))\n",
"return\n",
"print(VAR_20)\n"
] | [
"def do_edit_issue(self, line):...\n",
"if not self.logged_in():\n",
"print('shrub: unauthenticated; use \"login [username] to log in first')\n",
"response = self.send_cmd('edit_issue{} {}'.format(self.insecure_mode, line))\n",
"return\n",
"print(response)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_49):...\n",
""
] | [
"def run(self, sr_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_0(self):...\n",
"\"\"\"docstring\"\"\"\n",
"\"\"\"string\"\"\"\n",
"VAR_2 = request.form.get('userId')\n",
"if VAR_2 is None:\n",
"VAR_28 = db_interac.get_user_profiles()\n",
"VAR_3 = db_interac.get_user_profile(VAR_2)\n",
"if not VAR_28:\n",
"VAR_4 = {}\n",
"return {}, 500\n",
"VAR_29... | [
"def get(self):...\n",
"\"\"\"docstring\"\"\"\n",
"\"\"\"\n # Check the request comes from appropriate location.\n if not utils.validate_ip(request.remote_addr)\n return {}, 403\n \"\"\"\n",
"user_id = request.form.get('userId')\n",
"if user_id is None:\n",
"users = db_inte... | [
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Condition",
"For",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_5(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.run_local:\n",
"if not (self.configuration.san_password or self.configuration.san_private_key):\n",
"if not self.configuration.san_ip:\n"
] | [
"def check_for_setup_error(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.run_local:\n",
"if not (self.configuration.san_password or self.configuration.san_private_key):\n",
"if not self.configuration.san_ip:\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Condition"
] |
[
"def FUNC_10(self, VAR_10, VAR_12):...\n",
"\"\"\"docstring\"\"\"\n",
"self._create_server(VAR_12)\n",
"VAR_5 = {}\n",
"VAR_5['volumeName'] = VAR_10['name']\n",
"VAR_5['serverName'] = VAR_12['host']\n",
"self._cliq_run_xml('assignVolumeToServer', VAR_5)\n",
"VAR_32 = self._get_iscsi_properties(VAR_10)... | [
"def initialize_connection(self, volume, connector):...\n",
"\"\"\"docstring\"\"\"\n",
"self._create_server(connector)\n",
"cliq_args = {}\n",
"cliq_args['volumeName'] = volume['name']\n",
"cliq_args['serverName'] = connector['host']\n",
"self._cliq_run_xml('assignVolumeToServer', cliq_args)\n",
"iscs... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"return import_from_settings('LOGIN_REDIRECT_URL_FAILURE', '/')\n"
] | [
"@property...\n",
"return import_from_settings('LOGIN_REDIRECT_URL_FAILURE', '/')\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_14(self, VAR_14):...\n",
""
] | [
"def is_boolean(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_32(VAR_19):...\n",
"return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n VAR_19)\n"
] | [
"def BuildExtraConfData(extra_conf_vim_data):...\n",
"return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n extra_conf_vim_data)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return 'Running check for local component %s with pid %s' % (self.comp_name,\n self.pid)\n"
] | [
"def info(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return 'Running check for local component %s with pid %s' % (self.comp_name,\n self.pid)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def __init__(self, VAR_5, VAR_12):...\n",
"self.message = VAR_5\n",
"if isinstance(VAR_12, str) or VAR_12 is None:\n",
"VAR_12 = [VAR_12]\n",
"self.deps = [d for d in VAR_12 if d is not None]\n",
"self.fatal = None in VAR_12\n"
] | [
"def __init__(self, message, deps):...\n",
"self.message = message\n",
"if isinstance(deps, str) or deps is None:\n",
"deps = [deps]\n",
"self.deps = [d for d in deps if d is not None]\n",
"self.fatal = None in deps\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_2(VAR_3, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = VAR_5.copy()\n",
"VAR_18 = FUNC_4(VAR_3)\n",
"if VAR_18:\n",
"VAR_5['data']['registration_form_desc']['fields'] = FUNC_3(VAR_5['data'][\n 'registration_form_desc'])\n",
"VAR_5['enable_enterprise_sidebar'] = False\n",
"VAR_5.updat... | [
"def update_context_for_enterprise(request, context):...\n",
"\"\"\"docstring\"\"\"\n",
"context = context.copy()\n",
"sidebar_context = enterprise_sidebar_context(request)\n",
"if sidebar_context:\n",
"context['data']['registration_form_desc']['fields'] = enterprise_fields_only(\n context['data']['reg... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(self):...\n",
"VAR_15 = []\n",
"VAR_14 = datetime.now(timezone(timedelta(hours=+9), 'JST'))\n",
"VAR_14 = VAR_14.replace(hour=0, minute=0, second=0, microsecond=0)\n",
"for day in range(30)[::-1]:\n",
"VAR_25 = VAR_14 - timedelta(days=day)\n",
"return VAR_15\n",
"VAR_26 = VAR_25.strftime('... | [
"def thirty_day_labels(self):...\n",
"labels = []\n",
"today = datetime.now(timezone(timedelta(hours=+9), 'JST'))\n",
"today = today.replace(hour=0, minute=0, second=0, microsecond=0)\n",
"for day in range(30)[::-1]:\n",
"date = today - timedelta(days=day)\n",
"return labels\n",
"label = date.strftime... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Expr'"
] |
[
"def FUNC_10(*VAR_11):...\n",
"VAR_12 = ' '.join(str(elem) for elem in VAR_11)\n",
"return VAR_12\n"
] | [
"def fastboot_call(*args):...\n",
"arg_str = ' '.join(str(elem) for elem in args)\n",
"return arg_str\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(VAR_14, VAR_19, VAR_20=None, VAR_15=Article, VAR_3=None, VAR_4=...\n",
"if VAR_14.method == 'GET':\n",
"VAR_27 = {'title': VAR_19}\n",
"return HttpResponseNotAllowed(['GET'])\n",
"if VAR_3 is not None:\n",
"VAR_8 = get_object_or_404(VAR_5, **{group_slug_field: group_slug})\n",
"VAR_46 = VAR_... | [
"def view_article(request, title, revision=None, ArticleClass=Article,...\n",
"if request.method == 'GET':\n",
"article_args = {'title': title}\n",
"return HttpResponseNotAllowed(['GET'])\n",
"if group_slug is not None:\n",
"group = get_object_or_404(group_qs, **{group_slug_field: group_slug})\n",
"allo... | [
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
] | [
"Condition",
"Condition",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign... |
[
"@auth.require(acl.is_bot)...\n",
"VAR_4, VAR_14, VAR_9, VAR_25, VAR_24, VAR_26 = self._process()\n",
"VAR_37 = VAR_4.get('event')\n",
"if VAR_37 not in ('bot_error', 'bot_rebooting', 'bot_shutdown'):\n",
"self.abort_with_error(400, error='Unsupported event type')\n",
"VAR_8 = VAR_4.get('message')\n",
"... | [
"@auth.require(acl.is_bot)...\n",
"request, bot_id, version, state, dimensions, quarantined_msg = self._process()\n",
"event = request.get('event')\n",
"if event not in ('bot_error', 'bot_rebooting', 'bot_shutdown'):\n",
"self.abort_with_error(400, error='Unsupported event type')\n",
"message = request.ge... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_11(self, VAR_15, VAR_16, VAR_17):...\n",
"self.checked += 1\n",
"self.curline = 0\n",
"for VAR_25 in VAR_15:\n",
"if pe.tok:\n",
"VAR_25 = VAR_25.decode(locale.getpreferredencoding(False), errors='ignore')\n",
"VAR_27 = VAR_25.find(VAR_14) + pe.tok.lexpos\n",
"sys.stdout.write('%s: %d:0 %s\\... | [
"def parse_lines(self, fd, maxlines, fname):...\n",
"self.checked += 1\n",
"self.curline = 0\n",
"for line in fd:\n",
"if pe.tok:\n",
"line = line.decode(locale.getpreferredencoding(False), errors='ignore')\n",
"col = line.find(expr) + pe.tok.lexpos\n",
"sys.stdout.write('%s: %d:0 %s\\n' % (fname, sel... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"AugAssign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"AugAssign'",
"Assign'",
"AugAssign'",
"Condition",
"Expr'",
"AugAssign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"AugAssign'"
] |
[
"def FUNC_26(*VAR_29, **VAR_30):...\n",
""
] | [
"def raiseOSError(*_a, **_k):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_4(VAR_2):...\n",
"VAR_7 = files.get_static_data('./static/files.html')\n",
"VAR_2 = FUNC_1(VAR_2)\n",
"VAR_2 = '/'\n",
"if not VAR_2:\n",
"VAR_2 = '/'\n",
"VAR_15 = VAR_2.split('/')\n",
"VAR_16 = list()\n",
"while '' in VAR_15:\n",
"VAR_15.remove('')\n",
"VAR_15 = [''] + VAR_15\n",
"... | [
"def get_final_html_async(target_path):...\n",
"file_temp = files.get_static_data('./static/files.html')\n",
"target_path = decode_hexed_b64_to_str(target_path)\n",
"target_path = '/'\n",
"if not target_path:\n",
"target_path = '/'\n",
"files_hierarchy = target_path.split('/')\n",
"files_hierarchy_lis... | [
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
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"For",
"AugAssign'",
"Assign'",
"AugAssign'",
"For",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"... |
[
"def FUNC_1(VAR_3, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_8 = []\n",
"VAR_9 = ChangedEntityLocale.objects.values_list('entity', 'locale').distinct()\n",
"for changed_entity in VAR_3:\n",
"VAR_18 = changed_entity.pk, VAR_2.pk\n",
"ChangedEntityLocale.objects.bulk_create(VAR_8)\n",
"if VAR_18 no... | [
"def mark_changed_translation(changed_entities, locale):...\n",
"\"\"\"docstring\"\"\"\n",
"changed_entities_array = []\n",
"existing = ChangedEntityLocale.objects.values_list('entity', 'locale'\n ).distinct()\n",
"for changed_entity in changed_entities:\n",
"key = changed_entity.pk, locale.pk\n",
"C... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"Assign'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_21(self, VAR_17, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"self._check_volume(VAR_16)\n",
"VAR_0.warn(_('Volume %s is not found!, it may have been deleted'), VAR_16[\n 'name'])\n",
"VAR_0.error(_('Failed to ensure export of volume %s'), VAR_16['name'])\n"
] | [
"def ensure_export(self, context, volume):...\n",
"\"\"\"docstring\"\"\"\n",
"self._check_volume(volume)\n",
"LOG.warn(_('Volume %s is not found!, it may have been deleted'), volume['name']\n )\n",
"LOG.error(_('Failed to ensure export of volume %s'), volume['name'])\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'"
] |
[
"\"\"\" Views for a student's account information. \"\"\"\n",
"import json\n",
"import logging\n",
"import urlparse\n",
"from datetime import datetime\n",
"import pytz\n",
"from django.conf import settings\n",
"from django.contrib import messages\n",
"from django.contrib.auth import get_user_model\n... | [
"\"\"\" Views for a student's account information. \"\"\"\n",
"import json\n",
"import logging\n",
"import urlparse\n",
"from datetime import datetime\n",
"import pytz\n",
"from django.conf import settings\n",
"from django.contrib import messages\n",
"from django.contrib.auth import get_user_model\n... | [
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'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"I... |
[
"from django.core.exceptions import ObjectDoesNotExist\n",
"from rest_framework import exceptions\n",
"from app import models\n",
"def FUNC_0(VAR_0, VAR_1, VAR_2=('view_project',)):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = models.Project.objects.get(pk=project_pk, deleting=False)\n",
"return VAR_6\n",... | [
"from django.core.exceptions import ObjectDoesNotExist\n",
"from rest_framework import exceptions\n",
"from app import models\n",
"def get_and_check_project(request, project_pk, perms=('view_project',)):...\n",
"\"\"\"docstring\"\"\"\n",
"project = models.Project.objects.get(pk=project_pk, deleting=False)... | [
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Docstring",
"Assign'",
"Return'",
"For",
"Condition"
] |
[
"@VAR_0.route('/search')...\n",
"VAR_2 = 10\n",
"VAR_3 = 0\n",
"VAR_4 = request.args.get('term')\n",
"VAR_5 = request.args.get('page')\n",
"VAR_6 = VAR_4\n",
"if not VAR_5:\n",
"VAR_5 = 1\n",
"VAR_3 = VAR_2 * (int(VAR_5) - 1)\n",
"VAR_7 = re.compile('.*[a-zA-Z].*')\n",
"if VAR_7.match(VAR_6):\n"... | [
"@app.route('/search')...\n",
"limit = 10\n",
"offset = 0\n",
"user_term = request.args.get('term')\n",
"page = request.args.get('page')\n",
"term = user_term\n",
"if not page:\n",
"page = 1\n",
"offset = limit * (int(page) - 1)\n",
"transliterate_regex = re.compile('.*[a-zA-Z].*')\n",
"if trans... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"VAR_11 = PasswordHasher()\n",
"VAR_0 = VAR_11.hash(self.password)\n",
"VAR_11.verify(VAR_0, self.password)\n",
"VAR_0 = VAR_11.hash(self.password)\n",
"return VAR_0\n"
] | [
"def hash_password(self):...\n",
"ph = PasswordHasher()\n",
"hashed_password = ph.hash(self.password)\n",
"ph.verify(hashed_password, self.password)\n",
"hashed_password = ph.hash(self.password)\n",
"return hashed_password\n"
] | [
0,
6,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"if not VAR_101.user_is_admin:\n",
"abort(404, 'page not found')\n"
] | [
"def run(self):...\n",
"if not c.user_is_admin:\n",
"abort(404, 'page not found')\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'"
] |
[
"def FUNC_3():...\n",
"return 'munins node on ' + socket.getfqdn() + ' version: ' + VAR_2 + VAR_4\n"
] | [
"def version():...\n",
"return 'munins node on ' + socket.getfqdn(\n ) + ' version: ' + VERSION + LINEBREAK\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self, VAR_4):...\n",
"VAR_4 = u\"'{0}'\".format(VAR_4)\n",
"return VAR_4\n"
] | [
"def insert_format(self, value):...\n",
"value = u\"'{0}'\".format(value)\n",
"return value\n"
] | [
0,
4,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_3, VAR_1):...\n",
"VAR_5 = 'delete from comment_like where commentid=%d and userid=%d;' % (VAR_3,\n VAR_1)\n",
"VAR_6 = sql.deleteDB(self.conn, VAR_5)\n",
"return VAR_6\n"
] | [
"def dislikeComments(self, commentid, userid):...\n",
"sqlText = 'delete from comment_like where commentid=%d and userid=%d;' % (\n commentid, userid)\n",
"result = sql.deleteDB(self.conn, sqlText)\n",
"return result\n"
] | [
0,
4,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_12():...\n",
"VAR_18 = requests.get(FUNC_2('healthy'))\n",
"VAR_18.raise_for_status()\n",
"return VAR_18.json()\n"
] | [
"def _ServerIsHealthy():...\n",
"response = requests.get(_BuildUri('healthy'))\n",
"response.raise_for_status()\n",
"return response.json()\n"
] | [
0,
7,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"if not GenericRequest.test_success(self):\n",
"return False\n",
"return self.get_user_test_id() is not None\n"
] | [
"def test_success(self):...\n",
"if not GenericRequest.test_success(self):\n",
"return False\n",
"return self.get_user_test_id() is not None\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_2(VAR_0):...\n",
"VAR_5 = FUNC_0()\n",
"VAR_7 = VAR_5.cursor()\n",
"VAR_7.execute(VAR_0)\n",
"VAR_8 = VAR_7.fetchone()[0]\n",
"VAR_5.close()\n",
"return VAR_8\n"
] | [
"def fetchone(query):...\n",
"conn = connect()\n",
"cur = conn.cursor()\n",
"cur.execute(query)\n",
"result = cur.fetchone()[0]\n",
"conn.close()\n",
"return result\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_27(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.exists and FUNC_0(self.file):\n"
] | [
"def check_broken_symlink(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.exists and lstat(self.file):\n"
] | [
0,
0,
7
] | [
"FunctionDef'",
"Docstring",
"Condition"
] |
[
"def FUNC_4(self, VAR_6, VAR_18):...\n",
"VAR_18 = int(VAR_18)\n",
"VAR_23 = GaneshaConf.instance(VAR_6)\n",
"if not VAR_23.has_export(VAR_18):\n",
"return VAR_23.get_export(VAR_18).to_dict()\n"
] | [
"def get(self, cluster_id, export_id):...\n",
"export_id = int(export_id)\n",
"ganesha_conf = GaneshaConf.instance(cluster_id)\n",
"if not ganesha_conf.has_export(export_id):\n",
"return ganesha_conf.get_export(export_id).to_dict()\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"self.events.append('on_pre_enter: %s' % self.path)\n"
] | [
"def on_pre_enter(self):...\n",
"self.events.append('on_pre_enter: %s' % self.path)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_0(self, VAR_1, VAR_2=None, VAR_3=False):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = 'string'.format(default_store=store, repo_dir=REPO_DIR, shard_str=\n '/shard_' + self.shard if self.shard else '', exp_text=name,\n a11y_custom_file=\n 'node_modules/edx-custom-a11y-rules/lib/custom_a11y_rules... | [
"def _expected_command(self, name, store=None, verify_xss=False):...\n",
"\"\"\"docstring\"\"\"\n",
"expected_statement = (\n \"DEFAULT_STORE={default_store} SCREENSHOT_DIR='{repo_dir}/test_root/log{shard_str}' BOK_CHOY_HAR_DIR='{repo_dir}/test_root/log{shard_str}/hars' BOKCHOY_A11Y_CUSTOM_RULES_FILE='{repo_... | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"VAR_1 = self.objects.dg.pk\n",
"self.assertEqual(str(self.objects.dg.group_type), 'Composition',\n 'Type of DataGroup needs to be \"composition\" for this test.')\n",
"VAR_2 = self.client.get(f'/datagroup/{VAR_1}/')\n",
"self.assertEqual(VAR_2.context['extract_fields'], ['data_... | [
"def test_detail_template_fieldnames(self):...\n",
"pk = self.objects.dg.pk\n",
"self.assertEqual(str(self.objects.dg.group_type), 'Composition',\n 'Type of DataGroup needs to be \"composition\" for this test.')\n",
"response = self.client.get(f'/datagroup/{pk}/')\n",
"self.assertEqual(response.context['... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"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_7(self, VAR_1, VAR_5):...\n",
"if VAR_1 == '':\n",
"return self\n",
"if VAR_1 == 'login':\n",
"return self\n",
"if not self.is_logged_in(VAR_5):\n",
"return UnAuthorizedResource()\n",
"return NoResource()\n"
] | [
"def getChild(self, path, request):...\n",
"if path == '':\n",
"return self\n",
"if path == 'login':\n",
"return self\n",
"if not self.is_logged_in(request):\n",
"return UnAuthorizedResource()\n",
"return NoResource()\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"@property...\n",
"return self.dag.priority(self)\n"
] | [
"@property...\n",
"return self.dag.priority(self)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.priority = VAR_77\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.priority = priority\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.getboolean(self.section, 'debug')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.getboolean(self.section, 'debug')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_29(VAR_34):...\n",
"self.assertEqual(logging.WARNING, VAR_34)\n"
] | [
"def check(x):...\n",
"self.assertEqual(logging.WARNING, x)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_29(self):...\n",
"VAR_0 = [SleepCheck(1), SleepCheck(1), SleepCheck(1),\n KeyboardInterruptCheck(phase='setup')]\n",
"self._run_checks(VAR_0, 4)\n"
] | [
"def test_kbd_interrupt_in_setup_with_concurrency(self):...\n",
"checks = [SleepCheck(1), SleepCheck(1), SleepCheck(1),\n KeyboardInterruptCheck(phase='setup')]\n",
"self._run_checks(checks, 4)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_12(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_50 = frappe.db.get_table_columns(self.doctype)\n",
"VAR_51 = []\n",
"for fld in self.fields:\n",
"for VAR_34 in optional_fields:\n",
"for fld in VAR_51:\n",
"if VAR_34 in fld and not VAR_34 in VAR_50:\n",
"VAR_51 = []\n",
"VAR_51.append(fl... | [
"def set_optional_columns(self):...\n",
"\"\"\"docstring\"\"\"\n",
"columns = frappe.db.get_table_columns(self.doctype)\n",
"to_remove = []\n",
"for fld in self.fields:\n",
"for f in optional_fields:\n",
"for fld in to_remove:\n",
"if f in fld and not f in columns:\n",
"to_remove = []\n",
"to_remo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"For",
"For",
"Condition",
"Assign'",
"Expr'",
"For",
"Condition",
"For",
"Assign'",
"For",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(VAR_27):...\n",
"VAR_36 = datetime.utcfromtimestamp(VAR_27.created_utc)\n",
"FUNC_2(VAR_14=str(message.author), VAR_18='message', VAR_15='new_address',\n VAR_25=message_time.strftime('%Y-%m-%d %H:%M:%S'), VAR_26=str(message.\n body)[:255])\n",
"VAR_27.reply('not activated yet.')\n"
] | [
"def handle_new_address(message):...\n",
"message_time = datetime.utcfromtimestamp(message.created_utc)\n",
"add_history_record(username=str(message.author), comment_or_message=\n 'message', action='new_address', reddit_time=message_time.strftime(\n '%Y-%m-%d %H:%M:%S'), comment_text=str(message.body)[:25... | [
0,
0,
4,
4
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_21(VAR_16, VAR_22):...\n",
"VAR_53 = (\"select date from matches where scene='{}' order by date limit 1;\"\n .format(VAR_22))\n",
"VAR_54 = VAR_16.exec(VAR_53)\n",
"VAR_23 = VAR_54[0][0]\n",
"return VAR_23\n"
] | [
"def get_first_month(db, scene):...\n",
"sql = (\"select date from matches where scene='{}' order by date limit 1;\".\n format(scene))\n",
"res = db.exec(sql)\n",
"date = res[0][0]\n",
"return date\n"
] | [
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_10(self, VAR_7, VAR_9=None):...\n",
"if VAR_9 == None:\n",
"VAR_9 = {}\n",
"if isinstance(VAR_9, (dict, CLASS_0)):\n",
"if not self.__dict__.get(VAR_7):\n",
"if getattr(self, '_metaclass', None) or self.__class__.__name__ in ('Meta',\n",
"self.__dict__[VAR_7] = []\n",
"VAR_9 = self._init_chi... | [
"def append(self, key, value=None):...\n",
"if value == None:\n",
"value = {}\n",
"if isinstance(value, (dict, BaseDocument)):\n",
"if not self.__dict__.get(key):\n",
"if getattr(self, '_metaclass', None) or self.__class__.__name__ in ('Meta',\n",
"self.__dict__[key] = []\n",
"value = self._init_child... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"VAR_16 = await self.get_props_by_key('content')\n",
"if VAR_16:\n",
"return VAR_16.decode('utf-8')\n"
] | [
"@property...\n",
"rv = await self.get_props_by_key('content')\n",
"if rv:\n",
"return rv.decode('utf-8')\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Return'"
] |
[
"from utility import *\n",
"import json\n",
"def FUNC_0(VAR_0, VAR_1):...\n",
"VAR_4 = 'curl ' + start_url + VAR_0 + '?'\n",
"VAR_5 = VAR_1.keys()\n",
"VAR_6 = VAR_1.values()\n",
"VAR_7 = [(VAR_5[i] + '=' + VAR_6[i]) for i in range(len(VAR_5))]\n",
"VAR_8 = '&'.join(VAR_7)\n",
"VAR_4 += VAR_8\n",
... | [
"from utility import *\n",
"import json\n",
"def createGetScript(endpoint, params):...\n",
"script = 'curl ' + start_url + endpoint + '?'\n",
"keys = params.keys()\n",
"values = params.values()\n",
"pair = [(keys[i] + '=' + values[i]) for i in range(len(keys))]\n",
"evil_param = '&'.join(pair)\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"Import'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"self.terminal.write(self.ps[self.pn])\n"
] | [
"def print_prompt(self):...\n",
"self.terminal.write(self.ps[self.pn])\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@VAR_1.route('/tmp', methods=['POST'])...\n",
"VAR_21 = base64.b64decode(request.form['content']).decode()\n",
"f.write(VAR_21)\n",
"VAR_18['tempFile'] = f.name\n",
"return ''\n"
] | [
"@app.route('/tmp', methods=['POST'])...\n",
"content = base64.b64decode(request.form['content']).decode()\n",
"f.write(content)\n",
"session['tempFile'] = f.name\n",
"return ''\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(self, VAR_2, VAR_3, VAR_1, VAR_5):...\n",
"create_check_cve_task(VAR_3)\n",
"super().save_model(VAR_2, VAR_3, VAR_1, VAR_5)\n"
] | [
"def save_model(self, request, obj, form, change):...\n",
"create_check_cve_task(obj)\n",
"super().save_model(request, obj, form, change)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"def __init__(self, VAR_1, VAR_2=None):...\n",
"super(CLASS_0, self).__init__(VAR_1, VAR_2)\n",
"self.TEST_APP = VAR_1['TEST_APP']\n",
"self.__path = 'applications/%s/tasks' % self.TEST_APP\n",
"self.TEST_STACK = VAR_1['TEST_STACK']\n",
"self.TEST_REGION = VAR_1['TEST_GCE_REGION']\n",
"self.TEST_ZONE = ... | [
"def __init__(self, bindings, agent=None):...\n",
"super(GoogleServerGroupTestScenario, self).__init__(bindings, agent)\n",
"self.TEST_APP = bindings['TEST_APP']\n",
"self.__path = 'applications/%s/tasks' % self.TEST_APP\n",
"self.TEST_STACK = bindings['TEST_STACK']\n",
"self.TEST_REGION = bindings['TEST_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"@classmethod...\n",
"return VAR_6 if VAR_6.startswith('v') else 'v' + VAR_6\n"
] | [
"@classmethod...\n",
"return version if version.startswith('v') else 'v' + version\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"from flask import Blueprint, request, jsonify, redirect, url_for, render_template, flash, Response\n",
"from flask_login import login_required, current_user\n",
"from app.Data.operations import create_action, get_dataset_with_id\n",
"from app.Data.helpers import table_name_to_object\n",
"from app.Data.Tran... | [
"from flask import Blueprint, request, jsonify, redirect, url_for, render_template, flash, Response\n",
"from flask_login import login_required, current_user\n",
"from app.Data.operations import create_action, get_dataset_with_id\n",
"from app.Data.helpers import table_name_to_object\n",
"from app.Data.Tran... | [
4,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"from GeneralEngine.Unit import *\n",
"import numpy as np\n",
"from GeneralEngine.BinaryHeap import BinaryHeap, Node\n",
"def __init__(self):...\n",
"self.initialised = False\n",
"self.board = None\n",
"def FUNC_0(self, VAR_0):...\n",
"VAR_8 = open(VAR_0, 'r')\n",
"self.mapType = VAR_8.readline().sp... | [
"from GeneralEngine.Unit import *\n",
"import numpy as np\n",
"from GeneralEngine.BinaryHeap import BinaryHeap, Node\n",
"def __init__(self):...\n",
"self.initialised = False\n",
"self.board = None\n",
"def initialiseMapFromFile(self, filename):...\n",
"file = open(filename, 'r')\n",
"self.mapType =... | [
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... | [
"ImportFrom'",
"Import'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assert'",
"Assign'",
"For",
"Assign'",
"Assign'",
"For",
"Expr'",
"Assign'",
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"FunctionD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.