lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_1(self):...\n",
"VAR_0 = self.objects.extext.pk\n",
"self.assertIsNone(self.objects.extext.qa_group)\n",
"self.assertEqual(len(QAGroup.objects.all()), 0)\n",
"VAR_0 = self.objects.extext.extraction_script.pk\n",
"VAR_1 = self.client.get(f'/qa/extractionscript/{VAR_0}/')\n",
"self.assertEqual(V... | [
"def test_qa_group_creation(self):...\n",
"pk = self.objects.extext.pk\n",
"self.assertIsNone(self.objects.extext.qa_group)\n",
"self.assertEqual(len(QAGroup.objects.all()), 0)\n",
"pk = self.objects.extext.extraction_script.pk\n",
"response = self.client.get(f'/qa/extractionscript/{pk}/')\n",
"self.ass... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'"
] |
[
"def FUNC_17(self, VAR_35=False, VAR_36=False, VAR_37=None, VAR_38=None):...\n",
"self.clean()\n",
"return super().save(VAR_35, VAR_36, VAR_37, VAR_38)\n"
] | [
"def save(self, force_insert=False, force_update=False, using=None,...\n",
"self.clean()\n",
"return super().save(force_insert, force_update, using, update_fields)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"def FUNC_6(self, VAR_11='', VAR_6=None):...\n",
"VAR_5 = self.session.query(self.obj)\n",
"VAR_5 = self._get_base_query(VAR_5=query, VAR_6=filters)\n",
"VAR_25 = VAR_5.all()\n",
"VAR_27 = GroupByDateYear(VAR_11, 'Group by Year')\n",
"return VAR_27.apply(VAR_25)\n"
] | [
"def query_year_group(self, group_by='', filters=None):...\n",
"query = self.session.query(self.obj)\n",
"query = self._get_base_query(query=query, filters=filters)\n",
"query_result = query.all()\n",
"group_year = GroupByDateYear(group_by, 'Group by Year')\n",
"return group_year.apply(query_result)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_23 = open('keys/%s/key_rsa.pub' % VAR_6, 'rb').read()\n",
"return VAR_23\n"
] | [
"def loadClientRSAKey(client):...\n",
"\"\"\"docstring\"\"\"\n",
"key = open('keys/%s/key_rsa.pub' % client, 'rb').read()\n",
"return key\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_20(self, VAR_25, VAR_23):...\n",
"VAR_19 = threading.Event()\n",
"def FUNC_28(VAR_21):...\n",
"if not VAR_25(VAR_21):\n",
"return VAR_21, False\n",
"VAR_19.set()\n",
"return VAR_21, True\n"
] | [
"def _get_message_handle(self, match, handlername):...\n",
"event = threading.Event()\n",
"def handler(msg):...\n",
"if not match(msg):\n",
"return msg, False\n",
"event.set()\n",
"return msg, True\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Condition",
"Return'",
"Expr'",
"Return'"
] |
[
"def FUNC_5(VAR_1, *VAR_2, **VAR_3):...\n",
"def FUNC_6():...\n",
"if not request.method in VAR_0:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
... | [
"def _decorate(f, *a, **kw):...\n",
"def check():...\n",
"if not request.method in methods:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
"ref_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
5,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Return'",
"Condition",
"AugAssign'",
"Condition",
"Condition",
"Return'"
] |
[
"def __ne__(self, VAR_1):...\n",
"return not self.__eq__(VAR_1)\n"
] | [
"def __ne__(self, other):...\n",
"return not self.__eq__(other)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_9(self, *VAR_15, **VAR_75):...\n",
""
] | [
"def newfn(self, *a, **env):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"\"\"\"string\"\"\"\n",
"from lib.core.agent import agent\n",
"from lib.core.data import conf\n",
"from lib.core.data import kb\n",
"from lib.core.data import logger\n",
"from lib.core.data import queries\n",
"from lib.core.session import setUnion\n",
"from lib.request.connect import Connect as Reques... | [
"\"\"\"\n$Id$\n\nThis file is part of the sqlmap project, http://sqlmap.sourceforge.net.\n\nCopyright (c) 2006-2008 Bernardo Damele A. G. <bernardo.damele@gmail.com>\n and Daniele Bellucci <daniele.bellucci@gmail.com>\n\nsqlmap is free software; you can redistribute it and/or modify it under\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
0,
2,
0,
0,
0,
0,
2,
2,
0,
2,
0,
0,
0,
0,
2,
0,
0,
2,
0,
2
] | [
"Expr'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'",
"Condition",
"AugAssign'",
"Condition",
"AugAssign'",
"Assign'",
"Assign'",
"A... |
[
"def FUNC_9(self, *VAR_15, **VAR_75):...\n",
""
] | [
"def newfn(self, *a, **env):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@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'"
] |
[
"def FUNC_1(self, VAR_2):...\n",
""
] | [
"def get(self, key):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_4(self, VAR_1, VAR_2):...\n",
"VAR_12 = self._formatCredentials(VAR_1, VAR_8='current')\n",
"VAR_9 = '{credentials} rclone touch current:{path}/.keep'.format(VAR_12=\n credentials, VAR_2=path)\n",
"VAR_28 = self._execute(VAR_9)\n",
"return {'message': 'Success'}\n"
] | [
"def mkdir(self, data, path):...\n",
"credentials = self._formatCredentials(data, name='current')\n",
"command = '{credentials} rclone touch current:{path}/.keep'.format(credentials\n =credentials, path=path)\n",
"result = self._execute(command)\n",
"return {'message': 'Success'}\n"
] | [
0,
0,
2,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_15(self):...\n",
"self._test_health(FUNC_1, cluster.ClusterHealth.RED)\n"
] | [
"def test_red_health(self):...\n",
"self._test_health(_validate_conn_down, cluster.ClusterHealth.RED)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@handled_slot(bool)...\n",
"print('Starting thin etalon scan...')\n",
"self.matisse.thin_etalon_scan()\n"
] | [
"@handled_slot(bool)...\n",
"print('Starting thin etalon scan...')\n",
"self.matisse.thin_etalon_scan()\n"
] | [
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'"
] |
[
"from typing import Any, Dict, Iterator, TypeVar\n",
"from typing_extensions import Protocol\n",
"VAR_0 = TypeVar('T')\n",
"def __iter__(self) ->'Iterator[IRow]':...\n",
"...\n",
"def FUNC_0(self, VAR_1: bool) ->bool:...\n",
"...\n",
"def __getattr__(self, VAR_2: str) ->Any:...\n",
"...\n",
"def _... | [
"from typing import Any, Dict, Iterator, TypeVar\n",
"from typing_extensions import Protocol\n",
"T = TypeVar('T')\n",
"def __iter__(self) ->'Iterator[IRow]':...\n",
"...\n",
"def filter(self, expression: bool) ->bool:...\n",
"...\n",
"def __getattr__(self, name: str) ->Any:...\n",
"...\n",
"def _... | [
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Assign'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Expr'",
"AnnAssign'",
"AnnAssign'",
"AnnAssign'",
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_21(self, VAR_1):...\n",
"VAR_16 = [VAR_25.fieldname for VAR_25 in self.meta.get_table_fields() if \n VAR_25.options == VAR_1]\n",
"return VAR_16[0] if VAR_16 else None\n"
] | [
"def get_parentfield_of_doctype(self, doctype):...\n",
"fieldname = [df.fieldname for df in self.meta.get_table_fields() if df.\n options == doctype]\n",
"return fieldname[0] if fieldname else None\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"return self._doc['globals'].keys()\n"
] | [
"def get_global_names(self):...\n",
"return self._doc['globals'].keys()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'ssl_adapter')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'ssl_adapter')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def __iter__(self):...\n",
"for item in self.sequence:\n",
"yield item\n"
] | [
"def __iter__(self):...\n",
"for item in self.sequence:\n",
"yield item\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"For",
"Expr'"
] |
[
"@VAR_2.route('/data/jobtypes/')...\n",
"return {'jobtypes': VAR_3.jobtype_query()}\n"
] | [
"@app.route('/data/jobtypes/')...\n",
"return {'jobtypes': JOBSDATA.jobtype_query()}\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_8(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.assertEqual(FUNC_1(), 0)\n",
"self.assertEqual(FUNC_3(), 0)\n"
] | [
"def test_create_database_tables(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.assertEqual(drop(), 0)\n",
"self.assertEqual(create(), 0)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"def FUNC_10(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer(VAR_5=False))\n"
] | [
"def test_b_upsert_load_balancer_public(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer(use_vpc=False))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_46(self, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_56 = self.regex.search(VAR_16)\n",
"if VAR_56 is not None:\n",
"return VAR_56.group('value')\n"
] | [
"def is_periodic(self, value):...\n",
"\"\"\"docstring\"\"\"\n",
"m = self.regex.search(value)\n",
"if m is not None:\n",
"return m.group('value')\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_48(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'LOW': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('assert.py', VAR_2)\n"
] | [
"def test_asserts(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'LOW': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('assert.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_8(self):...\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_8 = {'image': 'autotest/example', 'sha': 'a' *... | [
"def test_container_str(self):...\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 = {'image': 'autotest/example... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = VAR_38(VAR_0)\n",
"VAR_6 = VAR_6[VAR_6.find(\"'\") + 1:VAR_6.rfind(\"'\")]\n",
"VAR_6 = ':'.join(VAR_6.rsplit('.', 1))\n",
"return VAR_6\n"
] | [
"def class2str(value):...\n",
"\"\"\"docstring\"\"\"\n",
"s = str(value)\n",
"s = s[s.find(\"'\") + 1:s.rfind(\"'\")]\n",
"s = ':'.join(s.rsplit('.', 1))\n",
"return s\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"from django.shortcuts import render\n",
"from django.http import HttpResponse, JsonResponse\n",
"from django.views.decorators.csrf import csrf_exempt\n",
"from rest_framework.renderers import JSONRenderer\n",
"from rest_framework.parsers import JSONParser\n",
"from rest_framework.response import Response... | [
"from django.shortcuts import render\n",
"from django.http import HttpResponse, JsonResponse\n",
"from django.views.decorators.csrf import csrf_exempt\n",
"from rest_framework.renderers import JSONRenderer\n",
"from rest_framework.parsers import JSONParser\n",
"from rest_framework.response import Response... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'"
] |
[
"@aiohttp_jinja2.template('index.html')...\n",
"VAR_9 = natsorted(glob(os.path.join(VAR_3.STORAGE_DIR, '**/*.jpg'),\n recursive=True), VAR_8=lambda x: x.upper())\n",
"return {'images': (CLASS_0(x.replace(VAR_3.STORAGE_DIR, '')) for x in VAR_9)}\n"
] | [
"@aiohttp_jinja2.template('index.html')...\n",
"images = natsorted(glob(os.path.join(settings.STORAGE_DIR, '**/*.jpg'),\n recursive=True), key=lambda x: x.upper())\n",
"return {'images': (Item(x.replace(settings.STORAGE_DIR, '')) for x in images)}\n"
] | [
0,
0,
0
] | [
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_13(self, VAR_17, VAR_18, VAR_19):...\n",
"if 'memory_mapped' in self.targets[VAR_18] and self.targets[VAR_18][\n",
"VAR_10 = 'md'\n",
"VAR_28 = self.command('rd ' + VAR_17, [':'], 'Error getting register value')\n",
"if 'bits' in self.targets[VAR_18]['registers'][VAR_17]:\n",
"return VAR_28.spli... | [
"def get_register_value(self, register, target, target_index):...\n",
"if 'memory_mapped' in self.targets[target] and self.targets[target][\n",
"command = 'md'\n",
"buff = self.command('rd ' + register, [':'], 'Error getting register value')\n",
"if 'bits' in self.targets[target]['registers'][register]:\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"AugAssign'",
"Condition",
"AugAssign'",
"Condition",
"AugAssign'"
] |
[
"@app.task...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = get_object_or_404(Project, pk=project_id)\n",
"VAR_3 = create_routing_test_suite(VAR_2=project)\n",
"VAR_4 = TestCaseResults.objects.filter(VAR_2=project)\n",
"if VAR_4.count() > 2:\n",
"VAR_7 = VAR_2.testcaseresults_set.latest('updated')\n",
"Test... | [
"@app.task...\n",
"\"\"\"docstring\"\"\"\n",
"project = get_object_or_404(Project, pk=project_id)\n",
"testcases = create_routing_test_suite(project=project)\n",
"tc_results = TestCaseResults.objects.filter(project=project)\n",
"if tc_results.count() > 2:\n",
"tc_latest = project.testcaseresults_set.lat... | [
1,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"@VAR_0.route('/level-4')...\n",
"if int(current_user.progress) >= 4:\n",
"return render_template('ui.html', VAR_6='4', VAR_7='index', level_progress=\n current_user.level4_progress, max_level_progress=3)\n",
"return redirect(VAR_4)\n"
] | [
"@app.route('/level-4')...\n",
"if int(current_user.progress) >= 4:\n",
"return render_template('ui.html', level='4', page='index', level_progress=\n current_user.level4_progress, max_level_progress=3)\n",
"return redirect(url_prefix)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_2(self, VAR_2, VAR_3, VAR_4=False):...\n",
"VAR_6 = os.path.join(self.namespace, VAR_2)\n",
"self.etcd.write(VAR_6, VAR_3, prevExist=replace)\n",
"FUNC_0('Error storing key %s: [%r]' % (VAR_2, repr(err)))\n"
] | [
"def set(self, key, value, replace=False):...\n",
"path = os.path.join(self.namespace, key)\n",
"self.etcd.write(path, value, prevExist=replace)\n",
"log_error('Error storing key %s: [%r]' % (key, repr(err)))\n"
] | [
0,
1,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(VAR_1):...\n",
"VAR_7 = datetime.now()\n",
"VAR_8 = sqlite3.connect('database.db')\n",
"VAR_9 = VAR_8.cursor()\n",
"VAR_10 = FUNC_4()\n",
"for VAR_0 in reversed(list(VAR_1)):\n",
"VAR_13 = [[-1, ''], [-2, ''], [-3, ''], [-4, '']]\n",
"VAR_8.commit()\n",
"for topLevelComment in VAR_0.comm... | [
"def addToDatabase(submissionList):...\n",
"startTime = datetime.now()\n",
"database = sqlite3.connect('database.db')\n",
"cursor = database.cursor()\n",
"botUsername = getBotUsername()\n",
"for submission in reversed(list(submissionList)):\n",
"scoresInChallenge = [[-1, ''], [-2, ''], [-3, ''], [-4, ''... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Expr'",
"For",
"Expr'",
"Expr'",
"Condition",
"For",
"For",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Expr'",
"AugAssign'",
"Expr'",
"Expr'",
"Co... |
[
"def FUNC_23(VAR_11):...\n",
"return '%s> ' % self.configuration.eqlx_group_name\n"
] | [
"def _fake_recv(ignore_arg):...\n",
"return '%s> ' % self.configuration.eqlx_group_name\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"import json\n",
"import os\n",
"import time\n",
"import urllib\n",
"import psycopg2\n",
"from websocket import create_connection\n",
"import config\n",
"VAR_0 = create_connection(config.WEBSOCKET_URL)\n",
"VAR_1 = psycopg2.connect(**config.POSTGRES)\n",
"VAR_2 = VAR_1.cursor()\n",
"VAR_3 = 'TRU... | [
"import json\n",
"import os\n",
"import time\n",
"import urllib\n",
"import psycopg2\n",
"from websocket import create_connection\n",
"import config\n",
"ws = create_connection(config.WEBSOCKET_URL)\n",
"con = psycopg2.connect(**config.POSTGRES)\n",
"cur = con.cursor()\n",
"query = 'TRUNCATE hol... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Ex... |
[
"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'"
] |
[
"def FUNC_11(self, VAR_9, VAR_10=None):...\n",
"if isinstance(VAR_9, str) or callable(VAR_9):\n",
"self.params.append(VAR_9)\n",
"VAR_48 = len(self.params)\n",
"if VAR_10:\n",
"for VAR_51 in VAR_9:\n",
"self.params.add_name(VAR_10)\n",
"self._set_params_item(VAR_51)\n",
"if VAR_10:\n",
"self.param... | [
"def _set_params_item(self, item, name=None):...\n",
"if isinstance(item, str) or callable(item):\n",
"self.params.append(item)\n",
"start = len(self.params)\n",
"if name:\n",
"for i in item:\n",
"self.params.add_name(name)\n",
"self._set_params_item(i)\n",
"if name:\n",
"self.params.set_name(name... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"For",
"Expr'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_2(self, *VAR_2, **VAR_1):...\n",
"VAR_0 = super(CLASS_0, self).get(*VAR_2, **kwargs)\n",
"self._store_xsrf_token(VAR_0)\n",
"return VAR_0\n"
] | [
"def get(self, *args, **kwargs):...\n",
"response = super(Session, self).get(*args, **kwargs)\n",
"self._store_xsrf_token(response)\n",
"return response\n"
] | [
0,
0,
5,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def stop_app(self):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_5():...\n",
"VAR_34 = FUNC_3(VAR_18, VAR_19)\n",
"return CLASS_16, VAR_34\n"
] | [
"def two():...\n",
"FunctionalUseFormSet = make_formset(parent, child)\n",
"return ExtractedTextForm, FunctionalUseFormSet\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"return inspect.isfunction(VAR_7) or inspect.ismethod(VAR_7) or FUNC_4(VAR_7)\n"
] | [
"def is_function_or_method(obj):...\n",
"\"\"\"docstring\"\"\"\n",
"return inspect.isfunction(obj) or inspect.ismethod(obj) or is_cython(obj)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_23(VAR_31, VAR_32, VAR_3, VAR_33, VAR_34=apply_wildcards, VAR_35=None...\n",
"for VAR_10, VAR_9 in VAR_32.allitems():\n",
"VAR_48 = len(VAR_31)\n",
"VAR_49 = True\n",
"if callable(VAR_9):\n",
"if not_iterable(VAR_9):\n",
"VAR_9 = VAR_9(VAR_33)\n",
"if not_iterable(VAR_9):\n",
"VAR_9 = [VAR... | [
"def _apply_wildcards(newitems, olditems, wildcards, wildcards_obj,...\n",
"for name, item in olditems.allitems():\n",
"start = len(newitems)\n",
"is_iterable = True\n",
"if callable(item):\n",
"if not_iterable(item):\n",
"item = item(wildcards_obj)\n",
"if not_iterable(item):\n",
"item = [item]\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
] | [
"Condition",
"For",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Assig... |
[
"def __repr__(self):...\n",
"return 'Distribution({!r}, minimum_version={!r}, maximum_version={!r} jdk={!r})'.format(\n self._bin_path, self._minimum_version, self._maximum_version, self._jdk)\n"
] | [
"def __repr__(self):...\n",
"return 'Distribution({!r}, minimum_version={!r}, maximum_version={!r} jdk={!r})'.format(\n self._bin_path, self._minimum_version, self._maximum_version, self._jdk)\n"
] | [
0,
0
] | [
"FunctionDef'",
"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_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 = []\n",
"VAR_8 = self.pool.get('ir.model.data')\n",
"VAR_9 = self.pool.get('account.bank.statement')\n",
"VAR_10 = self.pool.get('acc... | [
"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",
"list_statement = []\n",
"mod_obj = self.pool.get('ir.model.data')\n",
"statement_obj = self.pool.get('account.bank.statement')\n",
"journa... | [
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
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"... |
[
"@property...\n",
"if self.is_ordered():\n",
"return self.current_columns.index(self.column_id) + 1\n"
] | [
"@property...\n",
"if self.is_ordered():\n",
"return self.current_columns.index(self.column_id) + 1\n"
] | [
0,
0,
0
] | [
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_26():...\n",
"frappe.throw(_('Cannot use sub-query or function in fields'), frappe.DataError)\n"
] | [
"def _raise_exception():...\n",
"frappe.throw(_('Cannot use sub-query or function in fields'), frappe.DataError)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __repr__(self):...\n",
"return self.get_name()\n"
] | [
"def __repr__(self):...\n",
"return self.get_name()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@VAR_0.route('/star/<hip>/elements')...\n",
""
] | [
"@app.route('/star/<hip>/elements')...\n",
""
] | [
0,
0
] | [
"Condition",
"Condition"
] |
[
"def FUNC_9(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n",
"self.write_data({'type': 'torrent_finished', 'event': {'infohash': hexlify(\n VAR_4), 'name': VAR_5[0]}})\n"
] | [
"def on_torrent_finished(self, subject, changetype, objectID, *args):...\n",
"self.write_data({'type': 'torrent_finished', 'event': {'infohash': hexlify(\n objectID), 'name': args[0]}})\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@classmethod...\n",
"super(CLASS_7, VAR_0).setUpTestData()\n",
"VAR_0.get_info_url = reverse('ajax-info')\n",
"VAR_0.group_nitrate = EnvGroupFactory(name='nitrate')\n",
"VAR_0.group_new = EnvGroupFactory(name='NewGroup')\n",
"VAR_0.property_os = EnvPropertyFactory(name='os')\n",
"VAR_0.property_python ... | [
"@classmethod...\n",
"super(TestGetObjectInfo, cls).setUpTestData()\n",
"cls.get_info_url = reverse('ajax-info')\n",
"cls.group_nitrate = EnvGroupFactory(name='nitrate')\n",
"cls.group_new = EnvGroupFactory(name='NewGroup')\n",
"cls.property_os = EnvPropertyFactory(name='os')\n",
"cls.property_python = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"VAR_7 = self.window.menuBar()\n",
"VAR_8 = VAR_7.addMenu('Console')\n",
"self.clear_log_area_action = VAR_8.addAction('Clear Log')\n",
"self.open_idle_action = VAR_8.addAction('Open Python Shell...')\n",
"self.restart_action = VAR_8.addAction('Restart')\n",
"VAR_9 = VAR_7.addM... | [
"def setup_menus(self):...\n",
"menu_bar = self.window.menuBar()\n",
"console_menu = menu_bar.addMenu('Console')\n",
"self.clear_log_area_action = console_menu.addAction('Clear Log')\n",
"self.open_idle_action = console_menu.addAction('Open Python Shell...')\n",
"self.restart_action = console_menu.addActi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"... |
[
"def FUNC_0(self):...\n",
"self.mail_service = mock()\n",
"self.services_factory = mock()\n",
"self.services_factory.mode = UserAgentMode(is_single_user=True)\n",
"self.services = mock()\n",
"self.services.mail_service = self.mail_service\n",
"self.services_factory._services_by_user = {'someuserid': sel... | [
"def setUp(self):...\n",
"self.mail_service = mock()\n",
"self.services_factory = mock()\n",
"self.services_factory.mode = UserAgentMode(is_single_user=True)\n",
"self.services = mock()\n",
"self.services.mail_service = self.mail_service\n",
"self.services_factory._services_by_user = {'someuserid': self... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_9(VAR_1):...\n",
"return {'name': str(VAR_1), 'link': VAR_1.get_absolute_url()}\n"
] | [
"def course_entry(instance):...\n",
"return {'name': str(instance), 'link': instance.get_absolute_url()}\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = discord.Embed(VAR_2='Dsp1', VAR_3=discord.Color.green())\n",
"VAR_7.set_author(name='zoogie', url='https://github.com/zoogie', icon_url=\n 'https://gbatemp.net/data/avatars/l/357/357147.jpg?1426471484')\n",
"VAR_7.description = \"Dump 3DS's ... | [
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"embed = discord.Embed(title='Dsp1', color=discord.Color.green())\n",
"embed.set_author(name='zoogie', url='https://github.com/zoogie', icon_url=\n 'https://gbatemp.net/data/avatars/l/357/357147.jpg?1426471484')\n",
"embed.description = \"Dump 3DS's ... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_0(VAR_0, VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_18 = sql.connect('./resources/users.db')\n",
"VAR_19 = False\n",
"VAR_20 = \"\"\"SELECT * FROM users\n WHERE username = ? AND password = ?;\n \"\"\"\n",
"VAR_21 = VAR_18.cursor()\n",
"VAR_22 = VAR_0, VAR_1\n",
"VAR_21.exe... | [
"def authenticate(username, password):...\n",
"\"\"\"docstring\"\"\"\n",
"con = sql.connect('./resources/users.db')\n",
"authenticated = False\n",
"cmd = \"\"\"SELECT * FROM users\n WHERE username = ? AND password = ?;\n \"\"\"\n",
"cur = con.cursor()\n",
"info = username, password\n",
... | [
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"@hook.command(autohelp=False)...\n",
"return FUNC_1(VAR_8, 'kick', VAR_4, VAR_5, VAR_1, VAR_6, VAR_7)\n"
] | [
"@hook.command(autohelp=False)...\n",
"return process_vote(inp, 'kick', chan, mask, db, notice, conn)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_5(self, VAR_1, VAR_2, VAR_8=None, VAR_9='form', VAR_4=None, VAR_14...\n",
"VAR_29 = super(CLASS_0, self).fields_view_get(VAR_1, VAR_2, VAR_8, VAR_9,\n VAR_4, VAR_14=toolbar, VAR_15=submenu)\n",
"if VAR_4 is None:\n",
"VAR_4 = {}\n",
"if 'location' in VAR_4 and VAR_4['location']:\n",
"VAR_51 =... | [
"def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=...\n",
"res = super(product_product, self).fields_view_get(cr, uid, view_id,\n view_type, context, toolbar=toolbar, submenu=submenu)\n",
"if context is None:\n",
"context = {}\n",
"if 'location' in context and context['location'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"For",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Condition",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Condition... |
[
"def FUNC_17(self):...\n",
"return self.get('__islocal')\n"
] | [
"def is_new(self):...\n",
"return self.get('__islocal')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@Json...\n",
"if VAR_2._chk_error(errors.NO_TITLE):\n",
"VAR_2._chk_error(errors.TITLE_TOO_LONG)\n",
"VAR_2._chk_errors((errors.NO_LOCATION, errors.NO_DESCRIPTION, errors.\n INVALID_DATE, errors.NO_DATE))\n",
"VAR_2._focus('title')\n",
"if VAR_2.error:\n",
"return\n",
"VAR_0 = Meetup(author_id=c.u... | [
"@Json...\n",
"if res._chk_error(errors.NO_TITLE):\n",
"res._chk_error(errors.TITLE_TOO_LONG)\n",
"res._chk_errors((errors.NO_LOCATION, errors.NO_DESCRIPTION, errors.\n INVALID_DATE, errors.NO_DATE))\n",
"res._focus('title')\n",
"if res.error:\n",
"return\n",
"meetup = Meetup(author_id=c.user._id, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(VAR_9):...\n",
"for x in VAR_4:\n",
"if x in [y.id for y in VAR_9.message.author.roles]:\n",
"return True\n",
"return False\n"
] | [
"def whitelist_check(ctx):...\n",
"for x in role_whitelist:\n",
"if x in [y.id for y in ctx.message.author.roles]:\n",
"return True\n",
"return False\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"For",
"Return'",
"Return'"
] |
[
"def FUNC_37(self, VAR_29):...\n",
"VAR_12.append('authorization_error')\n",
"super(CLASS_7, self).authorization_error(VAR_29)\n"
] | [
"def authorization_error(self, err):...\n",
"calls.append('authorization_error')\n",
"super(Handler, self).authorization_error(err)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"def FUNC_4(self, VAR_14):...\n",
"VAR_25 = self.env['res.partner'].search([('ref', '=', VAR_14)])\n",
"if not VAR_25:\n",
"return VAR_25\n"
] | [
"def get_vendor_id(self, vendor_ref):...\n",
"vendor_id = self.env['res.partner'].search([('ref', '=', vendor_ref)])\n",
"if not vendor_id:\n",
"return vendor_id\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"return self.data\n"
] | [
"def to_json(self):...\n",
"return self.data\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@user_passes_test(user_is_staff)...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_9 = push_testcases_to_testrail_celery.delay(VAR_2)\n",
"VAR_4 = context_testcases()\n",
"VAR_4['testrail'] = VAR_9\n",
"VAR_4['link_id'] = VAR_2\n",
"return render(VAR_0, 'testcases/testcases.html', VAR_4)\n"
] | [
"@user_passes_test(user_is_staff)...\n",
"\"\"\"docstring\"\"\"\n",
"testrail_contents = push_testcases_to_testrail_celery.delay(project_id)\n",
"context = context_testcases()\n",
"context['testrail'] = testrail_contents\n",
"context['link_id'] = project_id\n",
"return render(request, 'testcases/testcas... | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_2():...\n",
"VAR_16 = InputMail()\n",
"VAR_16.fdoc = CLASS_0({})\n",
"VAR_16._chash = '123'\n",
"VAR_16.as_dict = lambda : None\n",
"return VAR_16\n"
] | [
"def input_mail():...\n",
"mail = InputMail()\n",
"mail.fdoc = TestDoc({})\n",
"mail._chash = '123'\n",
"mail.as_dict = lambda : None\n",
"return mail\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_25(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self._normalized_jdk_paths\n"
] | [
"def all_jdk_paths(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self._normalized_jdk_paths\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def __init__(self):...\n",
"CLASS_0.__init__(self)\n"
] | [
"def __init__(self):...\n",
"BaseLevel.__init__(self)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_24(self, VAR_14):...\n",
""
] | [
"def is_pk(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"import unittest\n",
"import mock\n",
"from oslo_serialization import jsonutils\n",
"from requests import exceptions as requests_exceptions\n",
"import six.moves.urllib.parse as urlparse\n",
"from vmware_nsxlib.tests.unit.v3 import mocks\n",
"from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase\n",
... | [
"import unittest\n",
"import mock\n",
"from oslo_serialization import jsonutils\n",
"from requests import exceptions as requests_exceptions\n",
"import six.moves.urllib.parse as urlparse\n",
"from vmware_nsxlib.tests.unit.v3 import mocks\n",
"from vmware_nsxlib.tests.unit.v3 import nsxlib_testcase\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"for VAR_25 in self.args:\n",
"if self.args[VAR_25]:\n",
"if self['sos_opt_line']:\n",
"self[VAR_25] = self.args[VAR_25]\n",
"self['sos_opt_line'] = pipes.quote(self['sos_opt_line'])\n"
] | [
"def parse_config(self):...\n",
"for k in self.args:\n",
"if self.args[k]:\n",
"if self['sos_opt_line']:\n",
"self[k] = self.args[k]\n",
"self['sos_opt_line'] = pipes.quote(self['sos_opt_line'])\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Condition",
"Assign'",
"Assign'"
] |
[
"from base import Field\n",
"VAR_0 = 'FLOAT'\n",
"def __init__(self, *VAR_1, **VAR_2):...\n",
"super(CLASS_0, self).__init__(*VAR_1, **kwargs)\n",
"def FUNC_0(self, VAR_3):...\n",
"VAR_5 = '%s float' % str(VAR_3)\n",
"return VAR_5\n"
] | [
"from base import Field\n",
"TYPE = 'FLOAT'\n",
"def __init__(self, *args, **kwargs):...\n",
"super(FloatField, self).__init__(*args, **kwargs)\n",
"def create_field(self, name):...\n",
"field_string = '%s float' % str(name)\n",
"return field_string\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"Assign'",
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"self.controller.remove_frame(VAR_9)\n",
"VAR_8 = self.controller.create_frame(VAR_9)\n"
] | [
"def new_search(self):...\n",
"self.controller.remove_frame(SearchPage)\n",
"new_frame = self.controller.create_frame(SearchPage)\n"
] | [
0,
4,
4
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_16(self):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.info('Using default log_out() method')\n",
"self.clear_session()\n",
"return self.redirect_to_goodbye()\n"
] | [
"def log_out(self):...\n",
"\"\"\"docstring\"\"\"\n",
"logging.info('Using default log_out() method')\n",
"self.clear_session()\n",
"return self.redirect_to_goodbye()\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Return'"
] |
[
"\"\"\"Unittest to exercise the code in url_helper.py.\"\"\"\n",
"import logging\n",
"import os\n",
"import stat\n",
"import StringIO\n",
"import sys\n",
"import tempfile\n",
"import time\n",
"import unittest\n",
"import urllib\n",
"import urllib2\n",
"VAR_0 = os.path.dirname(os.path.dirname(o... | [
"\"\"\"Unittest to exercise the code in url_helper.py.\"\"\"\n",
"import logging\n",
"import os\n",
"import stat\n",
"import StringIO\n",
"import sys\n",
"import tempfile\n",
"import time\n",
"import unittest\n",
"import urllib\n",
"import urllib2\n",
"ROOT_DIR = os.path.dirname(os.path.dirnam... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0... | [
"Expr'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Assign'",
"Expr'",
"Import'",
"Expr'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr... |
[
"def FUNC_5(self, VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = 'SELECT package.name, evr.epoch, evr.version, evr.release, arch.name'\n",
"VAR_22 += ' FROM pkg_errata'\n",
"VAR_22 += ' JOIN package ON package.id = pkg_errata.pkg_id'\n",
"VAR_22 += ' JOIN evr ON evr.id = package.evr_id'\n",
"VAR_22... | [
"def get_package_list_for_erratum_id(self, id):...\n",
"\"\"\"docstring\"\"\"\n",
"pkg_query = (\n 'SELECT package.name, evr.epoch, evr.version, evr.release, arch.name')\n",
"pkg_query += ' FROM pkg_errata'\n",
"pkg_query += ' JOIN package ON package.id = pkg_errata.pkg_id'\n",
"pkg_query += ' JOIN evr... | [
0,
0,
4,
4,
4,
4,
4,
4,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"AugAssign'",
"AugAssign'",
"AugAssign'",
"AugAssign'",
"AugAssign'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Return'"
] |
[
"def FUNC_3(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = VAR_2.lexmatch.groupdict()\n",
"VAR_1.value = beamr.interpreters.Emph(VAR_3['EMPH_FLAG'], VAR_3['EMPH_TXT'])\n",
"return VAR_1\n"
] | [
"def t_EMPH(t):...\n",
"\"\"\"docstring\"\"\"\n",
"gd = lexer.lexmatch.groupdict()\n",
"t.value = beamr.interpreters.Emph(gd['EMPH_FLAG'], gd['EMPH_TXT'])\n",
"return t\n"
] | [
0,
0,
2,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_2(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_17 = Trading(config_file=PATH_TO_YAML, warnings=True, timeout=20)\n",
"print(e)\n",
"return VAR_19\n",
"VAR_18 = {'ActiveList': {'Include': True, 'Pagination': {'EntriesPerPage': \n 100, 'PageNumber': VAR_1}, 'IncludeWatchCount': True}, 'Detail... | [
"def get_myebay_selling_request(page):...\n",
"\"\"\"docstring\"\"\"\n",
"api_trading = Trading(config_file=PATH_TO_YAML, warnings=True, timeout=20)\n",
"print(e)\n",
"return products\n",
"api_request = {'ActiveList': {'Include': True, 'Pagination': {\n 'EntriesPerPage': 100, 'PageNumber': page}, 'Incl... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Return'",
"Assign'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_3(VAR_11):...\n",
"VAR_19 = '\"' + VAR_11 + '\"'\n",
"VAR_20 = conn.cursor()\n",
"VAR_20.execute('DELETE FROM recipe WHERE name = ' + '\"' + VAR_11 + '\"')\n",
"print(VAR_20.rowcount)\n",
"if VAR_20.rowcount == 1:\n",
"messagebox.showinfo('Success', 'Recipe Deleted.')\n",
"if VAR_20.rowcount... | [
"def actually_delete(recipeName):...\n",
"queryString = '\"' + recipeName + '\"'\n",
"cursor = conn.cursor()\n",
"cursor.execute('DELETE FROM recipe WHERE name = ' + '\"' + recipeName + '\"')\n",
"print(cursor.rowcount)\n",
"if cursor.rowcount == 1:\n",
"messagebox.showinfo('Success', 'Recipe Deleted.')... | [
0,
4,
0,
4,
4,
0,
0,
0,
0,
4,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(self):...\n",
"VAR_6 = self.client.get('/api/apps')\n",
"VAR_8 = VAR_6.data['results'][0]['id']\n",
"self.assertTrue(self.client.login(VAR_1='autotest-2', VAR_2='password'))\n",
"VAR_5 = '/api/apps/{}/perms'.format(VAR_8)\n",
"VAR_7 = {'username': 'autotest-2'}\n",
"VAR_6 = self.client.post(... | [
"def test_create_errors(self):...\n",
"response = self.client.get('/api/apps')\n",
"app_id = response.data['results'][0]['id']\n",
"self.assertTrue(self.client.login(username='autotest-2', password='password'))\n",
"url = '/api/apps/{}/perms'.format(app_id)\n",
"body = {'username': 'autotest-2'}\n",
"re... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1(self):...\n",
"cmd.commands = self.orig_commands\n"
] | [
"def tearDown(self):...\n",
"cmd.commands = self.orig_commands\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"async def FUNC_9(VAR_6, VAR_7):...\n",
"VAR_8 = main.create_app()\n",
"VAR_8.on_startup.append(FUNC_11)\n",
"VAR_15 = await VAR_6(VAR_8)\n",
"VAR_16 = await VAR_15.get(VAR_7)\n",
"VAR_14 = await VAR_16.text()\n",
"return VAR_14\n"
] | [
"async def _get(test_client, path):...\n",
"app = main.create_app()\n",
"app.on_startup.append(_clean_tables)\n",
"client = await test_client(app)\n",
"resp = await client.get(path)\n",
"text = await resp.text()\n",
"return text\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"AsyncFunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(self, VAR_3):...\n",
"VAR_21 = {'cls': self.encoder} if self.encoder else {}\n",
"return json.dumps(VAR_3, **options)\n"
] | [
"def dumps(self, obj):...\n",
"options = {'cls': self.encoder} if self.encoder else {}\n",
"return json.dumps(obj, **options)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(VAR_1, VAR_2=None):...\n",
"if not 'instance' in VAR_1:\n",
"VAR_13 = VAR_1['instance']\n",
"FUNC_0(VAR_1)\n",
"if not 'content' in VAR_1:\n",
"VAR_1['content'] = CachedContent(VAR_13)\n",
"def FUNC_21(VAR_14, VAR_15):...\n",
"if not VAR_15 in VAR_1:\n",
"VAR_1[VAR_15] = CachedPoints(VAR... | [
"def _prepare_context(context, student=None):...\n",
"if not 'instance' in context:\n",
"instance = context['instance']\n",
"_prepare_now(context)\n",
"if not 'content' in context:\n",
"context['content'] = CachedContent(instance)\n",
"def points(user, key):...\n",
"if not key in context:\n",
"conte... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"FunctionDef'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_60(self):...\n",
"self._test_strtype('blob', bytearray(VAR_13), VAR_23(VAR_13))\n"
] | [
"def t(self):...\n",
"self._test_strtype('blob', bytearray(value), len(value))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_4(self):...\n",
"\"\"\"docstring\"\"\"\n",
"config.set(xsrf_token_key=None)\n",
"VAR_1 = utils.XsrfTool()\n",
"VAR_2 = VAR_1.generate_token(12345, 'test_action')\n",
"self.assertTrue(VAR_1.verify_token(VAR_2, 12345, 'test_action'))\n"
] | [
"def test_good_with_no_prior_key(self):...\n",
"\"\"\"docstring\"\"\"\n",
"config.set(xsrf_token_key=None)\n",
"tool = utils.XsrfTool()\n",
"token = tool.generate_token(12345, 'test_action')\n",
"self.assertTrue(tool.verify_token(token, 12345, 'test_action'))\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"@FUNC_6...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = users.find_one(VAR_1)\n",
"def FUNC_18(VAR_16):...\n",
"VAR_40 = ''\n",
"VAR_41 = 1\n",
"for item in VAR_16:\n",
"if not item[0]:\n",
"return VAR_40\n",
"VAR_40 += '{}. {}\\n'.format(VAR_41, item[0])\n",
"VAR_41 += 1\n"
] | [
"@cache_most_popular_items...\n",
"\"\"\"docstring\"\"\"\n",
"user = users.find_one(message)\n",
"def list_to_ordered_str_list(list_of_gadgets):...\n",
"string_roaster = ''\n",
"index = 1\n",
"for item in list_of_gadgets:\n",
"if not item[0]:\n",
"return string_roaster\n",
"string_roaster += '{}. ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"AugAssign'",
"AugAssign'"
] |
[
"def FUNC_19(self, VAR_8):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_8 = path.join(path.dirname(VAR_8), METADATA_FILENAME)\n",
"VAR_4 = self.getCaption(VAR_8)\n",
"return VAR_4\n"
] | [
"def getCaptionPic(self, pth):...\n",
"\"\"\"docstring\"\"\"\n",
"pth = path.join(path.dirname(pth), METADATA_FILENAME)\n",
"data = self.getCaption(pth)\n",
"return data\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_23():...\n",
""
] | [
"def stale_revision():...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_14(VAR_24=sys.argv):...\n",
"VAR_39 = FUNC_12(VAR_24)\n",
"if VAR_39.print_templates:\n",
"print(VAR_39.templates)\n",
"if not VAR_39.metadata:\n",
"return 0\n",
"if 'OS_CONFIG_FILES' in os.environ:\n",
"if VAR_39.templates is None:\n",
"VAR_28.error(e)\n",
"return 0\n",
"VAR_39.metada... | [
"def main(argv=sys.argv):...\n",
"opts = parse_opts(argv)\n",
"if opts.print_templates:\n",
"print(opts.templates)\n",
"if not opts.metadata:\n",
"return 0\n",
"if 'OS_CONFIG_FILES' in os.environ:\n",
"if opts.templates is None:\n",
"logger.error(e)\n",
"return 0\n",
"opts.metadata = os.environ[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Return'",
"Condition",
"Condition",
"Expr'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_1(self, VAR_1, VAR_2, VAR_5, VAR_6, VAR_4={}):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_22 = self.pool.get('stock.location')\n",
"VAR_23 = self.pool.get('account.move')\n",
"VAR_24 = self.pool.get('account.move.line')\n",
"VAR_25 = VAR_6.get('new_price', 0.0)\n",
"VAR_19 = VAR_6.get('stock_outpu... | [
"def do_change_standard_price(self, cr, uid, ids, datas, context={}):...\n",
"\"\"\"docstring\"\"\"\n",
"location_obj = self.pool.get('stock.location')\n",
"move_obj = self.pool.get('account.move')\n",
"move_line_obj = self.pool.get('account.move.line')\n",
"new_price = datas.get('new_price', 0.0)\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"For",
"For",
"Return'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Condit... |
[
"def FUNC_7(self, VAR_13, VAR_11, VAR_7, VAR_14, VAR_10):...\n",
"return []\n"
] | [
"def get_directories(self, levelctx, levelfields, searcher, ctxlist, client):...\n",
"return []\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self, VAR_5):...\n",
"self.common = self._init_common()\n",
"self._check_flags()\n",
"self.common.do_setup(VAR_5)\n"
] | [
"def do_setup(self, context):...\n",
"self.common = self._init_common()\n",
"self._check_flags()\n",
"self.common.do_setup(context)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1 = psycopg2.connect('dbname=forum')\n",
"VAR_2 = VAR_1.cursor()\n",
"VAR_2.execute(\"insert into posts values ('%s')\" % VAR_0)\n",
"VAR_1.commit()\n",
"VAR_1.close()\n"
] | [
"def add_post(content):...\n",
"\"\"\"docstring\"\"\"\n",
"conn = psycopg2.connect('dbname=forum')\n",
"cursor = conn.cursor()\n",
"cursor.execute(\"insert into posts values ('%s')\" % content)\n",
"conn.commit()\n",
"conn.close()\n"
] | [
0,
0,
0,
0,
4,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_9(self):...\n",
"VAR_7 = BokChoyTestSuite('', VAR_3=True)\n",
"VAR_1 = 'tests'\n",
"self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_3=True))\n"
] | [
"def test_verify_xss(self):...\n",
"suite = BokChoyTestSuite('', verify_xss=True)\n",
"name = 'tests'\n",
"self.assertEqual(suite.cmd, self._expected_command(name=name, verify_xss=True))\n"
] | [
0,
0,
0,
3
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1():...\n",
"VAR_13 = argparse.ArgumentParser(description='Stress tester for CMS')\n",
"VAR_13.add_argument('-c', '--contest-id', action='store', type=int,\n required=True, help='ID of the contest to test against')\n",
"VAR_13.add_argument('-n', '--actor-num', action='store', type=int, help=\n ... | [
"def main():...\n",
"parser = argparse.ArgumentParser(description='Stress tester for CMS')\n",
"parser.add_argument('-c', '--contest-id', action='store', type=int,\n required=True, help='ID of the contest to test against')\n",
"parser.add_argument('-n', '--actor-num', action='store', type=int, help=\n '... | [
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,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assert'",
"Assign'",
"Assert'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Return'",
"Assign'",
"A... |
[
"def FUNC_5(VAR_3, VAR_7, VAR_8=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {'currentProvider': None, 'providers': [], 'secondaryProviders': [],\n 'finishAuthUrl': None, 'errorMessage': None,\n 'registerFormSubmitButtonText': _('Create Account')}\n",
"if third_party_auth.is_enabled():\n",
"VAR_2... | [
"def _third_party_auth_context(request, redirect_to, tpa_hint=None):...\n",
"\"\"\"docstring\"\"\"\n",
"context = {'currentProvider': None, 'providers': [], 'secondaryProviders':\n [], 'finishAuthUrl': None, 'errorMessage': None,\n 'registerFormSubmitButtonText': _('Create Account')}\n",
"if third_party... | [
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",
"Assign'",
"Return'",
"Condition",
"For",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"For",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"import os\n",
"from posixpath import normpath\n",
"import re\n",
"import warnings\n",
"from wsgiref.headers import Headers\n",
"from wsgiref.util import FileWrapper\n",
"from .media_types import MediaTypes\n",
"from .scantree import scantree\n",
"from .responders import StaticFile, MissingFileError... | [
"import os\n",
"from posixpath import normpath\n",
"import re\n",
"import warnings\n",
"from wsgiref.headers import Headers\n",
"from wsgiref.util import FileWrapper\n",
"from .media_types import MediaTypes\n",
"from .scantree import scantree\n",
"from .responders import StaticFile, MissingFileError... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"For",
"Condition",
... |
[
"def FUNC_3(VAR_16):...\n",
"return VAR_16.first_name + ' ' + VAR_16.last_name\n"
] | [
"def get_private_display_name(this):...\n",
"return this.first_name + ' ' + this.last_name\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.