lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_28(VAR_12, VAR_11):...\n",
"VAR_30 = []\n",
"VAR_31 = []\n",
"for item in VAR_12:\n",
"VAR_44 = item['auth']\n",
"return VAR_30\n",
"if item['type'] != 'auth':\n",
"VAR_44 = '%s (%s)' % (VAR_44, item[VAR_11][0])\n",
"if item['idroot'] not in VAR_31:\n",
"VAR_30.append({'id': '%s%s%s' % (... | [
"def _fast_results_to_select2_list(fast_results, index):...\n",
"results = []\n",
"fast_ids = []\n",
"for item in fast_results:\n",
"text = item['auth']\n",
"return results\n",
"if item['type'] != 'auth':\n",
"text = '%s (%s)' % (text, item[index][0])\n",
"if item['idroot'] not in fast_ids:\n",
"r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"@api_view(['GET'])...\n",
"return FUNC_7(VAR_0, 'practice')\n"
] | [
"@api_view(['GET'])...\n",
"return _measure_by_org(request, 'practice')\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_34(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.flags.ignore_save_passwords is True:\n",
"return\n",
"for VAR_25 in self.meta.get('fields', {'fieldtype': ('=', 'Password')}):\n",
"if self.flags.ignore_save_passwords and VAR_25.fieldname in self.flags.ignore_save_passwords:\n",
"VAR_62 = s... | [
"def _save_passwords(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.flags.ignore_save_passwords is True:\n",
"return\n",
"for df in self.meta.get('fields', {'fieldtype': ('=', 'Password')}):\n",
"if self.flags.ignore_save_passwords and df.fieldname in self.flags.ignore_save_passwords:\n",
"new_passwo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"For",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_2():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = {}\n",
"for arg in request.args:\n",
"VAR_8 = re.findall('psize_(.*)', arg)\n",
"return VAR_6\n",
"if VAR_8:\n",
"VAR_6[VAR_8[0]] = int(request.args.get(arg))\n"
] | [
"def get_page_size_args():...\n",
"\"\"\"docstring\"\"\"\n",
"page_sizes = {}\n",
"for arg in request.args:\n",
"re_match = re.findall('psize_(.*)', arg)\n",
"return page_sizes\n",
"if re_match:\n",
"page_sizes[re_match[0]] = int(request.args.get(arg))\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Assign'"
] |
[
"def FUNC_5(VAR_17, VAR_16):...\n",
"if FUNC_6(VAR_17):\n",
"return FUNC_8(VAR_17, VAR_16)\n",
"return FUNC_7(open(VAR_17).read(), VAR_16)\n",
"VAR_28.error('%s', e)\n"
] | [
"def render_template(template, config):...\n",
"if is_executable(template):\n",
"return render_executable(template, config)\n",
"return render_moustache(open(template).read(), config)\n",
"logger.error('%s', e)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'",
"Expr'"
] |
[
"def FUNC_4(VAR_8, VAR_7):...\n",
"VAR_18 = {onboarding.USER_ID: VAR_7}\n",
"VAR_19 = c_onboarding_status(use_secondary=True).find_one(VAR_18)\n",
"if not VAR_19 or not VAR_19.get(VAR_8):\n",
"c_onboarding_status().update_one(VAR_18, {'$set': {VAR_8: True}}, upsert=True)\n"
] | [
"def update_onboarding_step(step, user_id):...\n",
"find_crit = {onboarding.USER_ID: user_id}\n",
"onboarding_data = c_onboarding_status(use_secondary=True).find_one(find_crit)\n",
"if not onboarding_data or not onboarding_data.get(step):\n",
"c_onboarding_status().update_one(find_crit, {'$set': {step: True... | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.host_status.get(self.hostname):\n",
"VAR_9 = 'ssh -F %s %s \"ps -p %s > /dev/null\"' % (config.\n CUSTOM_SSH_CONFIG_PATH, self.hostname, self.pid)\n",
"return True\n",
"if call(VAR_9, shell=True) == 0:\n",
"return True\n",
"return CLASS_... | [
"def run_check(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.host_status.get(self.hostname):\n",
"cmd = 'ssh -F %s %s \"ps -p %s > /dev/null\"' % (config.\n CUSTOM_SSH_CONFIG_PATH, self.hostname, self.pid)\n",
"return True\n",
"if call(cmd, shell=True) == 0:\n",
"return True\n",
"return RemoteC... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def __init__(self, **VAR_20):...\n",
"self.type = VAR_20['type']\n",
"if 'vals' in VAR_20:\n",
"VAR_65 = list(map(FUNC_18, VAR_20['vals']))\n",
"self.message = VAR_20['message']\n",
"self.message = VAR_20['message'].format(*VAR_65)\n",
"if self.type not in ('success', 'info') and 'no_sure' not in VAR_2... | [
"def __init__(self, **ka):...\n",
"self.type = ka['type']\n",
"if 'vals' in ka:\n",
"formatting = list(map(html_escape, ka['vals']))\n",
"self.message = ka['message']\n",
"self.message = ka['message'].format(*formatting)\n",
"if self.type not in ('success', 'info') and 'no_sure' not in ka:\n",
"self.m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"AugAssign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"from builtins import str\n",
"import logging\n",
"import random\n",
"import socket\n",
"import subprocess\n",
"import time\n",
"\"\"\"Raised when there is an error in adb operations.\"\"\"\n",
"def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3):...\n",
"self.cmd = VAR_0\n",
"self.stdout = VAR_1\n",
... | [
"from builtins import str\n",
"import logging\n",
"import random\n",
"import socket\n",
"import subprocess\n",
"import time\n",
"\"\"\"Raised when there is an error in adb operations.\"\"\"\n",
"def __init__(self, cmd, stdout, stderr, ret_code):...\n",
"self.cmd = cmd\n",
"self.stdout = stdout\n",... | [
0,
0,
2,
2,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Expr'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Return'"
] |
[
"@app.route('/json/politicians/<politician>')...\n",
"VAR_7 = Politician.all()\n",
"VAR_7.filter('name =', VAR_2.lower())\n",
"VAR_2 = None\n",
"for p in VAR_7:\n",
"VAR_2 = p\n",
"return jsonify(VAR_0=politician.name, VAR_3=politician.state, party=\n politician.party, constituency=politician.constit... | [
"@app.route('/json/politicians/<politician>')...\n",
"politicians = Politician.all()\n",
"politicians.filter('name =', politician.lower())\n",
"politician = None\n",
"for p in politicians:\n",
"politician = p\n",
"return jsonify(name=politician.name, state=politician.state, party=\n politician.party,... | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Return'"
] |
[
"def FUNC_6(VAR_14, VAR_15, VAR_18=True):...\n",
"warn('string')\n",
"return FUNC_5(VAR_14, VAR_15, VAR_18)\n"
] | [
"def smartGrid(dims, files, implicitFillWidth=True):...\n",
"warn(\n 'Image Frame: PIL support not yet implemented, falling back to basic grid. Some images may be distorted.'\n )\n",
"return grid(dims, files, implicitFillWidth)\n"
] | [
0,
2,
0
] | [
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"def __init__(self, *VAR_3, **VAR_4):...\n",
"super(CLASS_1, self).__init__(*VAR_3, **kwargs)\n"
] | [
"def __init__(self, *args, **kwargs):...\n",
"super(SanISCSIDriver, self).__init__(*args, **kwargs)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"VAR_12 = 'string'\n",
"VAR_20 = []\n",
"VAR_21 = self.config.get_renamings()\n",
"for VAR_13 in self.c.execute(VAR_12):\n",
"VAR_29 = str(VAR_13[0])\n",
"return VAR_20\n",
"VAR_30 = VAR_13[1]\n",
"if VAR_29 in VAR_21.keys():\n",
"VAR_30 = VAR_21[VAR_29]\n",
"VAR_20.app... | [
"def get_inverters(self):...\n",
"query = \"\"\"\n SELECT Serial, Name, Type, TimeStamp, EToday, ETotal, Status, OperatingTime\n FROM Inverters;\n \"\"\"\n",
"invs = []\n",
"renamings = self.config.get_renamings()\n",
"for row in self.c.execute(query):\n",
"serial = str(ro... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for operation in self._queue:\n",
"if operation.name not in VAR_0:\n",
"VAR_16 = self.expectation(self._observe.name, self._observe.wires)\n",
"VAR_10 = [(x.val if isinstance(x, Variable) else x) for x in operation.params]\n",
"self._deallocate()\n",... | [
"def execute_queued(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for operation in self._queue:\n",
"if operation.name not in operator_map:\n",
"result = self.expectation(self._observe.name, self._observe.wires)\n",
"par = [(x.val if isinstance(x, Variable) else x) for x in operation.params]\n",
"self._deal... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"@api.model...\n",
"VAR_32 = 0\n",
"if 'current_automaton' in self.env.context:\n",
"return self._do_search_default_automaton()\n",
"VAR_32 = int(self.env.context.get('current_automaton'))\n",
"VAR_32 = 0\n",
"return self.env['crapo.automaton'].browse(VAR_32)\n"
] | [
"@api.model...\n",
"default_value = 0\n",
"if 'current_automaton' in self.env.context:\n",
"return self._do_search_default_automaton()\n",
"default_value = int(self.env.context.get('current_automaton'))\n",
"default_value = 0\n",
"return self.env['crapo.automaton'].browse(default_value)\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_6():...\n",
"VAR_3 = {'foo': 'bar'}\n",
"VAR_1 = yaml.dump(VAR_3)\n",
"VAR_4 = tempfile.NamedTemporaryFile(mode='w', suffix='.yaml')\n",
"VAR_4.write(VAR_1)\n",
"VAR_4.flush()\n",
"VAR_2 = load_source(VAR_4.name)\n",
"assert VAR_2 == VAR_3\n"
] | [
"def test_yaml_file_path():...\n",
"native = {'foo': 'bar'}\n",
"source = yaml.dump(native)\n",
"tmp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.yaml')\n",
"tmp_file.write(source)\n",
"tmp_file.flush()\n",
"result = load_source(tmp_file.name)\n",
"assert result == native\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assert'"
] |
[
"def FUNC_4(VAR_6):...\n",
"VAR_10 = settings.DYNAMIC_LINK\n",
"if len(VAR_10) > 0:\n",
"VAR_12 = VAR_10.format('{}/'.format(settings.PUBLIC_DOMAIN))\n",
"VAR_12 = '{}/'.format(settings.APP_DEEPLINK_DOMAIN)\n",
"VAR_9 = HttpResponse('', status=302)\n",
"VAR_9['Location'] = VAR_12\n",
"return VAR_9\n"
... | [
"def root_redirect(request):...\n",
"dynamic_link = settings.DYNAMIC_LINK\n",
"if len(dynamic_link) > 0:\n",
"link = dynamic_link.format('{}/'.format(settings.PUBLIC_DOMAIN))\n",
"link = '{}/'.format(settings.APP_DEEPLINK_DOMAIN)\n",
"response = HttpResponse('', status=302)\n",
"response['Location'] = l... | [
0,
0,
0,
6,
6,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_24, VAR_25):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_24[VAR_10] and os.path.exists(VAR_25) and not os.path.islink(VAR_25\n",
"VAR_24[VAR_10] = VAR_25\n"
] | [
"def update_realfile(self, f, realfile):...\n",
"\"\"\"docstring\"\"\"\n",
"if not f[A_REALFILE] and os.path.exists(realfile) and not os.path.islink(\n",
"f[A_REALFILE] = realfile\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'"
] |
[
"def __missing__(self, VAR_30):...\n",
"VAR_66 = self[VAR_30] = VAR_31(*VAR_30)\n",
"return VAR_66\n"
] | [
"def __missing__(self, key):...\n",
"ret = self[key] = f(*key)\n",
"return ret\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_9(self):...\n",
"VAR_12, VAR_32, VAR_5, VAR_6 = super().deconstruct()\n",
"if self.default == '{}':\n",
"if self.encoder is not None:\n",
"VAR_6['encoder'] = self.encoder\n",
"return VAR_12, VAR_32, VAR_5, VAR_6\n"
] | [
"def deconstruct(self):...\n",
"name, path, args, kwargs = super().deconstruct()\n",
"if self.default == '{}':\n",
"if self.encoder is not None:\n",
"kwargs['encoder'] = self.encoder\n",
"return name, path, args, kwargs\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_7(VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_18 = sql.connect('./resources/messages.db')\n",
"VAR_33 = []\n",
"VAR_20 = 'string'.format(str(25 * (VAR_16 - 1)))\n",
"VAR_21 = VAR_18.cursor()\n",
"print(''.join(traceback.format_exception(etype=type(e), value=e, tb=e.\n __traceback__)))\n... | [
"def get_messages(page):...\n",
"\"\"\"docstring\"\"\"\n",
"con = sql.connect('./resources/messages.db')\n",
"return_obj = []\n",
"cmd = (\n \"\"\"SELECT * FROM messages \n ORDER BY timeposted DESC \n LIMIT 25 OFFSET {0};\n \"\"\"\n .format(str(25 * (page - 1))))\n",
"cur ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"For",
"Assign'",
"Expr'"
] |
[
"@require_GET...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_19 = ['app_form', 'format']\n",
"VAR_16 = FUNC_1(VAR_0.GET, VAR_19)\n",
"VAR_20 = VAR_0.GET.get('app_form')\n",
"VAR_21 = VAR_0.GET.get('format')\n",
"if not VAR_21:\n",
"VAR_21 = 'p'\n",
"if not VAR_20:\n",
"return HttpResponse('Unrecognizable ... | [
"@require_GET...\n",
"\"\"\"docstring\"\"\"\n",
"internal_parameters = ['app_form', 'format']\n",
"parameters = strip_parameters(request.GET, internal_parameters)\n",
"q_app_form = request.GET.get('app_form')\n",
"q_format = request.GET.get('format')\n",
"if not q_format:\n",
"q_format = 'p'\n",
"if... | [
7,
0,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
7,
0,
7,
7,
7
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_2(VAR_8=None):...\n",
"if VAR_8 is None:\n",
"VAR_8 = VAR_1\n",
"VAR_14 = []\n",
"for exe, VAR_7 in VAR_8:\n",
"return VAR_14\n",
"FUNC_1(exe, VAR_7)\n",
"VAR_14.append(e)\n"
] | [
"def check_executables(executables=None):...\n",
"if executables is None:\n",
"executables = REQUIRED_EXECUTABLES\n",
"mdeps = []\n",
"for exe, pkg in executables:\n",
"return mdeps\n",
"check_executable(exe, pkg)\n",
"mdeps.append(e)\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"For",
"Return'",
"Expr'",
"Expr'"
] |
[
"def FUNC_17(VAR_16):...\n",
"return VAR_19(VAR_16, 'touch')\n"
] | [
"def touch(value):...\n",
"return flag(value, 'touch')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"import base64\n",
"import binascii\n",
"import io\n",
"import json\n",
"import re\n",
"import time\n",
"import tornado\n",
"from bzs import files\n",
"from bzs import const\n",
"from bzs import users\n",
"from bzs import preproc\n",
"import os\n",
"def FUNC_0(VAR_0):...\n",
"return binasc... | [
"import base64\n",
"import binascii\n",
"import io\n",
"import json\n",
"import re\n",
"import time\n",
"import tornado\n",
"from bzs import files\n",
"from bzs import const\n",
"from bzs import users\n",
"from bzs import preproc\n",
"import os\n",
"def encode_str_to_hexed_b64(data):...\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_4(self, VAR_7=5):...\n",
"super().reset_dut(['- TARGET: processing reset request',\n '- TARGET: BDI removes TRST', '- TARGET: Bypass check',\n '- TARGET: JTAG exists check passed', '- TARGET: BDI removes RESET',\n '- TARGET: BDI waits for RESET inactive',\n '- TARGET: Reset sequence passed',... | [
"def reset_dut(self, attempts=5):...\n",
"super().reset_dut(['- TARGET: processing reset request',\n '- TARGET: BDI removes TRST', '- TARGET: Bypass check',\n '- TARGET: JTAG exists check passed', '- TARGET: BDI removes RESET',\n '- TARGET: BDI waits for RESET inactive',\n '- TARGET: Reset sequence pa... | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_8(VAR_13, VAR_14):...\n",
"VAR_5 = self.paths[VAR_13]\n",
"return VAR_5._handlers.get(VAR_14, None)\n"
] | [
"def get_handlers(path, method):...\n",
"component = self.paths[path]\n",
"return component._handlers.get(method, None)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_23(self, VAR_2, VAR_3, VAR_4, *VAR_6):...\n",
"VAR_46 = self.pool.get('res.request')\n",
"VAR_47 = self.browse(VAR_2, VAR_3, VAR_4)\n",
"for VAR_23 in VAR_47:\n",
"VAR_51 = VAR_23.project_id\n",
"return True\n",
"if VAR_51.warn_manager and VAR_51.manager and VAR_51.manager.id != VAR_3:\n",
"... | [
"def do_cancel(self, cr, uid, ids, *args):...\n",
"request = self.pool.get('res.request')\n",
"tasks = self.browse(cr, uid, ids)\n",
"for task in tasks:\n",
"project = task.project_id\n",
"return True\n",
"if project.warn_manager and project.manager and project.manager.id != uid:\n",
"request.create(c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Expr'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"VAR_23 = self.common.create_volume_from_snapshot(VAR_7, VAR_9)\n",
"self.common.client_logout()\n",
"return {'metadata': VAR_23}\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"metadata = self.common.create_volume_from_snapshot(volume, snapshot)\n",
"self.common.client_logout()\n",
"return {'metadata': metadata}\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_7():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_10['env'] = self.env\n",
"VAR_10['config'] = self.env.config\n",
"VAR_10['params'] = self.params\n",
"return VAR_10\n"
] | [
"def get_vars():...\n",
"\"\"\"docstring\"\"\"\n",
"template_vars['env'] = self.env\n",
"template_vars['config'] = self.env.config\n",
"template_vars['params'] = self.params\n",
"return template_vars\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_8(VAR_4, VAR_8):...\n",
"return HttpResponse(VAR_8)\n"
] | [
"def testPath(request, path):...\n",
"return HttpResponse(path)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_6(self, VAR_26):...\n",
"if VAR_26:\n",
"VAR_106 = int(VAR_26, 36)\n",
"abort(404, 'page not found')\n",
"return Message._byID(VAR_106, True)\n"
] | [
"def run(self, message_id):...\n",
"if message_id:\n",
"aid = int(message_id, 36)\n",
"abort(404, 'page not found')\n",
"return Message._byID(aid, True)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_15(VAR_24):...\n",
"for user, VAR_20, forum in VAR_26.findall(VAR_24):\n",
"if len(forum) > 0:\n",
"FUNC_13(forum)\n",
"VAR_0.info('Removing %s:%s from forums[%s]', user, forum, VAR_20)\n",
"VAR_7[VAR_20].remove((user, forum))\n"
] | [
"def rffu(urls):...\n",
"for user, domain, forum in r_udf.findall(urls):\n",
"if len(forum) > 0:\n",
"get_forum_id(forum)\n",
"logger.info('Removing %s:%s from forums[%s]', user, forum, domain)\n",
"forums[domain].remove((user, forum))\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"For",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"if self.child_branch:\n",
"return '{} ({} {})'.format(self.child.title, self.relative_credits or self.\n child_branch.credits or 0, _('credits'))\n",
"VAR_62 = LearningComponentYear.objects.filter(\n learningunitcomponent__learning_unit_year=self.child_leaf).annotate(total\n =Case(... | [
"@property...\n",
"if self.child_branch:\n",
"return '{} ({} {})'.format(self.child.title, self.relative_credits or self.\n child_branch.credits or 0, _('credits'))\n",
"components = LearningComponentYear.objects.filter(\n learningunitcomponent__learning_unit_year=self.child_leaf).annotate(total\n =C... | [
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(VAR_1):...\n",
"import datetime\n",
"if isinstance(VAR_1, datetime.datetime):\n",
"return datetime.datetime.strftime(VAR_1, '%Y-%m-%d %H:%M:%S')\n"
] | [
"def default(obj):...\n",
"import datetime\n",
"if isinstance(obj, datetime.datetime):\n",
"return datetime.datetime.strftime(obj, '%Y-%m-%d %H:%M:%S')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Import'",
"Condition",
"Return'"
] |
[
"def FUNC_7(self, VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"return {}\n"
] | [
"def _get_proxy_options(self, attribute):...\n",
"\"\"\"docstring\"\"\"\n",
"return {}\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"if self._inputsize is None:\n",
"self._inputsize = sum(VAR_28.size for VAR_28 in self.input)\n",
"return self._inputsize\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"if self._inputsize is None:\n",
"self._inputsize = sum(f.size for f in self.input)\n",
"return self._inputsize\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_0(VAR_3):...\n",
"@functools.wraps(VAR_3)...\n",
"VAR_23 = VAR_5.pop('timeout', None)\n",
"VAR_24 = eventlet.spawn(VAR_3, self, *VAR_4, **kwargs)\n",
"if VAR_23 is None:\n",
"return VAR_24.wait()\n",
"VAR_36 = eventlet.spawn_after(VAR_23, VAR_24.kill)\n",
"VAR_48 = VAR_24.wait()\n",
"VAR_3... | [
"def with_timeout(f):...\n",
"@functools.wraps(f)...\n",
"timeout = kwargs.pop('timeout', None)\n",
"gt = eventlet.spawn(f, self, *args, **kwargs)\n",
"if timeout is None:\n",
"return gt.wait()\n",
"kill_thread = eventlet.spawn_after(timeout, gt.kill)\n",
"res = gt.wait()\n",
"kill_thread.cancel()\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_5(self, VAR_2):...\n",
""
] | [
"def cut(self, key):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_13(self, VAR_64):...\n",
"self._onsuccess = VAR_64\n"
] | [
"def onsuccess(self, func):...\n",
"self._onsuccess = func\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"@staticmethod...\n",
"VAR_31 = users.get_current_user()\n",
"return CLASS_4(VAR_31.user_id(), VAR_31.email(), None) if VAR_31 else None\n"
] | [
"@staticmethod...\n",
"user = users.get_current_user()\n",
"return CurrentUser(user.user_id(), user.email(), None) if user else None\n"
] | [
0,
0,
0
] | [
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_4(**VAR_4):...\n",
"return VAR_5()\n"
] | [
"def on_missing(**kwargs):...\n",
"return factory()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_25(VAR_10):...\n",
"self.events_requests.remove(VAR_9)\n"
] | [
"def on_request_finished(_):...\n",
"self.events_requests.remove(request)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_10(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for et in ExtractedText.objects.all():\n",
"VAR_13 = et.data_document\n",
"VAR_14, VAR_15 = create_detail_formset(VAR_13)\n",
"VAR_17 = VAR_15(instance=et)\n",
"for form in VAR_17.forms:\n",
"if VAR_13.data_group.type in ['CO', 'UN']:\n",
"VAR_2... | [
"def test_curated_chemical(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for et in ExtractedText.objects.all():\n",
"dd = et.data_document\n",
"ParentForm, ChildForm = create_detail_formset(dd)\n",
"child_formset = ChildForm(instance=et)\n",
"for form in child_formset.forms:\n",
"if dd.data_group.type in ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"CLASS_0.ScenarioMaker().when_call_get_email_confirmation(\n ).then_response_should_be_a_redirect_to_app_deeplink_with_params()\n"
] | [
"def test_when_called_redirect_view_redirects_to_apps_url(self):...\n",
"RedirectConfirmEmailTestCase.ScenarioMaker().when_call_get_email_confirmation(\n ).then_response_should_be_a_redirect_to_app_deeplink_with_params()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, VAR_10):...\n",
"super(CLASS_0, self).__init__()\n",
"self.bot = TelegramHigh(VAR_10)\n",
"self.userparams = UserParams('users', initial=INITIAL_SUBSCRIBER_PARAMS)\n",
"self.file_db = FileDB('files')\n",
"self.updateFileListThread()\n",
"self.files = []\n",
"self.bot.start(processi... | [
"def __init__(self, token):...\n",
"super(MainPicSender, self).__init__()\n",
"self.bot = TelegramHigh(token)\n",
"self.userparams = UserParams('users', initial=INITIAL_SUBSCRIBER_PARAMS)\n",
"self.file_db = FileDB('files')\n",
"self.updateFileListThread()\n",
"self.files = []\n",
"self.bot.start(proc... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_37(self, VAR_40):...\n",
"\"\"\"docstring\"\"\"\n",
"self.set_name(VAR_40, len(self) - 1)\n"
] | [
"def add_name(self, name):...\n",
"\"\"\"docstring\"\"\"\n",
"self.set_name(name, len(self) - 1)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_35(self, VAR_16='password', VAR_19=True):...\n",
"if self.get(VAR_16) and not self.is_dummy_password(self.get(VAR_16)):\n",
"return self.get(VAR_16)\n",
"return get_decrypted_password(self.doctype, self.name, VAR_16, VAR_19=\n raise_exception)\n"
] | [
"def get_password(self, fieldname='password', raise_exception=True):...\n",
"if self.get(fieldname) and not self.is_dummy_password(self.get(fieldname)):\n",
"return self.get(fieldname)\n",
"return get_decrypted_password(self.doctype, self.name, fieldname,\n raise_exception=raise_exception)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def __init__(self, VAR_7=True, VAR_8=False):...\n",
"\"\"\"docstring\"\"\"\n",
"super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n",
"self.register('type', 'bool', FUNC_0)\n",
"self.register('type', 'class', FUNC_1)\n",
"self.parlai_home = VAR_20.path.di... | [
"def __init__(self, add_parlai_args=True, add_model_args=False):...\n",
"\"\"\"docstring\"\"\"\n",
"super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n",
"self.register('type', 'bool', str2bool)\n",
"self.register('type', 'class', str2class)\n",
"self.parl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_33(self):...\n",
"return getattr(self, '_update_%s' % self.target_field, None)\n"
] | [
"def get_update_action(self):...\n",
"return getattr(self, '_update_%s' % self.target_field, None)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_2(VAR_4):...\n",
"from datetime import datetime\n",
"from pytz import timezone\n",
"import sql\n",
"VAR_20 = datetime.now(timezone(sql.get_setting('time_zone')))\n",
"if VAR_4 == 'config':\n",
"VAR_66 = '%Y-%m-%d.%H:%M:%S'\n",
"if VAR_4 == 'logs':\n",
"VAR_66 = '%Y%m%d'\n",
"if VAR_4 == ... | [
"def get_data(type):...\n",
"from datetime import datetime\n",
"from pytz import timezone\n",
"import sql\n",
"now_utc = datetime.now(timezone(sql.get_setting('time_zone')))\n",
"if type == 'config':\n",
"fmt = '%Y-%m-%d.%H:%M:%S'\n",
"if type == 'logs':\n",
"fmt = '%Y%m%d'\n",
"if type == 'date_i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"@mock.patch('requests.post', FUNC_0)...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_4 = '/api/apps'\n",
"VAR_5 = self.client.post(VAR_4)\n",
"self.assertEqual(VAR_5.status_code, 201)\n",
"VAR_6 = VAR_5.data['id']\n",
"VAR_4 = '/api/apps/{app_id}/config'.format(**locals())\n",
"VAR_7 = {'values': json.dumps({... | [
"@mock.patch('requests.post', mock_import_repository_task)...\n",
"\"\"\"docstring\"\"\"\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"url = '/api/apps/{app_id}/config'.format(**locals())\n",
"body =... | [
0,
0,
0,
5,
0,
0,
0,
0,
5,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
5,
5,
5,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"... |
[
"\"\"\"Handlers for customizing oauthclient endpoints.\"\"\"\n",
"import six\n",
"from flask import current_app, flash, redirect, render_template, request, session, url_for\n",
"from flask.ext.login import current_user\n",
"from functools import partial, wraps\n",
"from werkzeug.utils import import_string... | [
"\"\"\"Handlers for customizing oauthclient endpoints.\"\"\"\n",
"import six\n",
"from flask import current_app, flash, redirect, render_template, request, session, url_for\n",
"from flask.ext.login import current_user\n",
"from functools import partial, wraps\n",
"from werkzeug.utils import import_string... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"import subprocess\n",
"from .poller import PollInput, PollResult, Poller\n",
"def __init__(self, VAR_0=None, VAR_1=None):...\n",
"super(CLASS_0, self).__init__(VAR_0, VAR_1)\n",
"def __init__(self, VAR_2, VAR_3=None):...\n",
"super(CLASS_1, self).__init__(VAR_3)\n",
"self.authenticated = VAR_2\n",
"d... | [
"import subprocess\n",
"from .poller import PollInput, PollResult, Poller\n",
"def __init__(self, server=None, port=None):...\n",
"super(RdpPollInput, self).__init__(server, port)\n",
"def __init__(self, authenticated, exceptions=None):...\n",
"super(RdpPollResult, self).__init__(exceptions)\n",
"self.a... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0,
2,
2,
2,
2,
2,
2,
0,
2,
2,
0,
2,
0
] | [
"Import'",
"ImportFrom'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'",
... |
[
"def __init__(self, VAR_24=None, VAR_31=False, VAR_32=False):...\n",
"self.kill_mode = VAR_31\n",
"self.check_mode = VAR_32\n",
"self.logger = logging.getLogger(__name__)\n",
"self.logger.setLevel(logging.DEBUG)\n",
"self.config = None\n",
"self.session = None\n",
"if VAR_31:\n",
"self.logger.info('... | [
"def __init__(self, configfile=None, kill_mode=False, check_mode=False):...\n",
"self.kill_mode = kill_mode\n",
"self.check_mode = check_mode\n",
"self.logger = logging.getLogger(__name__)\n",
"self.logger.setLevel(logging.DEBUG)\n",
"self.config = None\n",
"self.session = None\n",
"if kill_mode:\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
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign... |
[
"import sys\n",
"import urllib\n",
"import urllib.request\n",
"VAR_0 = None\n",
"for carg in sys.argv:\n",
"if carg == '-w':\n",
"if VAR_0 is None:\n",
"VAR_5 = sys.argv.index(carg)\n",
"sys.exit('[ERROR] You have to pass the URI to test to the -w parameter !')\n",
"VAR_1 = VAR_0 + \"1'%20or%20'1'... | [
"import sys\n",
"import urllib\n",
"import urllib.request\n",
"uri = None\n",
"for carg in sys.argv:\n",
"if carg == '-w':\n",
"if uri is None:\n",
"arg_num = sys.argv.index(carg)\n",
"sys.exit('[ERROR] You have to pass the URI to test to the -w parameter !')\n",
"injected_url = uri + \"1'%20or%20... | [
0,
0,
0,
0,
4,
4,
0,
4,
0,
4,
4,
4,
4,
0,
4,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Assign'",
"For",
"Condition",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"AugAssign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_4(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def _prepare(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_9(VAR_8, VAR_11, VAR_12=False, VAR_13=False, VAR_14=None, VAR_15=False...\n",
"def FUNC_35(VAR_29):...\n",
"VAR_40 = VAR_29.group('name')\n",
"VAR_16 = VAR_11[VAR_40]\n",
"if VAR_15:\n",
"return re.sub(VAR_5, FUNC_35, VAR_8)\n",
"if VAR_13 and VAR_16 == VAR_14:\n",
"return '{{{}}}'.format(VA... | [
"def apply_wildcards(pattern, wildcards, fill_missing=False, fail_dynamic=...\n",
"def format_match(match):...\n",
"name = match.group('name')\n",
"value = wildcards[name]\n",
"if keep_dynamic:\n",
"return re.sub(_wildcard_regex, format_match, pattern)\n",
"if fail_dynamic and value == dynamic_fill:\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_6(self, VAR_51):...\n",
"VAR_81 = VAR_51\n",
"VAR_51 = FUNC_3(VAR_51)\n",
"if not VAR_51:\n",
"return self.error(FUNC_4(VAR_81))\n",
"VAR_15 = Account._by_name(VAR_51, True)\n",
"return VAR_51\n",
"return self.error(errors.USERNAME_TAKEN)\n"
] | [
"def run(self, user_name):...\n",
"original_user_name = user_name\n",
"user_name = chkuser(user_name)\n",
"if not user_name:\n",
"return self.error(whyuserbad(original_user_name))\n",
"a = Account._by_name(user_name, True)\n",
"return user_name\n",
"return self.error(errors.USERNAME_TAKEN)\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Return'",
"Return'"
] |
[
"def FUNC_12(self, VAR_11):...\n",
"self.get(VAR_11.parentfield).remove(VAR_11)\n"
] | [
"def remove(self, doc):...\n",
"self.get(doc.parentfield).remove(doc)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_26(VAR_8):...\n",
"api.reset_local_state()\n",
"return VAR_7.get('/request', extra_environ={'REMOTE_ADDR': ip}).body\n"
] | [
"def call(ip):...\n",
"api.reset_local_state()\n",
"return app.get('/request', extra_environ={'REMOTE_ADDR': ip}).body\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"def FUNC_22(VAR_18, VAR_31, VAR_30=60):...\n",
"VAR_50 = re.compile('Compiling\\\\.\\\\.\\\\.|Evaluating\\\\.\\\\.\\\\.')\n",
"VAR_51 = re.compile('Compilation failed|Evaluated')\n",
"VAR_34 = FUNC_0()\n",
"VAR_52 = 0.1\n",
"while VAR_30 > 0:\n",
"VAR_30 -= VAR_52\n",
"VAR_49 = AWSUserTestViewRequest... | [
"def get_user_test_result(contest_id, user_test_id, timeout=60):...\n",
"WAITING_STATUSES = re.compile('Compiling\\\\.\\\\.\\\\.|Evaluating\\\\.\\\\.\\\\.')\n",
"COMPLETED_STATUS = re.compile('Compilation failed|Evaluated')\n",
"browser = get_aws_browser()\n",
"sleep_interval = 0.1\n",
"while timeout > 0:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"AugAssign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Expr'"
] |
[
"def FUNC_12(self, VAR_1, VAR_62=False, VAR_63=False, VAR_4=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if not urllib.parse.urlparse(VAR_1).scheme:\n",
"if not os.path.isabs(VAR_1) and self.included_stack:\n",
"if VAR_1 in self.included:\n",
"VAR_108 = os.path.dirname(self.included_stack[-1])\n",
"VAR_1 =... | [
"def include(self, snakefile, overwrite_first_rule=False, print_compilation=...\n",
"\"\"\"docstring\"\"\"\n",
"if not urllib.parse.urlparse(snakefile).scheme:\n",
"if not os.path.isabs(snakefile) and self.included_stack:\n",
"if snakefile in self.included:\n",
"current_path = os.path.dirname(self.include... | [
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",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_13(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.assertEqual(tournament.check_version((2, 9)), 0)\n"
] | [
"def test_newer_python_version(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.assertEqual(tournament.check_version((2, 9)), 0)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_28(self, VAR_5):...\n",
"if not self._user_options['seed_identifiers_with_syntax']:\n",
"return\n",
"VAR_18 = vimsupport.CurrentFiletypes()[0]\n",
"if VAR_18 in self._filetypes_with_keywords_loaded:\n",
"return\n",
"self._filetypes_with_keywords_loaded.add(VAR_18)\n",
"VAR_5['syntax_keywords... | [
"def _AddSyntaxDataIfNeeded(self, extra_data):...\n",
"if not self._user_options['seed_identifiers_with_syntax']:\n",
"return\n",
"filetype = vimsupport.CurrentFiletypes()[0]\n",
"if filetype in self._filetypes_with_keywords_loaded:\n",
"return\n",
"self._filetypes_with_keywords_loaded.add(filetype)\n",... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Return'",
"Expr'",
"Assign'"
] |
[
"import subprocess\n",
"import shlex\n",
"import os\n",
"import signal\n",
"from helper import path_dict, path_number_of_files, pdf_stats, pdf_date_format_to_datetime\n",
"import json\n",
"from functools import wraps\n",
"from urllib.parse import urlparse\n",
"from flask import Flask, render_templat... | [
"import subprocess\n",
"import shlex\n",
"import os\n",
"import signal\n",
"from helper import path_dict, path_number_of_files, pdf_stats, pdf_date_format_to_datetime\n",
"import json\n",
"from functools import wraps\n",
"from urllib.parse import urlparse\n",
"from flask import Flask, render_templat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"A... |
[
"def FUNC_13(VAR_6):...\n",
"if VAR_6.encoding is None:\n",
"return False\n",
"if VAR_6.encoding.upper() in ('UTF-8', 'ISO-8859-1'):\n",
"return True\n",
"return False\n"
] | [
"def validate_encoding(page):...\n",
"if page.encoding is None:\n",
"return False\n",
"if page.encoding.upper() in ('UTF-8', 'ISO-8859-1'):\n",
"return True\n",
"return False\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_1(self, VAR_21, VAR_22):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_55 = VAR_21.rstrip('/').split('/')\n",
"if VAR_21[0] == '/':\n",
"VAR_22 = []\n",
"VAR_22 = [x for x in VAR_22.split('/') if len(x) and x is not None]\n",
"while 1:\n",
"if not len(VAR_55):\n",
"VAR_66 = VAR_55.pop(0)\n",
"r... | [
"def resolve_path(self, path, cwd):...\n",
"\"\"\"docstring\"\"\"\n",
"pieces = path.rstrip('/').split('/')\n",
"if path[0] == '/':\n",
"cwd = []\n",
"cwd = [x for x in cwd.split('/') if len(x) and x is not None]\n",
"while 1:\n",
"if not len(pieces):\n",
"piece = pieces.pop(0)\n",
"return '/%s' %... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Return'",
"Condition",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_14(self, VAR_10=None, VAR_14=None, VAR_16=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self.add_extra_args(VAR_10)\n",
"self.args = super().parse_args(VAR_10=args)\n",
"self.opt = vars(self.args)\n",
"self.opt['parlai_home'] = self.parlai_home\n",
"if 'batchsize' in self.opt and self.opt['batchsi... | [
"def parse_args(self, args=None, namespace=None, print_args=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self.add_extra_args(args)\n",
"self.args = super().parse_args(args=args)\n",
"self.opt = vars(self.args)\n",
"self.opt['parlai_home'] = self.parlai_home\n",
"if 'batchsize' in self.opt and self.opt['bat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"For",
"For",
"Condition",
"Co... |
[
"def FUNC_11(self, VAR_2):...\n",
"VAR_12 = Client()\n",
"self.response = VAR_12.get(reverse('experience-redirect', args=[share_id]))\n",
"return self\n"
] | [
"def when_call_experience_redirect(self, share_id):...\n",
"client = Client()\n",
"self.response = client.get(reverse('experience-redirect', args=[share_id]))\n",
"return self\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_12(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'LOW': 7}, 'CONFIDENCE': {'MEDIUM': 7}}\n",
"self.check_example('hardcoded-passwords.py', VAR_2)\n"
] | [
"def test_hardcoded_passwords(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'LOW': 7}, 'CONFIDENCE': {'MEDIUM': 7}}\n",
"self.check_example('hardcoded-passwords.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self):...\n",
"if len(self.data) == 0:\n",
"return None\n",
"return self.data.pop(len(self.data) - 1)\n"
] | [
"def pop(self):...\n",
"if len(self.data) == 0:\n",
"return None\n",
"return self.data.pop(len(self.data) - 1)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_0(VAR_1: HttpRequest):...\n",
""
] | [
"def action_change_user_avatar(request: HttpRequest):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_2(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1.value = beamr.interpreters.Stretch(VAR_1.value[1] + VAR_1.value[-2],\n VAR_1.value[2:-2])\n",
"return VAR_1\n"
] | [
"def t_STRETCH2(t):...\n",
"\"\"\"docstring\"\"\"\n",
"t.value = beamr.interpreters.Stretch(t.value[1] + t.value[-2], t.value[2:-2])\n",
"return t\n"
] | [
0,
0,
2,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"@VAR_0.route('/import')...\n",
"return render_template('import.html')\n"
] | [
"@app.route('/import')...\n",
"return render_template('import.html')\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def __repr__(self):...\n",
"return 'PathDict(' + repr(dict(self)) + ')'\n"
] | [
"def __repr__(self):...\n",
"return 'PathDict(' + repr(dict(self)) + ')'\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"from jupyter_core.paths import jupyter_data_dir\n",
"import subprocess\n",
"import os\n",
"VAR_0 = os.path.join(jupyter_data_dir(), 'notebook.pem')\n",
"VAR_1 = get_config()\n",
"VAR_1.NotebookApp.ip = os.getenv('INTERFACE', '') or '*'\n",
"VAR_1.NotebookApp.port = int(os.getenv('PORT', '') or 8888)\n"... | [
"from jupyter_core.paths import jupyter_data_dir\n",
"import subprocess\n",
"import os\n",
"PEM_FILE = os.path.join(jupyter_data_dir(), 'notebook.pem')\n",
"c = get_config()\n",
"c.NotebookApp.ip = os.getenv('INTERFACE', '') or '*'\n",
"c.NotebookApp.port = int(os.getenv('PORT', '') or 8888)\n",
"c.No... | [
5,
5,
0,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
] | [
"ImportFrom'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Expr'",
"Assign'",
"ImportFrom'",
"Assign'"
] |
[
"@FUNC_2...\n",
"VAR_31 = self.decode_link_ticket()\n",
"VAR_32 = True\n",
"VAR_33 = None\n",
"replication.become_replica(VAR_31, api.get_current_identity())\n",
"VAR_32 = False\n",
"VAR_15 = {'error_msg': VAR_33, 'page_title': 'Switch', 'primary_id': VAR_31\n .primary_id, 'primary_url': VAR_31.prima... | [
"@forbid_ui_on_replica...\n",
"ticket = self.decode_link_ticket()\n",
"success = True\n",
"error_msg = None\n",
"replication.become_replica(ticket, api.get_current_identity())\n",
"success = False\n",
"env = {'error_msg': error_msg, 'page_title': 'Switch', 'primary_id': ticket\n .primary_id, 'primary... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1(VAR_0):...\n",
"VAR_0.close()\n"
] | [
"def destroy_connection(conn):...\n",
"conn.close()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __iter__(self):...\n",
"return self.order.__iter__()\n"
] | [
"def __iter__(self):...\n",
"return self.order.__iter__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.task.__acl__()\n"
] | [
"def get_task_line_group_acl(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.task.__acl__()\n"
] | [
0,
0,
1
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def __init__(self, VAR_38):...\n",
"self.nested_columns = CLASS_1.to_columns(VAR_38)\n"
] | [
"def __init__(self, nested_columns):...\n",
"self.nested_columns = Column.to_columns(nested_columns)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_21(self, VAR_68):...\n",
"def FUNC_39(VAR_101):...\n",
"VAR_101.docstring = VAR_68\n",
"return VAR_101\n"
] | [
"def docstring(self, string):...\n",
"def decorate(ruleinfo):...\n",
"ruleinfo.docstring = string\n",
"return ruleinfo\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def __hash__(self):...\n",
"return self._file.__hash__()\n"
] | [
"def __hash__(self):...\n",
"return self._file.__hash__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __hash__(self):...\n",
"return self._file.__hash__()\n"
] | [
"def __hash__(self):...\n",
"return self._file.__hash__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"self._mox.UnsetStubs()\n"
] | [
"def tearDown(self):...\n",
"self._mox.UnsetStubs()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_6(self):...\n",
"if VAR_101.user_is_loggedin and VAR_101.user.safe_karma >= g.discussion_karma_to_post:\n",
"return True\n",
"abort(403, 'forbidden')\n"
] | [
"def run(self):...\n",
"if c.user_is_loggedin and c.user.safe_karma >= g.discussion_karma_to_post:\n",
"return True\n",
"abort(403, 'forbidden')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"self.log_area = QTextEdit()\n",
"self.log_area.setReadOnly(True)\n",
"self.log_queue = queue.Queue()\n",
"self.log_stream = LoggingStream(self.log_queue)\n",
"self.log_thread = LoggingThread(self.log_queue, parent=self)\n",
"self.log_thread.message_received.connect(self.log)\n... | [
"def setup_logging(self):...\n",
"self.log_area = QTextEdit()\n",
"self.log_area.setReadOnly(True)\n",
"self.log_queue = queue.Queue()\n",
"self.log_stream = LoggingStream(self.log_queue)\n",
"self.log_thread = LoggingThread(self.log_queue, parent=self)\n",
"self.log_thread.message_received.connect(self... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"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 FUNC_13(self):...\n",
"return any([FiletypeCompleterExistsForFiletype(x) for x in vimsupport.\n CurrentFiletypes()])\n"
] | [
"def NativeFiletypeCompletionAvailable(self):...\n",
"return any([FiletypeCompleterExistsForFiletype(x) for x in vimsupport.\n CurrentFiletypes()])\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_5(self, VAR_2):...\n",
""
] | [
"def cut(self, key):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_2(self):...\n",
"return self.redirect(VAR_0)\n"
] | [
"def get(self):...\n",
"return self.redirect(README_MD)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_46(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'LOW': 1, 'HIGH': 4}, 'CONFIDENCE': {'HIGH': 1,\n 'MEDIUM': 4}}\n",
"self.check_example('xml_etree_celementtree.py', VAR_2)\n",
"VAR_2 = {'SEVERITY': {'LOW': 1, 'HIGH': 2}, 'CONFIDENCE': {'HIGH': 1,\n 'MEDIUM': 2}}\n",
"sel... | [
"def test_xml(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'LOW': 1, 'HIGH': 4}, 'CONFIDENCE': {'HIGH': 1,\n 'MEDIUM': 4}}\n",
"self.check_example('xml_etree_celementtree.py', expect)\n",
"expect = {'SEVERITY': {'LOW': 1, 'HIGH': 2}, 'CONFIDENCE': {'HIGH': 1,\n 'MEDIUM': 2}}\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"import argparse\n",
"import glob\n",
"import logging\n",
"import os\n",
"import re\n",
"import requests\n",
"import subprocess\n",
"import sys\n",
"VAR_0 = 'https://bugs.chromium.org/p/oss-fuzz/issues/detail?id='\n",
"VAR_1 = 'https://oss-fuzz.com/download?testcase_id='\n",
"VAR_2 = re.compile(... | [
"import argparse\n",
"import glob\n",
"import logging\n",
"import os\n",
"import re\n",
"import requests\n",
"import subprocess\n",
"import sys\n",
"OSS_FUZZ_BUGURL = 'https://bugs.chromium.org/p/oss-fuzz/issues/detail?id='\n",
"DOWNLOAD_URL = 'https://oss-fuzz.com/download?testcase_id='\n",
"te... | [
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"... |
[
"def FUNC_8(VAR_19):...\n",
"VAR_40 = 'string'\n",
"VAR_50 = pd.read_sql(VAR_40, con=db.engine, params={'n': n})\n",
"return VAR_50\n"
] | [
"def get_task_uplaod_id(n):...\n",
"query = \"\"\"\n SELECT *\n FROM (\n SELECT row_number() over (ORDER By upload_timestamp DESC) as rownumber, *\n FROM upload_log\n ) as foo\n where rownumber = %(n)s\n \"\"\"\n",
"df = pd.read_sql(query, con=db.engine, params={'n': n})\n",
"retu... | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(self):...\n",
"VAR_24 = None, None, None\n",
"for i, step in enumerate(self._r_steps_, 1):\n",
"VAR_31, VAR_3 = step\n",
"return VAR_24\n",
"if VAR_3 != VAR_0:\n",
"VAR_24 = i, VAR_31, VAR_3\n"
] | [
"def _last_found(self):...\n",
"last_found_step = None, None, None\n",
"for i, step in enumerate(self._r_steps_, 1):\n",
"desc, roamer = step\n",
"return last_found_step\n",
"if roamer != MISSING:\n",
"last_found_step = i, desc, roamer\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Assign'"
] |
[
"def FUNC_6(VAR_8, VAR_14, VAR_22, VAR_23, VAR_18):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_20 = FUNC_0()\n",
"if VAR_23:\n",
"if VAR_8.grace_period:\n",
"VAR_37 = VAR_3 if VAR_18 else VAR_2\n",
"return max(VAR_20 - VAR_23 - VAR_8.grace_period, 0.0)\n",
"return 0.0\n",
"if VAR_8.hard_timeout:\n",
"... | [
"def calc_yield_wait(task_details, start, last_io, timed_out, stdout):...\n",
"\"\"\"docstring\"\"\"\n",
"now = monotonic_time()\n",
"if timed_out:\n",
"if task_details.grace_period:\n",
"out = MIN_PACKET_INTERNAL if stdout else MAX_PACKET_INTERVAL\n",
"return max(now - timed_out - task_details.grace_pe... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Return'",
"Return'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __init__(self, *VAR_10, **VAR_11):...\n",
"super().__init__(*VAR_10, **kwargs)\n",
"for f in list(self.fields.keys()):\n",
"if f != 'name':\n"
] | [
"def __init__(self, *args, **kwargs):...\n",
"super().__init__(*args, **kwargs)\n",
"for f in list(self.fields.keys()):\n",
"if f != 'name':\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"For",
"Condition"
] |
[
"def FUNC_0(self, VAR_0):...\n",
"VAR_14 = '/etc/rc.conf'\n",
"VAR_15 = fileutil.read_file(VAR_14).split('\\n')\n",
"textutil.set_ini_config(VAR_15, 'hostname', VAR_0)\n",
"fileutil.write_file(VAR_14, '\\n'.join(VAR_15))\n",
"shellutil.run('hostname {0}'.format(VAR_0), VAR_10=False)\n"
] | [
"def set_hostname(self, hostname):...\n",
"rc_file_path = '/etc/rc.conf'\n",
"conf_file = fileutil.read_file(rc_file_path).split('\\n')\n",
"textutil.set_ini_config(conf_file, 'hostname', hostname)\n",
"fileutil.write_file(rc_file_path, '\\n'.join(conf_file))\n",
"shellutil.run('hostname {0}'.format(hostn... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_32(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'LOW': 6}, 'CONFIDENCE': {'HIGH': 6}}\n",
"self.check_example('random_module.py', VAR_2)\n"
] | [
"def test_random_module(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'LOW': 6}, 'CONFIDENCE': {'HIGH': 6}}\n",
"self.check_example('random_module.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.