lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"@VAR_1.route('/demo4', methods=['GET', 'POST'])...\n",
"print('in demo4')\n",
"if request.method == 'GET':\n",
"return render_template('demo4.html', ipedssectornames=ipedssectornames)\n",
"print(request.form)\n",
"VAR_14 = request.form.getlist('year')\n",
"VAR_15 = request.form.getlist('ipedssectorname... | [
"@app.route('/demo4', methods=['GET', 'POST'])...\n",
"print('in demo4')\n",
"if request.method == 'GET':\n",
"return render_template('demo4.html', ipedssectornames=ipedssectornames)\n",
"print(request.form)\n",
"year = request.form.getlist('year')\n",
"ipeds = request.form.getlist('ipedssectornames')\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"AugAssign'",
"AugAssign'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"For",
"AugAssign'",
"Expr'",
"Expr'",
"Exp... |
[
"@property...\n",
"if os.path.exists(self._osx_java_home_exe):\n",
"VAR_51 = subprocess.check_output([self._osx_java_home_exe, '--failfast',\n '--xml'])\n",
"VAR_52 = plistlib.loads(VAR_51) if PY3 else plistlib.readPlistFromString(VAR_51\n )\n",
"for distribution in VAR_52:\n",
"VAR_24 = distributio... | [
"@property...\n",
"if os.path.exists(self._osx_java_home_exe):\n",
"plist = subprocess.check_output([self._osx_java_home_exe, '--failfast',\n '--xml'])\n",
"plist_results = plistlib.loads(plist) if PY3 else plistlib.readPlistFromString(\n plist)\n",
"for distribution in plist_results:\n",
"home = di... | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Assign'",
"Assign'",
"For",
"Assign'",
"Expr'"
] |
[
"def FUNC_10(self):...\n",
""
] | [
"def get(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_14(self, VAR_32, VAR_33, VAR_30):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_33 & os.O_WRONLY == os.O_WRONLY or VAR_33 & os.O_RDWR == os.O_RDWR:\n",
"VAR_68 = VAR_30 & ~111\n",
"if VAR_33 & os.O_RDONLY == os.O_RDONLY:\n",
"VAR_69 = '%s/%s_sftp_%s' % (self.cfg.get('honeypot', 'download_path'), tim... | [
"def open(self, filename, openFlags, mode):...\n",
"\"\"\"docstring\"\"\"\n",
"if openFlags & os.O_WRONLY == os.O_WRONLY or openFlags & os.O_RDWR == os.O_RDWR:\n",
"hostmode = mode & ~111\n",
"if openFlags & os.O_RDONLY == os.O_RDONLY:\n",
"hostfile = '%s/%s_sftp_%s' % (self.cfg.get('honeypot', 'download_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Return'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"return self._get_net_info()[:2]\n"
] | [
"def get_first_if(self):...\n",
"return self._get_net_info()[:2]\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"return self.content\n"
] | [
"def read(self):...\n",
"return self.content\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"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_4(VAR_2: HttpRequest):...\n",
"\"\"\"docstring\"\"\"\n",
"u: Profile = get_current_user(VAR_2)\n",
"if 'rid' in VAR_2.GET:\n",
"if 'srid' in VAR_2.GET:\n",
"return HttpResponseRedirect(\n '/admin?error=Missing%20reservation%20id%20in%20request')\n",
"VAR_7 = HttpResponseRedirect('/admin/res... | [
"def action_delete_article(request: HttpRequest):...\n",
"\"\"\"docstring\"\"\"\n",
"u: Profile = get_current_user(request)\n",
"if 'rid' in request.GET:\n",
"if 'srid' in request.GET:\n",
"return HttpResponseRedirect(\n '/admin?error=Missing%20reservation%20id%20in%20request')\n",
"response = HttpRe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"AnnAssign'",
"Condition",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"AnnAssign'",
"Return'",
"AnnAssign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_29(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.stat(VAR_21, VAR_23=False)\n"
] | [
"def lstat(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.stat(path, follow_symlinks=False)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('cipher-modes.py', VAR_2)\n"
] | [
"def test_cipher_modes(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('cipher-modes.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_38):...\n",
"VAR_38 = CLASS_17.run(self, VAR_38)\n",
"if VAR_38 and self.only_whitespace.match(VAR_38):\n",
"VAR_101.errors.add(errors.NO_TITLE)\n",
"return VAR_38\n"
] | [
"def run(self, title):...\n",
"title = VLength.run(self, title)\n",
"if title and self.only_whitespace.match(title):\n",
"c.errors.add(errors.NO_TITLE)\n",
"return title\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def __repr__(self):...\n",
"return '<MISSING>'\n"
] | [
"def __repr__(self):...\n",
"return '<MISSING>'\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@defer.inlineCallbacks...\n",
"VAR_70 = yield self.mail_store.get_mailbox_mail_ids(VAR_42)\n",
"VAR_58 = yield self.mail_store.get_mails(VAR_70)\n",
"defer.returnValue(VAR_58)\n"
] | [
"@defer.inlineCallbacks...\n",
"mail_ids = yield self.mail_store.get_mailbox_mail_ids(mbox_name)\n",
"mails = yield self.mail_store.get_mails(mail_ids)\n",
"defer.returnValue(mails)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1(VAR_1, VAR_6):...\n",
""
] | [
"def directory_index(path, fullpath):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_23(self):...\n",
"self.compilation_ok(\n \"\"\"\nrequire \"reject\";\n\nif header :contains \"subject\" \"viagra\" {\n reject;\n}\n\"\"\"\n )\n"
] | [
"def test_reject_extension(self):...\n",
"self.compilation_ok(\n \"\"\"\nrequire \"reject\";\n\nif header :contains \"subject\" \"viagra\" {\n reject;\n}\n\"\"\"\n )\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_7(self, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self._rules:\n",
"if not VAR_10 in self._rules:\n",
"return self._rules[VAR_10]\n"
] | [
"def get_rule(self, name):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self._rules:\n",
"if not name in self._rules:\n",
"return self._rules[name]\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Return'"
] |
[
"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_13(self, VAR_9, VAR_10=None, VAR_11=None, VAR_20=''):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_28 = self.get_and_check_task(VAR_9, VAR_10, VAR_11)\n",
"VAR_31 = {'all': 'all.zip', 'geotiff': os.path.join('odm_orthophoto',\n 'odm_orthophoto.tif'), 'las': os.path.join('odm_georeferencing',\n 'odm_... | [
"def get(self, request, pk=None, project_pk=None, asset=''):...\n",
"\"\"\"docstring\"\"\"\n",
"task = self.get_and_check_task(request, pk, project_pk)\n",
"allowed_assets = {'all': 'all.zip', 'geotiff': os.path.join(\n 'odm_orthophoto', 'odm_orthophoto.tif'), 'las': os.path.join(\n 'odm_georeferencing'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"import sys\n",
"import os\n",
"import contextlib\n",
"def FUNC_0(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"if '<' in VAR_0:\n",
"FUNC_1(VAR_0)\n",
"if '>' in VAR_0:\n",
"FUNC_2(VAR_0)\n",
"if '>>' in VAR_0:\n",
"FUNC_3(VAR_0)\n",
"def FUNC_1(VAR_0):...\n",
"import pdb\n",
"pdb.set_trace(... | [
"import sys\n",
"import os\n",
"import contextlib\n",
"def IO_redirection(cmd):...\n",
"\"\"\"docstring\"\"\"\n",
"if '<' in cmd:\n",
"SetUpInputRedirect(cmd)\n",
"if '>' in cmd:\n",
"SetUpOutputRedirect(cmd)\n",
"if '>>' in cmd:\n",
"SetUpAppendRedirect(cmd)\n",
"def SetUpInputRedirect(cmd):.... | [
0,
0,
0,
0,
0,
0,
6,
0,
6,
0,
6,
0,
6,
6,
0,
6,
6,
6,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"FunctionDef'",
"Import'",
"Expr'",
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Import'",
"Expr'"
] |
[
"def __iter__(self):...\n",
"return self\n"
] | [
"def __iter__(self):...\n",
"return self\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_7(VAR_8, VAR_9):...\n",
"return getattr(VAR_8, VAR_9)()\n"
] | [
"def callMethod(o, name):...\n",
"return getattr(o, name)()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, VAR_7=''):...\n",
"self.serial = VAR_7\n",
"if VAR_7:\n",
"self.adb_str = 'adb -s %s' % VAR_7\n",
"self.adb_str = 'adb'\n"
] | [
"def __init__(self, serial=''):...\n",
"self.serial = serial\n",
"if serial:\n",
"self.adb_str = 'adb -s %s' % serial\n",
"self.adb_str = 'adb'\n"
] | [
0,
0,
2,
2,
2
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'"
] |
[
"@wraps(VAR_55)...\n",
"def FUNC_27(VAR_6):...\n",
"if callable(VAR_6):\n",
"return VAR_6()\n",
"if request.method == 'POST':\n",
"return VAR_55(*VAR_69, **kwargs)\n",
"VAR_10 = json.loads(request.data)\n",
"VAR_54 = {'error': {'type': 'schema', 'message': str(e)}, 'schema': VAR_24}\n",
"schemas.val... | [
"@wraps(func)...\n",
"def default_encode(value):...\n",
"if callable(value):\n",
"return value()\n",
"if request.method == 'POST':\n",
"return func(*args, **kwargs)\n",
"body = json.loads(request.data)\n",
"result = {'error': {'type': 'schema', 'message': str(e)}, 'schema': schema}\n",
"schemas.vali... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_16(self):...\n",
"self.run_test_case(self.scenario.create_http_load_balancer())\n"
] | [
"def test_d_create_http_load_balancer(self):...\n",
"self.run_test_case(self.scenario.create_http_load_balancer())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_6(VAR_11, VAR_12):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_29 = set()\n",
"VAR_10 = {'facet': 'true', 'facet.field': 'institution', 'facet.mincount': \n 3, 'q': '!source_id:error', 'rows': 0, 'wt': 'json'}\n",
"for VAR_9 in (VAR_11, VAR_12):\n",
"VAR_21 = FUNC_2(VAR_9, VAR_10)\n",
"return VA... | [
"def get_all_current_institutions(k10plus, ai):...\n",
"\"\"\"docstring\"\"\"\n",
"current_institutions = set()\n",
"params = {'facet': 'true', 'facet.field': 'institution', 'facet.mincount': \n 3, 'q': '!source_id:error', 'rows': 0, 'wt': 'json'}\n",
"for index in (k10plus, ai):\n",
"result = get_solr... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"For",
"Expr'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = CLASS_1.get_user_by_id(VAR_3)\n",
"return VAR_22.has_user_accepted_licence(VAR_21)\n"
] | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"user = UserService.get_user_by_id(user_id)\n",
"return user.has_user_accepted_licence(license_id)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_30(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--edit-player'])\n"
] | [
"def test_no_player_id(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--edit-player'])\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
""
] | [
"def tearDown(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_20(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_21 = VAR_21.rstrip('/')\n",
"VAR_60 = os.path.basename(VAR_21)\n",
"VAR_61 = os.path.dirname(VAR_21)\n",
"VAR_58 = self.getfile(VAR_21, VAR_23=False)\n",
"if VAR_58 == False:\n",
"if VAR_58[VAR_2] != VAR_12:\n",
"if len(self.get_path... | [
"def rmdir(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"path = path.rstrip('/')\n",
"name = os.path.basename(path)\n",
"parent = os.path.dirname(path)\n",
"dir = self.getfile(path, follow_symlinks=False)\n",
"if dir == False:\n",
"if dir[A_TYPE] != T_DIR:\n",
"if len(self.get_path(path)) > 0:\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"For",
"Condition",
"Return'",
"Expr'",
"Return'"
] |
[
"def FUNC_6(VAR_10, VAR_11, VAR_12):...\n",
"if VAR_10 == VAR_12:\n",
"VAR_64 = [0, 0]\n",
"VAR_64 = []\n",
"return dict(zip(['failRate', 'failRateWithRetries'], VAR_64))\n",
"VAR_65 = [VAR_12 - VAR_11, VAR_12]\n",
"for denominator in VAR_65:\n",
"VAR_26 = 100 - VAR_10 * 100 / float(denominator)\n",
... | [
"def calculate_fail_rate(passes, retries, totals):...\n",
"if passes == totals:\n",
"results = [0, 0]\n",
"results = []\n",
"return dict(zip(['failRate', 'failRateWithRetries'], results))\n",
"denominators = [totals - retries, totals]\n",
"for denominator in denominators:\n",
"result = 100 - passes * ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_9(self, VAR_14):...\n",
""
] | [
"def is_string(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@classmethod...\n",
"assert engine\n",
"VAR_9 = text('string')\n",
"VAR_7 = engine.connect()\n",
"VAR_10 = VAR_7.execute(VAR_9, VAR_1=username).fetchone()\n",
"if VAR_10 is not None:\n",
"VAR_10 = CLASS_0(VAR_10[0], VAR_10[1], VAR_10[2].decode('utf-8'), VAR_10[3])\n",
"VAR_7.close()\n",
"return VAR... | [
"@classmethod...\n",
"assert engine\n",
"s = text(\n 'SELECT user_id, username, hashed_password, roll_id FROM users WHERE username = :username AND expire_date is null'\n )\n",
"connection = engine.connect()\n",
"rc = connection.execute(s, username=username).fetchone()\n",
"if rc is not None:\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assert'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"@app.route('/achievements/<achievement_id>/unlock', methods=['POST'])...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = int(request.form.get('player_id'))\n",
"return flask.jsonify(FUNC_11(VAR_1, VAR_2))\n"
] | [
"@app.route('/achievements/<achievement_id>/unlock', methods=['POST'])...\n",
"\"\"\"docstring\"\"\"\n",
"player_id = int(request.form.get('player_id'))\n",
"return flask.jsonify(unlock_achievement(achievement_id, player_id))\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Return'"
] |
[
"@auth.route('/login', methods=['GET', 'POST'])...\n",
"VAR_1 = LoginForm()\n",
"if VAR_1.validate_on_submit():\n",
"VAR_2 = User.query.filter_by(email=form.email.data).first()\n",
"return render_template('auth/login.html', VAR_1=form)\n",
"if VAR_2 is not None and VAR_2.verify_password(VAR_1.password.dat... | [
"@auth.route('/login', methods=['GET', 'POST'])...\n",
"form = LoginForm()\n",
"if form.validate_on_submit():\n",
"user = User.query.filter_by(email=form.email.data).first()\n",
"return render_template('auth/login.html', form=form)\n",
"if user is not None and user.verify_password(form.password.data):\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
6
] | [
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(self, VAR_8):...\n",
"self.title = VAR_8\n"
] | [
"def set_title(self, new_title):...\n",
"self.title = new_title\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_2(self, VAR_1, VAR_7, VAR_8, VAR_9, VAR_4=None):...\n",
"if VAR_4 is None:\n",
"VAR_4 = {}\n",
"VAR_29 = super(CLASS_0, self).view_header_get(VAR_1, VAR_7, VAR_8, VAR_9, VAR_4\n )\n",
"if VAR_29:\n",
"return VAR_29\n",
"if VAR_4.get('active_id', False) and VAR_4.get('active_model'\n",
"re... | [
"def view_header_get(self, cr, user, view_id, view_type, context=None):...\n",
"if context is None:\n",
"context = {}\n",
"res = super(product_product, self).view_header_get(cr, user, view_id,\n view_type, context)\n",
"if res:\n",
"return res\n",
"if context.get('active_id', False) and context.get('... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Return'",
"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_13(self, VAR_9, VAR_10=None, VAR_11=None, VAR_20=''):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_28 = self.get_and_check_task(VAR_9, VAR_10, VAR_11)\n",
"VAR_31 = {'all': 'all.zip', 'geotiff': os.path.join('odm_orthophoto',\n 'odm_orthophoto.tif'), 'las': os.path.join('odm_georeferencing',\n 'odm_... | [
"def get(self, request, pk=None, project_pk=None, asset=''):...\n",
"\"\"\"docstring\"\"\"\n",
"task = self.get_and_check_task(request, pk, project_pk)\n",
"allowed_assets = {'all': 'all.zip', 'geotiff': os.path.join(\n 'odm_orthophoto', 'odm_orthophoto.tif'), 'las': os.path.join(\n 'odm_georeferencing'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_4):...\n",
"VAR_10 = sqlite3.connect(VAR_1)\n",
"VAR_11 = VAR_10.cursor()\n",
"VAR_11.execute('SELECT * FROM UserData WHERE session_id = ?', [VAR_4])\n",
"VAR_14 = VAR_11.fetchone()\n",
"VAR_10.close()\n",
"return VAR_14\n"
] | [
"def check_session(session_id):...\n",
"connection = sqlite3.connect(DATABASE_PATH)\n",
"cursor = connection.cursor()\n",
"cursor.execute('SELECT * FROM UserData WHERE session_id = ?', [session_id])\n",
"verified = cursor.fetchone()\n",
"connection.close()\n",
"return verified\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"from __future__ import unicode_literals\n",
"import frappe\n",
"from frappe.utils import getdate, add_days, today, cint\n",
"from frappe import _\n",
"def FUNC_0(VAR_0=None):...\n",
"VAR_1 = FUNC_1()\n",
"VAR_2 = FUNC_2(VAR_0)\n",
"return VAR_1, VAR_2\n"
] | [
"from __future__ import unicode_literals\n",
"import frappe\n",
"from frappe.utils import getdate, add_days, today, cint\n",
"from frappe import _\n",
"def execute(filters=None):...\n",
"columns = get_columns()\n",
"data = get_data(filters)\n",
"return columns, data\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(VAR_4, *VAR_5, **VAR_6):...\n",
""
] | [
"def dummy_handler(remote, *args, **kargs):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def __hash__(self):...\n",
"return self.name.__hash__()\n"
] | [
"def __hash__(self):...\n",
"return self.name.__hash__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(VAR_11):...\n",
"VAR_10.append(VAR_11)\n"
] | [
"def after_replace(func):...\n",
"_after_replace_callbacks.append(func)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_1(self):...\n",
"self.expected_requests([('http://localhost/a', {}, 'foo', None)])\n",
"VAR_0 = xsrf_client.XsrfRemote('http://localhost/')\n",
"self.assertEqual('foo', VAR_0.url_read('/a'))\n"
] | [
"def testXsrfRemoteGET(self):...\n",
"self.expected_requests([('http://localhost/a', {}, 'foo', None)])\n",
"remote = xsrf_client.XsrfRemote('http://localhost/')\n",
"self.assertEqual('foo', remote.url_read('/a'))\n"
] | [
0,
5,
5,
5
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', max_tries=-1), None)\n",
"self._mox.VerifyAll()\n"
] | [
"def testUrlOpenInvalidTryCount(self):...\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', max_tries=-1), None)\n",
"self._mox.VerifyAll()\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_22(self, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = self.common._cli_run('showvlun -a -host %s' % VAR_11, None)\n",
"if VAR_35:\n",
"VAR_35 = VAR_35[1:]\n",
"for line in VAR_35:\n",
"VAR_30 = line.split(',')\n",
"if VAR_30 and len(VAR_30) > 4:\n",
"return VAR_30[4]\n"
] | [
"def _get_active_nsp(self, hostname):...\n",
"\"\"\"docstring\"\"\"\n",
"result = self.common._cli_run('showvlun -a -host %s' % hostname, None)\n",
"if result:\n",
"result = result[1:]\n",
"for line in result:\n",
"info = line.split(',')\n",
"if info and len(info) > 4:\n",
"return info[4]\n"
] | [
0,
0,
2,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_10(VAR_20, VAR_21, VAR_22=None):...\n",
"if VAR_20 not in VAR_5:\n",
"VAR_5[VAR_20] = []\n",
"VAR_45 = VAR_5[VAR_20]\n",
"VAR_21 = str(VAR_21)\n",
"VAR_22 = VAR_22 or ''\n",
"VAR_46 = VAR_22, VAR_21\n",
"if VAR_46 in VAR_6:\n",
"if VAR_46 not in VAR_45:\n",
"VAR_0.info('Appending %s to t... | [
"def add_target_exc(domain, id_, tuser=None):...\n",
"if domain not in targets:\n",
"targets[domain] = []\n",
"tlist = targets[domain]\n",
"id_ = str(id_)\n",
"tuser = tuser or ''\n",
"t = tuser, id_\n",
"if t in protected:\n",
"if t not in tlist:\n",
"logger.info('Appending %s to targets[%s]', re... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(self, VAR_14):...\n",
""
] | [
"def is_numeric(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_0(VAR_0):...\n",
"return os.path.exists(os.path.join(VAR_0, '__init__.py'))\n"
] | [
"def _is_package(directory):...\n",
"return os.path.exists(os.path.join(directory, '__init__.py'))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"VAR_8 = self.get_datadocument_count()\n",
"VAR_9 = 0 if VAR_8 == 0 else self.get_qa_complete_extractedtext_count(\n ) / VAR_8 * 100\n",
"return '{0:.0f}%'.format(VAR_9)\n"
] | [
"def get_pct_checked(self):...\n",
"count = self.get_datadocument_count()\n",
"pct = 0 if count == 0 else self.get_qa_complete_extractedtext_count(\n ) / count * 100\n",
"return '{0:.0f}%'.format(pct)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"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"... |
[
"def FUNC_4(VAR_2, VAR_3=None, VAR_4=None, VAR_5=0, VAR_6=20, VAR_7=None):...\n",
"VAR_11 = []\n",
"if VAR_4:\n",
"if VAR_4.blogger:\n",
"if VAR_3:\n",
"VAR_11.append('t1.blogger=\"%s\"' % frappe.db.escape(VAR_4.blogger))\n",
"if VAR_4.blog_category:\n",
"VAR_11.append('(t1.content like \"%{0}%\" or t... | [
"def get_blog_list(doctype, txt=None, filters=None, limit_start=0,...\n",
"conditions = []\n",
"if filters:\n",
"if filters.blogger:\n",
"if txt:\n",
"conditions.append('t1.blogger=\"%s\"' % frappe.db.escape(filters.blogger))\n",
"if filters.blog_category:\n",
"conditions.append('(t1.content like \"%{... | [
0,
0,
0,
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'",
"Condition",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'... |
[
"def FUNC_4(VAR_9, VAR_10):...\n",
"print('Expected: ', VAR_10)\n",
"VAR_15 = [{'name': doc['name_info']['name']} for doc in VAR_9['names']]\n",
"print('Actual: ', VAR_15)\n",
"assert_that(len(VAR_15), equal_to(len(VAR_10)))\n",
"for i in range(len(VAR_15)):\n",
"assert_that(VAR_15[i]['name'], equal_to(... | [
"def verify(data, expected):...\n",
"print('Expected: ', expected)\n",
"actual = [{'name': doc['name_info']['name']} for doc in data['names']]\n",
"print('Actual: ', actual)\n",
"assert_that(len(actual), equal_to(len(expected)))\n",
"for i in range(len(actual)):\n",
"assert_that(actual[i]['name'], equal... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"For",
"Expr'"
] |
[
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"VAR_0 = TestApp(main({}))\n",
"VAR_1 = VAR_0.get('/service2', headers={'Accept': 'audio/*'}, status=406)\n",
"self.assertTrue('application/json' in VAR_1.json)\n",
"self.assertTrue('text/json' in VAR_1.json)\n",
"VAR_0.get('/service2', headers={'Accept': 'application/*'}, status... | [
"def test_accept(self):...\n",
"app = TestApp(main({}))\n",
"res = app.get('/service2', headers={'Accept': 'audio/*'}, status=406)\n",
"self.assertTrue('application/json' in res.json)\n",
"self.assertTrue('text/json' in res.json)\n",
"app.get('/service2', headers={'Accept': 'application/*'}, status=200)\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_9):...\n",
"\"\"\"docstring\"\"\"\n",
"print('\\nBye!')\n",
"return True\n"
] | [
"def do_EOF(self, line):...\n",
"\"\"\"docstring\"\"\"\n",
"print('\\nBye!')\n",
"return True\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Return'"
] |
[
"def FUNC_22(self, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = self.common._cli_run('showvlun -a -host %s' % VAR_11, None)\n",
"if VAR_35:\n",
"VAR_35 = VAR_35[1:]\n",
"for line in VAR_35:\n",
"VAR_30 = line.split(',')\n",
"if VAR_30 and len(VAR_30) > 4:\n",
"return VAR_30[4]\n"
] | [
"def _get_active_nsp(self, hostname):...\n",
"\"\"\"docstring\"\"\"\n",
"result = self.common._cli_run('showvlun -a -host %s' % hostname, None)\n",
"if result:\n",
"result = result[1:]\n",
"for line in result:\n",
"info = line.split(',')\n",
"if info and len(info) > 4:\n",
"return info[4]\n"
] | [
0,
0,
2,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_3(self, VAR_3, VAR_4):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_3.opt_type == bool:\n",
"if not VAR_3.opt_type == VAR_4.opt_type:\n",
"VAR_27 = VAR_4.value.lower()\n",
"VAR_1 = 'Invalid option type for %s. Expected %s got %s'\n",
"return VAR_4.value\n",
"if VAR_27 not in ['true', 'on', ... | [
"def _validate_option(self, default, cli):...\n",
"\"\"\"docstring\"\"\"\n",
"if not default.opt_type == bool:\n",
"if not default.opt_type == cli.opt_type:\n",
"val = cli.value.lower()\n",
"msg = 'Invalid option type for %s. Expected %s got %s'\n",
"return cli.value\n",
"if val not in ['true', 'on', ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_9(self, VAR_14):...\n",
""
] | [
"def is_string(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_0(self, VAR_0, VAR_1):...\n",
"self.max_x = VAR_0\n",
"self.max_y = VAR_1\n"
] | [
"def bound(self, max_x, max_y):...\n",
"self.max_x = max_x\n",
"self.max_y = max_y\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"@integration_synonym_api...\n",
"FUNC_2(VAR_2)\n",
"FUNC_3(VAR_2, 'ANDERSON BEHAVIOR BEHAVIOR', VAR_7='1')\n",
"FUNC_5(VAR_4, VAR_5, VAR_11='BEHAVIOUR INTERVENTION', VAR_10=[{'name':\n '----BEHAVIOUR INTERVENTION'}, {'name': '----BEHAVIOUR'}, {'name':\n 'ANDERSON BEHAVIOR BEHAVIOR'}])\n"
] | [
"@integration_synonym_api...\n",
"clean_database(solr)\n",
"seed_database_with(solr, 'ANDERSON BEHAVIOR BEHAVIOR', id='1')\n",
"verify_results(client, jwt, query='BEHAVIOUR INTERVENTION', expected=[{\n 'name': '----BEHAVIOUR INTERVENTION'}, {'name': '----BEHAVIOUR'}, {\n 'name': 'ANDERSON BEHAVIOR BEHAV... | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(self):...\n",
"clear_cache('writers')\n"
] | [
"def on_update(self):...\n",
"clear_cache('writers')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"VAR_1 = '/api/apps'\n",
"VAR_2 = self.client.post(VAR_1)\n",
"self.assertEqual(VAR_2.status_code, 201)\n",
"VAR_3 = VAR_2.data['id']\n",
"VAR_1 = '/api/apps/{app_id}/builds'.format(**locals())\n",
"VAR_4 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d... | [
"def test_create_chaos(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}/builds'.format(**locals())\n",
"body = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile'... | [
0,
0,
5,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
... |
[
"def FUNC_3(VAR_1, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_2 is None:\n",
"return None\n",
"if not VAR_2.startswith('models:'):\n",
"return VAR_2\n",
"VAR_18 = VAR_2[7:VAR_2.rfind('/')].replace('/', '.')\n",
"VAR_19 = f'parlai.zoo.{VAR_18}'\n",
"print(VAR_19)\n",
"VAR_36 = importlib.impo... | [
"def modelzoo_path(datapath, path):...\n",
"\"\"\"docstring\"\"\"\n",
"if path is None:\n",
"return None\n",
"if not path.startswith('models:'):\n",
"return path\n",
"animal = path[7:path.rfind('/')].replace('/', '.')\n",
"module_name = f'parlai.zoo.{animal}'\n",
"print(module_name)\n",
"my_module... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_33):...\n",
"return VAR_33 != 'off' and bool(VAR_33)\n"
] | [
"def run(self, val):...\n",
"return val != 'off' and bool(val)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"VAR_5 = [{'application': self.TEST_APP, 'stack': self.TEST_STACK,\n 'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.TEST_ZONE,\n 'network': 'default', 'targetSize': 1, 'capacity': {'min': 1, 'max': 1,\n 'desired': 1}, 'availabilityZones': {self.TEST_REGION: [self.... | [
"def create_instances(self):...\n",
"job = [{'application': self.TEST_APP, 'stack': self.TEST_STACK,\n 'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.TEST_ZONE,\n 'network': 'default', 'targetSize': 1, 'capacity': {'min': 1, 'max': 1,\n 'desired': 1}, 'availabilityZones': {self.TEST_REGION... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = discord.Embed(VAR_2='Check your 3DSs IP (CFW)', VAR_3=discord.Color\n .dark_orange())\n",
"VAR_7.description = \"\"\"1. FBI\n2. Remote Install\n3. Recieve URLs over the network\"\"\"\n",
"VAR_7.add_field(name='Check your 3DSs IP (Homebrew)',... | [
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"embed = discord.Embed(title='Check your 3DSs IP (CFW)', color=discord.Color\n .dark_orange())\n",
"embed.description = \"\"\"1. FBI\n2. Remote Install\n3. Recieve URLs over the network\"\"\"\n",
"embed.add_field(name='Check your 3DSs IP (Homebrew)',... | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"from flask import request\n",
"from clickhouse_driver.errors import Error as ClickHouseError\n",
"from datetime import date, datetime, timedelta\n",
"from dateutil.parser import parse as dateutil_parse\n",
"from dateutil.tz import tz\n",
"from functools import wraps\n",
"from hashlib import md5\n",
"... | [
"from flask import request\n",
"from clickhouse_driver.errors import Error as ClickHouseError\n",
"from datetime import date, datetime, timedelta\n",
"from dateutil.parser import parse as dateutil_parse\n",
"from dateutil.tz import tz\n",
"from functools import wraps\n",
"from hashlib import md5\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,
4,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"As... |
[
"def FUNC_3(self):...\n",
"VAR_1 = '/api/apps'\n",
"VAR_2 = self.client.post(VAR_1)\n",
"self.assertEqual(VAR_2.status_code, 201)\n",
"VAR_3 = VAR_2.data['id']\n",
"VAR_1 = '/api/apps/{app_id}/builds'.format(**locals())\n",
"VAR_4 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d... | [
"def test_start_chaos(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}/builds'.format(**locals())\n",
"body = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile':... | [
0,
0,
0,
0,
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'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
... |
[
"def FUNC_3(self):...\n",
"if 'expiration' in VAR_15:\n",
"if VAR_15.get('max_expiration') is None:\n",
"return False\n",
"logging.warning('max_expiration unset on session, when expiration is set.')\n",
"VAR_37 = datetime.datetime.utcnow()\n",
"return True\n",
"if VAR_37 > VAR_15['expiration']:\n",
... | [
"def is_expired(self):...\n",
"if 'expiration' in session:\n",
"if session.get('max_expiration') is None:\n",
"return False\n",
"logging.warning('max_expiration unset on session, when expiration is set.')\n",
"now = datetime.datetime.utcnow()\n",
"return True\n",
"if now > session['expiration']:\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = CLASS_1.get_user_by_id(VAR_3)\n",
"if UserRole(VAR_22.role) in [UserRole.ADMIN, UserRole.PROJECT_MANAGER]:\n",
"return True\n",
"return False\n"
] | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"user = UserService.get_user_by_id(user_id)\n",
"if UserRole(user.role) in [UserRole.ADMIN, UserRole.PROJECT_MANAGER]:\n",
"return True\n",
"return False\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"@property...\n",
"if not self._is_function:\n",
"return self._file\n"
] | [
"@property...\n",
"if not self._is_function:\n",
"return self._file\n"
] | [
0,
0,
0
] | [
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_59(self):...\n",
"VAR_13 = 'string'\n",
"VAR_14 = 'string' % (os.getcwd(), VAR_13)\n",
"self.b_mgr.populate_baseline(VAR_14)\n",
"self.run_example('flask_debug.py')\n",
"self.assertEqual(1, len(self.b_mgr.baseline))\n",
"self.assertEqual({}, self.b_mgr.get_issue_list())\n"
] | [
"def test_baseline_filter(self):...\n",
"issue_text = (\n 'A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code.'\n )\n",
"json = (\n \"\"\"{\n \"results\": [\n {\n \"code\": \"...\",\n ... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_15(self):...\n",
"build_train_set()\n",
"train_model(VAR_0=prob_thresh)\n",
"VAR_19 = 'string'\n",
"VAR_35 = pd.read_sql(VAR_19, conn)\n",
"VAR_20 = scrape(ref=test_df_dilfo)\n",
"VAR_21 = match(df_dilfo=test_df_dilfo, df_web=test_web_df, test=True, VAR_0\n =prob_thresh, version='new')\n",
... | [
"def test_truth_table(self):...\n",
"build_train_set()\n",
"train_model(prob_thresh=prob_thresh)\n",
"match_query = \"\"\"\n SELECT \n df_dilfo.job_number,\n df_dilfo.city,\n df_dilfo.address,\n ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(VAR_9):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7, VAR_38 = VAR_1.match(VAR_9).group(1, 2)\n",
"if VAR_7 in PROMOTED_COLS:\n",
"VAR_62 = TAG_COLUMN_MAP[VAR_7].get(VAR_38, VAR_38)\n",
"return u'{col}.value[indexOf({col}.key, {tag})]'.format(**{'col': col,\n 'tag': escape_literal(tag)})\n",
... | [
"def tag_expr(column_name):...\n",
"\"\"\"docstring\"\"\"\n",
"col, tag = NESTED_COL_EXPR_RE.match(column_name).group(1, 2)\n",
"if col in PROMOTED_COLS:\n",
"actual_tag = TAG_COLUMN_MAP[col].get(tag, tag)\n",
"return u'{col}.value[indexOf({col}.key, {tag})]'.format(**{'col': col,\n 'tag': escape_liter... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Condition",
"Return'"
] |
[
"def FUNC_2(VAR_0, VAR_1, VAR_2, VAR_3, VAR_4):...\n",
""
] | [
"def new_expense(person, expense_date, amount, category, description):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_2(VAR_1, VAR_2):...\n",
"for VAR_13 in VAR_2.strip('/').split('/'):\n",
"VAR_1 = VAR_1[VAR_13]\n",
"FUNC_1(VAR_1)\n"
] | [
"def scan_git_subtree(tree, path):...\n",
"for p in path.strip('/').split('/'):\n",
"tree = tree[p]\n",
"scan_git_tree(tree)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Assign'",
"Expr'"
] |
[
"@staticmethod...\n",
"if VAR_6.last_run_at:\n",
"return VAR_6.schedule.remaining_estimate(last_run_at=obj.last_run_at)\n",
"return VAR_6.schedule.remaining_estimate(last_run_at=datetime.now(pytz.utc))\n"
] | [
"@staticmethod...\n",
"if obj.last_run_at:\n",
"return obj.schedule.remaining_estimate(last_run_at=obj.last_run_at)\n",
"return obj.schedule.remaining_estimate(last_run_at=datetime.now(pytz.utc))\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_1(VAR_0):...\n",
"for vcs_type in vcstool_clients:\n",
"if vcs_type.is_repository(VAR_0):\n",
"return None\n",
"return vcs_type(VAR_0)\n"
] | [
"def get_vcs_client(path):...\n",
"for vcs_type in vcstool_clients:\n",
"if vcs_type.is_repository(path):\n",
"return None\n",
"return vcs_type(path)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_3(self, VAR_10, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"self.forward('tcp:%d tcp:%d' % (VAR_10, VAR_11))\n"
] | [
"def tcp_forward(self, host_port, device_port):...\n",
"\"\"\"docstring\"\"\"\n",
"self.forward('tcp:%d tcp:%d' % (host_port, device_port))\n"
] | [
0,
0,
2
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_22(self):...\n",
"self.assertRaises(NotImplementedError, self.driver.local_path, '')\n"
] | [
"def test_local_path(self):...\n",
"self.assertRaises(NotImplementedError, self.driver.local_path, '')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, VAR_5, VAR_6):...\n",
"tk.Frame.__init__(self, VAR_5)\n",
"self.controller = VAR_6\n",
"VAR_15 = tk.Frame(self)\n",
"VAR_15.pack(side='top', fill='x')\n",
"self.statusbar = VAR_15\n",
"VAR_16 = tk.Frame(self)\n",
"VAR_16.pack(side='bottom', fill='x')\n",
"self.navbar = VAR_16\n",... | [
"def __init__(self, parent, controller):...\n",
"tk.Frame.__init__(self, parent)\n",
"self.controller = controller\n",
"statusbar = tk.Frame(self)\n",
"statusbar.pack(side='top', fill='x')\n",
"self.statusbar = statusbar\n",
"navbar = tk.Frame(self)\n",
"navbar.pack(side='bottom', fill='x')\n",
"sel... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_22(self, VAR_25):...\n",
"\"\"\"docstring\"\"\"\n",
"if __debug__:\n",
"self.__log_run(VAR_25)\n",
"VAR_25.prepare()\n",
"VAR_26 = TraversalPath()\n",
"if self.__root_is_sequence:\n",
"if not self._tgt_prx is None:\n",
"self.traverse_one(VAR_26, None, self._src_prx, self._tgt_prx, VAR_25)\... | [
"def run(self, visitor):...\n",
"\"\"\"docstring\"\"\"\n",
"if __debug__:\n",
"self.__log_run(visitor)\n",
"visitor.prepare()\n",
"path = TraversalPath()\n",
"if self.__root_is_sequence:\n",
"if not self._tgt_prx is None:\n",
"self.traverse_one(path, None, self._src_prx, self._tgt_prx, visitor)\n",
... | [
0,
0,
0,
0,
0,
1,
0,
0,
1,
0,
0,
0,
0,
0,
0,
1
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_7(self, VAR_17=None):...\n",
"if not VAR_17:\n",
"VAR_17 = self._error\n",
"if VAR_17:\n",
"VAR_101.errors.add(VAR_17)\n"
] | [
"def error(self, e=None):...\n",
"if not e:\n",
"e = self._error\n",
"if e:\n",
"c.errors.add(e)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_12(self):...\n",
"VAR_4 = {url_helper.swarm_constants.COUNT_KEY: 1}\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', VAR_4=data), None)\n",
"self._mox.VerifyAll()\n"
] | [
"def testCountKeyInData(self):...\n",
"data = {url_helper.swarm_constants.COUNT_KEY: 1}\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', data=data), None)\n",
"self._mox.VerifyAll()\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(VAR_1):...\n",
"for VAR_5 in VAR_1.traverse():\n",
"if VAR_5.path.startswith('LICENSES'):\n",
"if VAR_5.path.find('license-rules.rst') >= 0:\n",
"if not os.path.isfile(VAR_5.path):\n",
"VAR_22.parse_lines(VAR_15, VAR_19.maxlines, VAR_5.path)\n"
] | [
"def scan_git_tree(tree):...\n",
"for el in tree.traverse():\n",
"if el.path.startswith('LICENSES'):\n",
"if el.path.find('license-rules.rst') >= 0:\n",
"if not os.path.isfile(el.path):\n",
"parser.parse_lines(fd, args.maxlines, el.path)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Condition",
"Condition",
"Expr'"
] |
[
"import pytest\n",
"from sanic import Sanic\n",
"import random\n",
"import json\n",
"from jogging.main import config_app\n",
"from jogging import config\n",
"from jogging.Models.user import User\n",
"VAR_0 = None\n",
"VAR_1 = None\n",
"VAR_2 = None\n",
"@pytest.yield_fixture...\n",
"config.app... | [
"import pytest\n",
"from sanic import Sanic\n",
"import random\n",
"import json\n",
"from jogging.main import config_app\n",
"from jogging import config\n",
"from jogging.Models.user import User\n",
"username = None\n",
"access_token = None\n",
"refresh_token = None\n",
"@pytest.yield_fixture...... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Condition",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Assign'"
] |
[
"def FUNC_6(self, VAR_68):...\n",
"if not VAR_68:\n",
"return\n",
"if VAR_68.startswith('redirect_'):\n",
"VAR_104 = VAR_68[9:]\n",
"if VAR_68.startswith('vote_'):\n",
"if not VAR_104.startswith(VAR_101.site.path) and not VAR_104.startswith('http:'\n",
"VAR_41 = VAR_68[5:]\n",
"if VAR_68.startswith(... | [
"def run(self, reason):...\n",
"if not reason:\n",
"return\n",
"if reason.startswith('redirect_'):\n",
"dest = reason[9:]\n",
"if reason.startswith('vote_'):\n",
"if not dest.startswith(c.site.path) and not dest.startswith('http:'):\n",
"fullname = reason[5:]\n",
"if reason.startswith('share_'):\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'",
"Assign'",
... |
[
"def FUNC_24(self):...\n",
"if not self.DiagnosticsForCurrentFileReady():\n",
"return\n",
"self._diag_interface.UpdateWithNewDiagnostics(self.\n GetDiagnosticsFromStoredRequest())\n"
] | [
"def UpdateDiagnosticInterface(self):...\n",
"if not self.DiagnosticsForCurrentFileReady():\n",
"return\n",
"self._diag_interface.UpdateWithNewDiagnostics(self.\n GetDiagnosticsFromStoredRequest())\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Expr'"
] |
[
"def __init__(self, VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = logging.getLogger(__name__)\n",
"VAR_7.setLevel(logging.DEBUG)\n",
"VAR_7.debug('Initialized thread')\n",
"super(CLASS_8, self).__init__()\n",
"self.job_queue = VAR_6\n",
"self.subscribed_queues = []\n",
"self.end = False\n"
] | [
"def __init__(self, queue):...\n",
"\"\"\"docstring\"\"\"\n",
"logger = logging.getLogger(__name__)\n",
"logger.setLevel(logging.DEBUG)\n",
"logger.debug('Initialized thread')\n",
"super(MonitoringThread, self).__init__()\n",
"self.job_queue = queue\n",
"self.subscribed_queues = []\n",
"self.end = F... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n",
"GenericRequest.__init__(self, VAR_1, VAR_4)\n",
"self.url = self.base_url\n",
"self.username = VAR_2\n",
"self.loggedin = VAR_3\n"
] | [
"def __init__(self, browser, username, loggedin, base_url=None):...\n",
"GenericRequest.__init__(self, browser, base_url)\n",
"self.url = self.base_url\n",
"self.username = username\n",
"self.loggedin = loggedin\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.params = VAR_71, VAR_72\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.params = params, kwparams\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"@VAR_0.route('/ping')...\n",
"return 'pong'\n"
] | [
"@locations.route('/ping')...\n",
"return 'pong'\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_6(self, VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_14 = VAR_1.split('.')[2]\n",
"VAR_15 = __import__(VAR_1, globals(), locals(), [VAR_14])\n",
"VAR_16 = inspect.getmembers(VAR_15, inspect.isclass)\n",
"for mod in VAR_16:\n",
"if mod[0] in ('SosHost', 'Cluster'):\n",
"return VAR_16\n",
... | [
"def _import_modules(self, modname):...\n",
"\"\"\"docstring\"\"\"\n",
"mod_short_name = modname.split('.')[2]\n",
"module = __import__(modname, globals(), locals(), [mod_short_name])\n",
"modules = inspect.getmembers(module, inspect.isclass)\n",
"for mod in modules:\n",
"if mod[0] in ('SosHost', 'Clust... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"Expr'"
] |
[
"def FUNC_7():...\n",
"return HttpResponse(json.dumps({'rc': 0, 'response': 'ok'}))\n"
] | [
"def say_yes():...\n",
"return HttpResponse(json.dumps({'rc': 0, 'response': 'ok'}))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_0(VAR_1):...\n",
"VAR_3 = sqlite3.connect(VAR_0)\n",
"VAR_1 = 'select * from django_migrations;'\n",
"VAR_4 = VAR_3.cursor()\n",
"VAR_4.execute(VAR_1)\n",
"VAR_5 = VAR_4.fetchall()\n",
"return VAR_5\n"
] | [
"def sqlite_executor(sql):...\n",
"conn = sqlite3.connect(DB_FILE)\n",
"sql = 'select * from django_migrations;'\n",
"cursor = conn.cursor()\n",
"cursor.execute(sql)\n",
"res = cursor.fetchall()\n",
"return res\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"@staticmethod...\n",
"VAR_25 = {}\n",
"for equality in VAR_5.fragment.split():\n",
"VAR_50 = equality.find('=')\n",
"return VAR_25\n",
"VAR_29 = equality[:VAR_50]\n",
"VAR_51 = equality[VAR_50 + 1:]\n",
"VAR_25[VAR_29] = VAR_51\n"
] | [
"@staticmethod...\n",
"res = {}\n",
"for equality in url.fragment.split():\n",
"index = equality.find('=')\n",
"return res\n",
"key = equality[:index]\n",
"value = equality[index + 1:]\n",
"res[key] = value\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_22(VAR_14, VAR_15):...\n",
"VAR_37 = VAR_14.state['sleep_streak']\n",
"self.assertEqual(VAR_14.remote, self.server)\n",
"if VAR_37 == 5:\n",
"return False\n"
] | [
"def poll_server(botobj, _):...\n",
"sleep_streak = botobj.state['sleep_streak']\n",
"self.assertEqual(botobj.remote, self.server)\n",
"if sleep_streak == 5:\n",
"return False\n"
] | [
0,
0,
5,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Condition",
"Return'"
] |
[
"def FUNC_13(self, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"self._check_volume(VAR_16)\n",
"VAR_0.warn(_('Volume %s was not found while trying to delete it'), VAR_16[\n 'name'])\n",
"self._eql_execute('volume', 'select', VAR_16['name'], 'offline')\n",
"VAR_0.error(_('Failed to delete volume %s'), VA... | [
"def delete_volume(self, volume):...\n",
"\"\"\"docstring\"\"\"\n",
"self._check_volume(volume)\n",
"LOG.warn(_('Volume %s was not found while trying to delete it'), volume['name']\n )\n",
"self._eql_execute('volume', 'select', volume['name'], 'offline')\n",
"LOG.error(_('Failed to delete volume %s'), ... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"import zipfile, os, subprocess, shutil, sys, getopt, re\n",
"VAR_0 = VAR_1 = None\n",
"VAR_2 = 'backdoor.jar'\n",
"def FUNC_0(VAR_3):...\n",
"VAR_6 = 0\n",
"VAR_14, VAR_15 = getopt.getopt(VAR_3, 'b:t:o:', ['backdoor=', 'target=',\n 'outfile='])\n",
"print('USAGE:\\tajar.py -b <backdoor.java> -t <tar... | [
"import zipfile, os, subprocess, shutil, sys, getopt, re\n",
"backdoor = target = None\n",
"outfile = 'backdoor.jar'\n",
"def main(argv):...\n",
"help = 0\n",
"opts, args = getopt.getopt(argv, 'b:t:o:', ['backdoor=', 'target=', 'outfile=']\n )\n",
"print('USAGE:\\tajar.py -b <backdoor.java> -t <targe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0... | [
"Import'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"For",
"Expr'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Condition",
"Expr'",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"For",
"Assign'",
"Assign'",
"Con... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.