lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_7(VAR_17):...\n",
"@receiver(VAR_5, **decorator_kwargs)...\n",
"if settings.SUSPEND_SIGNALS:\n",
"return\n",
"return VAR_17(VAR_23, **kwargs)\n"
] | [
"def our_wrapper(func):...\n",
"@receiver(signal, **decorator_kwargs)...\n",
"if settings.SUSPEND_SIGNALS:\n",
"return\n",
"return func(sender, **kwargs)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Condition",
"Return'",
"Return'"
] |
[
"from datetime import date, time\n",
"from django.shortcuts import redirect\n",
"from django.http import HttpRequest, HttpResponseBadRequest\n",
"from frontpage.models import Profile, Media, MediaUpload\n",
"from frontpage.management.magic import compile_markdown, get_current_user\n",
"import logging\n",
... | [
"from datetime import date, time\n",
"from django.shortcuts import redirect\n",
"from django.http import HttpRequest, HttpResponseBadRequest\n",
"from frontpage.models import Profile, Media, MediaUpload\n",
"from frontpage.management.magic import compile_markdown, get_current_user\n",
"import logging\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
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"AnnAssign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Return'",
"Return'",
"Assign'",
"AnnAssign'",
"AnnAssign'",
"Condition",
"Re... |
[
"def FUNC_14(self):...\n",
"self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n",
"self.driver._eql_execute('pool', 'select', self.configuration.eqlx_pool, 'show'\n ).AndReturn(['TotalCapacity: 111GB', 'FreeSpace: 11GB'])\n",
"self.mox.ReplayAll()\n",
"self.driver._update_volume_st... | [
"def test_update_volume_stats(self):...\n",
"self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n",
"self.driver._eql_execute('pool', 'select', self.configuration.eqlx_pool, 'show'\n ).AndReturn(['TotalCapacity: 111GB', 'FreeSpace: 11GB'])\n",
"self.mox.ReplayAll()\n",
"self.driver.... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_15(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1.value = beamr.interpreters.Text('\\\\' + VAR_1.value)\n",
"return VAR_1\n"
] | [
"def t_ANTIESCAPE(t):...\n",
"\"\"\"docstring\"\"\"\n",
"t.value = beamr.interpreters.Text('\\\\' + t.value)\n",
"return t\n"
] | [
0,
0,
2,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def __setitem__(self, VAR_7, VAR_15):...\n",
"self.current[VAR_7] = VAR_15\n"
] | [
"def __setitem__(self, path, value):...\n",
"self.current[path] = value\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_6(self, VAR_25):...\n",
"VAR_77 = []\n",
"if VAR_25:\n",
"VAR_77 = [VAR_3 for VAR_3 in self.comma_sep.split(VAR_25) if VAR_3 ==\n _force_ascii(VAR_3)]\n",
"return VAR_77\n"
] | [
"def run(self, tag_field):...\n",
"tags = []\n",
"if tag_field:\n",
"tags = [x for x in self.comma_sep.split(tag_field) if x == _force_ascii(x)]\n",
"return tags\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"return self.name\n"
] | [
"def get_name(self):...\n",
"return self.name\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self, VAR_11):...\n",
"VAR_17 = self.bot\n",
"VAR_18 = VAR_11.message\n",
"VAR_19 = VAR_18.text\n",
"VAR_20 = VAR_18.message_id\n",
"VAR_15 = VAR_18.chat_id\n",
"VAR_21 = self.userparams\n",
"VAR_21.initializeUser(VAR_15=chat_id, VAR_28=INITIAL_SUBSCRIBER_PARAMS)\n",
"VAR_22 = LanguageSu... | [
"def processUpdate(self, u):...\n",
"bot = self.bot\n",
"Message = u.message\n",
"message = Message.text\n",
"message_id = Message.message_id\n",
"chat_id = Message.chat_id\n",
"subs = self.userparams\n",
"subs.initializeUser(chat_id=chat_id, data=INITIAL_SUBSCRIBER_PARAMS)\n",
"LS = LanguageSupport... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Condition",
"Expr'",
... |
[
"def FUNC_15(self, VAR_8, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = \"UPDATE {0} SET file_id='{1}' WHERE path='{2}'\".format(VAR_2,\n VAR_11, VAR_8)\n",
"self._run_command(VAR_7)\n"
] | [
"def updateCacheID(self, pth, cacheID):...\n",
"\"\"\"docstring\"\"\"\n",
"command = \"UPDATE {0} SET file_id='{1}' WHERE path='{2}'\".format(TABLE_NAME,\n cacheID, pth)\n",
"self._run_command(command)\n"
] | [
0,
0,
4,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_9(VAR_8):...\n",
"return urllib.parse.unquote_plus(VAR_8)\n"
] | [
"def url_unescape(url):...\n",
"return urllib.parse.unquote_plus(url)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(VAR_1, VAR_6):...\n",
""
] | [
"def directory_index(path, fullpath):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def __init__(self, *VAR_4, **VAR_5):...\n",
"super(CLASS_0, self).__init__(*VAR_4, **kwargs)\n",
"self.configuration.append_config_values(VAR_1)\n",
"self._group_ip = None\n",
"self.sshpool = None\n"
] | [
"def __init__(self, *args, **kwargs):...\n",
"super(DellEQLSanISCSIDriver, self).__init__(*args, **kwargs)\n",
"self.configuration.append_config_values(eqlx_opts)\n",
"self._group_ip = None\n",
"self.sshpool = None\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Assign'",
"Assign'"
] |
[
"def FUNC_0(VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_2 <= VAR_23(VAR_1):\n",
"return VAR_1[:VAR_2]\n",
"VAR_3 = (VAR_2 + VAR_23(VAR_1) - 1) / VAR_23(VAR_1)\n",
"VAR_4 = VAR_1 * VAR_3\n",
"return VAR_4[:VAR_2]\n"
] | [
"def _generate_test_string(length):...\n",
"\"\"\"docstring\"\"\"\n",
"if length <= len(_TESTSTR):\n",
"return _TESTSTR[:length]\n",
"c = (length + len(_TESTSTR) - 1) / len(_TESTSTR)\n",
"v = _TESTSTR * c\n",
"return v[:length]\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_25(self, VAR_73):...\n",
"def FUNC_39(VAR_101):...\n",
"VAR_101.message = VAR_73\n",
"return VAR_101\n"
] | [
"def message(self, message):...\n",
"def decorate(ruleinfo):...\n",
"ruleinfo.message = message\n",
"return ruleinfo\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_0, VAR_1):...\n",
"self.worker = VAR_0\n",
"self.mode = VAR_1\n",
"self.redis_client = VAR_0.redis_client\n"
] | [
"def __init__(self, worker, mode):...\n",
"self.worker = worker\n",
"self.mode = mode\n",
"self.redis_client = worker.redis_client\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_12(self):...\n",
"VAR_4 = 'hubba-bubba'\n",
"def FUNC_29():...\n",
"self.assertIn('reauthn-for-chpass', VAR_32)\n",
"VAR_29 = VAR_32['reauthn-for-chpass']\n",
"VAR_30 = int(time.time())\n",
"self.assertTrue(VAR_30 - VAR_29 < 5)\n",
"self.acs('/chpass', VAR_4, FUNC_29)\n"
] | [
"def test_chpass_assertion_consumer_service(self):...\n",
"eppn = 'hubba-bubba'\n",
"def _check():...\n",
"self.assertIn('reauthn-for-chpass', session)\n",
"then = session['reauthn-for-chpass']\n",
"now = int(time.time())\n",
"self.assertTrue(now - then < 5)\n",
"self.acs('/chpass', eppn, _check)\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_20(self):...\n",
"VAR_14 = self.new_mocked_client(client.NSX3Client)\n",
"VAR_14.get('ports')\n",
"FUNC_2('get', VAR_14, 'https://1.2.3.4/api/v1/ports')\n"
] | [
"def test_get_resource(self):...\n",
"api = self.new_mocked_client(client.NSX3Client)\n",
"api.get('ports')\n",
"assert_json_call('get', api, 'https://1.2.3.4/api/v1/ports')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(self):...\n",
"url_helper.urllib2.urlopen(mox.IgnoreArg(), mox.IgnoreArg(), timeout=mox.\n IgnoreArg()).AndRaise(urllib2.URLError('url'))\n",
"self._mox.ReplayAll()\n",
"self.assertIsNone(url_helper.UrlOpen('url', max_tries=1))\n",
"self._mox.VerifyAll()\n"
] | [
"def testUrlOpenFailure(self):...\n",
"url_helper.urllib2.urlopen(mox.IgnoreArg(), mox.IgnoreArg(), timeout=mox.\n IgnoreArg()).AndRaise(urllib2.URLError('url'))\n",
"self._mox.ReplayAll()\n",
"self.assertIsNone(url_helper.UrlOpen('url', max_tries=1))\n",
"self._mox.VerifyAll()\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(VAR_3, VAR_4=None):...\n",
"VAR_0 = CLASS_0(VAR_3)\n",
"VAR_0.rule = VAR_4\n",
"return VAR_0\n"
] | [
"def IOFile(file, rule=None):...\n",
"f = _IOFile(file)\n",
"f.rule = rule\n",
"return f\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"VAR_0 = get_connection()\n",
"VAR_1 = VAR_0.cursor()\n",
"VAR_1.execute(\n f\"insert into visitors (ip_address, user_agent, referrer, full_path, visit_time) values ('{self.ip_address}', '{self.user_agent}', '{self.referrer}', '{self.full_path}', '{self.visit_time}');\"\n )\n",... | [
"def on_save(self):...\n",
"connection = get_connection()\n",
"cursor = connection.cursor()\n",
"cursor.execute(\n f\"insert into visitors (ip_address, user_agent, referrer, full_path, visit_time) values ('{self.ip_address}', '{self.user_agent}', '{self.referrer}', '{self.full_path}', '{self.visit_time}');... | [
0,
0,
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def get_entity(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_4(self):...\n",
"VAR_2 = '/api/apps'\n",
"VAR_5 = {'id': 'autotest'}\n",
"VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n",
"self.assertEqual(VAR_3.status_code, 201)\n",
"VAR_4 = VAR_3.data['id']\n",
"if not os.path.exists(settings.DEIS_LOG_DIR):\n",... | [
"def test_app_actions(self):...\n",
"url = '/api/apps'\n",
"body = {'id': 'autotest'}\n",
"response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"if not os.path.exists(settings.DEIS... | [
0,
0,
0,
5,
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'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Exp... |
[
"def FUNC_4(self):...\n",
"self.expected_requests([('http://localhost/swarming/api/v1/bot/handshake',\n {'data': {'attributes': 'b'}, 'headers': {'X-XSRF-Token-Request': '1'}},\n {'expiration_sec': 100, 'ignored': True, 'xsrf_token': 'token'}), (\n 'http://localhost/a', {'data': {'foo': 'bar'}, 'headers'... | [
"def testXsrfRemoteCustom(self):...\n",
"self.expected_requests([('http://localhost/swarming/api/v1/bot/handshake',\n {'data': {'attributes': 'b'}, 'headers': {'X-XSRF-Token-Request': '1'}},\n {'expiration_sec': 100, 'ignored': True, 'xsrf_token': 'token'}), (\n 'http://localhost/a', {'data': {'foo': 'ba... | [
0,
5,
5,
5,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"@cached_property...\n",
"return self.child_branch or self.child_leaf\n"
] | [
"@cached_property...\n",
"return self.child_branch or self.child_leaf\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def __init__(self, VAR_16):...\n",
"self.flags = dict()\n"
] | [
"def __init__(self, value):...\n",
"self.flags = dict()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_1(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_8 = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN'],\n 'Content-Length': '0'}\n",
"VAR_9 = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n",
"VAR_10 = 'https://api.github.com/user/following/{}'\n",
"VAR_10 = VAR_10.format(VAR_1... | [
"def follow_user(user):...\n",
"\"\"\"docstring\"\"\"\n",
"headers = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN'],\n 'Content-Length': '0'}\n",
"auth = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n",
"url = 'https://api.github.com/user/following/{}'\n",
"url = url.format(user)\n",... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_7(self):...\n",
"VAR_7, VAR_23, VAR_19, VAR_5 = super().deconstruct()\n",
"if VAR_23 == 'django.contrib.postgres.fields.array.ArrayField':\n",
"VAR_23 = 'django.contrib.postgres.fields.ArrayField'\n",
"VAR_5.update({'base_field': self.base_field.clone(), 'size': self.size})\n",
"return VAR_7, VA... | [
"def deconstruct(self):...\n",
"name, path, args, kwargs = super().deconstruct()\n",
"if path == 'django.contrib.postgres.fields.array.ArrayField':\n",
"path = 'django.contrib.postgres.fields.ArrayField'\n",
"kwargs.update({'base_field': self.base_field.clone(), 'size': self.size})\n",
"return name, path,... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_9(self, *VAR_15, **VAR_75):...\n",
""
] | [
"def newfn(self, *a, **env):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_5(self, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {}\n",
"VAR_5['clusterName'] = self.configuration.san_clustername\n",
"if self.configuration.san_thin_provision:\n",
"VAR_5['thinProvision'] = '1'\n",
"VAR_5['thinProvision'] = '0'\n",
"VAR_5['volumeName'] = VAR_10['name']\n",
"if... | [
"def create_volume(self, volume):...\n",
"\"\"\"docstring\"\"\"\n",
"cliq_args = {}\n",
"cliq_args['clusterName'] = self.configuration.san_clustername\n",
"if self.configuration.san_thin_provision:\n",
"cliq_args['thinProvision'] = '1'\n",
"cliq_args['thinProvision'] = '0'\n",
"cliq_args['volumeName']... | [
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'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"self.hostname = VAR_3\n",
"self.message = 'Lost connection to remote host %s' % VAR_3\n"
] | [
"def __init__(self, hostname):...\n",
"\"\"\"docstring\"\"\"\n",
"self.hostname = hostname\n",
"self.message = 'Lost connection to remote host %s' % hostname\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'"
] |
[
"def FUNC_8(VAR_15, VAR_16=None, VAR_17=None):...\n",
"VAR_34 = FUNC_0()\n",
"return VAR_34.do_request(VAR_6 + VAR_15, VAR_16, VAR_17)\n"
] | [
"def admin_req(path, args=None, files=None):...\n",
"browser = get_aws_browser()\n",
"return browser.do_request(AWS_BASE_URL + path, args, files)\n"
] | [
0,
0,
5
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"@VAR_2.route('/data/dailyjobs/')...\n",
"VAR_24, VAR_23 = FUNC_4(request.args)\n",
"VAR_28 = FUNC_0()\n",
"VAR_32 = VAR_28.cursor()\n",
"VAR_41 = 'string' % (VAR_24, VAR_23)\n",
"VAR_32.execute(VAR_41)\n",
"VAR_62 = {}\n",
"for rows in VAR_32.fetchall():\n",
"VAR_52 = str(rows[0])\n",
"return {'d... | [
"@app.route('/data/dailyjobs/')...\n",
"start_date, end_date = clean_date_params(request.args)\n",
"db = create_db_connnection()\n",
"cursor = db.cursor()\n",
"query = (\n \"select date, platform, branch, numpushes, numjobs, sumduration from dailyjobs where date>='%s' and date <='%s' ... | [
0,
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'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Exp... |
[
"def FUNC_2(VAR_4):...\n",
"VAR_14 = VAR_4['request']\n",
"VAR_4['_'] = VAR_14.translate\n",
"VAR_4['localizer'] = VAR_14.localizer\n",
"VAR_4['h'] = VAR_11\n"
] | [
"def add_render_globals_to_template(event):...\n",
"request = event['request']\n",
"event['_'] = request.translate\n",
"event['localizer'] = request.localizer\n",
"event['h'] = template_helpers\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"@FUNC_7...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_16.pop(VAR_17(VAR_1.name) + '_autoregister', None)\n",
"VAR_5 = FUNC_1(VAR_1, VAR_2)\n",
"VAR_19 = signup_handlers[VAR_1.name]\n",
"if not current_user.is_authenticated():\n",
"VAR_27 = VAR_19['info'](VAR_2)\n",
"if not VAR_5.remote_account.extra_data an... | [
"@oauth_error_handler...\n",
"\"\"\"docstring\"\"\"\n",
"session.pop(token_session_key(remote.name) + '_autoregister', None)\n",
"token = response_token_setter(remote, resp)\n",
"handlers = signup_handlers[remote.name]\n",
"if not current_user.is_authenticated():\n",
"account_info = handlers['info'](res... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
5
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Condition",
"Return'",
"Return'",
"Assign'",
"Condition",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(self, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7=None):...\n",
"VAR_12 = ''\n",
"if VAR_3 is None:\n",
"VAR_29 = VAR_4\n",
"VAR_12 += self._formatCredentials(VAR_3, VAR_8='src')\n",
"if VAR_5 is None:\n",
"VAR_29 = 'src:{}'.format(VAR_4)\n",
"VAR_30 = VAR_6\n",
"VAR_12 += self._formatCredentials(... | [
"def copy(self, src_data, src_path, dst_data, dst_path, job_id=None):...\n",
"credentials = ''\n",
"if src_data is None:\n",
"src = src_path\n",
"credentials += self._formatCredentials(src_data, name='src')\n",
"if dst_data is None:\n",
"src = 'src:{}'.format(src_path)\n",
"dst = dst_path\n",
"crede... | [
0,
2,
0,
0,
2,
0,
0,
0,
2,
2,
0,
2,
0,
0,
0,
0,
2,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"AugAssign'",
"Condition",
"Assign'",
"Assign'",
"AugAssign'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __init__(self, VAR_2, VAR_3=None):...\n",
"super(CLASS_1, self).__init__(VAR_3)\n",
"self.authenticated = VAR_2\n"
] | [
"def __init__(self, authenticated, exceptions=None):...\n",
"super(RdpPollResult, self).__init__(exceptions)\n",
"self.authenticated = authenticated\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_10(VAR_5):...\n",
"if VAR_5 == []:\n",
"return 'true'\n",
"VAR_11 = '('\n",
"for i in range(0, len(VAR_5) - 1):\n",
"VAR_11 += VAR_5[i] + '=1 or '\n",
"VAR_11 += VAR_5[len(VAR_5) - 1] + ' = 1 ) '\n",
"return VAR_11\n"
] | [
"def makeBoolean(list):...\n",
"if list == []:\n",
"return 'true'\n",
"result = '('\n",
"for i in range(0, len(list) - 1):\n",
"result += list[i] + '=1 or '\n",
"result += list[len(list) - 1] + ' = 1 ) '\n",
"return result\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"For",
"AugAssign'",
"AugAssign'",
"Return'"
] |
[
"def FUNC_5(self, VAR_7):...\n",
"if not VAR_7:\n",
"return []\n",
"def FUNC_9(VAR_1):...\n",
"return {'name': str(VAR_1), 'link': VAR_1.get_absolute_url()}\n"
] | [
"def _generate_courses(self, profile):...\n",
"if not profile:\n",
"return []\n",
"def course_entry(instance):...\n",
"return {'name': str(instance), 'link': instance.get_absolute_url()}\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"FunctionDef'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._raylet_socket_name\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._raylet_socket_name\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_2(self, VAR_4, *VAR_5, **VAR_6):...\n",
"return self.to_python(VAR_4)\n"
] | [
"def from_db_value(self, value, *args, **kwargs):...\n",
"return self.to_python(value)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_9(self, *VAR_15, **VAR_75):...\n",
""
] | [
"def newfn(self, *a, **env):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_9(self, VAR_8):...\n",
"return {key: value for key, value in VAR_8.items() if key in self.\n _backend_kwargs}\n"
] | [
"def filter_kwargs_for_backend(self, kwargs):...\n",
"return {key: value for key, value in kwargs.items() if key in self.\n _backend_kwargs}\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, *VAR_0, VAR_1=None, VAR_2=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if len(VAR_0) == 2:\n",
"VAR_10, VAR_41 = VAR_0\n",
"if len(VAR_0) == 1:\n",
"self.name = VAR_10\n",
"VAR_17 = VAR_0[0]\n",
"self.workflow = VAR_41\n",
"self.name = VAR_17.name\n",
"self.docstring = None\n",
... | [
"def __init__(self, *args, lineno=None, snakefile=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if len(args) == 2:\n",
"name, workflow = args\n",
"if len(args) == 1:\n",
"self.name = name\n",
"other = args[0]\n",
"self.workflow = workflow\n",
"self.name = other.name\n",
"self.docstring = None\n",
"s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Docstring",
"Assign'",
"Assign'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"A... |
[
"def FUNC_17(self):...\n",
"return self.get('__islocal')\n"
] | [
"def is_new(self):...\n",
"return self.get('__islocal')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_39(VAR_101):...\n",
"if VAR_101.input:\n",
"VAR_13.set_input(*VAR_101.input[0], **ruleinfo.input[1])\n",
"if VAR_101.output:\n",
"VAR_13.set_output(*VAR_101.output[0], **ruleinfo.output[1])\n",
"if VAR_101.params:\n",
"VAR_13.set_params(*VAR_101.params[0], **ruleinfo.params[1])\n",
"if VAR_1... | [
"def decorate(ruleinfo):...\n",
"if ruleinfo.input:\n",
"rule.set_input(*ruleinfo.input[0], **ruleinfo.input[1])\n",
"if ruleinfo.output:\n",
"rule.set_output(*ruleinfo.output[0], **ruleinfo.output[1])\n",
"if ruleinfo.params:\n",
"rule.set_params(*ruleinfo.params[0], **ruleinfo.params[1])\n",
"if rul... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Condition"... |
[
"@integration_synonym_api...\n",
"FUNC_2(VAR_2)\n",
"FUNC_3(VAR_2, 'CRAZY', VAR_7='1')\n",
"FUNC_3(VAR_2, 'KAIZEN', VAR_7='2')\n",
"FUNC_5(VAR_4, VAR_5, VAR_11='CAYZEN', VAR_10=[{'name': '----CAYZEN'}, {\n 'name': 'KAIZEN'}])\n"
] | [
"@integration_synonym_api...\n",
"clean_database(solr)\n",
"seed_database_with(solr, 'CRAZY', id='1')\n",
"seed_database_with(solr, 'KAIZEN', id='2')\n",
"verify_results(client, jwt, query='CAYZEN', expected=[{'name': '----CAYZEN'\n }, {'name': 'KAIZEN'}])\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'",
"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'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.delete_volume(VAR_6)\n",
"self.common.client_logout()\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.delete_volume(volume)\n",
"self.common.client_logout()\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self, VAR_21, VAR_23=True):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = self.fs\n",
"for part in VAR_21.split('/'):\n",
"if not len(part):\n",
"return VAR_22[VAR_8]\n",
"VAR_67 = False\n",
"for c in VAR_22[VAR_8]:\n",
"if c[VAR_1] == part:\n",
"if not VAR_67:\n",
"if c[VAR_2] == VAR_... | [
"def get_path(self, path, follow_symlinks=True):...\n",
"\"\"\"docstring\"\"\"\n",
"cwd = self.fs\n",
"for part in path.split('/'):\n",
"if not len(part):\n",
"return cwd[A_CONTENTS]\n",
"ok = False\n",
"for c in cwd[A_CONTENTS]:\n",
"if c[A_NAME] == part:\n",
"if not ok:\n",
"if c[A_TYPE] == T_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'",
"For",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"from osv import osv\n",
"from tools.translate import _\n",
"import time\n",
"VAR_0 = 'pos.open.statement'\n",
"VAR_1 = 'Open Statements'\n",
"def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = []\n",
"VAR_7 = self.pool.get('ir.model.data')\n",
"VAR_8 = self.p... | [
"from osv import osv\n",
"from tools.translate import _\n",
"import time\n",
"_name = 'pos.open.statement'\n",
"_description = 'Open Statements'\n",
"def open_statement(self, cr, uid, ids, context):...\n",
"\"\"\"docstring\"\"\"\n",
"list_statement = []\n",
"mod_obj = self.pool.get('ir.model.data')\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'... |
[
"def FUNC_6(VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"return '/' + VAR_10[0][1:-1]\n"
] | [
"def _constructRequestURL(django_url_pattern):...\n",
"\"\"\"docstring\"\"\"\n",
"return '/' + django_url_pattern[0][1:-1]\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_11(self, VAR_3):...\n",
""
] | [
"def doneWithConnection(self, conn):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_11(self, VAR_10):...\n",
"if self.version == 'custom':\n",
"return\n",
"VAR_13 = [('scalac', self._create_compiler_jardep), ('scala-library', self.\n _create_runtime_jardep)]\n",
"for spec_key, create_jardep_func in VAR_13:\n",
"VAR_18 = self.injectables_spec_for_key(spec_key)\n",
"VAR_19 =... | [
"def injectables(self, build_graph):...\n",
"if self.version == 'custom':\n",
"return\n",
"specs_to_create = [('scalac', self._create_compiler_jardep), (\n 'scala-library', self._create_runtime_jardep)]\n",
"for spec_key, create_jardep_func in specs_to_create:\n",
"spec = self.injectables_spec_for_key(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_2(self, VAR_4):...\n",
"if self.content_length is not None:\n",
"VAR_4, VAR_31 = VAR_4[:self.content_length], VAR_4[self.content_length:]\n",
"VAR_31 = ''\n",
"self.content_length -= len(VAR_4)\n",
"self._contentbuffer.write(VAR_4)\n",
"if self.content_length == 0 and self._contentbuffer is no... | [
"def rawDataReceived(self, data):...\n",
"if self.content_length is not None:\n",
"data, rest = data[:self.content_length], data[self.content_length:]\n",
"rest = ''\n",
"self.content_length -= len(data)\n",
"self._contentbuffer.write(data)\n",
"if self.content_length == 0 and self._contentbuffer is not... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"AugAssign'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Assign'"
] |
[
"def FUNC_16(self, VAR_0, VAR_1, VAR_10, VAR_3=None):...\n",
"if not VAR_3:\n",
"VAR_3 = self.make_reqid()\n",
"VAR_8 = [VAR_0, VAR_1, make_auth_hash(VAR_0, VAR_1, VAR_3, VAR_10)]\n",
"return b'Router', b'auth-bind-route', VAR_8, VAR_3\n"
] | [
"def make_auth_bind_route_data(self, interface, method, key, reqid=None):...\n",
"if not reqid:\n",
"reqid = self.make_reqid()\n",
"args = [interface, method, make_auth_hash(interface, method, reqid, key)]\n",
"return b'Router', b'auth-bind-route', args, reqid\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_9(self, VAR_6, VAR_10, VAR_11):...\n",
"if VAR_6 in self.clients:\n",
"VAR_14 = self.clients[VAR_6]\n",
"if VAR_14['status'] == self.RUNNING:\n",
"VAR_23 = self.clients[VAR_6]['instance']\n",
"VAR_23.perform_request(VAR_10, VAR_11)\n"
] | [
"def send_request(self, language, request, params):...\n",
"if language in self.clients:\n",
"language_client = self.clients[language]\n",
"if language_client['status'] == self.RUNNING:\n",
"client = self.clients[language]['instance']\n",
"client.perform_request(request, params)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Expr'"
] |
[
"@VAR_0.route('/<page_name>/history')...\n",
"VAR_3 = VAR_1.query('string' % VAR_2)\n",
"VAR_11 = VAR_3.namedresult()\n",
"return render_template('page_history.html', VAR_2=page_name, VAR_11=\n page_histories)\n"
] | [
"@app.route('/<page_name>/history')...\n",
"query = db.query(\n \"select page_content.timestamp, page_content.id from page, page_content where page.id = page_content.page_id and page.page_name = '%s'\"\n % page_name)\n",
"page_histories = query.namedresult()\n",
"return render_template('page_history.ht... | [
0,
4,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def execute(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_7():...\n",
"VAR_14 = []\n",
"VAR_15 = User.query.all()\n",
"for VAR_8 in VAR_15:\n",
"VAR_5 = ''\n",
"return VAR_14\n",
"VAR_4 = VAR_8.name\n",
"if VAR_8.username:\n",
"VAR_5 = VAR_8.username\n",
"VAR_7 = Name.query.filter_by(VAR_0=person.id)\n",
"VAR_14.append({'id': VAR_8.id, 'usern... | [
"def get_people():...\n",
"people = []\n",
"ppl = User.query.all()\n",
"for person in ppl:\n",
"username = ''\n",
"return people\n",
"name = person.name\n",
"if person.username:\n",
"username = person.username\n",
"names = Name.query.filter_by(user_id=person.id)\n",
"people.append({'id': person.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def __init__(self, VAR_2, VAR_3):...\n",
"Frame.__init__(self, VAR_2, bg='#f8f8f8')\n",
"VAR_4 = Frame(self, bg='#e7e7e7')\n",
"VAR_4.pack(fill='both')\n",
"VAR_5 = Image.open('home.jpg')\n",
"VAR_6 = ImageTk.PhotoImage(VAR_5)\n",
"from landingpage import LandingPage\n",
"VAR_7 = Button(VAR_4, image=... | [
"def __init__(self, parent, controller):...\n",
"Frame.__init__(self, parent, bg='#f8f8f8')\n",
"menuFrame = Frame(self, bg='#e7e7e7')\n",
"menuFrame.pack(fill='both')\n",
"load = Image.open('home.jpg')\n",
"render = ImageTk.PhotoImage(load)\n",
"from landingpage import LandingPage\n",
"img = Button(m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"ImportFrom'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"A... |
[
"def FUNC_11(self):...\n",
"self.clear_input_fields()\n",
"keepassgtk.config_manager.create_config_entry_string('history',\n 'last-opened-db', str(self.database_filepath))\n",
"keepassgtk.config_manager.save_config()\n",
"self.unlock_database_stack_box.destroy()\n",
"UnlockedDatabase(self.window, self.... | [
"def open_database_page(self):...\n",
"self.clear_input_fields()\n",
"keepassgtk.config_manager.create_config_entry_string('history',\n 'last-opened-db', str(self.database_filepath))\n",
"keepassgtk.config_manager.save_config()\n",
"self.unlock_database_stack_box.destroy()\n",
"UnlockedDatabase(self.wi... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"VAR_1 = bot.Bot(None, {}, 'https://localhost:1/',\n '1234-1a2b3c4-tainted-joe', 'base_dir', None)\n",
"VAR_2 = threading.Event()\n",
"VAR_1.call_later(0.1, VAR_2.set)\n",
"VAR_1.cancel_all_timers()\n",
"self.assertFalse(VAR_2.wait(0.3))\n"
] | [
"def test_bot_call_later_cancel(self):...\n",
"obj = bot.Bot(None, {}, 'https://localhost:1/', '1234-1a2b3c4-tainted-joe',\n 'base_dir', None)\n",
"ev = threading.Event()\n",
"obj.call_later(0.1, ev.set)\n",
"obj.cancel_all_timers()\n",
"self.assertFalse(ev.wait(0.3))\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"VAR_8 = []\n",
"for VAR_5 in self.groups:\n",
"VAR_8.append(VAR_5.serialize())\n",
"return dict(VAR_2=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, VAR_8=groups, implicit=self.implicit)\n"
] | [
"def serialize(self):...\n",
"groups = []\n",
"for group in self.groups:\n",
"groups.append(group.serialize())\n",
"return dict(name=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, groups=groups, implicit=self.implicit)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Expr'",
"Return'"
] |
[
"def FUNC_6(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_20 = kijiji_api.KijijiApi()\n",
"VAR_20.login(VAR_0.username, VAR_0.password)\n",
"VAR_20.delete_ad(VAR_0.id)\n"
] | [
"def delete_ad(args):...\n",
"\"\"\"docstring\"\"\"\n",
"api = kijiji_api.KijijiApi()\n",
"api.login(args.username, args.password)\n",
"api.delete_ad(args.id)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_11):...\n",
"if VAR_11 and is_banned_domain(VAR_11):\n",
"VAR_101.errors.add(errors.BANNED_DOMAIN)\n"
] | [
"def run(self, url):...\n",
"if url and is_banned_domain(url):\n",
"c.errors.add(errors.BANNED_DOMAIN)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'"
] |
[
"def __init__(self, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=None, VAR_5=...\n",
"\"\"\"docstring\"\"\"\n",
"self._rules = OrderedDict()\n",
"self.first_rule = None\n",
"self._workdir = None\n",
"self.overwrite_workdir = VAR_6\n",
"self.workdir_init = os.path.abspath(os.curdir)\n",
"self._ruleorder =... | [
"def __init__(self, snakefile=None, snakemakepath=None, jobscript=None,...\n",
"\"\"\"docstring\"\"\"\n",
"self._rules = OrderedDict()\n",
"self.first_rule = None\n",
"self._workdir = None\n",
"self.overwrite_workdir = overwrite_workdir\n",
"self.workdir_init = os.path.abspath(os.curdir)\n",
"self._ru... | [
0,
0,
0,
0,
0,
0,
0,
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",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
... |
[
"\"\"\"string\"\"\"\n",
"import copy\n",
"from flask import current_app, session\n",
"from flask.ext.login import current_user\n",
"from invenio.ext.sqlalchemy.utils import session_manager\n",
"VAR_0 = dict(title='ORCID', description=\n 'Connecting Research and Researchers.', icon='', authorized_handle... | [
"\"\"\"Pre-configured remote application for enabling sign in/up with ORCID.\n\n**Usage:**\n\n1. Edit your configuration and add:\n\n .. code-block:: python\n\n from invenio.modules.oauthclient.contrib import orcid\n OAUTHCLIENT_REMOTE_APPS = dict(\n orcid=orcid.REMOTE_APP,\n )\n\n ... | [
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_10(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_21 = self.agent.type_to_payload(\n 'deregisterInstancesFromGoogleLoadBalancerDescription', {\n 'loadBalancerNames': [self.__use_lb_name], 'instanceIds': self.\n use_instance_names[:2], 'region': self.bindings['TEST_GCE_REGION'],\n 'credentia... | [
"def deregister_load_balancer_instances(self):...\n",
"\"\"\"docstring\"\"\"\n",
"payload = self.agent.type_to_payload(\n 'deregisterInstancesFromGoogleLoadBalancerDescription', {\n 'loadBalancerNames': [self.__use_lb_name], 'instanceIds': self.\n use_instance_names[:2], 'region': self.bindings['TEST_G... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"super(CLASS_0, self).setUp()\n",
"self.mock(net, 'url_open', self._url_open)\n",
"self.mock(net, 'url_read_json', self._url_read_json)\n",
"self.mock(net, 'sleep_before_retry', lambda *VAR_10: None)\n",
"self._lock = threading.Lock()\n",
"self._requests = []\n"
] | [
"def setUp(self):...\n",
"super(TestCase, self).setUp()\n",
"self.mock(net, 'url_open', self._url_open)\n",
"self.mock(net, 'url_read_json', self._url_read_json)\n",
"self.mock(net, 'sleep_before_retry', lambda *_: None)\n",
"self._lock = threading.Lock()\n",
"self._requests = []\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'"
] |
[
"import io\n",
"import os\n",
"import sys\n",
"import webbrowser\n",
"from pathlib import Path\n",
"import ipfsapi\n",
"from ipvc.common import CommonAPI, expand_ref, refpath_to_mfs, make_len, atomic\n",
"def __init__(self, *VAR_0, **VAR_1):...\n",
"super().__init__(*VAR_0, **kwargs)\n",
"@atomic.... | [
"import io\n",
"import os\n",
"import sys\n",
"import webbrowser\n",
"from pathlib import Path\n",
"import ipfsapi\n",
"from ipvc.common import CommonAPI, expand_ref, refpath_to_mfs, make_len, atomic\n",
"def __init__(self, *args, **kwargs):...\n",
"super().__init__(*args, **kwargs)\n",
"@atomic..... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"FunctionDef'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"if self.pid:\n",
"os.waitpid(self.pid, 0)\n"
] | [
"def wait(self):...\n",
"if self.pid:\n",
"os.waitpid(self.pid, 0)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'"
] |
[
"def FUNC_4(VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"for directory in os.getenv('PATH').split(':'):\n",
"if os.path.exists(os.path.join(directory, VAR_7)):\n",
"return False\n",
"return True\n"
] | [
"def executable_exists(executable):...\n",
"\"\"\"docstring\"\"\"\n",
"for directory in os.getenv('PATH').split(':'):\n",
"if os.path.exists(os.path.join(directory, executable)):\n",
"return False\n",
"return True\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Condition",
"Return'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'default_language')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'default_language')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_9(self, VAR_15, VAR_16):...\n",
"VAR_28 = Gtk.Builder()\n",
"VAR_28.add_from_resource('/run/terminal/KeepassGtk/create_database.ui')\n",
"VAR_6 = VAR_28.get_object('headerbar')\n",
"UnlockDatabase(self, self.create_tab(VAR_15, VAR_6), VAR_16)\n"
] | [
"def start_database_opening_routine(self, tab_title, filepath):...\n",
"builder = Gtk.Builder()\n",
"builder.add_from_resource('/run/terminal/KeepassGtk/create_database.ui')\n",
"headerbar = builder.get_object('headerbar')\n",
"UnlockDatabase(self, self.create_tab(tab_title, headerbar), filepath)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_13(VAR_6):...\n",
"VAR_4.register_jvm_tool(VAR_8, VAR_4._key_for_tool_version('scalac', VAR_6),\n VAR_15=[cls._create_compiler_jardep(version)])\n"
] | [
"def register_scala_compiler_tool(version):...\n",
"cls.register_jvm_tool(register, cls._key_for_tool_version('scalac', version\n ), classpath=[cls._create_compiler_jardep(version)])\n"
] | [
0,
7
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_7(self):...\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}/scale'.format(**locals())\n",
"VAR_8 = {'web': 'not_an_int'}\n",
"VAR_5 = self.client.post(VAR_4, json.dumps(... | [
"def test_container_errors(self):...\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}/scale'.format(**locals())\n",
"body = {'web': 'not_an_int'}\n",
"response = self.client.po... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_14(self, VAR_1=0, VAR_2=0, VAR_3='https://localhost:1'):...\n",
"VAR_22 = {'exit_code': VAR_2, 'must_signal_internal_failure': None,\n 'version': 3}\n",
"def __init__(VAR_39, VAR_40, VAR_41, VAR_42, VAR_48, VAR_43, VAR_44, VAR_45,...\n",
"VAR_39.returncode = None\n",
"VAR_39._out_file = VAR_7.p... | [
"def _mock_popen(self, returncode=0, exit_code=0, url='https://localhost:1'):...\n",
"result = {'exit_code': exit_code, 'must_signal_internal_failure': None,\n 'version': 3}\n",
"def __init__(self2, cmd, detached, cwd, env, stdout, stderr, stdin, close_fds):...\n",
"self2.returncode = None\n",
"self2._ou... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_3(VAR_3):...\n",
""
] | [
"def chkuser(x):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_3(self, VAR_5):...\n",
"VAR_13 = '%s_%s_seq' % (VAR_5.name(), VAR_5.sqlSerialColumnName())\n",
"VAR_3, VAR_14 = self.executeSQL(\"select nextval('%s')\" % VAR_13)\n",
"VAR_10 = VAR_14.fetchone()[0]\n",
"assert VAR_10, \"Didn't get next id value from sequence\"\n",
"return VAR_10\n"
] | [
"def retrieveNextInsertId(self, klass):...\n",
"seqname = '%s_%s_seq' % (klass.name(), klass.sqlSerialColumnName())\n",
"conn, curs = self.executeSQL(\"select nextval('%s')\" % seqname)\n",
"value = curs.fetchone()[0]\n",
"assert value, \"Didn't get next id value from sequence\"\n",
"return value\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assert'",
"Return'"
] |
[
"def FUNC_22(self):...\n",
"return bool(self._latest_file_parse_request and self.\n _latest_file_parse_request.Done())\n"
] | [
"def DiagnosticsForCurrentFileReady(self):...\n",
"return bool(self._latest_file_parse_request and self.\n _latest_file_parse_request.Done())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_0(self, **VAR_4):...\n",
"VAR_16 = self.kwargs['pk']\n",
"VAR_17 = Event.objects.get(VAR_16=pk)\n",
"VAR_18 = Object.objects.filter(event=pk)\n",
"VAR_5 = super().get_context_data(**kwargs)\n",
"VAR_5['event'] = VAR_17\n",
"VAR_5['objects'] = VAR_18\n",
"VAR_5['categories'] = VAR_17.getUniqC... | [
"def get_context_data(self, **kwargs):...\n",
"pk = self.kwargs['pk']\n",
"event_obj = Event.objects.get(pk=pk)\n",
"objects_obj = Object.objects.filter(event=pk)\n",
"context = super().get_context_data(**kwargs)\n",
"context['event'] = event_obj\n",
"context['objects'] = objects_obj\n",
"context['cat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(self, VAR_4):...\n",
"VAR_5 = VAR_4.credentials.username\n",
"VAR_6 = VAR_4.credentials.password\n",
"VAR_7 = VAR_4.credentials.domain\n",
"if VAR_7 is None:\n",
"VAR_8 = \"--ignore-certificate --authonly -u '{}' -p '{}' {}:{}\"\n",
"VAR_8 = \"--ignore-certificate --authonly -d {} -u '{}' -p... | [
"def poll(self, poll_input):...\n",
"username = poll_input.credentials.username\n",
"password = poll_input.credentials.password\n",
"domain = poll_input.credentials.domain\n",
"if domain is None:\n",
"opt_str = \"--ignore-certificate --authonly -u '{}' -p '{}' {}:{}\"\n",
"opt_str = \"--ignore-certifica... | [
0,
0,
0,
0,
2,
0,
2,
2,
2,
2,
2,
2,
0,
2,
2,
0,
2,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'",
"Assign'",
"Return'"
] |
[
"def FUNC_45(self):...\n",
"return self.__class__.__call__(VAR_37=self, VAR_39=True)\n"
] | [
"def plainstrings(self):...\n",
"return self.__class__.__call__(toclone=self, plainstr=True)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_7(self, VAR_8):...\n",
"VAR_14 = 'SELECT * FROM report WHERE Report_ID = ' + VAR_8\n",
"self.cursor.execute(VAR_14)\n",
"self.connection.commit()\n",
"VAR_15 = self.cursor.fetchone()\n",
"VAR_20 = ' '.join(map(str, VAR_15))\n",
"return VAR_20\n"
] | [
"def get_report(self, reportID):...\n",
"query = 'SELECT * FROM report WHERE Report_ID = ' + reportID\n",
"self.cursor.execute(query)\n",
"self.connection.commit()\n",
"fetch = self.cursor.fetchone()\n",
"report = ' '.join(map(str, fetch))\n",
"return report\n"
] | [
0,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_16, VAR_17):...\n",
"\"\"\"docstring\"\"\"\n",
"return keyworder.get_single_keywords(VAR_16, VAR_17) or {}\n"
] | [
"def extract_single_keywords(skw_db, fulltext):...\n",
"\"\"\"docstring\"\"\"\n",
"return keyworder.get_single_keywords(skw_db, fulltext) or {}\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_0(VAR_0, VAR_1):...\n",
"return chain(*map(attrgetter(VAR_1), VAR_0))\n"
] | [
"def jobfiles(jobs, type):...\n",
"return chain(*map(attrgetter(type), jobs))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_14(self, VAR_4, VAR_33, VAR_18=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_18 is not None:\n",
"self.flags.ignore_permissions = VAR_18\n",
"if isinstance(VAR_4, dict):\n",
"VAR_4 = [VAR_4]\n",
"for VAR_34 in VAR_4:\n",
"if isinstance(VAR_34, string_types):\n",
"VAR_33.append(VAR_34)\n... | [
"def build_filter_conditions(self, filters, conditions, ignore_permissions=None...\n",
"\"\"\"docstring\"\"\"\n",
"if ignore_permissions is not None:\n",
"self.flags.ignore_permissions = ignore_permissions\n",
"if isinstance(filters, dict):\n",
"filters = [filters]\n",
"for f in filters:\n",
"if isins... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Condition",
"Assign'",
"For",
"Condition",
"Expr'",
"Expr'"
] |
[
"def __new__(VAR_10, VAR_11, VAR_12, VAR_13):...\n",
"for VAR_47 in webapp2.WSGIApplication.allowed_methods:\n",
"VAR_48 = VAR_13.get(VAR_47.lower())\n",
"return type.__new__(VAR_10, VAR_11, VAR_12, VAR_13)\n",
"if VAR_48 and not api.is_decorated(VAR_48):\n"
] | [
"def __new__(mcs, name, bases, attributes):...\n",
"for method in webapp2.WSGIApplication.allowed_methods:\n",
"func = attributes.get(method.lower())\n",
"return type.__new__(mcs, name, bases, attributes)\n",
"if func and not api.is_decorated(func):\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Assign'",
"Return'",
"Condition"
] |
[
"def FUNC_5(self):...\n",
"VAR_8 = 'test_foo.py:FooTest.test_bar'\n",
"VAR_7 = BokChoyTestSuite('', test_spec=spec)\n",
"VAR_1 = 'tests/{}'.format(VAR_8)\n",
"self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n"
] | [
"def test_testcase_spec(self):...\n",
"spec = 'test_foo.py:FooTest.test_bar'\n",
"suite = BokChoyTestSuite('', test_spec=spec)\n",
"name = 'tests/{}'.format(spec)\n",
"self.assertEqual(suite.cmd, self._expected_command(name=name))\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_18(self):...\n",
"return FUNC_18.dumps(self.properties())\n"
] | [
"def json(self):...\n",
"return json.dumps(self.properties())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_4(self, VAR_9):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {}\n",
"VAR_5['volumeName'] = VAR_9\n",
"VAR_18 = self._cliq_run_xml('getVolumeInfo', VAR_5)\n",
"VAR_23 = {}\n",
"VAR_24 = VAR_18.find('response/volume')\n",
"for VAR_43, v in VAR_24.attrib.items():\n",
"VAR_23['volume.' + VAR_43]... | [
"def _cliq_get_volume_info(self, volume_name):...\n",
"\"\"\"docstring\"\"\"\n",
"cliq_args = {}\n",
"cliq_args['volumeName'] = volume_name\n",
"result_xml = self._cliq_run_xml('getVolumeInfo', cliq_args)\n",
"volume_attributes = {}\n",
"volume_node = result_xml.find('response/volume')\n",
"for k, v i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"For",
"Assign'",
"Assign'",
"Condition",
"For",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"super(CLASS_0, self).validate()\n",
"if not self.blog_intro:\n",
"self.blog_intro = self.content[:140]\n",
"if self.blog_intro:\n",
"self.blog_intro = strip_html_tags(self.blog_intro)\n",
"self.blog_intro = self.blog_intro[:140]\n",
"if self.published and not self.published_... | [
"def validate(self):...\n",
"super(BlogPost, self).validate()\n",
"if not self.blog_intro:\n",
"self.blog_intro = self.content[:140]\n",
"if self.blog_intro:\n",
"self.blog_intro = strip_html_tags(self.blog_intro)\n",
"self.blog_intro = self.blog_intro[:140]\n",
"if self.published and not self.publish... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_39(self, VAR_16, VAR_25=None, VAR_26=True):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_47 = self.meta.get_field(VAR_16)\n",
"if VAR_47 and VAR_47.get('__print_hide'):\n",
"return True\n",
"VAR_48 = 0\n",
"if self.get(VAR_16) == 0 and not self.meta.istable:\n",
"VAR_48 = (VAR_25 and VAR_25.print_... | [
"def is_print_hide(self, fieldname, df=None, for_print=True):...\n",
"\"\"\"docstring\"\"\"\n",
"meta_df = self.meta.get_field(fieldname)\n",
"if meta_df and meta_df.get('__print_hide'):\n",
"return True\n",
"print_hide = 0\n",
"if self.get(fieldname) == 0 and not self.meta.istable:\n",
"print_hide = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Return'",
"Assign'",
"Condition",
"Assign'"
] |
[
"def __init__(self):...\n",
""
] | [
"def __init__(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_3(self, VAR_5):...\n",
"VAR_13 = self.connection.cursor()\n",
"VAR_13.execute(\n 'SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = %s)'\n , VAR_5)\n",
"return False\n",
"return True\n"
] | [
"def tableExists(self, tableName):...\n",
"cursor = self.connection.cursor()\n",
"cursor.execute(\n 'SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = %s)'\n , tableName)\n",
"return False\n",
"return True\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"return hpcommon.HP3PARCommon(self.configuration)\n"
] | [
"def _init_common(self):...\n",
"return hpcommon.HP3PARCommon(self.configuration)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_10(self, VAR_2, *VAR_3, **VAR_4):...\n",
"self._dispatch_processing()\n",
"return super().dispatch(VAR_2, *VAR_3, **kwargs)\n"
] | [
"def dispatch(self, request, *args, **kwargs):...\n",
"self._dispatch_processing()\n",
"return super().dispatch(request, *args, **kwargs)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"def FUNC_13(self, VAR_51):...\n",
"\"\"\"docstring\"\"\"\n",
"if not isinstance(VAR_51, dict):\n",
"VAR_73, VAR_54, VAR_52, VAR_74 = self._get_validated_data(VAR_51)\n",
"VAR_75 = self.field_mapping[VAR_52][self.FIELD_NAME]\n",
"VAR_76 = getattr(self.VALUE_OPERATORS, VAR_73)\n",
"VAR_39 = self._get_dat... | [
"def _generate_where_phrase(self, where):...\n",
"\"\"\"docstring\"\"\"\n",
"if not isinstance(where, dict):\n",
"operator, value, field, secondary_value = self._get_validated_data(where)\n",
"field_name = self.field_mapping[field][self.FIELD_NAME]\n",
"sql_operator = getattr(self.VALUE_OPERATORS, operato... | [
0,
0,
0,
0,
0,
0,
0,
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",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assert'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
... |
[
"def FUNC_5(VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_10[VAR_11]\n",
"return\n",
"VAR_20 = c_onboarding_settings(use_secondary=True).find_one({'name': VAR_11})\n",
"if not VAR_20:\n",
"c_onboarding_settings().insert({'name': VAR_11, 'data': VAR_10[VAR_11]})\n",
"return VAR_20['data']\n",
"retu... | [
"def get_onboarding_setting(setting_name):...\n",
"\"\"\"docstring\"\"\"\n",
"ONBOARDING_SETTINGS_DEFAULT[setting_name]\n",
"return\n",
"onboarding_setting = c_onboarding_settings(use_secondary=True).find_one({\n 'name': setting_name})\n",
"if not onboarding_setting:\n",
"c_onboarding_settings().inse... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Return'",
"Assign'",
"Condition",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_21(VAR_16):...\n",
"return (VAR_16.input, VAR_16.dynamic_input) if VAR_4 else (VAR_16.output,\n VAR_16.dynamic_output)\n"
] | [
"def get_io(rule):...\n",
"return (rule.input, rule.dynamic_input) if input else (rule.output, rule.\n dynamic_output)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.