lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_13(self, VAR_9, VAR_7):...\n", "if not self.doctype:\n", "return VAR_9\n", "if not isinstance(VAR_9, CLASS_0):\n", "if 'doctype' not in VAR_9:\n", "VAR_9.parent = self.name\n", "VAR_9['doctype'] = self.get_table_field_doctype(VAR_7)\n", "VAR_9 = FUNC_0(VAR_9['doctype'])(VAR_9)\n", "VAR_9.p...
[ "def _init_child(self, value, key):...\n", "if not self.doctype:\n", "return value\n", "if not isinstance(value, BaseDocument):\n", "if 'doctype' not in value:\n", "value.parent = self.name\n", "value['doctype'] = self.get_table_field_doctype(key)\n", "value = get_controller(value['doctype'])(value)\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_1(VAR_6):...\n", "VAR_18 = VAR_6.result()\n", "if VAR_18.status_code == requests.codes.server_error:\n", "FUNC_4(VAR_18.json())\n", "VAR_18.raise_for_status()\n", "if VAR_18.text:\n", "return VAR_18.json()\n", "return None\n" ]
[ "def JsonFromFuture(future):...\n", "response = future.result()\n", "if response.status_code == requests.codes.server_error:\n", "_RaiseExceptionForData(response.json())\n", "response.raise_for_status()\n", "if response.text:\n", "return response.json()\n", "return None\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Expr'", "Condition", "Return'", "Return'" ]
[ "def FUNC_10(self, *VAR_11, **VAR_12):...\n", "for VAR_9 in VAR_11:\n", "self._set_params_item(VAR_9)\n", "for VAR_10, VAR_9 in VAR_12.items():\n", "self._set_params_item(VAR_9, VAR_10=name)\n" ]
[ "def set_params(self, *params, **kwparams):...\n", "for item in params:\n", "self._set_params_item(item)\n", "for name, item in kwparams.items():\n", "self._set_params_item(item, name=name)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "For", "Expr'" ]
[ "def __eq__(self, VAR_1):...\n", "if not isinstance(VAR_1, CLASS_0):\n", "return False\n", "return self._uuid == VAR_1._uuid\n" ]
[ "def __eq__(self, other):...\n", "if not isinstance(other, Host):\n", "return False\n", "return self._uuid == other._uuid\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_18(self, VAR_4):...\n", "VAR_19 = self.num_tasks[-1]\n", "self.num_tasks.append(VAR_19 - 1)\n" ]
[ "def on_task_exit(self, task):...\n", "last = self.num_tasks[-1]\n", "self.num_tasks.append(last - 1)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def __json__(self, *VAR_8):...\n", "return vars(self)\n" ]
[ "def __json__(self, *args):...\n", "return vars(self)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_4 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_7 = {'image': 'autotest/exa...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "body =...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "@wraps(VAR_55)...\n", "VAR_70['timer'] = CLASS_2(VAR_25)\n", "return VAR_55(*VAR_69, **kwargs)\n" ]
[ "@wraps(func)...\n", "kwargs['timer'] = Timer(name)\n", "return func(*args, **kwargs)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_8(self):...\n", "return 'TextField'\n" ]
[ "def get_internal_type(self):...\n", "return 'TextField'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_50(self):...\n", "self.cursor.execute('create table t1(n int, s varchar(20))')\n", "self.cursor.execute(\"insert into t1 values (1, 'test')\")\n", "VAR_32 = self.cursor.execute('select n, s from t1').fetchone()\n", "VAR_33 = self.cursor.execute('select n, s from t1').fetchone()\n", "VAR_34 = VAR...
[ "def test_row_equal(self):...\n", "self.cursor.execute('create table t1(n int, s varchar(20))')\n", "self.cursor.execute(\"insert into t1 values (1, 'test')\")\n", "row1 = self.cursor.execute('select n, s from t1').fetchone()\n", "row2 = self.cursor.execute('select n, s from t1').fetchone()\n", "b = row1 ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_17(self, VAR_0, VAR_1, VAR_10, VAR_3=None):...\n", "if not VAR_3:\n", "VAR_3 = self.make_reqid()\n", "VAR_8 = [VAR_0, VAR_1, make_auth_hash(VAR_0, VAR_1, VAR_3, VAR_10)]\n", "return b'Router', b'auth-unbind-route', VAR_8, VAR_3\n" ]
[ "def make_auth_unbind_route_data(self, interface, method, key, reqid=None):...\n", "if not reqid:\n", "reqid = self.make_reqid()\n", "args = [interface, method, make_auth_hash(interface, method, reqid, key)]\n", "return b'Router', b'auth-unbind-route', args, reqid\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_7(VAR_3, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_9 == 'login':\n", "return external_auth_login(VAR_3)\n", "if VAR_9 == 'register':\n", "return external_auth_register(VAR_3)\n" ]
[ "def _external_auth_intercept(request, mode):...\n", "\"\"\"docstring\"\"\"\n", "if mode == 'login':\n", "return external_auth_login(request)\n", "if mode == 'register':\n", "return external_auth_register(request)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Return'" ]
[ "def FUNC_0():...\n", "return False\n" ]
[ "def can_import_apsw():...\n", "return False\n" ]
[ 0, 6 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(VAR_4, VAR_5, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = normalize_request(VAR_5)\n", "validate_request(VAR_11=request, VAR_4=schema)\n", "errors['request'].add_error(err.messages or getattr(err, 'detail'))\n", "VAR_12 = normalize_response(VAR_6, VAR_5)\n", "return\n", "validate_r...
[ "def validate_api_call(schema, raw_request, raw_response):...\n", "\"\"\"docstring\"\"\"\n", "request = normalize_request(raw_request)\n", "validate_request(request=request, schema=schema)\n", "errors['request'].add_error(err.messages or getattr(err, 'detail'))\n", "response = normalize_response(raw_respo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Assign'", "Return'", "Expr'", "Expr'" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed('string')\n" ]
[ "@commands.command()...\n", "\"\"\"docstring\"\"\"\n", "await self.simple_embed(\n 'If you are looking for homebrew on your stock 11.4+ 3DS, you will need an entrypoint (like ninjhax, freakyhax, etc) for launching homebrew launcher'\n )\n" ]
[ 0, 0, 2 ]
[ "Condition", "Docstring", "Expr'" ]
[ "def FUNC_0(self, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query(\n f\"select * from spaces where space_id = '{VAR_1}'\")\n" ]
[ "def get(self, space_id):...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query(\n f\"select * from spaces where space_id = '{space_id}'\")\n" ]
[ 0, 0, 4 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_2(self):...\n", "self.render('index.html')\n" ]
[ "def get(self):...\n", "self.render('index.html')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1():...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = []\n", "for VAR_12 in VAR_3:\n", "VAR_8.extend(VAR_12.get_webapp2_routes())\n", "VAR_8.extend([webapp2.Route('/auth', CLASS_5), webapp2.Route(\n '/auth/bootstrap', CLASS_1, name='bootstrap'), webapp2.Route(\n '/auth/bootstrap/oauth', CLASS_2)...
[ "def get_ui_routes():...\n", "\"\"\"docstring\"\"\"\n", "routes = []\n", "for cls in _ui_navbar_tabs:\n", "routes.extend(cls.get_webapp2_routes())\n", "routes.extend([webapp2.Route('/auth', MainHandler), webapp2.Route(\n '/auth/bootstrap', BootstrapHandler, name='bootstrap'), webapp2.Route(\n '/auth...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Expr'", "Expr'", "Return'" ]
[ "@app.route('/')...\n", "return render_template('index.html')\n" ]
[ "@app.route('/')...\n", "return render_template('index.html')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_10(self, VAR_50):...\n", "\"\"\"docstring\"\"\"\n", "assert isinstance(VAR_50, dict) and len(VAR_50\n ) > 0, 'Invalid or empty where data'\n", "for cond in self.extract_key_from_nested_dict(VAR_50, self.WHERE_CONDITION):\n", "assert isinstance(cond, dict), 'Invalid where condition'\n", "retur...
[ "def validate_where_data(self, where_data):...\n", "\"\"\"docstring\"\"\"\n", "assert isinstance(where_data, dict) and len(where_data\n ) > 0, 'Invalid or empty where data'\n", "for cond in self.extract_key_from_nested_dict(where_data, self.WHERE_CONDITION\n", "assert isinstance(cond, dict), 'Invalid whe...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "For", "Assert'", "Return'", "Assert'" ]
[ "def FUNC_31(self):...\n", "VAR_13 = 1234.567\n", "self.cursor.execute('create table t1(n float)')\n", "self.cursor.execute('insert into t1 values (?)', VAR_13)\n", "VAR_20 = self.cursor.execute('select n from t1').fetchone()[0]\n", "self.assertEqual(VAR_20, VAR_13)\n" ]
[ "def test_float(self):...\n", "value = 1234.567\n", "self.cursor.execute('create table t1(n float)')\n", "self.cursor.execute('insert into t1 values (?)', value)\n", "result = self.cursor.execute('select n from t1').fetchone()[0]\n", "self.assertEqual(result, value)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "async def FUNC_3(VAR_6):...\n", "VAR_7 = {'username': VAR_0, 'password': 'testing123G'}\n", "VAR_8 = await VAR_6.post('/auth', VAR_7=json.dumps(data))\n", "VAR_9 = await VAR_8.json()\n", "print(VAR_9)\n", "VAR_1 = VAR_9['access_token']\n", "VAR_2 = VAR_9['refresh_token']\n", "assert VAR_1 is not None...
[ "async def test_positive_login(test_cli):...\n", "data = {'username': username, 'password': 'testing123G'}\n", "resp = await test_cli.post('/auth', data=json.dumps(data))\n", "resp_json = await resp.json()\n", "print(resp_json)\n", "access_token = resp_json['access_token']\n", "refresh_token = resp_json...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assert'", "Assert'", "Assert'" ]
[ "\"\"\"Internal bot API handlers.\"\"\"\n", "import base64\n", "import json\n", "import logging\n", "import textwrap\n", "import webob\n", "import webapp2\n", "from google.appengine.api import app_identity\n", "from google.appengine.api import datastore_errors\n", "from google.appengine.datastore ...
[ "\"\"\"Internal bot API handlers.\"\"\"\n", "import base64\n", "import json\n", "import logging\n", "import textwrap\n", "import webob\n", "import webapp2\n", "from google.appengine.api import app_identity\n", "from google.appengine.api import datastore_errors\n", "from google.appengine.datastore ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Impor...
[ "def FUNC_4(self):...\n", "self.assertEqual('123', bot_main.generate_version())\n" ]
[ "def test_generate_version(self):...\n", "self.assertEqual('123', bot_main.generate_version())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_10(VAR_15):...\n", "VAR_36 = Thread(target=self.sendRandomPic, args=(chat_id, MMKM))\n", "self.pic_sender_threads[VAR_15] = VAR_36\n", "VAR_36.start()\n" ]
[ "def startThread(chat_id):...\n", "t = Thread(target=self.sendRandomPic, args=(chat_id, MMKM))\n", "self.pic_sender_threads[chat_id] = t\n", "t.start()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_3(self):...\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', wait_duration=-1), None)\n", "self._mox.VerifyAll()\n" ]
[ "def testUrlOpenInvalidWaitDuration(self):...\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', wait_duration=-1), None)\n", "self._mox.VerifyAll()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "return {'files': ['file_opened', 'file_read'], 'registry': ['regkey_opened',\n 'regkey_written', 'regkey_read'], 'mutexes': ['mutex'], 'directories':\n ['directory_created', 'directory_removed', 'directory_enumerated'],\n 'processes': ['command_line', 'dll_loaded']}\n" ]
[ "@staticmethod...\n", "return {'files': ['file_opened', 'file_read'], 'registry': ['regkey_opened',\n 'regkey_written', 'regkey_read'], 'mutexes': ['mutex'], 'directories':\n ['directory_created', 'directory_removed', 'directory_enumerated'],\n 'processes': ['command_line', 'dll_loaded']}\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@staticmethod...\n", "if tuple(VAR_17) != tuple(VAR_12):\n", "VAR_31 = Diff.from_string_arrays(VAR_12, VAR_17)\n", "for diff in VAR_31.split_diff():\n", "yield diff\n" ]
[ "@staticmethod...\n", "if tuple(new_file) != tuple(file):\n", "wholediff = Diff.from_string_arrays(file, new_file)\n", "for diff in wholediff.split_diff():\n", "yield diff\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "For", "Expr'" ]
[ "def FUNC_14(self, VAR_16=None):...\n", "if not VAR_16:\n", "VAR_26 = '/home/peter/Desktop/' + str(self.entry_id) + '.txt'\n", "return None\n", "VAR_27 = open(VAR_26, 'w')\n", "VAR_27.write('id ' + str(self.entry_id) + '\\n')\n", "VAR_27.write('title ' + self.title + '\\n')\n", "VAR_27.write(self.body...
[ "def export_entry(self, location=None):...\n", "if not location:\n", "export_location = '/home/peter/Desktop/' + str(self.entry_id) + '.txt'\n", "return None\n", "export_file = open(export_location, 'w')\n", "export_file.write('id ' + str(self.entry_id) + '\\n')\n", "export_file.write('title ' + self.ti...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_27(VAR_6):...\n", "return FUNC_8(VAR_6, 'no-store')\n" ]
[ "def validate_nostore(page):...\n", "return validate_cache_control_header(page, 'no-store')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_11(VAR_16):...\n", "print(VAR_16)\n" ]
[ "def error_handler(msg):...\n", "print(msg)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_13(VAR_6):...\n", "VAR_4.register_jvm_tool(VAR_8, VAR_4._key_for_tool_version('scalac', VAR_6),\n VAR_15=[cls._create_compiler_jardep(version)])\n" ]
[ "def register_scala_compiler_tool(version):...\n", "cls.register_jvm_tool(register, cls._key_for_tool_version('scalac', version\n ), classpath=[cls._create_compiler_jardep(version)])\n" ]
[ 0, 7 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_7(VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "VAR_0.info('Creating admin...')\n", "VAR_5['username'] = 'admin%s' % VAR_14\n", "VAR_5['password'] = 'adminpwd'\n", "FUNC_4([sys.executable, 'cmscontrib/AddAdmin.py', '%(username)s' % VAR_5,\n '-p', '%(password)s' % VAR_5])\n" ]
[ "def initialize_aws(rand):...\n", "\"\"\"docstring\"\"\"\n", "logger.info('Creating admin...')\n", "admin_info['username'] = 'admin%s' % rand\n", "admin_info['password'] = 'adminpwd'\n", "sh([sys.executable, 'cmscontrib/AddAdmin.py', '%(username)s' % admin_info,\n '-p', '%(password)s' % admin_info])\n"...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "@app.route('/api/sequences/<id>/duplicate', methods=['POST'])...\n", "return controller.sequences.duplicate(VAR_4).to_map()\n" ]
[ "@app.route('/api/sequences/<id>/duplicate', methods=['POST'])...\n", "return controller.sequences.duplicate(id).to_map()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_18(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ "def OnInsertLeave(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'" ]
[ "def FUNC_8(self):...\n", "VAR_7 = BokChoyTestSuite('', serversonly=True)\n", "self.assertEqual(VAR_7.cmd, '')\n" ]
[ "def test_serversonly(self):...\n", "suite = BokChoyTestSuite('', serversonly=True)\n", "self.assertEqual(suite.cmd, '')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.resources = VAR_76, VAR_52\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.resources = args, resources\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@VAR_3.message_handler(commands=['donate'])...\n", "VAR_24 = telebot.types.InlineKeyboardMarkup()\n", "VAR_24.add(telebot.types.InlineKeyboardButton('PayPal', url=\n 'https://www.paypal.me/victor141516'))\n", "VAR_3.send_message(VAR_6.from_user.id, 'Thank you!', reply_markup=markup)\n" ]
[ "@bot.message_handler(commands=['donate'])...\n", "markup = telebot.types.InlineKeyboardMarkup()\n", "markup.add(telebot.types.InlineKeyboardButton('PayPal', url=\n 'https://www.paypal.me/victor141516'))\n", "bot.send_message(message.from_user.id, 'Thank you!', reply_markup=markup)\n" ]
[ 0, 4, 0, 0 ]
[ "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_30(self):...\n", "VAR_46 = FlaskForm.validate(self)\n", "if not VAR_46:\n", "return False\n", "VAR_6 = FUNC_3(self.email.data)\n", "if VAR_6:\n", "self.password.errors.append('Email already registered')\n", "if len(self.password.data) < 8:\n", "return False\n", "self.password.errors.appe...
[ "def validate(self):...\n", "rv = FlaskForm.validate(self)\n", "if not rv:\n", "return False\n", "user = auth_get_user_by_email(self.email.data)\n", "if user:\n", "self.password.errors.append('Email already registered')\n", "if len(self.password.data) < 8:\n", "return False\n", "self.password.erro...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Condition", "Return'", "Expr'", "Assign'", "Return'", "Return'" ]
[ "import re\n", "from db import Database\n", "from csv_generator import CSVGenerator\n", "def __init__(self):...\n", "self.db = Database('/Users/alexander/code/bots/CashboxBot/data.db')\n", "self.csv_generator = CSVGenerator()\n", "def FUNC_0(self, VAR_0):...\n", "VAR_0 = VAR_0.lower()\n", "VAR_1 = s...
[ "import re\n", "from db import Database\n", "from csv_generator import CSVGenerator\n", "def __init__(self):...\n", "self.db = Database('/Users/alexander/code/bots/CashboxBot/data.db')\n", "self.csv_generator = CSVGenerator()\n", "def parse_message(self, string):...\n", "string = string.lower()\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_4(self, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "if u(VAR_7).startswith('/'):\n", "return self.parse(VAR_7)\n", "if not self.trailing_slash and self.parts:\n", "self.parts.pop()\n", "VAR_7 = self.new(VAR_7)\n", "self.parts += VAR_7.parts\n", "self._trailing_slash = VAR_7._trailing_slash\...
[ "def merge(self, path):...\n", "\"\"\"docstring\"\"\"\n", "if u(path).startswith('/'):\n", "return self.parse(path)\n", "if not self.trailing_slash and self.parts:\n", "self.parts.pop()\n", "path = self.new(path)\n", "self.parts += path.parts\n", "self._trailing_slash = path._trailing_slash\n", "r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Expr'", "Assign'", "AugAssign'", "Assign'", "Return'" ]
[ "@VAR_0.filter...\n", "return VAR_3.max_submissions_for_student(VAR_4)\n" ]
[ "@register.filter...\n", "return exercise.max_submissions_for_student(user_profile)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_3(self, VAR_16, VAR_17, VAR_18=None):...\n", "if self.is_compressed_variant(VAR_17, VAR_18=stat_cache):\n", "return\n", "if self.index_file and VAR_16.endswith('/' + self.index_file):\n", "VAR_30 = VAR_16[:-len(self.index_file)]\n", "VAR_15 = self.get_static_file(VAR_17, VAR_16, VAR_18=stat_cach...
[ "def add_file_to_dictionary(self, url, path, stat_cache=None):...\n", "if self.is_compressed_variant(path, stat_cache=stat_cache):\n", "return\n", "if self.index_file and url.endswith('/' + self.index_file):\n", "index_url = url[:-len(self.index_file)]\n", "static_file = self.get_static_file(path, url, st...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def act(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "@classmethod...\n", "return ['runtime_classpath']\n" ]
[ "@classmethod...\n", "return ['runtime_classpath']\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_0(VAR_0):...\n", "VAR_4, VAR_5 = VAR_0\n", "VAR_6 = (VAR_4 * VAR_4 + 3 * VAR_4 + 2 * VAR_4 * VAR_5 + VAR_5 + VAR_5 *\n VAR_5 + 1358)\n", "return VAR_4 >= 0 and VAR_5 >= 0 and bin(VAR_6).count('1') % 2 == 0\n" ]
[ "def isopen(location):...\n", "x, y = location\n", "num = x * x + 3 * x + 2 * x * y + y + y * y + 1358\n", "return x >= 0 and y >= 0 and bin(num).count('1') % 2 == 0\n" ]
[ 0, 1, 1, 1 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "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_5(self, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_30():...\n", "def FUNC_36():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n", "for VAR_1 in VAR_9:\n", "for VAR_3 in FUNC_36():\n", "return list(FUNC_30())\n", ...
[ "def find_libs(self, names):...\n", "\"\"\"docstring\"\"\"\n", "def collect_existing_libs():...\n", "def lib_paths():...\n", "yield os.path.join(self.home, 'lib')\n", "if self.jdk:\n", "yield os.path.join(self.home, 'jre', 'lib')\n", "for name in names:\n", "for path in lib_paths():\n", "return li...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "FunctionDef'", "Expr'", "Condition", "Expr'", "For", "For", "Return'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_16(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = sys.exc_info()[1]\n", "VAR_13 = {'message': VAR_15.message, 'traceDump': traceback.format_exc()}\n", "logging.exception(VAR_15)\n", "if helpers.should_render_json(self.request.headers.get('accept', ''), self.\n", "self.render_json(VAR_13, 5...
[ "def handle_exception_exception(self):...\n", "\"\"\"docstring\"\"\"\n", "exception = sys.exc_info()[1]\n", "values = {'message': exception.message, 'traceDump': traceback.format_exc()}\n", "logging.exception(exception)\n", "if helpers.should_render_json(self.request.headers.get('accept', ''), self.\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_33):...\n", "VAR_78 = []\n", "for v in self.splitter.split(VAR_33):\n", "VAR_21 = self.id_re.match(v)\n", "return VAR_78\n", "if VAR_21:\n", "VAR_108 = CLASS_5(None, False).run(VAR_21.group(1))\n", "if VAR_108:\n", "VAR_78.append(VAR_108)\n" ]
[ "def run(self, val):...\n", "res = []\n", "for v in self.splitter.split(val):\n", "link_id = self.id_re.match(v)\n", "return res\n", "if link_id:\n", "l = VLink(None, False).run(link_id.group(1))\n", "if l:\n", "res.append(l)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_1(self):...\n", "VAR_6 = ContentConverter.getAllPostsList()\n", "self.render('templates/Home.html', VAR_6=allPosts)\n" ]
[ "def get(self):...\n", "allPosts = ContentConverter.getAllPostsList()\n", "self.render('templates/Home.html', allPosts=allPosts)\n" ]
[ 0, 0, 5 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def __init__(self):...\n", "" ]
[ "def __init__(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_5(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_1.startswith('/sys/class/block'):\n", "VAR_17 = [0.2] * 150\n", "VAR_18 = 'string'.format(VAR_1)\n", "if not os.path.exists(VAR_1):\n", "LOG.info(VAR_18)\n", "VAR_19 = [FUNC_3(k, VAR_2=False) for k in os.listdir(os.path.join(VAR_1,\n ...
[ "def shutdown_bcache(device):...\n", "\"\"\"docstring\"\"\"\n", "if not device.startswith('/sys/class/block'):\n", "removal_retries = [0.2] * 150\n", "bcache_shutdown_message = (\n 'shutdown_bcache running on {} has determined that the device has already been shut down during handling of another bcache d...
[ 0, 0, 0, 0, 0, 0, 0, 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", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", ...
[ "\"\"\" Client blueprint used to handle OAuth callbacks. \"\"\"\n", "from __future__ import absolute_import\n", "from flask import Blueprint, abort, current_app, url_for, request\n", "from flask.ext.login import user_logged_out\n", "from invenio.base.globals import cfg\n", "from invenio.ext.sslify import ...
[ "\"\"\" Client blueprint used to handle OAuth callbacks. \"\"\"\n", "from __future__ import absolute_import\n", "from flask import Blueprint, abort, current_app, url_for, request\n", "from flask.ext.login import user_logged_out\n", "from invenio.base.globals import cfg\n", "from invenio.ext.sslify import ...
[ 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "For", "Docstring", "Expr'", "Expr'", "For", "Condition", "Condition", "Assign'", "Assign'", "Docstring", "Expr'", "Condition", "Expr'", "Return'",...
[ "def FUNC_3(VAR_5: Iterator[Iterator[T]]) ->Iterator[VAR_0]:...\n", "for iterable in VAR_5:\n", "yield from iterable\n" ]
[ "def _flatten(iterables: Iterator[Iterator[T]]) ->Iterator[T]:...\n", "for iterable in iterables:\n", "yield from iterable\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "def FUNC_0():...\n", "VAR_1 = config('cuckoo:cuckoo:machinery')\n", "if config('routing:vpn:enabled'):\n", "VAR_4 = config('routing:vpn:vpns')\n", "VAR_4 = []\n", "return {'machine': config('%s:%s:machines' % (VAR_1, VAR_1)), 'package':\n None, 'priority': 2, 'timeout': config('cuckoo:timeouts:default...
[ "def defaults():...\n", "machinery = config('cuckoo:cuckoo:machinery')\n", "if config('routing:vpn:enabled'):\n", "vpns = config('routing:vpn:vpns')\n", "vpns = []\n", "return {'machine': config('%s:%s:machines' % (machinery, machinery)),\n 'package': None, 'priority': 2, 'timeout': config(\n 'cucko...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._options\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._options\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_1(VAR_0, VAR_4=1901, VAR_5=2100, VAR_1='_', VAR_3=-1):...\n", "\"\"\"docstring\"\"\"\n", "import pandas as pd\n", "VAR_19 = [int(fn.split('.')[0].split(VAR_1)[VAR_3]) for fn in VAR_0]\n", "VAR_20 = pd.DataFrame({'fn': VAR_0, 'year': VAR_19})\n", "VAR_22 = VAR_20[(VAR_20.year >= VAR_4) & (VAR_20....
[ "def only_years(files, begin=1901, end=2100, split_on='_', elem_year=-1):...\n", "\"\"\"docstring\"\"\"\n", "import pandas as pd\n", "years = [int(fn.split('.')[0].split(split_on)[elem_year]) for fn in files]\n", "df = pd.DataFrame({'fn': files, 'year': years})\n", "df_slice = df[(df.year >= begin) & (df....
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Import'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_8 = 'test_foo.py:FooTest'\n", "VAR_7 = BokChoyTestSuite('', test_spec=spec)\n", "VAR_1 = 'tests/{}'.format(VAR_8)\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n" ]
[ "def test_class_spec(self):...\n", "spec = 'test_foo.py:FooTest'\n", "suite = BokChoyTestSuite('', test_spec=spec)\n", "name = 'tests/{}'.format(spec)\n", "self.assertEqual(suite.cmd, self._expected_command(name=name))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "@app.route('/api/indi_profiles/<id>', methods=['DELETE'])...\n", "VAR_14 = controller.indi_profiles.lookup(VAR_4)\n", "VAR_15 = VAR_14.to_map()\n", "VAR_15.update({'status': 'deleted'})\n", "controller.indi_profiles.remove(VAR_14)\n", "return VAR_15\n" ]
[ "@app.route('/api/indi_profiles/<id>', methods=['DELETE'])...\n", "indi_profile = controller.indi_profiles.lookup(id)\n", "indi_profile_json = indi_profile.to_map()\n", "indi_profile_json.update({'status': 'deleted'})\n", "controller.indi_profiles.remove(indi_profile)\n", "return indi_profile_json\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_27(VAR_1, VAR_23, VAR_24=ITEMS_PER_PAGE):...\n", "\"\"\"docstring\"\"\"\n", "VAR_51 = FUNC_34(VAR_23)\n", "VAR_52 = {}\n", "VAR_52['page_count'] = VAR_1.count()\n", "VAR_52['max_pages'] = int(VAR_52['page_count'] / VAR_24 + (VAR_52[\n 'page_count'] % VAR_24 > 0))\n", "if VAR_51 > VAR_52['ma...
[ "def generate_paginator(obj, request, items_per_page=ITEMS_PER_PAGE):...\n", "\"\"\"docstring\"\"\"\n", "page_num = page_list_id(request)\n", "paginator = {}\n", "paginator['page_count'] = obj.count()\n", "paginator['max_pages'] = int(paginator['page_count'] / items_per_page + (\n paginator['page_count...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "\"\"\"string\"\"\"\n", "import mimetypes\n", "import os\n", "import posixpath\n", "import re\n", "import stat\n", "from django.http import FileResponse, Http404, HttpResponse, HttpResponseNotModified, HttpResponseRedirect\n", "from django.template import Context, Engine, TemplateDoesNotExist, loader\...
[ "\"\"\"\nViews and functions for serving static files. These are only to be used\nduring development, and SHOULD NOT be used in a production setting.\n\"\"\"\n", "import mimetypes\n", "import os\n", "import posixpath\n", "import re\n", "import stat\n", "from django.http import FileResponse, Http404, Htt...
[ 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Conditio...
[ "@functools.wraps(VAR_9)...\n", "VAR_19 = {'$schema': 'http://json-schema.org/draft-07/schema#',\n 'definitions': {'tag': {'type': 'object', 'required': ['namespace',\n 'predicate', 'value'], 'properties': {'namespace': {'type': 'string'},\n 'predicate': {'type': 'string'}, 'value': {'type': ['number', '...
[ "@functools.wraps(func)...\n", "request_schema = {'$schema': 'http://json-schema.org/draft-07/schema#',\n 'definitions': {'tag': {'type': 'object', 'required': ['namespace',\n 'predicate', 'value'], 'properties': {'namespace': {'type': 'string'},\n 'predicate': {'type': 'string'}, 'value': {'type': ['num...
[ 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_10(VAR_20, VAR_21):...\n", "return VAR_21[len(VAR_20):] if VAR_21.startswith(VAR_20) else VAR_21\n" ]
[ "def strip_prefix(prefix, s):...\n", "return s[len(prefix):] if s.startswith(prefix) else s\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(VAR_1, VAR_6, VAR_7, **VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = VAR_8.get('table', 'data')\n", "VAR_22 = VAR_8.get('limit', 6000)\n", "VAR_23 = VAR_8.get('tcol', 'TIMESTAMP')\n", "VAR_24 = VAR_8.get('full_resolution', False)\n", "VAR_25 = VAR_8.get('coerce_float', False)\n", "VAR...
[ "def history(conn, start, end, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "table = kwargs.get('table', 'data')\n", "limit = kwargs.get('limit', 6000)\n", "tcol = kwargs.get('tcol', 'TIMESTAMP')\n", "full_resolution = kwargs.get('full_resolution', False)\n", "coerce_float = kwargs.get('coerce_float', F...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign...
[ "def FUNC_6(self, VAR_5, VAR_6, VAR_18, VAR_19=0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_39 = []\n", "if VAR_19 == 0:\n", "VAR_56 = 'string' % (VAR_19, str(VAR_18))\n", "VAR_56 = 'string' % (VAR_19, str(VAR_18))\n", "VAR_5.execute(VAR_56)\n", "VAR_5.execute(VAR_56)\n", "VAR_39.append(VAR_5.dictfetc...
[ "def get_flat_tree(self, cr, uid, root_id, level=0):...\n", "\"\"\"docstring\"\"\"\n", "result = []\n", "if level == 0:\n", "query = (\n \"\"\"SELECT id, code, name, sequence, type, style, %s as level\n FROM budget_item\n WHERE id = %s \"\"\"\n % (level, st...
[ 0, 0, 0, 4, 4, 4, 0, 0, 4, 4, 4, 4, 4, 4, 4, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "AugAssign'", "For", "Expr'", "Condition", "AugAssign'", "Return'" ]
[ "def FUNC_11(self):...\n", "self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name', 'issingle, version()'], limit_start=0, limit_page_length=1)\n", "self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name',\n 'issingle, IF(issingle=1, (selec...
[ "def test_query_fields_sanitizer(self):...\n", "self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name', 'issingle, version()'], limit_start=0, limit_page_length=1)\n", "self.assertRaises(frappe.DataError, DatabaseQuery('DocType').execute,\n fields=['name',\n 'issingle, I...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_11(VAR_13):...\n", "return binascii.unhexlify(VAR_13)\n" ]
[ "def hex_to_binary(hex_identifier):...\n", "return binascii.unhexlify(hex_identifier)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_61=False, VAR_62=False, VAR_63='rate_', *VAR_15, **...\n", "self.rate_user = VAR_61\n", "self.rate_ip = VAR_62\n", "self.prefix = VAR_63\n", "CLASS_0.__init__(self, *VAR_15, **kw)\n" ]
[ "def __init__(self, rate_user=False, rate_ip=False, prefix='rate_', *a, **kw):...\n", "self.rate_user = rate_user\n", "self.rate_ip = rate_ip\n", "self.prefix = prefix\n", "Validator.__init__(self, *a, **kw)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_11(self):...\n", "VAR_23 = self.get_form_kwargs()\n", "VAR_23.update({'instance': self.get_object()})\n", "return self.access_form_class(**form_kwargs)\n" ]
[ "def _get_access_form(self):...\n", "form_kwargs = self.get_form_kwargs()\n", "form_kwargs.update({'instance': self.get_object()})\n", "return self.access_form_class(**form_kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = self.verify(50, self._list_networks, 1,\n 'List of networks is not available.', 'listing networks')\n", "VAR_3, VAR_4 = zip(*((n.label, n.id) for n in VAR_2))\n", "for mynet in self.network:\n", "self.verify_response_body(VAR_3, mynet.label,...
[ "def test_003_check_networks(self):...\n", "\"\"\"docstring\"\"\"\n", "seen_nets = self.verify(50, self._list_networks, 1,\n 'List of networks is not available.', 'listing networks')\n", "seen_labels, seen_ids = zip(*((n.label, n.id) for n in seen_nets))\n", "for mynet in self.network:\n", "self.verify...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Expr'", "Expr'" ]
[ "\"\"\"Admin model views for records.\"\"\"\n", "import json\n", "from flask import flash\n", "from flask_admin.contrib.sqla import ModelView\n", "from flask_babelex import gettext as _\n", "from invenio_admin.filters import FilterConverter\n", "from invenio_db import db\n", "from markupsafe import Ma...
[ "\"\"\"Admin model views for records.\"\"\"\n", "import json\n", "from flask import flash\n", "from flask_admin.contrib.sqla import ModelView\n", "from flask_babelex import gettext as _\n", "from invenio_admin.filters import FilterConverter\n", "from invenio_db import db\n", "from markupsafe import Ma...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", ...
[ "def FUNC_3():...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'string'\n", "frappe.db.sql(VAR_11, auto_commit=True)\n", "VAR_14 = 'truncate table `zEbayListings` '\n", "frappe.db.sql(VAR_14, auto_commit=True)\n" ]
[ "def create_ebay_listings_table():...\n", "\"\"\"docstring\"\"\"\n", "sql = \"\"\"\n create table if not exists `zEbayListings` (\n `sku` varchar(20),\n `ebay_id` varchar(38),\n `qty` integer,\n `price` decimal(18,6),\n `site` varchar(6),\n `hit_count` integer,\n...
[ 0, 0, 4, 4, 4, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_45(self):...\n", "self.compilation_ko('stop \"toto\";')\n" ]
[ "def test_unexpected_argument(self):...\n", "self.compilation_ko('stop \"toto\";')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_11(self, VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_19 = self.HigherOrderNodeToPath(VAR_8[0])\n", "for x in VAR_8[1:]:\n", "VAR_19 += self.HigherOrderNodeToPath(x)[-1],\n", "return VAR_19\n" ]
[ "def HigherOrderPathToFirstOrder(self, path):...\n", "\"\"\"docstring\"\"\"\n", "p1 = self.HigherOrderNodeToPath(path[0])\n", "for x in path[1:]:\n", "p1 += self.HigherOrderNodeToPath(x)[-1],\n", "return p1\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "AugAssign'", "Return'" ]
[ "def FUNC_0(VAR_1, VAR_2):...\n", "if isinstance(VAR_2, string_types):\n", "VAR_2 = Revision.lenient(VAR_2)\n", "if VAR_2 and not isinstance(VAR_2, Revision):\n", "return VAR_2\n" ]
[ "def _parse_java_version(name, version):...\n", "if isinstance(version, string_types):\n", "version = Revision.lenient(version)\n", "if version and not isinstance(version, Revision):\n", "return version\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Return'" ]
[ "def FUNC_1(VAR_2, VAR_4, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = VAR_3.key().name()\n", "return VAR_0[VAR_3.type].parse_input(VAR_2, VAR_6, VAR_4.get(VAR_6, None),\n VAR_4, VAR_3)\n" ]
[ "def parse_input(report, request, attribute):...\n", "\"\"\"docstring\"\"\"\n", "name = attribute.key().name()\n", "return ATTRIBUTE_TYPES[attribute.type].parse_input(report, name, request.\n get(name, None), request, attribute)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def __init__(self, VAR_4):...\n", "super(CLASS_0, self).__init__()\n", "self._set_loader(VAR_4)\n", "self._banner_filename = VAR_4 or '_login_disclaimer_banner.html'\n" ]
[ "def __init__(self, banner):...\n", "super(DisclaimerElement, self).__init__()\n", "self._set_loader(banner)\n", "self._banner_filename = banner or '_login_disclaimer_banner.html'\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_8(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = get_password_reset_link(VAR_3)\n", "VAR_9 = {'reset_link': VAR_11, 'user': VAR_3}\n", "VAR_10 = email.EmailHolder(subject='{} password reset request'.format(app.\n config['GLOBAL_SITE_NAME']), recipient=user, text=flask.render_template\n ...
[ "def send_password_reset_request_email(user):...\n", "\"\"\"docstring\"\"\"\n", "reset_link = get_password_reset_link(user)\n", "tmpl_context = {'reset_link': reset_link, 'user': user}\n", "email_msg = email.EmailHolder(subject='{} password reset request'.format(\n app.config['GLOBAL_SITE_NAME']), recipi...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_6(self):...\n", "c.get(url_for('oauthclient.login', remote_app='test'))\n", "self.mock_response(VAR_5='test')\n", "self.mock_response(VAR_5='test_invalid')\n", "VAR_1 = c.get(url_for('oauthclient.authorized', remote_app='test', code='test')\n )\n", "assert VAR_1.data == 'TEST'\n", "assert s...
[ "def test_authorized(self):...\n", "c.get(url_for('oauthclient.login', remote_app='test'))\n", "self.mock_response(app='test')\n", "self.mock_response(app='test_invalid')\n", "resp = c.get(url_for('oauthclient.authorized', remote_app='test', code='test'))\n", "assert resp.data == 'TEST'\n", "assert self...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Assign'", "Assert'", "Assert'", "Assert'", "Assert'", "Assert'", "Assign'" ]
[ "def FUNC_8(self):...\n", "run_shell_command('super-cool-command', weird_parameter2='abc')\n", "run_shell_command('super-cool-command', universal_newlines=False)\n" ]
[ "def test_run_shell_command_kwargs_delegation(self):...\n", "run_shell_command('super-cool-command', weird_parameter2='abc')\n", "run_shell_command('super-cool-command', universal_newlines=False)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "from flask import Blueprint, request, make_response, jsonify\n", "from flask.views import MethodView\n", "from ...models import Table\n", "from ....utils import jwt_required\n", "VAR_0 = Blueprint('answers', __name__)\n", "\"\"\" Update Instance api resource \"\"\"\n", "@jwt_required...\n", "VAR_7 = ...
[ "from flask import Blueprint, request, make_response, jsonify\n", "from flask.views import MethodView\n", "from ...models import Table\n", "from ....utils import jwt_required\n", "answers_blueprint = Blueprint('answers', __name__)\n", "\"\"\" Update Instance api resource \"\"\"\n", "@jwt_required...\n",...
[ 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_17(self, VAR_10='_cores _nodes'.split()):...\n", "VAR_23 = {name: res for name, res in self.resources.items() if name not in\n VAR_10}\n", "VAR_24 = {name: value for name, value in self.params.items()}\n", "VAR_25 = {'rule': self.rule.name, 'local': self.dag.workflow.is_local(self.\n rule), 'i...
[ "def properties(self, omit_resources='_cores _nodes'.split()):...\n", "resources = {name: res for name, res in self.resources.items() if name not in\n omit_resources}\n", "params = {name: value for name, value in self.params.items()}\n", "properties = {'rule': self.rule.name, 'local': self.dag.workflow.is_...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self, VAR_19, VAR_17=None, VAR_18=None):...\n", "VAR_25 = VAR_19\n", "if VAR_17 and VAR_18:\n", "VAR_25 = self.get_full_path(VAR_19, VAR_17, VAR_18)\n", "if VAR_25 == self.from_url:\n", "VAR_0.debug('Redirecting %s', self)\n", "if '$rest' in self.from_url:\n", "return self.to_url\n", "VA...
[ "def redirect_exact(self, path, language=None, version_slug=None):...\n", "full_path = path\n", "if language and version_slug:\n", "full_path = self.get_full_path(path, language, version_slug)\n", "if full_path == self.from_url:\n", "log.debug('Redirecting %s', self)\n", "if '$rest' in self.from_url:\n"...
[ 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_9(self, VAR_17=None):...\n", "\"\"\"docstring\"\"\"\n", "return CLASS_0.generate([api.get_current_identity().to_bytes()], VAR_17)\n" ]
[ "def generate_xsrf_token(self, xsrf_token_data=None):...\n", "\"\"\"docstring\"\"\"\n", "return XSRFToken.generate([api.get_current_identity().to_bytes()],\n xsrf_token_data)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_4(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name, 'size': 1, 'id': self.volid}\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'show').AndRaise(\n processutils.ProcessExecutionError(stdout=\n \"\"\...
[ "def test_delete_absent_volume(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name, 'size': 1, 'id': self.volid}\n", "self.driver._eql_execute('volume', 'select', volume['name'], 'show').AndRaise(\n processutils.ProcessExecutionErr...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(VAR_4, VAR_5, *VAR_6):...\n", "VAR_14 = 'could not resolve dependency: %s' % VAR_4\n", "VAR_20 = VAR_5[VAR_6]\n", "if not VAR_20:\n", "return VAR_20\n" ]
[ "def resolve_dep(target, from_map, *args):...\n", "errmsg = 'could not resolve dependency: %s' % target\n", "ret = from_map[args]\n", "if not ret:\n", "return ret\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_2(VAR_0, VAR_1, VAR_4, VAR_5, VAR_6, VAR_2, VAR_3):...\n", "VAR_10 = {'limit': VAR_1, 'offset': int(VAR_0 * VAR_1)}\n", "VAR_14 = ''\n", "if VAR_4:\n", "VAR_14 = 'where c.author_id=' + str(VAR_4)\n", "if VAR_5:\n", "if VAR_6:\n", "VAR_14 = 'where b.series_id=' + str(VAR_5)\n", "VAR_20 = '%...
[ "def search_for_books_by_page(page, pagesize, author_id, series_id,...\n", "inputs = {'limit': pagesize, 'offset': int(page * pagesize)}\n", "wh = ''\n", "if author_id:\n", "wh = 'where c.author_id=' + str(author_id)\n", "if series_id:\n", "if search_arg:\n", "wh = 'where b.series_id=' + str(series_id...
[ 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_12(self):...\n", "VAR_38 = Gio.File.new_for_uri(\n 'resource:///run/terminal/KeepassGtk/database.kdbx')\n", "VAR_39 = Gio.File.new_for_path(self.filechooser_creation_dialog.get_filename())\n", "VAR_38.copy(VAR_39, Gio.FileCopyFlags.OVERWRITE)\n", "self.filechooser_creation_dialog.close()\n" ]
[ "def copy_database_file(self):...\n", "stock_database = Gio.File.new_for_uri(\n 'resource:///run/terminal/KeepassGtk/database.kdbx')\n", "new_database = Gio.File.new_for_path(self.filechooser_creation_dialog.\n get_filename())\n", "stock_database.copy(new_database, Gio.FileCopyFlags.OVERWRITE)\n", "se...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def __init__(self, **VAR_1):...\n", "super().__init__(**kwargs)\n", "self.argv = list(sys.argv)\n", "self.cwd = os.getcwd()\n" ]
[ "def __init__(self, **kwargs):...\n", "super().__init__(**kwargs)\n", "self.argv = list(sys.argv)\n", "self.cwd = os.getcwd()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_13(VAR_9, VAR_7, VAR_11, VAR_10):...\n", "if VAR_11 == 'POST':\n", "return CLASS_0.session.post(FUNC_2(VAR_7), VAR_9=ToUtf8Json(data), headers=\n _HEADERS, VAR_10=timeout)\n", "if VAR_11 == 'GET':\n", "return CLASS_0.session.get(FUNC_2(VAR_7), headers=_HEADERS, VAR_10=timeout)\n" ]
[ "def SendRequest(data, handler, method, timeout):...\n", "if method == 'POST':\n", "return BaseRequest.session.post(_BuildUri(handler), data=ToUtf8Json(data),\n headers=_HEADERS, timeout=timeout)\n", "if method == 'GET':\n", "return BaseRequest.session.get(_BuildUri(handler), headers=_HEADERS,\n timeo...
[ 0, 0, 7, 0, 7 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'" ]
[ "def FUNC_6(self, VAR_10, VAR_11):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def create_volume_from_snapshot(self, volume, snapshot):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "from lxml import html\n", "from django.test import TestCase\n", "from dashboard.tests.loader import load_model_objects\n", "from dashboard.models import *\n", "import os\n", "import csv\n", "import time\n", "import unittest\n", "import collections\n", "import json\n", "import re\n", "from sel...
[ "from lxml import html\n", "from django.test import TestCase\n", "from dashboard.tests.loader import load_model_objects\n", "from dashboard.models import *\n", "import os\n", "import csv\n", "import time\n", "import unittest\n", "import collections\n", "import json\n", "import re\n", "from sel...
[ 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Imp...
[ "def FUNC_6(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_3 = {'name': 'fakesnap', 'volume_name': 'fakevolume_name'}\n", "VAR_4 = 'fake_snap_name'\n", "self.driver._eql_execute('volume', 'select', VAR_3['volume_name'],\n 'snapshot', 'create-now').AndRetu...
[ "def test_create_snapshot(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "snapshot = {'name': 'fakesnap', 'volume_name': 'fakevolume_name'}\n", "snap_name = 'fake_snap_name'\n", "self.driver._eql_execute('volume', 'select', snapshot['volume_name'],\n 'snapshot...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_4(VAR_6):...\n", "" ]
[ "def check_sane_integer(syscall_number):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@inlineCallbacks...\n", "VAR_18 = []\n", "VAR_18 = yield self.connection.runQuery(VAR_7)\n", "print('ERROR: Running query %s' % VAR_7)\n", "returnValue(VAR_18)\n", "print(err)\n" ]
[ "@inlineCallbacks...\n", "answer = []\n", "answer = yield self.connection.runQuery(query)\n", "print('ERROR: Running query %s' % query)\n", "returnValue(answer)\n", "print(err)\n" ]
[ 4, 0, 4, 4, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "import sys, os, time, shodan\n", "from pathlib import Path\n", "from scapy.all import *\n", "from contextlib import contextmanager, redirect_stdout\n", "VAR_0 = time.time()\n", "@contextmanager...\n", "yield\n", "VAR_3 = '\\x1b[0m'\n", "VAR_1 = Path('./api.txt')\n", "VAR_2 = CLASS_0.HEADER + 'str...
[ "import sys, os, time, shodan\n", "from pathlib import Path\n", "from scapy.all import *\n", "from contextlib import contextmanager, redirect_stdout\n", "starttime = time.time()\n", "@contextmanager...\n", "yield\n", "HEADER = '\\x1b[0m'\n", "keys = Path('./api.txt')\n", "logo = color.HEADER + \"\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0...
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", ...
[ "def FUNC_1(self, VAR_0, VAR_1=None):...\n", "if self.find_ord(VAR_0) is None:\n", "self.nodes.append(dict(node_object=obj, VAR_1=metadata))\n" ]
[ "def add_node(self, obj, metadata=None):...\n", "if self.find_ord(obj) is None:\n", "self.nodes.append(dict(node_object=obj, metadata=metadata))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def FUNC_0(VAR_0, VAR_1, VAR_2=None, VAR_3=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = posixpath.normpath(VAR_1)\n", "VAR_1 = VAR_1.lstrip('/')\n", "VAR_10 = ''\n", "for VAR_18 in VAR_1.split('/'):\n", "if not VAR_18:\n", "if VAR_10 and VAR_1 != VAR_10:\n", "VAR_17, VAR_18 = os.path.splitdri...
[ "def serve(request, path, document_root=None, show_indexes=False):...\n", "\"\"\"docstring\"\"\"\n", "path = posixpath.normpath(path)\n", "path = path.lstrip('/')\n", "newpath = ''\n", "for part in path.split('/'):\n", "if not part:\n", "if newpath and path != newpath:\n", "drive, part = os.path.spl...
[ 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", ...
[ "def FUNC_10(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = VAR_1[:]\n", "VAR_11.extend(FUNC_7(self))\n", "VAR_13 = ()\n", "if not self.exported and self.status == 'valid':\n", "VAR_13 += 'set_treasury.cancelinvoice', 'set_date.cancelinvoice'\n", "if VAR_13:\n", "VAR_11.append((Allow, 'group:adm...
[ "def get_cancelinvoice_default_acl(self):...\n", "\"\"\"docstring\"\"\"\n", "acl = DEFAULT_PERM_NEW[:]\n", "acl.extend(_get_admin_status_acl(self))\n", "admin_perms = ()\n", "if not self.exported and self.status == 'valid':\n", "admin_perms += 'set_treasury.cancelinvoice', 'set_date.cancelinvoice'\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Condition", "AugAssign'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]