lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"\"\"\"string\"\"\"\n",
"import copy\n",
"from flask import current_app, session\n",
"from flask.ext.login import current_user\n",
"from invenio.ext.sqlalchemy.utils import session_manager\n",
"VAR_0 = dict(title='ORCID', description=\n 'Connecting Research and Researchers.', icon='', authorized_handle... | [
"\"\"\"Pre-configured remote application for enabling sign in/up with ORCID.\n\n**Usage:**\n\n1. Edit your configuration and add:\n\n .. code-block:: python\n\n from invenio.modules.oauthclient.contrib import orcid\n OAUTHCLIENT_REMOTE_APPS = dict(\n orcid=orcid.REMOTE_APP,\n )\n\n ... | [
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"from __future__ import absolute_import, division, print_function\n",
"__metaclass__ = type\n",
"from ansible.inventory.group import Group\n",
"from ansible.utils.vars import combine_vars, get_unique_id\n",
"__all__ = ['Host']\n",
"\"\"\" a single ansible host \"\"\"\n",
"def __getstate__(self):...\n",
... | [
"from __future__ import absolute_import, division, print_function\n",
"__metaclass__ = type\n",
"from ansible.inventory.group import Group\n",
"from ansible.utils.vars import combine_vars, get_unique_id\n",
"__all__ = ['Host']\n",
"\"\"\" a single ansible host \"\"\"\n",
"def __getstate__(self):...\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"Assign'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_19(VAR_27):...\n",
"if isinstance(VAR_27, bytes):\n",
"return VAR_27\n",
"return VAR_27.encode('utf-8', 'replace')\n"
] | [
"def force_bytes(s):...\n",
"if isinstance(s, bytes):\n",
"return s\n",
"return s.encode('utf-8', 'replace')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_7(VAR_9, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = HttpRequest()\n",
"VAR_3.method = 'GET'\n",
"VAR_3.session = VAR_10\n",
"VAR_26, VAR_27, VAR_28 = resolve(VAR_9)\n",
"VAR_29 = VAR_26(VAR_3, *VAR_27, **kwargs)\n",
"return VAR_29.content\n"
] | [
"def _local_server_get(url, session):...\n",
"\"\"\"docstring\"\"\"\n",
"request = HttpRequest()\n",
"request.method = 'GET'\n",
"request.session = session\n",
"view, args, kwargs = resolve(url)\n",
"response = view(request, *args, **kwargs)\n",
"return response.content\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_32(*VAR_26):...\n",
""
] | [
"def mocked_check(*_args):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def __init__(self, VAR_3, VAR_4):...\n",
"self.tok = VAR_3\n",
"self.txt = VAR_4\n"
] | [
"def __init__(self, tok, txt):...\n",
"self.tok = tok\n",
"self.txt = txt\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"def FUNC_1(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1.value = beamr.interpreters.Stretch(VAR_1.value[1])\n",
"return VAR_1\n"
] | [
"def t_STRETCH1(t):...\n",
"\"\"\"docstring\"\"\"\n",
"t.value = beamr.interpreters.Stretch(t.value[1])\n",
"return t\n"
] | [
0,
0,
2,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"@VAR_0.route('/edituser/<int:id>', methods=('GET', 'POST'))...\n",
"VAR_15 = get_user(VAR_4)\n",
"if request.method == 'POST':\n",
"VAR_18 = request.form['username']\n",
"return render_template('admin/edituser.html', VAR_15=user)\n",
"VAR_19 = request.form['desc']\n",
"VAR_20 = request.form['role']\n",... | [
"@bp.route('/edituser/<int:id>', methods=('GET', 'POST'))...\n",
"user = get_user(id)\n",
"if request.method == 'POST':\n",
"username = request.form['username']\n",
"return render_template('admin/edituser.html', user=user)\n",
"desc = request.form['desc']\n",
"role = request.form['role']\n",
"adminPwd... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Condition"... |
[
"def FUNC_6(self, VAR_33):...\n",
"VAR_33 = CLASS_17.run(self, VAR_33)\n",
"if VAR_33 == None:\n",
"return ''\n",
"return VAR_33\n"
] | [
"def run(self, val):...\n",
"val = VLength.run(self, val)\n",
"if val == None:\n",
"return ''\n",
"return val\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"@app.route('/api/server/devices', methods=['GET'])...\n",
"return [x.to_map() for x in controller.indi_server.devices()]\n"
] | [
"@app.route('/api/server/devices', methods=['GET'])...\n",
"return [x.to_map() for x in controller.indi_server.devices()]\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_9(self, VAR_21, VAR_27, VAR_28, VAR_29, VAR_30, VAR_31=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.newcount > 10000:\n",
"return False\n",
"if VAR_31 is None:\n",
"VAR_31 = time.time()\n",
"VAR_58 = self.get_path(os.path.dirname(VAR_21))\n",
"VAR_59 = os.path.basename(VAR_21)\n",
"if... | [
"def mkfile(self, path, uid, gid, size, mode, ctime=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.newcount > 10000:\n",
"return False\n",
"if ctime is None:\n",
"ctime = time.time()\n",
"dir = self.get_path(os.path.dirname(path))\n",
"outfile = os.path.basename(path)\n",
"if outfile in [x[A_NAME... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"AugAssign'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"VAR_7 = engine.connect()\n",
"VAR_8 = VAR_7.begin()\n",
"VAR_9 = text(\n 'INSERT INTO users(username, hashed_password, roll_id) VALUES(:username, :hashed_password, :roll_id)'\n )\n",
"VAR_8.rollback()\n",
"VAR_7.close()\n",
"VAR_7.execute(VAR_9, VAR_1=self.username, VAR_... | [
"def save(self):...\n",
"connection = engine.connect()\n",
"trans = connection.begin()\n",
"s = text(\n 'INSERT INTO users(username, hashed_password, roll_id) VALUES(:username, :hashed_password, :roll_id)'\n )\n",
"trans.rollback()\n",
"connection.close()\n",
"connection.execute(s, username=self.u... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@app.route('/issues/new/', methods=['GET', 'POST'])...\n",
"if request.method == 'GET':\n",
"VAR_4 = IssueForm()\n",
"if not current_user.editor:\n",
"return render_template('/issues/new.html', VAR_4=form)\n",
"return redirect(url_for('error401'))\n",
"VAR_4 = IssueForm(request.form)\n",
"if not VAR_... | [
"@app.route('/issues/new/', methods=['GET', 'POST'])...\n",
"if request.method == 'GET':\n",
"form = IssueForm()\n",
"if not current_user.editor:\n",
"return render_template('/issues/new.html', form=form)\n",
"return redirect(url_for('error401'))\n",
"form = IssueForm(request.form)\n",
"if not form.va... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Assign'",
"Condition",
"Return'",
"Return'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"\"\"\"docstring\"\"\"\n",
"import geopandas as gpd\n",
"import numpy as np\n",
"VAR_48 = gpd.read_file(self.subdomains_fn)\n",
"VAR_49 = VAR_48.groupby(self.id_field)\n",
"VAR_28 = self.rasterio_raster.height, self.rasterio_raster.width\n",
"VAR_29 = self.rasterio_raster.aff... | [
"def _rasterize_subdomains(self):...\n",
"\"\"\"docstring\"\"\"\n",
"import geopandas as gpd\n",
"import numpy as np\n",
"gdf = gpd.read_file(self.subdomains_fn)\n",
"id_groups = gdf.groupby(self.id_field)\n",
"out_shape = self.rasterio_raster.height, self.rasterio_raster.width\n",
"out_transform = se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_8(VAR_24):...\n",
"return binary_to_object_id(VAR_24).redis_shard_hash() % len(self.state.\n redis_clients)\n"
] | [
"def to_shard_index(id_bin):...\n",
"return binary_to_object_id(id_bin).redis_shard_hash() % len(self.state.\n redis_clients)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_8(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.execute('string')\n",
"self.execute('PRAGMA user_version = 2;')\n"
] | [
"def create_history_db(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.execute(\n \"\"\"\n CREATE TABLE \"history\" (\n \"id\" INTEGER PRIMARY KEY,\n \"completed\" INTEGER NOT NULL,\n \"name\" TEXT NOT NULL,\n \"nzb_name\" TEXT NOT NULL,\n \"catego... | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(self, VAR_4, VAR_5, VAR_7=True):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5['output'] = 'XML'\n",
"VAR_16, VAR_17 = self._cliq_run(VAR_4, VAR_5, VAR_7)\n",
"VAR_0.debug(_('CLIQ command returned %s'), VAR_16)\n",
"VAR_18 = etree.fromstring(VAR_16)\n",
"if VAR_7:\n",
"VAR_41 = VAR_18.find('res... | [
"def _cliq_run_xml(self, verb, cliq_args, check_cliq_result=True):...\n",
"\"\"\"docstring\"\"\"\n",
"cliq_args['output'] = 'XML'\n",
"out, _err = self._cliq_run(verb, cliq_args, check_cliq_result)\n",
"LOG.debug(_('CLIQ command returned %s'), out)\n",
"result_xml = etree.fromstring(out)\n",
"if check_c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'"
] |
[
"def FUNC_2(self, VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.__slug_map.get(VAR_3)\n"
] | [
"def get_by_slug(self, entity_slug):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.__slug_map.get(entity_slug)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_10(VAR_16):...\n",
"return isinstance(VAR_16, str) or not isinstance(VAR_16, Iterable)\n"
] | [
"def not_iterable(value):...\n",
"return isinstance(value, str) or not isinstance(value, Iterable)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self):...\n",
"CLASS_0.__init__(self)\n"
] | [
"def __init__(self):...\n",
"BaseLevel.__init__(self)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_0():...\n",
"VAR_1 = f\"\"\"\n SELECT name\n FROM {VAR_0}\n \"\"\"\n",
"VAR_2 = create_connection()\n",
"VAR_2.close()\n",
"VAR_3 = VAR_2.cursor()\n",
"VAR_3.execute(VAR_1)\n",
"return VAR_3.fetchall()\n"
] | [
"def get_departments():...\n",
"sql_query = f\"\"\"\n SELECT name\n FROM {PRODUCTS_TYPES_TABLE}\n \"\"\"\n",
"connection = create_connection()\n",
"connection.close()\n",
"cursor = connection.cursor()\n",
"cursor.execute(sql_query)\n",
"return cursor.fetchall()\n"
] | [
0,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __str__(self):...\n",
"return str(self.title)\n"
] | [
"def __str__(self):...\n",
"return str(self.title)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_24(self, VAR_26, VAR_7, VAR_29, VAR_30, VAR_25):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_41 = {}\n",
"if not VAR_30 is None:\n",
"for VAR_28 in VAR_30:\n",
"VAR_42 = []\n",
"VAR_41[VAR_28.get_id()] = VAR_28\n",
"if not VAR_29 is None:\n",
"for VAR_27 in VAR_29:\n",
"for VAR_28 in itervalu... | [
"def traverse_many(self, path, attribute, source_sequence, target_sequence,...\n",
"\"\"\"docstring\"\"\"\n",
"target_map = {}\n",
"if not target_sequence is None:\n",
"for target in target_sequence:\n",
"src_tgt_pairs = []\n",
"target_map[target.get_id()] = target\n",
"if not source_sequence is None:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
1,
1,
0,
0,
1,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"For",
"Assign'",
"Assign'",
"Condition",
"For",
"For",
"Assign'",
"Condition",
"For",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return import_from_settings('LOGOUT_REDIRECT_URL', '/')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return import_from_settings('LOGOUT_REDIRECT_URL', '/')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_11(self, VAR_0, *VAR_1, **VAR_2):...\n",
"if not VAR_0.user.is_authenticated:\n",
"return invalid_permission_redirect(VAR_0)\n",
"self.request = VAR_0\n",
"self.filter_data = VAR_2.pop('filter_data', {})\n",
"return super().get(self, VAR_0, *VAR_1, **kwargs)\n"
] | [
"def get(self, request, *args, **kwargs):...\n",
"if not request.user.is_authenticated:\n",
"return invalid_permission_redirect(request)\n",
"self.request = request\n",
"self.filter_data = kwargs.pop('filter_data', {})\n",
"return super().get(self, request, *args, **kwargs)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.run_local:\n",
"if not (self.configuration.san_password or self.configuration.san_private_key):\n",
"if not self.configuration.san_ip:\n"
] | [
"def check_for_setup_error(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.run_local:\n",
"if not (self.configuration.san_password or self.configuration.san_private_key):\n",
"if not self.configuration.san_ip:\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Condition"
] |
[
"def FUNC_1(VAR_1):...\n",
"VAR_4 = os.path.dirname(VAR_1)\n",
"VAR_5 = os.path.splitext(os.path.basename(VAR_1))[0]\n",
"VAR_6 = [VAR_5] if VAR_5 != '__init__' else []\n",
"VAR_7 = None\n",
"while VAR_4 != VAR_7 and FUNC_0(VAR_4):\n",
"VAR_7 = os.path.dirname(VAR_4)\n",
"return VAR_4, '.'.join(revers... | [
"def _guess_import_path_and_name(file):...\n",
"current = os.path.dirname(file)\n",
"base = os.path.splitext(os.path.basename(file))[0]\n",
"name = [base] if base != '__init__' else []\n",
"parent = None\n",
"while current != parent and _is_package(current):\n",
"parent = os.path.dirname(current)\n",
... | [
0,
0,
1,
1,
1,
1,
1,
1,
1,
1
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Expr'",
"Assign'"
] |
[
"def FUNC_0(VAR_0: str) ->bytes:...\n",
"\"\"\"docstring\"\"\"\n",
"return subprocess.check_output(VAR_0.split())\n"
] | [
"def get_output(command: str) ->bytes:...\n",
"\"\"\"docstring\"\"\"\n",
"return subprocess.check_output(command.split())\n"
] | [
0,
0,
2
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_4(VAR_7):...\n",
""
] | [
"def run_command(cmd):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@VAR_1.route('/chartdemo', methods=['GET', 'POST'])...\n",
"if request.method == 'GET':\n",
"return render_template('chartdemoForm.html', ipedssectornames=ipedssectornames)\n",
"print(request.form)\n",
"VAR_14 = request.form.getlist('year')\n",
"VAR_15 = request.form.getlist('ipedssectornames')\n",
"VA... | [
"@app.route('/chartdemo', methods=['GET', 'POST'])...\n",
"if request.method == 'GET':\n",
"return render_template('chartdemoForm.html', ipedssectornames=ipedssectornames)\n",
"print(request.form)\n",
"year = request.form.getlist('year')\n",
"ipeds = request.form.getlist('ipedssectornames')\n",
"query =... | [
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"AugAssign'",
"AugAssign'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_11(VAR_5, VAR_7):...\n",
"VAR_29 = None\n",
"VAR_8 = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n",
"VAR_9 = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n",
"VAR_30 = 'https://api.github.com/repos/{}/issues/{}/comments'\n",
"VAR_30 = VAR_30.format(VAR_5['repository'], st... | [
"def create_or_update_comment(data, comment):...\n",
"comment_mode = None\n",
"headers = {'Authorization': 'token ' + os.environ['GITHUB_TOKEN']}\n",
"auth = os.environ['BOT_USERNAME'], os.environ['BOT_PASSWORD']\n",
"query = 'https://api.github.com/repos/{}/issues/{}/comments'\n",
"query = query.format(d... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_18(self, VAR_10, VAR_1=None, VAR_65=None):...\n",
"VAR_100 = CLASS_2(self, VAR_10, VAR_1, VAR_65)\n",
"self._subworkflows[VAR_10] = VAR_100\n",
"self.globals[VAR_10] = VAR_100.target\n"
] | [
"def subworkflow(self, name, snakefile=None, workdir=None):...\n",
"sw = Subworkflow(self, name, snakefile, workdir)\n",
"self._subworkflows[name] = sw\n",
"self.globals[name] = sw.target\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"@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}/builds'.format(**locals())\n",
"VAR_7 = {'image': 'autotest/exa... | [
"@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}/builds'.format(**locals())\n",
"body =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_18(self):...\n",
"VAR_26 = []\n",
"def FUNC_25(VAR_14, VAR_27, VAR_28):...\n",
"VAR_26.append((VAR_14, VAR_27.splitlines()[0], VAR_28))\n",
"self.mock(bot_main, 'post_error_task', FUNC_25)\n",
"def FUNC_24(VAR_25, VAR_23, *VAR_24):...\n",
"if VAR_23 == 'on_after_task':\n",
"VAR_50, VAR_51, V... | [
"def test_run_manifest_exception(self):...\n",
"posted = []\n",
"def post_error_task(botobj, msg, task_id):...\n",
"posted.append((botobj, msg.splitlines()[0], task_id))\n",
"self.mock(bot_main, 'post_error_task', post_error_task)\n",
"def call_hook(_botobj, name, *args):...\n",
"if name == 'on_after_ta... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Expr'",
"Expr'",
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"import sqlite3\n",
"def __init__(self, VAR_0):...\n",
"self.cursor = VAR_0\n",
"self.rides = []\n",
"def FUNC_0(self, VAR_1):...\n",
"VAR_6 = 'string'.format(VAR_1=driver)\n",
"self.cursor.execute(VAR_6)\n",
"self.rides = self.cursor.fetchall()\n",
"def FUNC_1(self, VAR_2):...\n",
"VAR_7 = self.r... | [
"import sqlite3\n",
"def __init__(self, cursor):...\n",
"self.cursor = cursor\n",
"self.rides = []\n",
"def find_rides(self, driver):...\n",
"query = (\n \"\"\"\n SELECT r.rno, r.price, r.rdate, r.seats, r.lugDesc, r.src, r.dst, r.driver, r.cno, r.seats-COUNT(b.bno) \n FROM rides r, booki... | [
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"FunctionDef'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"FunctionDef'",
"Assign'",
"For",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Assign... |
[
"def FUNC_4(self, VAR_2):...\n",
"VAR_2.deliverBody(CLASS_0(self.messages_to_wait_for, self.events_deferred,\n VAR_2))\n"
] | [
"def on_event_socket_opened(self, response):...\n",
"response.deliverBody(EventDataProtocol(self.messages_to_wait_for, self.\n events_deferred, response))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_14(self):...\n",
"return self.CurrentFiletypeCompletionEnabled(\n ) and self.NativeFiletypeCompletionAvailable()\n"
] | [
"def NativeFiletypeCompletionUsable(self):...\n",
"return self.CurrentFiletypeCompletionEnabled(\n ) and self.NativeFiletypeCompletionAvailable()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"import sys\n",
"import logging\n",
"import sqlalchemy as sa\n",
"from . import filters\n",
"from sqlalchemy.orm import joinedload\n",
"from sqlalchemy.exc import IntegrityError\n",
"from sqlalchemy import func\n",
"from sqlalchemy.orm.properties import SynonymProperty\n",
"from ..base import BaseIn... | [
"import sys\n",
"import logging\n",
"import sqlalchemy as sa\n",
"from . import filters\n",
"from sqlalchemy.orm import joinedload\n",
"from sqlalchemy.exc import IntegrityError\n",
"from sqlalchemy import func\n",
"from sqlalchemy.orm.properties import SynonymProperty\n",
"from ..base import BaseIn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"FunctionDef'",
"For",
"Condition",
"Expr'",
"Expr'",
"Assign'",
... |
[
"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_7(VAR_6, VAR_7, VAR_8):...\n",
"if VAR_7 not in VAR_6.headers:\n",
"return False\n",
"if VAR_6.headers[VAR_7] == VAR_8:\n",
"return True\n",
"return False\n"
] | [
"def validate_security_header(page, header, expected_value):...\n",
"if header not in page.headers:\n",
"return False\n",
"if page.headers[header] == expected_value:\n",
"return True\n",
"return False\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_27(VAR_6):...\n",
"if callable(VAR_6):\n",
"return VAR_6()\n"
] | [
"def default_encode(value):...\n",
"if callable(value):\n",
"return value()\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'"
] |
[
"@VAR_0.route('/logout')...\n",
"VAR_10.clear()\n",
"flash('You are now logged out', 'success')\n",
"return redirect(url_for('login'))\n"
] | [
"@app.route('/logout')...\n",
"session.clear()\n",
"flash('You are now logged out', 'success')\n",
"return redirect(url_for('login'))\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_8(self, VAR_9, VAR_7=False, VAR_10=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_29 = self.output if VAR_7 else self.input\n",
"if isinstance(VAR_9, str):\n",
"if isinstance(VAR_9, _IOFile):\n",
"if callable(VAR_9):\n",
"self.dependencies[VAR_9] = VAR_9.rule\n",
"VAR_44 = IOFile(VAR_9, VAR_1... | [
"def _set_inoutput_item(self, item, output=False, name=None):...\n",
"\"\"\"docstring\"\"\"\n",
"inoutput = self.output if output else self.input\n",
"if isinstance(item, str):\n",
"if isinstance(item, _IOFile):\n",
"if callable(item):\n",
"self.dependencies[item] = item.rule\n",
"_item = IOFile(item,... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"For",
"Condition",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Expr'",
"E... |
[
"def __enter__(self):...\n",
"def FUNC_13(VAR_18, VAR_19):...\n",
"VAR_6 = {}\n",
"for id_, VAR_21 in enumerate(VAR_18.description):\n",
"VAR_6[VAR_21[0]] = VAR_19[id_]\n",
"return VAR_6\n"
] | [
"def __enter__(self):...\n",
"def dict_factory(cursor, row):...\n",
"dictionary = {}\n",
"for id_, column in enumerate(cursor.description):\n",
"dictionary[column[0]] = row[id_]\n",
"return dictionary\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_31 = openid.get_current_user(VAR_3)\n",
"return model.Identity(model.IDENTITY_USER, VAR_31.email) if VAR_31 else None\n"
] | [
"def openid_cookie_authentication(request):...\n",
"\"\"\"docstring\"\"\"\n",
"user = openid.get_current_user(request)\n",
"return model.Identity(model.IDENTITY_USER, user.email) if user else None\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_2():...\n",
"super(CLASS_4, self).__init__(slideParser.parse(VAR_10, slideLexer), VAR_2='\\n'\n )\n"
] | [
"def innerFunc():...\n",
"super(Column, self).__init__(slideParser.parse(txt, slideLexer), after='\\n')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@rt.switch_runtime(fixtures.TEST_SITE_CONFIG, 'sys0')...\n",
"VAR_40 = self.create_test('t0')\n",
"VAR_41 = self.create_test('t1')\n",
"VAR_42 = self.create_test('t2')\n",
"VAR_43 = self.create_test('t3')\n",
"VAR_44 = self.create_test('t4')\n",
"VAR_41.depends_on('t0')\n",
"VAR_41.depends_on('t4')\n... | [
"@rt.switch_runtime(fixtures.TEST_SITE_CONFIG, 'sys0')...\n",
"t0 = self.create_test('t0')\n",
"t1 = self.create_test('t1')\n",
"t2 = self.create_test('t2')\n",
"t3 = self.create_test('t3')\n",
"t4 = self.create_test('t4')\n",
"t1.depends_on('t0')\n",
"t1.depends_on('t4')\n",
"t2.depends_on('t1')\n"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assert'"
] |
[
"from __future__ import unicode_literals\n",
"from six import iteritems, string_types\n",
"\"\"\"build query for doclistview and return results\"\"\"\n",
"import frappe, json, copy, re\n",
"import frappe.defaults\n",
"import frappe.share\n",
"import frappe.permissions\n",
"from frappe.utils import flt... | [
"from __future__ import unicode_literals\n",
"from six import iteritems, string_types\n",
"\"\"\"build query for doclistview and return results\"\"\"\n",
"import frappe, json, copy, re\n",
"import frappe.defaults\n",
"import frappe.share\n",
"import frappe.permissions\n",
"from frappe.utils import flt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"ImportFrom'",
"ImportFrom'",
"Expr'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",... |
[
"def FUNC_2(self):...\n",
"return \"\"\"Task: %s (ID %d)\nFile: %s\n\"\"\" % (self.task[1], self.task[0], repr\n (self.filenames)) + GenericRequest.specific_info(self)\n"
] | [
"def specific_info(self):...\n",
"return \"\"\"Task: %s (ID %d)\nFile: %s\n\"\"\" % (self.task[1], self.task[0], repr\n (self.filenames)) + GenericRequest.specific_info(self)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_34(self, VAR_64):...\n",
"return CLASS_1(VAR_64)\n"
] | [
"def run(self, func):...\n",
"return RuleInfo(func)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_20(self, VAR_9=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self._kill_process_type(VAR_13.PROCESS_TYPE_MONITOR, VAR_9=check_alive)\n"
] | [
"def kill_monitor(self, check_alive=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self._kill_process_type(ray_constants.PROCESS_TYPE_MONITOR, check_alive=\n check_alive)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_10(self, VAR_9, VAR_10=None, VAR_11=None, VAR_15=False):...\n",
"get_and_check_project(VAR_9, VAR_11, ('change_project',))\n",
"VAR_28 = self.queryset.get(VAR_10=pk, VAR_1=project_pk)\n",
"VAR_26 = CLASS_1(VAR_28, data=request.data, VAR_15=partial)\n",
"VAR_26.is_valid(raise_exception=True)\n",
... | [
"def update(self, request, pk=None, project_pk=None, partial=False):...\n",
"get_and_check_project(request, project_pk, ('change_project',))\n",
"task = self.queryset.get(pk=pk, project=project_pk)\n",
"serializer = TaskSerializer(task, data=request.data, partial=partial)\n",
"serializer.is_valid(raise_exce... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"\"\"\"string\"\"\"\n",
"import urllib.request\n",
"from ftplib import FTP, FTP_TLS, error_perm\n",
"import time\n",
"import csv\n",
"import logging\n",
"import os.path\n",
"import pathlib\n",
"import allel\n",
"import sys\n",
"import functools\n",
"import numpy as np\n",
"import zarr\n",
... | [
"\"\"\" Main module for the benchmark. It reads the command line arguments, reads the benchmark configuration, \ndetermines the runtime mode (dynamic vs. static); if dynamic, gets the benchmark data from the server,\nruns the benchmarks, and records the timer results. \"\"\"\n",
"import urllib.request\n",
"from... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"Expr'",
"Import'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"FunctionDef'",... |
[
"def __getattr__(self, VAR_52):...\n",
"VAR_58 = getattr(self.orig_obj, VAR_52)\n",
"if not callable(VAR_58):\n",
"return VAR_58\n",
"VAR_60 = self._wrapper_cache.get(VAR_52)\n",
"if VAR_60 is None:\n",
"@functools.wraps(VAR_58)...\n",
"return VAR_60\n",
"return VAR_58(*VAR_61, **kwargs)\n"
] | [
"def __getattr__(self, attr):...\n",
"orig_attr = getattr(self.orig_obj, attr)\n",
"if not callable(orig_attr):\n",
"return orig_attr\n",
"wrapper = self._wrapper_cache.get(attr)\n",
"if wrapper is None:\n",
"@functools.wraps(orig_attr)...\n",
"return wrapper\n",
"return orig_attr(*args, **kwargs)\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_6(self, VAR_38):...\n",
"if not VAR_38:\n",
"VAR_101.errors.add(errors.NO_TITLE)\n",
"if len(VAR_38) > 100:\n",
"VAR_101.errors.add(errors.TITLE_TOO_LONG)\n",
"return VAR_38\n"
] | [
"def run(self, title):...\n",
"if not title:\n",
"c.errors.add(errors.NO_TITLE)\n",
"if len(title) > 100:\n",
"c.errors.add(errors.TITLE_TOO_LONG)\n",
"return title\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_28(self, *VAR_76, **VAR_52):...\n",
"def FUNC_39(VAR_101):...\n",
"VAR_101.resources = VAR_76, VAR_52\n",
"return VAR_101\n"
] | [
"def resources(self, *args, **resources):...\n",
"def decorate(ruleinfo):...\n",
"ruleinfo.resources = args, resources\n",
"return ruleinfo\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"from setuptools import setup, find_packages\n",
"import sys\n",
"def FUNC_0(VAR_0):...\n",
"return open(VAR_0).read().splitlines()\n"
] | [
"from setuptools import setup, find_packages\n",
"import sys\n",
"def _requires_from_file(filename):...\n",
"return open(filename).read().splitlines()\n"
] | [
0,
0,
0,
0
] | [
"ImportFrom'",
"Import'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_21(self, VAR_14):...\n",
""
] | [
"def is_relation_one_to_many(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_29(self, VAR_15):...\n",
""
] | [
"def delete(self, item):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@classmethod...\n",
"\"\"\"docstring\"\"\"\n",
"return VAR_14.global_instance()._locator().locate(VAR_6=minimum_version,\n VAR_7=maximum_version, VAR_8=jdk)\n"
] | [
"@classmethod...\n",
"\"\"\"docstring\"\"\"\n",
"return cls.global_instance()._locator().locate(minimum_version=\n minimum_version, maximum_version=maximum_version, jdk=jdk)\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"@VAR_1.route('/logout')...\n",
"VAR_18.clear()\n",
"if 'return_url' in request.args:\n",
"return redirect(request.args['return_url'])\n",
"return redirect('/')\n"
] | [
"@app.route('/logout')...\n",
"session.clear()\n",
"if 'return_url' in request.args:\n",
"return redirect(request.args['return_url'])\n",
"return redirect('/')\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_22(self, VAR_38):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_38:\n",
"return\n",
"VAR_58 = VAR_38.lower()\n",
"if 'select' in VAR_58 and ' from ' in VAR_58:\n",
"frappe.throw(_('Cannot use sub-query in order by'))\n",
"for VAR_50 in VAR_38.split(','):\n",
"if '.' in VAR_50 and VAR_50.st... | [
"def validate_order_by_and_group_by(self, parameters):...\n",
"\"\"\"docstring\"\"\"\n",
"if not parameters:\n",
"return\n",
"_lower = parameters.lower()\n",
"if 'select' in _lower and ' from ' in _lower:\n",
"frappe.throw(_('Cannot use sub-query in order by'))\n",
"for field in parameters.split(','):... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Condition",
"Expr'",
"For",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_12 = self.redirect_url\n",
"if is_authenticated(VAR_1.user):\n",
"VAR_13 = import_from_settings('OIDC_OP_LOGOUT_URL_METHOD', '')\n",
"return HttpResponseRedirect(VAR_12)\n",
"if VAR_13:\n",
"VAR_12 = import_string(VAR_13)()\n",
"auth.l... | [
"def post(self, request):...\n",
"\"\"\"docstring\"\"\"\n",
"logout_url = self.redirect_url\n",
"if is_authenticated(request.user):\n",
"logout_from_op = import_from_settings('OIDC_OP_LOGOUT_URL_METHOD', '')\n",
"return HttpResponseRedirect(logout_url)\n",
"if logout_from_op:\n",
"logout_url = import_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_17(VAR_11, VAR_1, VAR_3):...\n",
""
] | [
"def handleBlockOps(item, stack, symbols):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_23(self, VAR_22):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_18 = VAR_22.target\n",
"if isinstance(VAR_18, ScalacPlugin):\n",
"self._write_scalac_plugin_info(VAR_22.classes_dir, VAR_18)\n",
"if isinstance(VAR_18, JavacPlugin):\n",
"self._write_javac_plugin_info(VAR_22.classes_dir, VAR_18)\n",
"i... | [
"def write_extra_resources(self, compile_context):...\n",
"\"\"\"docstring\"\"\"\n",
"target = compile_context.target\n",
"if isinstance(target, ScalacPlugin):\n",
"self._write_scalac_plugin_info(compile_context.classes_dir, target)\n",
"if isinstance(target, JavacPlugin):\n",
"self._write_javac_plugin_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_27(self):...\n",
"VAR_16 = vimsupport.CurrentFiletypes()\n",
"VAR_17 = self._user_options['filetype_specific_completion_to_disable']\n",
"return not all([(x in VAR_17) for x in VAR_16])\n"
] | [
"def CurrentFiletypeCompletionEnabled(self):...\n",
"filetypes = vimsupport.CurrentFiletypes()\n",
"filetype_to_disable = self._user_options[\n 'filetype_specific_completion_to_disable']\n",
"return not all([(x in filetype_to_disable) for x in filetypes])\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_6, VAR_7):...\n",
"self.vars[VAR_6] = VAR_7\n"
] | [
"def set_variable(self, key, value):...\n",
"self.vars[key] = value\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_27(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.exists and FUNC_0(self.file):\n"
] | [
"def check_broken_symlink(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.exists and lstat(self.file):\n"
] | [
0,
0,
7
] | [
"FunctionDef'",
"Docstring",
"Condition"
] |
[
"def FUNC_8(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.check_image_exists()\n",
"if not self.security_groups:\n",
"self.security_groups[self.tenant_id] = self.verify(25, self.\n _create_security_group, 1, 'Security group can not be created.',\n 'security group creation', self.compute_client)\n",
... | [
"def test_006_check_internet_connectivity_instance_without_floatingIP(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.check_image_exists()\n",
"if not self.security_groups:\n",
"self.security_groups[self.tenant_id] = self.verify(25, self.\n _create_security_group, 1, 'Security group can not be created.',\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"from osv import osv\n",
"from tools.translate import _\n",
"VAR_0 = 'pos.close.statement'\n",
"VAR_1 = 'Close Statements'\n",
"def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n",
"VAR_7 = []\... | [
"from osv import osv\n",
"from tools.translate import _\n",
"_name = 'pos.close.statement'\n",
"_description = 'Close Statements'\n",
"def close_statement(self, cr, uid, ids, context):...\n",
"\"\"\"docstring\"\"\"\n",
"company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n",
"li... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Conditi... |
[
"def FUNC_11(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def start_worker(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def __init__(self, VAR_0, VAR_1):...\n",
"super(CLASS_0, self).__init__(VAR_0)\n",
"self.values = VAR_1\n",
"self.return_id = self.model_class._meta.primary_key\n"
] | [
"def __init__(self, model_class, values):...\n",
"super(UpdateQuery, self).__init__(model_class)\n",
"self.values = values\n",
"self.return_id = self.model_class._meta.primary_key\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'"
] |
[
"from __future__ import print_function\n",
"import os\n",
"import sys\n",
"import etcd\n",
"from custodia.store.interface import CSStore, CSStoreError, CSStoreExists\n",
"def FUNC_0(VAR_0):...\n",
"print(VAR_0, file=sys.stderr)\n",
"def __init__(self, VAR_1):...\n",
"self.server = VAR_1.get('etcd_se... | [
"from __future__ import print_function\n",
"import os\n",
"import sys\n",
"import etcd\n",
"from custodia.store.interface import CSStore, CSStoreError, CSStoreExists\n",
"def log_error(error):...\n",
"print(error, file=sys.stderr)\n",
"def __init__(self, config):...\n",
"self.server = config.get('et... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0
] | [
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_2(self, VAR_1, VAR_2, *VAR_3, **VAR_4):...\n",
"self.handled_resp = VAR_1\n",
"self.handled_remote = VAR_2\n",
"self.handled_args = VAR_3\n",
"self.handled_kwargs = VAR_4\n",
"return 'TEST'\n"
] | [
"def handler(self, resp, remote, *args, **kwargs):...\n",
"self.handled_resp = resp\n",
"self.handled_remote = remote\n",
"self.handled_args = args\n",
"self.handled_kwargs = kwargs\n",
"return 'TEST'\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
"@property...\n",
"return os.path.exists(self.file)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_11(VAR_22, VAR_23):...\n",
"if not VAR_23:\n",
"return VAR_22\n",
"for k in VAR_23.split('.'):\n",
"if k in VAR_22 and isinstance(VAR_22[k], dict):\n",
"return VAR_22\n",
"VAR_22 = VAR_22[k]\n"
] | [
"def strip_hash(h, keys):...\n",
"if not keys:\n",
"return h\n",
"for k in keys.split('.'):\n",
"if k in h and isinstance(h[k], dict):\n",
"return h\n",
"h = h[k]\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"For",
"Condition",
"Return'",
"Assign'"
] |
[
"async def FUNC_7(VAR_6):...\n",
"VAR_7 = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n",
"VAR_8 = await VAR_6.post('/results', VAR_7=json.dumps(data))\n",
"assert VAR_8.status == 400\n"
] | [
"async def test_negative_jogging_result_no_uath(test_cli):...\n",
"data = {'date': '2015-06-20', 'distance': 2000, 'time': 405, 'location':\n '32.0853 34.7818'}\n",
"resp = await test_cli.post('/results', data=json.dumps(data))\n",
"assert resp.status == 400\n"
] | [
0,
0,
0,
0
] | [
"AsyncFunctionDef'",
"Assign'",
"Assign'",
"Assert'"
] |
[
"def FUNC_1(self):...\n",
"VAR_6 = self.client.get('/api/apps')\n",
"self.assertEqual(VAR_6.status_code, 200)\n",
"self.assertEqual(len(VAR_6.data['results']), 2)\n",
"VAR_8 = VAR_6.data['results'][0]['id']\n",
"VAR_5 = '/api/apps/{}/perms'.format(VAR_8)\n",
"VAR_7 = {'username': 'autotest-2'}\n",
"VA... | [
"def test_list(self):...\n",
"response = self.client.get('/api/apps')\n",
"self.assertEqual(response.status_code, 200)\n",
"self.assertEqual(len(response.data['results']), 2)\n",
"app_id = response.data['results'][0]['id']\n",
"url = '/api/apps/{}/perms'.format(app_id)\n",
"body = {'username': 'autotest... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"from copy import deepcopy\n",
"from django.db.models.signals import post_save, post_delete, m2m_changed\n",
"from django.utils import timezone\n",
"from lib.cache import CachedAbstract\n",
"from notification.models import Notification\n",
"from ..models import LearningObject, Submission\n",
"from .hier... | [
"from copy import deepcopy\n",
"from django.db.models.signals import post_save, post_delete, m2m_changed\n",
"from django.utils import timezone\n",
"from lib.cache import CachedAbstract\n",
"from notification.models import Notification\n",
"from ..models import LearningObject, Submission\n",
"from .hier... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_35(self, VAR_51):...\n",
"VAR_69, VAR_73 = self.post('/mails/delete', json.dumps({'idents': VAR_51}))\n",
"return VAR_69\n"
] | [
"def delete_mails(self, idents):...\n",
"res, req = self.post('/mails/delete', json.dumps({'idents': idents}))\n",
"return res\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"VAR_3 = ('UPDATE jdk_entries ' + 'SET date_last_modified = ' + VAR_1 + ' ' +\n \"WHERE jdk_entries.id = '\" + self.entry_id + \"';\")\n",
"FUNC_0(VAR_3)\n",
"return None\n"
] | [
"def update_date_modified(self):...\n",
"sql = ('UPDATE jdk_entries ' + 'SET date_last_modified = ' +\n CURRENT_DATESTAMP + ' ' + \"WHERE jdk_entries.id = '\" + self.entry_id + \"';\"\n )\n",
"db_execute(sql)\n",
"return None\n"
] | [
0,
4,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"VAR_7 = [('x', 'y'), (1, 2)]\n",
"VAR_8 = [('key', 'filename', 'file data')]\n",
"VAR_9, VAR_10 = url_helper.EncodeMultipartFormData()\n",
"self.assertTrue(VAR_9.startswith('multipart/form-data; boundary='))\n",
"self.assertEqual('', VAR_10)\n",
"VAR_9, VAR_10 = url_helper.En... | [
"def testEncodeMultipartFormData(self):...\n",
"fields = [('x', 'y'), (1, 2)]\n",
"files = [('key', 'filename', 'file data')]\n",
"content_type, body = url_helper.EncodeMultipartFormData()\n",
"self.assertTrue(content_type.startswith('multipart/form-data; boundary='))\n",
"self.assertEqual('', body)\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"from modules import sql\n",
"def __init__(self, VAR_0=None, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=None):...\n",
"self.name = VAR_1\n",
"self.password = VAR_2\n",
"self.email = VAR_3\n",
"self.country = VAR_4\n",
"self.conn = VAR_0\n",
"def FUNC_0(self):...\n",
"self.name = None\n",
"self.pass... | [
"from modules import sql\n",
"def __init__(self, conn=None, name=None, password=None, email=None, country...\n",
"self.name = name\n",
"self.password = password\n",
"self.email = email\n",
"self.country = country\n",
"self.conn = conn\n",
"def clean(self):...\n",
"self.name = None\n",
"self.passwo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_22(self):...\n",
"return EnvValue.objects.filter(property__id=self.request.GET.get(\n 'env_property_id'))\n"
] | [
"def env_values(self):...\n",
"return EnvValue.objects.filter(property__id=self.request.GET.get(\n 'env_property_id'))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"for string in self.test_strings:\n",
"self.assertEqual(prepare_string_argument(string, 'WeIrD_O/S'), string)\n"
] | [
"def test_prepare_string_argument_unsupported(self):...\n",
"for string in self.test_strings:\n",
"self.assertEqual(prepare_string_argument(string, 'WeIrD_O/S'), string)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"For",
"Expr'"
] |
[
"def FUNC_2():...\n",
"\"\"\"docstring\"\"\"\n",
"return db.engine.execute('string')\n"
] | [
"def query_packets_with_signed():...\n",
"\"\"\"docstring\"\"\"\n",
"return db.engine.execute(\n \"\"\"\n SELECT packets.username AS username, packets.name AS name, coalesce(packets.sigs_recvd, 0) AS received \n FROM ( ( SELECT freshman.rit_username \n AS username, freshman.name AS nam... | [
0,
0,
4
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_6(VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"return {'password_reset': get_password_reset_form().to_json(), 'login':\n get_login_session_form().to_json(), 'registration':\n RegistrationFormFactory().get_registration_form(VAR_3).to_json()}\n"
] | [
"def _get_form_descriptions(request):...\n",
"\"\"\"docstring\"\"\"\n",
"return {'password_reset': get_password_reset_form().to_json(), 'login':\n get_login_session_form().to_json(), 'registration':\n RegistrationFormFactory().get_registration_form(request).to_json()}\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_2(VAR_4: str):...\n",
"return redirect('/admin/users/edit?fault=' + str(VAR_4))\n"
] | [
"def recreate_form(reason: str):...\n",
"return redirect('/admin/users/edit?fault=' + str(reason))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_2(VAR_11):...\n",
"VAR_12 = 'meal_planner.db'\n",
"VAR_15 = datetime.datetime.now()\n",
"VAR_16 = datetime.date(VAR_15.year, VAR_15.month, VAR_15.day)\n",
"VAR_17 = VAR_16.isocalendar()[1]\n",
"VAR_18 = 'recipes_' + str(VAR_17)\n",
"VAR_20 = conn.cursor()\n",
"VAR_20.execute('SELECT recipe F... | [
"def delete_recipe(recipeName):...\n",
"database_file = 'meal_planner.db'\n",
"now = datetime.datetime.now()\n",
"dt = datetime.date(now.year, now.month, now.day)\n",
"weekNumber = dt.isocalendar()[1]\n",
"tableName = 'recipes_' + str(weekNumber)\n",
"cursor = conn.cursor()\n",
"cursor.execute('SELECT... | [
0,
0,
0,
0,
0,
0,
0,
4,
4,
4,
4,
0,
4
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(self, VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = self._get_relation_attribute_value(VAR_7)\n",
"if VAR_35 is None:\n",
"VAR_40 = None\n",
"if not self._accessor is None:\n",
"return VAR_40\n",
"VAR_52 = self._make_accessor(VAR_7.attr_type)\n",
"VAR_52 = None\n",
"VAR_37 = get_... | [
"def get_attribute_proxy(self, attribute):...\n",
"\"\"\"docstring\"\"\"\n",
"attr_val = self._get_relation_attribute_value(attribute)\n",
"if attr_val is None:\n",
"prx = None\n",
"if not self._accessor is None:\n",
"return prx\n",
"acc = self._make_accessor(attribute.attr_type)\n",
"acc = None\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._attributes.get('dimensions', {}).copy()\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._attributes.get('dimensions', {}).copy()\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"import requests\n",
"import sys\n",
"VAR_0 = 'https://abcd.web-security-academy.net/page'\n",
"VAR_1 = {'category': 'Lifestyle'}\n",
"VAR_2 = [\"'UNION\", 'SELECT', 'NULL', '--']\n",
"VAR_3 = {'category': f\"Lifestyle{' '.join(VAR_2)}\"}\n",
"VAR_4 = requests.Session()\n",
"VAR_5 = VAR_4.get(VAR_0, V... | [
"import requests\n",
"import sys\n",
"url = 'https://abcd.web-security-academy.net/page'\n",
"params = {'category': 'Lifestyle'}\n",
"null = [\"'UNION\", 'SELECT', 'NULL', '--']\n",
"sqli = {'category': f\"Lifestyle{' '.join(null)}\"}\n",
"api_session = requests.Session()\n",
"response = api_session.g... | [
0,
0,
4,
0,
4,
0,
0,
4,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"FunctionDef'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Return'",
"Assign'",
"Assign'"
] |
[
"def FUNC_5(VAR_2, VAR_5, VAR_4):...\n",
"VAR_8 = VAR_4.connect()\n",
"VAR_9 = VAR_8.cursor()\n",
"VAR_10 = \"SELECT userId FROM Users WHERE userEmail = '{0}'\".format(VAR_2)\n",
"VAR_9.execute(VAR_10)\n",
"VAR_13 = VAR_9.fetchone()\n",
"if VAR_13 is None:\n",
"return None\n",
"VAR_14 = 'string'.for... | [
"def getAvailability(username, calendarId, sqlInstance):...\n",
"conn = sqlInstance.connect()\n",
"cursor = conn.cursor()\n",
"userCheckQuery = \"SELECT userId FROM Users WHERE userEmail = '{0}'\".format(\n username)\n",
"cursor.execute(userCheckQuery)\n",
"result = cursor.fetchone()\n",
"if result i... | [
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_11(**VAR_19):...\n",
"VAR_39 = {'name': VAR_19.get('name'), 'description': VAR_19.get('description')}\n",
"VAR_40 = FUNC_8('contests/add', VAR_16=add_args)\n",
"VAR_41 = VAR_40.text\n",
"VAR_42 = re.search('string', VAR_41)\n",
"if VAR_42 is not None:\n",
"VAR_18 = int(VAR_42.groups()[0])\n",
... | [
"def add_contest(**kwargs):...\n",
"add_args = {'name': kwargs.get('name'), 'description': kwargs.get(\n 'description')}\n",
"resp = admin_req('contests/add', args=add_args)\n",
"page = resp.text\n",
"match = re.search(\n '<form enctype=\"multipart/form-data\" action=\"../contest/([0-9]+)\" method=\"P... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_4(self, VAR_8, VAR_4):...\n",
"VAR_14 = self.__cache_map[VAR_8]\n",
"VAR_14.add(VAR_4)\n"
] | [
"def add(self, entity_class, entity):...\n",
"cache = self.__cache_map[entity_class]\n",
"cache.add(entity)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_20(self):...\n",
"print('INFO: connection recovered')\n",
"return DeadConnectionDetector.connectionRecovered(self)\n"
] | [
"def connectionRecovered(self):...\n",
"print('INFO: connection recovered')\n",
"return DeadConnectionDetector.connectionRecovered(self)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"def FUNC_8(self, VAR_7, VAR_5):...\n",
"VAR_11 = VAR_7[0]\n",
"VAR_12 = VAR_7[1]\n",
"VAR_24 = 1 + 1.0 * VAR_5 / VAR_7['lkvm']\n",
"self.G[VAR_11][VAR_12]['wlpvm'] = VAR_24\n"
] | [
"def calcWLPVM(self, edge, l):...\n",
"i = edge[0]\n",
"j = edge[1]\n",
"wlpvm = 1 + 1.0 * l / edge['lkvm']\n",
"self.G[i][j]['wlpvm'] = wlpvm\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_5(VAR_13):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_56 = in_f.readlines()\n",
"VAR_33 = set(VAR_13.keys())\n",
"for VAR_69, line in enumerate(VAR_56):\n",
"VAR_46 = re.match('^(\\\\s*)\"([^\"]+)\":', line)\n",
"for l in VAR_56:\n",
"if VAR_46:\n",
"out_f.write(l)\n",
"if VAR_33:\n",
"VAR... | [
"def configure_cms(options):...\n",
"\"\"\"docstring\"\"\"\n",
"lines = in_f.readlines()\n",
"unset = set(options.keys())\n",
"for i, line in enumerate(lines):\n",
"g = re.match('^(\\\\s*)\"([^\"]+)\":', line)\n",
"for l in lines:\n",
"if g:\n",
"out_f.write(l)\n",
"if unset:\n",
"whitespace, ke... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"Assign'",
"For",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_5(self):...\n",
"VAR_1 = self.client.get(url_for('oauthclient.login', remote_app='test'))\n",
"self.assertStatus(VAR_1, 302)\n",
"self.assertEqual(VAR_1.location, \n 'https://foo.bar/oauth/authorize?response_type=code&client_id=testid&redirect_uri=%s'\n % quote_plus(url_for('oauthclient.autho... | [
"def test_login(self):...\n",
"resp = self.client.get(url_for('oauthclient.login', remote_app='test'))\n",
"self.assertStatus(resp, 302)\n",
"self.assertEqual(resp.location, \n 'https://foo.bar/oauth/authorize?response_type=code&client_id=testid&redirect_uri=%s'\n % quote_plus(url_for('oauthclient.auth... | [
0,
5,
0,
5,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def __init__(self, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6):...\n",
"self._attributes = VAR_2\n",
"self._base_dir = VAR_5\n",
"self._remote = VAR_1\n",
"self._server = VAR_3\n",
"self._server_version = VAR_4\n",
"self._shutdown_hook = VAR_6\n",
"self._timers = []\n",
"self._timers_dying = False\n"... | [
"def __init__(self, remote, attributes, server, server_version, base_dir,...\n",
"self._attributes = attributes\n",
"self._base_dir = base_dir\n",
"self._remote = remote\n",
"self._server = server\n",
"self._server_version = server_version\n",
"self._shutdown_hook = shutdown_hook\n",
"self._timers = [... | [
0,
0,
0,
5,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.