lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_28(VAR_25):...\n", "VAR_73 = '%s/bibclassify' % bconfig.CFG_TMPDIR\n", "if not os.path.isdir(VAR_73):\n", "os.mkdir(VAR_73)\n", "VAR_40 = 'bibclassify_%s.xml' % VAR_25\n", "VAR_74 = os.path.join(VAR_73, VAR_40)\n", "return VAR_74\n" ]
[ "def get_tmp_file(recid):...\n", "tmp_directory = '%s/bibclassify' % bconfig.CFG_TMPDIR\n", "if not os.path.isdir(tmp_directory):\n", "os.mkdir(tmp_directory)\n", "filename = 'bibclassify_%s.xml' % recid\n", "abs_path = os.path.join(tmp_directory, filename)\n", "return abs_path\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if not hasattr(VAR_1, 'db'):\n", "VAR_13 = cx_Oracle.makedsn(VAR_0.config['DB_SERVER'], VAR_0.config[\n 'DB_PORT'], VAR_0.config['DB_SID'])\n", "return VAR_1.db\n", "VAR_1.db = cx_Oracle.connect(VAR_0.config['DB_USER'], VAR_0.config['DB_PWD'...
[ "def get_db(app, context):...\n", "\"\"\"docstring\"\"\"\n", "if not hasattr(context, 'db'):\n", "dsn_tns = cx_Oracle.makedsn(app.config['DB_SERVER'], app.config['DB_PORT'],\n app.config['DB_SID'])\n", "return context.db\n", "context.db = cx_Oracle.connect(app.config['DB_USER'], app.config['DB_PWD'],\n...
[ 0, 0, 4, 4, 4, 4 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Return'", "Assign'" ]
[ "def FUNC_3(self, *VAR_1, **VAR_2):...\n", "abort_thread()\n", "if self.active:\n", "self.last_write_time = time.time()\n", "return self.redirection_source.write(*VAR_1, **kwargs)\n", "super(CLASS_0, self).write(*VAR_1, **kwargs)\n" ]
[ "def write_both(self, *args, **kwargs):...\n", "abort_thread()\n", "if self.active:\n", "self.last_write_time = time.time()\n", "return self.redirection_source.write(*args, **kwargs)\n", "super(RedirectBuffer, self).write(*args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'", "Return'", "Expr'" ]
[ "@auth.before_app_request...\n", "if current_user.is_authenticated:\n", "current_user.ping()\n", "if not current_user.verify_auth_token(VAR_3['auth_token']):\n", "logout_user()\n", "if not current_user.confirmed and request.endpoint[:5\n", "flash('Your session has expired.')\n", "return redirect(url_f...
[ "@auth.before_app_request...\n", "if current_user.is_authenticated:\n", "current_user.ping()\n", "if not current_user.verify_auth_token(session['auth_token']):\n", "logout_user()\n", "if not current_user.confirmed and request.endpoint[:5\n", "flash('Your session has expired.')\n", "return redirect(url...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Return'", "Return'" ]
[ "def FUNC_3(self, **VAR_3):...\n", "VAR_13 = super().get_context_data(**kwargs)\n", "VAR_14 = 0\n", "VAR_15 = JustURL.objects.filter(VAR_19=None).count()\n", "print(VAR_15)\n", "VAR_4 = Category.objects.all()\n", "for cat in VAR_4:\n", "VAR_14 += cat.justurl_set.all().count()\n", "VAR_13['number_of_...
[ "def get_context_data(self, **kwargs):...\n", "context = super().get_context_data(**kwargs)\n", "quantity = 0\n", "urls_without_category = JustURL.objects.filter(category=None).count()\n", "print(urls_without_category)\n", "queryset = Category.objects.all()\n", "for cat in queryset:\n", "quantity += c...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "For", "AugAssign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_26(self):...\n", "\"\"\"docstring\"\"\"\n", "return not any(self.dead_processes())\n" ]
[ "def remaining_processes_alive(self):...\n", "\"\"\"docstring\"\"\"\n", "return not any(self.dead_processes())\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_0(VAR_0):...\n", "VAR_6 = ['preferred', 'other', 'exceptions']\n", "VAR_7 = VAR_0.head.commit.tree['LICENSES']\n", "VAR_8 = CLASS_2()\n", "for d in VAR_6:\n", "for VAR_5 in VAR_7[d].traverse():\n", "return VAR_8\n", "if not os.path.isfile(VAR_5.path):\n", "VAR_23 = None\n", "for l in ope...
[ "def read_spdxdata(repo):...\n", "license_dirs = ['preferred', 'other', 'exceptions']\n", "lictree = repo.head.commit.tree['LICENSES']\n", "spdx = SPDXdata()\n", "for d in license_dirs:\n", "for el in lictree[d].traverse():\n", "return spdx\n", "if not os.path.isfile(el.path):\n", "exception = None\...
[ 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 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "For", "Return'", "Condition", "Assign'", "For", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "For", "Condition", "Condition", "Condition", "Expr'", "Condition", "...
[ "def FUNC_19(self):...\n", "os.close(self.newfd)\n" ]
[ "def close(self):...\n", "os.close(self.newfd)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = VAR_1[:]\n", "VAR_11.extend(FUNC_7(self))\n", "VAR_13 = ()\n", "if self.status == 'valid' and self.paid_status != 'resulted':\n", "VAR_13 += 'gencinv.invoice', 'add_payment.invoice'\n", "if self.status == 'valid' and self.paid_status == 'w...
[ "def get_invoice_default_acl(self):...\n", "\"\"\"docstring\"\"\"\n", "acl = DEFAULT_PERM_NEW[:]\n", "acl.extend(_get_admin_status_acl(self))\n", "admin_perms = ()\n", "if self.status == 'valid' and self.paid_status != 'resulted':\n", "admin_perms += 'gencinv.invoice', 'add_payment.invoice'\n", "if se...
[ 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'", "Docstring", "Assign'", "Expr'", "Assign'", "Condition", "AugAssign'", "Condition", "AugAssign'", "Condition", "AugAssign'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "For", "Assign'", "Return'", "Condit...
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "self.netatmo_data.update()\n", "VAR_13 = self.netatmo_data.data.get(self.module_name)\n", "if VAR_13 is None:\n", "VAR_0.warning('No data found for %s', self.module_name)\n", "if self.type == 'temperature':\n", "self._state = STATE_UNKNOWN\n", "s...
[ "def update(self):...\n", "\"\"\"docstring\"\"\"\n", "self.netatmo_data.update()\n", "data = self.netatmo_data.data.get(self.module_name)\n", "if data is None:\n", "_LOGGER.warning('No data found for %s', self.module_name)\n", "if self.type == 'temperature':\n", "self._state = STATE_UNKNOWN\n", "sel...
[ 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...
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition"...
[ "def FUNC_1(self):...\n", "VAR_6 = self.client.get('/api/apps')\n", "self.assertEqual(VAR_6.status_code, 200)\n", "self.assertEqual(len(VAR_6.data['results']), 2)\n", "VAR_8 = VAR_6.data['results'][0]['id']\n", "VAR_5 = '/api/apps/{}/perms'.format(VAR_8)\n", "VAR_7 = {'username': 'autotest-2'}\n", "VA...
[ "def test_list(self):...\n", "response = self.client.get('/api/apps')\n", "self.assertEqual(response.status_code, 200)\n", "self.assertEqual(len(response.data['results']), 2)\n", "app_id = response.data['results'][0]['id']\n", "url = '/api/apps/{}/perms'.format(app_id)\n", "body = {'username': 'autotest...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_2(self, VAR_7, VAR_8=None, VAR_9=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = Database().view_submit(VAR_7)\n", "VAR_15, VAR_16 = [], []\n", "for VAR_6 in VAR_2.data['data']:\n", "if VAR_6['type'] == 'file':\n", "return {'files': VAR_15, 'path': VAR_2.tmp_path}\n", "VAR_22 = Storage.ge...
[ "def get_files(self, submit_id, password=None, astree=False):...\n", "\"\"\"docstring\"\"\"\n", "submit = Database().view_submit(submit_id)\n", "files, duplicates = [], []\n", "for data in submit.data['data']:\n", "if data['type'] == 'file':\n", "return {'files': files, 'path': submit.tmp_path}\n", "f...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_2(self, VAR_1, VAR_3=None, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "if VAR_3 is None:\n", "VAR_3 = VAR_3.copy()\n", "for fobj in VAR_20.itervalues():\n", "return VAR_15\n", "VAR_15 = self.session.get(VAR_1)\n", "VAR_3 = VAR_3.copy()\n", "VAR_3['_xsrf'] = sel...
[ "def do_request(self, url, data=None, file_names=None):...\n", "\"\"\"docstring\"\"\"\n", "if file_names is None:\n", "if data is None:\n", "data = data.copy()\n", "for fobj in file_objs.itervalues():\n", "return response\n", "response = self.session.get(url)\n", "data = data.copy()\n", "data['_xs...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Assign'", "For", "Return'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "@login_required...\n", "\"\"\"docstring\"\"\"\n", "return render_to_response('student_account/finish_auth.html', {\n 'disable_courseware_js': True, 'disable_footer': True})\n" ]
[ "@login_required...\n", "\"\"\"docstring\"\"\"\n", "return render_to_response('student_account/finish_auth.html', {\n 'disable_courseware_js': True, 'disable_footer': True})\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "async def FUNC_6(VAR_8: str, VAR_11: int):...\n", "\"\"\"docstring\"\"\"\n", "await cursor.execute(\"UPDATE player SET hp=%d where name = '%s'\" % (VAR_11,\n VAR_8))\n", "FUNC_10(ex)\n", "await conn.commit()\n", "return False\n", "return True\n" ]
[ "async def update_hp(name: str, hp: int):...\n", "\"\"\"docstring\"\"\"\n", "await cursor.execute(\"UPDATE player SET hp=%d where name = '%s'\" % (hp, name))\n", "_error_report(ex)\n", "await conn.commit()\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_5(self, VAR_3):...\n", "VAR_4 = []\n", "for item in self.queryset.filter(result__campaign_id=self.campaign\n", "VAR_4.append((item, item))\n", "return sorted(VAR_4, key=fix_sort_list)\n" ]
[ "def simics_register_diff_choices(self, attribute):...\n", "choices = []\n", "for item in self.queryset.filter(result__campaign_id=self.campaign\n", "choices.append((item, item))\n", "return sorted(choices, key=fix_sort_list)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Return'" ]
[ "def FUNC_27(self, VAR_22):...\n", "\"\"\"docstring\"\"\"\n", "return VAR_22 in self.sos_info['disabled']\n" ]
[ "def _check_disabled(self, plugin):...\n", "\"\"\"docstring\"\"\"\n", "return plugin in self.sos_info['disabled']\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_17(self):...\n", "return '`tab{0}`.name in ({1})'.format(self.doctype, ', '.join([\"'%s'\"] *\n len(self.shared))) % tuple([frappe.db.escape(s, percent=False) for s in\n self.shared])\n" ]
[ "def get_share_condition(self):...\n", "return '`tab{0}`.name in ({1})'.format(self.doctype, ', '.join([\"'%s'\"] *\n len(self.shared))) % tuple([frappe.db.escape(s, percent=False) for s in\n self.shared])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self):...\n", "self.assertTrue(self.current_course_instance.is_visible_to())\n", "self.assertFalse(self.hidden_course_instance.is_visible_to())\n", "self.assertTrue(self.current_course_instance.is_visible_to(self.user))\n", "self.assertFalse(self.hidden_course_instance.is_visible_to(self.user))\...
[ "def test_course_instance_visibility(self):...\n", "self.assertTrue(self.current_course_instance.is_visible_to())\n", "self.assertFalse(self.hidden_course_instance.is_visible_to())\n", "self.assertTrue(self.current_course_instance.is_visible_to(self.user))\n", "self.assertFalse(self.hidden_course_instance.i...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_14(self):...\n", "if not self.config:\n", "self.logger.error(' Config not loaded yet!')\n", "for group in self.config['groups']:\n", "for VAR_6 in group['components']:\n", "self.host_list = list(set(self.host_list))\n", "self.logger.debug(\"Checking component '%s' in group '%s' on host '%s'\" ...
[ "def init(self):...\n", "if not self.config:\n", "self.logger.error(' Config not loaded yet!')\n", "for group in self.config['groups']:\n", "for comp in group['components']:\n", "self.host_list = list(set(self.host_list))\n", "self.logger.debug(\"Checking component '%s' in group '%s' on host '%s'\" % (\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "For", "For", "Assign'", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_36():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n" ]
[ "def lib_paths():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_27(VAR_6):...\n", "if callable(VAR_6):\n", "return VAR_6()\n" ]
[ "def default_encode(value):...\n", "if callable(value):\n", "return value()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "def FUNC_32(self):...\n", "VAR_13 = -200\n", "self.cursor.execute('create table t1(n float)')\n", "self.cursor.execute('insert into t1 values (?)', VAR_13)\n", "VAR_20 = self.cursor.execute('select n from t1').fetchone()[0]\n", "self.assertEqual(VAR_13, VAR_20)\n" ]
[ "def test_negative_float(self):...\n", "value = -200\n", "self.cursor.execute('create table t1(n float)')\n", "self.cursor.execute('insert into t1 values (?)', value)\n", "result = self.cursor.execute('select n from t1').fetchone()[0]\n", "self.assertEqual(value, result)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "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 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 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self, VAR_14, VAR_15=None, VAR_12=None):...\n", "return self.url_put(VAR_14, VAR_15, VAR_12=headers)\n" ]
[ "def update(self, uuid, body=None, headers=None):...\n", "return self.url_put(uuid, body, headers=headers)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_1, VAR_7, VAR_8, VAR_9, VAR_10=None, VAR_4=None):...\n", "GenericRequest.__init__(self, VAR_1, VAR_4)\n", "self.url = '%stasks/%s/test' % (self.base_url, VAR_7[1])\n", "self.task = VAR_7\n", "self.submission_format = VAR_8\n", "self.filenames = VAR_9\n", "self.data = {}\n", "if...
[ "def __init__(self, browser, task, submission_format, filenames, language=...\n", "GenericRequest.__init__(self, browser, base_url)\n", "self.url = '%stasks/%s/test' % (self.base_url, task[1])\n", "self.task = task\n", "self.submission_format = submission_format\n", "self.filenames = filenames\n", "self...
[ 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Condition", "Assign'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_2(self, VAR_5, VAR_6, VAR_3):...\n", "VAR_4 = self.logger\n", "if not os.path.isdir(VAR_5):\n", "VAR_19 = 'Source path: %s does not exist or is not a directory.' % VAR_5\n", "if not os.path.isdir(VAR_3):\n", "VAR_4.critical(VAR_19)\n", "VAR_19 = 'Web root % s does not exist or is not a directo...
[ "def _sanity_check_path(self, src, dst, www_root):...\n", "logger = self.logger\n", "if not os.path.isdir(src):\n", "msg = 'Source path: %s does not exist or is not a directory.' % src\n", "if not os.path.isdir(www_root):\n", "logger.critical(msg)\n", "msg = 'Web root % s does not exist or is not a dire...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Condition", "Assign'", "Assig...
[ "def FUNC_2(self):...\n", "VAR_27 = Ganesha.get_daemons_status()\n", "if VAR_27:\n", "return [{'daemon_id': daemon_id, 'cluster_id': VAR_6, 'status': VAR_27[\n VAR_6][daemon_id]['status'], 'desc': VAR_27[VAR_6][daemon_id]['desc']} for\n daemon_id in VAR_27[VAR_6] for VAR_6 in VAR_27]\n", "VAR_22 = []\...
[ "def list(self):...\n", "status_dict = Ganesha.get_daemons_status()\n", "if status_dict:\n", "return [{'daemon_id': daemon_id, 'cluster_id': cluster_id, 'status':\n status_dict[cluster_id][daemon_id]['status'], 'desc': status_dict[\n cluster_id][daemon_id]['desc']} for daemon_id in status_dict[cluster_i...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "For", "Expr'", "Return'" ]
[ "def __init__(self, VAR_18, *VAR_15, **VAR_16):...\n", "CLASS_3.__init__(self, VAR_18, errors.WRONG_PASSWORD, *VAR_15, **kw)\n" ]
[ "def __init__(self, item, *a, **kw):...\n", "VRequired.__init__(self, item, errors.WRONG_PASSWORD, *a, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(self):...\n", "VAR_1 = self.current_user\n", "VAR_12 = []\n", "if VAR_1:\n", "VAR_29 = db.DatasetVersion.select().join(db.Dataset).join(db.DatasetAccess\n ).where(db.DatasetVersion.available_from > datetime.now(), db.\n DatasetAccess.user == VAR_1, db.DatasetAccess.is_admin)\n", "for VAR...
[ "def get(self):...\n", "user = self.current_user\n", "ret = []\n", "if user:\n", "futures = db.DatasetVersion.select().join(db.Dataset).join(db.DatasetAccess\n ).where(db.DatasetVersion.available_from > datetime.now(), db.\n DatasetAccess.user == user, db.DatasetAccess.is_admin)\n", "for version in ...
[ 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "For", "For", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_17(self, VAR_22, VAR_23=None, VAR_24=True):...\n", "self._handlers.append((VAR_22, VAR_23, VAR_24))\n" ]
[ "def _add_handler(self, handle_msg, handlername=None, required=True):...\n", "self._handlers.append((handle_msg, handlername, required))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_9(VAR_2):...\n", "assert VAR_2 == 'hello'\n" ]
[ "def assert_warn(line):...\n", "assert line == 'hello'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assert'" ]
[ "def FUNC_0(self, VAR_1):...\n", "VAR_6 = 'string'.format(VAR_1=driver)\n", "self.cursor.execute(VAR_6)\n", "self.rides = self.cursor.fetchall()\n" ]
[ "def find_rides(self, driver):...\n", "query = (\n \"\"\"\n SELECT r.rno, r.price, r.rdate, r.seats, r.lugDesc, r.src, r.dst, r.driver, r.cno, r.seats-COUNT(b.bno) \n FROM rides r, bookings b\n WHERE driver = '{driver}'\n AND r.rno = b.bno \n GROUP BY r.rno, r.price, r.rdate,...
[ 0, 4, 4, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'" ]
[ "def FUNC_8(VAR_11):...\n", "return True\n" ]
[ "def file_filter(_path):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name, 'size': 1, 'id': self.volid}\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'show').AndRaise(\n processutils.ProcessExecutionError(stdout=\n \"\"\...
[ "def test_delete_absent_volume(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name, 'size': 1, 'id': self.volid}\n", "self.driver._eql_execute('volume', 'select', volume['name'], 'show').AndRaise(\n processutils.ProcessExecutionErr...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_19(VAR_32, VAR_33, VAR_5=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_52 = {}\n", "VAR_61 = {}\n", "def FUNC_31(VAR_62):...\n", "\"\"\"docstring\"\"\"\n", "VAR_84 = 0\n", "while VAR_62[VAR_84].isdigit():\n", "VAR_84 += 1\n", "if VAR_84 > 0:\n", "return int(VAR_62[:VAR_84])\n", "ret...
[ "def _get_core_keywords(skw_matches, ckw_matches, spires=False):...\n", "\"\"\"docstring\"\"\"\n", "output = {}\n", "category = {}\n", "def _get_value_kw(kw):...\n", "\"\"\"docstring\"\"\"\n", "i = 0\n", "while kw[i].isdigit():\n", "i += 1\n", "if i > 0:\n", "return int(kw[:i])\n", "return 0\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "AugAssign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_15(self, VAR_3=None):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_22(VAR_30, VAR_3):...\n", "if not isinstance(VAR_30, _IOFile):\n", "return IOFile(VAR_30, VAR_16=self)\n", "return VAR_30.apply_wildcards(VAR_3, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n" ]
[ "def expand_wildcards(self, wildcards=None):...\n", "\"\"\"docstring\"\"\"\n", "def concretize_iofile(f, wildcards):...\n", "if not isinstance(f, _IOFile):\n", "return IOFile(f, rule=self)\n", "return f.apply_wildcards(wildcards, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "from os.path import abspath, dirname, join\n", "from django.utils.translation import ugettext_lazy as _\n", "VAR_0 = dirname(dirname(abspath(__file__)))\n", "VAR_1 = False\n", "VAR_2 = None\n", "VAR_3 = ()\n", "VAR_4 = 30\n", "VAR_5 = ['*']\n", "VAR_6 = None\n", "VAR_7 = 'A+'\n", "VAR_8 = 'Welc...
[ "from os.path import abspath, dirname, join\n", "from django.utils.translation import ugettext_lazy as _\n", "BASE_DIR = dirname(dirname(abspath(__file__)))\n", "DEBUG = False\n", "SECRET_KEY = None\n", "ADMINS = ()\n", "EMAIL_TIMEOUT = 30\n", "ALLOWED_HOSTS = ['*']\n", "SITEWIDE_ALERT_TEXT = None\n...
[ 0, 0, 0, 0, 0, 4, 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, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'"...
[ "def FUNC_1(self, VAR_6, VAR_7=True, VAR_8=1):...\n", "if not self.sshpool:\n", "VAR_13 = self.configuration.san_password\n", "VAR_12 = None\n", "VAR_14 = self.configuration.san_private_key\n", "VAR_17 = VAR_8\n", "VAR_0.error(_('Error running SSH command: %s') % VAR_6)\n", "VAR_15 = self.configuratio...
[ "def _run_ssh(self, command, check_exit_code=True, attempts=1):...\n", "if not self.sshpool:\n", "password = self.configuration.san_password\n", "last_exception = None\n", "privatekey = self.configuration.san_private_key\n", "total_attempts = attempts\n", "LOG.error(_('Error running SSH command: %s') % ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "AugAssign'", "Assign'", "Return'", "Expr'", "Assign'", "Expr'" ]
[ "\"\"\"string\"\"\"\n", "from hp3parclient import exceptions as hpexceptions\n", "from oslo.config import cfg\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder import utils\n", "import cinder.volume.driver\n", "from cinder.volume.drivers.san.hp ...
[ "\"\"\"\nVolume driver for HP 3PAR Storage array.\nThis driver requires 3.1.2 MU2 firmware on the 3PAR array.\n\nYou will need to install the python hp3parclient.\nsudo pip install hp3parclient\n\nSet the following in the cinder.conf file to enable the\n3PAR Fibre Channel Driver along with the required flags:\n\nvo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Return'" ]
[ "async def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "await asyncio.sleep(2)\n", "await self.bot.change_presence(game=discord.Game(name='READY!'), status=\n discord.Status)\n", "await asyncio.sleep(10)\n", "if not self.running_lock.locked():\n", "asyncio.ensure_future(self.activity_update_loop(...
[ "async def on_ready(self):...\n", "\"\"\"docstring\"\"\"\n", "await asyncio.sleep(2)\n", "await self.bot.change_presence(game=discord.Game(name='READY!'), status=\n discord.Status)\n", "await asyncio.sleep(10)\n", "if not self.running_lock.locked():\n", "asyncio.ensure_future(self.activity_update_loo...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_13(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 2\n", "VAR_10 = 'string'.format(repo_dir=REPO_DIR, shard_str='/shard_' + self.\n shard if self.shard else '', procs=process_count)\n", "VAR_7 = BokChoyTestSuite('', num_processes=process_count)\n", "self.assertEqual(BokChoyTestSuite.verbos...
[ "def test_verbosity_settings_2_processes(self):...\n", "\"\"\"docstring\"\"\"\n", "process_count = 2\n", "expected_verbosity_string = (\n '--with-xunitmp --xunitmp-file={repo_dir}/reports/bok_choy{shard_str}/xunit.xml --processes={procs} --no-color --process-timeout=1200'\n .format(repo_dir=REPO_DIR, sh...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "@event.listens_for(Engine, 'after_cursor_execute')...\n", "VAR_32 = datetime.now() - VAR_4.info['query_start_time'].pop(-1)\n", "VAR_0.info('SQL: %s' % VAR_32)\n" ]
[ "@event.listens_for(Engine, 'after_cursor_execute')...\n", "total = datetime.now() - conn.info['query_start_time'].pop(-1)\n", "logger.info('SQL: %s' % total)\n" ]
[ 0, 0, 0 ]
[ "For", "Assign'", "Expr'" ]
[ "def FUNC_25(self):...\n", "if not self._IsServerAlive():\n", "return\n", "VAR_23 = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in VAR_23:\n", "vimsupport.EchoText(VAR_23['message'])\n" ]
[ "def ShowDetailedDiagnostic(self):...\n", "if not self._IsServerAlive():\n", "return\n", "debug_info = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in debug_info:\n", "vimsupport.EchoText(debug_info['message'])\n" ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_18(self, VAR_16, VAR_20):...\n", "\"\"\"docstring\"\"\"\n", "VAR_28 = ['volume', 'select', VAR_16['name'], 'access', 'create',\n 'initiator', VAR_20['initiator']]\n", "VAR_0.error(_('Failed to initialize connection to volume %s'), VAR_16['name'])\n", "if self.configuration.eqlx_use_chap:\n", ...
[ "def initialize_connection(self, volume, connector):...\n", "\"\"\"docstring\"\"\"\n", "cmd = ['volume', 'select', volume['name'], 'access', 'create', 'initiator',\n connector['initiator']]\n", "LOG.error(_('Failed to initialize connection to volume %s'), volume['name'])\n", "if self.configuration.eqlx_u...
[ 0, 0, 0, 0, 0, 2, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_29():...\n", "VAR_4 = 'hubba-bubba'\n", "self.assertEquals(VAR_32['eduPersonPrincipalName'], VAR_4)\n" ]
[ "def _check():...\n", "eppn = 'hubba-bubba'\n", "self.assertEquals(session['eduPersonPrincipalName'], eppn)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = ['hp3par_api_url', 'hp3par_username', 'hp3par_password', 'san_ip',\n 'san_login', 'san_password']\n", "self.common.check_flags(self.configuration, VAR_15)\n" ]
[ "def _check_flags(self):...\n", "\"\"\"docstring\"\"\"\n", "required_flags = ['hp3par_api_url', 'hp3par_username', 'hp3par_password',\n 'san_ip', 'san_login', 'san_password']\n", "self.common.check_flags(self.configuration, required_flags)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "from libtmux import Server\n", "from yaml import load, dump\n", "from setupParser import Loader\n", "from DepTree import Node, dep_resolve, CircularReferenceException\n", "import logging\n", "import os\n", "import socket\n", "import argparse\n", "from psutil import Process\n", "from subprocess im...
[ "from libtmux import Server\n", "from yaml import load, dump\n", "from setupParser import Loader\n", "from DepTree import Node, dep_resolve, CircularReferenceException\n", "import logging\n", "import os\n", "import socket\n", "import argparse\n", "from psutil import Process\n", "from subprocess im...
[ 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "Import'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assi...
[ "def FUNC_1(self):...\n", "VAR_2 = self.connect()\n", "VAR_3 = 'SELECT description FROM crimes'\n", "VAR_2.close()\n", "cursor.execute(VAR_3)\n", "return cursor.fetchall()\n" ]
[ "def get_all_inputs(self):...\n", "connection = self.connect()\n", "query = 'SELECT description FROM crimes'\n", "connection.close()\n", "cursor.execute(query)\n", "return cursor.fetchall()\n" ]
[ 0, 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "import logging\n", "from odoo import fields, api, exceptions, _\n", "from odoo import SUPERUSER_ID\n", "from odoo.tools.safe_eval import safe_eval\n", "from odoo.addons.base_crapo_workflow.mixins.crapo_readonly_view_mixin import ReadonlyViewMixin\n", "\"\"\"string\"\"\"\n", "VAR_0 = \"[('crapo_readonly...
[ "import logging\n", "from odoo import fields, api, exceptions, _\n", "from odoo import SUPERUSER_ID\n", "from odoo.tools.safe_eval import safe_eval\n", "from odoo.addons.base_crapo_workflow.mixins.crapo_readonly_view_mixin import ReadonlyViewMixin\n", "\"\"\"\n Mixin class that can be used to defin...
[ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_agent(VAR_1)\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_agent(bindings)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "from discord.ext import commands\n", "from random import choice\n", "from .utils.dataIO import dataIO\n", "from .utils import checks\n", "from .utils.chat_formatting import box\n", "from collections import Counter, defaultdict, namedtuple\n", "import discord\n", "import asyncio\n", "import sqlite3 ...
[ "from discord.ext import commands\n", "from random import choice\n", "from .utils.dataIO import dataIO\n", "from .utils import checks\n", "from .utils.chat_formatting import box\n", "from collections import Counter, defaultdict, namedtuple\n", "import discord\n", "import asyncio\n", "import sqlite3 ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Assign'", "Expr'", "FunctionDef'", "Assign'", "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Conditi...
[ "async def FUNC_7(VAR_6):...\n", "VAR_7 = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "VAR_8 = await VAR_6.post('/results', VAR_7=json.dumps(data))\n", "assert VAR_8.status == 400\n" ]
[ "async def test_negative_jogging_result_no_uath(test_cli):...\n", "data = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "resp = await test_cli.post('/results', data=json.dumps(data))\n", "assert resp.status == 400\n" ]
[ 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_4(self):...\n", "VAR_2 = self.client.get(f'/datagroup/{self.objects.dg.pk}/')\n", "self.assertEqual(VAR_2.context['bulk'], 0,\n 'Product linked to all DataDocuments, no bulk_create needed.')\n", "VAR_3 = DataDocument.objects.create(data_group=self.objects.dg)\n", "VAR_3.matched = True\n", "se...
[ "def test_bulk_create_products_form(self):...\n", "response = self.client.get(f'/datagroup/{self.objects.dg.pk}/')\n", "self.assertEqual(response.context['bulk'], 0,\n 'Product linked to all DataDocuments, no bulk_create needed.')\n", "doc = DataDocument.objects.create(data_group=self.objects.dg)\n", "do...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_11, VAR_6, VAR_12, VAR_13=cbehavior.available,...\n", "self.url = VAR_11\n", "self.service = VAR_12\n", "self.behavior = VAR_13\n", "self.settings = VAR_14\n", "self.logger = VAR_6.bind(context=type(self).__name__, VAR_11=url)\n", "self.handler = VAR_15 or []\n", "self.warcinfo...
[ "def __init__(self, url, logger, service, behavior=cbehavior.available,...\n", "self.url = url\n", "self.service = service\n", "self.behavior = behavior\n", "self.settings = settings\n", "self.logger = logger.bind(context=type(self).__name__, url=url)\n", "self.handler = handler or []\n", "self.warcin...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "from flask import request\n", "from flask_jwt_extended import jwt_required\n", "from flask_restplus import Namespace, Resource, fields\n", "from utilities import database_utilities\n", "VAR_0 = Namespace('users', description='Information relating to users')\n", "def FUNC_0(self):...\n", "\"\"\"docstrin...
[ "from flask import request\n", "from flask_jwt_extended import jwt_required\n", "from flask_restplus import Namespace, Resource, fields\n", "from utilities import database_utilities\n", "api = Namespace('users', description='Information relating to users')\n", "def get(self):...\n", "\"\"\"docstring\"\"...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Return'" ]
[ "@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'" ]
[ "\"\"\"string\"\"\"\n", "from hp3parclient import exceptions as hpexceptions\n", "from oslo.config import cfg\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder import utils\n", "import cinder.volume.driver\n", "from cinder.volume.drivers.san.hp ...
[ "\"\"\"\nVolume driver for HP 3PAR Storage array.\nThis driver requires 3.1.2 MU2 firmware on the 3PAR array.\n\nYou will need to install the python hp3parclient.\nsudo pip install hp3parclient\n\nSet the following in the cinder.conf file to enable the\n3PAR Fibre Channel Driver along with the required flags:\n\nvo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Return'" ]
[ "def FUNC_16(self):...\n", "self.mock(bot_main, 'post_error_task', lambda *VAR_24: self.fail(VAR_24))\n", "def FUNC_24(VAR_25, VAR_23, *VAR_24):...\n", "if VAR_23 == 'on_after_task':\n", "VAR_50, VAR_51, VAR_5, VAR_52 = VAR_24\n", "self.mock(bot_main, 'call_hook', FUNC_24)\n", "self.assertEqual(True, VA...
[ "def test_run_manifest_task_failure(self):...\n", "self.mock(bot_main, 'post_error_task', lambda *args: self.fail(args))\n", "def call_hook(_botobj, name, *args):...\n", "if name == 'on_after_task':\n", "failure, internal_failure, dimensions, summary = args\n", "self.mock(bot_main, 'call_hook', call_hook)...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "FunctionDef'", "Condition", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_24(self, VAR_23, VAR_24):...\n", "for processor in VAR_24:\n", "f.write('{}\\n'.format(processor.strip()))\n" ]
[ "def _write_processor_info(self, processor_info_file, processors):...\n", "for processor in processors:\n", "f.write('{}\\n'.format(processor.strip()))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "def __del__(self):...\n", "self.conn.close()\n" ]
[ "def __del__(self):...\n", "self.conn.close()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_4(VAR_3):...\n", "VAR_0, VAR_10 = FUNC_0()\n", "VAR_18 = \"SELECT question from {} WHERE name = '{}'\".format(CFG(\n 'poll_table_name'), VAR_3)\n", "VAR_19 = FUNC_3(VAR_10, VAR_18)\n", "VAR_0.close()\n", "return VAR_19\n" ]
[ "def queryQuestion(poll_name):...\n", "conn, c = connectDB()\n", "req = \"SELECT question from {} WHERE name = '{}'\".format(CFG(\n 'poll_table_name'), poll_name)\n", "tmp = queryOne(c, req)\n", "conn.close()\n", "return tmp\n" ]
[ 0, 0, 4, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "@VAR_1.route('/register', methods=['GET', 'POST'])...\n", "if current_user.is_authenticated:\n", "return redirect(url_for('view_home'))\n", "VAR_41 = CLASS_7()\n", "if VAR_41.validate_on_submit():\n", "login_user(VAR_41.user, remember=True)\n", "return render_template('register.html', VAR_9=register_fo...
[ "@app.route('/register', methods=['GET', 'POST'])...\n", "if current_user.is_authenticated:\n", "return redirect(url_for('view_home'))\n", "register_form = RegisterForm()\n", "if register_form.validate_on_submit():\n", "login_user(register_form.user, remember=True)\n", "return render_template('register....
[ 0, 0, 6, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Return'", "Return'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1.value = beamr.interpreters.Comment(VAR_1.value)\n", "return VAR_1\n" ]
[ "def t_COMMENT(t):...\n", "\"\"\"docstring\"\"\"\n", "t.value = beamr.interpreters.Comment(t.value)\n", "return t\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_12(VAR_16, VAR_19):...\n", "if isinstance(VAR_16, CLASS_1):\n", "return VAR_19 in VAR_16.flags\n", "return False\n" ]
[ "def is_flagged(value, flag):...\n", "if isinstance(value, AnnotatedString):\n", "return flag in value.flags\n", "return False\n" ]
[ 0, 0, 7, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_3(self, VAR_6, VAR_7):...\n", "" ]
[ "def _on_view_sort(self, column, ascending):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\n", "VAR_8 = VAR_8[VAR_7:]\n" ]
[ "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\n", "yield c[:chunk_size]\n", "c = c[chunk_size:]\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_42(self):...\n", "VAR_54 = 0\n", "for VAR_40, VAR_41 in sorted(self._names.items(), VAR_44=lambda item: item[\n", "VAR_57, VAR_42 = VAR_41\n", "for item in self[VAR_54:]:\n", "if VAR_42 is None:\n", "yield None, item\n", "VAR_42 = VAR_57 + 1\n", "if VAR_57 > VAR_54:\n", "for item in self...
[ "def allitems(self):...\n", "next = 0\n", "for name, index in sorted(self._names.items(), key=lambda item: item[1][0]):\n", "start, end = index\n", "for item in self[next:]:\n", "if end is None:\n", "yield None, item\n", "end = start + 1\n", "if start > next:\n", "for item in self[next:start]:\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "For", "Condition", "Expr'", "Assign'", "Condition", "For", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_17(self):...\n", "self.run_test_case(self.scenario.delete_http_load_balancer(), timeout_ok=\n True, retry_interval_secs=10, max_retries=9)\n" ]
[ "def test_v_delete_http_load_balancer(self):...\n", "self.run_test_case(self.scenario.delete_http_load_balancer(), timeout_ok=\n True, retry_interval_secs=10, max_retries=9)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self):...\n", "self.saml_config = self._render_saml_settings_dict()\n" ]
[ "def __init__(self):...\n", "self.saml_config = self._render_saml_settings_dict()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "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 FUNC_14(self, VAR_10=True, VAR_11=True, VAR_12=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_31 = []\n", "VAR_32 = []\n", "VAR_33 = []\n", "if VAR_12:\n", "for VAR_42, t in self.edges:\n", "for VAR_42, t in self.edges:\n", "VAR_31.append(self.nodes.index(t))\n", "if not VAR_11:\n", "VAR_31...
[ "def getAdjacencyMatrix(self, includeSubPaths=True, weighted=True,...\n", "\"\"\"docstring\"\"\"\n", "row = []\n", "col = []\n", "data = []\n", "if transposed:\n", "for s, t in self.edges:\n", "for s, t in self.edges:\n", "row.append(self.nodes.index(t))\n", "if not weighted:\n", "row.append(sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "For", "For", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Return'", "Assign'", "Assign'" ]
[ "@memoized_method...\n", "return FUNC_0('java.version', self._get_system_properties(VAR_12)[\n 'java.version'])\n" ]
[ "@memoized_method...\n", "return _parse_java_version('java.version', self._get_system_properties(java\n )['java.version'])\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'BODY BLUEPRINT FITNESS INC.', VAR_7='1')\n", "FUNC_3(VAR_2, 'BLUEPRINT BEAUTEE', VAR_7='2')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='BLUEPRINT BEAUTY', VAR_10=[{'name':\n '----BLUEPRINT BEAUTY'}, {'name': 'BLUEPRINT BEAUTEE'}, {'name':\n '--...
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'BODY BLUEPRINT FITNESS INC.', id='1')\n", "seed_database_with(solr, 'BLUEPRINT BEAUTEE', id='2')\n", "verify_results(client, jwt, query='BLUEPRINT BEAUTY', expected=[{'name':\n '----BLUEPRINT BEAUTY'}, {'name': 'BLUEPRI...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@classmethod...\n", "return VAR_4._create_jardep('scala-compiler', VAR_6)\n" ]
[ "@classmethod...\n", "return cls._create_jardep('scala-compiler', version)\n" ]
[ 0, 7 ]
[ "Condition", "Return'" ]
[ "def FUNC_11(self):...\n", "\"\"\"docstring\"\"\"\n", "if self._accessor is None:\n", "if self.__converted_entity is None:\n", "self.__converted_entity = self.get_matching(self.get_id()).get_entity()\n", "self.__converted_entity = self._convert_to_entity()\n", "return self.__converted_entity\n" ]
[ "def get_entity(self):...\n", "\"\"\"docstring\"\"\"\n", "if self._accessor is None:\n", "if self.__converted_entity is None:\n", "self.__converted_entity = self.get_matching(self.get_id()).get_entity()\n", "self.__converted_entity = self._convert_to_entity()\n", "return self.__converted_entity\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_0):...\n", "VAR_1 = Flask(__name__)\n", "VAR_1.config.from_object(VAR_0)\n", "\"\"\" Basic Routes \"\"\"\n", "FUNC_1(VAR_1)\n", "FUNC_2()\n", "return VAR_1\n" ]
[ "def create_app(config_filename):...\n", "app = Flask(__name__)\n", "app.config.from_object(config_filename)\n", "\"\"\" Basic Routes \"\"\"\n", "configure_blueprints(app)\n", "configure_extensions()\n", "return app\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_3(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'show')\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'offline')\n", "s...
[ "def test_delete_volume(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'select', volume['name'], 'show')\n", "self.driver._eql_execute('volume', 'select', volume['name'], 'off...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_19(self, *VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "self.order.append(list(VAR_18))\n" ]
[ "def add(self, *rulenames):...\n", "\"\"\"docstring\"\"\"\n", "self.order.append(list(rulenames))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "async def FUNC_4(VAR_6):...\n", "VAR_10 = {'Authorization': f'Bearer {VAR_1}'}\n", "VAR_7 = {'date': '1971-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "VAR_8 = await VAR_6.post('/results', VAR_10=headers, VAR_7=json.dumps(data))\n", "assert VAR_8.status == 400\n" ]
[ "async def test_negative_jogging_result(test_cli):...\n", "headers = {'Authorization': f'Bearer {access_token}'}\n", "data = {'date': '1971-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n", "resp = await test_cli.post('/results', headers=headers, data=json.dumps(data))\n", "asse...
[ 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_0(self, VAR_0, VAR_1):...\n", "@functools.wraps(VAR_0)...\n", "\"\"\"docstring\"\"\"\n", "if hasattr(VAR_9, 'interaction'):\n", "VAR_28 = map(lambda pp: pp.principal.id, VAR_9.interaction.participations)\n", "VAR_28 = []\n", "if hasattr(self, 'logFile'):\n", "VAR_29 = '%s %s - %s \"%s\" %d %...
[ "def log_wrapper(self, f, server):...\n", "@functools.wraps(f)...\n", "\"\"\"docstring\"\"\"\n", "if hasattr(request, 'interaction'):\n", "principals = map(lambda pp: pp.principal.id, request.interaction.participations\n )\n", "principals = []\n", "if hasattr(self, 'logFile'):\n", "line = '%s %s - ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'" ]
[ "def __init__(self, VAR_7):...\n", "self._user_options = VAR_7\n", "self._user_notified_about_crash = False\n", "self._diag_interface = DiagnosticInterface(VAR_7)\n", "self._omnicomp = OmniCompleter(VAR_7)\n", "self._latest_completion_request = None\n", "self._latest_file_parse_request = None\n", "sel...
[ "def __init__(self, user_options):...\n", "self._user_options = user_options\n", "self._user_notified_about_crash = False\n", "self._diag_interface = DiagnosticInterface(user_options)\n", "self._omnicomp = OmniCompleter(user_options)\n", "self._latest_completion_request = None\n", "self._latest_file_par...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_12():...\n", "\"\"\"docstring\"\"\"\n", "VAR_39 = VAR_40.environ.get('CUDA_VISIBLE_DEVICES', None)\n", "if VAR_39 is None:\n", "return None\n", "if VAR_39 == '':\n", "return []\n", "return [int(i) for i in VAR_39.split(',')]\n" ]
[ "def get_cuda_visible_devices():...\n", "\"\"\"docstring\"\"\"\n", "gpu_ids_str = os.environ.get('CUDA_VISIBLE_DEVICES', None)\n", "if gpu_ids_str is None:\n", "return None\n", "if gpu_ids_str == '':\n", "return []\n", "return [int(i) for i in gpu_ids_str.split(',')]\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "@property...\n", "return self._input\n" ]
[ "@property...\n", "return self._input\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@auth.route('/signup', methods=['GET', 'POST'])...\n", "VAR_4 = RegistrationForm()\n", "if request.method == 'POST' and VAR_4.validate_on_submit():\n", "VAR_7 = ''.join([VAR_4.adj.data, VAR_4.benwa.data, VAR_4.pos.data])\n", "flash('There was an issue with sign up, please try again')\n", "VAR_8 = User.qu...
[ "@auth.route('/signup', methods=['GET', 'POST'])...\n", "form = RegistrationForm()\n", "if request.method == 'POST' and form.validate_on_submit():\n", "username = ''.join([form.adj.data, form.benwa.data, form.pos.data])\n", "flash('There was an issue with sign up, please try again')\n", "name_exists = Use...
[ 0, 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "@login_required()...\n", "VAR_10 = get_object_or_404(DataSource, VAR_2=pk)\n", "VAR_11 = DataDocument.objects.filter(data_group__in=DataGroup.objects.\n filter(data_source=datasource))\n", "VAR_10.registered = len(VAR_11) / float(VAR_10.estimated_records) * 100\n", "VAR_10.uploaded = len(VAR_11.filter(m...
[ "@login_required()...\n", "datasource = get_object_or_404(DataSource, pk=pk)\n", "docs = DataDocument.objects.filter(data_group__in=DataGroup.objects.filter(\n data_source=datasource))\n", "datasource.registered = len(docs) / float(datasource.estimated_records) * 100\n", "datasource.uploaded = len(docs.f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Expr'" ]
[ "from django.conf.urls import url, include\n", "from .projects import ProjectViewSet\n", "from .tasks import TaskViewSet, TaskTiles, TaskTilesJson, TaskAssets\n", "from .processingnodes import ProcessingNodeViewSet\n", "from rest_framework_nested import routers\n", "VAR_0 = routers.DefaultRouter()\n", "...
[ "from django.conf.urls import url, include\n", "from .projects import ProjectViewSet\n", "from .tasks import TaskViewSet, TaskTiles, TaskTilesJson, TaskAssets\n", "from .processingnodes import ProcessingNodeViewSet\n", "from rest_framework_nested import routers\n", "router = routers.DefaultRouter()\n", ...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'" ]
[ "def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3=1, *VAR_4, **VAR_5):...\n", "self.user_id = VAR_0\n", "self.username = VAR_1\n", "self.hashed_password = VAR_2\n", "self.roll_id = VAR_3\n" ]
[ "def __init__(self, user_id, username, hashed_password, roll_id=1, *args, **...\n", "self.user_id = user_id\n", "self.username = username\n", "self.hashed_password = hashed_password\n", "self.roll_id = roll_id\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "import argparse\n", "import json\n", "import logging\n", "import os\n", "import subprocess\n", "import sys\n", "import tempfile\n", "from pystache import context\n", "from os_apply_config import collect_config\n", "from os_apply_config import config_exception as exc\n", "from os_apply_config im...
[ "import argparse\n", "import json\n", "import logging\n", "import os\n", "import subprocess\n", "import sys\n", "import tempfile\n", "from pystache import context\n", "from os_apply_config import collect_config\n", "from os_apply_config import config_exception as exc\n", "from os_apply_config im...
[ 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'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'", "Condition", "Assign'...
[ "def __init__(self, VAR_14, VAR_12):...\n", "self._splitpath = fs.split_path(VAR_14.path)\n", "self._targetparam = set(VAR_14.parameters.keys())\n", "self._lensplitpath = len(self._splitpath)\n", "self._store = {}\n", "self._ds = VAR_12\n" ]
[ "def __init__(self, targetctx, client):...\n", "self._splitpath = fs.split_path(targetctx.path)\n", "self._targetparam = set(targetctx.parameters.keys())\n", "self._lensplitpath = len(self._splitpath)\n", "self._store = {}\n", "self._ds = client\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_16(VAR_9, VAR_10):...\n", "def FUNC_28(VAR_38):...\n", "return [item for item in VAR_10 if item['command'] == VAR_38]\n" ]
[ "def set_form_defaults(form, commands):...\n", "def get_command(command_name):...\n", "return [item for item in commands if item['command'] == command_name]\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_6(self):...\n", "for i, step in enumerate(self._r_steps_, 1):\n", "VAR_31, VAR_3 = step\n", "return None, None, None\n", "if VAR_3 == VAR_0:\n", "return i, VAR_31, VAR_3\n" ]
[ "def _first_missing(self):...\n", "for i, step in enumerate(self._r_steps_, 1):\n", "desc, roamer = step\n", "return None, None, None\n", "if roamer == MISSING:\n", "return i, desc, roamer\n" ]
[ 0, 0, 0, 1, 1, 1 ]
[ "FunctionDef'", "For", "Assign'", "Return'", "Condition", "Return'" ]
[ "def FUNC_0(self, VAR_4, VAR_5):...\n", "self.lsp_plugins[VAR_4] = VAR_5\n" ]
[ "def register_plugin_type(self, type, sig):...\n", "self.lsp_plugins[type] = sig\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_6(self, VAR_13):...\n", "if VAR_13:\n", "VAR_13 = VAR_100(VAR_13.split('[')[1].strip(']'))\n", "return 'en'\n", "if VAR_13 in g.all_languages:\n", "return VAR_13\n" ]
[ "def run(self, lang):...\n", "if lang:\n", "lang = str(lang.split('[')[1].strip(']'))\n", "return 'en'\n", "if lang in g.all_languages:\n", "return lang\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Condition", "Return'" ]
[ "def FUNC_24(self, VAR_39):...\n", "for r in VAR_39:\n", "if not r.name:\n", "r._comment_count = 0\n", "if '_comments' in r:\n", "r._comment_count = len(json.loads(r._comments or '[]'))\n" ]
[ "def add_comment_count(self, result):...\n", "for r in result:\n", "if not r.name:\n", "r._comment_count = 0\n", "if '_comments' in r:\n", "r._comment_count = len(json.loads(r._comments or '[]'))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Assign'", "Condition", "Assign'" ]
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import io\n", "import json\n", "import logging\n", "import os\n", "import re\n", "import subprocess\n", "import sys\n", "import time\n", "import requests\n", "...
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import io\n", "import json\n", "import logging\n", "import os\n", "import re\n", "import subprocess\n", "import sys\n", "import time\n", "import requests\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assig...
[ "def FUNC_33(VAR_16, VAR_22, VAR_23):...\n", "VAR_63, VAR_64, VAR_65 = VAR_23.split('-')\n", "VAR_89 = '{}-{}'.format(VAR_63, VAR_64)\n", "VAR_53 = 'string'.format(VAR_22, VAR_89)\n", "VAR_54 = VAR_16.exec(VAR_53)\n", "VAR_18 = [VAR_41[0] for VAR_41 in VAR_54]\n", "return VAR_18\n" ]
[ "def get_tournaments_during_month(db, scene, date):...\n", "y, m, d = date.split('-')\n", "ym_date = '{}-{}'.format(y, m)\n", "sql = (\n \"select url, date from matches where scene='{}' and date like '%{}%' group by url, date order by date\"\n .format(scene, ym_date))\n", "res = db.exec(sql)\n", "ur...
[ 0, 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(self, VAR_0):...\n", "self.__init__(VAR_4=False)\n", "self.name = VAR_0.get('name')\n", "self.vars = VAR_0.get('vars', dict())\n", "self.address = VAR_0.get('address', '')\n", "self._uuid = VAR_0.get('uuid', None)\n", "self.implicit = VAR_0.get('implicit', False)\n", "VAR_8 = VAR_0.get('gr...
[ "def deserialize(self, data):...\n", "self.__init__(gen_uuid=False)\n", "self.name = data.get('name')\n", "self.vars = data.get('vars', dict())\n", "self.address = data.get('address', '')\n", "self._uuid = data.get('uuid', None)\n", "self.implicit = data.get('implicit', False)\n", "groups = data.get('...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3():...\n", "\"\"\"docstring\"\"\"\n", "VAR_16 = VAR_17 = ''\n", "for n in range(0, 32):\n", "VAR_32 = six.unichr(n)\n", "return VAR_14(VAR_16, VAR_17)\n", "VAR_16 += VAR_32\n", "if VAR_32 in '\\t\\n\\r':\n", "VAR_17 += VAR_32\n", "VAR_17 += ' '\n" ]
[ "def setupTranslationMap():...\n", "\"\"\"docstring\"\"\"\n", "ctrls = trans = ''\n", "for n in range(0, 32):\n", "char = six.unichr(n)\n", "return maketrans(ctrls, trans)\n", "ctrls += char\n", "if char in '\\t\\n\\r':\n", "trans += char\n", "trans += ' '\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "AugAssign'", "Condition", "AugAssign'", "AugAssign'" ]