lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_5(self, **VAR_15):...\n",
"VAR_19 = self.executable + ' ' + self.arguments\n",
"for VAR_30 in ('filename', 'config_file'):\n",
"VAR_15[VAR_30] = escape_path_argument(VAR_15.get(VAR_30, '') or '')\n",
"return VAR_19.format(**kwargs)\n"
] | [
"def _create_command(self, **kwargs):...\n",
"command = self.executable + ' ' + self.arguments\n",
"for key in ('filename', 'config_file'):\n",
"kwargs[key] = escape_path_argument(kwargs.get(key, '') or '')\n",
"return command.format(**kwargs)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._remote\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._remote\n"
] | [
5,
0,
5
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_10(self):...\n",
"self.env_var_override.set('VERIFY_XSS', 'True')\n",
"VAR_7 = BokChoyTestSuite('')\n",
"VAR_1 = 'tests'\n",
"self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_3=True))\n"
] | [
"def test_verify_xss_env_var(self):...\n",
"self.env_var_override.set('VERIFY_XSS', 'True')\n",
"suite = BokChoyTestSuite('')\n",
"name = 'tests'\n",
"self.assertEqual(suite.cmd, self._expected_command(name=name, verify_xss=True))\n"
] | [
0,
3,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"@detail_route(methods=['post'])...\n",
"return self.set_pending_action(pending_actions.CANCEL, *VAR_13, **kwargs)\n"
] | [
"@detail_route(methods=['post'])...\n",
"return self.set_pending_action(pending_actions.CANCEL, *args, **kwargs)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"import logging\n",
"from django.contrib import admin\n",
"from django.contrib import messages\n",
"from checkcve.forms import CheckCVEForm, CheckCVEChangeForm\n",
"from checkcve.models import Checkcve, Software, WhiteList, Cve\n",
"from checkcve.utils import create_check_cve_task\n",
"VAR_0 = logging.g... | [
"import logging\n",
"from django.contrib import admin\n",
"from django.contrib import messages\n",
"from checkcve.forms import CheckCVEForm, CheckCVEChangeForm\n",
"from checkcve.models import Checkcve, Software, WhiteList, Cve\n",
"from checkcve.utils import create_check_cve_task\n",
"logger = logging.... | [
0,
0,
0,
0,
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'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"FunctionDef'",
"Expr'",
"Expr'",
"Fu... |
[
"def FUNC_5():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = FUNC_0()\n",
"VAR_4 = VAR_3.cursor()\n",
"VAR_5 = 'players'\n",
"VAR_4.execute('string' % (VAR_5,))\n",
"VAR_7 = VAR_4.fetchall()\n",
"VAR_3.commit()\n",
"VAR_3.close()\n",
"return VAR_7\n"
] | [
"def playerStandings():...\n",
"\"\"\"docstring\"\"\"\n",
"conn = connect()\n",
"c = conn.cursor()\n",
"table = 'players'\n",
"c.execute(\n \"\"\"SELECT playerID, \n playerName, ... | [
0,
0,
0,
0,
0,
4,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_6(VAR_8):...\n",
"\"\"\"docstring\"\"\"\n",
"return hasattr(VAR_8, '__self__') and VAR_8.__self__ is not None\n"
] | [
"def is_class_method(f):...\n",
"\"\"\"docstring\"\"\"\n",
"return hasattr(f, '__self__') and f.__self__ is not None\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_4(VAR_11):...\n",
"VAR_17 = []\n",
"for r in VAR_11:\n",
"VAR_18 = {'value': r[0], 'description': ', '.join(unique(cstr(d) for d in r if\n d)[1:])}\n",
"return VAR_17\n",
"VAR_17.append(VAR_18)\n"
] | [
"def build_for_autosuggest(res):...\n",
"results = []\n",
"for r in res:\n",
"out = {'value': r[0], 'description': ', '.join(unique(cstr(d) for d in r if\n d)[1:])}\n",
"return results\n",
"results.append(out)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'",
"Expr'"
] |
[
"def FUNC_13(self, VAR_10, VAR_11, VAR_12, VAR_13):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_24 = self.common._cli_run('createhost -persona %s -domain %s %s %s' % (\n VAR_13, VAR_12, VAR_10, ' '.join(VAR_11)), None)\n",
"if VAR_24 and len(VAR_24) > 1:\n",
"return self.common.parse_create_host_error(VAR_10,... | [
"def _create_3par_fibrechan_host(self, hostname, wwn, domain, persona_id):...\n",
"\"\"\"docstring\"\"\"\n",
"out = self.common._cli_run('createhost -persona %s -domain %s %s %s' % (\n persona_id, domain, hostname, ' '.join(wwn)), None)\n",
"if out and len(out) > 1:\n",
"return self.common.parse_create_h... | [
0,
0,
2,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"@login_required()...\n",
"VAR_24 = get_object_or_404(DataDocument, VAR_2=pk)\n",
"VAR_25 = Script.objects.get(title='Manual (dummy)', script_type='EX')\n",
"VAR_26, VAR_27 = ExtractedText.objects.get_or_create(data_document=doc,\n extraction_script=script)\n",
"if VAR_27:\n",
"VAR_26.doc_date = 'pleas... | [
"@login_required()...\n",
"doc = get_object_or_404(DataDocument, pk=pk)\n",
"script = Script.objects.get(title='Manual (dummy)', script_type='EX')\n",
"extext, created = ExtractedText.objects.get_or_create(data_document=doc,\n extraction_script=script)\n",
"if created:\n",
"extext.doc_date = 'please ad... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Return'",
"Expr'",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Assign'"
] |
[
"def FUNC_25(self):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"VAR_23 = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n",
"vimsupport.PostVimMessage(str(e))\n",
"if 'message' in VAR_23:\n",
"vimsupport.EchoText(VAR_23['message'])\n"
] | [
"def ShowDetailedDiagnostic(self):...\n",
"if not self._IsServerAlive():\n",
"return\n",
"debug_info = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n",
"vimsupport.PostVimMessage(str(e))\n",
"if 'message' in debug_info:\n",
"vimsupport.EchoText(debug_info['message'])\n"
... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_17(self, VAR_18):...\n",
"\"\"\"docstring\"\"\"\n",
"self._eql_execute('volume', 'select', VAR_18['volume_name'], 'snapshot',\n 'delete', VAR_18['name'])\n",
"VAR_0.error(_('Failed to delete snapshot %(snap)s of volume %(vol)s'), {\n 'snap': VAR_18['name'], 'vol': VAR_18['volume_name']})\n"
] | [
"def delete_snapshot(self, snapshot):...\n",
"\"\"\"docstring\"\"\"\n",
"self._eql_execute('volume', 'select', snapshot['volume_name'], 'snapshot',\n 'delete', snapshot['name'])\n",
"LOG.error(_('Failed to delete snapshot %(snap)s of volume %(vol)s'), {\n 'snap': snapshot['name'], 'vol': snapshot['volum... | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"return self.dag.priority(self)\n"
] | [
"@property...\n",
"return self.dag.priority(self)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_9(self, VAR_47, VAR_49):...\n",
"\"\"\"docstring\"\"\"\n",
"assert isinstance(VAR_47, list)\n",
"assert isinstance(VAR_49, dict)\n",
"for cond in self.extract_key_from_nested_dict(VAR_49, self.WHERE_CONDITION):\n",
"assert isinstance(cond, dict), 'where condition needs to be dict'\n",
"return ... | [
"def validate_group_by_data(self, group_by_fields, having):...\n",
"\"\"\"docstring\"\"\"\n",
"assert isinstance(group_by_fields, list)\n",
"assert isinstance(having, dict)\n",
"for cond in self.extract_key_from_nested_dict(having, self.WHERE_CONDITION):\n",
"assert isinstance(cond, dict), 'where conditio... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assert'",
"Assert'",
"For",
"Assert'",
"Return'",
"Assert'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.create_snapshot(VAR_8)\n",
"self.common.client_logout()\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.create_snapshot(snapshot)\n",
"self.common.client_logout()\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_15(self):...\n",
"self.assertTrue(zf._allowZip64)\n"
] | [
"def test_open_zipDefault(self):...\n",
"self.assertTrue(zf._allowZip64)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"return self.data['courses']\n"
] | [
"def courses(self):...\n",
"return self.data['courses']\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"return 'submit source %s for task %s (ID %d) %s' % (self.source_path, self.\n task[1], self.task[0], self.url)\n"
] | [
"def describe(self):...\n",
"return 'submit source %s for task %s (ID %d) %s' % (self.source_path, self.\n task[1], self.task[0], self.url)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"\"\"\"string\"\"\"\n",
"import os\n",
"import unittest\n",
"from mock import patch, call\n",
"from test.test_support import EnvironmentVarGuard\n",
"from paver.easy import BuildFailure\n",
"from pavelib.utils.test.suites import BokChoyTestSuite, Pa11yCrawler\n",
"VAR_0 = os.getcwd()\n",
"\"\"\"\n ... | [
"\"\"\"\nTests for the bok-choy paver commands themselves.\nRun just this test with: paver test_lib -t pavelib/paver_tests/test_paver_bok_choy_cmds.py\n\"\"\"\n",
"import os\n",
"import unittest\n",
"from mock import patch, call\n",
"from test.test_support import EnvironmentVarGuard\n",
"from paver.easy i... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_1(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_4() in VAR_0:\n",
"return True\n",
"return False\n"
] | [
"def has_meta(contents):...\n",
"\"\"\"docstring\"\"\"\n",
"if meta_separator() in contents:\n",
"return True\n",
"return False\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_12(self):...\n",
"self.object = self.report\n",
"self.template_name = self.access_template_name\n",
"VAR_24 = self.get_context_data(VAR_20=self._get_access_form())\n",
"return self.render_to_response(VAR_24)\n"
] | [
"def _render_access_form(self):...\n",
"self.object = self.report\n",
"self.template_name = self.access_template_name\n",
"context = self.get_context_data(form=self._get_access_form())\n",
"return self.render_to_response(context)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"return filter(lambda VAR_28: VAR_28.exists, self.expanded_output)\n"
] | [
"@property...\n",
"return filter(lambda f: f.exists, self.expanded_output)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_11(self, VAR_9, *VAR_13, **VAR_14):...\n",
"VAR_14['partial'] = True\n",
"return self.update(VAR_9, *VAR_13, **kwargs)\n"
] | [
"def partial_update(self, request, *args, **kwargs):...\n",
"kwargs['partial'] = True\n",
"return self.update(request, *args, **kwargs)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_22(self, VAR_6=1.0):...\n",
"if self._event is None:\n",
"return\n",
"if not self._event.wait(VAR_6):\n",
"VAR_44 = 'Timeout waiting for '\n",
"if isinstance(self, CLASS_4):\n",
"VAR_44 += 'Event {}'.format(self.name)\n",
"VAR_44 += 'Response {}'.format(self.name)\n"
] | [
"def wait(self, timeout=1.0):...\n",
"if self._event is None:\n",
"return\n",
"if not self._event.wait(timeout):\n",
"message = 'Timeout waiting for '\n",
"if isinstance(self, AwaitableEvent):\n",
"message += 'Event {}'.format(self.name)\n",
"message += 'Response {}'.format(self.name)\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"AugAssign'",
"AugAssign'"
] |
[
"def FUNC_5(self, VAR_7):...\n",
"return VAR_54.db.get_value(self.doctype, self.name, VAR_7)\n"
] | [
"def get_db_value(self, key):...\n",
"return frappe.db.get_value(self.doctype, self.name, key)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_37(self):...\n",
"VAR_81 = Priority.objects.filter(pk=self.new_value).exists()\n",
"if not VAR_81:\n",
"self.get_update_targets().update(**{str(self.target_field): self.new_value})\n"
] | [
"def _update_priority(self):...\n",
"exists = Priority.objects.filter(pk=self.new_value).exists()\n",
"if not exists:\n",
"self.get_update_targets().update(**{str(self.target_field): self.new_value})\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_7(VAR_11):...\n",
"return True\n"
] | [
"def directory_filter(_path):...\n",
"return True\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"return 'Running ssh host check for %s with pid %s' % (self.hostname, self.pid)\n"
] | [
"def info(self):...\n",
"return 'Running ssh host check for %s with pid %s' % (self.hostname, self.pid)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@api.public...\n",
"FUNC_31(self, 'POST')\n"
] | [
"@api.public...\n",
"record(self, 'POST')\n"
] | [
0,
0
] | [
"Condition",
"Expr'"
] |
[
"def FUNC_0(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_83.included_stack:\n",
"return None\n",
"return os.path.join(os.path.dirname(VAR_83.included_stack[-1]), VAR_0)\n"
] | [
"def srcdir(path):...\n",
"\"\"\"docstring\"\"\"\n",
"if not workflow.included_stack:\n",
"return None\n",
"return os.path.join(os.path.dirname(workflow.included_stack[-1]), path)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_25(VAR_3, VAR_6):...\n",
"VAR_38 = FUNC_1(VAR_3)\n",
"VAR_45, VAR_41 = VAR_38.accept()\n",
"return Connection(VAR_45, VAR_38)\n"
] | [
"def connect(addr, timeout):...\n",
"server = create_server(addr)\n",
"client, _ = server.accept()\n",
"return Connection(client, server)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n",
"from __future__ import unicode_literals\n",
"import json\n",
"import mock\n",
"import requests\n",
"from django.test import TransactionTestCase\n",
"from api.models import Build\n",
"def FUNC_0(*VAR... | [
"\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n",
"from __future__ import unicode_literals\n",
"import json\n",
"import mock\n",
"import requests\n",
"from django.test import TransactionTestCase\n",
"from api.models import Build\n",
"def mock_import... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"from __future__ import absolute_import\n",
"import logging\n",
"import time\n",
"from PyQt5.QtCore import QTimer, QUrl, pyqtSignal\n",
"from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest\n",
"import Tribler.Core.Utilities.json_util as json\n",
"VAR_0 = []\n",
"\"\"\"str... | [
"from __future__ import absolute_import\n",
"import logging\n",
"import time\n",
"from PyQt5.QtCore import QTimer, QUrl, pyqtSignal\n",
"from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest\n",
"import Tribler.Core.Utilities.json_util as json\n",
"received_events = []\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign... |
[
"def FUNC_3(VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = {'new': FUNC_8, 'tasks': FUNC_12, 'view': FUNC_11, 'complete':\n FUNC_6, 'analyze': FUNC_9}\n",
"return VAR_11[VAR_5]()\n",
"click.echo(chalk.red('Command does not exist!'))\n",
"click.echo('Try \"yoda goals --help\" for more info')\n"
] | [
"def check_sub_command(c):...\n",
"\"\"\"docstring\"\"\"\n",
"sub_commands = {'new': new_goal, 'tasks': view_related_tasks, 'view':\n list_goals, 'complete': complete_goal, 'analyze': goals_analysis}\n",
"return sub_commands[c]()\n",
"click.echo(chalk.red('Command does not exist!'))\n",
"click.echo('Tr... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'",
"Expr'",
"Expr'"
] |
[
"def __eq__(self, VAR_35):...\n",
"return self.__class__ == VAR_35.__class__ and self._flattened == VAR_35._flattened\n"
] | [
"def __eq__(self, other):...\n",
"return self.__class__ == other.__class__ and self._flattened == other._flattened\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_16(self):...\n",
"VAR_6 = None\n",
"VAR_6 = tempfile.NamedTemporaryFile(delete=False)\n",
"if VAR_6:\n",
"VAR_6.close()\n",
"os.remove(VAR_6.name)\n",
"os.chmod(VAR_6.name, stat.S_IREAD)\n",
"self._mox.StubOutWithMock(url_helper, 'UrlOpen')\n",
"url_helper.UrlOpen(mox.IgnoreArg(), method='... | [
"def testDownloadFileSavingErrors(self):...\n",
"file_readonly = None\n",
"file_readonly = tempfile.NamedTemporaryFile(delete=False)\n",
"if file_readonly:\n",
"file_readonly.close()\n",
"os.remove(file_readonly.name)\n",
"os.chmod(file_readonly.name, stat.S_IREAD)\n",
"self._mox.StubOutWithMock(url_h... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = {'message': {'opened': {'header': '', 'footer': ''}, 'updated': {\n 'header': '', 'footer': ''}}, 'scanner': {'diff_only': False},\n 'pycodestyle': {'ignore': [], 'max-line-length': 79, 'count': False,\n 'first': False, 'show-pep8': False, ... | [
"def get_config(data):...\n",
"\"\"\"docstring\"\"\"\n",
"config = {'message': {'opened': {'header': '', 'footer': ''}, 'updated': {\n 'header': '', 'footer': ''}}, 'scanner': {'diff_only': False},\n 'pycodestyle': {'ignore': [], 'max-line-length': 79, 'count': False,\n 'first': False, 'show-pep8': Fal... | [
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'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Return'",
"Expr'",
"Expr'",
"Expr'"
... |
[
"def FUNC_3(self, VAR_8, VAR_9):...\n",
"api.keystone.mapping_delete(VAR_8, VAR_9)\n"
] | [
"def delete(self, request, obj_id):...\n",
"api.keystone.mapping_delete(request, obj_id)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"self._check_key(VAR_1)\n"
] | [
"def test_ecdsa_key(self):...\n",
"self._check_key(ECDSA_PUBKEY)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@VAR_0.route('/email/verify/', defaults={'id_hash': None})...\n",
""
] | [
"@app.route('/email/verify/', defaults={'id_hash': None})...\n",
""
] | [
0,
0
] | [
"Condition",
"Condition"
] |
[
"def FUNC_3():...\n",
"def FUNC_12():...\n",
"VAR_18 = requests.get(FUNC_2('healthy'))\n",
"VAR_18.raise_for_status()\n",
"return VAR_18.json()\n"
] | [
"def _CheckServerIsHealthyWithCache():...\n",
"def _ServerIsHealthy():...\n",
"response = requests.get(_BuildUri('healthy'))\n",
"response.raise_for_status()\n",
"return response.json()\n"
] | [
0,
0,
7,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_1(self, VAR_0):...\n",
"self.__init__(VAR_4=False)\n",
"self.name = VAR_0.get('name')\n",
"self.vars = VAR_0.get('vars', dict())\n",
"self.address = VAR_0.get('address', '')\n",
"self._uuid = VAR_0.get('uuid', None)\n",
"self.implicit = VAR_0.get('implicit', False)\n",
"VAR_8 = VAR_0.get('gr... | [
"def deserialize(self, data):...\n",
"self.__init__(gen_uuid=False)\n",
"self.name = data.get('name')\n",
"self.vars = data.get('vars', dict())\n",
"self.address = data.get('address', '')\n",
"self._uuid = data.get('uuid', None)\n",
"self.implicit = data.get('implicit', False)\n",
"groups = data.get('... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_30(self):...\n",
"self.log.info('Initializing Evaluator')\n",
"from evproxy import EvaluatorProxy\n",
"def FUNC_39():...\n",
"from lib.evaluators.PyQt4Evaluator import Evaluator\n",
"return Evaluator()\n"
] | [
"def spawn_evaluators(self):...\n",
"self.log.info('Initializing Evaluator')\n",
"from evproxy import EvaluatorProxy\n",
"def ev_init():...\n",
"from lib.evaluators.PyQt4Evaluator import Evaluator\n",
"return Evaluator()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"ImportFrom'",
"FunctionDef'",
"ImportFrom'",
"Return'"
] |
[
"def FUNC_6(self, VAR_28):...\n",
"if VAR_28 is None:\n",
"VAR_28 = 0\n",
"return VAR_55(int(VAR_28), 0)\n"
] | [
"def run(self, count):...\n",
"if count is None:\n",
"count = 0\n",
"return max(int(count), 0)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_15 = 'sos-collector'\n",
"if self.config['label']:\n",
"VAR_15 += '-%s' % self.config['label']\n",
"if self.config['case_id']:\n",
"VAR_15 += '-%s' % self.config['case_id']\n",
"VAR_16 = datetime.strftime(datetime.now(), '%Y-%m-%d')\n",
"str... | [
"def _get_archive_name(self):...\n",
"\"\"\"docstring\"\"\"\n",
"nstr = 'sos-collector'\n",
"if self.config['label']:\n",
"nstr += '-%s' % self.config['label']\n",
"if self.config['case_id']:\n",
"nstr += '-%s' % self.config['case_id']\n",
"dt = datetime.strftime(datetime.now(), '%Y-%m-%d')\n",
"str... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"AugAssign'",
"Condition",
"AugAssign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"VAR_1 = bot.Bot(None, {}, 'https://localhost:1/',\n '1234-1a2b3c4-tainted-joe', 'base_dir', None)\n",
"VAR_2 = threading.Event()\n",
"VAR_1.call_later(0.001, VAR_2.set)\n",
"self.assertTrue(VAR_2.wait(1))\n"
] | [
"def test_bot_call_later(self):...\n",
"obj = bot.Bot(None, {}, 'https://localhost:1/', '1234-1a2b3c4-tainted-joe',\n 'base_dir', None)\n",
"ev = threading.Event()\n",
"obj.call_later(0.001, ev.set)\n",
"self.assertTrue(ev.wait(1))\n"
] | [
0,
5,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"import copy\n",
"import logging\n",
"import os\n",
"import sflock\n",
"from cuckoo.common.config import emit_options\n",
"from cuckoo.common.exceptions import CuckooOperationalError\n",
"from cuckoo.common.files import Folders, Files, Storage\n",
"from cuckoo.common.utils import validate_url, validat... | [
"import copy\n",
"import logging\n",
"import os\n",
"import sflock\n",
"from cuckoo.common.config import emit_options\n",
"from cuckoo.common.exceptions import CuckooOperationalError\n",
"from cuckoo.common.files import Folders, Files, Storage\n",
"from cuckoo.common.utils import validate_url, validat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"... |
[
"def FUNC_7(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('cipher-modes.py', VAR_2)\n"
] | [
"def test_cipher_modes(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'MEDIUM': 1}, 'CONFIDENCE': {'HIGH': 1}}\n",
"self.check_example('cipher-modes.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_10(self, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_27 = io.StringIO()\n",
"VAR_31 = connection.cursor()\n",
"VAR_31.execute('select * from wins_{};'.format(VAR_11))\n",
"VAR_30 = csv.writer(VAR_27)\n",
"VAR_32 = [i[0] for i in VAR_31.description]\n",
"VAR_30.writerow(VAR_32)\n",
"VAR... | [
"def _make_plain_csv(self, table):...\n",
"\"\"\"docstring\"\"\"\n",
"stringio = io.StringIO()\n",
"cursor = connection.cursor()\n",
"cursor.execute('select * from wins_{};'.format(table))\n",
"csv_writer = csv.writer(stringio)\n",
"header = [i[0] for i in cursor.description]\n",
"csv_writer.writerow(... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_15(self, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7={}):...\n",
"VAR_40 = {}\n",
"for VAR_23 in self.browse(VAR_2, VAR_3, VAR_4, VAR_7=context):\n",
"VAR_40[VAR_23.id] = self._str_get(VAR_23, VAR_25='===')\n",
"return VAR_40\n",
"VAR_54 = VAR_23.parent_id\n",
"VAR_24 = 0\n",
"while VAR_54:\n",... | [
"def _history_get(self, cr, uid, ids, name, args, context={}):...\n",
"result = {}\n",
"for task in self.browse(cr, uid, ids, context=context):\n",
"result[task.id] = self._str_get(task, border='===')\n",
"return result\n",
"t2 = task.parent_id\n",
"level = 0\n",
"while t2:\n",
"level -= 1\n",
"t3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"AugAssign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'"
] |
[
"def FUNC_2(self):...\n",
"VAR_5 = set(bot_main.get_dimensions(None))\n",
"VAR_5.discard('hidpi')\n",
"VAR_5.discard('zone')\n",
"VAR_6 = {'cores', 'cpu', 'gpu', 'id', 'machine_type', 'os', 'pool'}\n",
"self.assertEqual(VAR_6, VAR_5)\n"
] | [
"def test_get_dimensions(self):...\n",
"dimensions = set(bot_main.get_dimensions(None))\n",
"dimensions.discard('hidpi')\n",
"dimensions.discard('zone')\n",
"expected = {'cores', 'cpu', 'gpu', 'id', 'machine_type', 'os', 'pool'}\n",
"self.assertEqual(expected, dimensions)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_3(self, *VAR_4, **VAR_5):...\n",
"VAR_11 = self.REQUEST\n",
"VAR_14 = ['zmi']\n",
"VAR_14.append(VAR_11['lang'])\n",
"VAR_14.extend(map(lambda x: VAR_5[x], VAR_5.keys()))\n",
"VAR_14.append(self.meta_id)\n",
"VAR_15 = self.attr('internal_dict')\n",
"if isinstance(VAR_15, dict) and VAR_15.get... | [
"def zmi_body_class(self, *args, **kwargs):...\n",
"request = self.REQUEST\n",
"l = ['zmi']\n",
"l.append(request['lang'])\n",
"l.extend(map(lambda x: kwargs[x], kwargs.keys()))\n",
"l.append(self.meta_id)\n",
"internal_dict = self.attr('internal_dict')\n",
"if isinstance(internal_dict, dict) and inte... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_6(VAR_1, VAR_5=''):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_18 = VAR_17(VAR_1.name)\n",
"return VAR_16.pop(VAR_18, None)\n"
] | [
"def token_delete(remote, token=''):...\n",
"\"\"\"docstring\"\"\"\n",
"session_key = token_session_key(remote.name)\n",
"return session.pop(session_key, None)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_1(self, VAR_16, VAR_17=None, VAR_18=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if re.match('^https?://', VAR_16):\n",
"return VAR_16\n",
"return resolve_path(VAR_7=self.project, VAR_17=language, VAR_18=\n version_slug, VAR_16=filename)\n"
] | [
"def get_full_path(self, filename, language=None, version_slug=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if re.match('^https?://', filename):\n",
"return filename\n",
"return resolve_path(project=self.project, language=language, version_slug=\n version_slug, filename=filename)\n"
] | [
0,
0,
6,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_8(self):...\n",
"\"\"\"docstring\"\"\"\n",
"Log.add('Calculating distance matrix in higher-order network (k = ' + str(\n self.order) + ') ...', Severity.INFO)\n",
"VAR_16 = _co.defaultdict(lambda : _co.defaultdict(lambda : _np.inf))\n",
"for VAR_25 in self.nodes:\n",
"VAR_16[VAR_25][VAR_25] =... | [
"def getDistanceMatrix(self):...\n",
"\"\"\"docstring\"\"\"\n",
"Log.add('Calculating distance matrix in higher-order network (k = ' + str(\n self.order) + ') ...', Severity.INFO)\n",
"dist = _co.defaultdict(lambda : _co.defaultdict(lambda : _np.inf))\n",
"for v in self.nodes:\n",
"dist[v][v] = 0\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"For",
"Assign'",
"For",
"Assign'",
"For",
"For",
"Expr'",
"For",
"Return'",
"Condition",
"Assign'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"VAR_19 = self.common.get_volume_stats(VAR_5)\n",
"VAR_19['storage_protocol'] = 'iSCSI'\n",
"VAR_20 = self.configuration.safe_get('volume_backend_name')\n",
"VAR_19['volume_backend_name'] = VAR_20 or self.__class__.__name__... | [
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"stats = self.common.get_volume_stats(refresh)\n",
"stats['storage_protocol'] = 'iSCSI'\n",
"backend_name = self.configuration.safe_get('volume_backend_name')\n",
"stats['volume_backend_name'] = backend_name or self.__class... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_15(self, VAR_6):...\n",
""
] | [
"def set_priority(self, priority):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_18(self, VAR_36, VAR_37=None):...\n",
"VAR_37 = frappe.permissions.get_user_permission_doctypes(VAR_37, VAR_36)\n",
"VAR_1 = frappe.get_meta(self.doctype)\n",
"for doctypes in VAR_37:\n",
"VAR_65 = {}\n",
"VAR_59 = []\n",
"for VAR_6 in VAR_1.get_fields_to_check_permissions(doctypes):\n",
"VA... | [
"def add_user_permissions(self, user_permissions, user_permission_doctypes=None...\n",
"user_permission_doctypes = frappe.permissions.get_user_permission_doctypes(\n user_permission_doctypes, user_permissions)\n",
"meta = frappe.get_meta(self.doctype)\n",
"for doctypes in user_permission_doctypes:\n",
"m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"For",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"AugAssign'",
"Assign'"
] |
[
"def FUNC_16():...\n",
"VAR_19.join(timeout=self._connecttimeout)\n",
"if VAR_19.is_alive():\n",
"warnings.warn('timed out waiting for connection')\n",
"if self._session is None:\n",
"VAR_22 = 'unable to connect after {} secs'.format(self._connecttimeout)\n",
"if self._run_server_ex is None:\n",
"VAR_... | [
"def wait():...\n",
"t.join(timeout=self._connecttimeout)\n",
"if t.is_alive():\n",
"warnings.warn('timed out waiting for connection')\n",
"if self._session is None:\n",
"message = 'unable to connect after {} secs'.format(self._connecttimeout)\n",
"if self._run_server_ex is None:\n",
"message = messag... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Condition",
"Assign'"
] |
[
"def FUNC_2(self, VAR_4):...\n",
"if VAR_4:\n",
"VAR_23 = os.path.dirname(os.path.abspath(__file__))\n",
"VAR_24 = os.path.join(VAR_23, '..', '..', '..', VAR_4)\n",
"self.loader = XMLFile(FilePath(VAR_24))\n"
] | [
"def _set_loader(self, banner):...\n",
"if banner:\n",
"current_path = os.path.dirname(os.path.abspath(__file__))\n",
"banner_file_path = os.path.join(current_path, '..', '..', '..', banner)\n",
"self.loader = XMLFile(FilePath(banner_file_path))\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_4, VAR_5):...\n",
"def FUNC_16():...\n",
"VAR_38 = socket(AF_INET, SOCK_STREAM)\n",
"VAR_38.bind(('', 0))\n",
"VAR_39 = VAR_38.getsockname()[1]\n",
"VAR_38.close()\n",
"return VAR_39\n"
] | [
"def __init__(self, database, options):...\n",
"def find_open_port():...\n",
"sock = socket(AF_INET, SOCK_STREAM)\n",
"sock.bind(('', 0))\n",
"port = sock.getsockname()[1]\n",
"sock.close()\n",
"return port\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_9(self, VAR_9, VAR_10):...\n",
"if self._IsServerAlive():\n",
"return FUNC_9(VAR_9, VAR_10)\n"
] | [
"def SendCommandRequest(self, arguments, completer):...\n",
"if self._IsServerAlive():\n",
"return SendCommandRequest(arguments, completer)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'"
] |
[
"def FUNC_0(VAR_5):...\n",
"while not VAR_5.ok:\n",
"VAR_2.pop(-1)\n",
"print(f\"There are {VAR_2.count('NULL')} columns\")\n",
"VAR_2.extend([',', 'NULL', '--'])\n",
"return VAR_2\n",
"VAR_3['category'] = f\"Lifestyle{' '.join(VAR_2)}\"\n",
"VAR_5 = VAR_4.get(VAR_0, VAR_1=sqli)\n"
] | [
"def sqli_union_1_lab(response):...\n",
"while not response.ok:\n",
"null.pop(-1)\n",
"print(f\"There are {null.count('NULL')} columns\")\n",
"null.extend([',', 'NULL', '--'])\n",
"return null\n",
"sqli['category'] = f\"Lifestyle{' '.join(null)}\"\n",
"response = api_session.get(url, params=sqli)\n"
] | [
0,
4,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Return'",
"Assign'",
"Assign'"
] |
[
"def FUNC_17(self, VAR_2, VAR_3, VAR_4, VAR_27, VAR_28=0.0):...\n",
"return {'value': {'remaining_hours': VAR_27 - VAR_28}}\n"
] | [
"def onchange_planned(self, cr, uid, ids, planned, effective=0.0):...\n",
"return {'value': {'remaining_hours': planned - effective}}\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self, VAR_4, VAR_6):...\n",
"VAR_5 = 'select * from {} limit 10000'.format(VAR_6)\n",
"return self.execute_query(VAR_4, VAR_5)\n"
] | [
"def get_table_summary(self, connection_url, table_name):...\n",
"query = 'select * from {} limit 10000'.format(table_name)\n",
"return self.execute_query(connection_url, query)\n"
] | [
0,
4,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"@VAR_47.middleware('response')...\n",
"if VAR_51.status == 404 and VAR_6.path.endswith('/'):\n",
"VAR_61 = VAR_6.path.rstrip('/')\n",
"if VAR_6.query_string:\n",
"VAR_61 = '{}?{}'.format(VAR_61, VAR_6.query_string)\n",
"return response.redirect(VAR_61)\n"
] | [
"@app.middleware('response')...\n",
"if original_response.status == 404 and request.path.endswith('/'):\n",
"path = request.path.rstrip('/')\n",
"if request.query_string:\n",
"path = '{}?{}'.format(path, request.query_string)\n",
"return response.redirect(path)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_5(VAR_4):...\n",
"VAR_9 = FUNC_0()\n",
"VAR_10 = VAR_9.cursor()\n",
"VAR_10.execute('string'.format(VAR_4))\n",
"VAR_2.error('Execution failed with error: {}'.format(e))\n",
"VAR_17 = VAR_10.fetchone()[0] + 1\n",
"VAR_2.debug('Rank of {} found for name {}'.format(VAR_17, VAR_4))\n",
"VAR_9.c... | [
"def karma_rank(name):...\n",
"db = db_connect()\n",
"cursor = db.cursor()\n",
"cursor.execute(\n \"\"\"\n SELECT (SELECT COUNT(*) FROM people AS t2 WHERE t2.karma > t1.karma)\n AS row_Num FROM people AS t1 WHERE name='{}'\n \"\"\"\n .format(name))\n",
"logger.error('Execu... | [
0,
0,
0,
4,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_22(VAR_30, VAR_3):...\n",
"if not isinstance(VAR_30, _IOFile):\n",
"return IOFile(VAR_30, VAR_16=self)\n",
"return VAR_30.apply_wildcards(VAR_3, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n"
] | [
"def concretize_iofile(f, wildcards):...\n",
"if not isinstance(f, _IOFile):\n",
"return IOFile(f, rule=self)\n",
"return f.apply_wildcards(wildcards, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_7(self, VAR_19, VAR_17=None, VAR_18=None):...\n",
"if VAR_19.endswith('.html'):\n",
"VAR_0.debug('Redirecting %s', self)\n",
"VAR_19 = VAR_19[1:]\n",
"VAR_27 = re.sub('.html$', '/', VAR_19)\n",
"return self.get_full_path(VAR_16=to, VAR_17=language, VAR_18=version_slug)\n"
] | [
"def redirect_sphinx_htmldir(self, path, language=None, version_slug=None):...\n",
"if path.endswith('.html'):\n",
"log.debug('Redirecting %s', self)\n",
"path = path[1:]\n",
"to = re.sub('.html$', '/', path)\n",
"return self.get_full_path(filename=to, language=language, version_slug=\n version_slug)\n... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self, VAR_3):...\n",
"if VAR_3.name in self.host_names:\n",
"self.hosts.remove(VAR_3)\n",
"self._hosts.remove(VAR_3.name)\n",
"VAR_3.remove_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
"def remove_host(self, host):...\n",
"if host.name in self.host_names:\n",
"self.hosts.remove(host)\n",
"self._hosts.remove(host.name)\n",
"host.remove_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(self, VAR_10=None):...\n",
"VAR_25 = VAR_20.path.join(self.parlai_home, 'downloads')\n",
"VAR_26 = self.add_argument_group('Main ParlAI Arguments')\n",
"VAR_26.add_argument('-t', '--task', help=\n 'ParlAI task(s), e.g. \"babi:Task1\" or \"babi,cbt\"')\n",
"VAR_26.add_argument('--download-path... | [
"def add_parlai_args(self, args=None):...\n",
"default_downloads_path = os.path.join(self.parlai_home, 'downloads')\n",
"parlai = self.add_argument_group('Main ParlAI Arguments')\n",
"parlai.add_argument('-t', '--task', help=\n 'ParlAI task(s), e.g. \"babi:Task1\" or \"babi,cbt\"')\n",
"parlai.add_argume... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_13(self):...\n",
"VAR_19 = list(filter(lambda VAR_28: VAR_28.protected, self.expanded_output))\n",
"if VAR_19:\n"
] | [
"def check_protected_output(self):...\n",
"protected = list(filter(lambda f: f.protected, self.expanded_output))\n",
"if protected:\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition"
] |
[
"def FUNC_6(self, VAR_24, VAR_25):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_24[VAR_10] and os.path.exists(VAR_25) and not os.path.islink(VAR_25\n",
"VAR_24[VAR_10] = VAR_25\n"
] | [
"def update_realfile(self, f, realfile):...\n",
"\"\"\"docstring\"\"\"\n",
"if not f[A_REALFILE] and os.path.exists(realfile) and not os.path.islink(\n",
"f[A_REALFILE] = realfile\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'"
] |
[
"def FUNC_38(self):...\n",
"\"\"\"docstring\"\"\"\n",
"pyodbc.lowercase = True\n",
"self.cursor = self.cnxn.cursor()\n",
"self.cursor.execute('create table t1(Abc int, dEf int)')\n",
"self.cursor.execute('select * from t1')\n",
"VAR_27 = [VAR_32[0] for VAR_32 in self.cursor.description]\n",
"VAR_27.so... | [
"def test_lower_case(self):...\n",
"\"\"\"docstring\"\"\"\n",
"pyodbc.lowercase = True\n",
"self.cursor = self.cnxn.cursor()\n",
"self.cursor.execute('create table t1(Abc int, dEf int)')\n",
"self.cursor.execute('select * from t1')\n",
"names = [t[0] for t in self.cursor.description]\n",
"names.sort()... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_15 = ''\n",
"for x in VAR_2.split(' '):\n",
"if x not in VAR_15:\n",
"return VAR_15.rstrip()\n",
"VAR_15 += x + ' '\n"
] | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"deduped_string = ''\n",
"for x in string.split(' '):\n",
"if x not in deduped_string:\n",
"return deduped_string.rstrip()\n",
"deduped_string += x + ' '\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"For",
"Condition",
"Return'",
"AugAssign'"
] |
[
"def __init__(self, VAR_5):...\n",
"if isinstance(VAR_5, (list, tuple)):\n",
"self._resource_iters = [iter([(i, r) for i, r in enumerate(VAR_5)])]\n",
"self._resource_iters = [iter([(None, VAR_5)])]\n",
"self._field_iters = []\n",
"self._path = [(CLASS_0, CLASS_0, CLASS_0)]\n",
"self._resource_stack = [... | [
"def __init__(self, resource):...\n",
"if isinstance(resource, (list, tuple)):\n",
"self._resource_iters = [iter([(i, r) for i, r in enumerate(resource)])]\n",
"self._resource_iters = [iter([(None, resource)])]\n",
"self._field_iters = []\n",
"self._path = [(NotSupplied, NotSupplied, NotSupplied)]\n",
"... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(self, VAR_4):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_9 = \"SELECT tid FROM tids WHERE rowid = '\" + str(VAR_4) + \"'\"\n",
"self.query(VAR_9)\n",
"return self.c.fetchone()[0]\n"
] | [
"def tid_num_to_tid(self, tid_num):...\n",
"\"\"\"docstring\"\"\"\n",
"q = \"SELECT tid FROM tids WHERE rowid = '\" + str(tid_num) + \"'\"\n",
"self.query(q)\n",
"return self.c.fetchone()[0]\n"
] | [
0,
0,
4,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_9(self):...\n",
"return combine_vars(self.vars, self.get_magic_vars())\n"
] | [
"def get_vars(self):...\n",
"return combine_vars(self.vars, self.get_magic_vars())\n"
] | [
0,
0
] | [
"FunctionDef'",
"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 __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n",
"CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n",
"self.redirect = VAR_20\n"
] | [
"def __init__(self, param, redirect=True, *a, **kw):...\n",
"Validator.__init__(self, param, *a, **kw)\n",
"self.redirect = redirect\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_4(self, VAR_7, VAR_12):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_17 = []\n",
"VAR_2 = VAR_1.view_submit(VAR_7)\n",
"for entry in VAR_12['file_selection']:\n",
"VAR_10 = copy.deepcopy(VAR_12['global'])\n",
"return VAR_17\n",
"VAR_10.update(entry)\n",
"VAR_11 = copy.deepcopy(VAR_12['global']['... | [
"def submit(self, submit_id, config):...\n",
"\"\"\"docstring\"\"\"\n",
"ret = []\n",
"submit = db.view_submit(submit_id)\n",
"for entry in config['file_selection']:\n",
"info = copy.deepcopy(config['global'])\n",
"return ret\n",
"info.update(entry)\n",
"options = copy.deepcopy(config['global']['opt... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
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'",
"For",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"... |
[
"def __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n",
"CLASS_6.__init__(self, VAR_7, *VAR_15, VAR_20=redirect, **kw)\n"
] | [
"def __init__(self, param, redirect=True, *a, **kw):...\n",
"VMeetup.__init__(self, param, *a, redirect=redirect, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_18(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_60 = self._get_smb_connection()\n",
"if VAR_60 and VAR_60.connect(CLASS_1.smb_ip, CLASS_1.smb_port):\n",
"VAR_65 = self.env['ir.config_parameter']\n",
"VAR_66 = VAR_65.get_param('partner_compassion.share_on_nas')\n",
"VAR_67 = VAR_65.get_param('... | [
"def _secure_save_data(self):...\n",
"\"\"\"docstring\"\"\"\n",
"smb_conn = self._get_smb_connection()\n",
"if smb_conn and smb_conn.connect(SmbConfig.smb_ip, SmbConfig.smb_port):\n",
"config_obj = self.env['ir.config_parameter']\n",
"share_nas = config_obj.get_param('partner_compassion.share_on_nas')\n",... | [
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'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_4(self):...\n",
"VAR_1 = ['DTXSID9022528', 'DTXSID1020273', 'DTXSID6026296', 'DTXSID2021781']\n",
"VAR_2 = stats_by_dtxsids(VAR_1)\n",
"for e in VAR_2:\n",
"if e['sid'] == 'DTXSID9022528':\n",
"self.assertEqual(0, VAR_3['products_n'],\n 'There should be 0 products associated with ethy... | [
"def test_dtxsid_products_n(self):...\n",
"dtxs = ['DTXSID9022528', 'DTXSID1020273', 'DTXSID6026296', 'DTXSID2021781']\n",
"stats = stats_by_dtxsids(dtxs)\n",
"for e in stats:\n",
"if e['sid'] == 'DTXSID9022528':\n",
"self.assertEqual(0, ethylparaben_stats['products_n'],\n 'There should be 0 products ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"For",
"Condition",
"Expr'",
"Assign'"
] |
[
"def FUNC_6(self, VAR_66, VAR_23):...\n",
"if VAR_66:\n",
"VAR_103 = cache.get(VAR_100(self.cache_prefix + '_' + VAR_66))\n",
"VAR_101.errors.add(errors.EXPIRED)\n",
"VAR_15 = Account._byID(VAR_103, data=True)\n",
"return None\n",
"if VAR_23 and VAR_15.name.lower() != VAR_23.lower():\n",
"VAR_101.erro... | [
"def run(self, key, name):...\n",
"if key:\n",
"uid = cache.get(str(self.cache_prefix + '_' + key))\n",
"c.errors.add(errors.EXPIRED)\n",
"a = Account._byID(uid, data=True)\n",
"return None\n",
"if name and a.name.lower() != name.lower():\n",
"c.errors.add(errors.BAD_USERNAME)\n",
"if a:\n",
"retu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Condition",
"Return'"
] |
[
"def FUNC_16(self):...\n",
"self.assertEqual(self.driver._get_space_in_gb('123.0GB'), 123.0)\n",
"self.assertEqual(self.driver._get_space_in_gb('123.0TB'), 123.0 * 1024)\n",
"self.assertEqual(self.driver._get_space_in_gb('1024.0MB'), 1.0)\n"
] | [
"def test_get_space_in_gb(self):...\n",
"self.assertEqual(self.driver._get_space_in_gb('123.0GB'), 123.0)\n",
"self.assertEqual(self.driver._get_space_in_gb('123.0TB'), 123.0 * 1024)\n",
"self.assertEqual(self.driver._get_space_in_gb('1024.0MB'), 1.0)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(self, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {}\n",
"VAR_5['clusterName'] = self.configuration.san_clustername\n",
"if self.configuration.san_thin_provision:\n",
"VAR_5['thinProvision'] = '1'\n",
"VAR_5['thinProvision'] = '0'\n",
"VAR_5['volumeName'] = VAR_10['name']\n",
"if... | [
"def create_volume(self, volume):...\n",
"\"\"\"docstring\"\"\"\n",
"cliq_args = {}\n",
"cliq_args['clusterName'] = self.configuration.san_clustername\n",
"if self.configuration.san_thin_provision:\n",
"cliq_args['thinProvision'] = '1'\n",
"cliq_args['thinProvision'] = '0'\n",
"cliq_args['volumeName']... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(self, VAR_3=True):...\n",
"VAR_20 = self.result['dut_serial_port'] + ', ' + str(self.result['id']\n ) + ': ' + self.result['outcome_category'] + ' - ' + self.result['outcome']\n",
"if self.result['data_diff'] is not None and self.result['data_diff'] < 1.0:\n",
"VAR_20 += ' {0:.2f}%'.format(max(... | [
"def log_result(self, create_result=True):...\n",
"out = self.result['dut_serial_port'] + ', ' + str(self.result['id']\n ) + ': ' + self.result['outcome_category'] + ' - ' + self.result['outcome']\n",
"if self.result['data_diff'] is not None and self.result['data_diff'] < 1.0:\n",
"out += ' {0:.2f}%'.forma... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"AugAssign'",
"Expr'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_17(self):...\n",
""
] | [
"def touch(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_39(VAR_101):...\n",
"VAR_101.priority = VAR_77\n",
"return VAR_101\n"
] | [
"def decorate(ruleinfo):...\n",
"ruleinfo.priority = priority\n",
"return ruleinfo\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"@mock.patch('requests.post', FUNC_0)...\n",
"\"\"\"docstring\"\"\"\n",
"self.client.login(username='autotest2', password='password')\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",
"self.client.login(usernam... | [
"@mock.patch('requests.post', mock_import_repository_task)...\n",
"\"\"\"docstring\"\"\"\n",
"self.client.login(username='autotest2', password='password')\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
... | [
0,
0,
5,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6=False,...\n",
"self.map_pos = Point()\n",
"self.map_angle = 0\n",
"self._path = None\n",
"Localization.__init__(self, VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5)\n",
"Navigation.__init__(self, VAR_6=jerky, VAR_7=walking_speed)\n",
"self._... | [
"def __init__(self, point_ids, locations, neighbors, landmark_ids,...\n",
"self.map_pos = Point()\n",
"self.map_angle = 0\n",
"self._path = None\n",
"Localization.__init__(self, point_ids, locations, neighbors, landmark_ids,\n landmark_positions, landmark_angles)\n",
"Navigation.__init__(self, jerky=je... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Condition"
] |
[
"import json\n",
"import multiprocessing\n",
"from leap.mail.adaptors.soledad import SoledadMailAdaptor\n",
"from leap.srp_session import SRPSession\n",
"from mockito import mock\n",
"import os\n",
"import shutil\n",
"import time\n",
"import uuid\n",
"import random\n",
"from leap.mail.imap.accou... | [
"import json\n",
"import multiprocessing\n",
"from leap.mail.adaptors.soledad import SoledadMailAdaptor\n",
"from leap.srp_session import SRPSession\n",
"from mockito import mock\n",
"import os\n",
"import shutil\n",
"import time\n",
"import uuid\n",
"import random\n",
"from leap.mail.imap.accou... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Imp... |
[
"@auth.require(acl.is_bot)...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_28, VAR_14, VAR_9, VAR_25, VAR_24, VAR_26 = self._process()\n",
"VAR_15 = VAR_25.get('sleep_streak', 0)\n",
"VAR_16 = bool(VAR_26)\n",
"VAR_30 = 'bot_inactive' if VAR_16 else 'bot_active'\n",
"stats.add_entry(VAR_30=action, VAR_14=bot_id,... | [
"@auth.require(acl.is_bot)...\n",
"\"\"\"docstring\"\"\"\n",
"_request, bot_id, version, state, dimensions, quarantined_msg = self._process()\n",
"sleep_streak = state.get('sleep_streak', 0)\n",
"quarantined = bool(quarantined_msg)\n",
"action = 'bot_inactive' if quarantined else 'bot_active'\n",
"stats... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Return'",
"Expr'",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Condit... |
[
"def FUNC_2(VAR_4, VAR_10, VAR_11, VAR_12=None, VAR_9=None):...\n",
"VAR_16 = collect_config.collect_config(VAR_4, VAR_9)\n",
"VAR_23 = VAR_10.split('.')\n",
"for VAR_10 in VAR_23:\n",
"value_types.ensure_type(str(VAR_16), VAR_11)\n",
"VAR_16 = VAR_16[VAR_10]\n",
"if VAR_12 is not None:\n",
"print(str... | [
"def print_key(config_path, key, type_name, default=None, fallback_metadata=None...\n",
"config = collect_config.collect_config(config_path, fallback_metadata)\n",
"keys = key.split('.')\n",
"for key in keys:\n",
"value_types.ensure_type(str(config), type_name)\n",
"config = config[key]\n",
"if default ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_3(VAR_2, VAR_3):...\n",
"VAR_11 = crypt.crypt(VAR_3, '22')\n",
"os.system('useradd -G docker,wheel -p ' + VAR_11 + ' ' + VAR_2)\n"
] | [
"def add_user(username, password):...\n",
"encPass = crypt.crypt(password, '22')\n",
"os.system('useradd -G docker,wheel -p ' + encPass + ' ' + username)\n"
] | [
0,
0,
7
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_8(VAR_12, VAR_3, VAR_4=-1):...\n",
"VAR_7 = VAR_12[0]\n",
"VAR_15 = VAR_12[1]\n",
"VAR_25 = 1 << VAR_15 - 1\n",
"return (VAR_7 & VAR_25 - 1) - (VAR_7 & VAR_25)\n"
] | [
"def signExtend(params, symbols, symId=-1):...\n",
"x = params[0]\n",
"i = params[1]\n",
"sign_bit = 1 << i - 1\n",
"return (x & sign_bit - 1) - (x & sign_bit)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@staticmethod...\n",
"return openid.create_login_url(VAR_3, VAR_23)\n"
] | [
"@staticmethod...\n",
"return openid.create_login_url(request, dest_url)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_24(VAR_36):...\n",
"return type(VAR_36).__name__ == 'cython_function_or_method'\n"
] | [
"def check_cython(x):...\n",
"return type(x).__name__ == 'cython_function_or_method'\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __gt__(self, VAR_11):...\n",
"return self.rule.__gt__(VAR_11.rule)\n"
] | [
"def __gt__(self, other):...\n",
"return self.rule.__gt__(other.rule)\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.