lines
listlengths
1
383
raw_lines
listlengths
1
383
label
listlengths
1
383
type
listlengths
1
383
[ "@override_settings(LOGIN_REDIRECT_URL='/custom/')...\n", "self.assertLoginRedirectURLEqual('/custom/')\n" ]
[ "@override_settings(LOGIN_REDIRECT_URL='/custom/')...\n", "self.assertLoginRedirectURLEqual('/custom/')\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "def FUNC_44(VAR_15):...\n", "\"\"\"docstring\"\"\"\n", "VAR_108 = VAR_15.replace('\\\\', '/')\n", "if os.path.isabs(VAR_108) and os.path.isfile(VAR_108):\n", "VAR_168, VAR_5 = os.path.split(VAR_108)\n", "return ''\n", "VAR_11, VAR_169 = os.path.splitext(VAR_5)\n", "VAR_3 = FUNC_5()\n", "VAR_170 = {...
[ "def make_link(path):...\n", "\"\"\"docstring\"\"\"\n", "tryFile = path.replace('\\\\', '/')\n", "if os.path.isabs(tryFile) and os.path.isfile(tryFile):\n", "folder, filename = os.path.split(tryFile)\n", "return ''\n", "base, ext = os.path.splitext(filename)\n", "app = get_app()\n", "editable = {'co...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Return'" ]
[ "def FUNC_0(VAR_2, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "for i in range(min(5, VAR_3)):\n", "yield VAR_2 + i\n", "for i in range(VAR_3 - 5):\n", "yield max(1, VAR_2 + random.randint(-2 * VAR_3, 2 * VAR_3))\n" ]
[ "def random_ports(port, n):...\n", "\"\"\"docstring\"\"\"\n", "for i in range(min(5, n)):\n", "yield port + i\n", "for i in range(n - 5):\n", "yield max(1, port + random.randint(-2 * n, 2 * n))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'", "For", "Expr'" ]
[ "async def FUNC_45(self, VAR_50: List[str], VAR_11: str) ->Optional[dict]:...\n", "\"\"\"docstring\"\"\"\n", "for host in VAR_50:\n", "VAR_168 = await self.federation_client.get_room_complexity(host, VAR_11)\n", "return None\n", "if VAR_168:\n", "return VAR_168\n" ]
[ "async def get_room_complexity(self, remote_room_hosts: List[str], room_id: str...\n", "\"\"\"docstring\"\"\"\n", "for host in remote_room_hosts:\n", "res = await self.federation_client.get_room_complexity(host, room_id)\n", "return None\n", "if res:\n", "return res\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "For", "Assign'", "Return'", "Condition", "Return'" ]
[ "def FUNC_4(VAR_14, VAR_18=4):...\n", "VAR_14 = VAR_3.sub('\\n', VAR_14)\n", "VAR_14 = VAR_14.expandtabs(VAR_18)\n", "VAR_14 = VAR_14.replace('␤', '\\n')\n", "VAR_21 = re.compile('^ +$', re.M)\n", "return VAR_21.sub('', VAR_14)\n" ]
[ "def preprocessing(text, tab=4):...\n", "text = _newline_pattern.sub('\\n', text)\n", "text = text.expandtabs(tab)\n", "text = text.replace('␤', '\\n')\n", "pattern = re.compile('^ +$', re.M)\n", "return pattern.sub('', text)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_2(self, VAR_5, VAR_6, *VAR_21, **VAR_22):...\n", "VAR_31 = self.rel.to\n", "VAR_36 = VAR_31._meta.app_label, VAR_31._meta.model_name\n", "self.widget.choices = self.choices\n", "VAR_27 = [self.widget.render(VAR_5, VAR_6, *VAR_21, **kwargs)]\n", "if self.can_add_related:\n", "VAR_38 = reverse('...
[ "def render(self, name, value, *args, **kwargs):...\n", "rel_to = self.rel.to\n", "info = rel_to._meta.app_label, rel_to._meta.model_name\n", "self.widget.choices = self.choices\n", "output = [self.widget.render(name, value, *args, **kwargs)]\n", "if self.can_add_related:\n", "related_url = reverse('adm...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Expr'" ]
[ "def FUNC_1(self, VAR_4, VAR_5, VAR_6):...\n", "self.room_id = self.helper.create_room_as(self.user_id)\n", "self.helper.join(self.room_id, VAR_2='@jim:red')\n" ]
[ "def prepare(self, reactor, clock, hs):...\n", "self.room_id = self.helper.create_room_as(self.user_id)\n", "self.helper.join(self.room_id, user='@jim:red')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_27(self):...\n", "self.assert_expected(self.folder.t, 'InterpolationInContent.html')\n" ]
[ "def testInterpolationInContent(self):...\n", "self.assert_expected(self.folder.t, 'InterpolationInContent.html')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_4(self):...\n", "from openapi_python_client.parser.properties import EnumProperty\n", "VAR_23 = ['abc', '123', 'a23', '1bc']\n", "VAR_24 = VAR_27.values_from_list(VAR_23)\n", "assert VAR_24 == {'ABC': 'abc', 'VALUE_1': '123', 'A23': 'a23', 'VALUE_3':\n '1bc'}\n" ]
[ "def test_values_from_list(self):...\n", "from openapi_python_client.parser.properties import EnumProperty\n", "data = ['abc', '123', 'a23', '1bc']\n", "result = EnumProperty.values_from_list(data)\n", "assert result == {'ABC': 'abc', 'VALUE_1': '123', 'A23': 'a23', 'VALUE_3':\n '1bc'}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Assign'", "Assign'", "Assert'" ]
[ "@pytest.mark.posix...\n", "assert filescheme.is_root(VAR_9) == VAR_10\n" ]
[ "@pytest.mark.posix...\n", "assert filescheme.is_root(directory) == is_root\n" ]
[ 0, 0 ]
[ "Condition", "Assert'" ]
[ "def FUNC_73(self, VAR_2, VAR_8, VAR_175):...\n", "\"\"\"docstring\"\"\"\n", "VAR_203 = VAR_8.getEventContext()\n", "VAR_24 = {}\n", "for VAR_167 in ['sessionId', 'sessionUuid', 'userId', 'userName', 'groupId',\n", "if hasattr(VAR_203, VAR_167):\n", "return JsonResponse({'success': True, 'eventContext':...
[ "def handle_logged_in(self, request, conn, connector):...\n", "\"\"\"docstring\"\"\"\n", "c = conn.getEventContext()\n", "ctx = {}\n", "for a in ['sessionId', 'sessionUuid', 'userId', 'userName', 'groupId',\n", "if hasattr(c, a):\n", "return JsonResponse({'success': True, 'eventContext': ctx})\n", "ct...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'" ]
[ "def FUNC_57(self):...\n", "\"\"\"docstring\"\"\"\n", "self.loggedIn = True\n" ]
[ "def logIn(self):...\n", "\"\"\"docstring\"\"\"\n", "self.loggedIn = True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "def FUNC_1(VAR_7, **VAR_8):...\n", "if not VAR_7.user.is_authenticated:\n", "return redirect(VAR_7.GET.get('next', reverse(settings.LOGIN_URL)))\n", "if VAR_7.method == 'POST':\n", "return VAR_2(VAR_7, **kwargs)\n", "return render(VAR_7, 'spirit/user/auth/logout.html')\n" ]
[ "def custom_logout(request, **kwargs):...\n", "if not request.user.is_authenticated:\n", "return redirect(request.GET.get('next', reverse(settings.LOGIN_URL)))\n", "if request.method == 'POST':\n", "return _logout_view(request, **kwargs)\n", "return render(request, 'spirit/user/auth/logout.html')\n" ]
[ 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_11(self, VAR_1):...\n", "VAR_29 = VAR_1.patch(f'{VAR_0}._string_based_property')\n", "VAR_5 = VAR_1.MagicMock()\n", "VAR_26 = VAR_1.MagicMock()\n", "VAR_23 = oai.Schema.construct(type='string')\n", "from openapi_python_client.parser.properties import property_from_data\n", "VAR_4 = property_fr...
[ "def test_property_from_data_string(self, mocker):...\n", "_string_based_property = mocker.patch(f'{MODULE_NAME}._string_based_property')\n", "name = mocker.MagicMock()\n", "required = mocker.MagicMock()\n", "data = oai.Schema.construct(type='string')\n", "from openapi_python_client.parser.properties impo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "ImportFrom'", "Assign'", "Assert'", "Expr'" ]
[ "def FUNC_11(self, VAR_55):...\n", "\"\"\"docstring\"\"\"\n", "VAR_81 = []\n", "self._kill_elements(VAR_55, lambda VAR_15: VAR_6.search(VAR_15.text), etree\n .Comment)\n" ]
[ "def kill_conditional_comments(self, doc):...\n", "\"\"\"docstring\"\"\"\n", "bad = []\n", "self._kill_elements(doc, lambda el: _conditional_comment_re.search(el.text),\n etree.Comment)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_5(VAR_11):...\n", "return os.path.join(VAR_3, VAR_11)\n" ]
[ "def _get_obj_absolute_path(obj_path):...\n", "return os.path.join(DATAROOT, obj_path)\n" ]
[ 0, 1 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(VAR_0, VAR_2, VAR_3):...\n", "VAR_7 = Topic.objects.get_public_or_404(VAR_2, VAR_0.user)\n", "if VAR_7.slug != VAR_3:\n", "return HttpResponsePermanentRedirect(VAR_7.get_absolute_url())\n", "utils.topic_viewed(VAR_0=request, VAR_7=topic)\n", "VAR_8 = Comment.objects.for_topic(VAR_7=topic).with...
[ "def detail(request, pk, slug):...\n", "topic = Topic.objects.get_public_or_404(pk, request.user)\n", "if topic.slug != slug:\n", "return HttpResponsePermanentRedirect(topic.get_absolute_url())\n", "utils.topic_viewed(request=request, topic=topic)\n", "comments = Comment.objects.for_topic(topic=topic).wit...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_88(*VAR_79, **VAR_42):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.utils.formatters\n", "return frappe.utils.formatters.format_value(*VAR_79, **kwargs)\n" ]
[ "def format_value(*args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "import frappe.utils.formatters\n", "return frappe.utils.formatters.format_value(*args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Return'" ]
[ "@VAR_1.route('/ajax/editbooks/<param>', methods=['POST'])...\n", "VAR_79 = VAR_32.form.to_dict()\n", "VAR_17 = calibre_db.get_book(VAR_79['pk'])\n", "VAR_80 = ''\n", "if VAR_43 == 'series_index':\n", "FUNC_18(VAR_79['value'], VAR_17)\n", "if VAR_43 == 'tags':\n", "VAR_80 = Response(json.dumps({'succe...
[ "@editbook.route('/ajax/editbooks/<param>', methods=['POST'])...\n", "vals = request.form.to_dict()\n", "book = calibre_db.get_book(vals['pk'])\n", "ret = ''\n", "if param == 'series_index':\n", "edit_book_series_index(vals['value'], book)\n", "if param == 'tags':\n", "ret = Response(json.dumps({'succ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Return'", "Assign'", "Expr'", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Con...
[ "def __post_init__(self) ->None:...\n", "super().__post_init__()\n", "if self.default is not None:\n", "self.default = (\n f'field(default_factory=lambda: cast({self.get_type_string()}, {self.default}))'\n )\n" ]
[ "def __post_init__(self) ->None:...\n", "super().__post_init__()\n", "if self.default is not None:\n", "self.default = (\n f'field(default_factory=lambda: cast({self.get_type_string()}, {self.default}))'\n )\n" ]
[ 0, 5, 5, 5 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'" ]
[ "def FUNC_13(VAR_13):...\n", "\"\"\"docstring\"\"\"\n", "VAR_31 = LOG_LEVELS.get(str(VAR_13.get('log_level')).lower(), logging.NOTSET)\n", "if VAR_31 < logging.INFO:\n", "VAR_0.warning(\n 'Insecure logging configuration detected! Sensitive data may be logged.')\n" ]
[ "def verify_log(opts):...\n", "\"\"\"docstring\"\"\"\n", "level = LOG_LEVELS.get(str(opts.get('log_level')).lower(), logging.NOTSET)\n", "if level < logging.INFO:\n", "log.warning(\n 'Insecure logging configuration detected! Sensitive data may be logged.')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'" ]
[ "@defer.inlineCallbacks...\n", "VAR_7 = {'room': {'state': {'types': ['m.*']}}}\n", "VAR_8 = yield defer.ensureDeferred(self.filtering.add_user_filter(VAR_0=\n user_localpart, VAR_10=user_filter_json))\n", "self.assertEquals(VAR_8, 0)\n", "self.assertEquals(VAR_7, (yield defer.ensureDeferred(self.datasto...
[ "@defer.inlineCallbacks...\n", "user_filter_json = {'room': {'state': {'types': ['m.*']}}}\n", "filter_id = yield defer.ensureDeferred(self.filtering.add_user_filter(\n user_localpart=user_localpart, user_filter=user_filter_json))\n", "self.assertEquals(filter_id, 0)\n", "self.assertEquals(user_filter_js...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_11(self, VAR_11):...\n", "VAR_60 = self.download_check_files(VAR_11)\n", "if VAR_60 == 'not_permitted':\n", "return 'You are not allowed to download files.'\n", "if VAR_60 == 'invalid_file':\n", "return 'Error: invalid filename found in {list}'.format(list=filelist)\n", "if VAR_60 == 'too_big'...
[ "def api_downloadcheck(self, filelist):...\n", "status = self.download_check_files(filelist)\n", "if status == 'not_permitted':\n", "return 'You are not allowed to download files.'\n", "if status == 'invalid_file':\n", "return 'Error: invalid filename found in {list}'.format(list=filelist)\n", "if statu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Assign'", "Condition", "Return'", "Return'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_52(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_69 = self.get_doc_before_save()\n", "if self._action == 'save':\n", "self.run_method('on_update')\n", "if self._action == 'submit':\n", "self.clear_cache()\n", "self.run_method('on_update')\n", "if self._action == 'cancel':\n", "self.notif...
[ "def run_post_save_methods(self):...\n", "\"\"\"docstring\"\"\"\n", "doc_before_save = self.get_doc_before_save()\n", "if self._action == 'save':\n", "self.run_method('on_update')\n", "if self._action == 'submit':\n", "self.clear_cache()\n", "self.run_method('on_update')\n", "if self._action == 'can...
[ 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", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Assign'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_87 = FUNC_0(VAR_2, 'page', 1)\n", "return HttpResponseBadRequest('Invalid parameter value')\n", "if not VAR_5.isValidGroup(VAR_20):\n", "VAR_88 = FUNC_0(VAR_2, 'limit', settings.PAGE)\n", "return HttpResponseForbidden('Not a member of Group: %s' ...
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "page = get_long_or_default(request, 'page', 1)\n", "return HttpResponseBadRequest('Invalid parameter value')\n", "if not conn.isValidGroup(group_id):\n", "limit = get_long_or_default(request, 'limit', settings.PAGE)\n", "return HttpResponseForbidden(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Return'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "@staticmethod...\n", "VAR_26 = VAR_13(VAR_24.text)\n", "if not VAR_26:\n" ]
[ "@staticmethod...\n", "is_valid = function(document.text)\n", "if not is_valid:\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Condition" ]
[ "def FUNC_36(self):...\n", "return self._queryset\n" ]
[ "def _get_queryset(self):...\n", "return self._queryset\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_11(VAR_37):...\n", "VAR_4, VAR_39 = VAR_37\n", "VAR_25.write(VAR_4)\n", "return VAR_39\n" ]
[ "def write_to(r):...\n", "data, response = r\n", "output_stream.write(data)\n", "return response\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_4():...\n", "return VAR_7\n" ]
[ "def getTrustedEngine():...\n", "return _trusted_engine\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@FUNC_0...\n", "return EventSources(self)\n" ]
[ "@cache_in_self...\n", "return EventSources(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "from security_monkey import app, db\n", "from flask_wtf.csrf import generate_csrf\n", "from security_monkey.auth.models import RBACRole\n", "from security_monkey.decorators import crossdomain\n", "from flask_restful import fields, marshal, Resource, reqparse\n", "from flask_login import current_user\n", ...
[ "from security_monkey import app, db\n", "from flask_wtf.csrf import generate_csrf\n", "from security_monkey.auth.models import RBACRole\n", "from security_monkey.decorators import crossdomain\n", "from flask_restful import fields, marshal, Resource, reqparse\n", "from flask_login import current_user\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, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "...
[ "def FUNC_23(VAR_48, VAR_49=VAR_29):...\n", "return VAR_49 is not None and (len(VAR_48) > VAR_49 and '%s...' % VAR_48[:\n max(0, VAR_49 - 3)]) or VAR_48\n" ]
[ "def trim_url(x, limit=trim_url_limit):...\n", "return limit is not None and (len(x) > limit and '%s...' % x[:max(0, limit -\n 3)]) or x\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self):...\n", "return self.kw_component\n" ]
[ "def get_kwargs(self):...\n", "return self.kw_component\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_14(VAR_7, VAR_8):...\n", "VAR_10 = [db.Books.timestamp.desc()]\n", "if VAR_7 == 'stored':\n", "VAR_7 = VAR_87.get_view_property(VAR_8, 'stored')\n", "VAR_87.set_view_property(VAR_8, 'stored', VAR_7)\n", "if VAR_7 == 'pubnew':\n", "VAR_10 = [db.Books.pubdate.desc()]\n", "if VAR_7 == 'pubold':...
[ "def get_sort_function(sort, data):...\n", "order = [db.Books.timestamp.desc()]\n", "if sort == 'stored':\n", "sort = current_user.get_view_property(data, 'stored')\n", "current_user.set_view_property(data, 'stored', sort)\n", "if sort == 'pubnew':\n", "order = [db.Books.pubdate.desc()]\n", "if sort =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign...
[ "def FUNC_0(self):...\n", "return self.post()\n" ]
[ "def get(self):...\n", "return self.post()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@wraps(VAR_4)...\n", "if VAR_87.role_viewer():\n", "return VAR_4(*VAR_49, **kwargs)\n", "abort(403)\n" ]
[ "@wraps(f)...\n", "if current_user.role_viewer():\n", "return f(*args, **kwargs)\n", "abort(403)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Expr'" ]
[ "def FUNC_69(VAR_12, VAR_29):...\n", "VAR_94 = re.search('([a-zA-Z0-9-]+)=%s', VAR_29, re.IGNORECASE | re.UNICODE)\n", "if VAR_94:\n", "return VAR_94.group(1)\n" ]
[ "def extract_dynamic_field_from_filter(user, filtr):...\n", "match = re.search('([a-zA-Z0-9-]+)=%s', filtr, re.IGNORECASE | re.UNICODE)\n", "if match:\n", "return match.group(1)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_1(self, VAR_5, VAR_7, VAR_8=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.ignore_login_fail:\n", "return HttpResponse('Connection Failed')\n", "if self.login_redirect is not None:\n", "return super(CLASS_0, self).on_not_logged_in(VAR_5, VAR_7, VAR_8)\n", "VAR_7 = reverse(self.login_redirec...
[ "def on_not_logged_in(self, request, url, error=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.ignore_login_fail:\n", "return HttpResponse('Connection Failed')\n", "if self.login_redirect is not None:\n", "return super(login_required, self).on_not_logged_in(request, url, error)\n", "url = reverse(sel...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Return'", "Assign'" ]
[ "def FUNC_0(self, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "return yaml.load(self.vault.decrypt(VAR_1))\n" ]
[ "def load(self, stream):...\n", "\"\"\"docstring\"\"\"\n", "return yaml.load(self.vault.decrypt(stream))\n" ]
[ 0, 0, 5 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_9(self, VAR_5):...\n", "for VAR_20 in self._subexprs:\n", "return 0\n", "VAR_20(VAR_5)\n", "return 1\n" ]
[ "def _exists(self, econtext):...\n", "for expr in self._subexprs:\n", "return 0\n", "expr(econtext)\n", "return 1\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Return'", "Expr'", "Return'" ]
[ "@ensure_csrf_cookie...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = SlashSeparatedCourseKey.from_deprecated_string(VAR_10)\n", "VAR_121 = RegistrationCodeRedemption.objects.select_related('registration_code'\n ).filter(registration_code__course_id=course_id)\n", "VAR_122 = []\n", "if VAR_121.exists():\n",...
[ "@ensure_csrf_cookie...\n", "\"\"\"docstring\"\"\"\n", "course_id = SlashSeparatedCourseKey.from_deprecated_string(course_id)\n", "code_redemption_set = RegistrationCodeRedemption.objects.select_related(\n 'registration_code').filter(registration_code__course_id=course_id)\n", "spent_codes_list = []\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_12(self, VAR_0, VAR_13):...\n", "VAR_33 = 'C:\\\\' if utils.is_windows else '/'\n", "VAR_25 = VAR_13(VAR_33)\n", "assert not VAR_25.parent\n" ]
[ "def test_root_dir(self, tmpdir, parser):...\n", "root_dir = 'C:\\\\' if utils.is_windows else '/'\n", "parsed = parser(root_dir)\n", "assert not parsed.parent\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_15(self, VAR_31, VAR_32):...\n", "return CLASS_7(VAR_31, VAR_32)\n" ]
[ "def createErrorInfo(self, err, position):...\n", "return ErrorInfo(err, position)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12, VAR_13 = self.make_request('GET', '/joined_groups'.encode('ascii'),\n VAR_7=access_token)\n", "self.assertEqual(200, int(VAR_13.result['code']), msg=channel.result['body'])\n", "return VAR_13.json_body['groups']\n" ]
[ "def _get_groups_user_is_in(self, access_token):...\n", "\"\"\"docstring\"\"\"\n", "request, channel = self.make_request('GET', '/joined_groups'.encode('ascii'\n ), access_token=access_token)\n", "self.assertEqual(200, int(channel.result['code']), msg=channel.result['body'])\n", "return channel.json_body...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "async def FUNC_18(VAR_3, **VAR_4):...\n", "VAR_17 = RedirectException(b'/no/over/there', 304)\n", "VAR_17.cookies.append(b'session=yespls')\n" ]
[ "async def callback(request, **kwargs):...\n", "e = RedirectException(b'/no/over/there', 304)\n", "e.cookies.append(b'session=yespls')\n" ]
[ 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Expr'" ]
[ "@login_required...\n", "if not is_ajax(VAR_0):\n", "return Http404()\n", "VAR_6 = TopicNotification.objects.for_access(VAR_0.user).order_by('is_read',\n '-date').with_related_data()\n", "VAR_6 = VAR_6[:settings.ST_NOTIFICATIONS_PER_PAGE]\n", "VAR_6 = [{'user': escape(n.comment.user.st.nickname), 'acti...
[ "@login_required...\n", "if not is_ajax(request):\n", "return Http404()\n", "notifications = TopicNotification.objects.for_access(request.user).order_by(\n 'is_read', '-date').with_related_data()\n", "notifications = notifications[:settings.ST_NOTIFICATIONS_PER_PAGE]\n", "notifications = [{'user': esca...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_12(VAR_2, VAR_3, VAR_5, VAR_10, VAR_11, VAR_12, VAR_13=None,...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = saved_model_utils.get_meta_graph_def(VAR_2, VAR_3)\n", "VAR_24 = FUNC_2(VAR_4, VAR_5)\n", "for input_key_name in VAR_10.keys():\n", "if input_key_name not in VAR_24:\n", "VAR_36 = {VAR_24[ke...
[ "def run_saved_model_with_feed_dict(saved_model_dir, tag_set,...\n", "\"\"\"docstring\"\"\"\n", "meta_graph_def = saved_model_utils.get_meta_graph_def(saved_model_dir, tag_set)\n", "inputs_tensor_info = _get_inputs_tensor_info_from_meta_graph_def(meta_graph_def\n , signature_def_key)\n", "for input_key_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 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "For", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Condition", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Condition", "Condition", "Expr'", "Assign'", "Conditi...
[ "import pytest\n", "from werkzeug.routing import BuildError\n", "from flask_unchained.bundles.controller import Controller, Resource\n", "from flask_unchained.bundles.controller.utils import controller_name, get_param_tuples, join, method_name_to_url, url_for, _validate_redirect_url\n", "from py_meta_utils ...
[ "import pytest\n", "from werkzeug.routing import BuildError\n", "from flask_unchained.bundles.controller import Controller, Resource\n", "from flask_unchained.bundles.controller.utils import controller_name, get_param_tuples, join, method_name_to_url, url_for, _validate_redirect_url\n", "from py_meta_utils ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assert'", "Assert'", "Assert'", "Expr'", "Assert'", "Assert'", "Assert'", "Assert'", "FunctionDef'", "Assert'", "Funct...
[ "def FUNC_87(VAR_160, VAR_161, VAR_162):...\n", "\"\"\"docstring\"\"\"\n", "VAR_49[VAR_160].append(_('user \"{user}\" in row# {row}').format(VAR_19=_user,\n row=row_count))\n" ]
[ "def build_row_errors(key, _user, row_count):...\n", "\"\"\"docstring\"\"\"\n", "row_errors[key].append(_('user \"{user}\" in row# {row}').format(user=_user,\n row=row_count))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_30(self, VAR_28, VAR_29, VAR_12):...\n", "if VAR_29 == 'public':\n", "VAR_103 = type(VAR_12) == bool and type(VAR_28) == int\n", "if VAR_103:\n", "return self.playlistdb.setPublic(VAR_15=self.getUserId(), VAR_28=plid,\n VAR_24=value)\n" ]
[ "def api_changeplaylist(self, plid, attribute, value):...\n", "if attribute == 'public':\n", "is_valid = type(value) == bool and type(plid) == int\n", "if is_valid:\n", "return self.playlistdb.setPublic(userid=self.getUserId(), plid=plid, public\n =value)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Return'" ]
[ "from __future__ import annotations\n", "from dataclasses import dataclass, field\n", "from datetime import date, datetime\n", "from typing import Any, Dict, List, Optional, Union, cast\n", "from .an_enum import AnEnum\n", "from .different_enum import DifferentEnum\n", "\"\"\" A Model for testing all th...
[ "from __future__ import annotations\n", "from dataclasses import dataclass, field\n", "from datetime import date, datetime\n", "from typing import Any, Dict, List, Optional, Union, cast\n", "from .an_enum import AnEnum\n", "from .different_enum import DifferentEnum\n", "\"\"\" A Model for testing all th...
[ 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "AnnAssign'", "AnnAssign'", "AnnAssign'", "AnnAssign'", "AnnAssign'", "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'",...
[ "def FUNC_20(self):...\n", "\"\"\"docstring\"\"\"\n", "return u'[%s]' % self.ticket_for_url\n" ]
[ "def _get_ticket(self):...\n", "\"\"\"docstring\"\"\"\n", "return u'[%s]' % self.ticket_for_url\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_77(self):...\n", "VAR_78 = frappe.get_all('ToDo', fields=['owner'], filters={'reference_type':\n self.doctype, 'reference_name': self.name, 'status': ('!=', 'Cancelled')})\n", "VAR_79 = set([assignment.owner for assignment in VAR_78])\n", "return VAR_79\n" ]
[ "def get_assigned_users(self):...\n", "assignments = frappe.get_all('ToDo', fields=['owner'], filters={\n 'reference_type': self.doctype, 'reference_name': self.name, 'status':\n ('!=', 'Cancelled')})\n", "users = set([assignment.owner for assignment in assignments])\n", "return users\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_14():...\n", "VAR_23.component_instance.json_args = VAR_34\n", "VAR_23.component_instance.special_args.extend(VAR_21)\n" ]
[ "def marshall_element_args():...\n", "element.component_instance.json_args = serialized_json_args\n", "element.component_instance.special_args.extend(special_args)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_23(self, VAR_46: str, VAR_47: str) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "if not self.instances or len(self.instances) == 1:\n", "return True\n", "return self.get_instance(VAR_47) == VAR_46\n" ]
[ "def should_handle(self, instance_name: str, key: str) ->bool:...\n", "\"\"\"docstring\"\"\"\n", "if not self.instances or len(self.instances) == 1:\n", "return True\n", "return self.get_instance(key) == instance_name\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "async def FUNC_19(self, VAR_5: str, VAR_11: str, VAR_27: str) ->EventBase:...\n", "\"\"\"docstring\"\"\"\n", "if get_domain_from_id(VAR_27) != VAR_5:\n", "VAR_0.info(\n 'Got /make_leave request for user %r from different origin %s, ignoring',\n VAR_27, VAR_5)\n", "VAR_28 = await self.store.get_room_v...
[ "async def on_make_leave_request(self, origin: str, room_id: str, user_id: str...\n", "\"\"\"docstring\"\"\"\n", "if get_domain_from_id(user_id) != origin:\n", "logger.info(\n 'Got /make_leave request for user %r from different origin %s, ignoring',\n user_id, origin)\n", "room_version = await self.st...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_3(self):...\n", "\"\"\"Model with callable polymorphic functions specified.\"\"\"\n", "@def_function.function...\n", "if VAR_56:\n", "return VAR_54 + VAR_55\n", "return VAR_54 * VAR_55\n" ]
[ "def testShowAllWithFunctions(self):...\n", "\"\"\"Model with callable polymorphic functions specified.\"\"\"\n", "@def_function.function...\n", "if c:\n", "return a + b\n", "return a * b\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Condition", "Return'", "Return'" ]
[ "import time\n", "import urllib2\n", "from flask import Flask, render_template, session, request, json\n", "from core.victim_objects import *\n", "import core.stats\n", "from core.utils import utils\n", "from core.db import Database\n", "VAR_0 = core.stats.trape\n", "VAR_1 = core.stats.app\n", "VA...
[ "import time\n", "import urllib2\n", "from flask import Flask, render_template, session, request, json\n", "from core.victim_objects import *\n", "import core.stats\n", "from core.utils import utils\n", "from core.db import Database\n", "trape = core.stats.trape\n", "app = core.stats.app\n", "db =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "VAR_53 = {}\n", "VAR_93 = getIntOrDefault(VAR_2, 'index', 0)\n", "VAR_104 = BaseContainer(VAR_5, **{str(c_type): long(c_id)})\n", "if VAR_25:\n", "VAR_53['share'] = BaseShare(VAR_5, VAR_25)\n", "if VAR_23 == 'well':\n", "VAR_104.image = VAR_104.w...
[ "@login_required()...\n", "\"\"\"docstring\"\"\"\n", "context = {}\n", "index = getIntOrDefault(request, 'index', 0)\n", "manager = BaseContainer(conn, **{str(c_type): long(c_id)})\n", "if share_id:\n", "context['share'] = BaseShare(conn, share_id)\n", "if c_type == 'well':\n", "manager.image = mana...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assig...
[ "@app.route('/tags')...\n", "if not app.config['SEARCH_CONF']['engine'] == 'ripgrep' and not which('rg'):\n", "flash('Ripgrep must be installed to view pages about embedded tags.', 'error')\n", "VAR_10 = sorted(get_all_tags(force=True))\n", "return redirect('/')\n", "return render_template('tags/all.html'...
[ "@app.route('/tags')...\n", "if not app.config['SEARCH_CONF']['engine'] == 'ripgrep' and not which('rg'):\n", "flash('Ripgrep must be installed to view pages about embedded tags.', 'error')\n", "tags = sorted(get_all_tags(force=True))\n", "return redirect('/')\n", "return render_template('tags/all.html', ...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_9():...\n", "if session.pam_user:\n", "session.flash = T('PAM authenticated user, cannot change password here')\n", "VAR_26 = SQLFORM.factory(Field('current_admin_password', 'password'), Field\n ('new_admin_password', 'password', requires=IS_STRONG()), Field(\n 'new_admin_password_again', 'pas...
[ "def change_password():...\n", "if session.pam_user:\n", "session.flash = T('PAM authenticated user, cannot change password here')\n", "form = SQLFORM.factory(Field('current_admin_password', 'password'), Field(\n 'new_admin_password', 'password', requires=IS_STRONG()), Field(\n 'new_admin_password_again...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_13():...\n", "yield '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n'\n", "if VAR_1:\n", "yield '<?xml-stylesheet type=\"text/xsl\" href=\"/scopelist.xsl\" ?>\\n'\n", "yield '<objectlist count=\"{:d}\">\\n'.format(VAR_39)\n", "VAR_40 = 0\n", "VAR_41 = 0\n", "if VAR_26:\n", "VAR_40 = int(VAR...
[ "def generate():...\n", "yield '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\\n'\n", "if STYLE:\n", "yield '<?xml-stylesheet type=\"text/xsl\" href=\"/scopelist.xsl\" ?>\\n'\n", "yield '<objectlist count=\"{:d}\">\\n'.format(total_entries)\n", "mix_per_iteration = 0\n", "iteration_count = 0\n", "if mak...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_76(VAR_212):...\n", "if VAR_178(VAR_212.getId()) == VAR_178(VAR_6):\n", "return False\n", "VAR_285 = VAR_212.getPrimaryPixels()\n", "if VAR_285 is None or VAR_212.getPrimaryPixels().getPixelsType().getValue(\n", "return False\n", "VAR_286 = [VAR_30.getLabel() for VAR_30 in VAR_212.getChannels(...
[ "def compat(i):...\n", "if long(i.getId()) == long(iid):\n", "return False\n", "pp = i.getPrimaryPixels()\n", "if pp is None or i.getPrimaryPixels().getPixelsType().getValue(\n", "return False\n", "ew = [x.getLabel() for x in i.getChannels()]\n", "ew.sort()\n", "if ew != img_ew:\n", "return False\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Expr'", "Condition", "Return'", "Return'" ]
[ "def __init__(self, *VAR_0, **VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "self.doctype = self.name = None\n", "self._default_new_docs = {}\n", "self.flags = frappe._dict()\n", "if VAR_0 and VAR_0[0] and isinstance(VAR_0[0], string_types):\n", "if len(VAR_0) == 1:\n", "if VAR_0 and VAR_0[0] and isinstan...
[ "def __init__(self, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "self.doctype = self.name = None\n", "self._default_new_docs = {}\n", "self.flags = frappe._dict()\n", "if args and args[0] and isinstance(args[0], string_types):\n", "if len(args) == 1:\n", "if args and args[0] and isinstance(arg...
[ 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'", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Return'", "Assign'", "Assign'", "Expr'", "Condition", "For", "Expr'", "Assign'" ]
[ "def __init__(self, VAR_7, VAR_8):...\n", "self.errorstring = VAR_7\n", "self.error = VAR_8\n", "super().__init__(VAR_7)\n" ]
[ "def __init__(self, errorstring, error):...\n", "self.errorstring = errorstring\n", "self.error = error\n", "super().__init__(errorstring)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_11(self):...\n", "" ]
[ "def after_script_executed(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@VAR_2.route('/advsearch', methods=['GET'])...\n", "VAR_16 = get_cc_columns(filter_config_custom_read=True)\n", "return FUNC_29(VAR_16)\n" ]
[ "@web.route('/advsearch', methods=['GET'])...\n", "cc = get_cc_columns(filter_config_custom_read=True)\n", "return render_prepare_search_form(cc)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "@expose('/userinfo/')...\n", "VAR_21 = self.datamodel.get(g.user.id, self._base_filters)\n", "VAR_43 = self._get_show_widget(g.user.id, VAR_21, VAR_15=self.\n user_show_fieldsets)\n", "self.update_redirect()\n", "return self.render_template(self.show_template, VAR_37=self.user_info_title,\n VAR_43=wi...
[ "@expose('/userinfo/')...\n", "item = self.datamodel.get(g.user.id, self._base_filters)\n", "widgets = self._get_show_widget(g.user.id, item, show_fieldsets=self.\n user_show_fieldsets)\n", "self.update_redirect()\n", "return self.render_template(self.show_template, title=self.user_info_title,\n widge...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_2(self, VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "for basket_command_middleware in get_provide_objects(\n", "if not issubclass(basket_command_middleware, BaseBasketCommandMiddleware):\n", "return VAR_4\n", "VAR_4 = dict(basket_command_middleware().preprocess_kwargs(VAR_2=self.\n baske...
[ "def preprocess_kwargs(self, command, kwargs):...\n", "\"\"\"docstring\"\"\"\n", "for basket_command_middleware in get_provide_objects(\n", "if not issubclass(basket_command_middleware, BaseBasketCommandMiddleware):\n", "return kwargs\n", "kwargs = dict(basket_command_middleware().preprocess_kwargs(basket...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Return'", "Assign'" ]
[ "def FUNC_14(self, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "self.helper.send_state(self.room_id, 'm.room.canonical_alias', VAR_6, tok=\n self.admin_user_tok)\n" ]
[ "def _set_canonical_alias(self, content):...\n", "\"\"\"docstring\"\"\"\n", "self.helper.send_state(self.room_id, 'm.room.canonical_alias', content, tok\n =self.admin_user_tok)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "@property...\n", "return self._base_builder.room_id\n" ]
[ "@property...\n", "return self._base_builder.room_id\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@VAR_2.route('/ajax/toggleread/<int:book_id>', methods=['POST'])...\n", "if not config.config_read_column:\n", "VAR_95 = ub.session.query(ub.ReadBook).filter(and_(ub.ReadBook.user_id ==\n int(VAR_87.id), ub.ReadBook.book_id == VAR_5)).first()\n", "calibre_db.update_title_sort(config)\n", "VAR_3.error(u'...
[ "@web.route('/ajax/toggleread/<int:book_id>', methods=['POST'])...\n", "if not config.config_read_column:\n", "book = ub.session.query(ub.ReadBook).filter(and_(ub.ReadBook.user_id == int\n (current_user.id), ub.ReadBook.book_id == book_id)).first()\n", "calibre_db.update_title_sort(config)\n", "log.error...
[ 0, 0, 0, 0, 0, 0, 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", "Condition", "Assign'", "Expr'", "Expr'", "Return'", "Condition", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", ...
[ "@FUNC_0...\n", "return MediaRepository(self)\n" ]
[ "@cache_in_self...\n", "return MediaRepository(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_9(VAR_22):...\n", "\"\"\"docstring\"\"\"\n", "if len(VAR_22) > 13:\n", "VAR_30 = int(VAR_22, 36)\n", "if not six.PY3 and VAR_30 > sys.maxint:\n", "return VAR_30\n" ]
[ "def base36_to_int(s):...\n", "\"\"\"docstring\"\"\"\n", "if len(s) > 13:\n", "value = int(s, 36)\n", "if not six.PY3 and value > sys.maxint:\n", "return value\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Return'" ]
[ "@VAR_25.whitelist(allow_guest=True)...\n", "VAR_25.local.login_manager.logout()\n", "VAR_25.db.commit()\n", "VAR_25.respond_as_web_page(_('Logged Out'), _(\n 'You have been successfully logged out'), indicator_color='green')\n" ]
[ "@frappe.whitelist(allow_guest=True)...\n", "frappe.local.login_manager.logout()\n", "frappe.db.commit()\n", "frappe.respond_as_web_page(_('Logged Out'), _(\n 'You have been successfully logged out'), indicator_color='green')\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(VAR_2, VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = FUNC_1(VAR_2)\n", "for port in (VAR_3, VAR_4):\n", "VAR_37 = socket.socket(VAR_24, socket.SOCK_STREAM)\n", "return True\n", "VAR_37.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\n", "VAR_32 = 'Unable to bind socket {...
[ "def verify_socket(interface, pub_port, ret_port):...\n", "\"\"\"docstring\"\"\"\n", "addr_family = lookup_family(interface)\n", "for port in (pub_port, ret_port):\n", "sock = socket.socket(addr_family, socket.SOCK_STREAM)\n", "return True\n", "sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Expr'", "Assign'", "Expr'", "Expr'", "Condition", "Assign'", "Assign'", "AugAssign'", "Condition", "Expr'", "Expr'", "Return'" ]
[ "def __init__(self, VAR_8):...\n", "self.store = VAR_8.get_datastore()\n", "self.config = VAR_8.get_config()\n" ]
[ "def __init__(self, hs):...\n", "self.store = hs.get_datastore()\n", "self.config = hs.get_config()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "@FUNC_2.__func__...\n", "\"\"\"docstring\"\"\"\n", "self._cancel()\n" ]
[ "@whitelist.__func__...\n", "\"\"\"docstring\"\"\"\n", "self._cancel()\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'" ]
[ "@property...\n", "return self._base_builder.type\n" ]
[ "@property...\n", "return self._base_builder.type\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_34(self):...\n", "return self.db[self.settings.table_cas_name]\n" ]
[ "def table_cas(self):...\n", "return self.db[self.settings.table_cas_name]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@login_required(setGroupContext=True)...\n", "\"\"\"docstring\"\"\"\n", "if VAR_35 is None or VAR_36 is None or VAR_37 is None:\n", "VAR_54 = 'webclient/history/history_details.html'\n", "VAR_87 = int(VAR_2.GET.get('page', 1))\n", "VAR_192 = VAR_2.session.get('user_id')\n", "VAR_193 = BaseCalendar(VAR_...
[ "@login_required(setGroupContext=True)...\n", "\"\"\"docstring\"\"\"\n", "if year is None or month is None or day is None:\n", "template = 'webclient/history/history_details.html'\n", "page = int(request.GET.get('page', 1))\n", "filter_user_id = request.session.get('user_id')\n", "controller = BaseCalen...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self):...\n", "self.var = variables.Variable(1.0, name='my_var')\n", "self.write_var = variables.Variable(1.0, name='write_var')\n" ]
[ "def __init__(self):...\n", "self.var = variables.Variable(1.0, name='my_var')\n", "self.write_var = variables.Variable(1.0, name='write_var')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_16(VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "VAR_41 = example_pb2.Example()\n", "for feature_name, feature_list in VAR_19.items():\n", "if not isinstance(feature_list, list):\n", "return VAR_41.SerializeToString()\n", "if isinstance(feature_list[0], float):\n", "VAR_41.features.feature[fea...
[ "def _create_example_string(example_dict):...\n", "\"\"\"docstring\"\"\"\n", "example = example_pb2.Example()\n", "for feature_name, feature_list in example_dict.items():\n", "if not isinstance(feature_list, list):\n", "return example.SerializeToString()\n", "if isinstance(feature_list[0], float):\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Condition", "Return'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_33(VAR_39, VAR_36):...\n", "VAR_37 = VAR_36.title\n", "VAR_38 = VAR_36.author\n", "VAR_65, VAR_62, VAR_69 = FUNC_32(VAR_37, VAR_38)\n", "VAR_70 = helper.get_valid_filename(VAR_37)\n", "VAR_71 = helper.get_valid_filename(VAR_69.name)\n", "VAR_72 = os.path.join(VAR_71, VAR_70).replace('\\\\', '/...
[ "def create_book_on_upload(modif_date, meta):...\n", "title = meta.title\n", "authr = meta.author\n", "sort_authors, input_authors, db_author = prepare_authors_on_upload(title, authr\n )\n", "title_dir = helper.get_valid_filename(title)\n", "author_dir = helper.get_valid_filename(db_author.name)\n", ...
[ 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'", "AugAssign'", "AugAssign'", "AugAssign'", "AugAssign'", "AugAssign'", "AugAssign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_20(self, *VAR_12, **VAR_13):...\n", "\"\"\"docstring\"\"\"\n", "if self._backend is not None and objects.backend != self._backend:\n", "return self.wrong_backend_handler(*VAR_12, **kwargs)\n", "return self._function(*VAR_12, **kwargs)\n" ]
[ "def wrapper(self, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "if self._backend is not None and objects.backend != self._backend:\n", "return self.wrong_backend_handler(*args, **kwargs)\n", "return self._function(*args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "def __init__(self):...\n", "self.reqparse = reqparse.RequestParser()\n", "self.req = CLASS_2.prepare_from_flask_request(request)\n", "super(CLASS_2, self).__init__()\n" ]
[ "def __init__(self):...\n", "self.reqparse = reqparse.RequestParser()\n", "self.req = OneLogin.prepare_from_flask_request(request)\n", "super(OneLogin, self).__init__()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "@apfell.route('/apiui/command_help')...\n", "VAR_4 = VAR_0.get_template('apiui_command_help.html')\n", "if len(VAR_1.query_args) != 0:\n", "VAR_5 = urllib.parse.unquote(VAR_1.query_args[0][1])\n", "VAR_5 = ''\n", "print(VAR_5)\n", "if use_ssl:\n", "VAR_6 = VAR_4.render(VAR_3=await respect_pivot(links...
[ "@apfell.route('/apiui/command_help')...\n", "template = env.get_template('apiui_command_help.html')\n", "if len(request.query_args) != 0:\n", "data = urllib.parse.unquote(request.query_args[0][1])\n", "data = ''\n", "print(data)\n", "if use_ssl:\n", "content = template.render(links=await respect_pivo...
[ 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_50: 'APIRouter', *, VAR_41: str='', VAR_30: Optional[...\n", "if VAR_41:\n", "assert VAR_41.startswith('/'), \"A path prefix must start with '/'\"\n", "for r in VAR_50.routes:\n", "assert not VAR_41.endswith('/'\n ), \"A path prefix must not end with '/', as the routes will start w...
[ "def include_router(self, router: 'APIRouter', *, prefix: str='', tags:...\n", "if prefix:\n", "assert prefix.startswith('/'), \"A path prefix must start with '/'\"\n", "for r in router.routes:\n", "assert not prefix.endswith('/'\n ), \"A path prefix must not end with '/', as the routes will start with '...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Condition", "Assert'", "For", "Assert'", "Assign'", "Condition", "Assign'", "Assign'", "For", "Condition", "Condition", "For", "Assign'", "Condition", "Expr'", "For", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Expr'", "Condition", ...
[ "def __init__(self, VAR_4):...\n", "self.response = VAR_4\n", "super(CLASS_1, self).__init__(force_text(VAR_4))\n" ]
[ "def __init__(self, response):...\n", "self.response = response\n", "super(ExceptionalResponse, self).__init__(force_text(response))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_31(VAR_37, VAR_38):...\n", "if VAR_37[1].get('_key', None) == 'plugin_corewizard_acl':\n", "return f'0:{to_unicode(VAR_37[0])}'\n", "if VAR_37[1].get('mandatory', False):\n", "return f'1:{to_unicode(VAR_37[0])}'\n", "return f'2:{to_unicode(VAR_37[0])}'\n" ]
[ "def wizard_key_extractor(d, k):...\n", "if d[1].get('_key', None) == 'plugin_corewizard_acl':\n", "return f'0:{to_unicode(d[0])}'\n", "if d[1].get('mandatory', False):\n", "return f'1:{to_unicode(d[0])}'\n", "return f'2:{to_unicode(d[0])}'\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "@VAR_1.route('/ajax/mergebooks', methods=['POST'])...\n", "VAR_79 = VAR_32.get_json().get('Merge_books')\n", "VAR_81 = list()\n", "if VAR_79:\n", "VAR_100 = calibre_db.get_book(VAR_79[0])\n", "return ''\n", "VAR_79.pop(0)\n", "if VAR_100:\n", "for file in VAR_100.data:\n", "VAR_81.append(file.for...
[ "@editbook.route('/ajax/mergebooks', methods=['POST'])...\n", "vals = request.get_json().get('Merge_books')\n", "to_file = list()\n", "if vals:\n", "to_book = calibre_db.get_book(vals[0])\n", "return ''\n", "vals.pop(0)\n", "if to_book:\n", "for file in to_book.data:\n", "to_file.append(file.forma...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Condition", "For", "Expr'", "Assign'", "For", "Assign'", "Condition", "For", "For", "Expr'", "Assign'", "Return'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_15():...\n", "random.seed(VAR_24)\n", "return list(map(lambda x: x + VAR_5 * VAR_45, sorted(random.sample(list(\n range(VAR_5)), VAR_44))))\n" ]
[ "def generate_mix_indices():...\n", "random.seed(seed)\n", "return list(map(lambda x: x + ITEMS_PER_ITERATION * iteration_count, sorted\n (random.sample(list(range(ITEMS_PER_ITERATION)), mix_per_iteration))))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "@VAR_2.route('/ajax/editlistusers/<param>', methods=['POST'])...\n", "VAR_61 = request.form.to_dict(flat=False)\n", "VAR_47 = ub.session.query(ub.User)\n", "if not config.config_anonbrowse:\n", "VAR_47 = VAR_47.filter(ub.User.role.op('&')(constants.ROLE_ANONYMOUS) !=\n constants.ROLE_ANONYMOUS)\n", "i...
[ "@admi.route('/ajax/editlistusers/<param>', methods=['POST'])...\n", "vals = request.form.to_dict(flat=False)\n", "all_user = ub.session.query(ub.User)\n", "if not config.config_anonbrowse:\n", "all_user = all_user.filter(ub.User.role.op('&')(constants.ROLE_ANONYMOUS) !=\n constants.ROLE_ANONYMOUS)\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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Condition", "For", "Return'", "Expr'", "Condition", "Expr'", "Return'", "Condition", "Assign'", "Return...
[ "def FUNC_10(self, VAR_0):...\n", "VAR_13 = VAR_0.patch('httpx.get')\n", "VAR_14 = VAR_0.patch('openapi_python_client.Path')\n", "VAR_15 = VAR_0.patch('yaml.safe_load')\n", "from openapi_python_client import _get_document\n", "VAR_11 = VAR_2(VAR_6=mocker.MagicMock(), VAR_7=mocker.MagicMock())\n", "asser...
[ "def test__get_document_url_and_path(self, mocker):...\n", "get = mocker.patch('httpx.get')\n", "Path = mocker.patch('openapi_python_client.Path')\n", "loads = mocker.patch('yaml.safe_load')\n", "from openapi_python_client import _get_document\n", "result = _get_document(url=mocker.MagicMock(), path=mocke...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "ImportFrom'", "Assign'", "Assert'", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_0.route('/simpleshelf/<int:shelf_id>')...\n", "return FUNC_15(2, VAR_3, 1, None)\n" ]
[ "@shelf.route('/simpleshelf/<int:shelf_id>')...\n", "return render_show_shelf(2, shelf_id, 1, None)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = FUNC_1('/groups/%s/roles', VAR_30)\n", "return self.client.get_json(VAR_5=destination, VAR_2=path, VAR_3={\n 'requester_user_id': requester_user_id}, VAR_15=True)\n" ]
[ "@log_function...\n", "\"\"\"docstring\"\"\"\n", "path = _create_v1_path('/groups/%s/roles', group_id)\n", "return self.client.get_json(destination=destination, path=path, args={\n 'requester_user_id': requester_user_id}, ignore_backoff=True)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'" ]
[ "@wraps(VAR_4)...\n", "if VAR_87.role_download():\n", "return VAR_4(*VAR_49, **kwargs)\n", "abort(403)\n" ]
[ "@wraps(f)...\n", "if current_user.role_download():\n", "return f(*args, **kwargs)\n", "abort(403)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Expr'" ]
[ "def FUNC_4(VAR_21: Text) ->Tuple[Optional[Text], Optional[Text]]:...\n", "\"\"\"docstring\"\"\"\n", "VAR_50 = os.path.join(VAR_21, DEFAULT_CORE_SUBDIRECTORY_NAME)\n", "VAR_51 = os.path.join(VAR_21, DEFAULT_NLU_SUBDIRECTORY_NAME)\n", "if not os.path.isdir(VAR_50):\n", "VAR_50 = None\n", "if not os.path....
[ "def get_model_subdirectories(unpacked_model_path: Text) ->Tuple[Optional[...\n", "\"\"\"docstring\"\"\"\n", "core_path = os.path.join(unpacked_model_path, DEFAULT_CORE_SUBDIRECTORY_NAME)\n", "nlu_path = os.path.join(unpacked_model_path, DEFAULT_NLU_SUBDIRECTORY_NAME)\n", "if not os.path.isdir(core_path):\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Return'" ]
[ "async def FUNC_47(VAR_82):...\n", "for VAR_196 in VAR_82:\n", "return False\n", "await self.backfill(VAR_196, VAR_11, VAR_17=100, VAR_18=extremities)\n", "VAR_0.info('Failed to backfill from %s because %s', VAR_196, VAR_170)\n", "return True\n", "if 400 <= VAR_170.code < 500:\n", "VAR_0.info('Failed ...
[ "async def try_backfill(domains):...\n", "for dom in domains:\n", "return False\n", "await self.backfill(dom, room_id, limit=100, extremities=extremities)\n", "logger.info('Failed to backfill from %s because %s', dom, e)\n", "return True\n", "if 400 <= e.code < 500:\n", "logger.info('Failed to backfil...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "For", "Return'", "Expr'", "Expr'", "Return'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_23(self):...\n", "return False\n" ]
[ "def role_admin(self):...\n", "return False\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]